Download Latest Version v4.0.1 source code.tar.gz (338.2 kB)
Email in envelope

Get an email when there's a new version of Notion SDK for JavaScript

Home / v4.0.0
Name Modified Size InfoDownloads / 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 from CreatePageBodyParameters and UpdatePageBodyParameters in src/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 ambiguous Record<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 to Comment, 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 the CommentObjectResponse, and some fixes from previous PRs around parenthesizing a & (b | c) in allOfoneOf 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 to LanguageRequest.

New Contributors

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

Source: README.md, updated 2025-07-01