@faable/auth-sdk 2.7.67 → 2.7.69
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/api/generated-client.d.ts +29 -0
- package/dist/api/generated-client.js +26 -0
- package/dist/api/types.d.ts +163 -3
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +269 -4
|
@@ -4964,6 +4964,34 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4964
4964
|
createdAt: string;
|
|
4965
4965
|
updatedAt?: string | undefined;
|
|
4966
4966
|
}>;
|
|
4967
|
+
/**
|
|
4968
|
+
* `POST /team/invite/accept` — operationId: `team/acceptInvite`
|
|
4969
|
+
*
|
|
4970
|
+
* Accept a team invite for a signed-in user
|
|
4971
|
+
*
|
|
4972
|
+
* Accepts the invite whose secret is `token` on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use it from the page you gave as the invite's `accept_url`.
|
|
4973
|
+
*
|
|
4974
|
+
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
4975
|
+
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
4976
|
+
* @throws {FaableApiError} `ticket_expired` (400) — The ticket is past its expiry.
|
|
4977
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4978
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4979
|
+
* @throws {FaableApiError} `invite_email_mismatch` (403) — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
4980
|
+
* @throws {FaableApiError} `invite_email_unverified` (403) — The accepting user's email matches the invite but is not verified yet.
|
|
4981
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4982
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4983
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4984
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4985
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4986
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4987
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4988
|
+
*/
|
|
4989
|
+
teamAcceptInvite(data: OpBody<"team/acceptInvite">): Promise<{
|
|
4990
|
+
status: "already_member" | "accepted";
|
|
4991
|
+
team_id: string;
|
|
4992
|
+
user_id: string;
|
|
4993
|
+
roles: string[];
|
|
4994
|
+
}>;
|
|
4967
4995
|
/**
|
|
4968
4996
|
* `POST /team/{team_id}/member` — operationId: `team/addMembers`
|
|
4969
4997
|
*
|
|
@@ -5120,6 +5148,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5120
5148
|
*
|
|
5121
5149
|
* @throws {FaableApiError} `invite_used` (400) — The invite was already accepted.
|
|
5122
5150
|
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
5151
|
+
* @throws {FaableApiError} `invalid_invite_url` (400) — An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.
|
|
5123
5152
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5124
5153
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5125
5154
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -1797,6 +1797,31 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1797
1797
|
requireId("session_id", session_id);
|
|
1798
1798
|
return this.fetcher.post(`/session/${session_id}/revoke`, {});
|
|
1799
1799
|
}
|
|
1800
|
+
/**
|
|
1801
|
+
* `POST /team/invite/accept` — operationId: `team/acceptInvite`
|
|
1802
|
+
*
|
|
1803
|
+
* Accept a team invite for a signed-in user
|
|
1804
|
+
*
|
|
1805
|
+
* Accepts the invite whose secret is `token` on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use it from the page you gave as the invite's `accept_url`.
|
|
1806
|
+
*
|
|
1807
|
+
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
1808
|
+
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
1809
|
+
* @throws {FaableApiError} `ticket_expired` (400) — The ticket is past its expiry.
|
|
1810
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1811
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1812
|
+
* @throws {FaableApiError} `invite_email_mismatch` (403) — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
1813
|
+
* @throws {FaableApiError} `invite_email_unverified` (403) — The accepting user's email matches the invite but is not verified yet.
|
|
1814
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1815
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1816
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1817
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1818
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1819
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1820
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1821
|
+
*/
|
|
1822
|
+
teamAcceptInvite(data) {
|
|
1823
|
+
return this.fetcher.post(`/team/invite/accept`, data);
|
|
1824
|
+
}
|
|
1800
1825
|
/**
|
|
1801
1826
|
* `POST /team/{team_id}/member` — operationId: `team/addMembers`
|
|
1802
1827
|
*
|
|
@@ -1910,6 +1935,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1910
1935
|
*
|
|
1911
1936
|
* @throws {FaableApiError} `invite_used` (400) — The invite was already accepted.
|
|
1912
1937
|
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
1938
|
+
* @throws {FaableApiError} `invalid_invite_url` (400) — An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.
|
|
1913
1939
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1914
1940
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1915
1941
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1372,6 +1372,26 @@ export interface paths {
|
|
|
1372
1372
|
patch?: never;
|
|
1373
1373
|
trace?: never;
|
|
1374
1374
|
};
|
|
1375
|
+
"/team/invite/accept": {
|
|
1376
|
+
parameters: {
|
|
1377
|
+
query?: never;
|
|
1378
|
+
header?: never;
|
|
1379
|
+
path?: never;
|
|
1380
|
+
cookie?: never;
|
|
1381
|
+
};
|
|
1382
|
+
get?: never;
|
|
1383
|
+
put?: never;
|
|
1384
|
+
/**
|
|
1385
|
+
* Accept a team invite for a signed-in user
|
|
1386
|
+
* @description Accepts the invite whose secret is `token` on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use it from the page you gave as the invite's `accept_url`.
|
|
1387
|
+
*/
|
|
1388
|
+
post: operations["team/acceptInvite"];
|
|
1389
|
+
delete?: never;
|
|
1390
|
+
options?: never;
|
|
1391
|
+
head?: never;
|
|
1392
|
+
patch?: never;
|
|
1393
|
+
trace?: never;
|
|
1394
|
+
};
|
|
1375
1395
|
"/api": {
|
|
1376
1396
|
parameters: {
|
|
1377
1397
|
query?: never;
|
|
@@ -3303,6 +3323,8 @@ export interface paths {
|
|
|
3303
3323
|
"application/json": {
|
|
3304
3324
|
client_id: string;
|
|
3305
3325
|
redirect_to?: string;
|
|
3326
|
+
/** @description The login's key from `/authorize`. Only ties the ceremony to that login for tracing; not consumed, never rejects (`/passkey/login/verify` is the step that uses it). */
|
|
3327
|
+
state?: string;
|
|
3306
3328
|
};
|
|
3307
3329
|
};
|
|
3308
3330
|
};
|
|
@@ -6936,6 +6958,9 @@ export interface components {
|
|
|
6936
6958
|
* - `malformed_credential` (400): The WebAuthn credential is malformed.
|
|
6937
6959
|
* - `unknown_passkey` (401): The passkey is not enrolled for this user.
|
|
6938
6960
|
* - `invalid_passkey` (401): The passkey assertion did not verify.
|
|
6961
|
+
* - `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.
|
|
6962
|
+
* - `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
6963
|
+
* - `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.
|
|
6939
6964
|
* - `invite_not_found` (404): No invite with that id in this account.
|
|
6940
6965
|
* - `invite_used` (400): The invite was already accepted.
|
|
6941
6966
|
* - `already_member` (400): The user is already a member of the team.
|
|
@@ -6953,7 +6978,7 @@ export interface components {
|
|
|
6953
6978
|
* - `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.
|
|
6954
6979
|
* @enum {string}
|
|
6955
6980
|
*/
|
|
6956
|
-
ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "email_sender_domain_not_allowed" | "plan_required" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "invalid_email" | "invalid_name" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "no_database_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "team_id_unavailable" | "use_team_member_route" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress";
|
|
6981
|
+
ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "email_sender_domain_not_allowed" | "plan_required" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "invalid_email" | "invalid_name" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "no_database_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invalid_invite_url" | "invite_email_mismatch" | "invite_email_unverified" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "team_id_unavailable" | "use_team_member_route" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress";
|
|
6957
6982
|
/** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
|
|
6958
6983
|
ErrorResponse: {
|
|
6959
6984
|
/** @description The HTTP status, repeated. */
|
|
@@ -19532,8 +19557,10 @@ export interface operations {
|
|
|
19532
19557
|
roles?: string[];
|
|
19533
19558
|
/** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
|
|
19534
19559
|
mode?: "auto" | "invite";
|
|
19535
|
-
/** @description Where
|
|
19560
|
+
/** @description Where `/invite-verify` redirects the invitee after a successful accept. Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`. */
|
|
19536
19561
|
redirect_uri?: string;
|
|
19562
|
+
/** @description Your own page for accepting the invite. The emailed link becomes `<accept_url>#<token>`; the page reads the token from the fragment, signs the user in, and calls `POST /team/invite/accept` with the token and the signed-in user's id. Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`. Without it the link is auth's own `/invite-verify`. */
|
|
19563
|
+
accept_url?: string;
|
|
19537
19564
|
};
|
|
19538
19565
|
};
|
|
19539
19566
|
};
|
|
@@ -19581,6 +19608,8 @@ export interface operations {
|
|
|
19581
19608
|
*
|
|
19582
19609
|
* `invalid_role` — The role belongs to another account.
|
|
19583
19610
|
*
|
|
19611
|
+
* `invalid_invite_url` — An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.
|
|
19612
|
+
*
|
|
19584
19613
|
* `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
19585
19614
|
*/
|
|
19586
19615
|
400: {
|
|
@@ -19590,7 +19619,7 @@ export interface operations {
|
|
|
19590
19619
|
content: {
|
|
19591
19620
|
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19592
19621
|
/** @enum {string} */
|
|
19593
|
-
error_code?: "invite_used" | "invalid_role" | "validation_error";
|
|
19622
|
+
error_code?: "invite_used" | "invalid_role" | "invalid_invite_url" | "validation_error";
|
|
19594
19623
|
};
|
|
19595
19624
|
};
|
|
19596
19625
|
};
|
|
@@ -19851,6 +19880,135 @@ export interface operations {
|
|
|
19851
19880
|
};
|
|
19852
19881
|
};
|
|
19853
19882
|
};
|
|
19883
|
+
"team/acceptInvite": {
|
|
19884
|
+
parameters: {
|
|
19885
|
+
query?: never;
|
|
19886
|
+
header?: never;
|
|
19887
|
+
path?: never;
|
|
19888
|
+
cookie?: never;
|
|
19889
|
+
};
|
|
19890
|
+
requestBody: {
|
|
19891
|
+
content: {
|
|
19892
|
+
"application/json": {
|
|
19893
|
+
/** @description The invite secret, as it arrived in the fragment of the `accept_url` link. */
|
|
19894
|
+
token: string;
|
|
19895
|
+
/** @description The user accepting — the one signed in on your page. Must exist in this tenant and have the invited email, verified. */
|
|
19896
|
+
user_id: string;
|
|
19897
|
+
};
|
|
19898
|
+
};
|
|
19899
|
+
};
|
|
19900
|
+
responses: {
|
|
19901
|
+
/** @description Default Response */
|
|
19902
|
+
200: {
|
|
19903
|
+
headers: {
|
|
19904
|
+
[name: string]: unknown;
|
|
19905
|
+
};
|
|
19906
|
+
content: {
|
|
19907
|
+
"application/json": {
|
|
19908
|
+
/** @description `accepted` when the user joined now; `already_member` when they already were (the invite is spent either way). */
|
|
19909
|
+
status: "accepted" | "already_member";
|
|
19910
|
+
team_id: string;
|
|
19911
|
+
user_id: string;
|
|
19912
|
+
roles: string[];
|
|
19913
|
+
};
|
|
19914
|
+
};
|
|
19915
|
+
};
|
|
19916
|
+
/**
|
|
19917
|
+
* @description `invalid_ticket` — The ticket does not exist or is not the kind this endpoint accepts.
|
|
19918
|
+
*
|
|
19919
|
+
* `ticket_used` — The ticket was already consumed.
|
|
19920
|
+
*
|
|
19921
|
+
* `ticket_expired` — The ticket is past its expiry.
|
|
19922
|
+
*
|
|
19923
|
+
* `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
19924
|
+
*/
|
|
19925
|
+
400: {
|
|
19926
|
+
headers: {
|
|
19927
|
+
[name: string]: unknown;
|
|
19928
|
+
};
|
|
19929
|
+
content: {
|
|
19930
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19931
|
+
/** @enum {string} */
|
|
19932
|
+
error_code?: "invalid_ticket" | "ticket_used" | "ticket_expired" | "validation_error";
|
|
19933
|
+
};
|
|
19934
|
+
};
|
|
19935
|
+
};
|
|
19936
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
19937
|
+
401: {
|
|
19938
|
+
headers: {
|
|
19939
|
+
[name: string]: unknown;
|
|
19940
|
+
};
|
|
19941
|
+
content: {
|
|
19942
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19943
|
+
/** @enum {string} */
|
|
19944
|
+
error_code?: "unauthorized";
|
|
19945
|
+
};
|
|
19946
|
+
};
|
|
19947
|
+
};
|
|
19948
|
+
/**
|
|
19949
|
+
* @description `invite_email_mismatch` — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
19950
|
+
*
|
|
19951
|
+
* `invite_email_unverified` — The accepting user's email matches the invite but is not verified yet.
|
|
19952
|
+
*
|
|
19953
|
+
* `forbidden` — The credentials are valid but do not allow this operation.
|
|
19954
|
+
*
|
|
19955
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
19956
|
+
*
|
|
19957
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
19958
|
+
*/
|
|
19959
|
+
403: {
|
|
19960
|
+
headers: {
|
|
19961
|
+
[name: string]: unknown;
|
|
19962
|
+
};
|
|
19963
|
+
content: {
|
|
19964
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19965
|
+
/** @enum {string} */
|
|
19966
|
+
error_code?: "invite_email_mismatch" | "invite_email_unverified" | "forbidden" | "insufficient_scope" | "user_suspended";
|
|
19967
|
+
};
|
|
19968
|
+
};
|
|
19969
|
+
};
|
|
19970
|
+
/**
|
|
19971
|
+
* @description `not_found` — The resource does not exist in this account.
|
|
19972
|
+
*
|
|
19973
|
+
* `account_not_found` — No Auth Account matches the request (domain, header or token).
|
|
19974
|
+
*/
|
|
19975
|
+
404: {
|
|
19976
|
+
headers: {
|
|
19977
|
+
[name: string]: unknown;
|
|
19978
|
+
};
|
|
19979
|
+
content: {
|
|
19980
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19981
|
+
/** @enum {string} */
|
|
19982
|
+
error_code?: "not_found" | "account_not_found";
|
|
19983
|
+
};
|
|
19984
|
+
};
|
|
19985
|
+
};
|
|
19986
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
19987
|
+
429: {
|
|
19988
|
+
headers: {
|
|
19989
|
+
[name: string]: unknown;
|
|
19990
|
+
};
|
|
19991
|
+
content: {
|
|
19992
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
19993
|
+
/** @enum {string} */
|
|
19994
|
+
error_code?: "too_many_requests";
|
|
19995
|
+
};
|
|
19996
|
+
};
|
|
19997
|
+
};
|
|
19998
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
19999
|
+
500: {
|
|
20000
|
+
headers: {
|
|
20001
|
+
[name: string]: unknown;
|
|
20002
|
+
};
|
|
20003
|
+
content: {
|
|
20004
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20005
|
+
/** @enum {string} */
|
|
20006
|
+
error_code?: "internal_error";
|
|
20007
|
+
};
|
|
20008
|
+
};
|
|
20009
|
+
};
|
|
20010
|
+
};
|
|
20011
|
+
};
|
|
19854
20012
|
"api/list": {
|
|
19855
20013
|
parameters: {
|
|
19856
20014
|
query?: {
|
|
@@ -26680,6 +26838,8 @@ export interface operations {
|
|
|
26680
26838
|
auth_params?: {
|
|
26681
26839
|
[key: string]: string;
|
|
26682
26840
|
};
|
|
26841
|
+
/** @description The login's key from `/authorize` — the hosted screen's `?state=`. Only ties the code this start issues to that login for tracing; it is not consumed and never rejects the request (`/passwordless/verify_code` is the step that uses it). */
|
|
26842
|
+
state?: string;
|
|
26683
26843
|
};
|
|
26684
26844
|
};
|
|
26685
26845
|
};
|
package/dist/version.js
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
// login pages could not import the SDK at all. Same pattern as auth-js.
|
|
10
10
|
//
|
|
11
11
|
// The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
|
|
12
|
-
export const version = "2.7.
|
|
12
|
+
export const version = "2.7.69";
|
|
13
13
|
// Short git SHA of the released commit. The version dates a build; this names
|
|
14
14
|
// the exact tree, so a canonical log line or an audit entry leads straight to
|
|
15
15
|
// `git show <sha>`. Deliberately NOT hex: an unreleased build (dev, a local
|
|
16
16
|
// link) cannot be mistaken for a real commit — auth only records values that
|
|
17
17
|
// look like a SHA, and this one never will.
|
|
18
|
-
export const commit = "
|
|
18
|
+
export const commit = "16c1571";
|
|
19
19
|
// What this SDK writes in `x-faable-client`. Exported for a consumer that
|
|
20
20
|
// builds a strategy on its own (outside `FaableAuthApi`) and still wants the
|
|
21
21
|
// token request attributed — a bare `authClientCredentials` stamps only what
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@faablecloud/auth",
|
|
5
5
|
"description": "Auth Platform made by Faable. Manage Users and Roles",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.56.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -7519,7 +7519,7 @@
|
|
|
7519
7519
|
},
|
|
7520
7520
|
"ErrorCode": {
|
|
7521
7521
|
"type": "string",
|
|
7522
|
-
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.",
|
|
7522
|
+
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.\n- `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `invalid_name` (400): The name contains a link. `message` says which field.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `no_database_connection` (400): The tenant has no database connection, so there is nowhere to store a password. Create one and retry.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invalid_invite_url` (400): An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n- `invite_email_mismatch` (403): The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n- `invite_email_unverified` (403): The accepting user's email matches the invite but is not verified yet.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `team_id_unavailable` (409): The team id cannot be used in this tenant. Pick another id or let the API generate one.\n- `use_team_member_route` (400): This generic route cannot create memberships. Use `POST /team/{team_id}/member` for team members or `POST /role/{role_id}/users` for role grants.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.\n- `invalid_webhook_event` (400): An event is not in the webhook event catalog. `message` and `details.valid_events` list the valid ones.\n- `invalid_webhook_url` (400): The webhook URL must be an absolute `https` URL.\n- `not_a_webhook` (400): The operation only applies to `webhook` subscriptions.\n- `delivery_not_found` (404): No webhook delivery with that id for this subscription.\n- `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.",
|
|
7523
7523
|
"enum": [
|
|
7524
7524
|
"bad_request",
|
|
7525
7525
|
"validation_error",
|
|
@@ -7630,6 +7630,9 @@
|
|
|
7630
7630
|
"malformed_credential",
|
|
7631
7631
|
"unknown_passkey",
|
|
7632
7632
|
"invalid_passkey",
|
|
7633
|
+
"invalid_invite_url",
|
|
7634
|
+
"invite_email_mismatch",
|
|
7635
|
+
"invite_email_unverified",
|
|
7633
7636
|
"invite_not_found",
|
|
7634
7637
|
"invite_used",
|
|
7635
7638
|
"already_member",
|
|
@@ -36812,7 +36815,11 @@
|
|
|
36812
36815
|
},
|
|
36813
36816
|
"redirect_uri": {
|
|
36814
36817
|
"type": "string",
|
|
36815
|
-
"description": "Where
|
|
36818
|
+
"description": "Where `/invite-verify` redirects the invitee after a successful accept. Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`."
|
|
36819
|
+
},
|
|
36820
|
+
"accept_url": {
|
|
36821
|
+
"type": "string",
|
|
36822
|
+
"description": "Your own page for accepting the invite. The emailed link becomes `<accept_url>#<token>`; the page reads the token from the fragment, signs the user in, and calls `POST /team/invite/accept` with the token and the signed-in user's id. Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`. Without it the link is auth's own `/invite-verify`."
|
|
36816
36823
|
}
|
|
36817
36824
|
},
|
|
36818
36825
|
"additionalProperties": false,
|
|
@@ -36952,7 +36959,7 @@
|
|
|
36952
36959
|
}
|
|
36953
36960
|
},
|
|
36954
36961
|
"400": {
|
|
36955
|
-
"description": "`invite_used` — The invite was already accepted.\n\n`invalid_role` — The role belongs to another account.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36962
|
+
"description": "`invite_used` — The invite was already accepted.\n\n`invalid_role` — The role belongs to another account.\n\n`invalid_invite_url` — An invite's `accept_url` or `redirect_uri` is not an http(s) URL at an origin of this tenant's client callbacks or `callback_hostnames`, or it carries a fragment.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
36956
36963
|
"content": {
|
|
36957
36964
|
"application/json": {
|
|
36958
36965
|
"schema": {
|
|
@@ -36968,6 +36975,7 @@
|
|
|
36968
36975
|
"enum": [
|
|
36969
36976
|
"invite_used",
|
|
36970
36977
|
"invalid_role",
|
|
36978
|
+
"invalid_invite_url",
|
|
36971
36979
|
"validation_error"
|
|
36972
36980
|
]
|
|
36973
36981
|
}
|
|
@@ -37763,6 +37771,255 @@
|
|
|
37763
37771
|
}
|
|
37764
37772
|
}
|
|
37765
37773
|
},
|
|
37774
|
+
"/team/invite/accept": {
|
|
37775
|
+
"post": {
|
|
37776
|
+
"operationId": "team/acceptInvite",
|
|
37777
|
+
"summary": "Accept a team invite for a signed-in user",
|
|
37778
|
+
"tags": [
|
|
37779
|
+
"team"
|
|
37780
|
+
],
|
|
37781
|
+
"description": "Accepts the invite whose secret is `token` on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use it from the page you gave as the invite's `accept_url`.",
|
|
37782
|
+
"requestBody": {
|
|
37783
|
+
"required": true,
|
|
37784
|
+
"content": {
|
|
37785
|
+
"application/json": {
|
|
37786
|
+
"schema": {
|
|
37787
|
+
"type": "object",
|
|
37788
|
+
"required": [
|
|
37789
|
+
"token",
|
|
37790
|
+
"user_id"
|
|
37791
|
+
],
|
|
37792
|
+
"properties": {
|
|
37793
|
+
"token": {
|
|
37794
|
+
"type": "string",
|
|
37795
|
+
"minLength": 1,
|
|
37796
|
+
"description": "The invite secret, as it arrived in the fragment of the `accept_url` link."
|
|
37797
|
+
},
|
|
37798
|
+
"user_id": {
|
|
37799
|
+
"type": "string",
|
|
37800
|
+
"description": "The user accepting — the one signed in on your page. Must exist in this tenant and have the invited email, verified."
|
|
37801
|
+
}
|
|
37802
|
+
},
|
|
37803
|
+
"additionalProperties": false
|
|
37804
|
+
}
|
|
37805
|
+
}
|
|
37806
|
+
}
|
|
37807
|
+
},
|
|
37808
|
+
"security": [
|
|
37809
|
+
{
|
|
37810
|
+
"bearerAuth": []
|
|
37811
|
+
}
|
|
37812
|
+
],
|
|
37813
|
+
"responses": {
|
|
37814
|
+
"200": {
|
|
37815
|
+
"description": "Default Response",
|
|
37816
|
+
"content": {
|
|
37817
|
+
"application/json": {
|
|
37818
|
+
"schema": {
|
|
37819
|
+
"type": "object",
|
|
37820
|
+
"required": [
|
|
37821
|
+
"status",
|
|
37822
|
+
"team_id",
|
|
37823
|
+
"user_id",
|
|
37824
|
+
"roles"
|
|
37825
|
+
],
|
|
37826
|
+
"properties": {
|
|
37827
|
+
"status": {
|
|
37828
|
+
"anyOf": [
|
|
37829
|
+
{
|
|
37830
|
+
"type": "string",
|
|
37831
|
+
"enum": [
|
|
37832
|
+
"accepted"
|
|
37833
|
+
]
|
|
37834
|
+
},
|
|
37835
|
+
{
|
|
37836
|
+
"type": "string",
|
|
37837
|
+
"enum": [
|
|
37838
|
+
"already_member"
|
|
37839
|
+
]
|
|
37840
|
+
}
|
|
37841
|
+
],
|
|
37842
|
+
"description": "`accepted` when the user joined now; `already_member` when they already were (the invite is spent either way)."
|
|
37843
|
+
},
|
|
37844
|
+
"team_id": {
|
|
37845
|
+
"type": "string"
|
|
37846
|
+
},
|
|
37847
|
+
"user_id": {
|
|
37848
|
+
"type": "string"
|
|
37849
|
+
},
|
|
37850
|
+
"roles": {
|
|
37851
|
+
"type": "array",
|
|
37852
|
+
"items": {
|
|
37853
|
+
"type": "string"
|
|
37854
|
+
}
|
|
37855
|
+
}
|
|
37856
|
+
},
|
|
37857
|
+
"additionalProperties": false
|
|
37858
|
+
}
|
|
37859
|
+
}
|
|
37860
|
+
}
|
|
37861
|
+
},
|
|
37862
|
+
"400": {
|
|
37863
|
+
"description": "`invalid_ticket` — The ticket does not exist or is not the kind this endpoint accepts.\n\n`ticket_used` — The ticket was already consumed.\n\n`ticket_expired` — The ticket is past its expiry.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
37864
|
+
"content": {
|
|
37865
|
+
"application/json": {
|
|
37866
|
+
"schema": {
|
|
37867
|
+
"allOf": [
|
|
37868
|
+
{
|
|
37869
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37870
|
+
},
|
|
37871
|
+
{
|
|
37872
|
+
"type": "object",
|
|
37873
|
+
"properties": {
|
|
37874
|
+
"error_code": {
|
|
37875
|
+
"type": "string",
|
|
37876
|
+
"enum": [
|
|
37877
|
+
"invalid_ticket",
|
|
37878
|
+
"ticket_used",
|
|
37879
|
+
"ticket_expired",
|
|
37880
|
+
"validation_error"
|
|
37881
|
+
]
|
|
37882
|
+
}
|
|
37883
|
+
}
|
|
37884
|
+
}
|
|
37885
|
+
]
|
|
37886
|
+
}
|
|
37887
|
+
}
|
|
37888
|
+
}
|
|
37889
|
+
},
|
|
37890
|
+
"401": {
|
|
37891
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
37892
|
+
"content": {
|
|
37893
|
+
"application/json": {
|
|
37894
|
+
"schema": {
|
|
37895
|
+
"allOf": [
|
|
37896
|
+
{
|
|
37897
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37898
|
+
},
|
|
37899
|
+
{
|
|
37900
|
+
"type": "object",
|
|
37901
|
+
"properties": {
|
|
37902
|
+
"error_code": {
|
|
37903
|
+
"type": "string",
|
|
37904
|
+
"enum": [
|
|
37905
|
+
"unauthorized"
|
|
37906
|
+
]
|
|
37907
|
+
}
|
|
37908
|
+
}
|
|
37909
|
+
}
|
|
37910
|
+
]
|
|
37911
|
+
}
|
|
37912
|
+
}
|
|
37913
|
+
}
|
|
37914
|
+
},
|
|
37915
|
+
"403": {
|
|
37916
|
+
"description": "`invite_email_mismatch` — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n\n`invite_email_unverified` — The accepting user's email matches the invite but is not verified yet.\n\n`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
37917
|
+
"content": {
|
|
37918
|
+
"application/json": {
|
|
37919
|
+
"schema": {
|
|
37920
|
+
"allOf": [
|
|
37921
|
+
{
|
|
37922
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37923
|
+
},
|
|
37924
|
+
{
|
|
37925
|
+
"type": "object",
|
|
37926
|
+
"properties": {
|
|
37927
|
+
"error_code": {
|
|
37928
|
+
"type": "string",
|
|
37929
|
+
"enum": [
|
|
37930
|
+
"invite_email_mismatch",
|
|
37931
|
+
"invite_email_unverified",
|
|
37932
|
+
"forbidden",
|
|
37933
|
+
"insufficient_scope",
|
|
37934
|
+
"user_suspended"
|
|
37935
|
+
]
|
|
37936
|
+
}
|
|
37937
|
+
}
|
|
37938
|
+
}
|
|
37939
|
+
]
|
|
37940
|
+
}
|
|
37941
|
+
}
|
|
37942
|
+
}
|
|
37943
|
+
},
|
|
37944
|
+
"404": {
|
|
37945
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
37946
|
+
"content": {
|
|
37947
|
+
"application/json": {
|
|
37948
|
+
"schema": {
|
|
37949
|
+
"allOf": [
|
|
37950
|
+
{
|
|
37951
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37952
|
+
},
|
|
37953
|
+
{
|
|
37954
|
+
"type": "object",
|
|
37955
|
+
"properties": {
|
|
37956
|
+
"error_code": {
|
|
37957
|
+
"type": "string",
|
|
37958
|
+
"enum": [
|
|
37959
|
+
"not_found",
|
|
37960
|
+
"account_not_found"
|
|
37961
|
+
]
|
|
37962
|
+
}
|
|
37963
|
+
}
|
|
37964
|
+
}
|
|
37965
|
+
]
|
|
37966
|
+
}
|
|
37967
|
+
}
|
|
37968
|
+
}
|
|
37969
|
+
},
|
|
37970
|
+
"429": {
|
|
37971
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
37972
|
+
"content": {
|
|
37973
|
+
"application/json": {
|
|
37974
|
+
"schema": {
|
|
37975
|
+
"allOf": [
|
|
37976
|
+
{
|
|
37977
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
37978
|
+
},
|
|
37979
|
+
{
|
|
37980
|
+
"type": "object",
|
|
37981
|
+
"properties": {
|
|
37982
|
+
"error_code": {
|
|
37983
|
+
"type": "string",
|
|
37984
|
+
"enum": [
|
|
37985
|
+
"too_many_requests"
|
|
37986
|
+
]
|
|
37987
|
+
}
|
|
37988
|
+
}
|
|
37989
|
+
}
|
|
37990
|
+
]
|
|
37991
|
+
}
|
|
37992
|
+
}
|
|
37993
|
+
}
|
|
37994
|
+
},
|
|
37995
|
+
"500": {
|
|
37996
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
37997
|
+
"content": {
|
|
37998
|
+
"application/json": {
|
|
37999
|
+
"schema": {
|
|
38000
|
+
"allOf": [
|
|
38001
|
+
{
|
|
38002
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38003
|
+
},
|
|
38004
|
+
{
|
|
38005
|
+
"type": "object",
|
|
38006
|
+
"properties": {
|
|
38007
|
+
"error_code": {
|
|
38008
|
+
"type": "string",
|
|
38009
|
+
"enum": [
|
|
38010
|
+
"internal_error"
|
|
38011
|
+
]
|
|
38012
|
+
}
|
|
38013
|
+
}
|
|
38014
|
+
}
|
|
38015
|
+
]
|
|
38016
|
+
}
|
|
38017
|
+
}
|
|
38018
|
+
}
|
|
38019
|
+
}
|
|
38020
|
+
}
|
|
38021
|
+
}
|
|
38022
|
+
},
|
|
37766
38023
|
"/api": {
|
|
37767
38024
|
"get": {
|
|
37768
38025
|
"operationId": "api/list",
|
|
@@ -54922,6 +55179,10 @@
|
|
|
54922
55179
|
"additionalProperties": {
|
|
54923
55180
|
"type": "string"
|
|
54924
55181
|
}
|
|
55182
|
+
},
|
|
55183
|
+
"state": {
|
|
55184
|
+
"type": "string",
|
|
55185
|
+
"description": "The login's key from `/authorize` — the hosted screen's `?state=`. Only ties the code this start issues to that login for tracing; it is not consumed and never rejects the request (`/passwordless/verify_code` is the step that uses it)."
|
|
54925
55186
|
}
|
|
54926
55187
|
}
|
|
54927
55188
|
}
|
|
@@ -57073,6 +57334,10 @@
|
|
|
57073
57334
|
},
|
|
57074
57335
|
"redirect_to": {
|
|
57075
57336
|
"type": "string"
|
|
57337
|
+
},
|
|
57338
|
+
"state": {
|
|
57339
|
+
"type": "string",
|
|
57340
|
+
"description": "The login's key from `/authorize`. Only ties the ceremony to that login for tracing; not consumed, never rejects (`/passkey/login/verify` is the step that uses it)."
|
|
57076
57341
|
}
|
|
57077
57342
|
}
|
|
57078
57343
|
}
|