@canopy-io/node 0.26.1 → 0.27.0
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/CHANGELOG.md +13 -0
- package/README.md +31 -10
- package/dist/index.cjs +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -38
- package/dist/index.d.ts +106 -38
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3048,7 +3048,7 @@ interface paths {
|
|
|
3048
3048
|
};
|
|
3049
3049
|
/**
|
|
3050
3050
|
* List the hosted pages and emails a preview can render
|
|
3051
|
-
* @description Lists every hosted page and every customer email the branding preview can render, in the order to show them: each with its `id`, its `kind` (`page` or `email`), the `group` it sits in, its `title`, and its states. An email has one state, `default`. Returns `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3051
|
+
* @description Lists every hosted page, the embedded sign-in form's email verification code screen (`form-verify`, which no route serves), and every customer email the branding preview can render, in the order to show them: each with its `id`, its `kind` (`page` or `email`), the `group` it sits in, its `title`, and its states. Each state has an `id`, a `label` and `sample`: `false` for `YourPage`, the first state of the sign-in and sign-up pages, which shows the page as the Environment serves it, with the sign-in methods, social providers, self sign-up and CAPTCHA it has on, and single sign-on when a connection is linked to one of its OAuth clients, or to the one `client_id` names, and `true` for every other state, which shows sample data, the same in every Environment. An email has one state, `default`. Returns `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3052
3052
|
*/
|
|
3053
3053
|
get: operations["ApiBrandingController_getPreviewPages"];
|
|
3054
3054
|
put?: never;
|
|
@@ -3088,7 +3088,7 @@ interface paths {
|
|
|
3088
3088
|
};
|
|
3089
3089
|
/**
|
|
3090
3090
|
* List the hosted page and email texts whose wording can be changed
|
|
3091
|
-
* @description Lists the texts on hosted pages and in emails that `text_overrides` can reword: the headings, labels, button labels and helper text of the sign-in, sign-up, account recovery, email verification, invitation, multi-factor challenge and sign-out pages, and the subject, heading, main sentence and button of the verification, password reset, sign-in code, two-step verification code, change confirmation and invitation emails. Each entry has the `key` an override names it by, its `locale`, the `page` or email it shows on, by the preview list's `id`, with its title and a `preview_state` that shows it, a plain `name`, its `kind`, its `default` wording, the `placeholders` an override must keep, and its `max_length`. Wording that tells a person what happened to their account (errors, refusals, expiry notices, warnings, and the security notice emails) is not listed and cannot be changed. Read this list before writing `text_overrides`. Returns `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3091
|
+
* @description Lists the texts on hosted pages and in emails that `text_overrides` can reword: the headings, labels, button labels and helper text of the sign-in, sign-up, account recovery, email verification, invitation, multi-factor challenge and sign-out pages and of the embedded sign-in form's email verification code screen, and the subject, heading, main sentence and button of the verification, password reset, sign-in code, two-step verification code, change confirmation and invitation emails. Each entry has the `key` an override names it by, its `locale`, the `page` or email it shows on, by the preview list's `id`, with its title and a `preview_state` that shows it, a plain `name`, its `kind`, its `default` wording, the `placeholders` an override must keep, and its `max_length`. Wording that tells a person what happened to their account (errors, refusals, expiry notices, warnings, and the security notice emails) is not listed and cannot be changed. Read this list before writing `text_overrides`. Returns `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3092
3092
|
*/
|
|
3093
3093
|
get: operations["ApiBrandingController_getTextKeys"];
|
|
3094
3094
|
put?: never;
|
|
@@ -3110,7 +3110,7 @@ interface paths {
|
|
|
3110
3110
|
put?: never;
|
|
3111
3111
|
/**
|
|
3112
3112
|
* Preview a hosted page or email in a branding
|
|
3113
|
-
* @description Renders one hosted page, in one of its states, or one customer email, in the Environment's branding with the unsaved changes in `branding` laid over it, so a branding change can be checked before it is saved. Nothing is saved, and no session or person is involved
|
|
3113
|
+
* @description Renders one hosted page, in one of its states, or one customer email, in the Environment's branding with the unsaved changes in `branding` laid over it, so a branding change can be checked before it is saved. Nothing is saved, and no session or person is involved. The sign-in and sign-up pages open on `YourPage`, which shows the page as the Environment serves it, with the sign-in methods, social providers, self sign-up and CAPTCHA it has on, and single sign-on when a connection is linked to one of its OAuth clients, or to the one `client_id` names; every other state shows sample data, the same in every Environment. `page` and `state` are ids from the preview list, and `scheme` renders a page in its light or its dark look whatever the color scheme. Returns the whole HTML document, which works without scripts. Returns `400` (`branding.preview_page_unknown`) for a page or state that does not exist, `validation` for a malformed branding value, or `branding.image_not_uploaded` for an image field that holds anything but an uploaded image, and `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization. `language` renders it in one of the languages Canopy writes the pages in, with the wording `text_overrides` holds for that language; left out, English.
|
|
3114
3114
|
*/
|
|
3115
3115
|
post: operations["ApiBrandingController_preview"];
|
|
3116
3116
|
delete?: never;
|
|
@@ -3130,7 +3130,7 @@ interface paths {
|
|
|
3130
3130
|
put?: never;
|
|
3131
3131
|
/**
|
|
3132
3132
|
* Make a link that opens a hosted page in a branding
|
|
3133
|
-
* @description Makes a link that opens one hosted page, in one of its states, in the Environment's branding with the unsaved changes in `branding` laid over it, so a person can see a look in their own browser before it is saved. Takes what the preview takes; `page` must be a hosted page, not an email. Nothing is saved
|
|
3133
|
+
* @description Makes a link that opens one hosted page, in one of its states, in the Environment's branding with the unsaved changes in `branding` laid over it, so a person can see a look in their own browser before it is saved. Takes what the preview takes; `page` must be a hosted page, not an email. Nothing is saved. The sign-in and sign-up pages open on `YourPage`, which shows the page as the Environment serves it, with the sign-in methods, social providers, self sign-up and CAPTCHA it has on, and single sign-on when a connection is linked to one of its OAuth clients, or to the one `client_id` names; every other state shows sample data, the same in every Environment. The link opens for two minutes, on the API's own origin; open it in a browser rather than reading it, and make a new one once it has expired. The page runs with `sandbox allow-scripts` and `form-action 'none'`, so its forms submit nowhere and a page template's scripts reach no cookie or storage. Returns `400` (`branding.preview_link_page_unknown`) for a page or state that is not a hosted page's, `validation` for a malformed branding value, or `branding.image_not_uploaded` for an image field that holds anything but an uploaded image, and `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization.
|
|
3134
3134
|
*/
|
|
3135
3135
|
post: operations["ApiBrandingController_previewLink"];
|
|
3136
3136
|
delete?: never;
|
|
@@ -3346,7 +3346,7 @@ interface paths {
|
|
|
3346
3346
|
head?: never;
|
|
3347
3347
|
/**
|
|
3348
3348
|
* Change an Environment's sign-in settings
|
|
3349
|
-
* @description Updates the sign-in settings of the request's Environment, applying any supplied fields (`mfa`, `allow_self_signup`, `self_signup_require_captcha`, `login_require_captcha`, `password_login_enabled`, `email_otp_login_enabled`, `passkey_login_enabled`, `languages`, `default_language`, `self_signup_daily_cap`, `access_token_ttl_seconds`, `refresh_token_ttl_days`, `public_refresh_token_ttl_days`, `allowed_web_origins`, `sso_return_urls`, `auth_links_base_url`); omitted fields are left unchanged, `allowed_web_origins` are normalized and de-duplicated on save, and `auth_links_base_url` is canonicalized to a bare origin (send `null` to clear it). While `auth_links_base_url` is set, verification, password-reset and invitation emails link to that origin at `/verify-email`, `/reset-password` and `/accept-invite` instead of Canopy's hosted pages. Send the Environment's `version` (returned by the GET) in `If-Match` to refuse a stale save: a mismatch answers `409 version_mismatch`, and without the header the check is skipped. Emits an `environment.auth_settings_updated` audit event naming the settings whose value changed.
|
|
3349
|
+
* @description Updates the sign-in settings of the request's Environment, applying any supplied fields (`mfa`, `allow_self_signup`, `self_signup_require_captcha`, `login_require_captcha`, `password_login_enabled`, `email_otp_login_enabled`, `passkey_login_enabled`, `languages`, `default_language`, `self_signup_daily_cap`, `access_token_ttl_seconds`, `refresh_token_ttl_days`, `public_refresh_token_ttl_days`, `direct_api_permissions_claim_enabled`, `allowed_web_origins`, `sso_return_urls`, `auth_links_base_url`); omitted fields are left unchanged, `allowed_web_origins` are normalized and de-duplicated on save, and `auth_links_base_url` is canonicalized to a bare origin (send `null` to clear it). While `auth_links_base_url` is set, verification, password-reset and invitation emails link to that origin at `/verify-email`, `/reset-password` and `/accept-invite` instead of Canopy's hosted pages. Send the Environment's `version` (returned by the GET) in `If-Match` to refuse a stale save: a mismatch answers `409 version_mismatch`, and without the header the check is skipped. Emits an `environment.auth_settings_updated` audit event naming the settings whose value changed.
|
|
3350
3350
|
*/
|
|
3351
3351
|
patch: operations["ApiAuthSettingsController_update"];
|
|
3352
3352
|
trace?: never;
|
|
@@ -3716,7 +3716,7 @@ interface paths {
|
|
|
3716
3716
|
};
|
|
3717
3717
|
/**
|
|
3718
3718
|
* List Environments reachable by SSO
|
|
3719
|
-
* @description Returns
|
|
3719
|
+
* @description Returns every Environment with a usable end-user SSO sign-in path: one owning an active OAuth client linked to an `active`, `end_user` SSO connection in the Account (the hosted sign-in), or one bound to such a connection itself (a sign-in by publishable key). Active-but-unlinked connections and inactive clients make nothing reachable. Each item carries `environment_id` and `apps_without_sso`, the Environment's active web clients (`id`, `client_id`, `name`, oldest first) with no active end-user connection linked: the hosted sign-in offers SSO only through the client's own links, so with password, emailed code, passkey and social sign-in all off nobody can sign in through those apps. Machine clients are never listed. Drives the dashboard "no usable sign-in method" warning. The response is an unpaginated `{ items }` array.
|
|
3720
3720
|
*/
|
|
3721
3721
|
get: operations["ApiSsoController_signInCoverage"];
|
|
3722
3722
|
put?: never;
|
|
@@ -4444,21 +4444,21 @@ interface paths {
|
|
|
4444
4444
|
};
|
|
4445
4445
|
/**
|
|
4446
4446
|
* Get OAuth client details
|
|
4447
|
-
* @description Returns a single OAuth client
|
|
4447
|
+
* @description Returns a single OAuth client of the current Environment. `id` in the path is the client's `client_id`, not the `id` field of a client response, which answers `404` here. A client that exists in a sibling Environment reads as `404` too. The `client_secret` is never included.
|
|
4448
4448
|
*/
|
|
4449
4449
|
get: operations["ApiOAuthClientsController_get"];
|
|
4450
4450
|
put?: never;
|
|
4451
4451
|
post?: never;
|
|
4452
4452
|
/**
|
|
4453
4453
|
* Delete OAuth client
|
|
4454
|
-
* @description Deletes an OAuth client from the current Environment
|
|
4454
|
+
* @description Deletes an OAuth client from the current Environment. `id` in the path is the client's `client_id`, not the `id` field of a client response, which answers `404` here. Responds `204 No Content` on success, or `404` when the client is not found in this Environment.
|
|
4455
4455
|
*/
|
|
4456
4456
|
delete: operations["ApiOAuthClientsController_remove"];
|
|
4457
4457
|
options?: never;
|
|
4458
4458
|
head?: never;
|
|
4459
4459
|
/**
|
|
4460
4460
|
* Update OAuth client
|
|
4461
|
-
* @description Updates an OAuth client's mutable fields (`name`, `redirect_uris`, `post_logout_redirect_uris`, `backchannel_logout_uri`, `scopes`, `is_active`, `invite_redirect_url`, `initiate_login_uri`, and for a web client `branding`, the settings it carries over its Environment's branding; for a machine client `allowed_audiences` and `token_exchange`, which adds or removes the token-exchange grant in its `grant_types`), scoped to the current Environment. A `scopes` value outside `openid`, `profile`, `email`, `org` and `permissions` is refused with `400` (`oauth.client_scope_unknown`). Returns the updated client, or `404` when the client is not found in this Environment. Send `If-Match` with the client's `version` to refuse a stale write (`409 version_mismatch`). Setting a `branding` value answers `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization, `400` (`oauth.machine_client_branding_invalid`) on a machine client, and `400` (`oauth.client_page_template_invalid`) for `page_template` or `page_template_sources`, which belong to the Environment; returning one to the Environment's with `null` is always allowed. The secret is not rotated here.
|
|
4461
|
+
* @description Updates an OAuth client's mutable fields (`name`, `redirect_uris`, `post_logout_redirect_uris`, `backchannel_logout_uri`, `scopes`, `is_active`, `invite_redirect_url`, `initiate_login_uri`, and for a web client `branding`, the settings it carries over its Environment's branding; for a machine client `allowed_audiences` and `token_exchange`, which adds or removes the token-exchange grant in its `grant_types`), scoped to the current Environment. `id` in the path is the client's `client_id`, not the `id` field of a client response, which answers `404` here. A `scopes` value outside `openid`, `profile`, `email`, `org` and `permissions` is refused with `400` (`oauth.client_scope_unknown`). Returns the updated client, or `404` when the client is not found in this Environment. Send `If-Match` with the client's `version` to refuse a stale write (`409 version_mismatch`). Setting a `branding` value answers `403` (`plan_feature_unavailable`) when the Account's plan does not include hosted page customization, `400` (`oauth.machine_client_branding_invalid`) on a machine client, and `400` (`oauth.client_page_template_invalid`) for `page_template` or `page_template_sources`, which belong to the Environment; returning one to the Environment's with `null` is always allowed. The secret is not rotated here.
|
|
4462
4462
|
*/
|
|
4463
4463
|
patch: operations["ApiOAuthClientsController_update"];
|
|
4464
4464
|
trace?: never;
|
|
@@ -4474,7 +4474,7 @@ interface paths {
|
|
|
4474
4474
|
put?: never;
|
|
4475
4475
|
/**
|
|
4476
4476
|
* Rotate an OAuth client's secret
|
|
4477
|
-
* @description Rotates the OAuth client's `client_secret`, generating and hashing a new secret. The replaced secret keeps working for 24 hours (`previous_secret_expires_at` says until when) so the systems using it can move over; send `expire_previous: "now"` to stop it at once, for a secret that has leaked. Rotating again inside the overlap replaces the secret still in its overlap. The new raw secret is returned in this response only and cannot be retrieved again. Returns `404` when the client is not found in the current Environment, and `409` (`oauth.client_public_has_no_secret`) for a public client, which has no secret.
|
|
4477
|
+
* @description Rotates the OAuth client's `client_secret`, generating and hashing a new secret. `id` in the path is the client's `client_id`, not the `id` field of a client response, which answers `404` here. The replaced secret keeps working for 24 hours (`previous_secret_expires_at` says until when) so the systems using it can move over; send `expire_previous: "now"` to stop it at once, for a secret that has leaked. Rotating again inside the overlap replaces the secret still in its overlap. The new raw secret is returned in this response only and cannot be retrieved again. Returns `404` when the client is not found in the current Environment, and `409` (`oauth.client_public_has_no_secret`) for a public client, which has no secret.
|
|
4478
4478
|
*/
|
|
4479
4479
|
post: operations["ApiOAuthClientsController_rotateSecret"];
|
|
4480
4480
|
delete?: never;
|
|
@@ -6528,6 +6528,8 @@ interface components {
|
|
|
6528
6528
|
* @enum {string}
|
|
6529
6529
|
*/
|
|
6530
6530
|
grantable_roles_source: "organization" | "environment" | "none";
|
|
6531
|
+
/** @description Whether the Environment sets a list of its own, which the organization falls back to when its own list is removed. When false, removing the list leaves no role people arrive with, which a connected directory refuses. */
|
|
6532
|
+
environment_grantable_roles_set: boolean;
|
|
6531
6533
|
};
|
|
6532
6534
|
ScimTokenResponseDto: {
|
|
6533
6535
|
id: string;
|
|
@@ -7283,6 +7285,10 @@ interface components {
|
|
|
7283
7285
|
logo_dark_url: string | null;
|
|
7284
7286
|
/** @enum {string|null} */
|
|
7285
7287
|
logo_kind: "full" | "icon" | null;
|
|
7288
|
+
/** @enum {string|null} */
|
|
7289
|
+
hosted_product_name: "show" | "hide" | null;
|
|
7290
|
+
/** @enum {string|null} */
|
|
7291
|
+
hosted_logo: "show" | "hide" | null;
|
|
7286
7292
|
favicon_url: string | null;
|
|
7287
7293
|
/** @enum {string|null} */
|
|
7288
7294
|
color_scheme: "light" | "dark" | "system" | null;
|
|
@@ -7358,6 +7364,16 @@ interface components {
|
|
|
7358
7364
|
* @enum {string}
|
|
7359
7365
|
*/
|
|
7360
7366
|
logo_kind: "full" | "icon";
|
|
7367
|
+
/**
|
|
7368
|
+
* @description Whether the hosted pages show the product name above the heading: `show` or `hide`. Hidden there, the name still shows in the browser tab, the organization admin portal and the emails.
|
|
7369
|
+
* @enum {string}
|
|
7370
|
+
*/
|
|
7371
|
+
hosted_product_name: "show" | "hide";
|
|
7372
|
+
/**
|
|
7373
|
+
* @description Whether the hosted pages show the logo above the heading: `show` or `hide`. Hidden there, the logo still shows in the organization admin portal and the emails.
|
|
7374
|
+
* @enum {string}
|
|
7375
|
+
*/
|
|
7376
|
+
hosted_logo: "show" | "hide";
|
|
7361
7377
|
favicon_url: string | null;
|
|
7362
7378
|
/**
|
|
7363
7379
|
* @description Which look hosted pages wear: `light`, `dark`, or `system` for whichever the visitor's device asks for. `light` when unset, and on a plan without hosted page customization.
|
|
@@ -7502,6 +7518,16 @@ interface components {
|
|
|
7502
7518
|
* @enum {string|null}
|
|
7503
7519
|
*/
|
|
7504
7520
|
logo_kind?: "full" | "icon" | null;
|
|
7521
|
+
/**
|
|
7522
|
+
* @description Whether hosted pages show the product name above the heading. `hide` leaves it off the pages and keeps it set: the browser tab, the organization admin portal and the emails still show it. Null returns to `show`.
|
|
7523
|
+
* @enum {string|null}
|
|
7524
|
+
*/
|
|
7525
|
+
hosted_product_name?: "show" | "hide" | null;
|
|
7526
|
+
/**
|
|
7527
|
+
* @description Whether hosted pages show the logo above the heading. `hide` leaves it off the pages and keeps it set: the organization admin portal and the emails still show it. Null returns to `show`.
|
|
7528
|
+
* @enum {string|null}
|
|
7529
|
+
*/
|
|
7530
|
+
hosted_logo?: "show" | "hide" | null;
|
|
7505
7531
|
/**
|
|
7506
7532
|
* @description The browser-tab icon on hosted pages. The address `POST /api/v1/branding/images` answered for an image with `slot` `favicon`; any other value is refused. Null clears it.
|
|
7507
7533
|
* @example https://auth.canopy-io.com/branding-images/3f9a1c0e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f-64x64.png
|
|
@@ -7738,6 +7764,11 @@ interface components {
|
|
|
7738
7764
|
id: string;
|
|
7739
7765
|
/** @example Wrong password */
|
|
7740
7766
|
label: string;
|
|
7767
|
+
/**
|
|
7768
|
+
* @description `false` for `YourPage`, the state of the sign-in and sign-up pages that is drawn from the Environment's own sign-in settings: the methods, social providers, self sign-up and CAPTCHA it has on, and single sign-on when a connection is linked to one of its OAuth clients. `true` for every other state, which is drawn from sample data and shows the same thing in every Environment.
|
|
7769
|
+
* @example true
|
|
7770
|
+
*/
|
|
7771
|
+
sample: boolean;
|
|
7741
7772
|
};
|
|
7742
7773
|
BrandingPreviewPageDto: {
|
|
7743
7774
|
/** @example login */
|
|
@@ -7845,7 +7876,7 @@ interface components {
|
|
|
7845
7876
|
*/
|
|
7846
7877
|
page: string;
|
|
7847
7878
|
/**
|
|
7848
|
-
* @description One of that page's states, by the `id` the preview list returns. An email has a single state, `default`.
|
|
7879
|
+
* @description One of that page's states, by the `id` the preview list returns. `YourPage`, on the sign-in and sign-up pages, shows the page as the Environment serves it; every other state shows sample data. An email has a single state, `default`.
|
|
7849
7880
|
* @example WrongPassword
|
|
7850
7881
|
*/
|
|
7851
7882
|
state: string;
|
|
@@ -7862,6 +7893,8 @@ interface components {
|
|
|
7862
7893
|
* @enum {string}
|
|
7863
7894
|
*/
|
|
7864
7895
|
language?: "en" | "es" | "fr" | "de" | "pt-br" | "it" | "nl" | "ja" | "ko" | "zh-hans" | "ar" | "he";
|
|
7896
|
+
/** @description The app (OAuth client) to draw the state `YourPage` for, by its `client_id`. Hosted sign-in offers single sign-on per app, so with it the page offers single sign-on only when a connection is linked to that app; left out, when one is linked to any app of the Environment. A `client_id` that is not an active app of the Environment offers none. Every other state ignores it. */
|
|
7897
|
+
client_id?: string;
|
|
7865
7898
|
};
|
|
7866
7899
|
BrandingPreviewLinkResponseDto: {
|
|
7867
7900
|
/**
|
|
@@ -8061,6 +8094,8 @@ interface components {
|
|
|
8061
8094
|
refresh_token_ttl_days?: number;
|
|
8062
8095
|
/** @description Lifetime in days of a public client's session (a single-page or mobile app with no client secret), counted from sign-in and never extended by a refresh: when it ends the person signs in again. Defaults to 30. Confidential clients keep `refresh_token_ttl_days`, which slides forward on each refresh. Persisted under `env.settings.public_refresh_token_ttl_days`; applies to sessions signed in after the change. */
|
|
8063
8096
|
public_refresh_token_ttl_days?: number;
|
|
8097
|
+
/** @description Put what the person holds on every Direct API access token this Environment issues, at sign-in and on each refresh: `permissions` (the Environment-wide keys) and, for a session in an organization, `org_permissions` (the keys held at it), each capped at 200 with `permissions_overflow` or `org_permissions_overflow` set past the cap, as on a Hosted Login token minted with the `permissions` scope. Off by default; persisted under `env.settings.direct_api_permissions_claim_enabled`. Each sign-in and refresh then resolves them afresh; applies to tokens minted after the change. */
|
|
8098
|
+
direct_api_permissions_claim_enabled?: boolean;
|
|
8064
8099
|
/** @description Lifetime in seconds of the access tokens a machine client obtains with `client_credentials`. Defaults to 300 (5 minutes). A machine token has no refresh, so this is how long a client keeps acting after its secret is rotated or it is disabled. Persisted under `env.settings.m2m_access_token_ttl_seconds`; applies to tokens minted after the change. */
|
|
8065
8100
|
m2m_access_token_ttl_seconds?: number;
|
|
8066
8101
|
/** @description Create an organization for every self-signup through `POST /v1/identity/auth/register` and add the new identity as its first member. Off by default; persisted under `env.settings.organizations_create_on_signup`. The organization starts with roles copied from the Environment's organization role templates, and the new identity holds its copy of the default admin template. Requires the organizations container and a default admin template; refused with `400 role_template.default_admin_missing` while there is none. */
|
|
@@ -8164,6 +8199,8 @@ interface components {
|
|
|
8164
8199
|
refresh_token_ttl_days?: number;
|
|
8165
8200
|
/** @description Lifetime in days of a public client's session, fixed from sign-in. Absent when unset (the default is 30). */
|
|
8166
8201
|
public_refresh_token_ttl_days?: number;
|
|
8202
|
+
/** @description Whether the Direct API access tokens this Environment issues carry `permissions` and, in an organization, `org_permissions`. */
|
|
8203
|
+
direct_api_permissions_claim_enabled: boolean;
|
|
8167
8204
|
/** @description Lifetime in seconds of a machine client's `client_credentials` token. Absent when unset (the default is 300). */
|
|
8168
8205
|
m2m_access_token_ttl_seconds?: number;
|
|
8169
8206
|
/** @description The audience a machine client's token names when its request names none. Absent when unset. */
|
|
@@ -8258,6 +8295,8 @@ interface components {
|
|
|
8258
8295
|
refresh_token_ttl_days?: number;
|
|
8259
8296
|
/** @description Lifetime in days of a public client's session (a single-page or mobile app with no client secret), counted from sign-in and never extended by a refresh: when it ends the person signs in again. Defaults to 30. Confidential clients keep `refresh_token_ttl_days`, which slides forward on each refresh. Persisted under `env.settings.public_refresh_token_ttl_days`; applies to sessions signed in after the change. */
|
|
8260
8297
|
public_refresh_token_ttl_days?: number;
|
|
8298
|
+
/** @description Put what the person holds on every Direct API access token this Environment issues, at sign-in and on each refresh: `permissions` (the Environment-wide keys) and, for a session in an organization, `org_permissions` (the keys held at it), each capped at 200 with `permissions_overflow` or `org_permissions_overflow` set past the cap, as on a Hosted Login token minted with the `permissions` scope. Off by default; persisted under `env.settings.direct_api_permissions_claim_enabled`. Each sign-in and refresh then resolves them afresh; applies to tokens minted after the change. */
|
|
8299
|
+
direct_api_permissions_claim_enabled?: boolean;
|
|
8261
8300
|
/** @description Lifetime in seconds of the access tokens a machine client obtains with `client_credentials`. Defaults to 300 (5 minutes). A machine token has no refresh, so this is how long a client keeps acting after its secret is rotated or it is disabled. Persisted under `env.settings.m2m_access_token_ttl_seconds`; applies to tokens minted after the change. */
|
|
8262
8301
|
m2m_access_token_ttl_seconds?: number;
|
|
8263
8302
|
/**
|
|
@@ -8553,6 +8592,19 @@ interface components {
|
|
|
8553
8592
|
/** @description Role assigned to a JIT'd identity at the resolved node. */
|
|
8554
8593
|
default_role_id?: string | null;
|
|
8555
8594
|
};
|
|
8595
|
+
SsoSignInCoverageAppResponseDto: {
|
|
8596
|
+
/** @description The OAuth client's row id. */
|
|
8597
|
+
id: string;
|
|
8598
|
+
/** @description The OAuth client's public `client_id`. */
|
|
8599
|
+
client_id: string;
|
|
8600
|
+
/** @description The OAuth client's name. */
|
|
8601
|
+
name: string;
|
|
8602
|
+
};
|
|
8603
|
+
SsoSignInCoverageResponseDto: {
|
|
8604
|
+
environment_id: string;
|
|
8605
|
+
/** @description The Environment's active web clients with no active end-user SSO connection linked to them, oldest first. Their hosted sign-in offers no SSO, so with every other sign-in method off nobody can sign in through them. Machine clients are never listed. */
|
|
8606
|
+
apps_without_sso: components["schemas"]["SsoSignInCoverageAppResponseDto"][];
|
|
8607
|
+
};
|
|
8556
8608
|
EnvironmentSsoLinkResponseDto: {
|
|
8557
8609
|
environment_id: string;
|
|
8558
8610
|
sso_connection_id: string;
|
|
@@ -8903,7 +8955,9 @@ interface components {
|
|
|
8903
8955
|
expire_previous?: "now" | "window";
|
|
8904
8956
|
};
|
|
8905
8957
|
OAuthClientCreatedResponseDto: {
|
|
8958
|
+
/** @description The client record's id. No route takes it in its path: the single-client routes take `client_id`. */
|
|
8906
8959
|
id: string;
|
|
8960
|
+
/** @description The client's public identifier: the `client_id` of the OAuth flows, and the value the single-client routes (`/oauth-clients/{id}`) take in their path. */
|
|
8907
8961
|
client_id: string;
|
|
8908
8962
|
name: string;
|
|
8909
8963
|
/**
|
|
@@ -9011,7 +9065,9 @@ interface components {
|
|
|
9011
9065
|
initiate_login_uri?: string;
|
|
9012
9066
|
};
|
|
9013
9067
|
OAuthClientResponseDto: {
|
|
9068
|
+
/** @description The client record's id. No route takes it in its path: the single-client routes take `client_id`. */
|
|
9014
9069
|
id: string;
|
|
9070
|
+
/** @description The client's public identifier: the `client_id` of the OAuth flows, and the value the single-client routes (`/oauth-clients/{id}`) take in their path. */
|
|
9015
9071
|
client_id: string;
|
|
9016
9072
|
name: string;
|
|
9017
9073
|
/**
|
|
@@ -38433,14 +38489,14 @@ interface operations {
|
|
|
38433
38489
|
};
|
|
38434
38490
|
requestBody?: never;
|
|
38435
38491
|
responses: {
|
|
38436
|
-
/** @description
|
|
38492
|
+
/** @description Every Environment people can sign in to through SSO (one with an active OAuth client linked to an active end-user SSO connection, or one bound to such a connection itself), each with `apps_without_sso`: its active web clients with no active end-user connection linked, whose hosted sign-in offers no SSO. Lets the dashboard tell, per Environment and per app, whether SSO is a usable sign-in method when every other method is off. */
|
|
38437
38493
|
200: {
|
|
38438
38494
|
headers: {
|
|
38439
38495
|
[name: string]: unknown;
|
|
38440
38496
|
};
|
|
38441
38497
|
content: {
|
|
38442
38498
|
"application/json": {
|
|
38443
|
-
items:
|
|
38499
|
+
items: components["schemas"]["SsoSignInCoverageResponseDto"][];
|
|
38444
38500
|
};
|
|
38445
38501
|
};
|
|
38446
38502
|
};
|
|
@@ -44216,6 +44272,7 @@ interface operations {
|
|
|
44216
44272
|
"X-Canopy-Environment"?: string;
|
|
44217
44273
|
};
|
|
44218
44274
|
path: {
|
|
44275
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44219
44276
|
id: string;
|
|
44220
44277
|
};
|
|
44221
44278
|
cookie?: never;
|
|
@@ -44296,7 +44353,7 @@ interface operations {
|
|
|
44296
44353
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44297
44354
|
};
|
|
44298
44355
|
};
|
|
44299
|
-
/** @description No OAuth client with that
|
|
44356
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
44300
44357
|
404: {
|
|
44301
44358
|
headers: {
|
|
44302
44359
|
[name: string]: unknown;
|
|
@@ -44307,7 +44364,7 @@ interface operations {
|
|
|
44307
44364
|
* "error": {
|
|
44308
44365
|
* "statusCode": 404,
|
|
44309
44366
|
* "code": "request.not_found",
|
|
44310
|
-
* "message": "No OAuth client with that
|
|
44367
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
44311
44368
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44312
44369
|
* "path": "/api/v1/oauth-clients/{id}",
|
|
44313
44370
|
* "method": "GET"
|
|
@@ -44327,6 +44384,7 @@ interface operations {
|
|
|
44327
44384
|
"X-Canopy-Environment"?: string;
|
|
44328
44385
|
};
|
|
44329
44386
|
path: {
|
|
44387
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44330
44388
|
id: string;
|
|
44331
44389
|
};
|
|
44332
44390
|
cookie?: never;
|
|
@@ -44403,7 +44461,7 @@ interface operations {
|
|
|
44403
44461
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44404
44462
|
};
|
|
44405
44463
|
};
|
|
44406
|
-
/** @description No OAuth client with that
|
|
44464
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
44407
44465
|
404: {
|
|
44408
44466
|
headers: {
|
|
44409
44467
|
[name: string]: unknown;
|
|
@@ -44414,7 +44472,7 @@ interface operations {
|
|
|
44414
44472
|
* "error": {
|
|
44415
44473
|
* "statusCode": 404,
|
|
44416
44474
|
* "code": "request.not_found",
|
|
44417
|
-
* "message": "No OAuth client with that
|
|
44475
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
44418
44476
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44419
44477
|
* "path": "/api/v1/oauth-clients/{id}",
|
|
44420
44478
|
* "method": "DELETE"
|
|
@@ -44436,6 +44494,7 @@ interface operations {
|
|
|
44436
44494
|
"X-Canopy-Environment"?: string;
|
|
44437
44495
|
};
|
|
44438
44496
|
path: {
|
|
44497
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44439
44498
|
id: string;
|
|
44440
44499
|
};
|
|
44441
44500
|
cookie?: never;
|
|
@@ -44520,7 +44579,7 @@ interface operations {
|
|
|
44520
44579
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44521
44580
|
};
|
|
44522
44581
|
};
|
|
44523
|
-
/** @description No OAuth client with that
|
|
44582
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
44524
44583
|
404: {
|
|
44525
44584
|
headers: {
|
|
44526
44585
|
[name: string]: unknown;
|
|
@@ -44531,7 +44590,7 @@ interface operations {
|
|
|
44531
44590
|
* "error": {
|
|
44532
44591
|
* "statusCode": 404,
|
|
44533
44592
|
* "code": "request.not_found",
|
|
44534
|
-
* "message": "No OAuth client with that
|
|
44593
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
44535
44594
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44536
44595
|
* "path": "/api/v1/oauth-clients/{id}",
|
|
44537
44596
|
* "method": "PATCH"
|
|
@@ -44577,6 +44636,7 @@ interface operations {
|
|
|
44577
44636
|
"X-Canopy-Environment"?: string;
|
|
44578
44637
|
};
|
|
44579
44638
|
path: {
|
|
44639
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44580
44640
|
id: string;
|
|
44581
44641
|
};
|
|
44582
44642
|
cookie?: never;
|
|
@@ -44661,7 +44721,7 @@ interface operations {
|
|
|
44661
44721
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44662
44722
|
};
|
|
44663
44723
|
};
|
|
44664
|
-
/** @description No OAuth client with that
|
|
44724
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
44665
44725
|
404: {
|
|
44666
44726
|
headers: {
|
|
44667
44727
|
[name: string]: unknown;
|
|
@@ -44672,7 +44732,7 @@ interface operations {
|
|
|
44672
44732
|
* "error": {
|
|
44673
44733
|
* "statusCode": 404,
|
|
44674
44734
|
* "code": "request.not_found",
|
|
44675
|
-
* "message": "No OAuth client with that
|
|
44735
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
44676
44736
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44677
44737
|
* "path": "/api/v1/oauth-clients/{id}/rotate-secret",
|
|
44678
44738
|
* "method": "POST"
|
|
@@ -44766,6 +44826,7 @@ interface operations {
|
|
|
44766
44826
|
"X-Canopy-Environment"?: string;
|
|
44767
44827
|
};
|
|
44768
44828
|
path: {
|
|
44829
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44769
44830
|
id: string;
|
|
44770
44831
|
};
|
|
44771
44832
|
cookie?: never;
|
|
@@ -44847,7 +44908,7 @@ interface operations {
|
|
|
44847
44908
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44848
44909
|
};
|
|
44849
44910
|
};
|
|
44850
|
-
/** @description No OAuth client with that
|
|
44911
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
44851
44912
|
404: {
|
|
44852
44913
|
headers: {
|
|
44853
44914
|
[name: string]: unknown;
|
|
@@ -44858,7 +44919,7 @@ interface operations {
|
|
|
44858
44919
|
* "error": {
|
|
44859
44920
|
* "statusCode": 404,
|
|
44860
44921
|
* "code": "request.not_found",
|
|
44861
|
-
* "message": "No OAuth client with that
|
|
44922
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
44862
44923
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44863
44924
|
* "path": "/api/v1/oauth-clients/{id}/assignments",
|
|
44864
44925
|
* "method": "GET"
|
|
@@ -44883,6 +44944,7 @@ interface operations {
|
|
|
44883
44944
|
"X-Canopy-Environment"?: string;
|
|
44884
44945
|
};
|
|
44885
44946
|
path: {
|
|
44947
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
44886
44948
|
id: string;
|
|
44887
44949
|
};
|
|
44888
44950
|
cookie?: never;
|
|
@@ -44967,7 +45029,7 @@ interface operations {
|
|
|
44967
45029
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
44968
45030
|
};
|
|
44969
45031
|
};
|
|
44970
|
-
/** @description No OAuth client with that
|
|
45032
|
+
/** @description No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds */
|
|
44971
45033
|
404: {
|
|
44972
45034
|
headers: {
|
|
44973
45035
|
[name: string]: unknown;
|
|
@@ -44978,7 +45040,7 @@ interface operations {
|
|
|
44978
45040
|
* "error": {
|
|
44979
45041
|
* "statusCode": 404,
|
|
44980
45042
|
* "code": "request.not_found",
|
|
44981
|
-
* "message": "No OAuth client with that
|
|
45043
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds",
|
|
44982
45044
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
44983
45045
|
* "path": "/api/v1/oauth-clients/{id}/assignments",
|
|
44984
45046
|
* "method": "POST"
|
|
@@ -45061,6 +45123,7 @@ interface operations {
|
|
|
45061
45123
|
"X-Canopy-Environment"?: string;
|
|
45062
45124
|
};
|
|
45063
45125
|
path: {
|
|
45126
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
45064
45127
|
id: string;
|
|
45065
45128
|
assignmentId: string;
|
|
45066
45129
|
};
|
|
@@ -45138,7 +45201,7 @@ interface operations {
|
|
|
45138
45201
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
45139
45202
|
};
|
|
45140
45203
|
};
|
|
45141
|
-
/** @description No OAuth client with that
|
|
45204
|
+
/** @description No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds */
|
|
45142
45205
|
404: {
|
|
45143
45206
|
headers: {
|
|
45144
45207
|
[name: string]: unknown;
|
|
@@ -45149,7 +45212,7 @@ interface operations {
|
|
|
45149
45212
|
* "error": {
|
|
45150
45213
|
* "statusCode": 404,
|
|
45151
45214
|
* "code": "request.not_found",
|
|
45152
|
-
* "message": "No OAuth client with that
|
|
45215
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds",
|
|
45153
45216
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
45154
45217
|
* "path": "/api/v1/oauth-clients/{id}/assignments/{assignmentId}",
|
|
45155
45218
|
* "method": "DELETE"
|
|
@@ -45192,6 +45255,7 @@ interface operations {
|
|
|
45192
45255
|
"X-Canopy-Environment"?: string;
|
|
45193
45256
|
};
|
|
45194
45257
|
path: {
|
|
45258
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
45195
45259
|
id: string;
|
|
45196
45260
|
assignmentId: string;
|
|
45197
45261
|
};
|
|
@@ -45277,7 +45341,7 @@ interface operations {
|
|
|
45277
45341
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
45278
45342
|
};
|
|
45279
45343
|
};
|
|
45280
|
-
/** @description No OAuth client with that
|
|
45344
|
+
/** @description No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds */
|
|
45281
45345
|
404: {
|
|
45282
45346
|
headers: {
|
|
45283
45347
|
[name: string]: unknown;
|
|
@@ -45288,7 +45352,7 @@ interface operations {
|
|
|
45288
45352
|
* "error": {
|
|
45289
45353
|
* "statusCode": 404,
|
|
45290
45354
|
* "code": "request.not_found",
|
|
45291
|
-
* "message": "No OAuth client with that
|
|
45355
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment, the node or role does not exist in it, or the assignment is not one this client holds",
|
|
45292
45356
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
45293
45357
|
* "path": "/api/v1/oauth-clients/{id}/assignments/{assignmentId}",
|
|
45294
45358
|
* "method": "PATCH"
|
|
@@ -45338,6 +45402,7 @@ interface operations {
|
|
|
45338
45402
|
"X-Canopy-Environment"?: string;
|
|
45339
45403
|
};
|
|
45340
45404
|
path: {
|
|
45405
|
+
/** @description The OAuth client's `client_id`. The `id` field of a client response is a different value and answers `404` here. */
|
|
45341
45406
|
id: string;
|
|
45342
45407
|
};
|
|
45343
45408
|
cookie?: never;
|
|
@@ -45430,7 +45495,7 @@ interface operations {
|
|
|
45430
45495
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
45431
45496
|
};
|
|
45432
45497
|
};
|
|
45433
|
-
/** @description No OAuth client with that
|
|
45498
|
+
/** @description No OAuth client with that `client_id` exists in this Environment */
|
|
45434
45499
|
404: {
|
|
45435
45500
|
headers: {
|
|
45436
45501
|
[name: string]: unknown;
|
|
@@ -45441,7 +45506,7 @@ interface operations {
|
|
|
45441
45506
|
* "error": {
|
|
45442
45507
|
* "statusCode": 404,
|
|
45443
45508
|
* "code": "request.not_found",
|
|
45444
|
-
* "message": "No OAuth client with that
|
|
45509
|
+
* "message": "No OAuth client with that `client_id` exists in this Environment",
|
|
45445
45510
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
45446
45511
|
* "path": "/api/v1/oauth-clients/{id}/grants",
|
|
45447
45512
|
* "method": "GET"
|
|
@@ -49346,14 +49411,17 @@ interface TokenVerifierOptions {
|
|
|
49346
49411
|
*/
|
|
49347
49412
|
issuer?: string;
|
|
49348
49413
|
/**
|
|
49349
|
-
*
|
|
49414
|
+
* The audience, or audiences, a person's token must name in `aud`. A token
|
|
49415
|
+
* is accepted when its `aud` includes any of them.
|
|
49350
49416
|
*
|
|
49351
|
-
* Hosted Login
|
|
49352
|
-
*
|
|
49353
|
-
*
|
|
49354
|
-
*
|
|
49417
|
+
* A Hosted Login token names your OAuth client id, and a Direct API token
|
|
49418
|
+
* the id of the Environment that issued it. A backend that accepts both
|
|
49419
|
+
* lists both: `[clientId, environmentId]`. Verifying a token that carries
|
|
49420
|
+
* `aud` without setting this throws rather than ignoring the claim, because
|
|
49421
|
+
* `aud` is what stops a token minted for one client being replayed at
|
|
49422
|
+
* another.
|
|
49355
49423
|
*/
|
|
49356
|
-
audience?: string;
|
|
49424
|
+
audience?: string | readonly string[];
|
|
49357
49425
|
/**
|
|
49358
49426
|
* The audience a machine client's token must name, `service` or
|
|
49359
49427
|
* `delegated`: the identifier your API answers to
|
|
@@ -49591,7 +49659,7 @@ interface CanopyDelegation {
|
|
|
49591
49659
|
declare function delegation(claims: CanopyTokenClaims): CanopyDelegation | null;
|
|
49592
49660
|
declare class TokenVerifier {
|
|
49593
49661
|
private readonly issuer;
|
|
49594
|
-
private readonly
|
|
49662
|
+
private readonly audiences;
|
|
49595
49663
|
private readonly serviceAudience;
|
|
49596
49664
|
private readonly jwksUri;
|
|
49597
49665
|
private readonly jwksCacheMaxAgeMs;
|