You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates the Node.js SDK to version 26.2.0, migrating the HTTP transport from node-fetch-native-with-agent to undici, adding 'accept': 'application/json' headers across all services, and introducing new API surface for OAuth2 device flow (Device Authorization Grant), email canonical/classification fields, and membership privacy userAccessedAt.
Transport migration: undici replaces node-fetch-native-with-agent; the self-signed TLS agent is now lazily instantiated as a per-client undici.Agent and destroyed when setSelfSigned(false) is called.
OAuth2 device flow: updateOAuth2Server gains authorizationDetailsTypes, verificationUrl, userCodeLength, userCodeFormat, and deviceCodeDuration; however, authorizationDetailsTypes is inserted mid-sequence in the deprecated positional overload, silently shifting accessTokenDuration and later parameters for any caller still using the old positional form.
Model additions: new optional email fields (emailCanonical, emailIsFree, emailIsDisposable, emailIsCorporate, emailIsCanonical) on User; userAccessedAt on Membership; device-flow fields on the project model.
Confidence Score: 3/5
Safe to merge for net-new callers; existing users of the deprecated positional overload of updateOAuth2Server who pass accessTokenDuration or later arguments will silently send wrong values.
The positional overload of updateOAuth2Server now has authorizationDetailsTypes inserted between scopes and accessTokenDuration. Any JavaScript caller who was passing token-duration values positionally will have those values bound to the wrong parameters with no error — the wrong payload is sent to the server silently. All 26 remaining service files are routine header additions and new endpoint additions that look correct.
src/services/project.ts — the deprecated positional overload parameter order change; src/client.ts — agent teardown timing during concurrent uploads.
Important Files Changed
Filename
Overview
src/client.ts
Migrates HTTP transport from node-fetch-native-with-agent to undici; the selfSignedAgent is now lazily created and stored per-client instance, with a potential issue when destroying an agent while requests are in flight.
src/services/project.ts
Adds OAuth2 device flow parameters and membership privacy userAccessedAt field; inserts authorizationDetailsTypes mid-sequence in the deprecated positional overload, breaking existing callers who supplied accessTokenDuration positionally.
src/models.ts
Adds optional email canonical/classification fields to User, userAccessedAt to Membership, and OAuth2 device-flow fields to the project model.
src/inputFile.ts
Updates File import from node-fetch-native-with-agent to undici, consistent with the transport migration in client.ts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains updates to the SDK for version 26.2.0.
What's Changed
verificationUrl,userCodeLength,userCodeFormat,deviceCodeDuration) toupdateOAuth2ServerauthorizationDetailsTypes(RFC 9396) param toupdateOAuth2ServerinprojectuserAccessedAtparam toupdateMembershipPrivacyPolicyinprojectemailCanonical,emailIsFree,emailIsDisposable,emailIsCorporate,emailIsCanonical) toUseruserAccessedAtattribute toMembershipdedicatedDatabases.executetoProjectKeyScopesundicifor requests and self-signed certs