Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-07-01 | 3.4 kB | |
v4.0.0 source code.tar.gz | 2025-07-01 | 337.8 kB | |
v4.0.0 source code.zip | 2025-07-01 | 364.9 kB | |
Totals: 3 Items | 706.2 kB | 0 |
What's Changed
- Remove no-op duplicates from union types across all endpoints by @ksinder in https://github.com/makenotion/notion-sdk-js/pull/579
- Remove legacy (<=2021) v1 API shape for page properties by @ksinder in https://github.com/makenotion/notion-sdk-js/pull/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.ts { // ... "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:ts { // ... "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
- chore: add JSDoc comments to API types by @julyou in https://github.com/makenotion/notion-sdk-js/pull/585
- Add support for attachments in Comment API by @julyou in https://github.com/makenotion/notion-sdk-js/pull/586
- CreatePage: support workspace-level private pages (+ misc param type refactors) by @ksinder in https://github.com/makenotion/notion-sdk-js/pull/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
- Sync API endpoints: add
display_name
toComment
, more extraction refactors and docstrings by @ksinder in https://github.com/makenotion/notion-sdk-js/pull/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 https://github.com/makenotion/notion-sdk-js/pull/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
- @julyou made their first contribution in https://github.com/makenotion/notion-sdk-js/pull/585
Full Changelog: https://github.com/makenotion/notion-sdk-js/compare/df95f350ce31c198b74e4d19dcfb02405004ec4f...v4.0.0
View this version on NPM: https://www.npmjs.com/package/@notionhq/client/v/4.0.0