Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DatabasePropertyConfigResponse is a local type #475

Open
aDogCalledSpot opened this issue Dec 3, 2023 · 2 comments
Open

DatabasePropertyConfigResponse is a local type #475

aDogCalledSpot opened this issue Dec 3, 2023 · 2 comments

Comments

@aDogCalledSpot
Copy link

aDogCalledSpot commented Dec 3, 2023

Describe the bug
When fetching a database, there isn't a way to properly cast a property to the proper type it's supposed to be since these types aren't exported.

To Reproduce
Notion JS library version: current master

Relevant line of code

example:

const response = await notion.databases.retrieve({ database_id });
const options = response.properties["My Select Property"].select; // Won't compile

Expected behavior
I would expect type safety when inspecting the properties in my database.

@aDogCalledSpot
Copy link
Author

Same deal with UpdateDatabaseBodyParameters

@LoganTann
Copy link

Yep, it's very painful to work with these types unavailable, especially when using Typescript.

The same stands for DatabaseObjectResponse

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

No branches or pull requests

2 participants