Skip to content

Type notetaker_settings on Notetaker, calendar and event requests and responses - #789

Open
agtang96 wants to merge 14 commits into
mainfrom
feat/notetaker-settings-types
Open

agtang96 wants to merge 14 commits into
mainfrom
feat/notetaker-settings-types

Conversation

@agtang96

@agtang96 agtang96 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Notetaker API accepts notetaker_settings (with recording_type, transcription, summary, action_items and more) and config_id, and the API docs mark the top-level name and meeting_settings as deprecated. The SDK types only have the legacy fields. So with the latest release (8.5.0):

nylas.notetakers.create({
  identifier: grantId,
  requestBody: {
    meetingLink: 'https://meet.google.com/abc-defg-hij',
    notetakerSettings: { name: 'Nylas Notetaker', recordingType: 'audio', transcription: true, summary: true, actionItems: true },
  },
});
// error TS2353: Object literal may only specify known properties, and 'notetakerSettings' does not exist in type 'CreateNotetakerRequest'.

At runtime this already works, because the SDK snake_cases unknown keys. But TypeScript users cannot request summaries or action items in either shape without a cast. NotetakerMeetingSettings also lacks summary and actionItems.

Changes

  • NotetakerConfigSettings (the API's notetaker_settings) and its nested types: NotetakerRecordingType, NotetakerTranscriptionSettings, NotetakerCustomInstructionsSettings, NotetakerMessages / NotetakerOnJoinMessage / NotetakerOnParticipantJoinMessage, NotetakerVideoOutput. Named NotetakerConfigSettings because NotetakerSettings is already exported from events.ts for the event notetaker field.
  • CreateNotetakerRequest: add notetakerSettings and configId. UpdateNotetakerRequest: add notetakerSettings. Mark name and meetingSettings @deprecated on both.
  • Notetaker: add notetakerSettings (typed as NotetakerConfigSettingsResponse, whose videoOutput is the stored image metadata). Make name and meetingSettings optional, since the API omits them for Notetakers that use Notetaker settings.
  • CalendarNotetaker: add notetakerSettings, configId, autocreate and deduplicationPolicy, mark name/meetingSettings @deprecated (as the calendar spec does), and allow nested AND groups in rules.eventSelection. Event NotetakerSettings: add notetakerSettings and deduplicationPolicy. Both use NotetakerSyncSettings (NotetakerConfigSettings without videoOutput, which calendar and event sync reject). autocreate is typed true, because the service rejects false.
  • Fix: rules.eventSelection was typed with 'ownEvents' and 'participantOnly'. Case conversion only renames keys, so the SDK sent those values unchanged, and go-kit's CalendarRules.Validate rejects them (invalid event_selection value). The type now uses own_events and participant_only.
  • NotetakerMeetingSettings: add the optional legacy fields the API accepts: transcriptionSettings, summary, summarySettings, actionItems, actionItemsSettings, leaveAfterSilenceSeconds, messages.
  • Examples and CHANGELOG updated. Planned version moves from 8.5.1 to 9.0.0 (package.json, package-lock.json, src/version.ts, CHANGELOG).

Field set comes from the public spec (notetaker_settings.yaml, notetakers.yaml, meeting_settings*.yaml). Fields the API has but the public spec does not (realtime, debug, dedup settings) are left out. Request videoOutput is NotetakerVideoOutputUpload: mediaType + data together, or {} to disable. Response videoOutput is NotetakerVideoOutput (media type, size, preview URL), so fetched settings cannot be passed back with read-only fields. Multipart file_key is left out because Notetaker create/update send JSON.

Decisions for reviewers

  1. Notetaker.name and Notetaker.meetingSettings are now optional. This can break builds. The API returns notetaker_settings instead of name/meeting_settings for every Notetaker whose configuration is API version 2 (response.go in the notetaker service). That covers creates with notetakerSettings or configId, and also creates with neither field that inherit a Notetaker configuration, such as a workspace or application configuration. So code with no new fields can already get undefined from notetaker.name today. Under strict, notetaker.name.toUpperCase() now fails to compile (TS18048) instead of throwing at runtime. The fix for callers is notetaker.notetakerSettings?.name ?? notetaker.name. A narrower return type on create alone would not help, because list and find return both kinds.
  2. Planned as a major, 9.0.0. Three type changes can break builds: the optional Notetaker fields, eventSelection items that can now be nested arrays, and the separate calendar and event response types. All three are labelled breaking in the CHANGELOG. The changes correct types that never matched the API, and nothing changes at runtime. The project follows Semantic Versioning, and its last breaking change also shipped as a major (8.0.0, dropping Node 16). Projects pinned to ^8 need to upgrade on purpose to get the eventSelection fix.
  3. Calendar and event responses have their own types (CalendarNotetakerResponse, EventNotetakerResponse). A fetched notetaker object holds resolved settings, including values inherited from workspace and application configurations, and can carry stored image metadata or an active/inactive deduplication policy, which the API rejects on writes. The policy is the calendar's or event's own value (resolver.go), so inherit doesn't say whether deduplication is active. Calendar create and update responses return the settings that were sent (api-v3 syncNotebook), so configId and autocreate stay optional on CalendarNotetakerResponse. So copying a fetched object into an update no longer compiles; callers build the request from the fields they want, which the tests show. This matches the request/response split this PR already uses for Notetaker. A rules-only update still resets the calendar's settings to legacy defaults (post_calendar.go), and the JSDoc says so.
  4. Mutually exclusive fields are documented, not enforced by the types. configId, notetakerSettings and the legacy name/meetingSettings cannot be combined (the API returns 400). Expressing that as a union would turn CreateNotetakerRequest and UpdateNotetakerRequest from interfaces into union types, which breaks callers that extends them or build the object incrementally.
  5. No NYL ticket exists for this, so the title has no key.

Verification

  • npm run lint, npm run lint:prettier:check, npm test (571 passed), npm run build, npm run test:package all pass.
  • New tests check: create with a full notetakerSettings and configId, update with notetakerSettings, the exact snake_case wire format (send_after_ms, debounce_ms, use_speaker_names_as_keywords, leave_detection_delay_seconds, recording_type), transcriptionSettings: null surviving case conversion, a snake_case response camelCasing into Notetaker.notetakerSettings, and @ts-expect-error checks that a video output upload needs mediaType with data and rejects stored-image fields. tests/types/package.{cts,mts} now compile the TS2353 repro under Node16, NodeNext and Bundler.
  • The bodies these types produce (full notetaker_settings, transcription_settings: null, full legacy meeting_settings, and the update body) pass the Notetaker API's own request validation in the notetaker service.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

🤖 Generated with Claude Code

The Notetaker API takes notetaker_settings (recording_type, transcription,
summary, action_items and more) and config_id, and deprecates the top-level
name and meeting_settings fields. The SDK types only had the legacy fields,
so TypeScript rejected the documented request shape (TS2353) and callers
could not request summaries or action items without a cast.

- Add NotetakerConfigSettings and its nested types, plus notetakerSettings
  and configId on create, notetakerSettings on update and on Notetaker.
- Add the missing optional legacy meeting settings fields.
- Mark the request name/meetingSettings fields deprecated.
- Make Notetaker.name and Notetaker.meetingSettings optional: the API omits
  them for Notetakers created with notetakerSettings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.69%. Comparing base (02d0fc3) to head (49e4924).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #789   +/-   ##
=======================================
  Coverage   98.69%   98.69%           
=======================================
  Files          43       43           
  Lines        1076     1076           
  Branches      103      103           
=======================================
  Hits         1062     1062           
  Misses         12       12           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Restore Notetaker.name and Notetaker.meetingSettings as required so the
  change ships without breaking existing callers; document that the API
  omits them for Notetakers created with notetakerSettings.
- Type video output uploads (mediaType + data, or {} to disable) apart
  from the stored image metadata returned in responses, so fetched
  settings cannot be passed back with read-only fields.
- Fix the changelog: configId is on create only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Mark size, previewUrl and previewUrlExpiresAt as never on video output
  uploads so spreading fetched metadata into an upload fails to compile.
- Document that on update, transcriptionSettings null restores inherited
  settings and {} clears them.
- Note that configId also excludes the deprecated name and meetingSettings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API returns notetakerSettings instead of name and meetingSettings for
any Notetaker that uses Notetaker settings, including creates with configId
and bare creates under a grant or application configuration. Also show how
to drop videoOutput before sending fetched settings back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The API omits name and meeting_settings for every Notetaker that uses
Notetaker settings: creates with notetakerSettings or configId, and bare
creates under a grant or application configuration. Typing them as always
present let code like notetaker.name.toUpperCase() compile and then throw.

Strict callers that read these fields now need a check or a fallback. The
planned release moves from 8.5.1 to 8.6.0 for the new types, deprecations
and this type change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lection values

Calendar and event Notetaker settings take notetaker_settings, and calendars
also take config_id, autocreate, deduplication_policy and nested AND groups in
rules.event_selection. The SDK typed only the legacy fields, so these failed
to compile.

The SDK typed eventSelection values as ownEvents and participantOnly. Case
conversion only renames keys, so those were sent unchanged and the API
rejected them. Type the values the API accepts.

Also apply round-3 review fixes: describe inherited configurations correctly,
drop the settings round-trip recipe, document that PATCH replaces composite
settings whole, and give the CHANGELOG fallback a string default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@agtang96 agtang96 changed the title Type notetaker_settings on Notetaker requests and responses Type notetaker_settings on Notetaker, calendar and event requests and responses Nov 24, 2026
…tetaker types

Calendar and event sync reject video_output, so their notetakerSettings use
NotetakerSyncSettings, which omits it. autocreate must be true and cannot be
combined with rules, so type it as true and fix the test that combined them.
Add the documented event-level deduplicationPolicy opt-out, note that nested
eventSelection groups need a criterion and that a rules-only calendar update
resets settings to legacy defaults, and flag the eventSelection item change
as breaking in the CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NotetakerSyncSettings now marks videoOutput as never, so a reused
NotetakerConfigSettings object with an image no longer assigns to calendar or
event sync settings. Document that calendar updates reset an omitted
deduplicationPolicy to inherit, and that update payloads should be built from
the fields being set rather than a fetched notetaker object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fetched calendar or event notetaker object can carry stored image metadata
or a resolved active/inactive deduplication policy, which the API rejects on
writes. With one shared type, copying a fetched object into an update
compiled and then failed with a 400. Calendar.notetaker and Event.notetaker
now use CalendarNotetakerResponse and EventNotetakerResponse, so that copy
fails to compile and callers build the request from the fields they set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fields

- Say calendar and event response notetakerSettings and deduplicationPolicy
  include inherited values.
- Drop configId and autocreate from CalendarNotetakerResponse; the API never
  returns them.
- Tell callers to read notetakerSettings when present and fall back to name
  and meetingSettings.
- Build the calendar update test from explicit fields instead of a fetched
  response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olicy as the object's own

- Calendar create and update responses return the settings that were sent, so
  configId and autocreate can appear there.
- The deduplication policy in responses is the calendar's or event's own value,
  not the merged one; "inherit" means a parent configuration decides.
- Restore CHANGELOG formatting outside the Unreleased section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll transcriptionSettings

- deduplicationPolicy in responses is the policy of the configuration the
  calendar or event uses: its own for inline settings, the referenced
  configuration's for configId or autocreate.
- transcriptionSettings: null restores inherited settings only in
  notetakers.update(); calendar and event sync treat it as {}.
- Event responses: read notetakerSettings when present, fall back to name and
  meetingSettings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agtang96 and others added 2 commits November 24, 2026 12:34
The Unreleased section has three breaking TypeScript changes, and the
project follows Semantic Versioning, so this is a major release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
sdk-reference — 49e4924d Deployed Nov 24, 2026 by agtang96 via docs #829
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