Repository navigation
Add delete_any_document_tag to unlink a tag from an AnyDoc - #72
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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 callDELETE /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.
| } | ||
| }); | ||
|
|
||
| test('Unlink a tag from an any document', async () => { |
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>; |
| } | ||
| }); | ||
|
|
||
| test('Unlink a tag from an any document', async () => { |
amaldona
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the missing AnyDocs unlink-tag helper from Unlink a tag from a ∀Doc.
Changes
Client.prototype.delete_any_document_tag(document_id, tag_id)which sendsDELETE /any-documents/{document_id}/tags/{tag_id}/lib/client/client.jsand add a TypeScript declarationUsage:
Slack Thread