@canopy-io/node 0.18.1 → 0.19.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 +12 -0
- package/dist/index.d.cts +63 -12
- package/dist/index.d.ts +63 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @canopy-io/node
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7acc0ca: OAuth client types now carry public clients: `client_type` (`confidential` or `public`) and `token_endpoint_auth_method` (`client_secret_basic` or `none`) on every client, `client_type` on create, and `client_secret` in the create response is `string | null`, null for a public client, which has none. Code that reads `client_secret` from a create response now has to handle null. Rotating a public client's secret answers `409 oauth.client_public_has_no_secret`.
|
|
8
|
+
|
|
9
|
+
## 0.18.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0bbe512: The generated types describe `passkey` as a sign-in method an organization's policy keeps or refuses. The agent skill now covers passkey sign-in on both sign-in shapes (the Direct API's `login/passkey/options` and `/verify` with the browser ceremony and autofill, the hosted page's button), the `hwk` `amr`, and the passkey refusals.
|
|
14
|
+
|
|
3
15
|
## 0.18.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -3102,7 +3102,7 @@ interface paths {
|
|
|
3102
3102
|
put?: never;
|
|
3103
3103
|
/**
|
|
3104
3104
|
* Register a new OAuth client
|
|
3105
|
-
* @description Registers a new
|
|
3105
|
+
* @description Registers a new OAuth client in the current Environment with the given `name`, `redirect_uris`, and optional `scopes` (defaulting to `openid profile email`), each one of `openid`, `profile`, `email`, `org` and `permissions`; any other value is refused with `400` (`oauth.client_scope_unknown`). `client_type` is `confidential` (when omitted: a backend holds the secret) or `public` (a single-page or mobile app that cannot keep one: no secret is minted, `client_secret` in the response is null, the client authenticates at the token endpoint with `client_id` alone, and it may also register a private-use scheme redirect such as `com.example.app:/callback` or a loopback address whose port is ignored). The type is fixed at registration. A machine client is always confidential (`400 oauth.machine_client_public_invalid`). With `client_kind: machine` it registers a machine client instead: a principal of its own that holds roles (see the assignments routes) and obtains tokens for itself, with an optional `organization_node_id` (the one organization it acts in), optional `allowed_audiences` and the `permissions` scope, the `client_credentials` grant only and no redirect URIs; it counts toward the plan's machine-credential allowance (`409 plan_limit_exceeded`). Generates the `client_id` and a `client_secret` that is bcrypt-hashed at rest; the raw secret is returned in this response only and is never retrievable again. Responds `201 Created`.
|
|
3106
3106
|
*/
|
|
3107
3107
|
post: operations["ApiOAuthClientsController_create"];
|
|
3108
3108
|
delete?: never;
|
|
@@ -3170,7 +3170,7 @@ interface paths {
|
|
|
3170
3170
|
put?: never;
|
|
3171
3171
|
/**
|
|
3172
3172
|
* Rotate an OAuth client's secret
|
|
3173
|
-
* @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.
|
|
3173
|
+
* @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.
|
|
3174
3174
|
*/
|
|
3175
3175
|
post: operations["ApiOAuthClientsController_rotateSecret"];
|
|
3176
3176
|
delete?: never;
|
|
@@ -4355,7 +4355,7 @@ interface components {
|
|
|
4355
4355
|
mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[];
|
|
4356
4356
|
/** @enum {string} */
|
|
4357
4357
|
mfa_after_sso: "exempt" | "require";
|
|
4358
|
-
/** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4358
|
+
/** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4359
4359
|
allowed_sign_in_methods: string[];
|
|
4360
4360
|
require_sso: boolean;
|
|
4361
4361
|
};
|
|
@@ -4374,7 +4374,7 @@ interface components {
|
|
|
4374
4374
|
mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
|
|
4375
4375
|
/** @enum {string|null} */
|
|
4376
4376
|
mfa_after_sso?: "exempt" | "require" | null;
|
|
4377
|
-
/** @description The methods the organization keeps of the Environment's, or null to inherit them all. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4377
|
+
/** @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. */
|
|
4378
4378
|
allowed_sign_in_methods?: string[] | null;
|
|
4379
4379
|
require_sso: boolean;
|
|
4380
4380
|
/**
|
|
@@ -4407,7 +4407,7 @@ interface components {
|
|
|
4407
4407
|
* @enum {string|null}
|
|
4408
4408
|
*/
|
|
4409
4409
|
mfa_after_sso?: "exempt" | "require" | null;
|
|
4410
|
-
/** @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` where the Environment turned
|
|
4410
|
+
/** @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. */
|
|
4411
4411
|
allowed_sign_in_methods?: string[] | null;
|
|
4412
4412
|
/** @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. */
|
|
4413
4413
|
require_sso?: boolean;
|
|
@@ -5744,6 +5744,16 @@ interface components {
|
|
|
5744
5744
|
* @enum {string}
|
|
5745
5745
|
*/
|
|
5746
5746
|
client_kind: "web" | "machine";
|
|
5747
|
+
/**
|
|
5748
|
+
* @description `confidential`: a backend holds its secret. `public`: a single-page or mobile app with no secret, authenticating with `client_id` alone. Fixed at registration.
|
|
5749
|
+
* @enum {string}
|
|
5750
|
+
*/
|
|
5751
|
+
client_type: "confidential" | "public";
|
|
5752
|
+
/**
|
|
5753
|
+
* @description How the client authenticates at the token and revocation endpoints, as discovery names it: `client_secret_basic` (or `client_secret_post`, accepted alike) for a confidential client, `none` for a public one.
|
|
5754
|
+
* @enum {string}
|
|
5755
|
+
*/
|
|
5756
|
+
token_endpoint_auth_method: "client_secret_basic" | "none";
|
|
5747
5757
|
/** @description The organization a machine client acts in: its tokens name it and its roles sit inside it. Null for a client that acts across the Environment, and for a web client. */
|
|
5748
5758
|
organization_node_id?: string | null;
|
|
5749
5759
|
/** @description That organization's name; null when the client has none. */
|
|
@@ -5790,8 +5800,8 @@ interface components {
|
|
|
5790
5800
|
* @example https://auth.yourapp.com
|
|
5791
5801
|
*/
|
|
5792
5802
|
issuer: string;
|
|
5793
|
-
/** @description Client secret — shown only once */
|
|
5794
|
-
client_secret: string;
|
|
5803
|
+
/** @description Client secret — shown only once. Null for a public client, which has none. */
|
|
5804
|
+
client_secret: string | null;
|
|
5795
5805
|
};
|
|
5796
5806
|
CreateOAuthClientDto: {
|
|
5797
5807
|
name: string;
|
|
@@ -5800,6 +5810,11 @@ interface components {
|
|
|
5800
5810
|
* @enum {string}
|
|
5801
5811
|
*/
|
|
5802
5812
|
client_kind?: "web" | "machine";
|
|
5813
|
+
/**
|
|
5814
|
+
* @description `confidential` (when omitted): a backend holds the client secret and presents it at the token endpoint. `public`: a single-page or mobile app that cannot keep a secret, so none is minted; it authenticates with `client_id` alone (`none`) and PKCE, and may register a private-use scheme or loopback redirect. Fixed at registration. A machine client is always confidential.
|
|
5815
|
+
* @enum {string}
|
|
5816
|
+
*/
|
|
5817
|
+
client_type?: "confidential" | "public";
|
|
5803
5818
|
/** @description Machine clients only: the organization the client acts in. Its tokens name it and it may hold roles only inside it. Omitted, the client acts across the Environment. */
|
|
5804
5819
|
organization_node_id?: string;
|
|
5805
5820
|
/**
|
|
@@ -5830,6 +5845,16 @@ interface components {
|
|
|
5830
5845
|
* @enum {string}
|
|
5831
5846
|
*/
|
|
5832
5847
|
client_kind: "web" | "machine";
|
|
5848
|
+
/**
|
|
5849
|
+
* @description `confidential`: a backend holds its secret. `public`: a single-page or mobile app with no secret, authenticating with `client_id` alone. Fixed at registration.
|
|
5850
|
+
* @enum {string}
|
|
5851
|
+
*/
|
|
5852
|
+
client_type: "confidential" | "public";
|
|
5853
|
+
/**
|
|
5854
|
+
* @description How the client authenticates at the token and revocation endpoints, as discovery names it: `client_secret_basic` (or `client_secret_post`, accepted alike) for a confidential client, `none` for a public one.
|
|
5855
|
+
* @enum {string}
|
|
5856
|
+
*/
|
|
5857
|
+
token_endpoint_auth_method: "client_secret_basic" | "none";
|
|
5833
5858
|
/** @description The organization a machine client acts in: its tokens name it and its roles sit inside it. Null for a client that acts across the Environment, and for a web client. */
|
|
5834
5859
|
organization_node_id?: string | null;
|
|
5835
5860
|
/** @description That organization's name; null when the client has none. */
|
|
@@ -6443,6 +6468,11 @@ interface components {
|
|
|
6443
6468
|
metadata: {
|
|
6444
6469
|
/** @description The client's `client_id`. */
|
|
6445
6470
|
client_id: string;
|
|
6471
|
+
/**
|
|
6472
|
+
* @description `confidential` when a backend holds its secret, `public` when it is a single-page or mobile app with none.
|
|
6473
|
+
* @enum {string}
|
|
6474
|
+
*/
|
|
6475
|
+
client_type: "confidential" | "public";
|
|
6446
6476
|
/** @description Whether the client is enabled. A disabled client obtains no new tokens. */
|
|
6447
6477
|
is_active: boolean;
|
|
6448
6478
|
};
|
|
@@ -7284,7 +7314,7 @@ interface components {
|
|
|
7284
7314
|
* @enum {string|null}
|
|
7285
7315
|
*/
|
|
7286
7316
|
mfa_after_sso: "exempt" | "require" | null;
|
|
7287
|
-
/** @description The sign-in methods members may use, or null to inherit the Environment's. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
7317
|
+
/** @description The sign-in methods members may use, or null to inherit the Environment's. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
7288
7318
|
allowed_sign_in_methods: string[] | null;
|
|
7289
7319
|
/** @description Whether members must sign in with SSO. */
|
|
7290
7320
|
require_sso: boolean;
|
|
@@ -28563,7 +28593,7 @@ interface operations {
|
|
|
28563
28593
|
};
|
|
28564
28594
|
};
|
|
28565
28595
|
};
|
|
28566
|
-
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
28596
|
+
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header */
|
|
28567
28597
|
400: {
|
|
28568
28598
|
headers: {
|
|
28569
28599
|
[name: string]: unknown;
|
|
@@ -28574,7 +28604,7 @@ interface operations {
|
|
|
28574
28604
|
* "error": {
|
|
28575
28605
|
* "statusCode": 400,
|
|
28576
28606
|
* "code": null,
|
|
28577
|
-
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
28607
|
+
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header",
|
|
28578
28608
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
28579
28609
|
* "path": "/api/v1/oauth-clients",
|
|
28580
28610
|
* "method": "POST"
|
|
@@ -29001,7 +29031,7 @@ interface operations {
|
|
|
29001
29031
|
};
|
|
29002
29032
|
};
|
|
29003
29033
|
};
|
|
29004
|
-
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
29034
|
+
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header */
|
|
29005
29035
|
400: {
|
|
29006
29036
|
headers: {
|
|
29007
29037
|
[name: string]: unknown;
|
|
@@ -29012,7 +29042,7 @@ interface operations {
|
|
|
29012
29042
|
* "error": {
|
|
29013
29043
|
* "statusCode": 400,
|
|
29014
29044
|
* "code": null,
|
|
29015
|
-
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
29045
|
+
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header",
|
|
29016
29046
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
29017
29047
|
* "path": "/api/v1/oauth-clients/{id}",
|
|
29018
29048
|
* "method": "PATCH"
|
|
@@ -29218,6 +29248,27 @@ interface operations {
|
|
|
29218
29248
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
29219
29249
|
};
|
|
29220
29250
|
};
|
|
29251
|
+
/** @description The client is public and has no secret to rotate (`oauth.client_public_has_no_secret`) */
|
|
29252
|
+
409: {
|
|
29253
|
+
headers: {
|
|
29254
|
+
[name: string]: unknown;
|
|
29255
|
+
};
|
|
29256
|
+
content: {
|
|
29257
|
+
/**
|
|
29258
|
+
* @example {
|
|
29259
|
+
* "error": {
|
|
29260
|
+
* "statusCode": 409,
|
|
29261
|
+
* "code": null,
|
|
29262
|
+
* "message": "The client is public and has no secret to rotate (`oauth.client_public_has_no_secret`)",
|
|
29263
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
29264
|
+
* "path": "/api/v1/oauth-clients/{id}/rotate-secret",
|
|
29265
|
+
* "method": "POST"
|
|
29266
|
+
* }
|
|
29267
|
+
* }
|
|
29268
|
+
*/
|
|
29269
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
29270
|
+
};
|
|
29271
|
+
};
|
|
29221
29272
|
};
|
|
29222
29273
|
};
|
|
29223
29274
|
ApiOAuthClientsController_listAssignments: {
|
package/dist/index.d.ts
CHANGED
|
@@ -3102,7 +3102,7 @@ interface paths {
|
|
|
3102
3102
|
put?: never;
|
|
3103
3103
|
/**
|
|
3104
3104
|
* Register a new OAuth client
|
|
3105
|
-
* @description Registers a new
|
|
3105
|
+
* @description Registers a new OAuth client in the current Environment with the given `name`, `redirect_uris`, and optional `scopes` (defaulting to `openid profile email`), each one of `openid`, `profile`, `email`, `org` and `permissions`; any other value is refused with `400` (`oauth.client_scope_unknown`). `client_type` is `confidential` (when omitted: a backend holds the secret) or `public` (a single-page or mobile app that cannot keep one: no secret is minted, `client_secret` in the response is null, the client authenticates at the token endpoint with `client_id` alone, and it may also register a private-use scheme redirect such as `com.example.app:/callback` or a loopback address whose port is ignored). The type is fixed at registration. A machine client is always confidential (`400 oauth.machine_client_public_invalid`). With `client_kind: machine` it registers a machine client instead: a principal of its own that holds roles (see the assignments routes) and obtains tokens for itself, with an optional `organization_node_id` (the one organization it acts in), optional `allowed_audiences` and the `permissions` scope, the `client_credentials` grant only and no redirect URIs; it counts toward the plan's machine-credential allowance (`409 plan_limit_exceeded`). Generates the `client_id` and a `client_secret` that is bcrypt-hashed at rest; the raw secret is returned in this response only and is never retrievable again. Responds `201 Created`.
|
|
3106
3106
|
*/
|
|
3107
3107
|
post: operations["ApiOAuthClientsController_create"];
|
|
3108
3108
|
delete?: never;
|
|
@@ -3170,7 +3170,7 @@ interface paths {
|
|
|
3170
3170
|
put?: never;
|
|
3171
3171
|
/**
|
|
3172
3172
|
* Rotate an OAuth client's secret
|
|
3173
|
-
* @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.
|
|
3173
|
+
* @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.
|
|
3174
3174
|
*/
|
|
3175
3175
|
post: operations["ApiOAuthClientsController_rotateSecret"];
|
|
3176
3176
|
delete?: never;
|
|
@@ -4355,7 +4355,7 @@ interface components {
|
|
|
4355
4355
|
mfa_factor_allowlist: ("totp" | "webauthn" | "email_otp")[];
|
|
4356
4356
|
/** @enum {string} */
|
|
4357
4357
|
mfa_after_sso: "exempt" | "require";
|
|
4358
|
-
/** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4358
|
+
/** @description The sign-in methods on offer: on the Environment, the ones it has turned on; on the effective policy, those narrowed by the organization, and `["sso"]` alone while it requires SSO. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4359
4359
|
allowed_sign_in_methods: string[];
|
|
4360
4360
|
require_sso: boolean;
|
|
4361
4361
|
};
|
|
@@ -4374,7 +4374,7 @@ interface components {
|
|
|
4374
4374
|
mfa_factor_allowlist?: ("totp" | "webauthn" | "email_otp")[] | null;
|
|
4375
4375
|
/** @enum {string|null} */
|
|
4376
4376
|
mfa_after_sso?: "exempt" | "require" | null;
|
|
4377
|
-
/** @description The methods the organization keeps of the Environment's, or null to inherit them all. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
4377
|
+
/** @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. */
|
|
4378
4378
|
allowed_sign_in_methods?: string[] | null;
|
|
4379
4379
|
require_sso: boolean;
|
|
4380
4380
|
/**
|
|
@@ -4407,7 +4407,7 @@ interface components {
|
|
|
4407
4407
|
* @enum {string|null}
|
|
4408
4408
|
*/
|
|
4409
4409
|
mfa_after_sso?: "exempt" | "require" | null;
|
|
4410
|
-
/** @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` where the Environment turned
|
|
4410
|
+
/** @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. */
|
|
4411
4411
|
allowed_sign_in_methods?: string[] | null;
|
|
4412
4412
|
/** @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. */
|
|
4413
4413
|
require_sso?: boolean;
|
|
@@ -5744,6 +5744,16 @@ interface components {
|
|
|
5744
5744
|
* @enum {string}
|
|
5745
5745
|
*/
|
|
5746
5746
|
client_kind: "web" | "machine";
|
|
5747
|
+
/**
|
|
5748
|
+
* @description `confidential`: a backend holds its secret. `public`: a single-page or mobile app with no secret, authenticating with `client_id` alone. Fixed at registration.
|
|
5749
|
+
* @enum {string}
|
|
5750
|
+
*/
|
|
5751
|
+
client_type: "confidential" | "public";
|
|
5752
|
+
/**
|
|
5753
|
+
* @description How the client authenticates at the token and revocation endpoints, as discovery names it: `client_secret_basic` (or `client_secret_post`, accepted alike) for a confidential client, `none` for a public one.
|
|
5754
|
+
* @enum {string}
|
|
5755
|
+
*/
|
|
5756
|
+
token_endpoint_auth_method: "client_secret_basic" | "none";
|
|
5747
5757
|
/** @description The organization a machine client acts in: its tokens name it and its roles sit inside it. Null for a client that acts across the Environment, and for a web client. */
|
|
5748
5758
|
organization_node_id?: string | null;
|
|
5749
5759
|
/** @description That organization's name; null when the client has none. */
|
|
@@ -5790,8 +5800,8 @@ interface components {
|
|
|
5790
5800
|
* @example https://auth.yourapp.com
|
|
5791
5801
|
*/
|
|
5792
5802
|
issuer: string;
|
|
5793
|
-
/** @description Client secret — shown only once */
|
|
5794
|
-
client_secret: string;
|
|
5803
|
+
/** @description Client secret — shown only once. Null for a public client, which has none. */
|
|
5804
|
+
client_secret: string | null;
|
|
5795
5805
|
};
|
|
5796
5806
|
CreateOAuthClientDto: {
|
|
5797
5807
|
name: string;
|
|
@@ -5800,6 +5810,11 @@ interface components {
|
|
|
5800
5810
|
* @enum {string}
|
|
5801
5811
|
*/
|
|
5802
5812
|
client_kind?: "web" | "machine";
|
|
5813
|
+
/**
|
|
5814
|
+
* @description `confidential` (when omitted): a backend holds the client secret and presents it at the token endpoint. `public`: a single-page or mobile app that cannot keep a secret, so none is minted; it authenticates with `client_id` alone (`none`) and PKCE, and may register a private-use scheme or loopback redirect. Fixed at registration. A machine client is always confidential.
|
|
5815
|
+
* @enum {string}
|
|
5816
|
+
*/
|
|
5817
|
+
client_type?: "confidential" | "public";
|
|
5803
5818
|
/** @description Machine clients only: the organization the client acts in. Its tokens name it and it may hold roles only inside it. Omitted, the client acts across the Environment. */
|
|
5804
5819
|
organization_node_id?: string;
|
|
5805
5820
|
/**
|
|
@@ -5830,6 +5845,16 @@ interface components {
|
|
|
5830
5845
|
* @enum {string}
|
|
5831
5846
|
*/
|
|
5832
5847
|
client_kind: "web" | "machine";
|
|
5848
|
+
/**
|
|
5849
|
+
* @description `confidential`: a backend holds its secret. `public`: a single-page or mobile app with no secret, authenticating with `client_id` alone. Fixed at registration.
|
|
5850
|
+
* @enum {string}
|
|
5851
|
+
*/
|
|
5852
|
+
client_type: "confidential" | "public";
|
|
5853
|
+
/**
|
|
5854
|
+
* @description How the client authenticates at the token and revocation endpoints, as discovery names it: `client_secret_basic` (or `client_secret_post`, accepted alike) for a confidential client, `none` for a public one.
|
|
5855
|
+
* @enum {string}
|
|
5856
|
+
*/
|
|
5857
|
+
token_endpoint_auth_method: "client_secret_basic" | "none";
|
|
5833
5858
|
/** @description The organization a machine client acts in: its tokens name it and its roles sit inside it. Null for a client that acts across the Environment, and for a web client. */
|
|
5834
5859
|
organization_node_id?: string | null;
|
|
5835
5860
|
/** @description That organization's name; null when the client has none. */
|
|
@@ -6443,6 +6468,11 @@ interface components {
|
|
|
6443
6468
|
metadata: {
|
|
6444
6469
|
/** @description The client's `client_id`. */
|
|
6445
6470
|
client_id: string;
|
|
6471
|
+
/**
|
|
6472
|
+
* @description `confidential` when a backend holds its secret, `public` when it is a single-page or mobile app with none.
|
|
6473
|
+
* @enum {string}
|
|
6474
|
+
*/
|
|
6475
|
+
client_type: "confidential" | "public";
|
|
6446
6476
|
/** @description Whether the client is enabled. A disabled client obtains no new tokens. */
|
|
6447
6477
|
is_active: boolean;
|
|
6448
6478
|
};
|
|
@@ -7284,7 +7314,7 @@ interface components {
|
|
|
7284
7314
|
* @enum {string|null}
|
|
7285
7315
|
*/
|
|
7286
7316
|
mfa_after_sso: "exempt" | "require" | null;
|
|
7287
|
-
/** @description The sign-in methods members may use, or null to inherit the Environment's. Each is `password`, `email_otp`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
7317
|
+
/** @description The sign-in methods members may use, or null to inherit the Environment's. Each is `password`, `email_otp`, `passkey`, `sso`, a social provider (`google`, `github`, `microsoft`, `apple`), or `oidc:<slug>` for a custom OpenID Connect provider. */
|
|
7288
7318
|
allowed_sign_in_methods: string[] | null;
|
|
7289
7319
|
/** @description Whether members must sign in with SSO. */
|
|
7290
7320
|
require_sso: boolean;
|
|
@@ -28563,7 +28593,7 @@ interface operations {
|
|
|
28563
28593
|
};
|
|
28564
28594
|
};
|
|
28565
28595
|
};
|
|
28566
|
-
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
28596
|
+
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header */
|
|
28567
28597
|
400: {
|
|
28568
28598
|
headers: {
|
|
28569
28599
|
[name: string]: unknown;
|
|
@@ -28574,7 +28604,7 @@ interface operations {
|
|
|
28574
28604
|
* "error": {
|
|
28575
28605
|
* "statusCode": 400,
|
|
28576
28606
|
* "code": null,
|
|
28577
|
-
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
28607
|
+
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header",
|
|
28578
28608
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
28579
28609
|
* "path": "/api/v1/oauth-clients",
|
|
28580
28610
|
* "method": "POST"
|
|
@@ -29001,7 +29031,7 @@ interface operations {
|
|
|
29001
29031
|
};
|
|
29002
29032
|
};
|
|
29003
29033
|
};
|
|
29004
|
-
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
29034
|
+
/** @description The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header */
|
|
29005
29035
|
400: {
|
|
29006
29036
|
headers: {
|
|
29007
29037
|
[name: string]: unknown;
|
|
@@ -29012,7 +29042,7 @@ interface operations {
|
|
|
29012
29042
|
* "error": {
|
|
29013
29043
|
* "statusCode": 400,
|
|
29014
29044
|
* "code": null,
|
|
29015
|
-
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`)
|
|
29045
|
+
* "message": "The request failed validation: a body field, a query parameter or an id in the path is missing, malformed or out of range, `backchannel_logout_uri` names an address Canopy's servers will not call, `initiate_login_uri` is malformed or not `https` (loopback hosts excepted), `scopes` names a scope Canopy does not issue (`oauth.client_scope_unknown`), a machine client names an `organization_node_id` that is not a live organization of this Environment (`oauth.client_organization_invalid`), takes a web client's field or a scope other than `permissions` (`oauth.machine_client_fields_invalid`) or is asked to be public (`oauth.machine_client_public_invalid`), a web client sends `allowed_audiences` (`oauth.web_client_audiences_invalid`), or a confidential client registers a private-use scheme redirect (`oauth.redirect_uri_not_allowed_for_client`); or the request sent both an `X-API-Key` and an `Authorization` header",
|
|
29016
29046
|
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
29017
29047
|
* "path": "/api/v1/oauth-clients/{id}",
|
|
29018
29048
|
* "method": "PATCH"
|
|
@@ -29218,6 +29248,27 @@ interface operations {
|
|
|
29218
29248
|
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
29219
29249
|
};
|
|
29220
29250
|
};
|
|
29251
|
+
/** @description The client is public and has no secret to rotate (`oauth.client_public_has_no_secret`) */
|
|
29252
|
+
409: {
|
|
29253
|
+
headers: {
|
|
29254
|
+
[name: string]: unknown;
|
|
29255
|
+
};
|
|
29256
|
+
content: {
|
|
29257
|
+
/**
|
|
29258
|
+
* @example {
|
|
29259
|
+
* "error": {
|
|
29260
|
+
* "statusCode": 409,
|
|
29261
|
+
* "code": null,
|
|
29262
|
+
* "message": "The client is public and has no secret to rotate (`oauth.client_public_has_no_secret`)",
|
|
29263
|
+
* "timestamp": "2026-04-20T12:00:00.000Z",
|
|
29264
|
+
* "path": "/api/v1/oauth-clients/{id}/rotate-secret",
|
|
29265
|
+
* "method": "POST"
|
|
29266
|
+
* }
|
|
29267
|
+
* }
|
|
29268
|
+
*/
|
|
29269
|
+
"application/json": components["schemas"]["ErrorResponseDto"];
|
|
29270
|
+
};
|
|
29271
|
+
};
|
|
29221
29272
|
};
|
|
29222
29273
|
};
|
|
29223
29274
|
ApiOAuthClientsController_listAssignments: {
|
package/package.json
CHANGED