@faable/auth-sdk 2.7.81 → 2.7.83

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.
@@ -96,6 +96,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
96
96
  default_country_iso?: string | null | undefined;
97
97
  webauthn_rp_id?: string | null | undefined;
98
98
  logout_confirm_required?: boolean | undefined;
99
+ dynamic_client_registration_enabled?: boolean | undefined;
99
100
  canonical_host?: string | null | undefined;
100
101
  createdAt: string;
101
102
  updatedAt?: string | undefined;
@@ -174,6 +175,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
174
175
  default_country_iso?: string | null | undefined;
175
176
  webauthn_rp_id?: string | null | undefined;
176
177
  logout_confirm_required?: boolean | undefined;
178
+ dynamic_client_registration_enabled?: boolean | undefined;
177
179
  canonical_host?: string | null | undefined;
178
180
  createdAt: string;
179
181
  updatedAt?: string | undefined;
@@ -272,6 +274,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
272
274
  default_country_iso?: string | null | undefined;
273
275
  webauthn_rp_id?: string | null | undefined;
274
276
  logout_confirm_required?: boolean | undefined;
277
+ dynamic_client_registration_enabled?: boolean | undefined;
275
278
  canonical_host?: string | null | undefined;
276
279
  createdAt: string;
277
280
  updatedAt?: string | undefined;
@@ -353,6 +356,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
353
356
  default_country_iso?: string | null | undefined;
354
357
  webauthn_rp_id?: string | null | undefined;
355
358
  logout_confirm_required?: boolean | undefined;
359
+ dynamic_client_registration_enabled?: boolean | undefined;
356
360
  canonical_host?: string | null | undefined;
357
361
  createdAt: string;
358
362
  updatedAt?: string | undefined;
@@ -455,6 +459,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
455
459
  default_country_iso?: string | null | undefined;
456
460
  webauthn_rp_id?: string | null | undefined;
457
461
  logout_confirm_required?: boolean | undefined;
462
+ dynamic_client_registration_enabled?: boolean | undefined;
458
463
  canonical_host?: string | null | undefined;
459
464
  createdAt: string;
460
465
  updatedAt?: string | undefined;
@@ -517,6 +522,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
517
522
  default_country_iso?: string | null | undefined;
518
523
  webauthn_rp_id?: string | null | undefined;
519
524
  logout_confirm_required?: boolean | undefined;
525
+ dynamic_client_registration_enabled?: boolean | undefined;
520
526
  canonical_host?: string | null | undefined;
521
527
  createdAt: string;
522
528
  updatedAt?: string | undefined;
@@ -582,6 +588,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
582
588
  default_country_iso?: string | null | undefined;
583
589
  webauthn_rp_id?: string | null | undefined;
584
590
  logout_confirm_required?: boolean | undefined;
591
+ dynamic_client_registration_enabled?: boolean | undefined;
585
592
  canonical_host?: string | null | undefined;
586
593
  createdAt: string;
587
594
  updatedAt?: string | undefined;
@@ -819,6 +826,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
819
826
  default_country_iso?: string | null | undefined;
820
827
  webauthn_rp_id?: string | null | undefined;
821
828
  logout_confirm_required?: boolean | undefined;
829
+ dynamic_client_registration_enabled?: boolean | undefined;
822
830
  canonical_host?: string | null | undefined;
823
831
  createdAt: string;
824
832
  updatedAt?: string | undefined;
@@ -2118,7 +2126,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2118
2126
  readonly is_using_default_credentials: boolean;
2119
2127
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
2120
2128
  password_policy?: {
2121
- level: "none" | "low" | "fair" | "good" | "excellent";
2129
+ level: "none" | "low" | "fair" | "good" | "excellent"; /**
2130
+ * `GET /teammember` — operationId: `teammember/list`
2131
+ *
2132
+ * List Teammembers
2133
+ *
2134
+ * @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
2135
+ * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2136
+ * @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
2137
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2138
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2139
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2140
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2141
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2142
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2143
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2144
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2145
+ */
2122
2146
  min_length?: number | undefined;
2123
2147
  require_lowercase?: boolean | undefined;
2124
2148
  require_uppercase?: boolean | undefined;
@@ -2158,7 +2182,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2158
2182
  readonly is_using_default_credentials: boolean;
2159
2183
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
2160
2184
  password_policy?: {
2161
- level: "none" | "low" | "fair" | "good" | "excellent";
2185
+ level: "none" | "low" | "fair" | "good" | "excellent"; /**
2186
+ * `GET /teammember` — operationId: `teammember/list`
2187
+ *
2188
+ * List Teammembers
2189
+ *
2190
+ * @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
2191
+ * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2192
+ * @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
2193
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2194
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2195
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2196
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2197
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2198
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2199
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2200
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2201
+ */
2162
2202
  min_length?: number | undefined;
2163
2203
  require_lowercase?: boolean | undefined;
2164
2204
  require_uppercase?: boolean | undefined;
@@ -2201,7 +2241,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2201
2241
  readonly is_using_default_credentials: boolean;
2202
2242
  email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
2203
2243
  password_policy?: {
2204
- level: "none" | "low" | "fair" | "good" | "excellent";
2244
+ level: "none" | "low" | "fair" | "good" | "excellent"; /**
2245
+ * `GET /teammember` — operationId: `teammember/list`
2246
+ *
2247
+ * List Teammembers
2248
+ *
2249
+ * @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
2250
+ * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
2251
+ * @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
2252
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2253
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2254
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2255
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
2256
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
2257
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
2258
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
2259
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
2260
+ */
2205
2261
  min_length?: number | undefined;
2206
2262
  require_lowercase?: boolean | undefined;
2207
2263
  require_uppercase?: boolean | undefined;
@@ -4469,6 +4525,428 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
4469
4525
  createdAt: string;
4470
4526
  updatedAt?: string | undefined;
4471
4527
  }>;
4528
+ /**
4529
+ * `POST /organization/{organization_id}/admin` — operationId: `organization/addAdmin`
4530
+ *
4531
+ * Add an admin to an Organization
4532
+ *
4533
+ * Makes a user of this tenant an admin of the Organization. Idempotent. Being an admin does not grant access to any team of the organization. Emits `organization.updated`.
4534
+ *
4535
+ * @throws {FaableApiError} `invalid_user` (400) — The user does not exist in this account.
4536
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4537
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4538
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4539
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4540
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4541
+ * @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
4542
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4543
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4544
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4545
+ */
4546
+ organizationAddAdmin(organization_id: string, data: OpBody<"organization/addAdmin">): Promise<{
4547
+ id: string;
4548
+ name: string;
4549
+ slug: string;
4550
+ description: string | null;
4551
+ logo_url: string | null;
4552
+ domains: {
4553
+ domain: string;
4554
+ verification_token: string;
4555
+ verified_at: string | null;
4556
+ }[];
4557
+ admins: string[];
4558
+ account: string;
4559
+ metadata: {
4560
+ [key: string]: unknown;
4561
+ };
4562
+ createdAt: string;
4563
+ updatedAt?: string | undefined;
4564
+ }>;
4565
+ /**
4566
+ * `POST /organization/{organization_id}/domain` — operationId: `organization/addDomain`
4567
+ *
4568
+ * Claim an email domain for an Organization
4569
+ *
4570
+ * Adds the domain unverified, with the `verification_token` its TXT record must hold. Idempotent. Nothing changes for anyone until the domain is verified.
4571
+ *
4572
+ * @throws {FaableApiError} `invalid_email_domain` (400) — Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.
4573
+ * @throws {FaableApiError} `public_email_domain` (400) — A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.
4574
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4575
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4576
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4577
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4578
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4579
+ * @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
4580
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4581
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4582
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4583
+ */
4584
+ organizationAddDomain(organization_id: string, data: OpBody<"organization/addDomain">): Promise<{
4585
+ id: string;
4586
+ name: string;
4587
+ slug: string;
4588
+ description: string | null;
4589
+ logo_url: string | null;
4590
+ domains: {
4591
+ domain: string;
4592
+ verification_token: string;
4593
+ verified_at: string | null;
4594
+ }[];
4595
+ admins: string[];
4596
+ account: string;
4597
+ metadata: {
4598
+ [key: string]: unknown;
4599
+ };
4600
+ createdAt: string;
4601
+ updatedAt?: string | undefined;
4602
+ }>;
4603
+ /**
4604
+ * `POST /organization` — operationId: `organization/create`
4605
+ *
4606
+ * Create Organization
4607
+ *
4608
+ * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
4609
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4610
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4611
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4612
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4613
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4614
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4615
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4616
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4617
+ */
4618
+ organizationCreate(data: OpBody<"organization/create">): Promise<{
4619
+ id: string;
4620
+ name: string;
4621
+ slug: string;
4622
+ description: string | null;
4623
+ logo_url: string | null;
4624
+ domains: {
4625
+ domain: string;
4626
+ verification_token: string;
4627
+ verified_at: string | null;
4628
+ }[];
4629
+ admins: string[];
4630
+ account: string;
4631
+ metadata: {
4632
+ [key: string]: unknown;
4633
+ };
4634
+ createdAt: string;
4635
+ updatedAt?: string | undefined;
4636
+ }>;
4637
+ /**
4638
+ * `DELETE /organization/{organization_id}` — operationId: `organization/delete`
4639
+ *
4640
+ * Delete Organization
4641
+ *
4642
+ * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
4643
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4644
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4645
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4646
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4647
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4648
+ * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
4649
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4650
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4651
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4652
+ */
4653
+ organizationDelete(organization_id: string): Promise<{
4654
+ id: string;
4655
+ name: string;
4656
+ slug: string;
4657
+ description: string | null;
4658
+ logo_url: string | null;
4659
+ domains: {
4660
+ domain: string;
4661
+ verification_token: string;
4662
+ verified_at: string | null;
4663
+ }[];
4664
+ admins: string[];
4665
+ account: string;
4666
+ metadata: {
4667
+ [key: string]: unknown;
4668
+ };
4669
+ createdAt: string;
4670
+ updatedAt?: string | undefined;
4671
+ }>;
4672
+ /**
4673
+ * `GET /organization/{organization_id}` — operationId: `organization/get`
4674
+ *
4675
+ * Get Organization
4676
+ *
4677
+ * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
4678
+ * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
4679
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4680
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4681
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4682
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4683
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4684
+ * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
4685
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4686
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4687
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4688
+ */
4689
+ organizationGet(organization_id: string): Promise<{
4690
+ id: string;
4691
+ name: string;
4692
+ slug: string;
4693
+ description: string | null;
4694
+ logo_url: string | null;
4695
+ domains: {
4696
+ domain: string;
4697
+ verification_token: string;
4698
+ verified_at: string | null;
4699
+ }[];
4700
+ admins: string[];
4701
+ account: string;
4702
+ metadata: {
4703
+ [key: string]: unknown;
4704
+ };
4705
+ createdAt: string;
4706
+ updatedAt?: string | undefined;
4707
+ }>;
4708
+ /**
4709
+ * `GET /organization` — operationId: `organization/list`
4710
+ *
4711
+ * List Organizations
4712
+ *
4713
+ * @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
4714
+ * @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
4715
+ * @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
4716
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4717
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4718
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4719
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4720
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4721
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4722
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4723
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4724
+ */
4725
+ organizationList(params?: Omit<OpQuery<"organization/list">, "cursor" | "next">): {
4726
+ all: () => Promise<{
4727
+ id: string;
4728
+ name: string;
4729
+ slug: string;
4730
+ description: string | null;
4731
+ logo_url: string | null;
4732
+ domains: {
4733
+ domain: string;
4734
+ verification_token: string;
4735
+ verified_at: string | null;
4736
+ }[];
4737
+ admins: string[];
4738
+ account: string;
4739
+ metadata: {
4740
+ [key: string]: unknown;
4741
+ };
4742
+ createdAt: string;
4743
+ updatedAt?: string | undefined;
4744
+ }[]>;
4745
+ first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
4746
+ id: string;
4747
+ name: string;
4748
+ slug: string;
4749
+ description: string | null;
4750
+ logo_url: string | null;
4751
+ domains: {
4752
+ domain: string;
4753
+ verification_token: string;
4754
+ verified_at: string | null;
4755
+ }[];
4756
+ admins: string[];
4757
+ account: string;
4758
+ metadata: {
4759
+ [key: string]: unknown;
4760
+ };
4761
+ createdAt: string;
4762
+ updatedAt?: string | undefined;
4763
+ }>>;
4764
+ pass: (params?: {
4765
+ cursor?: string | undefined;
4766
+ pageSize?: string | undefined;
4767
+ } | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
4768
+ id: string;
4769
+ name: string;
4770
+ slug: string;
4771
+ description: string | null;
4772
+ logo_url: string | null;
4773
+ domains: {
4774
+ domain: string;
4775
+ verification_token: string;
4776
+ verified_at: string | null;
4777
+ }[];
4778
+ admins: string[];
4779
+ account: string;
4780
+ metadata: {
4781
+ [key: string]: unknown;
4782
+ };
4783
+ createdAt: string;
4784
+ updatedAt?: string | undefined;
4785
+ }>>;
4786
+ };
4787
+ /**
4788
+ * `DELETE /organization/{organization_id}/admin/{user_id}` — operationId: `organization/removeAdmin`
4789
+ *
4790
+ * Remove an admin from an Organization
4791
+ *
4792
+ * Removes the user from the admins of the Organization (the user is not deleted). An organization keeps at least one admin: removing the last one is `last_organization_admin`. Emits `organization.updated`.
4793
+ *
4794
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4795
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4796
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4797
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4798
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4799
+ * @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
4800
+ * @throws {FaableApiError} `not_an_organization_admin` (404) — The user is not an admin of the organization.
4801
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4802
+ * @throws {FaableApiError} `last_organization_admin` (409) — An organization keeps at least one admin. Add another admin before removing this one.
4803
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4804
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4805
+ */
4806
+ organizationRemoveAdmin(organization_id: string, user_id: string): Promise<{
4807
+ id: string;
4808
+ name: string;
4809
+ slug: string;
4810
+ description: string | null;
4811
+ logo_url: string | null;
4812
+ domains: {
4813
+ domain: string;
4814
+ verification_token: string;
4815
+ verified_at: string | null;
4816
+ }[];
4817
+ admins: string[];
4818
+ account: string;
4819
+ metadata: {
4820
+ [key: string]: unknown;
4821
+ };
4822
+ createdAt: string;
4823
+ updatedAt?: string | undefined;
4824
+ }>;
4825
+ /**
4826
+ * `DELETE /organization/{organization_id}/domain/{domain}` — operationId: `organization/removeDomain`
4827
+ *
4828
+ * Remove an email domain from an Organization
4829
+ *
4830
+ * Removes the domain, verified or not. Logins of people already in the organization are unaffected.
4831
+ *
4832
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4833
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4834
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4835
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4836
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4837
+ * @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
4838
+ * @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
4839
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4840
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4841
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4842
+ */
4843
+ organizationRemoveDomain(organization_id: string, domain: string): Promise<{
4844
+ id: string;
4845
+ name: string;
4846
+ slug: string;
4847
+ description: string | null;
4848
+ logo_url: string | null;
4849
+ domains: {
4850
+ domain: string;
4851
+ verification_token: string;
4852
+ verified_at: string | null;
4853
+ }[];
4854
+ admins: string[];
4855
+ account: string;
4856
+ metadata: {
4857
+ [key: string]: unknown;
4858
+ };
4859
+ createdAt: string;
4860
+ updatedAt?: string | undefined;
4861
+ }>;
4862
+ /**
4863
+ * `POST /organization/{organization_id}` — operationId: `organization/update`
4864
+ *
4865
+ * Update Organization
4866
+ *
4867
+ * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
4868
+ * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
4869
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4870
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4871
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4872
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4873
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4874
+ * @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
4875
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4876
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4877
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4878
+ */
4879
+ organizationUpdate(organization_id: string, data: OpBody<"organization/update">): Promise<{
4880
+ id: string;
4881
+ name: string;
4882
+ slug: string;
4883
+ description: string | null;
4884
+ logo_url: string | null;
4885
+ domains: {
4886
+ domain: string;
4887
+ verification_token: string;
4888
+ verified_at: string | null;
4889
+ }[];
4890
+ admins: string[];
4891
+ account: string;
4892
+ metadata: {
4893
+ [key: string]: unknown;
4894
+ };
4895
+ createdAt: string;
4896
+ updatedAt?: string | undefined;
4897
+ }>;
4898
+ /**
4899
+ * `POST /organization/{organization_id}/domain/{domain}/verify` — operationId: `organization/verifyDomain`
4900
+ *
4901
+ * Verify an Organization's email domain
4902
+ *
4903
+ * Looks up the TXT record `_faable-challenge.<domain>` and, when it holds `faable-verification=<verification_token>`, marks the domain verified. Pro plan (`plan_required`; `plan_unavailable` when the plan cannot be checked). A domain is verified by one organization of the tenant at most (`organization_domain_taken`).
4904
+ *
4905
+ * @throws {FaableApiError} `organization_domain_unverified` (400) — The TXT record was not found or does not hold the expected value yet. `details.record` says what was expected and what resolves now; DNS can take a few minutes to propagate.
4906
+ * @throws {FaableApiError} `invalid_email_domain` (400) — Not an email domain this organization can claim: it must be a plain domain name (`acme.com`), lowercase, without scheme, path or wildcard.
4907
+ * @throws {FaableApiError} `public_email_domain` (400) — A public email provider (gmail.com, outlook.com…) cannot belong to an organization: anyone can have an address there.
4908
+ * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
4909
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
4910
+ * @throws {FaableApiError} `plan_required` (402) — The setting requires a higher plan. `message` says which.
4911
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
4912
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
4913
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
4914
+ * @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
4915
+ * @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
4916
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
4917
+ * @throws {FaableApiError} `organization_domain_taken` (409) — Another organization of this tenant already verified this domain. A domain belongs to one organization.
4918
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
4919
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
4920
+ * @throws {FaableApiError} `plan_unavailable` (503) — The plan could not be checked right now, and this setting is only for paid plans. Try again in a minute.
4921
+ */
4922
+ organizationVerifyDomain(organization_id: string, domain: string): Promise<{
4923
+ organization: {
4924
+ id: string;
4925
+ name: string;
4926
+ slug: string;
4927
+ description: string | null;
4928
+ logo_url: string | null;
4929
+ domains: {
4930
+ domain: string;
4931
+ verification_token: string;
4932
+ verified_at: string | null;
4933
+ }[];
4934
+ admins: string[];
4935
+ account: string;
4936
+ metadata: {
4937
+ [key: string]: unknown;
4938
+ };
4939
+ createdAt: string;
4940
+ updatedAt?: string | undefined;
4941
+ };
4942
+ record: {
4943
+ type: "TXT";
4944
+ host: string;
4945
+ expected: string;
4946
+ observed: string[];
4947
+ ok: boolean;
4948
+ } | null;
4949
+ }>;
4472
4950
  /**
4473
4951
  * `POST /role/{role_id}/users` — operationId: `role/assign_users`
4474
4952
  *
@@ -5089,6 +5567,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5089
5567
  slug: string;
5090
5568
  description: string | null;
5091
5569
  logo_url: string | null;
5570
+ organization?: string | null | undefined;
5092
5571
  account: string;
5093
5572
  metadata: {
5094
5573
  [key: string]: unknown;
@@ -5143,6 +5622,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5143
5622
  slug: string;
5144
5623
  description: string | null;
5145
5624
  logo_url: string | null;
5625
+ organization?: string | null | undefined;
5146
5626
  account: string;
5147
5627
  metadata: {
5148
5628
  [key: string]: unknown;
@@ -5173,6 +5653,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5173
5653
  slug: string;
5174
5654
  description: string | null;
5175
5655
  logo_url: string | null;
5656
+ organization?: string | null | undefined;
5176
5657
  account: string;
5177
5658
  metadata: {
5178
5659
  [key: string]: unknown;
@@ -5239,6 +5720,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5239
5720
  slug: string;
5240
5721
  description: string | null;
5241
5722
  logo_url: string | null;
5723
+ organization?: string | null | undefined;
5242
5724
  account: string;
5243
5725
  metadata: {
5244
5726
  [key: string]: unknown;
@@ -5252,6 +5734,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5252
5734
  slug: string;
5253
5735
  description: string | null;
5254
5736
  logo_url: string | null;
5737
+ organization?: string | null | undefined;
5255
5738
  account: string;
5256
5739
  metadata: {
5257
5740
  [key: string]: unknown;
@@ -5268,6 +5751,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5268
5751
  slug: string;
5269
5752
  description: string | null;
5270
5753
  logo_url: string | null;
5754
+ organization?: string | null | undefined;
5271
5755
  account: string;
5272
5756
  metadata: {
5273
5757
  [key: string]: unknown;
@@ -5469,6 +5953,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5469
5953
  slug: string;
5470
5954
  description: string | null;
5471
5955
  logo_url: string | null;
5956
+ organization?: string | null | undefined;
5472
5957
  account: string;
5473
5958
  metadata: {
5474
5959
  [key: string]: unknown;