@faable/auth-sdk 2.6.14 → 2.6.16

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.
@@ -128,6 +128,26 @@ export interface paths {
128
128
  patch?: never;
129
129
  trace?: never;
130
130
  };
131
+ "/recovery-channels/capabilities": {
132
+ parameters: {
133
+ query?: never;
134
+ header?: never;
135
+ path?: never;
136
+ cookie?: never;
137
+ };
138
+ /**
139
+ * Recovery channel capabilities for this tenant
140
+ * @description Which recovery channels the platform can send, whether the plan allows the paid ones, this month's SMS usage against the included amount, and the tenant configuration as resolved. Drives the "Recovery channels" editor in the dashboard.
141
+ */
142
+ get: operations["account/recoveryChannelsCapabilities"];
143
+ put?: never;
144
+ post?: never;
145
+ delete?: never;
146
+ options?: never;
147
+ head?: never;
148
+ patch?: never;
149
+ trace?: never;
150
+ };
131
151
  "/connection": {
132
152
  parameters: {
133
153
  query?: never;
@@ -504,6 +524,46 @@ export interface paths {
504
524
  patch?: never;
505
525
  trace?: never;
506
526
  };
527
+ "/user/{user_id}/verify-phone/start": {
528
+ parameters: {
529
+ query?: never;
530
+ header?: never;
531
+ path?: never;
532
+ cookie?: never;
533
+ };
534
+ get?: never;
535
+ put?: never;
536
+ /**
537
+ * Send a verification code to the user's phone
538
+ * @description Sends a 6-digit code by SMS to the user's phone (optionally setting a new phone first) and returns an opaque `state` to confirm it with. Same authorization as `verify-email/start`: the user themself (session or bearer), an admin of another tenant, or a machine token. Counts against the tenant's monthly SMS allowance. Fails with 409 `sms_unavailable` when no SMS can go out (no provider, plan does not allow it, allowance exhausted).
539
+ */
540
+ post: operations["user/verifyPhoneStart"];
541
+ delete?: never;
542
+ options?: never;
543
+ head?: never;
544
+ patch?: never;
545
+ trace?: never;
546
+ };
547
+ "/verify-phone/confirm": {
548
+ parameters: {
549
+ query?: never;
550
+ header?: never;
551
+ path?: never;
552
+ cookie?: never;
553
+ };
554
+ get?: never;
555
+ put?: never;
556
+ /**
557
+ * Confirm a phone verification code
558
+ * @description Marks the phone verified (`phone_verified_method: sms_otp`) when the code matches the pending verification identified by `state`. Five wrong codes burn the `state`; start again. No session needed: the `state` plus the code are the proof.
559
+ */
560
+ post: operations["user/verifyPhoneConfirm"];
561
+ delete?: never;
562
+ options?: never;
563
+ head?: never;
564
+ patch?: never;
565
+ trace?: never;
566
+ };
507
567
  "/user/{user_id}/factors": {
508
568
  parameters: {
509
569
  query?: never;
@@ -2851,6 +2911,17 @@ export interface components {
2851
2911
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
2852
2912
  remember_device_days?: number;
2853
2913
  };
2914
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
2915
+ recovery_channels?: {
2916
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
2917
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
2918
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
2919
+ default?: "email" | "sms" | "whatsapp" | "factor";
2920
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
2921
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
2922
+ };
2923
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
2924
+ default_country_iso?: string | null;
2854
2925
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
2855
2926
  webauthn_rp_id?: string | null;
2856
2927
  /** @description AuthAccount creation date */
@@ -3141,6 +3212,15 @@ export interface components {
3141
3212
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
3142
3213
  remember_device_days?: number;
3143
3214
  };
3215
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
3216
+ recovery_channels?: {
3217
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
3218
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
3219
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
3220
+ default?: "email" | "sms" | "whatsapp" | "factor";
3221
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
3222
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
3223
+ };
3144
3224
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
3145
3225
  login_flow?: string | null;
3146
3226
  /** @description Object is related with this account */
@@ -3245,6 +3325,14 @@ export interface components {
3245
3325
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
3246
3326
  remember_device_days?: number;
3247
3327
  } | null;
3328
+ recovery_channels?: {
3329
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
3330
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
3331
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
3332
+ default?: "email" | "sms" | "whatsapp" | "factor";
3333
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
3334
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
3335
+ } | null;
3248
3336
  login_flow?: string | null;
3249
3337
  /**
3250
3338
  * @description Free-form client metadata. Replaces the whole object — send the full merged value, not a partial delta.
@@ -3285,7 +3373,7 @@ export interface components {
3285
3373
  */
3286
3374
  email_verified: boolean;
3287
3375
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
3288
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
3376
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
3289
3377
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
3290
3378
  email_verified_at?: string | null;
3291
3379
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -3304,8 +3392,8 @@ export interface components {
3304
3392
  phone?: string | null;
3305
3393
  /** @description phone is verified */
3306
3394
  phone_verified: boolean;
3307
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
3308
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
3395
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
3396
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
3309
3397
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
3310
3398
  phone_verified_at?: string | null;
3311
3399
  /** @description country iso code */
@@ -4694,6 +4782,15 @@ export interface components {
4694
4782
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
4695
4783
  remember_device_days?: number;
4696
4784
  } | null;
4785
+ recovery_channels?: {
4786
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
4787
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
4788
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
4789
+ default?: "email" | "sms" | "whatsapp" | "factor";
4790
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
4791
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
4792
+ } | null;
4793
+ default_country_iso?: string | null;
4697
4794
  webauthn_rp_id?: string | null;
4698
4795
  login_flow?: string | null;
4699
4796
  };
@@ -4890,6 +4987,17 @@ export interface operations {
4890
4987
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
4891
4988
  remember_device_days?: number;
4892
4989
  };
4990
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
4991
+ recovery_channels?: {
4992
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
4993
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
4994
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
4995
+ default?: "email" | "sms" | "whatsapp" | "factor";
4996
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
4997
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
4998
+ };
4999
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
5000
+ default_country_iso?: string | null;
4893
5001
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
4894
5002
  webauthn_rp_id?: string | null;
4895
5003
  /** @description AuthAccount creation date */
@@ -5060,6 +5168,17 @@ export interface operations {
5060
5168
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
5061
5169
  remember_device_days?: number;
5062
5170
  };
5171
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
5172
+ recovery_channels?: {
5173
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
5174
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
5175
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
5176
+ default?: "email" | "sms" | "whatsapp" | "factor";
5177
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
5178
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
5179
+ };
5180
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
5181
+ default_country_iso?: string | null;
5063
5182
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
5064
5183
  webauthn_rp_id?: string | null;
5065
5184
  /** @description AuthAccount creation date */
@@ -5184,6 +5303,17 @@ export interface operations {
5184
5303
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
5185
5304
  remember_device_days?: number;
5186
5305
  };
5306
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
5307
+ recovery_channels?: {
5308
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
5309
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
5310
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
5311
+ default?: "email" | "sms" | "whatsapp" | "factor";
5312
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
5313
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
5314
+ };
5315
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
5316
+ default_country_iso?: string | null;
5187
5317
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
5188
5318
  webauthn_rp_id?: string | null;
5189
5319
  /** @description AuthAccount creation date */
@@ -5274,6 +5404,15 @@ export interface operations {
5274
5404
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
5275
5405
  remember_device_days?: number;
5276
5406
  } | null;
5407
+ recovery_channels?: {
5408
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
5409
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
5410
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
5411
+ default?: "email" | "sms" | "whatsapp" | "factor";
5412
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
5413
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
5414
+ } | null;
5415
+ default_country_iso?: string | null;
5277
5416
  webauthn_rp_id?: string | null;
5278
5417
  login_flow?: string | null;
5279
5418
  };
@@ -5379,6 +5518,17 @@ export interface operations {
5379
5518
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
5380
5519
  remember_device_days?: number;
5381
5520
  };
5521
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
5522
+ recovery_channels?: {
5523
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
5524
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
5525
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
5526
+ default?: "email" | "sms" | "whatsapp" | "factor";
5527
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
5528
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
5529
+ };
5530
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
5531
+ default_country_iso?: string | null;
5382
5532
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
5383
5533
  webauthn_rp_id?: string | null;
5384
5534
  /** @description AuthAccount creation date */
@@ -5512,6 +5662,17 @@ export interface operations {
5512
5662
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
5513
5663
  remember_device_days?: number;
5514
5664
  };
5665
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
5666
+ recovery_channels?: {
5667
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
5668
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
5669
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
5670
+ default?: "email" | "sms" | "whatsapp" | "factor";
5671
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
5672
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
5673
+ };
5674
+ /** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
5675
+ default_country_iso?: string | null;
5515
5676
  /** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
5516
5677
  webauthn_rp_id?: string | null;
5517
5678
  /** @description AuthAccount creation date */
@@ -5523,6 +5684,57 @@ export interface operations {
5523
5684
  };
5524
5685
  };
5525
5686
  };
5687
+ "account/recoveryChannelsCapabilities": {
5688
+ parameters: {
5689
+ query?: never;
5690
+ header?: never;
5691
+ path?: never;
5692
+ cookie?: never;
5693
+ };
5694
+ requestBody?: never;
5695
+ responses: {
5696
+ /** @description Default Response */
5697
+ 200: {
5698
+ headers: {
5699
+ [name: string]: unknown;
5700
+ };
5701
+ content: {
5702
+ "application/json": {
5703
+ /** @description Whether the platform can send on each channel right now. */
5704
+ provider: {
5705
+ sms: boolean;
5706
+ whatsapp: boolean;
5707
+ };
5708
+ plan: {
5709
+ /** @description False when billing did not answer. Messaging channels are then treated as not allowed — the failure mode for a paid-per-message channel is "do not send", not "allow". */
5710
+ known: boolean;
5711
+ tier?: string;
5712
+ allows_messaging: boolean;
5713
+ };
5714
+ usage: {
5715
+ /** @description YYYY-MM, UTC. */
5716
+ month: string;
5717
+ sent: number;
5718
+ included: number;
5719
+ metered: boolean;
5720
+ hard_ceiling: number;
5721
+ };
5722
+ resolved: {
5723
+ enabled: ("email" | "sms" | "whatsapp" | "factor")[];
5724
+ default: "email" | "sms" | "whatsapp" | "factor";
5725
+ visible: ("email" | "sms" | "whatsapp" | "factor")[];
5726
+ };
5727
+ /** @description Tenant-level availability (configuration × platform × plan). The per-user step — verified phone, enrolled factor — is not applied here. */
5728
+ channels: {
5729
+ channel: "email" | "sms" | "whatsapp" | "factor";
5730
+ available: boolean;
5731
+ reason?: string;
5732
+ }[];
5733
+ };
5734
+ };
5735
+ };
5736
+ };
5737
+ };
5526
5738
  "connection/list": {
5527
5739
  parameters: {
5528
5740
  query?: {
@@ -6222,6 +6434,15 @@ export interface operations {
6222
6434
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6223
6435
  remember_device_days?: number;
6224
6436
  };
6437
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
6438
+ recovery_channels?: {
6439
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6440
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6441
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6442
+ default?: "email" | "sms" | "whatsapp" | "factor";
6443
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6444
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6445
+ };
6225
6446
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
6226
6447
  login_flow?: string | null;
6227
6448
  /** @description Object is related with this account */
@@ -6325,6 +6546,15 @@ export interface operations {
6325
6546
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6326
6547
  remember_device_days?: number;
6327
6548
  };
6549
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
6550
+ recovery_channels?: {
6551
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6552
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6553
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6554
+ default?: "email" | "sms" | "whatsapp" | "factor";
6555
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6556
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6557
+ };
6328
6558
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
6329
6559
  login_flow?: string | null;
6330
6560
  /** @description Object is related with this account */
@@ -6421,6 +6651,14 @@ export interface operations {
6421
6651
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6422
6652
  remember_device_days?: number;
6423
6653
  } | null;
6654
+ recovery_channels?: {
6655
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6656
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6657
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6658
+ default?: "email" | "sms" | "whatsapp" | "factor";
6659
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6660
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6661
+ } | null;
6424
6662
  login_flow?: string | null;
6425
6663
  /**
6426
6664
  * @description Free-form client metadata. Replaces the whole object — send the full merged value, not a partial delta.
@@ -6505,6 +6743,15 @@ export interface operations {
6505
6743
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6506
6744
  remember_device_days?: number;
6507
6745
  };
6746
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
6747
+ recovery_channels?: {
6748
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6749
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6750
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6751
+ default?: "email" | "sms" | "whatsapp" | "factor";
6752
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6753
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6754
+ };
6508
6755
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
6509
6756
  login_flow?: string | null;
6510
6757
  /** @description Object is related with this account */
@@ -6608,6 +6855,15 @@ export interface operations {
6608
6855
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6609
6856
  remember_device_days?: number;
6610
6857
  };
6858
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
6859
+ recovery_channels?: {
6860
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6861
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6862
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6863
+ default?: "email" | "sms" | "whatsapp" | "factor";
6864
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6865
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6866
+ };
6611
6867
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
6612
6868
  login_flow?: string | null;
6613
6869
  /** @description Object is related with this account */
@@ -6711,6 +6967,15 @@ export interface operations {
6711
6967
  /** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
6712
6968
  remember_device_days?: number;
6713
6969
  };
6970
+ /** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
6971
+ recovery_channels?: {
6972
+ /** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
6973
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
6974
+ /** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
6975
+ default?: "email" | "sms" | "whatsapp" | "factor";
6976
+ /** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
6977
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[];
6978
+ };
6714
6979
  /** @description A login flow bound to this client (`loginflow_xxx`), overriding the account's. Absent = inherit. */
6715
6980
  login_flow?: string | null;
6716
6981
  /** @description Object is related with this account */
@@ -6849,7 +7114,7 @@ export interface operations {
6849
7114
  */
6850
7115
  email_verified: boolean;
6851
7116
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
6852
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7117
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
6853
7118
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
6854
7119
  email_verified_at?: string | null;
6855
7120
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -6868,8 +7133,8 @@ export interface operations {
6868
7133
  phone?: string | null;
6869
7134
  /** @description phone is verified */
6870
7135
  phone_verified: boolean;
6871
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
6872
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7136
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
7137
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
6873
7138
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
6874
7139
  phone_verified_at?: string | null;
6875
7140
  /** @description country iso code */
@@ -6989,7 +7254,7 @@ export interface operations {
6989
7254
  */
6990
7255
  email_verified: boolean;
6991
7256
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
6992
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7257
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
6993
7258
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
6994
7259
  email_verified_at?: string | null;
6995
7260
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -7008,8 +7273,8 @@ export interface operations {
7008
7273
  phone?: string | null;
7009
7274
  /** @description phone is verified */
7010
7275
  phone_verified: boolean;
7011
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
7012
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7276
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
7277
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
7013
7278
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
7014
7279
  phone_verified_at?: string | null;
7015
7280
  /** @description country iso code */
@@ -7169,7 +7434,7 @@ export interface operations {
7169
7434
  */
7170
7435
  email_verified: boolean;
7171
7436
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
7172
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7437
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
7173
7438
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
7174
7439
  email_verified_at?: string | null;
7175
7440
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -7188,8 +7453,8 @@ export interface operations {
7188
7453
  phone?: string | null;
7189
7454
  /** @description phone is verified */
7190
7455
  phone_verified: boolean;
7191
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
7192
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7456
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
7457
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
7193
7458
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
7194
7459
  phone_verified_at?: string | null;
7195
7460
  /** @description country iso code */
@@ -7309,7 +7574,7 @@ export interface operations {
7309
7574
  */
7310
7575
  email_verified: boolean;
7311
7576
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
7312
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7577
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
7313
7578
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
7314
7579
  email_verified_at?: string | null;
7315
7580
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -7328,8 +7593,8 @@ export interface operations {
7328
7593
  phone?: string | null;
7329
7594
  /** @description phone is verified */
7330
7595
  phone_verified: boolean;
7331
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
7332
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
7596
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
7597
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
7333
7598
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
7334
7599
  phone_verified_at?: string | null;
7335
7600
  /** @description country iso code */
@@ -7615,6 +7880,73 @@ export interface operations {
7615
7880
  };
7616
7881
  };
7617
7882
  };
7883
+ "user/verifyPhoneStart": {
7884
+ parameters: {
7885
+ query?: never;
7886
+ header?: never;
7887
+ path: {
7888
+ user_id: string;
7889
+ };
7890
+ cookie?: never;
7891
+ };
7892
+ requestBody: {
7893
+ content: {
7894
+ "application/json": {
7895
+ /** @description Phone to verify. When given, it replaces the user's phone (normalised to E.164 with the account's `default_country_iso` as fallback) before the code is sent. When omitted, the code goes to the phone already on the user. */
7896
+ phone?: string;
7897
+ };
7898
+ };
7899
+ };
7900
+ responses: {
7901
+ /** @description Default Response */
7902
+ 200: {
7903
+ headers: {
7904
+ [name: string]: unknown;
7905
+ };
7906
+ content: {
7907
+ "application/json": {
7908
+ /** @enum {string} */
7909
+ status: "sent";
7910
+ destination_masked: string;
7911
+ /** @description Opaque handle to confirm with. It is what lets a tenant backend start the verification (M2M) and send the person to `/flow/verify-phone?state=…` without a session. */
7912
+ state: string;
7913
+ expires_in: number;
7914
+ };
7915
+ };
7916
+ };
7917
+ };
7918
+ };
7919
+ "user/verifyPhoneConfirm": {
7920
+ parameters: {
7921
+ query?: never;
7922
+ header?: never;
7923
+ path?: never;
7924
+ cookie?: never;
7925
+ };
7926
+ requestBody: {
7927
+ content: {
7928
+ "application/json": {
7929
+ state: string;
7930
+ code: string;
7931
+ };
7932
+ };
7933
+ };
7934
+ responses: {
7935
+ /** @description Default Response */
7936
+ 200: {
7937
+ headers: {
7938
+ [name: string]: unknown;
7939
+ };
7940
+ content: {
7941
+ "application/json": {
7942
+ /** @enum {string} */
7943
+ status: "verified";
7944
+ user_id: string;
7945
+ };
7946
+ };
7947
+ };
7948
+ };
7949
+ };
7618
7950
  "user/factors": {
7619
7951
  parameters: {
7620
7952
  query?: never;
@@ -12182,7 +12514,7 @@ export interface operations {
12182
12514
  */
12183
12515
  email_verified: boolean;
12184
12516
  /** @description How `email_verified` was last set. `manual` — admin flipped the flag via `POST /user/:id`. `verification_flow` — user clicked the verification link. `passwordless_otp` — user completed passwordless OTP login. `team_invite` — user clicked a team invitation link. `email_change` — user confirmed a self-service email change. `federated` — verified by the external IdP on OAuth callback. `null` — the field was cleared (admin un-verified the email). */
12185
- email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
12517
+ email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
12186
12518
  /** @description ISO 8601 timestamp of when `email_verified` was last flipped to true. */
12187
12519
  email_verified_at?: string | null;
12188
12520
  /** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
@@ -12201,8 +12533,8 @@ export interface operations {
12201
12533
  phone?: string | null;
12202
12534
  /** @description phone is verified */
12203
12535
  phone_verified: boolean;
12204
- /** @description How `phone_verified` was last set. Same enum as `email_verified_method`. */
12205
- phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | null;
12536
+ /** @description How `phone_verified` was last set. Same enum as `email_verified_method`, plus `sms_otp` — the user typed a code sent by SMS (`POST /user/:id/verify-phone/start`). */
12537
+ phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | null;
12206
12538
  /** @description ISO 8601 timestamp of when `phone_verified` was last flipped to true. */
12207
12539
  phone_verified_at?: string | null;
12208
12540
  /** @description country iso code */