@faable/auth-sdk 2.7.76 → 2.7.77

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.
@@ -447,6 +447,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
447
447
  default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
448
448
  visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
449
449
  } | undefined;
450
+ /**
451
+ * `GET /user/export` — operationId: `user/export`
452
+ *
453
+ * Export users, optionally with their password hashes
454
+ *
455
+ * Pages through every user of the tenant, 500 at a time, in the row shape `POST /user/import` takes. With `include_hashes` each row carries its `password_hash` (needs the `read:password_hashes` scope, is audited as `credentials.exported` and notifies its subscribers). Provider access and refresh tokens of linked identities are never exported. Available on every plan.
456
+ *
457
+ * @throws {FaableApiError} `invalid_connection` (400) — The connection does not exist, is disabled, or is not of the type this flow needs.
458
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
459
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
460
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
461
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
462
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
463
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
464
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
465
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
466
+ */
450
467
  default_country_iso?: string | null | undefined;
451
468
  webauthn_rp_id?: string | null | undefined;
452
469
  logout_confirm_required?: boolean | undefined;
@@ -508,6 +525,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
508
525
  default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
509
526
  visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
510
527
  } | undefined;
528
+ /**
529
+ * `GET /user/export` — operationId: `user/export`
530
+ *
531
+ * Export users, optionally with their password hashes
532
+ *
533
+ * Pages through every user of the tenant, 500 at a time, in the row shape `POST /user/import` takes. With `include_hashes` each row carries its `password_hash` (needs the `read:password_hashes` scope, is audited as `credentials.exported` and notifies its subscribers). Provider access and refresh tokens of linked identities are never exported. Available on every plan.
534
+ *
535
+ * @throws {FaableApiError} `invalid_connection` (400) — The connection does not exist, is disabled, or is not of the type this flow needs.
536
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
537
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
538
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
539
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
540
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
541
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
542
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
543
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
544
+ */
511
545
  default_country_iso?: string | null | undefined;
512
546
  webauthn_rp_id?: string | null | undefined;
513
547
  logout_confirm_required?: boolean | undefined;
@@ -572,6 +606,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
572
606
  default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
573
607
  visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
574
608
  } | undefined;
609
+ /**
610
+ * `GET /user/export` — operationId: `user/export`
611
+ *
612
+ * Export users, optionally with their password hashes
613
+ *
614
+ * Pages through every user of the tenant, 500 at a time, in the row shape `POST /user/import` takes. With `include_hashes` each row carries its `password_hash` (needs the `read:password_hashes` scope, is audited as `credentials.exported` and notifies its subscribers). Provider access and refresh tokens of linked identities are never exported. Available on every plan.
615
+ *
616
+ * @throws {FaableApiError} `invalid_connection` (400) — The connection does not exist, is disabled, or is not of the type this flow needs.
617
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
618
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
619
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
620
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
621
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
622
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
623
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
624
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
625
+ */
575
626
  default_country_iso?: string | null | undefined;
576
627
  webauthn_rp_id?: string | null | undefined;
577
628
  logout_confirm_required?: boolean | undefined;
@@ -2081,23 +2132,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2081
2132
  all: () => Promise<{
2082
2133
  id: string;
2083
2134
  connection_name: string;
2084
- connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
2085
- * `GET /user/{user_id}` — operationId: `user/get`
2086
- *
2087
- * Get User
2088
- *
2089
- * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
2090
- * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2091
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2092
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2093
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2094
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2095
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2096
- * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
2097
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2098
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2099
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2100
- */
2135
+ connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
2101
2136
  authorize_url: string;
2102
2137
  token_url: string;
2103
2138
  userinfo_url: string;
@@ -2137,23 +2172,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2137
2172
  first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
2138
2173
  id: string;
2139
2174
  connection_name: string;
2140
- connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
2141
- * `GET /user/{user_id}` — operationId: `user/get`
2142
- *
2143
- * Get User
2144
- *
2145
- * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
2146
- * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2147
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2148
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2149
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2150
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2151
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2152
- * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
2153
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2154
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2155
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2156
- */
2175
+ connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
2157
2176
  authorize_url: string;
2158
2177
  token_url: string;
2159
2178
  userinfo_url: string;
@@ -2196,23 +2215,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2196
2215
  } | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
2197
2216
  id: string;
2198
2217
  connection_name: string;
2199
- connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
2200
- * `GET /user/{user_id}` — operationId: `user/get`
2201
- *
2202
- * Get User
2203
- *
2204
- * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
2205
- * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2206
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2207
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2208
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2209
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2210
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2211
- * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
2212
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2213
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2214
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2215
- */
2218
+ connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
2216
2219
  authorize_url: string;
2217
2220
  token_url: string;
2218
2221
  userinfo_url: string;
@@ -4597,7 +4597,7 @@ export interface paths {
4597
4597
  put?: never;
4598
4598
  /**
4599
4599
  * Self-service signup
4600
- * @description Creates a new user and database credential (email + password) in a single call against the tenant database connection. Public and account-scoped (no management token). Gated per-connection by `disable_signup`. The user is created with `email_verified: false`; the account notification settings (`verify_email_auto_send`, `welcome_email_enabled`) drive any follow-up emails. Does not establish a session — the client logs in afterwards.
4600
+ * @description Creates a new user and database credential in a single call against the tenant database connection. The identifier follows the connection `login_identifier` (email, username, or either); the password is optional, and a user created without one sets it through the password reset email. Public and account-scoped (no management token). Gated per-connection by `disable_signup`. The user is created with `email_verified: false`; the account notification settings (`verify_email_auto_send`, `welcome_email_enabled`) drive any follow-up emails. Does not establish a session — the client logs in afterwards.
4601
4601
  */
4602
4602
  post: operations["signup"];
4603
4603
  delete?: never;
@@ -6950,6 +6950,8 @@ export interface components {
6950
6950
  * - `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.
6951
6951
  * - `signup_disabled` (403): Self-service sign-up is disabled on this connection.
6952
6952
  * - `email_taken` (409): Another user in this account already uses that email.
6953
+ * - `username_taken` (409): Another user of this database connection already uses that username.
6954
+ * - `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.
6953
6955
  * - `invalid_email` (400): The email address is not valid.
6954
6956
  * - `invalid_name` (400): The name contains a link. `message` says which field.
6955
6957
  * - `same_email` (400): The new email is the same as the current one.
@@ -7038,7 +7040,7 @@ export interface components {
7038
7040
  * - `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.
7039
7041
  * @enum {string}
7040
7042
  */
7041
- 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";
7043
+ 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" | "username_taken" | "invalid_username" | "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";
7042
7044
  /** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
7043
7045
  ErrorResponse: {
7044
7046
  /** @description The HTTP status, repeated. */
@@ -30468,10 +30470,12 @@ export interface operations {
30468
30470
  requestBody: {
30469
30471
  content: {
30470
30472
  "application/json": {
30471
- /** @description Email login identifier. */
30472
- email: string;
30473
- /** @description Plaintext password (validated against the connection policy, hashed on write). */
30474
- password: string;
30473
+ /** @description Email login identifier. Required unless the connection signs in by username, and whenever `password` is omitted. */
30474
+ email?: string;
30475
+ /** @description Username login identifier, stored as typed (case-sensitive). Required on a connection whose `login_identifier` is `username`; rejected on an `email` one. No `@` or whitespace. */
30476
+ username?: string;
30477
+ /** @description Plaintext password (validated against the connection policy, hashed on write). Omit it to create the user without one: they set it through the password reset email. */
30478
+ password?: string;
30475
30479
  name?: string;
30476
30480
  given_name?: string;
30477
30481
  family_name?: string;
@@ -30492,7 +30496,11 @@ export interface operations {
30492
30496
  content?: never;
30493
30497
  };
30494
30498
  /**
30495
- * @description `invalid_connection` — The connection does not exist, is disabled, or is not of the type this flow needs.
30499
+ * @description `bad_request` — The request is malformed. `message` says what is wrong.
30500
+ *
30501
+ * `invalid_connection` — The connection does not exist, is disabled, or is not of the type this flow needs.
30502
+ *
30503
+ * `invalid_username` — The username is empty, or contains an `@` or whitespace. `message` says which.
30496
30504
  *
30497
30505
  * `password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.
30498
30506
  *
@@ -30505,7 +30513,7 @@ export interface operations {
30505
30513
  content: {
30506
30514
  "application/json": components["schemas"]["ErrorResponse"] & {
30507
30515
  /** @enum {string} */
30508
- error_code?: "invalid_connection" | "password_too_weak" | "validation_error";
30516
+ error_code?: "bad_request" | "invalid_connection" | "invalid_username" | "password_too_weak" | "validation_error";
30509
30517
  };
30510
30518
  };
30511
30519
  };
@@ -30537,7 +30545,11 @@ export interface operations {
30537
30545
  };
30538
30546
  };
30539
30547
  };
30540
- /** @description `email_taken` — Another user in this account already uses that email. */
30548
+ /**
30549
+ * @description `email_taken` — Another user in this account already uses that email.
30550
+ *
30551
+ * `username_taken` — Another user of this database connection already uses that username.
30552
+ */
30541
30553
  409: {
30542
30554
  headers: {
30543
30555
  [name: string]: unknown;
@@ -30545,7 +30557,7 @@ export interface operations {
30545
30557
  content: {
30546
30558
  "application/json": components["schemas"]["ErrorResponse"] & {
30547
30559
  /** @enum {string} */
30548
- error_code?: "email_taken";
30560
+ error_code?: "email_taken" | "username_taken";
30549
30561
  };
30550
30562
  };
30551
30563
  };
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.76";
12
+ export const version = "2.7.77";
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 = "07be5e1";
18
+ export const commit = "dacc281";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.7.76",
3
+ "version": "2.7.77",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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.61.0",
6
+ "version": "2.62.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- `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.",
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- `username_taken` (409): Another user of this database connection already uses that username.\n- `invalid_username` (400): The username is empty, or contains an `@` or whitespace. `message` says which.\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",
@@ -7562,6 +7562,8 @@
7562
7562
  "m2m_quota_exceeded",
7563
7563
  "signup_disabled",
7564
7564
  "email_taken",
7565
+ "username_taken",
7566
+ "invalid_username",
7565
7567
  "invalid_email",
7566
7568
  "invalid_name",
7567
7569
  "same_email",
@@ -65825,25 +65827,25 @@
65825
65827
  "tags": [
65826
65828
  "dbconnection"
65827
65829
  ],
65828
- "description": "Creates a new user and database credential (email + password) in a single call against the tenant database connection. Public and account-scoped (no management token). Gated per-connection by `disable_signup`. The user is created with `email_verified: false`; the account notification settings (`verify_email_auto_send`, `welcome_email_enabled`) drive any follow-up emails. Does not establish a session — the client logs in afterwards.",
65830
+ "description": "Creates a new user and database credential in a single call against the tenant database connection. The identifier follows the connection `login_identifier` (email, username, or either); the password is optional, and a user created without one sets it through the password reset email. Public and account-scoped (no management token). Gated per-connection by `disable_signup`. The user is created with `email_verified: false`; the account notification settings (`verify_email_auto_send`, `welcome_email_enabled`) drive any follow-up emails. Does not establish a session — the client logs in afterwards.",
65829
65831
  "requestBody": {
65830
65832
  "required": true,
65831
65833
  "content": {
65832
65834
  "application/json": {
65833
65835
  "schema": {
65834
65836
  "type": "object",
65835
- "required": [
65836
- "email",
65837
- "password"
65838
- ],
65839
65837
  "properties": {
65840
65838
  "email": {
65841
65839
  "type": "string",
65842
- "description": "Email login identifier."
65840
+ "description": "Email login identifier. Required unless the connection signs in by username, and whenever `password` is omitted."
65841
+ },
65842
+ "username": {
65843
+ "type": "string",
65844
+ "description": "Username login identifier, stored as typed (case-sensitive). Required on a connection whose `login_identifier` is `username`; rejected on an `email` one. No `@` or whitespace."
65843
65845
  },
65844
65846
  "password": {
65845
65847
  "type": "string",
65846
- "description": "Plaintext password (validated against the connection policy, hashed on write)."
65848
+ "description": "Plaintext password (validated against the connection policy, hashed on write). Omit it to create the user without one: they set it through the password reset email."
65847
65849
  },
65848
65850
  "name": {
65849
65851
  "type": "string"
@@ -65873,7 +65875,7 @@
65873
65875
  "description": "Default Response"
65874
65876
  },
65875
65877
  "400": {
65876
- "description": "`invalid_connection` — The connection does not exist, is disabled, or is not of the type this flow needs.\n\n`password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
65878
+ "description": "`bad_request` — The request is malformed. `message` says what is wrong.\n\n`invalid_connection` — The connection does not exist, is disabled, or is not of the type this flow needs.\n\n`invalid_username` — The username is empty, or contains an `@` or whitespace. `message` says which.\n\n`password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
65877
65879
  "content": {
65878
65880
  "application/json": {
65879
65881
  "schema": {
@@ -65887,7 +65889,9 @@
65887
65889
  "error_code": {
65888
65890
  "type": "string",
65889
65891
  "enum": [
65892
+ "bad_request",
65890
65893
  "invalid_connection",
65894
+ "invalid_username",
65891
65895
  "password_too_weak",
65892
65896
  "validation_error"
65893
65897
  ]
@@ -65951,7 +65955,7 @@
65951
65955
  }
65952
65956
  },
65953
65957
  "409": {
65954
- "description": "`email_taken` — Another user in this account already uses that email.",
65958
+ "description": "`email_taken` — Another user in this account already uses that email.\n\n`username_taken` — Another user of this database connection already uses that username.",
65955
65959
  "content": {
65956
65960
  "application/json": {
65957
65961
  "schema": {
@@ -65965,7 +65969,8 @@
65965
65969
  "error_code": {
65966
65970
  "type": "string",
65967
65971
  "enum": [
65968
- "email_taken"
65972
+ "email_taken",
65973
+ "username_taken"
65969
65974
  ]
65970
65975
  }
65971
65976
  }