notion-sdk-js
notion-sdk-js copied to clipboard
DatabasePropertyConfigResponse is a local type
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
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.
Same deal with UpdateDatabaseBodyParameters
Yep, it's very painful to work with these types unavailable, especially when using Typescript.
The same stands for DatabaseObjectResponse