Skip to content

Adds fields.upsert method#8

Merged
john-doherty merged 3 commits intomasterfrom
upsert-fields
Apr 29, 2026
Merged

Adds fields.upsert method#8
john-doherty merged 3 commits intomasterfrom
upsert-fields

Conversation

@john-doherty
Copy link
Copy Markdown
Contributor

This PR adds fields.upsert method to match the REST API PR, which allows fields to be added/updated in bulk.

@john-doherty john-doherty self-assigned this Apr 27, 2026
@john-doherty john-doherty requested a review from Copilot April 27, 2026 20:48
@notion-workspace
Copy link
Copy Markdown

Improve REST API fields

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a fields.upsert method to the Node SDK to mirror the REST API bulk add/update behavior.

Changes:

  • Add client.fields.upsert(sheetId, fields) implemented as PUT /sheets/{sheetId}/fields.
  • Extend unit and e2e tests to cover the new upsert behavior and parameter validation.
  • Update TypeScript definitions and README documentation to include fields.upsert.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/interface-spec.js Updates interface method-count assertion for the new fields.upsert.
tests/fields-spec.js Adds unit tests for fields.upsert request shape and parameter validation errors.
tests/e2e/03-fields-e2e-spec.js Adds an e2e test to upsert fields and verify they appear in fields.list, then cleans up.
index.js Implements fields.upsert in the SDK fields namespace.
index.d.ts Exposes fields.upsert in the public TypeScript API.
README.md Documents fields.upsert usage and admin permission note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.js
Comment thread index.js Outdated
john-doherty and others added 2 commits April 29, 2026 16:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@john-doherty john-doherty merged commit 3518e89 into master Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants