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

Add missing default_background variant to color in RichText's Annotation object #536

Open
46ki75 opened this issue Dec 14, 2024 · 0 comments · May be fixed by #537
Open

Add missing default_background variant to color in RichText's Annotation object #536

46ki75 opened this issue Dec 14, 2024 · 0 comments · May be fixed by #537

Comments

@46ki75
Copy link

46ki75 commented Dec 14, 2024

Describe the bug
While using the Notion API, I observed that the color property in RichText's Annotation sometimes returns "default_background". This appears to be a new variant that is not currently included in the TypeScript type definitions provided by the library.

This issue only affects TypeScript type checking and does not impact JavaScript runtime behavior. However, adding the missing variant is important to ensure type-safe operations in TypeScript. Additionally, when using the documentation or this library as a reference to build API clients in other languages, deserialization errors can occur due to the missing variant.

To Reproduce
Node version: v22.11.0
Notion JS library version: 2.2.15

Steps to reproduce the behavior:

  1. Set the color of a RichText annotation to Default background in Notion.
  2. Make a request to retrieve RichText content with annotations.
  3. Check the color property of the annotation object in the response.
  4. Observe the color property returning "default_background".

Expected behavior
The color property in RichText's Annotation object should include the "default_background" variant in its TypeScript type definitions to reflect the actual API behavior.

Screenshots
image
image

Additional context
I will create a pull request to add this missing variant to the TypeScript type definitions.

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 a pull request may close this issue.

1 participant