Skip to content

Conversation

@Convly
Copy link
Member

@Convly Convly commented Apr 8, 2025

What does it do?

Export an API type namespace that contains related types

  • Document represents a generic document with common fields and any other property
  • DocumentResponse is a core API response for a document (data/meta), it accepts a Document-like param
  • DocumentResponseCollection is the same as DocumentResponse but data is an array
  • BaseQueryParams is the generic type version of the core API query params

Why is it needed?

Expose those common types to improve the overall developer experience when using the client

How to test it?

Use the node-typescript demo to see how those types can be used

Related issue(s)/PR(s)

fix #53

@Convly Convly added pr: enhancement Refactorings / perfs / testing / translations source: client-types Source is types labels Apr 8, 2025
@Convly Convly requested a review from Bassel17 April 8, 2025 10:12
Copy link
Member

@Bassel17 Bassel17 left a comment

Choose a reason for hiding this comment

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

Nice !
LGTM

@Convly Convly merged commit 0fe1a77 into main Apr 9, 2025
7 checks passed
@Convly Convly deleted the enhancement/api-response-types branch April 17, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement Refactorings / perfs / testing / translations source: client-types Source is types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat]: GenericDocumentResponse has not public export

2 participants