notion-sdk-js
notion-sdk-js copied to clipboard
Type mismatch for relations. SDK types do not expect to see "has_more"
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, },
Are you using the method retrieve?
Page properties has_more is present in the document and the actual response returned
https://github.com/makenotion/notion-sdk-js/blob/7950edc034d3007b0612b80d3f424baef89746d9/src/api-endpoints.ts#L4588
https://developers.notion.com/reference/page-property-values#relation