Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

request_id missing on types GetPageResponse, QueryDatabaseResponse and GetDatabaseResponse #505

Open
borisghidaglia opened this issue Apr 30, 2024 · 0 comments · May be fixed by #515
Open

Comments

@borisghidaglia
Copy link

Describe the bug
request_id missing on types GetPageResponse, QueryDatabaseResponse and GetDatabaseResponse

Indeed, it is included in the response but does not appear in types.
Similar to #487

To Reproduce
Node version: v21.7.3
Notion JS library version: 2.2.15

Steps to reproduce the behavior:

  • retrieve a db using client.pages.retrieve, client.databases.retrieve or client.databases.query and save this data as a TS const somewhere.
  • add the satisfies operator like and replace X with the appropriate type.
const notionData = {...} satisfies X; 

You will get this error (as an example with GetPageResponse):
Object literal may only specify known properties, and 'request_id' does not exist in type 'GetPageResponse'

Expected behavior
satisfies X on the data should work as the functions mentioned above return a Promise<X>.

@bansalji02 bansalji02 linked a pull request May 29, 2024 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant