@faable/auth-sdk 2.9.46 → 2.9.47

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.
@@ -113,6 +113,8 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
113
113
  oauth_link_verified_email?: boolean | undefined;
114
114
  client_id_metadata_documents_enabled?: boolean | undefined;
115
115
  canonical_host?: string | null | undefined;
116
+ disabled_at?: string | null | undefined;
117
+ disabled_by?: "owner" | "staff" | null | undefined;
116
118
  createdAt: string;
117
119
  updatedAt?: string | undefined;
118
120
  }>;
@@ -112,6 +112,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
112
112
  oauth_link_verified_email?: boolean | undefined;
113
113
  client_id_metadata_documents_enabled?: boolean | undefined;
114
114
  canonical_host?: string | null | undefined;
115
+ disabled_at?: string | null | undefined;
116
+ disabled_by?: "owner" | "staff" | null | undefined;
115
117
  createdAt: string;
116
118
  updatedAt?: string | undefined;
117
119
  }>;
@@ -205,6 +207,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
205
207
  oauth_link_verified_email?: boolean | undefined;
206
208
  client_id_metadata_documents_enabled?: boolean | undefined;
207
209
  canonical_host?: string | null | undefined;
210
+ disabled_at?: string | null | undefined;
211
+ disabled_by?: "owner" | "staff" | null | undefined;
208
212
  createdAt: string;
209
213
  updatedAt?: string | undefined;
210
214
  }>;
@@ -227,6 +231,103 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
227
231
  * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
228
232
  */
229
233
  accountDelete(account_id: string): Promise<void>;
234
+ /**
235
+ * `POST /account/{account_id}/disable` — operationId: `account/disable`
236
+ *
237
+ * Disable an Account
238
+ *
239
+ * Switches the tenant off without deleting anything: nobody can sign in, management writes are refused (403 `account_disabled`) and reads keep working. Sessions are not revoked — they work again once the tenant is enabled. Idempotent. A tenant disabled by Faable staff answers 403 `account_disabled` with `details.disabled_by: staff`.
240
+ *
241
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
242
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
243
+ * @throws {FaableApiError} `account_disabled` (403) — The Auth tenant is disabled: nobody can sign in and management writes are refused; reads keep working. `details.disabled_by` is `owner` (enable it again from the dashboard) or `staff` (contact support@faable.com).
244
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
245
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
246
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
247
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
248
+ * @throws {FaableApiError} `account_protected` (409) — A platform tenant (Faable's own) cannot be disabled: everyone, staff included, signs in through it.
249
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
250
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
251
+ */
252
+ accountDisable(account_id: string): Promise<{
253
+ id: string;
254
+ name: string;
255
+ domain: string;
256
+ slug: string;
257
+ logo_src?: string | null | undefined;
258
+ icon_src?: string | null | undefined;
259
+ callback_hostnames: string[];
260
+ token_signature: string;
261
+ token_signing_alg: "RS256";
262
+ default_connection?: unknown;
263
+ enabled_locales: string[];
264
+ tags?: string[] | undefined;
265
+ team?: string | null | undefined;
266
+ notification_settings: {
267
+ welcome_email_enabled: boolean;
268
+ verify_email_auto_send: boolean;
269
+ };
270
+ email_reply_to?: string | null | undefined;
271
+ email_from_name?: string | null | undefined;
272
+ email_from_address?: string | null | undefined;
273
+ welcome_email?: {
274
+ cta_url?: string | null | undefined;
275
+ body?: string | null | undefined;
276
+ social_links?: {
277
+ label: string;
278
+ url: string;
279
+ }[] | null | undefined;
280
+ } | null | undefined;
281
+ email_footer?: {
282
+ text: string;
283
+ url?: string | undefined;
284
+ logo_src?: string | undefined;
285
+ } | null | undefined;
286
+ email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
287
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
288
+ login_methods?: {
289
+ order?: string[] | undefined;
290
+ disabled_connections?: string[] | undefined;
291
+ passkey_login_enabled?: boolean | undefined;
292
+ identifier_first?: boolean | undefined;
293
+ remember_last_method?: boolean | undefined;
294
+ passkey_promotion?: "offer" | "off" | undefined;
295
+ passkey_promotion_snooze_days?: number | undefined;
296
+ passkey_promotion_max_prompts?: number | undefined;
297
+ remember_me?: "optional" | "off" | undefined;
298
+ remember_me_days?: number | undefined;
299
+ theme?: "system" | "light" | "dark" | undefined;
300
+ } | undefined;
301
+ profile_fields?: {
302
+ key: string;
303
+ type: "string" | "enum";
304
+ options?: string[] | undefined;
305
+ max_length?: number | undefined;
306
+ }[] | null | undefined;
307
+ login_flow?: string | null | undefined;
308
+ mfa_policy?: {
309
+ mode?: "required" | "optional" | "off" | undefined;
310
+ allowed_factors?: ("webauthn" | "totp")[] | undefined;
311
+ remember_device_days?: number | undefined;
312
+ } | undefined;
313
+ recovery_channels?: {
314
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
315
+ default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
316
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
317
+ } | undefined;
318
+ default_country_iso?: string | null | undefined;
319
+ webauthn_rp_id?: string | null | undefined;
320
+ logout_confirm_required?: boolean | undefined;
321
+ dynamic_client_registration_enabled?: boolean | undefined;
322
+ oauth21_enabled?: boolean | undefined;
323
+ oauth_link_verified_email?: boolean | undefined;
324
+ client_id_metadata_documents_enabled?: boolean | undefined;
325
+ canonical_host?: string | null | undefined;
326
+ disabled_at?: string | null | undefined;
327
+ disabled_by?: "owner" | "staff" | null | undefined;
328
+ createdAt: string;
329
+ updatedAt?: string | undefined;
330
+ }>;
230
331
  /**
231
332
  * `POST /account/{account_id}/email_sender` — operationId: `account/email_sender`
232
333
  *
@@ -318,6 +419,104 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
318
419
  oauth_link_verified_email?: boolean | undefined;
319
420
  client_id_metadata_documents_enabled?: boolean | undefined;
320
421
  canonical_host?: string | null | undefined;
422
+ disabled_at?: string | null | undefined;
423
+ disabled_by?: "owner" | "staff" | null | undefined;
424
+ createdAt: string;
425
+ updatedAt?: string | undefined;
426
+ }>;
427
+ /**
428
+ * `POST /account/{account_id}/enable` — operationId: `account/enable`
429
+ *
430
+ * Enable a disabled Account
431
+ *
432
+ * Undoes `account/disable`: sign-in, sessions and management writes work again. Idempotent. A tenant disabled by Faable staff cannot be enabled here: 403 `account_disabled` with `details.disabled_by: staff` — contact support@faable.com.
433
+ *
434
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
435
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
436
+ * @throws {FaableApiError} `account_disabled` (403) — The Auth tenant is disabled: nobody can sign in and management writes are refused; reads keep working. `details.disabled_by` is `owner` (enable it again from the dashboard) or `staff` (contact support@faable.com).
437
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
438
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
439
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
440
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
441
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
442
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
443
+ */
444
+ accountEnable(account_id: string): Promise<{
445
+ id: string;
446
+ name: string;
447
+ domain: string;
448
+ slug: string;
449
+ logo_src?: string | null | undefined;
450
+ icon_src?: string | null | undefined;
451
+ callback_hostnames: string[];
452
+ token_signature: string;
453
+ token_signing_alg: "RS256";
454
+ default_connection?: unknown;
455
+ enabled_locales: string[];
456
+ tags?: string[] | undefined;
457
+ team?: string | null | undefined;
458
+ notification_settings: {
459
+ welcome_email_enabled: boolean;
460
+ verify_email_auto_send: boolean;
461
+ };
462
+ email_reply_to?: string | null | undefined;
463
+ email_from_name?: string | null | undefined;
464
+ email_from_address?: string | null | undefined;
465
+ welcome_email?: {
466
+ cta_url?: string | null | undefined;
467
+ body?: string | null | undefined;
468
+ social_links?: {
469
+ label: string;
470
+ url: string;
471
+ }[] | null | undefined;
472
+ } | null | undefined;
473
+ email_footer?: {
474
+ text: string;
475
+ url?: string | undefined;
476
+ logo_src?: string | undefined;
477
+ } | null | undefined;
478
+ email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
479
+ email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
480
+ login_methods?: {
481
+ order?: string[] | undefined;
482
+ disabled_connections?: string[] | undefined;
483
+ passkey_login_enabled?: boolean | undefined;
484
+ identifier_first?: boolean | undefined;
485
+ remember_last_method?: boolean | undefined;
486
+ passkey_promotion?: "offer" | "off" | undefined;
487
+ passkey_promotion_snooze_days?: number | undefined;
488
+ passkey_promotion_max_prompts?: number | undefined;
489
+ remember_me?: "optional" | "off" | undefined;
490
+ remember_me_days?: number | undefined;
491
+ theme?: "system" | "light" | "dark" | undefined;
492
+ } | undefined;
493
+ profile_fields?: {
494
+ key: string;
495
+ type: "string" | "enum";
496
+ options?: string[] | undefined;
497
+ max_length?: number | undefined;
498
+ }[] | null | undefined;
499
+ login_flow?: string | null | undefined;
500
+ mfa_policy?: {
501
+ mode?: "required" | "optional" | "off" | undefined;
502
+ allowed_factors?: ("webauthn" | "totp")[] | undefined;
503
+ remember_device_days?: number | undefined;
504
+ } | undefined;
505
+ recovery_channels?: {
506
+ enabled?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
507
+ default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
508
+ visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
509
+ } | undefined;
510
+ default_country_iso?: string | null | undefined;
511
+ webauthn_rp_id?: string | null | undefined;
512
+ logout_confirm_required?: boolean | undefined;
513
+ dynamic_client_registration_enabled?: boolean | undefined;
514
+ oauth21_enabled?: boolean | undefined;
515
+ oauth_link_verified_email?: boolean | undefined;
516
+ client_id_metadata_documents_enabled?: boolean | undefined;
517
+ canonical_host?: string | null | undefined;
518
+ disabled_at?: string | null | undefined;
519
+ disabled_by?: "owner" | "staff" | null | undefined;
321
520
  createdAt: string;
322
521
  updatedAt?: string | undefined;
323
522
  }>;
@@ -414,6 +613,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
414
613
  oauth_link_verified_email?: boolean | undefined;
415
614
  client_id_metadata_documents_enabled?: boolean | undefined;
416
615
  canonical_host?: string | null | undefined;
616
+ disabled_at?: string | null | undefined;
617
+ disabled_by?: "owner" | "staff" | null | undefined;
417
618
  createdAt: string;
418
619
  updatedAt?: string | undefined;
419
620
  }>;
@@ -511,7 +712,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
511
712
  social_links?: {
512
713
  label: string;
513
714
  url: string;
514
- }[] | null | undefined;
715
+ }[] | null | undefined; /**
716
+ * `DELETE /user/{user_id}/factors/{factor_id}` — operationId: `user/deleteFactor`
717
+ *
718
+ * Remove one of a user's second factors
719
+ *
720
+ * The support path out of a lockout: with the factor gone, a `required` policy sends the user through enrolment on their next login instead of refusing it.
721
+ *
722
+ * @throws {FaableApiError} `factor_not_found` (400) — No factor with that id belongs to this user.
723
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
724
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
725
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
726
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
727
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
728
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
729
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
730
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
731
+ */
515
732
  } | null | undefined;
516
733
  email_footer?: {
517
734
  text: string;
@@ -558,6 +775,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
558
775
  oauth_link_verified_email?: boolean | undefined;
559
776
  client_id_metadata_documents_enabled?: boolean | undefined;
560
777
  canonical_host?: string | null | undefined;
778
+ disabled_at?: string | null | undefined;
779
+ disabled_by?: "owner" | "staff" | null | undefined;
561
780
  createdAt: string;
562
781
  updatedAt?: string | undefined;
563
782
  }[]>;
@@ -588,7 +807,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
588
807
  social_links?: {
589
808
  label: string;
590
809
  url: string;
591
- }[] | null | undefined;
810
+ }[] | null | undefined; /**
811
+ * `DELETE /user/{user_id}/factors/{factor_id}` — operationId: `user/deleteFactor`
812
+ *
813
+ * Remove one of a user's second factors
814
+ *
815
+ * The support path out of a lockout: with the factor gone, a `required` policy sends the user through enrolment on their next login instead of refusing it.
816
+ *
817
+ * @throws {FaableApiError} `factor_not_found` (400) — No factor with that id belongs to this user.
818
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
819
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
820
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
821
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
822
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
823
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
824
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
825
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
826
+ */
592
827
  } | null | undefined;
593
828
  email_footer?: {
594
829
  text: string;
@@ -635,6 +870,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
635
870
  oauth_link_verified_email?: boolean | undefined;
636
871
  client_id_metadata_documents_enabled?: boolean | undefined;
637
872
  canonical_host?: string | null | undefined;
873
+ disabled_at?: string | null | undefined;
874
+ disabled_by?: "owner" | "staff" | null | undefined;
638
875
  createdAt: string;
639
876
  updatedAt?: string | undefined;
640
877
  }>>;
@@ -668,7 +905,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
668
905
  social_links?: {
669
906
  label: string;
670
907
  url: string;
671
- }[] | null | undefined;
908
+ }[] | null | undefined; /**
909
+ * `DELETE /user/{user_id}/factors/{factor_id}` — operationId: `user/deleteFactor`
910
+ *
911
+ * Remove one of a user's second factors
912
+ *
913
+ * The support path out of a lockout: with the factor gone, a `required` policy sends the user through enrolment on their next login instead of refusing it.
914
+ *
915
+ * @throws {FaableApiError} `factor_not_found` (400) — No factor with that id belongs to this user.
916
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
917
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
918
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
919
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
920
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
921
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
922
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
923
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
924
+ */
672
925
  } | null | undefined;
673
926
  email_footer?: {
674
927
  text: string;
@@ -715,6 +968,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
715
968
  oauth_link_verified_email?: boolean | undefined;
716
969
  client_id_metadata_documents_enabled?: boolean | undefined;
717
970
  canonical_host?: string | null | undefined;
971
+ disabled_at?: string | null | undefined;
972
+ disabled_by?: "owner" | "staff" | null | undefined;
718
973
  createdAt: string;
719
974
  updatedAt?: string | undefined;
720
975
  }>>;
@@ -1002,6 +1257,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
1002
1257
  oauth_link_verified_email?: boolean | undefined;
1003
1258
  client_id_metadata_documents_enabled?: boolean | undefined;
1004
1259
  canonical_host?: string | null | undefined;
1260
+ disabled_at?: string | null | undefined;
1261
+ disabled_by?: "owner" | "staff" | null | undefined;
1005
1262
  createdAt: string;
1006
1263
  updatedAt?: string | undefined;
1007
1264
  }>;
@@ -3607,6 +3864,59 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
3607
3864
  updatedAt?: string | undefined;
3608
3865
  }>>;
3609
3866
  };
3867
+ /**
3868
+ * `POST /internal/account/{account_id}/disable` — operationId: `internal/accountDisable`
3869
+ *
3870
+ * Disable an Account as Faable staff (platform)
3871
+ *
3872
+ * Same effect as `account/disable`, recorded as `disabled_by: staff`: the owner cannot enable it again. Overrides a disable by the owner. Platform token with `update:accounts`; the deploy api calls it after checking the caller is staff.
3873
+ *
3874
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
3875
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
3876
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
3877
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
3878
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
3879
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
3880
+ * @throws {FaableApiError} `account_protected` (409) — A platform tenant (Faable's own) cannot be disabled: everyone, staff included, signs in through it.
3881
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
3882
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
3883
+ */
3884
+ internalAccountDisable(account_id: string, data: OpBody<"internal/accountDisable">): Promise<{
3885
+ account_id: string;
3886
+ team: string | null;
3887
+ name: string;
3888
+ disabled_at: string | null;
3889
+ disabled_by: "owner" | "staff" | null;
3890
+ disabled_reason: string | null;
3891
+ disabled_actor: string | null;
3892
+ changed: boolean;
3893
+ }>;
3894
+ /**
3895
+ * `POST /internal/account/{account_id}/enable` — operationId: `internal/accountEnable`
3896
+ *
3897
+ * Enable an Account as Faable staff (platform)
3898
+ *
3899
+ * Enables the tenant whoever disabled it. Platform token with `update:accounts`.
3900
+ *
3901
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
3902
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
3903
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
3904
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
3905
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
3906
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
3907
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
3908
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
3909
+ */
3910
+ internalAccountEnable(account_id: string, data: OpBody<"internal/accountEnable">): Promise<{
3911
+ account_id: string;
3912
+ team: string | null;
3913
+ name: string;
3914
+ disabled_at: string | null;
3915
+ disabled_by: "owner" | "staff" | null;
3916
+ disabled_reason: string | null;
3917
+ disabled_actor: string | null;
3918
+ changed: boolean;
3919
+ }>;
3610
3920
  /**
3611
3921
  * `GET /internal/accounts` — operationId: `internal/accountsOverview`
3612
3922
  *
@@ -3634,6 +3944,9 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
3634
3944
  clients: number;
3635
3945
  connections: number;
3636
3946
  custom_domain_verified: boolean;
3947
+ disabled_at: string | null;
3948
+ disabled_by: "owner" | "staff" | null;
3949
+ disabled_reason: string | null;
3637
3950
  }[];
3638
3951
  }>;
3639
3952
  /**
@@ -73,6 +73,28 @@ export class GeneratedFaableAuthApi extends FaableApi {
73
73
  requireId("account_id", account_id);
74
74
  return this.fetcher.delete(`/account/${account_id}`);
75
75
  }
76
+ /**
77
+ * `POST /account/{account_id}/disable` — operationId: `account/disable`
78
+ *
79
+ * Disable an Account
80
+ *
81
+ * Switches the tenant off without deleting anything: nobody can sign in, management writes are refused (403 `account_disabled`) and reads keep working. Sessions are not revoked — they work again once the tenant is enabled. Idempotent. A tenant disabled by Faable staff answers 403 `account_disabled` with `details.disabled_by: staff`.
82
+ *
83
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
84
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
85
+ * @throws {FaableApiError} `account_disabled` (403) — The Auth tenant is disabled: nobody can sign in and management writes are refused; reads keep working. `details.disabled_by` is `owner` (enable it again from the dashboard) or `staff` (contact support@faable.com).
86
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
87
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
88
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
89
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
90
+ * @throws {FaableApiError} `account_protected` (409) — A platform tenant (Faable's own) cannot be disabled: everyone, staff included, signs in through it.
91
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
92
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
93
+ */
94
+ accountDisable(account_id) {
95
+ requireId("account_id", account_id);
96
+ return this.fetcher.post(`/account/${account_id}/disable`, {});
97
+ }
76
98
  /**
77
99
  * `POST /account/{account_id}/email_sender` — operationId: `account/email_sender`
78
100
  *
@@ -94,6 +116,27 @@ export class GeneratedFaableAuthApi extends FaableApi {
94
116
  requireId("account_id", account_id);
95
117
  return this.fetcher.post(`/account/${account_id}/email_sender`, data);
96
118
  }
119
+ /**
120
+ * `POST /account/{account_id}/enable` — operationId: `account/enable`
121
+ *
122
+ * Enable a disabled Account
123
+ *
124
+ * Undoes `account/disable`: sign-in, sessions and management writes work again. Idempotent. A tenant disabled by Faable staff cannot be enabled here: 403 `account_disabled` with `details.disabled_by: staff` — contact support@faable.com.
125
+ *
126
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
127
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
128
+ * @throws {FaableApiError} `account_disabled` (403) — The Auth tenant is disabled: nobody can sign in and management writes are refused; reads keep working. `details.disabled_by` is `owner` (enable it again from the dashboard) or `staff` (contact support@faable.com).
129
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
130
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
131
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
132
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
133
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
134
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
135
+ */
136
+ accountEnable(account_id) {
137
+ requireId("account_id", account_id);
138
+ return this.fetcher.post(`/account/${account_id}/enable`, {});
139
+ }
97
140
  /**
98
141
  * `GET /account/{account_id}` — operationId: `account/get`
99
142
  *
@@ -1070,6 +1113,47 @@ export class GeneratedFaableAuthApi extends FaableApi {
1070
1113
  identityList(params) {
1071
1114
  return this.paginator({ url: `/identity`, params });
1072
1115
  }
1116
+ /**
1117
+ * `POST /internal/account/{account_id}/disable` — operationId: `internal/accountDisable`
1118
+ *
1119
+ * Disable an Account as Faable staff (platform)
1120
+ *
1121
+ * Same effect as `account/disable`, recorded as `disabled_by: staff`: the owner cannot enable it again. Overrides a disable by the owner. Platform token with `update:accounts`; the deploy api calls it after checking the caller is staff.
1122
+ *
1123
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
1124
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
1125
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
1126
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
1127
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
1128
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
1129
+ * @throws {FaableApiError} `account_protected` (409) — A platform tenant (Faable's own) cannot be disabled: everyone, staff included, signs in through it.
1130
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
1131
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
1132
+ */
1133
+ internalAccountDisable(account_id, data) {
1134
+ requireId("account_id", account_id);
1135
+ return this.fetcher.post(`/internal/account/${account_id}/disable`, data);
1136
+ }
1137
+ /**
1138
+ * `POST /internal/account/{account_id}/enable` — operationId: `internal/accountEnable`
1139
+ *
1140
+ * Enable an Account as Faable staff (platform)
1141
+ *
1142
+ * Enables the tenant whoever disabled it. Platform token with `update:accounts`.
1143
+ *
1144
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
1145
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
1146
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
1147
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
1148
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
1149
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
1150
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
1151
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
1152
+ */
1153
+ internalAccountEnable(account_id, data) {
1154
+ requireId("account_id", account_id);
1155
+ return this.fetcher.post(`/internal/account/${account_id}/enable`, data);
1156
+ }
1073
1157
  /**
1074
1158
  * `GET /internal/accounts` — operationId: `internal/accountsOverview`
1075
1159
  *