Add get_any_document_tags for AnyDoc tags API - #71
Merged
Conversation
Expose GET /any-documents/{document_id}/tags/ as Client.get_any_document_tags, with TypeScript typings and unit tests covering the request path and response shape.
Co-authored-by: Alejandro Uribe Sánchez <alejouribesanchez@gmail.com>
alejouribesanchez
marked this pull request as ready for review
August 19, 2026 19:54
There was a problem hiding this comment.
Pull request overview
Adds the missing AnyDoc “Get ∀Doc tags” endpoint to the Node.js SDK by introducing a new client method and wiring it into the existing client module, along with unit coverage that validates both the request path and the returned tag list shape.
Changes:
- Adds
Client.get_any_document_tags(document_id)that callsGET /any-documents/{document_id}/tags/and returns the response payload. - Wires the new method into the exported client bundle (
lib/client/client.js) and the TypeScript declarations (lib/types/Client.ts). - Adds Jest coverage to validate the request path and basic response shape in the JS test suite (and a TS suite entry consistent with the existing TS test structure).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/main.test.ts | Adds a TS test entry for “Get any document tags” consistent with the existing mock/skip pattern in this file. |
| test/main.test.js | Adds a mocked unit test asserting the request path /any-documents/{id}/tags/ and a { tags: [...] }-shaped response. |
| lib/types/Client.ts | Adds the TypeScript declaration for get_any_document_tags returning Promise<{ tags: Tag[] }> and accepting VeryfiExtraArgs. |
| lib/client/client.js | Requires the new AnyDoc tags module so the method is attached to the exported Client prototype. |
| lib/anydocs/getAnyDocumentTags.js | Implements Client.prototype.get_any_document_tags and returns response.data from _request(...). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
decim92
approved these changes
Aug 19, 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.
Summary
Adds the missing Get ∀Doc tags endpoint to the Node.js SDK.
Client.get_any_document_tags(document_id)method callsGET /api/v8/partner/any-documents/{document_id}/tags/Example:
Test plan
npm test -- --coverage: 89/89 tests passed;getAnyDocumentTags.jsat 100% coverageGET /any-documents/{id}/tags/and a{ tags: [...] }responseSlack Thread