What's Changed
- Remove no-op duplicates from union types across all endpoints by @ksinder in #579
- Remove legacy (<=2021) v1 API shape for page properties by @ksinder in #580
- Removes support for the legacy (pre-Q3-2021) shape for page
properties
parameters fromCreatePageBodyParameters
andUpdatePageBodyParameters
insrc/api-endpoints.ts
. - This collapses the union type of {old properties shape, new properties shape} down to the new shape only.
- In the old shape,
properties
was a fairly ambiguousRecord<string, ...>
mapping each property key to the property value (a union type across all possible property types' values) e.g.{ // ... "numberId": 24, }
- In the new shape (the only one we want to support going forward), the value must be wrapped in an object that uses the polymorphic
type
pattern with the actual value defined in a sub-object to disambiguate:{ // ... "numberId": { "type": "number", "number": 24 } }
- This matches up with our responses in the API read path so most, if not all, integrations are likely already using syntax compatible with the new shape
- Removes support for the legacy (pre-Q3-2021) shape for page
- chore: add JSDoc comments to API types by @julyou in #585
- Add support for attachments in Comment API by @julyou in #586
- CreatePage: support workspace-level private pages (+ misc param type refactors) by @ksinder in #587
- No-op refactors/cleanups: extracting some components into separate type aliases, e.g.
AnnotationRequest
- Support the new mode in
POST /v1/pages
(CreatePage
) API where:parent
can be omitted, or passed as{"workspace": true}
, to create top-level private pages at the workspace level (for public integrations only)properties
is also optional. For standalone pages, this results in title defaulting to an empty string
- No-op refactors/cleanups: extracting some components into separate type aliases, e.g.
- Sync API endpoints: add
display_name
toComment
, more extraction refactors and docstrings by @ksinder in #588- This includes miscellaneous extraction refactors for named subsets of parameters and other cleanups like new parameter docstrings.
- The only functional change is adding the new
display_name
object to theCommentObjectResponse
, and some fixes from previous PRs around parenthesizinga & (b | c)
inallOf
→oneOf
OpenAPI types to get the correct result rather than defaulting to the incorrect interpretation(a & b) | c
.
- Sync latest API endpoints schema as of 2025-06-30 by @ksinder in #590
- Most of these are no-op re-ordering of type definitions.
- Some added and edited comments/docstrings.
- The only semantic change is adding support for the
abc
music language toLanguageRequest
.
New Contributors
Full Changelog: df95f35...v4.0.0
View this version on NPM: https://www.npmjs.com/package/@notionhq/client/v/4.0.0