Skip to content

Add get_any_document_tags for AnyDoc tags API - #71

Merged
decim92 merged 1 commit into
mainfrom
cursor/add-any-document-tags-2f79
Aug 19, 2026
Merged

Add get_any_document_tags for AnyDoc tags API#71
decim92 merged 1 commit into
mainfrom
cursor/add-any-document-tags-2f79

Conversation

@alejouribesanchez

@alejouribesanchez alejouribesanchez commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the missing Get ∀Doc tags endpoint to the Node.js SDK.

  • New Client.get_any_document_tags(document_id) method calls GET /api/v8/partner/any-documents/{document_id}/tags/
  • Wires the method into the client module and TypeScript declarations
  • Adds unit coverage for the request path and tag list response

Example:

const tags = await veryfi_client.get_any_document_tags(document_id);
// { tags: [{ id: 6673474, name: "tag_123" }] }

Test plan

  • npm test -- --coverage: 89/89 tests passed; getAnyDocumentTags.js at 100% coverage
  • Focused test asserts GET /any-documents/{id}/tags/ and a { tags: [...] } response
  • Reviewer: optionally hit a live AnyDoc ID with credentials to confirm the production endpoint

Slack Thread

Open in Web Open in Cursor 

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>

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 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 calls GET /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
decim92 merged commit 8eabe7f into main Aug 19, 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.

6 participants