Skip to content

Add delete_any_document_tag to unlink a tag from an AnyDoc - #72

Merged
amaldona merged 1 commit into
mainfrom
cursor/add-anydoc-unlink-tag-6d87
Aug 20, 2026
Merged

amaldona merged 1 commit into
mainfrom
cursor/add-anydoc-unlink-tag-6d87

Conversation

@alejouribesanchez

Copy link
Copy Markdown
Collaborator

Adds the missing AnyDocs unlink-tag helper from Unlink a tag from a ∀Doc.

Changes

  • Add Client.prototype.delete_any_document_tag(document_id, tag_id) which sends DELETE /any-documents/{document_id}/tags/{tag_id}/
  • Wire the module into lib/client/client.js and add a TypeScript declaration
  • Cover the new method with mocked JS tests (including the request path) and a TS test stub that matches existing AnyDoc tests

Usage:

await veryfi_client.delete_any_document_tag(document_id, tag_id);

Slack Thread

Open in Web Open in Cursor 

Expose Client.prototype.delete_any_document_tag to call
DELETE /any-documents/{document_id}/tags/{tag_id}/, matching the
receipts delete_tag helper and the recently added get_any_document_tags.

Co-authored-by: Alejandro Uribe Sánchez <alejouribesanchez@gmail.com>
@alejouribesanchez
alejouribesanchez marked this pull request as ready for review August 19, 2026 21:36
@alejouribesanchez
alejouribesanchez requested a lite review from Copilot August 19, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the missing AnyDocs “unlink tag” helper to the Node.js client, aligning the SDK with the documented AnyDocs API.

Changes:

  • Added Client.prototype.delete_any_document_tag(document_id, tag_id) to call DELETE /any-documents/{document_id}/tags/{tag_id}/.
  • Wired the new AnyDocs module into the client loader and added a TypeScript declaration.
  • Added Jest coverage for the new method (mocked JS test) plus a TS test stub consistent with existing AnyDoc test patterns.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/anydocs/deleteAnyDocumentTag.js Implements the DELETE /any-documents/{document_id}/tags/{tag_id}/ helper on Client.prototype.
lib/client/client.js Loads the new AnyDocs helper module so it’s available on the client.
lib/types/Client.ts Declares the new client method in TypeScript typings.
test/main.test.js Adds mocked JS test verifying method invocation and request path/method.
tests/main.test.ts Adds TS test stub consistent with existing AnyDoc TS tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/main.test.ts
}
});

test('Unlink a tag from an any document', async () => {
Comment thread lib/types/Client.ts
Comment on lines +334 to +338
* @param {string} document_id ID of the document you'd like to unlink the tag from
* @param {string} tag_id ID of the tag you'd like to unlink
* @return {Promise<any>} response about the unlinked tag.
*/
public delete_any_document_tag(document_id: string, tag_id: string): Promise<any>;
Comment thread test/main.test.js
}
});

test('Unlink a tag from an any document', async () => {
@amaldona
amaldona merged commit 9f158bc into main Aug 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants