@faable/auth-sdk 2.9.38 → 2.9.40

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.
@@ -68,6 +68,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
68
68
  url: string;
69
69
  }[] | null | undefined;
70
70
  } | null | undefined;
71
+ email_footer?: {
72
+ text: string;
73
+ url?: string | undefined;
74
+ logo_src?: string | undefined;
75
+ } | null | undefined;
71
76
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
72
77
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
73
78
  login_methods?: {
@@ -1041,6 +1046,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
1041
1046
  callbacks: string[];
1042
1047
  logout_urls: string[];
1043
1048
  web_origins: string[];
1049
+ origin_branding?: {
1050
+ origin: string;
1051
+ name?: string | undefined;
1052
+ logo_src?: string | undefined;
1053
+ }[] | undefined;
1044
1054
  refresh_token: {
1045
1055
  expiration_mode: "expire" | "not-expire";
1046
1056
  infinite_token_lifetime: boolean;
@@ -1146,6 +1156,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
1146
1156
  callbacks: string[];
1147
1157
  logout_urls: string[];
1148
1158
  web_origins: string[];
1159
+ origin_branding?: {
1160
+ origin: string;
1161
+ name?: string | undefined;
1162
+ logo_src?: string | undefined;
1163
+ }[] | undefined;
1149
1164
  refresh_token: {
1150
1165
  expiration_mode: "expire" | "not-expire";
1151
1166
  infinite_token_lifetime: boolean;
@@ -1254,6 +1269,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
1254
1269
  callbacks: string[];
1255
1270
  logout_urls: string[];
1256
1271
  web_origins: string[];
1272
+ origin_branding?: {
1273
+ origin: string;
1274
+ name?: string | undefined;
1275
+ logo_src?: string | undefined;
1276
+ }[] | undefined;
1257
1277
  refresh_token: {
1258
1278
  expiration_mode: "expire" | "not-expire";
1259
1279
  infinite_token_lifetime: boolean;
@@ -1361,6 +1381,11 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
1361
1381
  callbacks: string[];
1362
1382
  logout_urls: string[];
1363
1383
  web_origins: string[];
1384
+ origin_branding?: {
1385
+ origin: string;
1386
+ name?: string | undefined;
1387
+ logo_src?: string | undefined;
1388
+ }[] | undefined;
1364
1389
  refresh_token: {
1365
1390
  expiration_mode: "expire" | "not-expire";
1366
1391
  infinite_token_lifetime: boolean;
@@ -67,6 +67,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
67
67
  url: string;
68
68
  }[] | null | undefined;
69
69
  } | null | undefined;
70
+ email_footer?: {
71
+ text: string;
72
+ url?: string | undefined;
73
+ logo_src?: string | undefined;
74
+ } | null | undefined;
70
75
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
71
76
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
72
77
  login_methods?: {
@@ -155,6 +160,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
155
160
  url: string;
156
161
  }[] | null | undefined;
157
162
  } | null | undefined;
163
+ email_footer?: {
164
+ text: string;
165
+ url?: string | undefined;
166
+ logo_src?: string | undefined;
167
+ } | null | undefined;
158
168
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
159
169
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
160
170
  login_methods?: {
@@ -263,6 +273,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
263
273
  url: string;
264
274
  }[] | null | undefined;
265
275
  } | null | undefined;
276
+ email_footer?: {
277
+ text: string;
278
+ url?: string | undefined;
279
+ logo_src?: string | undefined;
280
+ } | null | undefined;
266
281
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
267
282
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
268
283
  login_methods?: {
@@ -354,6 +369,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
354
369
  url: string;
355
370
  }[] | null | undefined;
356
371
  } | null | undefined;
372
+ email_footer?: {
373
+ text: string;
374
+ url?: string | undefined;
375
+ logo_src?: string | undefined;
376
+ } | null | undefined;
357
377
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
358
378
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
359
379
  login_methods?: {
@@ -493,6 +513,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
493
513
  url: string;
494
514
  }[] | null | undefined;
495
515
  } | null | undefined;
516
+ email_footer?: {
517
+ text: string;
518
+ url?: string | undefined;
519
+ logo_src?: string | undefined;
520
+ } | null | undefined;
496
521
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
497
522
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
498
523
  login_methods?: {
@@ -565,6 +590,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
565
590
  url: string;
566
591
  }[] | null | undefined;
567
592
  } | null | undefined;
593
+ email_footer?: {
594
+ text: string;
595
+ url?: string | undefined;
596
+ logo_src?: string | undefined;
597
+ } | null | undefined;
568
598
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
569
599
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
570
600
  login_methods?: {
@@ -640,6 +670,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
640
670
  url: string;
641
671
  }[] | null | undefined;
642
672
  } | null | undefined;
673
+ email_footer?: {
674
+ text: string;
675
+ url?: string | undefined;
676
+ logo_src?: string | undefined;
677
+ } | null | undefined;
643
678
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
644
679
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
645
680
  login_methods?: {
@@ -922,6 +957,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
922
957
  url: string;
923
958
  }[] | null | undefined;
924
959
  } | null | undefined;
960
+ email_footer?: {
961
+ text: string;
962
+ url?: string | undefined;
963
+ logo_src?: string | undefined;
964
+ } | null | undefined;
925
965
  email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
926
966
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
927
967
  login_methods?: {
@@ -1541,6 +1581,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
1541
1581
  callbacks: string[];
1542
1582
  logout_urls: string[];
1543
1583
  web_origins: string[];
1584
+ origin_branding?: {
1585
+ origin: string;
1586
+ name?: string | undefined;
1587
+ logo_src?: string | undefined;
1588
+ }[] | undefined;
1544
1589
  refresh_token: {
1545
1590
  expiration_mode: "expire" | "not-expire";
1546
1591
  infinite_token_lifetime: boolean;
@@ -1662,6 +1707,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
1662
1707
  callbacks: string[];
1663
1708
  logout_urls: string[];
1664
1709
  web_origins: string[];
1710
+ origin_branding?: {
1711
+ origin: string;
1712
+ name?: string | undefined;
1713
+ logo_src?: string | undefined;
1714
+ }[] | undefined;
1665
1715
  refresh_token: {
1666
1716
  expiration_mode: "expire" | "not-expire";
1667
1717
  infinite_token_lifetime: boolean;
@@ -1784,6 +1834,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
1784
1834
  callbacks: string[];
1785
1835
  logout_urls: string[];
1786
1836
  web_origins: string[];
1837
+ origin_branding?: {
1838
+ origin: string;
1839
+ name?: string | undefined;
1840
+ logo_src?: string | undefined;
1841
+ }[] | undefined;
1787
1842
  refresh_token: {
1788
1843
  expiration_mode: "expire" | "not-expire";
1789
1844
  infinite_token_lifetime: boolean;
@@ -1907,6 +1962,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
1907
1962
  callbacks: string[];
1908
1963
  logout_urls: string[];
1909
1964
  web_origins: string[];
1965
+ origin_branding?: {
1966
+ origin: string;
1967
+ name?: string | undefined;
1968
+ logo_src?: string | undefined;
1969
+ }[] | undefined;
1910
1970
  refresh_token: {
1911
1971
  expiration_mode: "expire" | "not-expire";
1912
1972
  infinite_token_lifetime: boolean;
@@ -2012,6 +2072,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2012
2072
  callbacks: string[];
2013
2073
  logout_urls: string[];
2014
2074
  web_origins: string[];
2075
+ origin_branding?: {
2076
+ origin: string;
2077
+ name?: string | undefined;
2078
+ logo_src?: string | undefined;
2079
+ }[] | undefined;
2015
2080
  refresh_token: {
2016
2081
  expiration_mode: "expire" | "not-expire";
2017
2082
  infinite_token_lifetime: boolean;
@@ -2120,6 +2185,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2120
2185
  callbacks: string[];
2121
2186
  logout_urls: string[];
2122
2187
  web_origins: string[];
2188
+ origin_branding?: {
2189
+ origin: string;
2190
+ name?: string | undefined;
2191
+ logo_src?: string | undefined;
2192
+ }[] | undefined;
2123
2193
  refresh_token: {
2124
2194
  expiration_mode: "expire" | "not-expire";
2125
2195
  infinite_token_lifetime: boolean;
@@ -2244,6 +2314,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2244
2314
  callbacks: string[];
2245
2315
  logout_urls: string[];
2246
2316
  web_origins: string[];
2317
+ origin_branding?: {
2318
+ origin: string;
2319
+ name?: string | undefined;
2320
+ logo_src?: string | undefined;
2321
+ }[] | undefined;
2247
2322
  refresh_token: {
2248
2323
  expiration_mode: "expire" | "not-expire";
2249
2324
  infinite_token_lifetime: boolean;
@@ -2366,6 +2441,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2366
2441
  callbacks: string[];
2367
2442
  logout_urls: string[];
2368
2443
  web_origins: string[];
2444
+ origin_branding?: {
2445
+ origin: string;
2446
+ name?: string | undefined;
2447
+ logo_src?: string | undefined;
2448
+ }[] | undefined;
2369
2449
  refresh_token: {
2370
2450
  expiration_mode: "expire" | "not-expire";
2371
2451
  infinite_token_lifetime: boolean;
@@ -4643,7 +4643,7 @@ export interface paths {
4643
4643
  head?: never;
4644
4644
  /**
4645
4645
  * Update current User profile
4646
- * @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso`, `phone` 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. `phone` is normalised to E.164 with the account default country (400 `invalid_phone` if it does not normalise, and nothing is written); a verified phone can only be changed through `POST /user/:id/verify-phone/start`, so a different number (or `null`) answers 409 `phone_verified`. A Bearer token must belong to this Account.
4646
+ * @description Updates the profile of the User behind the current session or bearer token. Only `name`, `company_name`, `country_iso`, `phone` 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. `phone` is normalised to E.164 with the account default country (400 `invalid_phone` if it does not normalise, and nothing is written); a verified phone can only be changed through `POST /user/:id/verify-phone/start`, so a different number (or `null`) answers 409 `phone_change_requires_verification`. A Bearer token must belong to this Account.
4647
4647
  */
4648
4648
  patch: operations["session/me_update"];
4649
4649
  trace?: never;
@@ -5726,6 +5726,18 @@ export interface components {
5726
5726
  url: string;
5727
5727
  }[] | null;
5728
5728
  } | null;
5729
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
5730
+ email_footer?: {
5731
+ /** @description The footer line, e.g. «Kirbic Booking». */
5732
+ text: string;
5733
+ /**
5734
+ * Format: uri
5735
+ * @description Where the footer line links to.
5736
+ */
5737
+ url?: string;
5738
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
5739
+ logo_src?: string;
5740
+ } | null;
5729
5741
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
5730
5742
  email_change_verification_mode?: "new_only" | "old_and_new";
5731
5743
  /**
@@ -6100,6 +6112,15 @@ export interface components {
6100
6112
  logout_urls: string[];
6101
6113
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
6102
6114
  web_origins: string[];
6115
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
6116
+ origin_branding?: {
6117
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
6118
+ origin: string;
6119
+ /** @description The name the email shows (logo alt text). */
6120
+ name?: string;
6121
+ /** @description The logo at the top of the email. PNG or JPG, https. */
6122
+ logo_src?: string;
6123
+ }[];
6103
6124
  refresh_token: {
6104
6125
  /** @enum {unknown} */
6105
6126
  expiration_mode: "expire" | "not-expire";
@@ -6294,6 +6315,15 @@ export interface components {
6294
6315
  logout_urls?: string[];
6295
6316
  /** @description Whitelist of origins (scheme://host[:port], no path) allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty allows any origin. */
6296
6317
  web_origins?: string[];
6318
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
6319
+ origin_branding?: {
6320
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
6321
+ origin: string;
6322
+ /** @description The name the email shows (logo alt text). */
6323
+ name?: string;
6324
+ /** @description The logo at the top of the email. PNG or JPG, https. */
6325
+ logo_src?: string;
6326
+ }[];
6297
6327
  refresh_token?: {
6298
6328
  /** @enum {unknown} */
6299
6329
  expiration_mode: "expire" | "not-expire";
@@ -8560,6 +8590,17 @@ export interface components {
8560
8590
  url: string;
8561
8591
  }[] | null;
8562
8592
  } | null;
8593
+ email_footer?: {
8594
+ /** @description The footer line, e.g. «Kirbic Booking». */
8595
+ text: string;
8596
+ /**
8597
+ * Format: uri
8598
+ * @description Where the footer line links to.
8599
+ */
8600
+ url?: string;
8601
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
8602
+ logo_src?: string;
8603
+ } | null;
8563
8604
  login_methods?: {
8564
8605
  /** @description Order in which the hosted login screen renders the available methods. Entries are Connection resource ids (`connection_xxx`) or the literal `passkey`. Methods not listed keep the built-in order (passwordless, database, social) after the listed ones; ids that no longer resolve are ignored. Listing an `oidc` connection here is also the only way to surface it on the login screen — see resolveLoginMethods(). */
8565
8606
  order?: string[];
@@ -8777,8 +8818,8 @@ export interface components {
8777
8818
  * - `invalid_code` (400): The verification code is wrong, expired or already used.
8778
8819
  * - `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
8779
8820
  * - `phone_changed` (400): The phone on the user changed after the code was sent. Start again.
8780
- * - `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.
8781
- * - `phone_verified` (409): The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error.
8821
+ * - `phone_already_verified` (409): The user already has a verified phone, so there is nothing to verify: `POST /verify-phone/restart` will not swap the number of a pending verification. Nothing to retry. Not to be confused with `phone_change_requires_verification`.
8822
+ * - `phone_change_requires_verification` (409): The user's current phone is verified, so `PATCH /me` will not change or remove it. To change it, verify the new number by SMS with `POST /user/:id/verify-phone/start`. Sending the same number is not an error. Not to be confused with `phone_already_verified`.
8782
8823
  * - `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.
8783
8824
  * - `sms_failed` (409): The SMS provider rejected the message.
8784
8825
  * - `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.
@@ -8807,6 +8848,7 @@ export interface components {
8807
8848
  * - `saml_not_enabled` (404): This client does not have SAML enabled.
8808
8849
  * - `invalid_client_jwks` (400): The client `jwks` is not a valid set of public signing keys: RSA (2048 bits or more), EC (P-256, P-384, P-521) or Ed25519, public members only, up to 5, each with a `kid` when there is more than one.
8809
8850
  * - `client_jwks_required` (400): A client whose `token_endpoint_auth_method` is `private_key_jwt` needs public keys in `jwks`.
8851
+ * - `invalid_origin_branding` (400): Every `origin_branding` entry must name an origin of the same client’s `web_origins` (sent in the same update, or already on the client).
8810
8852
  * - `invalid_saml_sp` (400): The `saml_sp` configuration is invalid: `acs_url` must be an absolute https URL without a fragment.
8811
8853
  * - `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.
8812
8854
  * - `audience_not_found` (403): The `audience` does not name an API registered in this account.
@@ -8891,7 +8933,7 @@ export interface components {
8891
8933
  * - `invalid_code_verifier` (400): `code_verifier` does not match the `code_challenge` of the handoff.
8892
8934
  * @enum {string}
8893
8935
  */
8894
- ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "last_sign_in_method" | "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" | "challenge_required" | "challenge_invalid" | "challenge_unsupported" | "challenge_unavailable" | "origin_required" | "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" | "phone_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_client_jwks" | "client_jwks_required" | "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" | "oauth21_required" | "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" | "invalid_permission" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress" | "account_mismatch" | "connect_redirect_uri_missing" | "invalid_site_url" | "handoff_not_found" | "handoff_expired" | "handoff_used" | "invalid_code_verifier";
8936
+ ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "last_sign_in_method" | "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" | "challenge_required" | "challenge_invalid" | "challenge_unsupported" | "challenge_unavailable" | "origin_required" | "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" | "phone_change_requires_verification" | "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_client_jwks" | "client_jwks_required" | "invalid_origin_branding" | "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" | "oauth21_required" | "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" | "invalid_permission" | "flow_not_found" | "revision_not_found" | "invalid_webhook_event" | "invalid_webhook_url" | "not_a_webhook" | "delivery_not_found" | "delivery_in_progress" | "account_mismatch" | "connect_redirect_uri_missing" | "invalid_site_url" | "handoff_not_found" | "handoff_expired" | "handoff_used" | "invalid_code_verifier";
8895
8937
  /** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
8896
8938
  ErrorResponse: {
8897
8939
  /** @description The HTTP status, repeated. */
@@ -8991,6 +9033,18 @@ export interface operations {
8991
9033
  url: string;
8992
9034
  }[] | null;
8993
9035
  } | null;
9036
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
9037
+ email_footer?: {
9038
+ /** @description The footer line, e.g. «Kirbic Booking». */
9039
+ text: string;
9040
+ /**
9041
+ * Format: uri
9042
+ * @description Where the footer line links to.
9043
+ */
9044
+ url?: string;
9045
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
9046
+ logo_src?: string;
9047
+ } | null;
8994
9048
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
8995
9049
  email_change_verification_mode?: "new_only" | "old_and_new";
8996
9050
  /**
@@ -9365,6 +9419,18 @@ export interface operations {
9365
9419
  url: string;
9366
9420
  }[] | null;
9367
9421
  } | null;
9422
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
9423
+ email_footer?: {
9424
+ /** @description The footer line, e.g. «Kirbic Booking». */
9425
+ text: string;
9426
+ /**
9427
+ * Format: uri
9428
+ * @description Where the footer line links to.
9429
+ */
9430
+ url?: string;
9431
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
9432
+ logo_src?: string;
9433
+ } | null;
9368
9434
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
9369
9435
  email_change_verification_mode?: "new_only" | "old_and_new";
9370
9436
  /**
@@ -9627,6 +9693,18 @@ export interface operations {
9627
9693
  url: string;
9628
9694
  }[] | null;
9629
9695
  } | null;
9696
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
9697
+ email_footer?: {
9698
+ /** @description The footer line, e.g. «Kirbic Booking». */
9699
+ text: string;
9700
+ /**
9701
+ * Format: uri
9702
+ * @description Where the footer line links to.
9703
+ */
9704
+ url?: string;
9705
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
9706
+ logo_src?: string;
9707
+ } | null;
9630
9708
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
9631
9709
  email_change_verification_mode?: "new_only" | "old_and_new";
9632
9710
  /**
@@ -9855,6 +9933,17 @@ export interface operations {
9855
9933
  url: string;
9856
9934
  }[] | null;
9857
9935
  } | null;
9936
+ email_footer?: {
9937
+ /** @description The footer line, e.g. «Kirbic Booking». */
9938
+ text: string;
9939
+ /**
9940
+ * Format: uri
9941
+ * @description Where the footer line links to.
9942
+ */
9943
+ url?: string;
9944
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
9945
+ logo_src?: string;
9946
+ } | null;
9858
9947
  login_methods?: {
9859
9948
  /** @description Order in which the hosted login screen renders the available methods. Entries are Connection resource ids (`connection_xxx`) or the literal `passkey`. Methods not listed keep the built-in order (passwordless, database, social) after the listed ones; ids that no longer resolve are ignored. Listing an `oidc` connection here is also the only way to surface it on the login screen — see resolveLoginMethods(). */
9860
9949
  order?: string[];
@@ -9979,6 +10068,18 @@ export interface operations {
9979
10068
  url: string;
9980
10069
  }[] | null;
9981
10070
  } | null;
10071
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
10072
+ email_footer?: {
10073
+ /** @description The footer line, e.g. «Kirbic Booking». */
10074
+ text: string;
10075
+ /**
10076
+ * Format: uri
10077
+ * @description Where the footer line links to.
10078
+ */
10079
+ url?: string;
10080
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
10081
+ logo_src?: string;
10082
+ } | null;
9982
10083
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
9983
10084
  email_change_verification_mode?: "new_only" | "old_and_new";
9984
10085
  /**
@@ -11364,6 +11465,18 @@ export interface operations {
11364
11465
  url: string;
11365
11466
  }[] | null;
11366
11467
  } | null;
11468
+ /** @description The footer of every email this tenant sends to its users, in place of «Powered by Faable Auth». Absent = that line. */
11469
+ email_footer?: {
11470
+ /** @description The footer line, e.g. «Kirbic Booking». */
11471
+ text: string;
11472
+ /**
11473
+ * Format: uri
11474
+ * @description Where the footer line links to.
11475
+ */
11476
+ url?: string;
11477
+ /** @description A small emblem above the line (24 px). PNG or JPG, https. */
11478
+ logo_src?: string;
11479
+ } | null;
11367
11480
  /** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
11368
11481
  email_change_verification_mode?: "new_only" | "old_and_new";
11369
11482
  /**
@@ -13194,6 +13307,15 @@ export interface operations {
13194
13307
  logout_urls: string[];
13195
13308
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
13196
13309
  web_origins: string[];
13310
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
13311
+ origin_branding?: {
13312
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
13313
+ origin: string;
13314
+ /** @description The name the email shows (logo alt text). */
13315
+ name?: string;
13316
+ /** @description The logo at the top of the email. PNG or JPG, https. */
13317
+ logo_src?: string;
13318
+ }[];
13197
13319
  refresh_token: {
13198
13320
  /** @enum {unknown} */
13199
13321
  expiration_mode: "expire" | "not-expire";
@@ -13459,6 +13581,15 @@ export interface operations {
13459
13581
  logout_urls: string[];
13460
13582
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
13461
13583
  web_origins: string[];
13584
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
13585
+ origin_branding?: {
13586
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
13587
+ origin: string;
13588
+ /** @description The name the email shows (logo alt text). */
13589
+ name?: string;
13590
+ /** @description The logo at the top of the email. PNG or JPG, https. */
13591
+ logo_src?: string;
13592
+ }[];
13462
13593
  refresh_token: {
13463
13594
  /** @enum {unknown} */
13464
13595
  expiration_mode: "expire" | "not-expire";
@@ -13725,6 +13856,15 @@ export interface operations {
13725
13856
  logout_urls?: string[];
13726
13857
  /** @description Whitelist of origins (scheme://host[:port], no path) allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty allows any origin. */
13727
13858
  web_origins?: string[];
13859
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
13860
+ origin_branding?: {
13861
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
13862
+ origin: string;
13863
+ /** @description The name the email shows (logo alt text). */
13864
+ name?: string;
13865
+ /** @description The logo at the top of the email. PNG or JPG, https. */
13866
+ logo_src?: string;
13867
+ }[];
13728
13868
  refresh_token?: {
13729
13869
  /** @enum {unknown} */
13730
13870
  expiration_mode: "expire" | "not-expire";
@@ -13874,6 +14014,15 @@ export interface operations {
13874
14014
  logout_urls: string[];
13875
14015
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
13876
14016
  web_origins: string[];
14017
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
14018
+ origin_branding?: {
14019
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
14020
+ origin: string;
14021
+ /** @description The name the email shows (logo alt text). */
14022
+ name?: string;
14023
+ /** @description The logo at the top of the email. PNG or JPG, https. */
14024
+ logo_src?: string;
14025
+ }[];
13877
14026
  refresh_token: {
13878
14027
  /** @enum {unknown} */
13879
14028
  expiration_mode: "expire" | "not-expire";
@@ -14145,6 +14294,15 @@ export interface operations {
14145
14294
  logout_urls: string[];
14146
14295
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
14147
14296
  web_origins: string[];
14297
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
14298
+ origin_branding?: {
14299
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
14300
+ origin: string;
14301
+ /** @description The name the email shows (logo alt text). */
14302
+ name?: string;
14303
+ /** @description The logo at the top of the email. PNG or JPG, https. */
14304
+ logo_src?: string;
14305
+ }[];
14148
14306
  refresh_token: {
14149
14307
  /** @enum {unknown} */
14150
14308
  expiration_mode: "expire" | "not-expire";
@@ -14414,6 +14572,15 @@ export interface operations {
14414
14572
  logout_urls: string[];
14415
14573
  /** @description Origins allowed to make cross-origin (CORS) requests to the token and passwordless endpoints. Empty = any origin. */
14416
14574
  web_origins: string[];
14575
+ /** @description Per-origin branding of the passwordless code email: when `/passwordless/start` comes from one of these origins, the email carries its name and logo instead of the tenant’s. Each origin must be in `web_origins`; removing an origin from `web_origins` drops its entry. */
14576
+ origin_branding?: {
14577
+ /** @description An origin of this client’s `web_origins` (scheme://host[:port]). */
14578
+ origin: string;
14579
+ /** @description The name the email shows (logo alt text). */
14580
+ name?: string;
14581
+ /** @description The logo at the top of the email. PNG or JPG, https. */
14582
+ logo_src?: string;
14583
+ }[];
14417
14584
  refresh_token: {
14418
14585
  /** @enum {unknown} */
14419
14586
  expiration_mode: "expire" | "not-expire";
@@ -17091,7 +17258,7 @@ export interface operations {
17091
17258
  };
17092
17259
  };
17093
17260
  /**
17094
- * @description `phone_already_verified` — The user already has a verified phone; the number cannot be swapped from the screen.
17261
+ * @description `phone_already_verified` — The user already has a verified phone, so there is nothing to verify: `POST /verify-phone/restart` will not swap the number of a pending verification. Nothing to retry. Not to be confused with `phone_change_requires_verification`.
17095
17262
  *
17096
17263
  * `sms_failed` — The SMS provider rejected the message.
17097
17264
  *
@@ -34946,7 +35113,7 @@ export interface operations {
34946
35113
  name?: string;
34947
35114
  company_name?: string;
34948
35115
  country_iso?: string;
34949
- /** @description The phone number, `null` to remove it. Normalised to E.164 with the account default country (`636 123 456` → `+34636123456`); one that does not normalise fails with 400 `invalid_phone`. A verified phone cannot be changed or removed here (409 `phone_verified`): use `POST /user/:id/verify-phone/start`. Changing an unverified phone leaves `phone_verified: false`. */
35116
+ /** @description The phone number, `null` to remove it. Normalised to E.164 with the account default country (`636 123 456` → `+34636123456`); one that does not normalise fails with 400 `invalid_phone`. A verified phone cannot be changed or removed here (409 `phone_change_requires_verification`): use `POST /user/:id/verify-phone/start`. Changing an unverified phone leaves `phone_verified: false`. */
34950
35117
  phone?: string | null;
34951
35118
  /** @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`. */
34952
35119
  fields?: {
@@ -35201,7 +35368,7 @@ export interface operations {
35201
35368
  };
35202
35369
  };
35203
35370
  };
35204
- /** @description `phone_verified` — The user's current phone is verified, so `PATCH /me` will not change or remove it. Change it with `POST /user/:id/verify-phone/start`, which confirms the new number by SMS. Sending the same number is not an error. */
35371
+ /** @description `phone_change_requires_verification` — The user's current phone is verified, so `PATCH /me` will not change or remove it. To change it, verify the new number by SMS with `POST /user/:id/verify-phone/start`. Sending the same number is not an error. Not to be confused with `phone_already_verified`. */
35205
35372
  409: {
35206
35373
  headers: {
35207
35374
  [name: string]: unknown;
@@ -35209,7 +35376,7 @@ export interface operations {
35209
35376
  content: {
35210
35377
  "application/json": components["schemas"]["ErrorResponse"] & {
35211
35378
  /** @enum {string} */
35212
- error_code?: "phone_verified";
35379
+ error_code?: "phone_change_requires_verification";
35213
35380
  };
35214
35381
  };
35215
35382
  };
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.9.38";
12
+ export const version = "2.9.40";
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 = "5110017";
18
+ export const commit = "47219e8";
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.9.38",
3
+ "version": "2.9.40",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",