@faable/auth-sdk 2.7.103 → 2.7.105

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.
@@ -284,6 +284,26 @@ export interface paths {
284
284
  patch?: never;
285
285
  trace?: never;
286
286
  };
287
+ "/internal/accounts": {
288
+ parameters: {
289
+ query?: never;
290
+ header?: never;
291
+ path?: never;
292
+ cookie?: never;
293
+ };
294
+ /**
295
+ * Every tenant with its usage counters (platform)
296
+ * @description All accounts on the platform, each with its users, clients, connections, last login, first end-user login and whether it has a verified custom domain. Platform token with `read:accounts`.
297
+ */
298
+ get: operations["internal/accountsOverview"];
299
+ put?: never;
300
+ post?: never;
301
+ delete?: never;
302
+ options?: never;
303
+ head?: never;
304
+ patch?: never;
305
+ trace?: never;
306
+ };
287
307
  "/account/{account_id}/transfer": {
288
308
  parameters: {
289
309
  query?: never;
@@ -4512,7 +4532,7 @@ export interface paths {
4512
4532
  head?: never;
4513
4533
  /**
4514
4534
  * Update current User profile
4515
- * @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name` and `country_iso` can be changed; `company_name` is merged into `user_metadata` without touching its other keys. A Bearer token must belong to this Account.
4535
+ * @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso` and the custom `fields` the application declares (`profile_fields`) can be changed; `company_name` and `fields` are merged into `user_metadata` without touching its other keys. A Bearer token must belong to this Account.
4516
4536
  */
4517
4537
  patch: operations["session/me_update"];
4518
4538
  trace?: never;
@@ -4557,6 +4577,46 @@ export interface paths {
4557
4577
  patch?: never;
4558
4578
  trace?: never;
4559
4579
  };
4580
+ "/me/credentials": {
4581
+ parameters: {
4582
+ query?: never;
4583
+ header?: never;
4584
+ path?: never;
4585
+ cookie?: never;
4586
+ };
4587
+ /**
4588
+ * How the current User signs in
4589
+ * @description Whether the User behind the session or bearer token has a password, and which connections they are linked to. A Bearer token must belong to this Account and be a user token.
4590
+ */
4591
+ get: operations["session/me_credentials"];
4592
+ put?: never;
4593
+ post?: never;
4594
+ delete?: never;
4595
+ options?: never;
4596
+ head?: never;
4597
+ patch?: never;
4598
+ trace?: never;
4599
+ };
4600
+ "/me/password": {
4601
+ parameters: {
4602
+ query?: never;
4603
+ header?: never;
4604
+ path?: never;
4605
+ cookie?: never;
4606
+ };
4607
+ get?: never;
4608
+ put?: never;
4609
+ /**
4610
+ * Set or change the current User password
4611
+ * @description Sets the password of the User behind the session or bearer token, creating their `database` credential if they have none (e.g. they signed up with Google). Changing an existing password needs `current_password`. Setting the first one needs a verified email and a recent sign-in: `auth_time` within 5 minutes and, when the User has a second factor, a sign-in that completed it (`acr` = `urn:faable:loa:2`); otherwise `reauth_required`, and the app signs in again with `max_age=0`. The connection's password policy applies. Every other session of the User is revoked, and the User gets a security email. A Bearer token must belong to this Account and be a user token.
4612
+ */
4613
+ post: operations["session/me_password"];
4614
+ delete?: never;
4615
+ options?: never;
4616
+ head?: never;
4617
+ patch?: never;
4618
+ trace?: never;
4619
+ };
4560
4620
  "/logout": {
4561
4621
  parameters: {
4562
4622
  query?: never;
@@ -5565,6 +5625,17 @@ export interface components {
5565
5625
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
5566
5626
  theme?: "system" | "light" | "dark";
5567
5627
  };
5628
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
5629
+ profile_fields?: {
5630
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
5631
+ key: string;
5632
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
5633
+ type: "string" | "enum";
5634
+ /** @description The accepted values when `type` is `enum`. */
5635
+ options?: string[];
5636
+ /** @description Longest accepted value for a `string` field. Default 200. */
5637
+ max_length?: number;
5638
+ }[];
5568
5639
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
5569
5640
  login_flow?: string | null;
5570
5641
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -5900,6 +5971,17 @@ export interface components {
5900
5971
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
5901
5972
  theme?: "system" | "light" | "dark";
5902
5973
  };
5974
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
5975
+ profile_fields?: {
5976
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
5977
+ key: string;
5978
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
5979
+ type: "string" | "enum";
5980
+ /** @description The accepted values when `type` is `enum`. */
5981
+ options?: string[];
5982
+ /** @description Longest accepted value for a `string` field. Default 200. */
5983
+ max_length?: number;
5984
+ }[];
5903
5985
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
5904
5986
  mfa_policy?: {
5905
5987
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -6043,6 +6125,17 @@ export interface components {
6043
6125
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
6044
6126
  theme?: "system" | "light" | "dark";
6045
6127
  } | null;
6128
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
6129
+ profile_fields?: {
6130
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
6131
+ key: string;
6132
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
6133
+ type: "string" | "enum";
6134
+ /** @description The accepted values when `type` is `enum`. */
6135
+ options?: string[];
6136
+ /** @description Longest accepted value for a `string` field. Default 200. */
6137
+ max_length?: number;
6138
+ }[] | null;
6046
6139
  mfa_policy?: {
6047
6140
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
6048
6141
  mode?: "off" | "optional" | "required";
@@ -7630,8 +7723,8 @@ export interface components {
7630
7723
  expires_at: string;
7631
7724
  /** Format: date-time */
7632
7725
  revoked_at?: string;
7633
- /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. */
7634
- revoked_reason?: "admin" | "logout" | "user";
7726
+ /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. `password_change`: the user set or changed their password, which ends every other session. */
7727
+ revoked_reason?: "admin" | "logout" | "user" | "password_change";
7635
7728
  /** @description Object is related with this account */
7636
7729
  account: string;
7637
7730
  /**
@@ -7906,6 +7999,17 @@ export interface components {
7906
7999
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
7907
8000
  theme?: "system" | "light" | "dark";
7908
8001
  } | null;
8002
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
8003
+ profile_fields?: {
8004
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
8005
+ key: string;
8006
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
8007
+ type: "string" | "enum";
8008
+ /** @description The accepted values when `type` is `enum`. */
8009
+ options?: string[];
8010
+ /** @description Longest accepted value for a `string` field. Default 200. */
8011
+ max_length?: number;
8012
+ }[] | null;
7909
8013
  mfa_policy?: {
7910
8014
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
7911
8015
  mode?: "off" | "optional" | "required";
@@ -8116,6 +8220,10 @@ export interface components {
8116
8220
  * - `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.
8117
8221
  * - `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.
8118
8222
  * - `step_up_required` (403): Confirm an existing factor before changing your factors.
8223
+ * - `reauth_required` (403): The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.
8224
+ * - `invalid_current_password` (400): The current password is wrong.
8225
+ * - `email_not_verified` (403): The user's email is not verified, and the operation needs it to be.
8226
+ * - `invalid_profile_field` (400): A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.
8119
8227
  * - `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.
8120
8228
  * - `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.
8121
8229
  * - `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.
@@ -8170,7 +8278,7 @@ export interface components {
8170
8278
  * - `delivery_in_progress` (409): The delivery is being attempted right now; retry the redeliver in a minute.
8171
8279
  * @enum {string}
8172
8280
  */
8173
- 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" | "invalid_saml_request" | "saml_sp_mismatch" | "saml_not_enabled" | "invalid_saml_sp" | "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" | "consent_options_unavailable" | "consent_choice_invalid" | "registration_disabled" | "invalid_email_domain" | "public_email_domain" | "organization_domain_not_found" | "organization_domain_taken" | "organization_domain_unverified" | "plan_unavailable" | "organization_domain_mismatch" | "team_not_in_organization" | "organization_has_no_idp" | "organization_not_found" | "invalid_user" | "not_an_organization_admin" | "last_organization_admin" | "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";
8281
+ 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" | "invalid_saml_request" | "saml_sp_mismatch" | "saml_not_enabled" | "invalid_saml_sp" | "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" | "reauth_required" | "invalid_current_password" | "email_not_verified" | "invalid_profile_field" | "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" | "consent_options_unavailable" | "consent_choice_invalid" | "registration_disabled" | "invalid_email_domain" | "public_email_domain" | "organization_domain_not_found" | "organization_domain_taken" | "organization_domain_unverified" | "plan_unavailable" | "organization_domain_mismatch" | "team_not_in_organization" | "organization_has_no_idp" | "organization_not_found" | "invalid_user" | "not_an_organization_admin" | "last_organization_admin" | "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";
8174
8282
  /** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
8175
8283
  ErrorResponse: {
8176
8284
  /** @description The HTTP status, repeated. */
@@ -8304,6 +8412,17 @@ export interface operations {
8304
8412
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
8305
8413
  theme?: "system" | "light" | "dark";
8306
8414
  };
8415
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
8416
+ profile_fields?: {
8417
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
8418
+ key: string;
8419
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
8420
+ type: "string" | "enum";
8421
+ /** @description The accepted values when `type` is `enum`. */
8422
+ options?: string[];
8423
+ /** @description Longest accepted value for a `string` field. Default 200. */
8424
+ max_length?: number;
8425
+ }[];
8307
8426
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
8308
8427
  login_flow?: string | null;
8309
8428
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -8663,6 +8782,17 @@ export interface operations {
8663
8782
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
8664
8783
  theme?: "system" | "light" | "dark";
8665
8784
  };
8785
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
8786
+ profile_fields?: {
8787
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
8788
+ key: string;
8789
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
8790
+ type: "string" | "enum";
8791
+ /** @description The accepted values when `type` is `enum`. */
8792
+ options?: string[];
8793
+ /** @description Longest accepted value for a `string` field. Default 200. */
8794
+ max_length?: number;
8795
+ }[];
8666
8796
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
8667
8797
  login_flow?: string | null;
8668
8798
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -8910,6 +9040,17 @@ export interface operations {
8910
9040
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
8911
9041
  theme?: "system" | "light" | "dark";
8912
9042
  };
9043
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
9044
+ profile_fields?: {
9045
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
9046
+ key: string;
9047
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
9048
+ type: "string" | "enum";
9049
+ /** @description The accepted values when `type` is `enum`. */
9050
+ options?: string[];
9051
+ /** @description Longest accepted value for a `string` field. Default 200. */
9052
+ max_length?: number;
9053
+ }[];
8913
9054
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
8914
9055
  login_flow?: string | null;
8915
9056
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -9113,6 +9254,17 @@ export interface operations {
9113
9254
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
9114
9255
  theme?: "system" | "light" | "dark";
9115
9256
  } | null;
9257
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
9258
+ profile_fields?: {
9259
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
9260
+ key: string;
9261
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
9262
+ type: "string" | "enum";
9263
+ /** @description The accepted values when `type` is `enum`. */
9264
+ options?: string[];
9265
+ /** @description Longest accepted value for a `string` field. Default 200. */
9266
+ max_length?: number;
9267
+ }[] | null;
9116
9268
  mfa_policy?: {
9117
9269
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
9118
9270
  mode?: "off" | "optional" | "required";
@@ -9234,6 +9386,17 @@ export interface operations {
9234
9386
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
9235
9387
  theme?: "system" | "light" | "dark";
9236
9388
  };
9389
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
9390
+ profile_fields?: {
9391
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
9392
+ key: string;
9393
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
9394
+ type: "string" | "enum";
9395
+ /** @description The accepted values when `type` is `enum`. */
9396
+ options?: string[];
9397
+ /** @description Longest accepted value for a `string` field. Default 200. */
9398
+ max_length?: number;
9399
+ }[];
9237
9400
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
9238
9401
  login_flow?: string | null;
9239
9402
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -10236,6 +10399,106 @@ export interface operations {
10236
10399
  };
10237
10400
  };
10238
10401
  };
10402
+ "internal/accountsOverview": {
10403
+ parameters: {
10404
+ query?: never;
10405
+ header?: never;
10406
+ path?: never;
10407
+ cookie?: never;
10408
+ };
10409
+ requestBody?: never;
10410
+ responses: {
10411
+ /** @description Default Response */
10412
+ 200: {
10413
+ headers: {
10414
+ [name: string]: unknown;
10415
+ };
10416
+ content: {
10417
+ "application/json": {
10418
+ rows: {
10419
+ account_id: string;
10420
+ /** @description The project (`team_<hex>`), or null for a legacy account without one. */
10421
+ team: string | null;
10422
+ name: string;
10423
+ createdAt: string | null;
10424
+ first_login_at: string | null;
10425
+ users: number;
10426
+ last_login: string | null;
10427
+ clients: number;
10428
+ connections: number;
10429
+ custom_domain_verified: boolean;
10430
+ }[];
10431
+ };
10432
+ };
10433
+ };
10434
+ /** @description `unauthorized` — The request carries no valid credentials. */
10435
+ 401: {
10436
+ headers: {
10437
+ [name: string]: unknown;
10438
+ };
10439
+ content: {
10440
+ "application/json": components["schemas"]["ErrorResponse"] & {
10441
+ /** @enum {string} */
10442
+ error_code?: "unauthorized";
10443
+ };
10444
+ };
10445
+ };
10446
+ /**
10447
+ * @description `forbidden` — The credentials are valid but do not allow this operation.
10448
+ *
10449
+ * `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
10450
+ *
10451
+ * `user_suspended` — The user is suspended and cannot sign in or be modified.
10452
+ */
10453
+ 403: {
10454
+ headers: {
10455
+ [name: string]: unknown;
10456
+ };
10457
+ content: {
10458
+ "application/json": components["schemas"]["ErrorResponse"] & {
10459
+ /** @enum {string} */
10460
+ error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
10461
+ };
10462
+ };
10463
+ };
10464
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
10465
+ 404: {
10466
+ headers: {
10467
+ [name: string]: unknown;
10468
+ };
10469
+ content: {
10470
+ "application/json": components["schemas"]["ErrorResponse"] & {
10471
+ /** @enum {string} */
10472
+ error_code?: "account_not_found";
10473
+ };
10474
+ };
10475
+ };
10476
+ /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
10477
+ 429: {
10478
+ headers: {
10479
+ [name: string]: unknown;
10480
+ };
10481
+ content: {
10482
+ "application/json": components["schemas"]["ErrorResponse"] & {
10483
+ /** @enum {string} */
10484
+ error_code?: "too_many_requests";
10485
+ };
10486
+ };
10487
+ };
10488
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
10489
+ 500: {
10490
+ headers: {
10491
+ [name: string]: unknown;
10492
+ };
10493
+ content: {
10494
+ "application/json": components["schemas"]["ErrorResponse"] & {
10495
+ /** @enum {string} */
10496
+ error_code?: "internal_error";
10497
+ };
10498
+ };
10499
+ };
10500
+ };
10501
+ };
10239
10502
  "account/transfer": {
10240
10503
  parameters: {
10241
10504
  query?: never;
@@ -10504,6 +10767,17 @@ export interface operations {
10504
10767
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
10505
10768
  theme?: "system" | "light" | "dark";
10506
10769
  };
10770
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
10771
+ profile_fields?: {
10772
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
10773
+ key: string;
10774
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
10775
+ type: "string" | "enum";
10776
+ /** @description The accepted values when `type` is `enum`. */
10777
+ options?: string[];
10778
+ /** @description Longest accepted value for a `string` field. Default 200. */
10779
+ max_length?: number;
10780
+ }[];
10507
10781
  /** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
10508
10782
  login_flow?: string | null;
10509
10783
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
@@ -12124,6 +12398,17 @@ export interface operations {
12124
12398
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
12125
12399
  theme?: "system" | "light" | "dark";
12126
12400
  };
12401
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
12402
+ profile_fields?: {
12403
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
12404
+ key: string;
12405
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
12406
+ type: "string" | "enum";
12407
+ /** @description The accepted values when `type` is `enum`. */
12408
+ options?: string[];
12409
+ /** @description Longest accepted value for a `string` field. Default 200. */
12410
+ max_length?: number;
12411
+ }[];
12127
12412
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
12128
12413
  mfa_policy?: {
12129
12414
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -12348,6 +12633,17 @@ export interface operations {
12348
12633
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
12349
12634
  theme?: "system" | "light" | "dark";
12350
12635
  };
12636
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
12637
+ profile_fields?: {
12638
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
12639
+ key: string;
12640
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
12641
+ type: "string" | "enum";
12642
+ /** @description The accepted values when `type` is `enum`. */
12643
+ options?: string[];
12644
+ /** @description Longest accepted value for a `string` field. Default 200. */
12645
+ max_length?: number;
12646
+ }[];
12351
12647
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
12352
12648
  mfa_policy?: {
12353
12649
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -12568,6 +12864,17 @@ export interface operations {
12568
12864
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
12569
12865
  theme?: "system" | "light" | "dark";
12570
12866
  } | null;
12867
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
12868
+ profile_fields?: {
12869
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
12870
+ key: string;
12871
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
12872
+ type: "string" | "enum";
12873
+ /** @description The accepted values when `type` is `enum`. */
12874
+ options?: string[];
12875
+ /** @description Longest accepted value for a `string` field. Default 200. */
12876
+ max_length?: number;
12877
+ }[] | null;
12571
12878
  mfa_policy?: {
12572
12879
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
12573
12880
  mode?: "off" | "optional" | "required";
@@ -12686,6 +12993,17 @@ export interface operations {
12686
12993
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
12687
12994
  theme?: "system" | "light" | "dark";
12688
12995
  };
12996
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
12997
+ profile_fields?: {
12998
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
12999
+ key: string;
13000
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
13001
+ type: "string" | "enum";
13002
+ /** @description The accepted values when `type` is `enum`. */
13003
+ options?: string[];
13004
+ /** @description Longest accepted value for a `string` field. Default 200. */
13005
+ max_length?: number;
13006
+ }[];
12689
13007
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
12690
13008
  mfa_policy?: {
12691
13009
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -12916,6 +13234,17 @@ export interface operations {
12916
13234
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
12917
13235
  theme?: "system" | "light" | "dark";
12918
13236
  };
13237
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
13238
+ profile_fields?: {
13239
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
13240
+ key: string;
13241
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
13242
+ type: "string" | "enum";
13243
+ /** @description The accepted values when `type` is `enum`. */
13244
+ options?: string[];
13245
+ /** @description Longest accepted value for a `string` field. Default 200. */
13246
+ max_length?: number;
13247
+ }[];
12919
13248
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
12920
13249
  mfa_policy?: {
12921
13250
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -13144,6 +13473,17 @@ export interface operations {
13144
13473
  /** @description Colour theme of the hosted login screens. `system` (the default): the visitor's OS decides, and the visitor can switch it from the screen. `light` / `dark`: forced, and the switch is hidden — for applications whose own pages are only one of the two. A `theme` query parameter on `/authorize` overrides this for that login. */
13145
13474
  theme?: "system" | "light" | "dark";
13146
13475
  };
13476
+ /** @description Profile fields the user may write on themselves with `PATCH /me` (`fields`), stored in `user_metadata["faable.com/fields"]`. On a Client it replaces the account's list entirely; absent = inherit. */
13477
+ profile_fields?: {
13478
+ /** @description The field key, as it is stored in `user_metadata["faable.com/fields"]`. */
13479
+ key: string;
13480
+ /** @description `string`: free text up to `max_length`. `enum`: one of `options`. */
13481
+ type: "string" | "enum";
13482
+ /** @description The accepted values when `type` is `enum`. */
13483
+ options?: string[];
13484
+ /** @description Longest accepted value for a `string` field. Default 200. */
13485
+ max_length?: number;
13486
+ }[];
13147
13487
  /** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
13148
13488
  mfa_policy?: {
13149
13489
  /** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
@@ -29941,8 +30281,8 @@ export interface operations {
29941
30281
  expires_at: string;
29942
30282
  /** Format: date-time */
29943
30283
  revoked_at?: string;
29944
- /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. */
29945
- revoked_reason?: "admin" | "logout" | "user";
30284
+ /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. `password_change`: the user set or changed their password, which ends every other session. */
30285
+ revoked_reason?: "admin" | "logout" | "user" | "password_change";
29946
30286
  /** @description Object is related with this account */
29947
30287
  account: string;
29948
30288
  /**
@@ -30096,8 +30436,8 @@ export interface operations {
30096
30436
  expires_at: string;
30097
30437
  /** Format: date-time */
30098
30438
  revoked_at?: string;
30099
- /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. */
30100
- revoked_reason?: "admin" | "logout" | "user";
30439
+ /** @description `admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device. `password_change`: the user set or changed their password, which ends every other session. */
30440
+ revoked_reason?: "admin" | "logout" | "user" | "password_change";
30101
30441
  /** @description Object is related with this account */
30102
30442
  account: string;
30103
30443
  /**
@@ -31566,6 +31906,18 @@ export interface operations {
31566
31906
  };
31567
31907
  };
31568
31908
  };
31909
+ /** @description `forbidden` — The credentials are valid but do not allow this operation. */
31910
+ 403: {
31911
+ headers: {
31912
+ [name: string]: unknown;
31913
+ };
31914
+ content: {
31915
+ "application/json": components["schemas"]["ErrorResponse"] & {
31916
+ /** @enum {string} */
31917
+ error_code?: "forbidden";
31918
+ };
31919
+ };
31920
+ };
31569
31921
  /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
31570
31922
  404: {
31571
31923
  headers: {
@@ -31693,13 +32045,18 @@ export interface operations {
31693
32045
  path?: never;
31694
32046
  cookie?: never;
31695
32047
  };
31696
- /** @description Profile fields the current User may edit on themselves. `company_name` is stored in `user_metadata`, merged with whatever else is there. */
32048
+ /** @description Profile fields the current User may edit on themselves. `company_name` and `fields` are stored in `user_metadata`, merged with whatever else is there. */
31697
32049
  requestBody: {
31698
32050
  content: {
31699
32051
  "application/json": {
31700
32052
  name?: string;
31701
32053
  company_name?: string;
31702
32054
  country_iso?: string;
32055
+ /** @description Custom profile fields, stored in `user_metadata["faable.com/fields"]` and merged by key: keys not named here are kept, `null` removes one. Only the keys the application declares in `profile_fields` (Client, else Account) are accepted; any other key fails the whole request with `invalid_profile_field`. */
32056
+ fields?: {
32057
+ key: string;
32058
+ value: string | null;
32059
+ }[];
31703
32060
  };
31704
32061
  };
31705
32062
  };
@@ -31840,6 +32197,8 @@ export interface operations {
31840
32197
  /**
31841
32198
  * @description `bad_request` — The request is malformed. `message` says what is wrong.
31842
32199
  *
32200
+ * `invalid_profile_field` — A profile field is not declared for this application, or its value does not match the declaration. `message` names the key.
32201
+ *
31843
32202
  * `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
31844
32203
  */
31845
32204
  400: {
@@ -31849,7 +32208,7 @@ export interface operations {
31849
32208
  content: {
31850
32209
  "application/json": components["schemas"]["ErrorResponse"] & {
31851
32210
  /** @enum {string} */
31852
- error_code?: "bad_request" | "validation_error";
32211
+ error_code?: "bad_request" | "invalid_profile_field" | "validation_error";
31853
32212
  };
31854
32213
  };
31855
32214
  };
@@ -32070,6 +32429,238 @@ export interface operations {
32070
32429
  };
32071
32430
  };
32072
32431
  };
32432
+ "session/me_credentials": {
32433
+ parameters: {
32434
+ query?: never;
32435
+ header?: never;
32436
+ path?: never;
32437
+ cookie?: never;
32438
+ };
32439
+ requestBody?: never;
32440
+ responses: {
32441
+ /** @description Default Response */
32442
+ 200: {
32443
+ headers: {
32444
+ [name: string]: unknown;
32445
+ };
32446
+ content: {
32447
+ "application/json": {
32448
+ /** @description Whether the user can sign in with a password: they have a `database` credential with a password set. */
32449
+ has_password: boolean;
32450
+ /** @description Every connection the user is linked to: the database one when they have a password, and each social or enterprise identity. Never the provider tokens or profile. */
32451
+ connections: {
32452
+ /** @description The Connection id (`connection_xxx`). */
32453
+ id: string;
32454
+ /** @description The Connection name. */
32455
+ name: string;
32456
+ /** @description The Connection type: `database`, `google`, `github`, … */
32457
+ type: string;
32458
+ }[];
32459
+ };
32460
+ };
32461
+ };
32462
+ /**
32463
+ * @description `mfa_pending` — A second-factor challenge is pending; answer it before continuing.
32464
+ *
32465
+ * `not_logged_in` — There is no signed-in session for this request.
32466
+ */
32467
+ 401: {
32468
+ headers: {
32469
+ [name: string]: unknown;
32470
+ };
32471
+ content: {
32472
+ "application/json": components["schemas"]["ErrorResponse"] & {
32473
+ /** @enum {string} */
32474
+ error_code?: "mfa_pending" | "not_logged_in";
32475
+ };
32476
+ };
32477
+ };
32478
+ /** @description `forbidden` — The credentials are valid but do not allow this operation. */
32479
+ 403: {
32480
+ headers: {
32481
+ [name: string]: unknown;
32482
+ };
32483
+ content: {
32484
+ "application/json": components["schemas"]["ErrorResponse"] & {
32485
+ /** @enum {string} */
32486
+ error_code?: "forbidden";
32487
+ };
32488
+ };
32489
+ };
32490
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
32491
+ 404: {
32492
+ headers: {
32493
+ [name: string]: unknown;
32494
+ };
32495
+ content: {
32496
+ "application/json": components["schemas"]["ErrorResponse"] & {
32497
+ /** @enum {string} */
32498
+ error_code?: "account_not_found";
32499
+ };
32500
+ };
32501
+ };
32502
+ /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
32503
+ 429: {
32504
+ headers: {
32505
+ [name: string]: unknown;
32506
+ };
32507
+ content: {
32508
+ "application/json": components["schemas"]["ErrorResponse"] & {
32509
+ /** @enum {string} */
32510
+ error_code?: "too_many_requests";
32511
+ };
32512
+ };
32513
+ };
32514
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
32515
+ 500: {
32516
+ headers: {
32517
+ [name: string]: unknown;
32518
+ };
32519
+ content: {
32520
+ "application/json": components["schemas"]["ErrorResponse"] & {
32521
+ /** @enum {string} */
32522
+ error_code?: "internal_error";
32523
+ };
32524
+ };
32525
+ };
32526
+ };
32527
+ };
32528
+ "session/me_password": {
32529
+ parameters: {
32530
+ query?: never;
32531
+ header?: never;
32532
+ path?: never;
32533
+ cookie?: never;
32534
+ };
32535
+ requestBody: {
32536
+ content: {
32537
+ "application/json": {
32538
+ password: string;
32539
+ current_password?: string;
32540
+ };
32541
+ };
32542
+ };
32543
+ responses: {
32544
+ /** @description Default Response */
32545
+ 200: {
32546
+ headers: {
32547
+ [name: string]: unknown;
32548
+ };
32549
+ content: {
32550
+ "application/json": {
32551
+ /** @description How many other sessions of the user were ended. */
32552
+ revoked_sessions: number;
32553
+ };
32554
+ };
32555
+ };
32556
+ /**
32557
+ * @description `invalid_current_password` — The current password is wrong.
32558
+ *
32559
+ * `password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.
32560
+ *
32561
+ * `no_database_connection` — The tenant has no database connection, so there is nowhere to store a password. Create one and retry.
32562
+ *
32563
+ * `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
32564
+ */
32565
+ 400: {
32566
+ headers: {
32567
+ [name: string]: unknown;
32568
+ };
32569
+ content: {
32570
+ "application/json": components["schemas"]["ErrorResponse"] & {
32571
+ /** @enum {string} */
32572
+ error_code?: "invalid_current_password" | "password_too_weak" | "no_database_connection" | "validation_error";
32573
+ };
32574
+ };
32575
+ };
32576
+ /**
32577
+ * @description `mfa_pending` — A second-factor challenge is pending; answer it before continuing.
32578
+ *
32579
+ * `not_logged_in` — There is no signed-in session for this request.
32580
+ */
32581
+ 401: {
32582
+ headers: {
32583
+ [name: string]: unknown;
32584
+ };
32585
+ content: {
32586
+ "application/json": components["schemas"]["ErrorResponse"] & {
32587
+ /** @enum {string} */
32588
+ error_code?: "mfa_pending" | "not_logged_in";
32589
+ };
32590
+ };
32591
+ };
32592
+ /**
32593
+ * @description `forbidden` — The credentials are valid but do not allow this operation.
32594
+ *
32595
+ * `reauth_required` — The operation needs a recent sign-in (and the second factor, when the user has one). Sign in again with `max_age=0` and retry with the new token.
32596
+ *
32597
+ * `email_not_verified` — The user's email is not verified, and the operation needs it to be.
32598
+ */
32599
+ 403: {
32600
+ headers: {
32601
+ [name: string]: unknown;
32602
+ };
32603
+ content: {
32604
+ "application/json": components["schemas"]["ErrorResponse"] & {
32605
+ /** @enum {string} */
32606
+ error_code?: "forbidden" | "reauth_required" | "email_not_verified";
32607
+ };
32608
+ };
32609
+ };
32610
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
32611
+ 404: {
32612
+ headers: {
32613
+ [name: string]: unknown;
32614
+ };
32615
+ content: {
32616
+ "application/json": components["schemas"]["ErrorResponse"] & {
32617
+ /** @enum {string} */
32618
+ error_code?: "account_not_found";
32619
+ };
32620
+ };
32621
+ };
32622
+ /** @description `conflict` — The request conflicts with the current state of the resource. */
32623
+ 409: {
32624
+ headers: {
32625
+ [name: string]: unknown;
32626
+ };
32627
+ content: {
32628
+ "application/json": components["schemas"]["ErrorResponse"] & {
32629
+ /** @enum {string} */
32630
+ error_code?: "conflict";
32631
+ };
32632
+ };
32633
+ };
32634
+ /**
32635
+ * @description `too_many_login_attempts` — Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.
32636
+ *
32637
+ * `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.
32638
+ */
32639
+ 429: {
32640
+ headers: {
32641
+ [name: string]: unknown;
32642
+ };
32643
+ content: {
32644
+ "application/json": components["schemas"]["ErrorResponse"] & {
32645
+ /** @enum {string} */
32646
+ error_code?: "too_many_login_attempts" | "too_many_requests";
32647
+ };
32648
+ };
32649
+ };
32650
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
32651
+ 500: {
32652
+ headers: {
32653
+ [name: string]: unknown;
32654
+ };
32655
+ content: {
32656
+ "application/json": components["schemas"]["ErrorResponse"] & {
32657
+ /** @enum {string} */
32658
+ error_code?: "internal_error";
32659
+ };
32660
+ };
32661
+ };
32662
+ };
32663
+ };
32073
32664
  "session/logout": {
32074
32665
  parameters: {
32075
32666
  query?: {