Skip to content

fix(backend): Align EnterpriseConnection resource with the Backend API response#9156

Open
manovotny wants to merge 8 commits into
mainfrom
manovotny/enterprise-connection-response-alignment
Open

fix(backend): Align EnterpriseConnection resource with the Backend API response#9156
manovotny wants to merge 8 commits into
mainfrom
manovotny/enterprise-connection-response-alignment

Conversation

@manovotny

@manovotny manovotny commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Stacked on #9155. The EnterpriseConnection resource classes and JSON types drifted from what BAPI's serializer returns (clerk_go api/serialize/enterprise_connection.go). Some properties read fields BAPI never sends — typed string/boolean but always undefined at runtime — and several returned fields were missing from the SDK.

What changed:

  • EnterpriseConnection now exposes provider, logoPublicUrl, allowOrganizationAccountLinking, authenticatable, disableJitProvisioning, and customAttributes.
  • EnterpriseConnectionSamlConnection now exposes active, forceAuthn, and loginHint (required and non-null — BAPI's serializer always sends it).
  • EnterpriseConnectionOauthConfig now exposes providerKey, authUrl, tokenUrl, userInfoUrl, and requiresPkce.
  • Phantom fields are deprecated, not removed: top-level allowSubdomains (only exists on the nested SAML connection) and nested idpMetadata/syncUserAttributes. Removing them would break positional constructor callers, so they keep their slots and gain @deprecated notices pointing at the real field.
  • organizationId is normalized to null when BAPI omits the key, making the declared string | null true at runtime.
  • Fields backed by pointer+omitempty in Go (oauthConfig.clientId, the SAML idp_* fields, certificate timestamps) are retyped | undefined to match runtime behavior.

New constructor params are appended after existing ones. Adding required constructor params to resource classes in a non-major release follows repo precedent (#1544 added hasImage mid-constructor as a minor); this ships as a minor for the same reason.

One review call worth a second opinion: the | undefined retyping is a compile-time change for consumers with strict null checks. It converts silent runtime undefineds into visible type errors, but it will surface in downstream builds on upgrade.

Note

Review surfaced an upstream gap: BAPI's EnterpriseConnectionResponse is missing the object discriminator its sibling serializers all send, so the SDK's deserializer (which switches on object) currently returns raw snake_case JSON for enterprise connection responses in production — fromJSON only runs in tests, where the mock supplies object. The mock keeps object deliberately: it exercises the SDK path that the existing ObjectType.EnterpriseConnection deserializer case defines, and matches the contract once clerk_go adds the field. The upstream fix is filed separately — ORGS-1765.

To test: pnpm --filter @clerk/backend test

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude Code

manovotny and others added 2 commits July 13, 2026 22:55
…onParams

The Backend API validates provider as required on enterprise connection
creation, so calls without it type-checked but failed at runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ntract

Reuses the OrganizationEnterpriseConnectionProvider union from
@clerk/shared/types (matching the sibling SamlConnectionApi pattern) and
adds type-level tests so provider can't silently become optional or widen
back to string.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f2a4865

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@clerk/backend Minor
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 21, 2026 3:50am
swingset Ready Ready Preview, Comment Jul 21, 2026 3:50am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The EnterpriseConnection response contracts and resource parsers now support expanded SAML, OAuth, and top-level fields, including login hints, custom attributes, provider metadata, capability flags, and OAuth endpoints. Optional and deprecated properties were adjusted to match Backend API responses, and omitted organization_id values are normalized to null. Related exports, API fixtures, assertions, and a package changeset were updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • clerk/javascript#9155: Updates enterprise connection create/update parameter typings and request serialization for related SAML and OIDC shapes.
  • clerk/javascript#9200: Adds ConfigureSSO UI logic consuming the OIDC provider and OAuth configuration fields.

Suggested reviewers: laurabeatris, alexisintech

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: aligning EnterpriseConnection with Backend API responses.
Description check ✅ Passed The description is directly related to the changeset and accurately explains the API alignment work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

manovotny and others added 2 commits July 13, 2026 23:25
…ctions

Stacked on #9153 (required provider field). Aligns the remaining
CreateEnterpriseConnectionParams gaps with the Backend API contract,
which validates name and domains (min 1) as required. Deprecates
syncUserAttributes on create and provider on update, since the
Backend API ignores both.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the optional create/update params the Backend API supports but
the SDK types omitted: allowOrganizationAccountLinking,
customAttributes, authenticatable, disableJitProvisioning,
disableAdditionalIdentifications (update only), and saml.loginHint.
Verified against BAPI's CreateParams/UpdateParams/SAMLParams in
clerk_go.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
manovotny and others added 2 commits July 13, 2026 23:41
Codex review: BAPI requires login_hint.source exactly when mode is
custom_attribute and rejects it otherwise; model as a discriminated
union. Also lock name/domains as required with type-level tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sponse

The resource classes and JSON types drifted from BAPI's serializer
(clerk_go api/serialize/enterprise_connection.go): several properties
read fields BAPI never sends, and several returned fields were missing.
New constructor params are appended to preserve positional compatibility.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d bump to minor

Codex review: BAPI's serializer always sends login_hint (no omitempty,
never nil), so the JSON type and resource property are non-nullable.
Changeset bumped to minor to match repo precedent for new resource
properties (e.g. hasImage).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9156

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9156

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9156

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9156

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9156

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9156

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9156

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9156

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9156

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9156

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9156

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9156

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9156

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9156

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9156

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9156

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9156

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9156

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9156

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9156

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9156

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9156

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9156

commit: f2a4865

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-21T03:52:19.065Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 18
🟡 Non-breaking changes 16
🟢 Additions 50

Warning
18 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.

🔴 Breaking changes index (18)

Every breaking change, up front. Full diffs are in the package sections below.

Package Subpath Change
@clerk/backend . EnterpriseConnection.undefined
@clerk/backend . EnterpriseConnection.allowSubdomains
@clerk/backend . EnterpriseConnectionOauthConfig.undefined
@clerk/backend . EnterpriseConnectionOauthConfig.clientId
@clerk/backend . EnterpriseConnectionOauthConfig.discoveryUrl
@clerk/backend . EnterpriseConnectionOauthConfig.logoPublicUrl
@clerk/backend . EnterpriseConnectionSamlConnection.undefined
@clerk/backend . EnterpriseConnectionSamlConnection.acsUrl
@clerk/backend . EnterpriseConnectionSamlConnection.idpCertificate
@clerk/backend . EnterpriseConnectionSamlConnection.idpCertificateExpiresAt
@clerk/backend . EnterpriseConnectionSamlConnection.idpCertificateIssuedAt
@clerk/backend . EnterpriseConnectionSamlConnection.idpEntityId
@clerk/backend . EnterpriseConnectionSamlConnection.idpMetadata
@clerk/backend . EnterpriseConnectionSamlConnection.idpMetadataUrl
@clerk/backend . EnterpriseConnectionSamlConnection.idpSsoUrl
@clerk/backend . EnterpriseConnectionSamlConnection.spEntityId
@clerk/backend . EnterpriseConnectionSamlConnection.spMetadataUrl
@clerk/backend . EnterpriseConnectionSamlConnection.syncUserAttributes

@clerk/backend

Current version: 3.11.7
Recommended bump: MAJOR → 4.0.0

🔴 Breaking Changes (18)

Changed: EnterpriseConnection.undefined

// ... 4 unchanged lines elided ...
      organizationId: string | null, 
      active: boolean, 
      syncUserAttributes: boolean, 
-     allowSubdomains: boolean, 
+     allowSubdomains: boolean | undefined, 
      disableAdditionalIdentifications: boolean, 
      createdAt: number, 
      updatedAt: number, 
      samlConnection: EnterpriseConnectionSamlConnection | null, 
-     oauthConfig: EnterpriseConnectionOauthConfig | null);
+     oauthConfig: EnterpriseConnectionOauthConfig | null, 
+     provider: string, 
+     logoPublicUrl: string | undefined, 
+     allowOrganizationAccountLinking: boolean, 
+     authenticatable: boolean, 
+     disableJitProvisioning: boolean, 
+     customAttributes: EnterpriseConnectionCustomAttribute[] | undefined);

Static analyzer: Breaking change in constructor EnterpriseConnection.undefined: Parameter allowSubdomains type changed: booleanboolean|undefined; Required parameter provider was added; Required parameter logoPublicUrl was added; Required parameter allowOrganizationAccountLinking was added; Required parameter authenticatable was added; Required parameter disableJitProvisioning was added; Required parameter customAttributes was added

🤖 AI review (confirmed) (95%): New required parameters (provider, logoPublicUrl, allowOrganizationAccountLinking, authenticatable, disableJitProvisioning, customAttributes) were added to the EnterpriseConnection constructor, breaking any consumer that calls new EnterpriseConnection(...) directly.

Migration: Update all new EnterpriseConnection(...) call sites to supply the newly required parameters: provider, logoPublicUrl, allowOrganizationAccountLinking, authenticatable, disableJitProvisioning, and customAttributes.

Changed: EnterpriseConnection.allowSubdomains

- readonly allowSubdomains: boolean;
+ readonly allowSubdomains: boolean | undefined;

Static analyzer: Breaking change in property EnterpriseConnection.allowSubdomains: Type changed: booleanboolean|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnection.allowSubdomains changed from boolean to boolean | undefined; consumers reading this property and expecting a definite boolean may break at runtime or in strict type-narrowing contexts.

Migration: Update consumer code that reads allowSubdomains to handle the undefined case, e.g. allowSubdomains ?? false.

Changed: EnterpriseConnectionOauthConfig.undefined

  constructor(
      id: string, 
      name: string, 
-     clientId: string, 
-     discoveryUrl: string, 
-     logoPublicUrl: string, 
+     clientId: string | undefined, 
+     discoveryUrl: string | undefined, 
+     logoPublicUrl: string | undefined, 
      createdAt: number, 
-     updatedAt: number);
+     updatedAt: number, 
+     providerKey: string, 
+     authUrl: string | undefined, 
+     tokenUrl: string | undefined, 
+     userInfoUrl: string | undefined, 
+     requiresPkce: boolean);

Static analyzer: Breaking change in constructor EnterpriseConnectionOauthConfig.undefined: Parameter clientId type changed: stringstring|undefined; Parameter discoveryUrl type changed: stringstring|undefined; Parameter logoPublicUrl type changed: stringstring|undefined; Required parameter providerKey was added; Required parameter authUrl was added; Required parameter tokenUrl was added; Required parameter userInfoUrl was added; Required parameter requiresPkce was added

🤖 AI review (confirmed) (95%): New required parameters (providerKey, authUrl, tokenUrl, userInfoUrl, requiresPkce) were appended to the EnterpriseConnectionOauthConfig constructor, breaking any consumer that constructs it directly.

Migration: Update all new EnterpriseConnectionOauthConfig(...) call sites to supply the newly required parameters: providerKey, authUrl, tokenUrl, userInfoUrl, and requiresPkce.

Changed: EnterpriseConnectionOauthConfig.clientId

- readonly clientId: string;
+ readonly clientId: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionOauthConfig.clientId: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionOauthConfig.clientId narrowed from string to string | undefined; consumer code treating it as a definite string may fail type-checking or at runtime.

Migration: Update consumer code that reads clientId to handle the undefined case before use.

Changed: EnterpriseConnectionOauthConfig.discoveryUrl

- readonly discoveryUrl: string;
+ readonly discoveryUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionOauthConfig.discoveryUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionOauthConfig.discoveryUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads discoveryUrl to handle the undefined case before use.

Changed: EnterpriseConnectionOauthConfig.logoPublicUrl

- readonly logoPublicUrl: string;
+ readonly logoPublicUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionOauthConfig.logoPublicUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionOauthConfig.logoPublicUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads logoPublicUrl to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.undefined

  constructor(
      id: string, 
      name: string, 
-     idpEntityId: string, 
-     idpSsoUrl: string, 
-     idpCertificate: string, 
-     idpCertificateIssuedAt: number, 
-     idpCertificateExpiresAt: number, 
-     idpMetadataUrl: string, 
-     idpMetadata: string, 
-     acsUrl: string, 
-     spEntityId: string, 
-     spMetadataUrl: string, 
-     syncUserAttributes: boolean, 
+     idpEntityId: string | undefined, 
+     idpSsoUrl: string | undefined, 
+     idpCertificate: string | undefined, 
+     idpCertificateIssuedAt: number | undefined, 
+     idpCertificateExpiresAt: number | undefined, 
+     idpMetadataUrl: string | undefined, 
+     idpMetadata: string | undefined, 
+     acsUrl: string | undefined, 
+     spEntityId: string | undefined, 
+     spMetadataUrl: string | undefined, 
+     syncUserAttributes: boolean | undefined, 
      allowSubdomains: boolean, 
-     allowIdpInitiated: boolean);
+     allowIdpInitiated: boolean, 
+     active: boolean, 
+     forceAuthn: boolean, 
+     loginHint: EnterpriseConnectionSamlConnectionLoginHint);

Static analyzer: Breaking change in constructor EnterpriseConnectionSamlConnection.undefined: Parameter idpEntityId type changed: stringstring|undefined; Parameter idpSsoUrl type changed: stringstring|undefined; Parameter idpCertificate type changed: stringstring|undefined; Parameter idpCertificateIssuedAt type changed: numbernumber|undefined; Parameter idpCertificateExpiresAt type changed: numbernumber|undefined; Parameter idpMetadataUrl type changed: stringstring|undefined; Parameter idpMetadata type changed: stringstring|undefined; Parameter acsUrl type changed: stringstring|undefined; Parameter spEntityId type changed: stringstring|undefined; Parameter spMetadataUrl type changed: stringstring|undefined; Parameter syncUserAttributes type changed: booleanboolean|undefined; Required parameter active was added; Required parameter forceAuthn was added; Required parameter loginHint was added

🤖 AI review (confirmed) (95%): New required parameters (active, forceAuthn, loginHint) were appended to the EnterpriseConnectionSamlConnection constructor, breaking any consumer that constructs it directly.

Migration: Update all new EnterpriseConnectionSamlConnection(...) call sites to supply the newly required parameters: active, forceAuthn, and loginHint.

Changed: EnterpriseConnectionSamlConnection.acsUrl

- readonly acsUrl: string;
+ readonly acsUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.acsUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.acsUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads acsUrl to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpCertificate

- readonly idpCertificate: string;
+ readonly idpCertificate: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpCertificate: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpCertificate changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads idpCertificate to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpCertificateExpiresAt

- readonly idpCertificateExpiresAt: number;
+ readonly idpCertificateExpiresAt: number | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpCertificateExpiresAt: Type changed: numbernumber|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpCertificateExpiresAt changed from number to number | undefined; consumers expecting a definite number may break.

Migration: Update consumer code that reads idpCertificateExpiresAt to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpCertificateIssuedAt

- readonly idpCertificateIssuedAt: number;
+ readonly idpCertificateIssuedAt: number | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpCertificateIssuedAt: Type changed: numbernumber|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpCertificateIssuedAt changed from number to number | undefined; consumers expecting a definite number may break.

Migration: Update consumer code that reads idpCertificateIssuedAt to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpEntityId

- readonly idpEntityId: string;
+ readonly idpEntityId: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpEntityId: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpEntityId changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads idpEntityId to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpMetadata

- readonly idpMetadata: string;
+ readonly idpMetadata: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpMetadata: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpMetadata changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads idpMetadata to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpMetadataUrl

- readonly idpMetadataUrl: string;
+ readonly idpMetadataUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpMetadataUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpMetadataUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads idpMetadataUrl to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.idpSsoUrl

- readonly idpSsoUrl: string;
+ readonly idpSsoUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.idpSsoUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.idpSsoUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads idpSsoUrl to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.spEntityId

- readonly spEntityId: string;
+ readonly spEntityId: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.spEntityId: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.spEntityId changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads spEntityId to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.spMetadataUrl

- readonly spMetadataUrl: string;
+ readonly spMetadataUrl: string | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.spMetadataUrl: Type changed: stringstring|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.spMetadataUrl changed from string to string | undefined; consumers expecting a definite string may break.

Migration: Update consumer code that reads spMetadataUrl to handle the undefined case before use.

Changed: EnterpriseConnectionSamlConnection.syncUserAttributes

- readonly syncUserAttributes: boolean;
+ readonly syncUserAttributes: boolean | undefined;

Static analyzer: Breaking change in property EnterpriseConnectionSamlConnection.syncUserAttributes: Type changed: booleanboolean|undefined

🤖 AI review (confirmed) (90%): EnterpriseConnectionSamlConnection.syncUserAttributes changed from boolean to boolean | undefined; consumers expecting a definite boolean may break.

Migration: Update consumer code that reads syncUserAttributes to handle the undefined case before use.

🟡 Non-breaking Changes (16)

Click to expand 16 changes

Modified: EnterpriseConnectionJSON.allow_subdomains

- allow_subdomains: boolean;
+ allow_subdomains?: boolean;

Static analyzer: Modified property EnterpriseConnectionJSON.allow_subdomains: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionJSON.allow_subdomains is an input/data-transfer interface field that became optional; consumers constructing objects of this type no longer need to supply it, which is non-breaking.

Modified: EnterpriseConnectionJSON.organization_id

- organization_id: string | null;
+ organization_id?: string | null;

Static analyzer: Modified property EnterpriseConnectionJSON.organization_id: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionJSON.organization_id becoming optional (string | nullstring | null | undefined) in an input JSON interface is non-breaking for consumers constructing values of this type.

Modified: EnterpriseConnectionOauthConfigJSON.client_id

- client_id: string;
+ client_id?: string;

Static analyzer: Modified property EnterpriseConnectionOauthConfigJSON.client_id: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionOauthConfigJSON.client_id becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionOauthConfigJSON.discovery_url

- discovery_url: string;
+ discovery_url?: string;

Static analyzer: Modified property EnterpriseConnectionOauthConfigJSON.discovery_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionOauthConfigJSON.discovery_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionOauthConfigJSON.logo_public_url

- logo_public_url: string;
+ logo_public_url?: string;

Static analyzer: Modified property EnterpriseConnectionOauthConfigJSON.logo_public_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionOauthConfigJSON.logo_public_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.acs_url

- acs_url: string;
+ acs_url?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.acs_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.acs_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at

- idp_certificate_expires_at: number;
+ idp_certificate_expires_at?: number;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at

- idp_certificate_issued_at: number;
+ idp_certificate_issued_at?: number;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_certificate

- idp_certificate: string;
+ idp_certificate?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_certificate: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_certificate becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_entity_id

- idp_entity_id: string;
+ idp_entity_id?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_entity_id: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_entity_id becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_metadata_url

- idp_metadata_url: string;
+ idp_metadata_url?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_metadata_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_metadata_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_metadata

- idp_metadata: string;
+ idp_metadata?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_metadata: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_metadata becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.idp_sso_url

- idp_sso_url: string;
+ idp_sso_url?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.idp_sso_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.idp_sso_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.sp_entity_id

- sp_entity_id: string;
+ sp_entity_id?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.sp_entity_id: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.sp_entity_id becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.sp_metadata_url

- sp_metadata_url: string;
+ sp_metadata_url?: string;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.sp_metadata_url: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.sp_metadata_url becoming optional is non-breaking for consumers constructing values of this input JSON interface.

Modified: EnterpriseConnectionSamlConnectionJSON.sync_user_attributes

- sync_user_attributes: boolean;
+ sync_user_attributes?: boolean;

Static analyzer: Modified property EnterpriseConnectionSamlConnectionJSON.sync_user_attributes: Member became optional

🤖 AI review (confirmed) (95%): EnterpriseConnectionSamlConnectionJSON.sync_user_attributes becoming optional is non-breaking for consumers constructing values of this input JSON interface.

🟢 Additions (50)

Click to expand 50 changes

Added: EnterpriseConnection.allowOrganizationAccountLinking

+ readonly allowOrganizationAccountLinking: boolean;

Added property EnterpriseConnection.allowOrganizationAccountLinking

Added: EnterpriseConnection.authenticatable

+ readonly authenticatable: boolean;

Added property EnterpriseConnection.authenticatable

Added: EnterpriseConnection.customAttributes

+ readonly customAttributes: EnterpriseConnectionCustomAttribute[] | undefined;

Added property EnterpriseConnection.customAttributes

Added: EnterpriseConnection.disableJitProvisioning

+ readonly disableJitProvisioning: boolean;

Added property EnterpriseConnection.disableJitProvisioning

Added: EnterpriseConnection.logoPublicUrl

+ readonly logoPublicUrl: string | undefined;

Added property EnterpriseConnection.logoPublicUrl

Added: EnterpriseConnection.provider

+ readonly provider: string;

Added property EnterpriseConnection.provider

Added: EnterpriseConnectionCustomAttribute

+ export declare class EnterpriseConnectionCustomAttribute

Added class EnterpriseConnectionCustomAttribute

Added: EnterpriseConnectionCustomAttribute.undefined

+ constructor(
+     name: string, 
+     key: string, 
+     ssoPath: string, 
+     scimPath: string, 
+     multiValued: boolean);

Added constructor EnterpriseConnectionCustomAttribute.undefined

Added: EnterpriseConnectionCustomAttribute.fromJSON

+ static fromJSON(data: EnterpriseConnectionCustomAttributeJSON): EnterpriseConnectionCustomAttribute;

Added method EnterpriseConnectionCustomAttribute.fromJSON

Added: EnterpriseConnectionCustomAttribute.key

+ readonly key: string;

Added property EnterpriseConnectionCustomAttribute.key

Added: EnterpriseConnectionCustomAttribute.multiValued

+ readonly multiValued: boolean;

Added property EnterpriseConnectionCustomAttribute.multiValued

Added: EnterpriseConnectionCustomAttribute.name

+ readonly name: string;

Added property EnterpriseConnectionCustomAttribute.name

Added: EnterpriseConnectionCustomAttribute.scimPath

+ readonly scimPath: string;

Added property EnterpriseConnectionCustomAttribute.scimPath

Added: EnterpriseConnectionCustomAttribute.ssoPath

+ readonly ssoPath: string;

Added property EnterpriseConnectionCustomAttribute.ssoPath

Added: EnterpriseConnectionCustomAttributeJSON

+ export interface EnterpriseConnectionCustomAttributeJSON

Added interface EnterpriseConnectionCustomAttributeJSON

Added: EnterpriseConnectionCustomAttributeJSON.key

+ key: string;

Added property EnterpriseConnectionCustomAttributeJSON.key

Added: EnterpriseConnectionCustomAttributeJSON.multi_valued

+ multi_valued: boolean;

Added property EnterpriseConnectionCustomAttributeJSON.multi_valued

Added: EnterpriseConnectionCustomAttributeJSON.name

+ name: string;

Added property EnterpriseConnectionCustomAttributeJSON.name

Added: EnterpriseConnectionCustomAttributeJSON.scim_path

+ scim_path: string;

Added property EnterpriseConnectionCustomAttributeJSON.scim_path

Added: EnterpriseConnectionCustomAttributeJSON.sso_path

+ sso_path: string;

Added property EnterpriseConnectionCustomAttributeJSON.sso_path

Added: EnterpriseConnectionJSON.allow_organization_account_linking

+ allow_organization_account_linking: boolean;

Added property EnterpriseConnectionJSON.allow_organization_account_linking

Added: EnterpriseConnectionJSON.authenticatable

+ authenticatable: boolean;

Added property EnterpriseConnectionJSON.authenticatable

Added: EnterpriseConnectionJSON.custom_attributes

+ custom_attributes?: EnterpriseConnectionCustomAttributeJSON[];

Added property EnterpriseConnectionJSON.custom_attributes

Added: EnterpriseConnectionJSON.disable_jit_provisioning

+ disable_jit_provisioning: boolean;

Added property EnterpriseConnectionJSON.disable_jit_provisioning

Added: EnterpriseConnectionJSON.logo_public_url

+ logo_public_url?: string;

Added property EnterpriseConnectionJSON.logo_public_url

Added: EnterpriseConnectionJSON.provider

+ provider: string;

Added property EnterpriseConnectionJSON.provider

Added: EnterpriseConnectionOauthConfig.authUrl

+ readonly authUrl: string | undefined;

Added property EnterpriseConnectionOauthConfig.authUrl

Added: EnterpriseConnectionOauthConfig.providerKey

+ readonly providerKey: string;

Added property EnterpriseConnectionOauthConfig.providerKey

Added: EnterpriseConnectionOauthConfig.requiresPkce

+ readonly requiresPkce: boolean;

Added property EnterpriseConnectionOauthConfig.requiresPkce

Added: EnterpriseConnectionOauthConfig.tokenUrl

+ readonly tokenUrl: string | undefined;

Added property EnterpriseConnectionOauthConfig.tokenUrl

Added: EnterpriseConnectionOauthConfig.userInfoUrl

+ readonly userInfoUrl: string | undefined;

Added property EnterpriseConnectionOauthConfig.userInfoUrl

Added: EnterpriseConnectionOauthConfigJSON.auth_url

+ auth_url?: string;

Added property EnterpriseConnectionOauthConfigJSON.auth_url

Added: EnterpriseConnectionOauthConfigJSON.provider_key

+ provider_key: string;

Added property EnterpriseConnectionOauthConfigJSON.provider_key

Added: EnterpriseConnectionOauthConfigJSON.requires_pkce

+ requires_pkce: boolean;

Added property EnterpriseConnectionOauthConfigJSON.requires_pkce

Added: EnterpriseConnectionOauthConfigJSON.token_url

+ token_url?: string;

Added property EnterpriseConnectionOauthConfigJSON.token_url

Added: EnterpriseConnectionOauthConfigJSON.user_info_url

+ user_info_url?: string;

Added property EnterpriseConnectionOauthConfigJSON.user_info_url

Added: EnterpriseConnectionSamlConnection.active

+ readonly active: boolean;

Added property EnterpriseConnectionSamlConnection.active

Added: EnterpriseConnectionSamlConnection.forceAuthn

+ readonly forceAuthn: boolean;

Added property EnterpriseConnectionSamlConnection.forceAuthn

Added: EnterpriseConnectionSamlConnection.loginHint

+ readonly loginHint: EnterpriseConnectionSamlConnectionLoginHint;

Added property EnterpriseConnectionSamlConnection.loginHint

Added: EnterpriseConnectionSamlConnectionJSON.active

+ active: boolean;

Added property EnterpriseConnectionSamlConnectionJSON.active

Added: EnterpriseConnectionSamlConnectionJSON.force_authn

+ force_authn: boolean;

Added property EnterpriseConnectionSamlConnectionJSON.force_authn

Added: EnterpriseConnectionSamlConnectionJSON.login_hint

+ login_hint: EnterpriseConnectionSamlConnectionLoginHintJSON;

Added property EnterpriseConnectionSamlConnectionJSON.login_hint

Added: EnterpriseConnectionSamlConnectionLoginHint

+ export declare class EnterpriseConnectionSamlConnectionLoginHint

Added class EnterpriseConnectionSamlConnectionLoginHint

Added: EnterpriseConnectionSamlConnectionLoginHint.undefined

+ constructor(
+     mode: 'email_address' | 'custom_attribute' | 'off', 
+     source?: string | undefined);

Added constructor EnterpriseConnectionSamlConnectionLoginHint.undefined

Added: EnterpriseConnectionSamlConnectionLoginHint.fromJSON

+ static fromJSON(data: EnterpriseConnectionSamlConnectionLoginHintJSON): EnterpriseConnectionSamlConnectionLoginHint;

Added method EnterpriseConnectionSamlConnectionLoginHint.fromJSON

Added: EnterpriseConnectionSamlConnectionLoginHint.mode

+ readonly mode: 'email_address' | 'custom_attribute' | 'off';

Added property EnterpriseConnectionSamlConnectionLoginHint.mode

Added: EnterpriseConnectionSamlConnectionLoginHint.source

+ readonly source?: string | undefined;

Added property EnterpriseConnectionSamlConnectionLoginHint.source

Added: EnterpriseConnectionSamlConnectionLoginHintJSON

+ export interface EnterpriseConnectionSamlConnectionLoginHintJSON

Added interface EnterpriseConnectionSamlConnectionLoginHintJSON

Added: EnterpriseConnectionSamlConnectionLoginHintJSON.mode

+ mode: 'email_address' | 'custom_attribute' | 'off';

Added property EnterpriseConnectionSamlConnectionLoginHintJSON.mode

Added: EnterpriseConnectionSamlConnectionLoginHintJSON.source

+ source?: string;

Added property EnterpriseConnectionSamlConnectionLoginHintJSON.source


Report generated by Break Check

Last ran on f2a4865.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/backend/src/api/__tests__/EnterpriseConnectionApi.test.ts`:
- Around line 350-386: Add a separate test case in the EnterpriseConnectionApi
response tests using a fixture that omits the optional SAML/OAuth fields and
custom_attributes. Assert the normalized resource exposes undefined for each
omitted optional property, including the relevant fields on samlConnection and
oauthConfig, to preserve serializer-omission behavior.

In `@packages/backend/src/api/resources/EnterpriseConnection.ts`:
- Around line 253-276: Update the public EnterpriseConnection constructors at
packages/backend/src/api/resources/EnterpriseConnection.ts lines 94-99, 159-178,
and 253-276 so the newly added parameters are backward-compatible, or classify
the API change as major by changing .changeset/major-poets-refuse.md line 2 to
major; ensure all affected constructor signatures follow the same choice.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 104cd8a9-6a61-4602-875c-723186eda94d

📥 Commits

Reviewing files that changed from the base of the PR and between c904fb4 and f2a4865.

📒 Files selected for processing (5)
  • .changeset/major-poets-refuse.md
  • packages/backend/src/api/__tests__/EnterpriseConnectionApi.test.ts
  • packages/backend/src/api/resources/EnterpriseConnection.ts
  • packages/backend/src/api/resources/JSON.ts
  • packages/backend/src/index.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)

Comment on lines +350 to +386
expect(response.provider).toBe('saml_custom');
expect(response.logoPublicUrl).toBe('https://img.example.com/connection-logo.png');
expect(response.domains).toEqual(['clerk.dev']);
expect(response.active).toBe(true);
// organization_id is omitted by the Backend API when unset and normalized to null
expect(response.organizationId).toBeNull();
expect(response.allowOrganizationAccountLinking).toBe(true);
expect(response.authenticatable).toBe(true);
expect(response.disableJitProvisioning).toBe(false);
expect(response.customAttributes).toEqual([
{
name: 'Employee Number',
key: 'employee_number',
ssoPath: 'user.employeeNumber',
scimPath: '',
multiValued: false,
},
]);
expect(response.samlConnection).not.toBeNull();
expect(response.samlConnection?.id).toBe('samlc_1');
expect(response.samlConnection?.idpEntityId).toBe('https://idp.example.com');
expect(response.samlConnection?.idpCertificateIssuedAt).toBe(1672531200000);
expect(response.samlConnection?.idpCertificateExpiresAt).toBe(1704067200000);
expect(response.samlConnection?.active).toBe(true);
expect(response.samlConnection?.forceAuthn).toBe(false);
expect(response.samlConnection?.loginHint).toEqual({
mode: 'custom_attribute',
source: 'employee_number',
});
expect(response.oauthConfig).not.toBeNull();
expect(response.oauthConfig?.providerKey).toBe('custom_oidc');
expect(response.oauthConfig?.clientId).toBe('client_abc');
expect(response.oauthConfig?.discoveryUrl).toBe('https://oauth.example.com/.well-known/openid-configuration');
expect(response.oauthConfig?.authUrl).toBe('https://oauth.example.com/authorize');
expect(response.oauthConfig?.tokenUrl).toBe('https://oauth.example.com/token');
expect(response.oauthConfig?.userInfoUrl).toBe('https://oauth.example.com/userinfo');
expect(response.oauthConfig?.requiresPkce).toBe(false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cover omitted optional response fields.

This fixture populates every newly optional SAML/OAuth field and custom_attributes. Add a case omitting them and assert the resource exposes undefined; this locks in the intended serializer-omission behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/backend/src/api/__tests__/EnterpriseConnectionApi.test.ts` around
lines 350 - 386, Add a separate test case in the EnterpriseConnectionApi
response tests using a fixture that omits the optional SAML/OAuth fields and
custom_attributes. Assert the normalized resource exposes undefined for each
omitted optional property, including the relevant fields on samlConnection and
oauthConfig, to preserve serializer-omission behavior.

Source: Coding guidelines

Comment on lines +253 to +276
/**
* The identity provider (IdP) of the connection. For example, `'saml_custom'` or `'oidc_custom'`.
*/
readonly provider: string,
/**
* The public URL of the provider logo, if available.
*/
readonly logoPublicUrl: string | undefined,
/**
* Whether existing users who are members of the organization can link their account to their enterprise identity.
*/
readonly allowOrganizationAccountLinking: boolean,
/**
* Whether the connection can be used for sign-in and sign-up.
*/
readonly authenticatable: boolean,
/**
* Whether Just-in-Time (JIT) provisioning of users is disabled for the connection.
*/
readonly disableJitProvisioning: boolean,
/**
* The custom attribute mappings of the connection. Only returned when the custom attributes feature is enabled for the instance.
*/
readonly customAttributes: EnterpriseConnectionCustomAttribute[] | undefined,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 4 '"version"|"exports"' packages/backend/package.json
ast-grep outline packages/backend/src/api/resources/EnterpriseConnection.ts --items all --type class
rg -n -C 3 '\bEnterpriseConnection(SamlConnection|OauthConfig)?\b' packages/backend/src/index.ts

Repository: clerk/javascript

Length of output: 1546


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## Constructor definitions\n'
sed -n '1,340p' packages/backend/src/api/resources/EnterpriseConnection.ts | nl -ba | sed -n '1,340p'

printf '\n## Direct usages in repo\n'
rg -n 'new\s+EnterpriseConnection(SamlConnectionLoginHint|CustomAttribute|SamlConnection|OauthConfig|)\b' packages/backend/src || true

printf '\n## Package entry exports around backend index\n'
sed -n '120,190p' packages/backend/src/index.ts | nl -ba | sed -n '1,120p'

printf '\n## Changeset\n'
sed -n '1,80p' .changeset/major-poets-refuse.md | nl -ba | sed -n '1,80p'

Repository: clerk/javascript

Length of output: 222


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## EnterpriseConnection.ts constructors\n'
grep -nE '^export class (EnterpriseConnectionSamlConnectionLoginHint|EnterpriseConnectionCustomAttribute|EnterpriseConnectionSamlConnection|EnterpriseConnectionOauthConfig|EnterpriseConnection)\b|^  constructor\(' packages/backend/src/api/resources/EnterpriseConnection.ts

printf '\n## Relevant source around constructors\n'
sed -n '1,340p' packages/backend/src/api/resources/EnterpriseConnection.ts | cat -n | sed -n '1,340p'

printf '\n## Public exports from backend entry\n'
grep -nE 'EnterpriseConnection(SamlConnectionLoginHint|CustomAttribute|SamlConnection|OauthConfig)?' packages/backend/src/index.ts

printf '\n## Direct constructor usages in repo\n'
rg -n 'new\s+EnterpriseConnection(SamlConnectionLoginHint|CustomAttribute|SamlConnection|OauthConfig)?\b' packages/backend/src || true

printf '\n## Changeset\n'
cat -n .changeset/major-poets-refuse.md

Repository: clerk/javascript

Length of output: 15917


Bump @clerk/backend to a major release

These exported constructors are part of the public API, so adding required trailing parameters is a breaking change. Update .changeset/major-poets-refuse.md to major, or make the new arguments backward-compatible.

  • packages/backend/src/api/resources/EnterpriseConnection.ts
  • .changeset/major-poets-refuse.md
📍 Affects 2 files
  • packages/backend/src/api/resources/EnterpriseConnection.ts#L253-L276 (this comment)
  • packages/backend/src/api/resources/EnterpriseConnection.ts#L94-L99
  • packages/backend/src/api/resources/EnterpriseConnection.ts#L159-L178
  • .changeset/major-poets-refuse.md#L2-L2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/backend/src/api/resources/EnterpriseConnection.ts` around lines 253
- 276, Update the public EnterpriseConnection constructors at
packages/backend/src/api/resources/EnterpriseConnection.ts lines 94-99, 159-178,
and 253-276 so the newly added parameters are backward-compatible, or classify
the API change as major by changing .changeset/major-poets-refuse.md line 2 to
major; ensure all affected constructor signatures follow the same choice.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants