@canopy-io/node 0.23.2 → 0.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -611,7 +611,7 @@ interface paths {
611
611
  };
612
612
  /**
613
613
  * List an identity's active sessions (admin)
614
- * @description Lists one page of an identity's active sessions in the caller's Environment (server-to-server admin), newest first, taking `page` and `take` only: the rows a customer reads to confirm from its own side that a sign-out took, or to show a person where they are signed in. Each row is a session's current refresh token, so `id` changes on every refresh. Sessions the identity holds in its other Environments are not listed. Returns `404` when the identity has no membership in this Environment.
614
+ * @description Lists one page of an identity's active sessions in the caller's Environment (server-to-server admin), newest first, taking `page` and `take` only: the rows a customer reads to confirm from its own side that a sign-out took, or to show a person where they are signed in. A hosted sign-in no application has exchanged a code for yet holds no refresh token and is listed first, by its session id; every other row is a session's current refresh token, so its `id` changes on every refresh. Sessions the identity holds in its other Environments are not listed. Returns `404` when the identity has no membership in this Environment.
615
615
  */
616
616
  get: operations["ApiIdentitiesController_listIdentitySessions"];
617
617
  put?: never;
@@ -634,7 +634,7 @@ interface paths {
634
634
  post?: never;
635
635
  /**
636
636
  * Revoke one of an identity's sessions (admin)
637
- * @description Revokes one of an identity's sessions in the caller's Environment (server-to-server admin) by marking its refresh token revoked, so the next refresh from that device returns `401` while every other session carries on. Audited as `identity.session.revoked`, the same row the person's own per-session sign-out writes. Returns `204 No Content`; returns `404` when the identity has no membership in this Environment, or when the session is not the identity's, belongs to another Environment, or is already revoked.
637
+ * @description Revokes one of an identity's sessions in the caller's Environment (server-to-server admin) by the id the list gave it: a refresh token's is marked revoked, so the next refresh from that device returns `401`, and a hosted sign-in no application has exchanged a code for yet is ended, so its code issues nothing, while every other session carries on. Audited as `identity.session.revoked`, the same row the person's own per-session sign-out writes. Returns `204 No Content`; returns `404` when the identity has no membership in this Environment, or when the session is not the identity's, belongs to another Environment, or is already revoked or ended.
638
638
  */
639
639
  delete: operations["ApiIdentitiesController_revokeIdentitySession"];
640
640
  options?: never;
@@ -1605,7 +1605,7 @@ interface paths {
1605
1605
  head?: never;
1606
1606
  /**
1607
1607
  * Update an organization's authentication policy
1608
- * @description Sets the organization's own authentication policy. A field set to `null` inherits the Environment again. The policy can only tighten the Environment's settings: `mfa_required` can be true where the Environment leaves MFA optional, `mfa_factor_allowlist` must be a subset of the Environment's, `mfa_after_sso` can be `require` where the Environment exempts, and `require_sso` refuses password and code logins for members. `staff_entry` is the organization's own decision: `refused` turns away the Environment's staff (a role at the Environment root), records each attempt, and ends the sessions staff have inside at their next refresh. Returns `400` (`organization.policy_loosens`) when a value would loosen the Environment, `409` when `If-Match` does not match the policy version. Requires the `hierarchy.manage` permission at the organization and emits `organization.policy.updated`.
1608
+ * @description Sets the organization's own authentication policy. A field set to `null` inherits the Environment again. The policy can only tighten the Environment's settings: `mfa_required` can be true where the Environment leaves MFA optional, `mfa_factor_allowlist` must be a subset of the Environment's, `mfa_after_sso` can be `require` where the Environment exempts, and `require_sso` refuses password and code logins for members. Turning `require_sso` on needs an active SSO connection bound to the organization and a verified domain, since members are sent to single sign-on and found by their email's domain; without both it returns `409` (`organization.sso_requirement_not_ready`). `staff_entry` is the organization's own decision: `refused` turns away the Environment's staff (a role at the Environment root), records each attempt, and ends the sessions staff have inside at their next refresh. Returns `400` (`organization.policy_loosens`) when a value would loosen the Environment, `409` when `If-Match` does not match the policy version. Requires the `hierarchy.manage` permission at the organization and emits `organization.policy.updated`.
1609
1609
  */
1610
1610
  patch: operations["ApiOrganizationsController_updatePolicy"];
1611
1611
  trace?: never;
@@ -1746,7 +1746,7 @@ interface paths {
1746
1746
  post?: never;
1747
1747
  /**
1748
1748
  * Remove one of the organization's domain claims
1749
- * @description Removes a domain claim from the organization; the bound connection stops routing and admitting that domain on the next login. Emits an `sso.domain.removed` audit row and returns `204`; responds `404` when the organization holds no claim for that domain.
1749
+ * @description Removes a domain claim from the organization; the bound connection stops routing and admitting that domain on the next login. Emits an `sso.domain.removed` audit row and returns `204`; responds `404` when the organization holds no claim for that domain, and `409` (`organization.sso_requirement_needs_domain`) while the organization requires single sign-on and this is its only verified domain: turn `require_sso` off first.
1750
1750
  */
1751
1751
  delete: operations["ApiOrganizationsController_removeDomain"];
1752
1752
  options?: never;
@@ -1790,7 +1790,7 @@ interface paths {
1790
1790
  post?: never;
1791
1791
  /**
1792
1792
  * Unbind an SSO connection from an organization
1793
- * @description Removes the binding; logins through the connection fall back to the Environment's placement. Existing memberships are untouched. Returns `404` when the connection is not bound to this organization, and `409` (`organization.sso_connection_owned_cannot_unbind`) when the organization set the connection up itself: an owned connection stays with its organization, so disable or delete it instead. Requires the `hierarchy.manage` permission at the organization and emits `organization.sso_connection.unbound`.
1793
+ * @description Removes the binding; logins through the connection fall back to the Environment's placement. Existing memberships are untouched. Returns `404` when the connection is not bound to this organization, `409` (`organization.sso_connection_owned_cannot_unbind`) when the organization set the connection up itself: an owned connection stays with its organization, so disable or delete it instead; and `409` (`organization.sso_requirement_needs_connection`) while the organization requires single sign-on and this is its only active connection: turn `require_sso` off first. Requires the `hierarchy.manage` permission at the organization and emits `organization.sso_connection.unbound`.
1794
1794
  */
1795
1795
  delete: operations["ApiOrganizationsController_unbindSsoConnection"];
1796
1796
  options?: never;
@@ -1950,7 +1950,7 @@ interface paths {
1950
1950
  post: operations["ApiOrganizationSsoConnectionController_create"];
1951
1951
  /**
1952
1952
  * Remove an organization's SSO connection
1953
- * @description Unbinds the connection from the organization, unlinks it from the Environment, and deletes it. Existing memberships stay. Refused on a developer-managed connection. Requires `hierarchy.manage` or `canopy:organization.manage` at the organization.
1953
+ * @description Unbinds the connection from the organization, unlinks it from the Environment, and deletes it. Existing memberships stay. Refused on a developer-managed connection, and with `409` (`organization.sso_requirement_needs_connection`) while the organization requires single sign-on and this is its only active connection: turn `require_sso` off first. Requires `hierarchy.manage` or `canopy:organization.manage` at the organization.
1954
1954
  */
1955
1955
  delete: operations["ApiOrganizationSsoConnectionController_remove"];
1956
1956
  options?: never;
@@ -1993,7 +1993,7 @@ interface paths {
1993
1993
  put?: never;
1994
1994
  /**
1995
1995
  * Disable an organization's SSO connection
1996
- * @description Sets the connection `disabled`; sign-ins through it stop and the row stays. Refused on a developer-managed connection. Requires `hierarchy.manage` or `canopy:organization.manage` at the organization.
1996
+ * @description Sets the connection `disabled`; sign-ins through it stop and the row stays. Refused on a developer-managed connection, and with `409` (`organization.sso_requirement_needs_connection`) while the organization requires single sign-on and this is its only active connection: turn `require_sso` off first. Requires `hierarchy.manage` or `canopy:organization.manage` at the organization.
1997
1997
  */
1998
1998
  post: operations["ApiOrganizationSsoConnectionController_disable"];
1999
1999
  delete?: never;
@@ -3462,7 +3462,7 @@ interface paths {
3462
3462
  post?: never;
3463
3463
  /**
3464
3464
  * Delete an SSO connection
3465
- * @description Permanently deletes an SSO connection and its configuration from the Account. Emits an `sso.connection.deleted` audit row and returns `204` with no body; responds `404` when the connection is not found.
3465
+ * @description Permanently deletes an SSO connection and its configuration from the Account. Emits an `sso.connection.deleted` audit row and returns `204` with no body; responds `404` when the connection is not found, and `409` (`organization.sso_requirement_needs_connection`) while an organization that requires single sign-on has this as its only active connection: turn that organization's `require_sso` off first.
3466
3466
  */
3467
3467
  delete: operations["ApiSsoController_remove"];
3468
3468
  options?: never;
@@ -3505,7 +3505,7 @@ interface paths {
3505
3505
  put?: never;
3506
3506
  /**
3507
3507
  * Disable an SSO connection
3508
- * @description Sets an active connection's status to `disabled`, stopping all login flows through it while preserving the row and its configuration for later re-activation. Emits an `sso.connection.disabled_by_user` audit row and returns the updated connection. Responds `404` when the connection is not found in the Account.
3508
+ * @description Sets an active connection's status to `disabled`, stopping all login flows through it while preserving the row and its configuration for later re-activation. Emits an `sso.connection.disabled_by_user` audit row and returns the updated connection. Refused with `409` (`organization.sso_requirement_needs_connection`) while it is the only active connection of an organization that requires single sign-on: turn `require_sso` off first. Responds `404` when the connection is not found in the Account.
3509
3509
  */
3510
3510
  post: operations["ApiSsoController_disable"];
3511
3511
  delete?: never;
@@ -3851,13 +3851,13 @@ interface paths {
3851
3851
  };
3852
3852
  /**
3853
3853
  * List active SCIM tokens for the Environment
3854
- * @description Lists the active SCIM tokens for the current Environment, newest first, with secrets masked to a `token_preview` (revoked tokens are excluded). The response is an unpaginated `{ items }` array.
3854
+ * @description Lists the active SCIM tokens for the current Environment, newest first, with secrets masked to a `token_preview` and each one's `expires_at` (revoked and expired tokens are excluded). The response is an unpaginated `{ items }` array.
3855
3855
  */
3856
3856
  get: operations["ApiScimTokensController_list"];
3857
3857
  put?: never;
3858
3858
  /**
3859
3859
  * Mint a SCIM bearer token for the Environment
3860
- * @description Mints a new SCIM bearer token for the current Environment, returning the raw `token` exactly once alongside its `id`, `token_preview`, and the SCIM `base_url` the IdP admin pastes into Okta/Entra. The raw value is bcrypt-hashed for storage (with a SHA-256 lookup hash) and is never recoverable afterwards. Accepts an optional human `name` label and returns `201`.
3860
+ * @description Mints a new SCIM bearer token for the current Environment, returning the raw `token` exactly once alongside its `id`, `token_preview`, and the SCIM `base_url` the IdP admin pastes into Okta/Entra. The raw value is bcrypt-hashed for storage (with a SHA-256 lookup hash) and is never recoverable afterwards. Accepts an optional human `name` label and returns `201`. The token expires 365 days after minting (`expires_at`); once it has, the provider's requests are refused with `401`, so replace it before then.
3861
3861
  */
3862
3862
  post: operations["ApiScimTokensController_create"];
3863
3863
  delete?: never;
@@ -3886,6 +3886,26 @@ interface paths {
3886
3886
  patch?: never;
3887
3887
  trace?: never;
3888
3888
  };
3889
+ "/api/v1/scim-tokens/{id}/rotate": {
3890
+ parameters: {
3891
+ query?: never;
3892
+ header?: never;
3893
+ path?: never;
3894
+ cookie?: never;
3895
+ };
3896
+ get?: never;
3897
+ put?: never;
3898
+ /**
3899
+ * Replace a SCIM token without an outage
3900
+ * @description Mints a replacement for the SCIM token `id` in the current Environment and shortens the current token's life to 7 days rather than revoking it, so the identity provider can be moved to the new token before the old one stops working. Returns the replacement's raw `token` exactly once, with its `id`, `token_preview`, `expires_at` (365 days out) and the SCIM `base_url`. The replacement counts toward the directory's 10 live tokens, and so does the old token until its 7 days end.
3901
+ */
3902
+ post: operations["ApiScimTokensController_rotate"];
3903
+ delete?: never;
3904
+ options?: never;
3905
+ head?: never;
3906
+ patch?: never;
3907
+ trace?: never;
3908
+ };
3889
3909
  "/api/v1/scim-tokens/{id}": {
3890
3910
  parameters: {
3891
3911
  query?: never;
@@ -4187,7 +4207,7 @@ interface paths {
4187
4207
  };
4188
4208
  /**
4189
4209
  * List delivery attempts for a webhook
4190
- * @description Returns a paginated, newest-first history of delivery attempts for one webhook subscription (`id`), scoped to the active Application's current Environment. Each delivery includes its `event_type`, `status`, `response_status`, `response_body`, `attempts` count, and `next_retry_at`. Returns `404` when the subscription does not belong to this Environment; requires the `webhook.view` permission.
4210
+ * @description Returns a paginated, newest-first history of delivery attempts for one webhook subscription (`id`), scoped to the active Application's current Environment. Each delivery includes its `id` (sent as `X-Canopy-Webhook-Id`), `event_type`, `status`, `response_status`, `response_body`, `attempts` count, and `next_retry_at`. Returns `404` when the subscription does not belong to this Environment; requires the `webhook.view` permission.
4191
4211
  */
4192
4212
  get: operations["ApiWebhooksController_listDeliveries"];
4193
4213
  put?: never;
@@ -4571,7 +4591,7 @@ interface paths {
4571
4591
  };
4572
4592
  /**
4573
4593
  * List delivery attempts for a webhook
4574
- * @description Returns a paginated, newest-first history of delivery attempts for one webhook subscription (`id`), in the Account. Each delivery includes its `event_type`, `status`, `response_status`, `response_body`, `attempts` count, and `next_retry_at`. Returns `404` when the subscription does not belong to the Account; requires the `account_webhook.view` scope.
4594
+ * @description Returns a paginated, newest-first history of delivery attempts for one webhook subscription (`id`), in the Account. Each delivery includes its `id` (sent as `X-Canopy-Webhook-Id`), `event_type`, `status`, `response_status`, `response_body`, `attempts` count, and `next_retry_at`. Returns `404` when the subscription does not belong to the Account; requires the `account_webhook.view` scope.
4575
4595
  */
4576
4596
  get: operations["ApiAccountWebhooksController_listDeliveries"];
4577
4597
  put?: never;
@@ -4810,6 +4830,8 @@ interface components {
4810
4830
  is_active: boolean;
4811
4831
  /** @description Number of distinct identities assigned this role, across all nodes. */
4812
4832
  member_count: number;
4833
+ /** @description The name of the organization this role belongs to; null for an Environment role. */
4834
+ organization_name?: string | null;
4813
4835
  };
4814
4836
  PermissionUsageDto: {
4815
4837
  permission_id: string;
@@ -5077,7 +5099,7 @@ interface components {
5077
5099
  password: string;
5078
5100
  };
5079
5101
  IdentitySessionResponseDto: {
5080
- /** @description The session's current refresh token id: what `DELETE /identities/:id/sessions/:sessionId` takes. It changes on every refresh. */
5102
+ /** @description What `DELETE /identities/:id/sessions/:sessionId` takes: the session's current refresh token id, which changes on every refresh, or, for a hosted sign-in no application has exchanged a code for yet, its session id. */
5081
5103
  id: string;
5082
5104
  /** Format: date-time */
5083
5105
  created_at: string;
@@ -5848,6 +5870,8 @@ interface components {
5848
5870
  /** @description The methods the organization keeps of the Environment's, or null to inherit them all. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
5849
5871
  allowed_sign_in_methods?: string[] | null;
5850
5872
  require_sso: boolean;
5873
+ /** @description Whether `require_sso` can be turned on: the organization has an active SSO connection bound to it and a verified domain. */
5874
+ require_sso_ready: boolean;
5851
5875
  /**
5852
5876
  * @description Whether the Environment's staff (identities holding a role at the Environment root) may enter this organization. `allowed` until the organization refuses them.
5853
5877
  * @enum {string}
@@ -5871,7 +5895,7 @@ interface components {
5871
5895
  UpdateOrganizationPolicyDto: {
5872
5896
  /** @description Require MFA for this organization's members. `true` tightens an Environment that leaves MFA optional; `false` is only accepted where the Environment does not require MFA; `null` inherits. */
5873
5897
  mfa_required?: boolean | null;
5874
- /** @description Factors this organization's members may enroll and use. Must be a non-empty subset of the Environment's allowlist; `null` inherits. */
5898
+ /** @description Factors this organization's members may enroll and use. Must be a non-empty subset of the Environment's allowlist; `null` inherits. A member holding only a factor of a kind left out is treated on the way into this organization as holding none. */
5875
5899
  mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
5876
5900
  /**
5877
5901
  * @description Whether an SSO login still owes an MFA challenge. `require` tightens an Environment that exempts SSO; `exempt` is only accepted where the Environment exempts; `null` inherits.
@@ -5880,7 +5904,7 @@ interface components {
5880
5904
  mfa_after_sso?: "exempt" | "require" | null;
5881
5905
  /** @description The sign-in methods this organization's members may use. A non-empty subset of the methods the Environment offers (`password` unless the Environment turned it off, `email_otp` and `passkey` where the Environment turned them on, each social provider it enabled, and `sso`); a method the Environment does not offer is refused with `organization.policy_loosens`. `null` inherits the Environment's. While `require_sso` is on, SSO is the only method whatever this says. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
5882
5906
  allowed_sign_in_methods?: string[] | null;
5883
- /** @description Members must sign in through SSO. Password and email-code logins are refused for the organization's members and for any email whose domain routes to a connection bound to this organization. */
5907
+ /** @description Members must sign in through SSO. Password and email-code logins are refused for the organization's members and for any email whose domain routes to a connection bound to this organization. Turning it on is refused with `organization.sso_requirement_not_ready` until the organization has an active SSO connection bound to it and a verified domain. */
5884
5908
  require_sso?: boolean;
5885
5909
  /**
5886
5910
  * @description Whether the Environment's staff (identities holding a role at the Environment root) may enter this organization. `refused` refuses each entry, records it in the organization's activity, and ends the sessions staff already have inside at their next refresh.
@@ -7259,6 +7283,8 @@ interface components {
7259
7283
  source_client_id: string;
7260
7284
  /** @description Freshly-minted client_id in the new env */
7261
7285
  client_id: string;
7286
+ /** @description The client's name, the same in the source and the target Environment */
7287
+ name: string;
7262
7288
  /** @description Raw client_secret — shown once, never returned again. Persist on receipt. Null for a public client, which has no secret; its entry still maps the source client_id to the new one. */
7263
7289
  client_secret: string | null;
7264
7290
  };
@@ -7296,7 +7322,7 @@ interface components {
7296
7322
  mfa_grace_period_days?: number;
7297
7323
  /** @description Number of days a 'remember this device' cookie remains valid. 0 disables the option entirely. Range 0..90. */
7298
7324
  mfa_trusted_device_days?: number;
7299
- /** @description Factor types end users may use under this Environment. Customers wanting TOTP/WebAuthn only (e.g. healthcare) drop `email_otp` from the list. `recovery_code` is always offered and is not configurable here. */
7325
+ /** @description Factor types end users may use under this Environment. Customers wanting TOTP/WebAuthn only (e.g. healthcare) drop `email_otp` from the list. `recovery_code` is always offered and is not configurable here. Dropping `totp` or `webauthn` keeps the factors people already enrolled of that kind, but they stop counting: they answer no sign-in challenge and prove no step-up, and a person left with no allowed factor is treated as holding none, so where MFA is required their next sign-in asks them to enrol an allowed one. A list of `email_otp` alone names nothing to enrol, so both kinds stay open under it and are offered at a challenge. */
7300
7326
  mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[];
7301
7327
  /**
7302
7328
  * @description What an SSO login owes the MFA gate. `require` (the default) challenges an SSO login like any other when MFA is required; `exempt` trusts the identity provider's own second factor and skips the challenge for logins that arrived through SSO.
@@ -7418,6 +7444,7 @@ interface components {
7418
7444
  organization_integrations_enabled: boolean;
7419
7445
  /** @description The roles an organization's administrators may give its integrations, by id. Empty when none are chosen. */
7420
7446
  organization_integration_role_ids: string[];
7447
+ /** @description The sites whose browsers may call this Environment, each a bare origin. A browser on any other site is refused. */
7421
7448
  allowed_web_origins?: string[];
7422
7449
  sso_return_urls?: string[];
7423
7450
  /** @description The roles a customer's identity provider may grant and the one arrivals get, inherited by every organization without a list of its own. `null` when unset, which keeps directory sync closed for those organizations. */
@@ -7440,7 +7467,7 @@ interface components {
7440
7467
  mfa_grace_period_days?: number;
7441
7468
  /** @description Number of days a 'remember this device' cookie remains valid. 0 disables the option entirely. Range 0..90. */
7442
7469
  mfa_trusted_device_days?: number;
7443
- /** @description Factor types end users may use under this Environment. Customers wanting TOTP/WebAuthn only (e.g. healthcare) drop `email_otp` from the list. `recovery_code` is always offered and is not configurable here. */
7470
+ /** @description Factor types end users may use under this Environment. Customers wanting TOTP/WebAuthn only (e.g. healthcare) drop `email_otp` from the list. `recovery_code` is always offered and is not configurable here. Dropping `totp` or `webauthn` keeps the factors people already enrolled of that kind, but they stop counting: they answer no sign-in challenge and prove no step-up, and a person left with no allowed factor is treated as holding none, so where MFA is required their next sign-in asks them to enrol an allowed one. A list of `email_otp` alone names nothing to enrol, so both kinds stay open under it and are offered at a challenge. */
7444
7471
  mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[];
7445
7472
  /**
7446
7473
  * @description What an SSO login owes the MFA gate. `require` (the default) challenges an SSO login like any other when MFA is required; `exempt` trusts the identity provider's own second factor and skips the challenge for logins that arrived through SSO.
@@ -7500,7 +7527,7 @@ interface components {
7500
7527
  organization_integrations_enabled?: boolean;
7501
7528
  /** @description The roles an organization's administrators may give its integrations, by id: active roles of this Environment, shared by every organization (not one organization's own), carrying neither `canopy:organization.manage` nor `canopy:access.manage`; anything else is refused with `400 environment.integration_role_invalid`. Separate from `idp_arrival_roles`. Replaces the list. While `organization_integrations_enabled` is on the list cannot be empty (`400 environment.integrations_roles_required`). Removing a role leaves integrations already holding it unchanged; a deleted role leaves the list. */
7502
7529
  organization_integration_role_ids?: string[];
7503
- /** @description Browser Origins allowed to call this Environment's public identity-auth API cross-origin (CORS), e.g. `https://app.example.com`. Needed to use the Direct API from a browser SPA. While the list is set, self-service sign-up refuses a browser `Origin` that is not on it; a request with no `Origin`, as from a backend, is not affected. Persisted under `env.settings.allowed_web_origins`. */
7530
+ /** @description The sites whose browsers may call this Environment, each a bare origin such as `https://app.example.com`. A browser on a site that is not listed is refused with `403` (`auth.origin_not_allowed`) wherever its request names this Environment, and an empty list admits no other site. The origin in `auth_links_base_url` and the Environment's active custom auth domain are admitted without being listed. A request with no `Origin`, as from a backend or a mobile app, is not affected. Persisted under `env.settings.allowed_web_origins`. */
7504
7531
  allowed_web_origins?: string[];
7505
7532
  /** @description Allowlist of return URLs for publishable-key (Direct-API) SSO. After the IdP round-trip, `/v1/identity/auth/sso/*` redirects back to one of these with a single-use `sso_token`; an unregistered return URL is rejected (exact match — no open redirect). Persisted under `env.settings.sso_return_urls`. */
7506
7533
  sso_return_urls?: string[];
@@ -7889,6 +7916,8 @@ interface components {
7889
7916
  scope: "account" | "environment";
7890
7917
  /** @description Capability keys the role grants */
7891
7918
  capabilities: string[];
7919
+ /** @description Every capability a holder of the role has: its own keys and each `view` a `manage` among them implies */
7920
+ conferred_capabilities: string[];
7892
7921
  /** @description Live grants of this role across the whole Account, not just one Environment */
7893
7922
  assignment_count: number;
7894
7923
  /** @description Optimistic-lock version. Send it back in `If-Match` on an update to refuse a stale edit with 409. */
@@ -8053,6 +8082,7 @@ interface components {
8053
8082
  secret: string;
8054
8083
  };
8055
8084
  CreateWebhookDto: {
8085
+ /** @description Where Canopy POSTs each signed event. An https address on a public host, with no credentials or fragment: Canopy's servers call it directly, so loopback, private-range and link-local addresses are refused (`webhook.url_refused`). While developing, expose your local receiver through a tunnel and register the tunnel's https address. */
8056
8086
  url: string;
8057
8087
  event_types: string[];
8058
8088
  description?: string;
@@ -8106,6 +8136,7 @@ interface components {
8106
8136
  created_at: string;
8107
8137
  };
8108
8138
  UpdateWebhookDto: {
8139
+ /** @description Where Canopy POSTs each signed event. An https address on a public host, with no credentials or fragment: Canopy's servers call it directly, so loopback, private-range and link-local addresses are refused (`webhook.url_refused`). While developing, expose your local receiver through a tunnel and register the tunnel's https address. */
8109
8140
  url?: string;
8110
8141
  event_types?: string[];
8111
8142
  description?: string | null;
@@ -12467,7 +12498,7 @@ interface operations {
12467
12498
  };
12468
12499
  requestBody?: never;
12469
12500
  responses: {
12470
- /** @description One page of the sessions the identity holds that are neither revoked nor expired, newest first: the session's current refresh token id (what the per-session revoke takes), when it was signed in and when it expires, the browser's address and user agent, and the organization it is acting in. */
12501
+ /** @description One page of the sessions the identity holds that are neither revoked nor expired: first the hosted sign-ins no application has exchanged a code for yet, by their session id, then the sessions that hold a refresh token, by that token's id, each group newest first. Each row has the id the per-session revoke takes, when it was signed in and when it expires, the browser's address and user agent, and the organization it is acting in (null for a sign-in not yet exchanged). */
12471
12502
  200: {
12472
12503
  headers: {
12473
12504
  [name: string]: unknown;
@@ -19491,7 +19522,7 @@ interface operations {
19491
19522
  "application/json": components["schemas"]["ErrorResponseDto"];
19492
19523
  };
19493
19524
  };
19494
- /** @description Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry. */
19525
+ /** @description The policy was modified since the version supplied in `If-Match`; or `require_sso` was turned on for an organization with no active bound SSO connection or no verified domain */
19495
19526
  409: {
19496
19527
  headers: {
19497
19528
  [name: string]: unknown;
@@ -19502,7 +19533,7 @@ interface operations {
19502
19533
  * "error": {
19503
19534
  * "statusCode": 409,
19504
19535
  * "code": "request.conflict",
19505
- * "message": "Version mismatch — the resource was modified since the version supplied in If-Match. Refresh and retry.",
19536
+ * "message": "The policy was modified since the version supplied in `If-Match`; or `require_sso` was turned on for an organization with no active bound SSO connection or no verified domain",
19506
19537
  * "timestamp": "2026-04-20T12:00:00.000Z",
19507
19538
  * "path": "/api/v1/organizations/{id}/policy",
19508
19539
  * "method": "PATCH"
@@ -20480,6 +20511,27 @@ interface operations {
20480
20511
  "application/json": components["schemas"]["ErrorResponseDto"];
20481
20512
  };
20482
20513
  };
20514
+ /** @description The organization requires single sign-on and this is its only verified domain */
20515
+ 409: {
20516
+ headers: {
20517
+ [name: string]: unknown;
20518
+ };
20519
+ content: {
20520
+ /**
20521
+ * @example {
20522
+ * "error": {
20523
+ * "statusCode": 409,
20524
+ * "code": "request.conflict",
20525
+ * "message": "The organization requires single sign-on and this is its only verified domain",
20526
+ * "timestamp": "2026-04-20T12:00:00.000Z",
20527
+ * "path": "/api/v1/organizations/{id}/domains/{domain}",
20528
+ * "method": "DELETE"
20529
+ * }
20530
+ * }
20531
+ */
20532
+ "application/json": components["schemas"]["ErrorResponseDto"];
20533
+ };
20534
+ };
20483
20535
  };
20484
20536
  };
20485
20537
  ApiOrganizationsController_listSsoConnections: {
@@ -20835,7 +20887,7 @@ interface operations {
20835
20887
  "application/json": components["schemas"]["ErrorResponseDto"];
20836
20888
  };
20837
20889
  };
20838
- /** @description The organization set this connection up itself; it stays bound. Disable or delete the connection instead. */
20890
+ /** @description The organization set this connection up itself, so it stays bound: disable or delete the connection instead; or the organization requires single sign-on and this is its only active connection */
20839
20891
  409: {
20840
20892
  headers: {
20841
20893
  [name: string]: unknown;
@@ -20846,7 +20898,7 @@ interface operations {
20846
20898
  * "error": {
20847
20899
  * "statusCode": 409,
20848
20900
  * "code": "request.conflict",
20849
- * "message": "The organization set this connection up itself; it stays bound. Disable or delete the connection instead.",
20901
+ * "message": "The organization set this connection up itself, so it stays bound: disable or delete the connection instead; or the organization requires single sign-on and this is its only active connection",
20850
20902
  * "timestamp": "2026-04-20T12:00:00.000Z",
20851
20903
  * "path": "/api/v1/organizations/{id}/sso-connections/{connectionId}",
20852
20904
  * "method": "DELETE"
@@ -22368,7 +22420,7 @@ interface operations {
22368
22420
  "application/json": components["schemas"]["ErrorResponseDto"];
22369
22421
  };
22370
22422
  };
22371
- /** @description The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console */
22423
+ /** @description The organization has no SSO connection bound to it, its connection is developer-managed and is changed from the Console, or the organization requires single sign-on and this is its only active connection */
22372
22424
  409: {
22373
22425
  headers: {
22374
22426
  [name: string]: unknown;
@@ -22379,7 +22431,7 @@ interface operations {
22379
22431
  * "error": {
22380
22432
  * "statusCode": 409,
22381
22433
  * "code": "request.conflict",
22382
- * "message": "The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console",
22434
+ * "message": "The organization has no SSO connection bound to it, its connection is developer-managed and is changed from the Console, or the organization requires single sign-on and this is its only active connection",
22383
22435
  * "timestamp": "2026-04-20T12:00:00.000Z",
22384
22436
  * "path": "/api/v1/organizations/{id}/sso-connection",
22385
22437
  * "method": "DELETE"
@@ -22774,7 +22826,7 @@ interface operations {
22774
22826
  "application/json": components["schemas"]["ErrorResponseDto"];
22775
22827
  };
22776
22828
  };
22777
- /** @description The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console; or the connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection in `data.current`) */
22829
+ /** @description The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console; the connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection in `data.current`); or the organization requires single sign-on and this is its only active connection (`organization.sso_requirement_needs_connection`): turn the requirement off first */
22778
22830
  409: {
22779
22831
  headers: {
22780
22832
  [name: string]: unknown;
@@ -22785,7 +22837,7 @@ interface operations {
22785
22837
  * "error": {
22786
22838
  * "statusCode": 409,
22787
22839
  * "code": "request.conflict",
22788
- * "message": "The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console; or the connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection in `data.current`)",
22840
+ * "message": "The organization has no SSO connection bound to it, or its connection is developer-managed and is changed from the Console; the connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection in `data.current`); or the organization requires single sign-on and this is its only active connection (`organization.sso_requirement_needs_connection`): turn the requirement off first",
22789
22841
  * "timestamp": "2026-04-20T12:00:00.000Z",
22790
22842
  * "path": "/api/v1/organizations/{id}/sso-connection/disable",
22791
22843
  * "method": "POST"
@@ -28734,7 +28786,7 @@ interface operations {
28734
28786
  "application/json": components["schemas"]["ErrorResponseDto"];
28735
28787
  };
28736
28788
  };
28737
- /** @description The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment */
28789
+ /** @description The bearer token is not an administrator's, an organization administrator's or a platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an administrator without the Account capability that covers it, an organization administrator who no longer holds the organization's key at the places the preview names, or, for a node-scoped check, a node outside this Environment */
28738
28790
  403: {
28739
28791
  headers: {
28740
28792
  [name: string]: unknown;
@@ -28745,7 +28797,7 @@ interface operations {
28745
28797
  * "error": {
28746
28798
  * "statusCode": 403,
28747
28799
  * "code": "auth.forbidden",
28748
- * "message": "The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment",
28800
+ * "message": "The bearer token is not an administrator's, an organization administrator's or a platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an administrator without the Account capability that covers it, an organization administrator who no longer holds the organization's key at the places the preview names, or, for a node-scoped check, a node outside this Environment",
28749
28801
  * "timestamp": "2026-04-20T12:00:00.000Z",
28750
28802
  * "path": "/api/v1/access-previews/{previewId}/people",
28751
28803
  * "method": "GET"
@@ -28864,7 +28916,7 @@ interface operations {
28864
28916
  "application/json": components["schemas"]["ErrorResponseDto"];
28865
28917
  };
28866
28918
  };
28867
- /** @description The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment */
28919
+ /** @description The bearer token is not an administrator's, an organization administrator's or a platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an administrator without the Account capability that covers it, an organization administrator who no longer holds the organization's key at the places the preview names, or, for a node-scoped check, a node outside this Environment */
28868
28920
  403: {
28869
28921
  headers: {
28870
28922
  [name: string]: unknown;
@@ -28875,7 +28927,7 @@ interface operations {
28875
28927
  * "error": {
28876
28928
  * "statusCode": 403,
28877
28929
  * "code": "auth.forbidden",
28878
- * "message": "The bearer token is not an admin or platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an admin without the Account capability that covers it, or, for a node-scoped check, a node outside this Environment",
28930
+ * "message": "The bearer token is not an administrator's, an organization administrator's or a platform token, or the caller lacks the permission this operation checks: a scoped API key without that scope, an administrator without the Account capability that covers it, an organization administrator who no longer holds the organization's key at the places the preview names, or, for a node-scoped check, a node outside this Environment",
28879
28931
  * "timestamp": "2026-04-20T12:00:00.000Z",
28880
28932
  * "path": "/api/v1/access-previews/{previewId}/people",
28881
28933
  * "method": "GET"
@@ -34822,6 +34874,27 @@ interface operations {
34822
34874
  "application/json": components["schemas"]["ErrorResponseDto"];
34823
34875
  };
34824
34876
  };
34877
+ /** @description An organization that requires single sign-on has this as its only active connection (`organization.sso_requirement_needs_connection`): turn the requirement off first */
34878
+ 409: {
34879
+ headers: {
34880
+ [name: string]: unknown;
34881
+ };
34882
+ content: {
34883
+ /**
34884
+ * @example {
34885
+ * "error": {
34886
+ * "statusCode": 409,
34887
+ * "code": "request.conflict",
34888
+ * "message": "An organization that requires single sign-on has this as its only active connection (`organization.sso_requirement_needs_connection`): turn the requirement off first",
34889
+ * "timestamp": "2026-04-20T12:00:00.000Z",
34890
+ * "path": "/api/v1/sso/connections/{id}",
34891
+ * "method": "DELETE"
34892
+ * }
34893
+ * }
34894
+ */
34895
+ "application/json": components["schemas"]["ErrorResponseDto"];
34896
+ };
34897
+ };
34825
34898
  };
34826
34899
  };
34827
34900
  ApiSsoController_update: {
@@ -35201,7 +35274,7 @@ interface operations {
35201
35274
  "application/json": components["schemas"]["ErrorResponseDto"];
35202
35275
  };
35203
35276
  };
35204
- /** @description The connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection as it now stands in `data.current`) */
35277
+ /** @description The connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection as it now stands in `data.current`), or it is the only active connection of an organization that requires single sign-on (`organization.sso_requirement_needs_connection`): turn the requirement off first */
35205
35278
  409: {
35206
35279
  headers: {
35207
35280
  [name: string]: unknown;
@@ -35212,7 +35285,7 @@ interface operations {
35212
35285
  * "error": {
35213
35286
  * "statusCode": 409,
35214
35287
  * "code": "request.conflict",
35215
- * "message": "The connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection as it now stands in `data.current`)",
35288
+ * "message": "The connection changed since the version sent in `If-Match` was read (`version_mismatch`, with the connection as it now stands in `data.current`), or it is the only active connection of an organization that requires single sign-on (`organization.sso_requirement_needs_connection`): turn the requirement off first",
35216
35289
  * "timestamp": "2026-04-20T12:00:00.000Z",
35217
35290
  * "path": "/api/v1/sso/connections/{id}/disable",
35218
35291
  * "method": "POST"
@@ -38029,6 +38102,142 @@ interface operations {
38029
38102
  };
38030
38103
  };
38031
38104
  };
38105
+ ApiScimTokensController_rotate: {
38106
+ parameters: {
38107
+ query?: never;
38108
+ header?: {
38109
+ /** @description The id of the Environment this request acts in. Required with an account API key, which belongs to the Account and names its Environment per request; an Environment key may send it only to name its own Environment. A missing header for an account key answers `400` (`api_key.environment_required`), one naming no Environment of the key's Account `400` (`api_key.environment_not_found`), and one naming another Environment than an Environment key's own `400` (`api_key.environment_mismatch`). */
38110
+ "X-Canopy-Environment"?: string;
38111
+ };
38112
+ path: {
38113
+ id: string;
38114
+ };
38115
+ cookie?: never;
38116
+ };
38117
+ requestBody: {
38118
+ content: {
38119
+ "application/json": components["schemas"]["CreateScimTokenDto"];
38120
+ };
38121
+ };
38122
+ responses: {
38123
+ /** @description Replacement token created — the raw value is shown only once, with the base URL. The token it replaces keeps working for 7 days */
38124
+ 201: {
38125
+ headers: {
38126
+ [name: string]: unknown;
38127
+ };
38128
+ content: {
38129
+ "application/json": {
38130
+ data: components["schemas"]["ScimTokenCreatedResponseDto"];
38131
+ };
38132
+ };
38133
+ };
38134
+ /** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own */
38135
+ 400: {
38136
+ headers: {
38137
+ [name: string]: unknown;
38138
+ };
38139
+ content: {
38140
+ /**
38141
+ * @example {
38142
+ * "error": {
38143
+ * "statusCode": 400,
38144
+ * "code": "request.validation_failed",
38145
+ * "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range; or the request sent both an `X-API-Key` and an `Authorization` header, or its `X-Canopy-Environment` header is missing for an account key, names no Environment of the key's Account, or names another Environment than an Environment key's own",
38146
+ * "timestamp": "2026-04-20T12:00:00.000Z",
38147
+ * "path": "/api/v1/scim-tokens/{id}/rotate",
38148
+ * "method": "POST"
38149
+ * }
38150
+ * }
38151
+ */
38152
+ "application/json": components["schemas"]["ErrorResponseDto"];
38153
+ };
38154
+ };
38155
+ /** @description Invalid or expired token */
38156
+ 401: {
38157
+ headers: {
38158
+ [name: string]: unknown;
38159
+ };
38160
+ content: {
38161
+ /**
38162
+ * @example {
38163
+ * "error": {
38164
+ * "statusCode": 401,
38165
+ * "code": "auth.invalid_token",
38166
+ * "message": "Invalid or expired token",
38167
+ * "timestamp": "2026-04-20T12:00:00.000Z",
38168
+ * "path": "/api/v1/scim-tokens",
38169
+ * "method": "GET"
38170
+ * }
38171
+ * }
38172
+ */
38173
+ "application/json": components["schemas"]["ErrorResponseDto"];
38174
+ };
38175
+ };
38176
+ /** @description The caller lacks the permission this operation checks: an account API key without that `sso` scope, an Environment API key (`sso.*` is an account scope, which no Environment key holds), or an administrator without the Account capability that covers it; or the Account's plan does not include SCIM (`plan_feature_unavailable`) */
38177
+ 403: {
38178
+ headers: {
38179
+ [name: string]: unknown;
38180
+ };
38181
+ content: {
38182
+ /**
38183
+ * @example {
38184
+ * "error": {
38185
+ * "statusCode": 403,
38186
+ * "code": "auth.forbidden",
38187
+ * "message": "The caller lacks the permission this operation checks: an account API key without that `sso` scope, an Environment API key (`sso.*` is an account scope, which no Environment key holds), or an administrator without the Account capability that covers it; or the Account's plan does not include SCIM (`plan_feature_unavailable`)",
38188
+ * "timestamp": "2026-04-20T12:00:00.000Z",
38189
+ * "path": "/api/v1/scim-tokens",
38190
+ * "method": "GET"
38191
+ * }
38192
+ * }
38193
+ */
38194
+ "application/json": components["schemas"]["ErrorResponseDto"];
38195
+ };
38196
+ };
38197
+ /** @description The Environment's directory has no live SCIM token with that id (`scim.token_not_found`) */
38198
+ 404: {
38199
+ headers: {
38200
+ [name: string]: unknown;
38201
+ };
38202
+ content: {
38203
+ /**
38204
+ * @example {
38205
+ * "error": {
38206
+ * "statusCode": 404,
38207
+ * "code": "request.not_found",
38208
+ * "message": "The Environment's directory has no live SCIM token with that id (`scim.token_not_found`)",
38209
+ * "timestamp": "2026-04-20T12:00:00.000Z",
38210
+ * "path": "/api/v1/scim-tokens/{id}/rotate",
38211
+ * "method": "POST"
38212
+ * }
38213
+ * }
38214
+ */
38215
+ "application/json": components["schemas"]["ErrorResponseDto"];
38216
+ };
38217
+ };
38218
+ /** @description The directory already holds 10 live tokens, the most it may (`scim.token_limit`, `data.limit` naming the limit); revoke one first. A rotation counts, since the old token stays live for its overlap */
38219
+ 409: {
38220
+ headers: {
38221
+ [name: string]: unknown;
38222
+ };
38223
+ content: {
38224
+ /**
38225
+ * @example {
38226
+ * "error": {
38227
+ * "statusCode": 409,
38228
+ * "code": "request.conflict",
38229
+ * "message": "The directory already holds 10 live tokens, the most it may (`scim.token_limit`, `data.limit` naming the limit); revoke one first. A rotation counts, since the old token stays live for its overlap",
38230
+ * "timestamp": "2026-04-20T12:00:00.000Z",
38231
+ * "path": "/api/v1/scim-tokens/{id}/rotate",
38232
+ * "method": "POST"
38233
+ * }
38234
+ * }
38235
+ */
38236
+ "application/json": components["schemas"]["ErrorResponseDto"];
38237
+ };
38238
+ };
38239
+ };
38240
+ };
38032
38241
  ApiScimTokensController_revoke: {
38033
38242
  parameters: {
38034
38243
  query?: never;
@@ -44952,7 +45161,8 @@ declare class Identities {
44952
45161
  /**
44953
45162
  * Ends one session and leaves the identity's others signed in. `sessionId`
44954
45163
  * is the session's `id` from `sessions`: its current refresh token, which
44955
- * changes on every refresh, so read it shortly before revoking.
45164
+ * changes on every refresh, so read it shortly before revoking; or, for a
45165
+ * hosted sign-in no application has exchanged a code for yet, its session id.
44956
45166
  */
44957
45167
  revokeSession(id: string, sessionId: string): Promise<void>;
44958
45168
  /**