Skip to content

Update dependency @notionhq/client to v5 - #422

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/notionhq-client-5.x
Open

Update dependency @notionhq/client to v5#422
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/notionhq-client-5.x

Conversation

@renovate

@renovate renovate Bot commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@notionhq/client (source) ^2.2.3^5.0.0 age confidence

Release Notes

makenotion/notion-sdk-js (@​notionhq/client)

v5.23.3

Compare Source

What's Changed

Reliability
  • Edge-proxy blocks are now a diagnosable error (#​751)

    • When a request is rejected at the network edge (for example by a network security rule), the response is often HTML rather than a Notion error body. The SDK already fell back to UnknownHTTPResponseError, but the generic message and raw HTML made these failures hard to diagnose. The HTTP error types now carry response diagnostics: ray_id is populated from the cf-ray response header whenever present, and request_id falls back to the x-notion-request-id header when the body doesn't provide one. An unrecognized response with a Ray ID but no Notion request ID is identified as edge-generated, and 403s note that a network security rule may be responsible.
    • Well-formed Notion API errors still take precedence, and no new error class is introduced — the NotionClientError union is unchanged.
    • Also fixes retry-after header lookup to be case-insensitive for plain-object headers and to handle array-valued headers.
    • If you hit opaque UnknownHTTPResponseErrors with HTML bodies: upgrade, then include the error's ray_id and request_id when reporting the issue — no code changes needed.
  • Bump version to v5.23.3 (#​752)

Links

v5.23.2

Compare Source

What's Changed

New capabilities
  • filter.in_trash on search (#​748)

    • client.search() can now search trashed content. By default search only returns live content — trashed pages and data sources are excluded, same as before. Passing in_trash: true switches the search to return only trashed results (it does not mix trashed results into a normal search).
    • The filter accepts two shapes: the existing object filter extended with an optional in_trash boolean ({ property: "object", value: "page", in_trash: true }), or a standalone trash filter ({ in_trash: true }) that doesn't constrain the object type.
    • If you need to find trashed pages or data sources: pass filter: { in_trash: true }. Existing searches are unaffected — trash was and remains excluded by default.
  • Bump version to v5.23.2 (#​749)

Links

v5.23.1

Compare Source

What's Changed

Type & bug fixes
  • Rich text annotation types are now exported (#​740)

    • Adds ApiColor, RichTextItemResponseCommon, and a new AnnotationResponse alias (the type of RichTextItemResponse.annotations) to the package entrypoint. Fixes #​689; thanks @​KingJing1.
    • If you validate or construct rich text annotations: import these types directly instead of deriving them from RichTextItemResponse with indexed-access types.
  • Pagination helpers accept endpoint methods again under strictNullChecks (#​744)

    • v5.23.0 widened endpoint params to start_cursor?: string | null, but the PaginatedArgs constraint used by iteratePaginatedAPI / collectPaginatedAPI still only allowed string — so passing methods like client.dataSources.query to the helpers stopped compiling, with a misleading "property missing in type PaginatedArgs" error. Types-only fix (the runtime already handled null cursors), plus a regression test that compiles a real endpoint method against the helpers so this can't silently regress again. Fixes #​743; thanks @​nakanoasaservice.
    • If the pagination helpers broke for you on v5.23.0, this is the fix — no code changes needed on your side.
  • Doc-comment fix: updateDataSource icon / in_trash descriptions now reference data sources (#​745)

    • Generated documentation strings only; no type or runtime changes.
  • Bump version to v5.23.1 (#​746)

New Contributors

Links

v5.23.0

Compare Source

What's Changed

New capabilities
  • Webhook signature verification helpers (#​722)

    • Adds verifyWebhookSignature() (and signWebhookPayload() for tests) so you can confirm a webhook actually came from Notion instead of hand-rolling HMAC-SHA256.
    • If you receive Notion webhooks: switch to this helper. Pass the raw request body (not re-serialized JSON) plus the X-Notion-Signature header. Works out of the box in Node 18+, Bun, Deno, Cloudflare Workers, Vercel Edge, and browsers.
  • iterateAllDataSourceRows / collectAllDataSourceRows helpers (#​730, #​731)

    • A single dataSources.query caps out at ~10,000 rows and then silently stops — plain pagination misses the rest of a large data source. These helpers page past that cap by partitioning on created_time, de-duping rows automatically.
    • If you query large data sources: use these instead of manual pagination to guarantee you see every row. (#​731 also fixes window advancement for wiki data sources that return child data-source rows, not just pages.)
  • client.asyncTasks.retrieve (#​736)

    • Adds support for the newly documented async task endpoint, so you can poll long-running operations to completion.
  • allow_async on createPage and update-page-markdown (#​728, #​729)

    • Lets these endpoints return an async task for large/slow writes instead of blocking the request.
    • If you create pages or update markdown at scale: opt in with allow_async, then poll the returned task via client.asyncTasks.retrieve (#​736).
Reliability
  • Retry on service_overload (HTTP 529) (#​727)
    • The client now automatically retries 529s (respecting retry-after) alongside existing 429/500/503 handling — fewer transient failures surface to your code. No action needed; thanks @​RyanBillard.
Type & bug fixes
  • relevance search sort now uses the property discriminator (#​724)

    • Fixes the type for the relevance sort variant in search parameters. If you sort search results by relevance and hit a type error, this is the fix — align your call with the corrected shape.
  • Allow null for start_cursor in pagination types (#​723)

    • Pagination params now accept null (not just string/undefined), so you can pass a next_cursor straight through without a null-check dance.
  • Bump version to v5.23.0 (#​741)

New Contributors

Links

v5.22.0

Compare Source

What's Changed

  • Add position field to insert_content params for update page markdown endpoint in #​720
  • Bump version to v5.22.0 in #​721

Links

v5.21.0

Compare Source

What's Changed

  • chore: sync generated api endpoints modules by @​haustle in #​714
  • feat: add meeting notes query support with attendees property typing by @​haustle in #​680
  • Add agent_id parent type for workflow-parented pages and blocks in #​715
  • Bump version to v5.21.0 in #​718

Links

v5.20.0

Compare Source

What's Changed

Links

v5.19.0

Compare Source

What's Changed

  • Add update method to comments namespace for UpdateComment endpoint in #​705
  • Update markdown field descriptions in comments endpoints to match updated API spec in #​709
  • Add delete method to client.comments for Delete Comment endpoint in #​706
  • Bump version to v5.19.0 in #​710

Links

v5.18.0

Compare Source

What's Changed

  • Support multi-value filters for select, status, and multi_select property filters in #​707
  • Bump version to v5.18.0 in #​708

Links

v5.17.0

Compare Source

What's Changed

  • Add markdown parameter to Create Comment endpoint in #​703
  • Bump version to v5.17.0 in #​704

Links

v5.16.0

Compare Source

What's Changed

Links

v5.15.0

Compare Source

What's Changed

Links

v5.14.0

Compare Source

What's Changed

Links

v5.13.0

Compare Source

What's Changed

New Contributors

Links

v5.12.0

Compare Source

What's Changed

New Contributors

Links

v5.11.1

Compare Source

What's Changed

  • Sync api-endpoints: unsupported block type, update page docstring tweak by @​ksinder in #​672
    • New string field unsupported[block_type] in UnsupportedBlockObjectResponse to provide a hint on what an underlying unsupported block type is
    • Minor TSDoc change for updatePage endpoint: remove "properties" suffix from API name; just "Update page" now.
      • This reflects the fact that the endpoint does more than just updating properties/schema

Links

v5.11.0

Compare Source

What's Changed

New Contributors

Links

v5.10.0

Compare Source

What's Changed

New Contributors

Links

v5.9.0

Compare Source

What's Changed

  • Fix: Prevent path traversal in Client.request() #​661
    • Note when upgrading: This means that callers can no longer use ../ to switch the meaning of a request that accepts an ID path parameter to navigate to a different Notion API endpoint. Please use Client.request() with a properly formatted, absolute API path instead.

Links

v5.8.0

Compare Source

What's Changed

  • Sync api-endpoints: add position to AppendBlockChildrenParameters by @​ksinder in #​658
    • Specifically, this change is a backwards-compatible improvement to support a more expressive position parameter in the PATCH /v1/blocks/:block_id/children body to append at a specific position in the parent's children array.
      • The parameter cannot be used with the older after parameter, which will be officially removed in the next public API version.
  • Sync api-endpoints: add list_start_index and list_format by @​vshen-notion in #​659
    • For numbered_list_item, support distinguishing where list numbering starts and what type of list (number, letter, roman numeral), by exposing list_start_index and list_format

New Contributors

Full Changelog: makenotion/notion-sdk-js@v5.7.0...v5.8.0

v5.7.0

Compare Source

What's Changed

  • Add 'Contributing' section to README. by @​toolness in #​655
  • Sync api-endpoints: add position to CreatePageBodyParameters by @​ksinder in #​656
    • Backwards-compatible improvement: support the new, optional position parameter in the POST /v1/pages body, which attaches the newly created page at a specific location in a parent page.
    • The parameter cannot be used if the parent is not a regular page.

Links

v5.6.0

Compare Source

What's Changed

Links

v5.5.0

Compare Source

v5.4.0

Compare Source

What's Changed

Links

v5.3.0

Compare Source

What's Changed

Links

v5.2.1

Compare Source

What's Changed

Links

v5.2.0

Compare Source

What's Changed

  • API schema sync: small consolidation refactors and fixes by @​ksinder in #​622
  • API schema sync: remove data_source_id type from DataSource.database_parent by @​ksinder in #​626
  • Sync API schema: CreatePage + templates; workspace_id field; query wiki filters by @​ksinder in #​628
    • Including workspace_id in bot responses alongside workspace_name
    • Introducing a new API endpoint notion.dataSources.listTemplates with one path parameter, data_source_id, for listing the available page templates under a data source
    • Adding a new optional parameter template to CreatePageBodyParameters with polymorphic type options of none (don't apply any template; existing behavior), default (apply data source's default template), and template_id (apply a custom template ID)
    • Adding a new optional parameter result_type to QueryDataSourceBodyParameters to allow for only surfacing "page" or "data_source" result types in the case of wikis (where databases can be nested)

Links

v5.1.0

Compare Source

What's Changed

Links

v5.0.0

Compare Source

What's Changed

Major changes and highlights from v4.0.2 to v5.0.0.

⚡️ Major API and SDK updates
  • Added support for multiple data sources
  • Removed support for `notion.databases.list
    • The list databases method has been removed, since this endpoint has been deprecated & unsupported since 2022-02-22, and v5 of the SDK is tailored toward 2025-09-03 #​600
  • Added support for verification filters for data sources
    • Added verification filter property to queryDataSources API shape #​604
📝 API shape and type improvements
  • Richer API error details
    • SDK now surfaces the optional additional_data field in API error responses for better diagnostics. #​603
  • API schema syncs
    • DataSourceObjectResponse["parent"] now supports the data_source_id variant.
    • Search filter enum updated from page | database to page | data_source.
    • Typechecking added for all examples/ projects in CI. #​602
🧩 Examples and internal maintenance
  • Examples directory
    • Migrated all examples/ to TypeScript and committed missing build files. #​603 #​600
  • CI improvements
    • All examples are now typechecked as part of continuous integration. #​602
  • Other
    • Added Copilot instructions file for repo #​610
🛠 Miscellaneous fixes
  • Documentation
    • Updated the minimum recommended TypeScript version in the README after a dependency upgrade. #​598
  • Patch releases
    • Version bumps and lockfile updates to keep publish and infra consistent. #​596 #​597

[!NOTE]
v5.0.0 and 2025-09-03 bring fairly major changes to the SDK and to the API schema!

You can help us by tracking any friction as you upgrade, as well as any issues or improvement opportunities with the JavaScript → TypeScript changes in the examples/ projects, and filing an issue or opening a pull request for each.

New Contributors

Links

v4.0.2

Compare Source

What's Changed

  • Update Notion JS SDK with GetComment endpoint by @​julyou in #​595
    • Introduces notion.comments.retrieve({...}) endpoint to fetch a comment by its ID; this was previously a hidden and un-documented endpoint
    • Introduces API shape to manually refresh an API token by passing grant_type: "refresh_token" with a refresh_token to notion.oauth.token(...)
    • Minor refactors and additional type exports
  • Bump TypeScript dependency to 5.9 by @​ksinder in #​597
    • WARNING: This might be effectively a breaking change in some cases since part of the SDK contract is exporting types for Notion's public API endpoints. Before upgrading, confirm your TypeScript version is sufficiently new or that the types are compatible with your system.

Full Changelog: makenotion/notion-sdk-js@f849574...v4.0.2

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/4.0.2

v4.0.1

Compare Source

What's Changed

  • Support additional headers passed to notion.request()

Full Changelog: makenotion/notion-sdk-js@f7bfcfd...v4.0.1

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/4.0.1

v4.0.0

Compare Source

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 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.
      {
        // ...
        "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
  • 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
  • Sync API endpoints: add display_name to Comment, 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 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 #​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: makenotion/notion-sdk-js@df95f35...v4.0.0

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/4.0.0

v3.1.3

Compare Source

What's Changed

Full Changelog: makenotion/notion-sdk-js@0e38438...v3.1.3

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.1.3

v3.1.2

Compare Source

What's Changed

Full Changelog: makenotion/notion-sdk-js@194f06d...v3.1.2

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.1.2

v3.1.1

Compare Source

What's Changed

New Contributors

Full Changelog: makenotion/notion-sdk-js@f8bb1d0...v3.1.1

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.1.1

v3.1.0

Compare Source

What's Changed

  • Add support for File Upload API endpoints by @​ksinder in #​565
    • Sync the latest OpenAPI schema for Notion's Public API to src/api-endpoints.ts
    • Introduce the /v1/file_uploads family of API endpoints (File Upload Create, Get, List, Send, Complete)
      • notion.fileUploads.send builds a FormData object to send fields via multipart/form-data
    • Add several refactors to extract common reused schema components, which drastically reduces the size of the file
  • Add file upload API example and fix Blob send logic by @​ksinder in #​566
    • Fix the FormData parameter passing logic in src/Client.ts for the Send File Upload API
    • Add examples/intro-to-notion-api/intermediate/5-upload-file.js example of using the File Upload API to upload and attach a file

Full Changelog: makenotion/notion-sdk-js@f2e1665...v3.1.0

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.1.0

v3.0.1

Compare Source

What's Changed

Full Changelog: makenotion/notion-sdk-js@8b867fd...v3.0.1

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.0.1

v3.0.0

Compare Source

What's Changed

This update, v2.3.0 → v3.0.0, is marked as a major version upgrade due to the Node minimum version increase to 18, as part of the change to use built-in fetch as the default in the Client constructor instead of node-fetch.

  • Sync OpenAPI schema as of 2025-04-08 to src/api-endpoints.ts by @​ksinder in #​558
    • Refactor common parameter shapes into new types: InternalFileRequest, ExternalFileRequest, and InternalOrExternalFileWithNameRequest
    • Support commenting on a non-page block in the Create Comment API by accepting a parent type of block_id
  • Use isomorphic fetch by @​sv2dev in #​506
  • Small typo fixes in docs and example files

Full Changelog: makenotion/notion-sdk-js@650d23b...v3.0.0

View this version on NPM: https://www.npmjs.com/package/@​notionhq/client/v/3.0.0

New Contributors


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 31f979f to f5bdcec Compare December 3, 2025 18:47
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from 7b42790 to 38d0b76 Compare December 16, 2025 05:55
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 38d0b76 to 4b619dc Compare January 15, 2026 02:45
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from de61199 to 5d23c1d Compare January 29, 2026 21:43
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 5d23c1d to 70e81a5 Compare February 12, 2026 14:13
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 3 times, most recently from 6ff39cc to 54f7b61 Compare March 3, 2026 00:36
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from a3079de to 706ea02 Compare March 14, 2026 20:06
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from 5679159 to 4b8fd3f Compare March 25, 2026 16:59
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 4b8fd3f to be5d42a Compare March 30, 2026 22:29
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from be5d42a to 34fab28 Compare April 7, 2026 18:16
@renovate renovate Bot changed the title fix(deps): update dependency @notionhq/client to v5 Update dependency @notionhq/client to v5 Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from f07f6c9 to 2d21b96 Compare April 17, 2026 18:59
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 2d21b96 to c0e496c Compare April 21, 2026 00:41
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from c0e496c to 907503d Compare May 11, 2026 20:49
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 907503d to a258560 Compare May 19, 2026 19:25
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 2 times, most recently from 816cacb to 257e4bd Compare June 8, 2026 04:56
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch 3 times, most recently from 5c616cc to 5ba996a Compare July 15, 2026 19:04
@renovate
renovate Bot force-pushed the renovate/notionhq-client-5.x branch from 5ba996a to d2f6706 Compare July 29, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants