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

Type mismatch for relations. SDK types do not expect to see "has_more" #443

Open
Matlor opened this issue Aug 16, 2023 · 2 comments
Open

Comments

@Matlor
Copy link

Matlor commented Aug 16, 2023

I fetch data from the notion api. I want to work with that data and have used the types "PageObjectResponse" and "PartialPageObjectResponse" from the sdk to define the responses I can get. For all the properties that are relations I get a type error:

'has_more' does not exist in type '{ type: "relation"; relation: { id: string; }[]; id: string; }'

The data looks like this:

Parent: { id: "%60J%3D~", type: "relation", relation: [{ id: "a8b666cc-4c8c-4e10-b612-2eb1f968b1a4" }], has_more: false, },

@devjiwonchoi
Copy link

Are you using the method retrieve?

@narumincho
Copy link

Page properties has_more is present in the document and the actual response returned

| { type: "relation"; relation: Array<{ id: string }>; id: string }

https://developers.notion.com/reference/page-property-values#relation

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

3 participants