@faable/auth-sdk 2.7.82 → 2.7.84
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.
- package/dist/FaableAuthApi.d.ts +4 -0
- package/dist/api/generated-client.d.ts +227 -0
- package/dist/api/generated-client.js +75 -0
- package/dist/api/types.d.ts +992 -1
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +2863 -894
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -621,6 +621,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
621
621
|
jwks_url: string;
|
|
622
622
|
response_type: string;
|
|
623
623
|
enabled: boolean;
|
|
624
|
+
organization?: string | null | undefined;
|
|
624
625
|
enabled_clients: string[] | null;
|
|
625
626
|
scope: string[];
|
|
626
627
|
authorize_params: {
|
|
@@ -661,6 +662,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
661
662
|
jwks_url: string;
|
|
662
663
|
response_type: string;
|
|
663
664
|
enabled: boolean;
|
|
665
|
+
organization?: string | null | undefined;
|
|
664
666
|
enabled_clients: string[] | null;
|
|
665
667
|
scope: string[];
|
|
666
668
|
authorize_params: {
|
|
@@ -704,6 +706,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
704
706
|
jwks_url: string;
|
|
705
707
|
response_type: string;
|
|
706
708
|
enabled: boolean;
|
|
709
|
+
organization?: string | null | undefined;
|
|
707
710
|
enabled_clients: string[] | null;
|
|
708
711
|
scope: string[];
|
|
709
712
|
authorize_params: {
|
|
@@ -746,6 +749,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
746
749
|
jwks_url: string;
|
|
747
750
|
response_type: string;
|
|
748
751
|
enabled: boolean;
|
|
752
|
+
organization?: string | null | undefined;
|
|
749
753
|
enabled_clients: string[] | null;
|
|
750
754
|
scope: string[];
|
|
751
755
|
authorize_params: {
|
|
@@ -1944,6 +1944,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1944
1944
|
jwks_url: string;
|
|
1945
1945
|
response_type: string;
|
|
1946
1946
|
enabled: boolean;
|
|
1947
|
+
organization?: string | null | undefined;
|
|
1947
1948
|
enabled_clients: string[] | null;
|
|
1948
1949
|
scope: string[];
|
|
1949
1950
|
authorize_params: {
|
|
@@ -2000,6 +2001,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2000
2001
|
jwks_url: string;
|
|
2001
2002
|
response_type: string;
|
|
2002
2003
|
enabled: boolean;
|
|
2004
|
+
organization?: string | null | undefined;
|
|
2003
2005
|
enabled_clients: string[] | null;
|
|
2004
2006
|
scope: string[];
|
|
2005
2007
|
authorize_params: {
|
|
@@ -2057,6 +2059,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2057
2059
|
jwks_url: string;
|
|
2058
2060
|
response_type: string;
|
|
2059
2061
|
enabled: boolean;
|
|
2062
|
+
organization?: string | null | undefined;
|
|
2060
2063
|
enabled_clients: string[] | null;
|
|
2061
2064
|
scope: string[];
|
|
2062
2065
|
authorize_params: {
|
|
@@ -2115,6 +2118,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2115
2118
|
jwks_url: string;
|
|
2116
2119
|
response_type: string;
|
|
2117
2120
|
enabled: boolean;
|
|
2121
|
+
organization?: string | null | undefined;
|
|
2118
2122
|
enabled_clients: string[] | null;
|
|
2119
2123
|
scope: string[];
|
|
2120
2124
|
authorize_params: {
|
|
@@ -2155,6 +2159,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2155
2159
|
jwks_url: string;
|
|
2156
2160
|
response_type: string;
|
|
2157
2161
|
enabled: boolean;
|
|
2162
|
+
organization?: string | null | undefined;
|
|
2158
2163
|
enabled_clients: string[] | null;
|
|
2159
2164
|
scope: string[];
|
|
2160
2165
|
authorize_params: {
|
|
@@ -2198,6 +2203,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2198
2203
|
jwks_url: string;
|
|
2199
2204
|
response_type: string;
|
|
2200
2205
|
enabled: boolean;
|
|
2206
|
+
organization?: string | null | undefined;
|
|
2201
2207
|
enabled_clients: string[] | null;
|
|
2202
2208
|
scope: string[];
|
|
2203
2209
|
authorize_params: {
|
|
@@ -2256,6 +2262,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2256
2262
|
jwks_url: string;
|
|
2257
2263
|
response_type: string;
|
|
2258
2264
|
enabled: boolean;
|
|
2265
|
+
organization?: string | null | undefined;
|
|
2259
2266
|
enabled_clients: string[] | null;
|
|
2260
2267
|
scope: string[];
|
|
2261
2268
|
authorize_params: {
|
|
@@ -4501,6 +4508,57 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4501
4508
|
slug: string;
|
|
4502
4509
|
description: string | null;
|
|
4503
4510
|
logo_url: string | null;
|
|
4511
|
+
domains: {
|
|
4512
|
+
domain: string;
|
|
4513
|
+
verification_token: string;
|
|
4514
|
+
verified_at: string | null;
|
|
4515
|
+
}[];
|
|
4516
|
+
auto_join: {
|
|
4517
|
+
team: string;
|
|
4518
|
+
roles: string[];
|
|
4519
|
+
}[];
|
|
4520
|
+
admins: string[];
|
|
4521
|
+
account: string;
|
|
4522
|
+
metadata: {
|
|
4523
|
+
[key: string]: unknown;
|
|
4524
|
+
};
|
|
4525
|
+
createdAt: string;
|
|
4526
|
+
updatedAt?: string | undefined;
|
|
4527
|
+
}>;
|
|
4528
|
+
/**
|
|
4529
|
+
* `POST /organization/{organization_id}/domain` — operationId: `organization/addDomain`
|
|
4530
|
+
*
|
|
4531
|
+
* Claim an email domain for an Organization
|
|
4532
|
+
*
|
|
4533
|
+
* Adds the domain unverified, with the `verification_token` its TXT record must hold. Idempotent. Nothing changes for anyone until the domain is verified.
|
|
4534
|
+
*
|
|
4535
|
+
* @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.
|
|
4536
|
+
* @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.
|
|
4537
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4538
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4539
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4540
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4541
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4542
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
4543
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4544
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4545
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4546
|
+
*/
|
|
4547
|
+
organizationAddDomain(organization_id: string, data: OpBody<"organization/addDomain">): Promise<{
|
|
4548
|
+
id: string;
|
|
4549
|
+
name: string;
|
|
4550
|
+
slug: string;
|
|
4551
|
+
description: string | null;
|
|
4552
|
+
logo_url: string | null;
|
|
4553
|
+
domains: {
|
|
4554
|
+
domain: string;
|
|
4555
|
+
verification_token: string;
|
|
4556
|
+
verified_at: string | null;
|
|
4557
|
+
}[];
|
|
4558
|
+
auto_join: {
|
|
4559
|
+
team: string;
|
|
4560
|
+
roles: string[];
|
|
4561
|
+
}[];
|
|
4504
4562
|
admins: string[];
|
|
4505
4563
|
account: string;
|
|
4506
4564
|
metadata: {
|
|
@@ -4530,6 +4588,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4530
4588
|
slug: string;
|
|
4531
4589
|
description: string | null;
|
|
4532
4590
|
logo_url: string | null;
|
|
4591
|
+
domains: {
|
|
4592
|
+
domain: string;
|
|
4593
|
+
verification_token: string;
|
|
4594
|
+
verified_at: string | null;
|
|
4595
|
+
}[];
|
|
4596
|
+
auto_join: {
|
|
4597
|
+
team: string;
|
|
4598
|
+
roles: string[];
|
|
4599
|
+
}[];
|
|
4533
4600
|
admins: string[];
|
|
4534
4601
|
account: string;
|
|
4535
4602
|
metadata: {
|
|
@@ -4560,6 +4627,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4560
4627
|
slug: string;
|
|
4561
4628
|
description: string | null;
|
|
4562
4629
|
logo_url: string | null;
|
|
4630
|
+
domains: {
|
|
4631
|
+
domain: string;
|
|
4632
|
+
verification_token: string;
|
|
4633
|
+
verified_at: string | null;
|
|
4634
|
+
}[];
|
|
4635
|
+
auto_join: {
|
|
4636
|
+
team: string;
|
|
4637
|
+
roles: string[];
|
|
4638
|
+
}[];
|
|
4563
4639
|
admins: string[];
|
|
4564
4640
|
account: string;
|
|
4565
4641
|
metadata: {
|
|
@@ -4591,6 +4667,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4591
4667
|
slug: string;
|
|
4592
4668
|
description: string | null;
|
|
4593
4669
|
logo_url: string | null;
|
|
4670
|
+
domains: {
|
|
4671
|
+
domain: string;
|
|
4672
|
+
verification_token: string;
|
|
4673
|
+
verified_at: string | null;
|
|
4674
|
+
}[];
|
|
4675
|
+
auto_join: {
|
|
4676
|
+
team: string;
|
|
4677
|
+
roles: string[];
|
|
4678
|
+
}[];
|
|
4594
4679
|
admins: string[];
|
|
4595
4680
|
account: string;
|
|
4596
4681
|
metadata: {
|
|
@@ -4623,6 +4708,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4623
4708
|
slug: string;
|
|
4624
4709
|
description: string | null;
|
|
4625
4710
|
logo_url: string | null;
|
|
4711
|
+
domains: {
|
|
4712
|
+
domain: string;
|
|
4713
|
+
verification_token: string;
|
|
4714
|
+
verified_at: string | null;
|
|
4715
|
+
}[];
|
|
4716
|
+
auto_join: {
|
|
4717
|
+
team: string;
|
|
4718
|
+
roles: string[];
|
|
4719
|
+
}[];
|
|
4626
4720
|
admins: string[];
|
|
4627
4721
|
account: string;
|
|
4628
4722
|
metadata: {
|
|
@@ -4637,6 +4731,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4637
4731
|
slug: string;
|
|
4638
4732
|
description: string | null;
|
|
4639
4733
|
logo_url: string | null;
|
|
4734
|
+
domains: {
|
|
4735
|
+
domain: string;
|
|
4736
|
+
verification_token: string;
|
|
4737
|
+
verified_at: string | null;
|
|
4738
|
+
}[];
|
|
4739
|
+
auto_join: {
|
|
4740
|
+
team: string;
|
|
4741
|
+
roles: string[];
|
|
4742
|
+
}[];
|
|
4640
4743
|
admins: string[];
|
|
4641
4744
|
account: string;
|
|
4642
4745
|
metadata: {
|
|
@@ -4654,6 +4757,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4654
4757
|
slug: string;
|
|
4655
4758
|
description: string | null;
|
|
4656
4759
|
logo_url: string | null;
|
|
4760
|
+
domains: {
|
|
4761
|
+
domain: string;
|
|
4762
|
+
verification_token: string;
|
|
4763
|
+
verified_at: string | null;
|
|
4764
|
+
}[];
|
|
4765
|
+
auto_join: {
|
|
4766
|
+
team: string;
|
|
4767
|
+
roles: string[];
|
|
4768
|
+
}[];
|
|
4657
4769
|
admins: string[];
|
|
4658
4770
|
account: string;
|
|
4659
4771
|
metadata: {
|
|
@@ -4688,6 +4800,56 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4688
4800
|
slug: string;
|
|
4689
4801
|
description: string | null;
|
|
4690
4802
|
logo_url: string | null;
|
|
4803
|
+
domains: {
|
|
4804
|
+
domain: string;
|
|
4805
|
+
verification_token: string;
|
|
4806
|
+
verified_at: string | null;
|
|
4807
|
+
}[];
|
|
4808
|
+
auto_join: {
|
|
4809
|
+
team: string;
|
|
4810
|
+
roles: string[];
|
|
4811
|
+
}[];
|
|
4812
|
+
admins: string[];
|
|
4813
|
+
account: string;
|
|
4814
|
+
metadata: {
|
|
4815
|
+
[key: string]: unknown;
|
|
4816
|
+
};
|
|
4817
|
+
createdAt: string;
|
|
4818
|
+
updatedAt?: string | undefined;
|
|
4819
|
+
}>;
|
|
4820
|
+
/**
|
|
4821
|
+
* `DELETE /organization/{organization_id}/domain/{domain}` — operationId: `organization/removeDomain`
|
|
4822
|
+
*
|
|
4823
|
+
* Remove an email domain from an Organization
|
|
4824
|
+
*
|
|
4825
|
+
* Removes the domain, verified or not. Logins of people already in the organization are unaffected.
|
|
4826
|
+
*
|
|
4827
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4828
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4829
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4830
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4831
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4832
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
4833
|
+
* @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
|
|
4834
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4835
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4836
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4837
|
+
*/
|
|
4838
|
+
organizationRemoveDomain(organization_id: string, domain: string): Promise<{
|
|
4839
|
+
id: string;
|
|
4840
|
+
name: string;
|
|
4841
|
+
slug: string;
|
|
4842
|
+
description: string | null;
|
|
4843
|
+
logo_url: string | null;
|
|
4844
|
+
domains: {
|
|
4845
|
+
domain: string;
|
|
4846
|
+
verification_token: string;
|
|
4847
|
+
verified_at: string | null;
|
|
4848
|
+
}[];
|
|
4849
|
+
auto_join: {
|
|
4850
|
+
team: string;
|
|
4851
|
+
roles: string[];
|
|
4852
|
+
}[];
|
|
4691
4853
|
admins: string[];
|
|
4692
4854
|
account: string;
|
|
4693
4855
|
metadata: {
|
|
@@ -4719,6 +4881,15 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4719
4881
|
slug: string;
|
|
4720
4882
|
description: string | null;
|
|
4721
4883
|
logo_url: string | null;
|
|
4884
|
+
domains: {
|
|
4885
|
+
domain: string;
|
|
4886
|
+
verification_token: string;
|
|
4887
|
+
verified_at: string | null;
|
|
4888
|
+
}[];
|
|
4889
|
+
auto_join: {
|
|
4890
|
+
team: string;
|
|
4891
|
+
roles: string[];
|
|
4892
|
+
}[];
|
|
4722
4893
|
admins: string[];
|
|
4723
4894
|
account: string;
|
|
4724
4895
|
metadata: {
|
|
@@ -4727,6 +4898,62 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4727
4898
|
createdAt: string;
|
|
4728
4899
|
updatedAt?: string | undefined;
|
|
4729
4900
|
}>;
|
|
4901
|
+
/**
|
|
4902
|
+
* `POST /organization/{organization_id}/domain/{domain}/verify` — operationId: `organization/verifyDomain`
|
|
4903
|
+
*
|
|
4904
|
+
* Verify an Organization's email domain
|
|
4905
|
+
*
|
|
4906
|
+
* 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`).
|
|
4907
|
+
*
|
|
4908
|
+
* @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.
|
|
4909
|
+
* @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.
|
|
4910
|
+
* @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.
|
|
4911
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4912
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4913
|
+
* @throws {FaableApiError} `plan_required` (402) — The setting requires a higher plan. `message` says which.
|
|
4914
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4915
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4916
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4917
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
4918
|
+
* @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
|
|
4919
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4920
|
+
* @throws {FaableApiError} `organization_domain_taken` (409) — Another organization of this tenant already verified this domain. A domain belongs to one organization.
|
|
4921
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4922
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4923
|
+
* @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.
|
|
4924
|
+
*/
|
|
4925
|
+
organizationVerifyDomain(organization_id: string, domain: string): Promise<{
|
|
4926
|
+
organization: {
|
|
4927
|
+
id: string;
|
|
4928
|
+
name: string;
|
|
4929
|
+
slug: string;
|
|
4930
|
+
description: string | null;
|
|
4931
|
+
logo_url: string | null;
|
|
4932
|
+
domains: {
|
|
4933
|
+
domain: string;
|
|
4934
|
+
verification_token: string;
|
|
4935
|
+
verified_at: string | null;
|
|
4936
|
+
}[];
|
|
4937
|
+
auto_join: {
|
|
4938
|
+
team: string;
|
|
4939
|
+
roles: string[];
|
|
4940
|
+
}[];
|
|
4941
|
+
admins: string[];
|
|
4942
|
+
account: string;
|
|
4943
|
+
metadata: {
|
|
4944
|
+
[key: string]: unknown;
|
|
4945
|
+
};
|
|
4946
|
+
createdAt: string;
|
|
4947
|
+
updatedAt?: string | undefined;
|
|
4948
|
+
};
|
|
4949
|
+
record: {
|
|
4950
|
+
type: "TXT";
|
|
4951
|
+
host: string;
|
|
4952
|
+
expected: string;
|
|
4953
|
+
observed: string[];
|
|
4954
|
+
ok: boolean;
|
|
4955
|
+
} | null;
|
|
4956
|
+
}>;
|
|
4730
4957
|
/**
|
|
4731
4958
|
* `POST /role/{role_id}/users` — operationId: `role/assign_users`
|
|
4732
4959
|
*
|
|
@@ -1556,6 +1556,29 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1556
1556
|
requireId("organization_id", organization_id);
|
|
1557
1557
|
return this.fetcher.post(`/organization/${organization_id}/admin`, data);
|
|
1558
1558
|
}
|
|
1559
|
+
/**
|
|
1560
|
+
* `POST /organization/{organization_id}/domain` — operationId: `organization/addDomain`
|
|
1561
|
+
*
|
|
1562
|
+
* Claim an email domain for an Organization
|
|
1563
|
+
*
|
|
1564
|
+
* Adds the domain unverified, with the `verification_token` its TXT record must hold. Idempotent. Nothing changes for anyone until the domain is verified.
|
|
1565
|
+
*
|
|
1566
|
+
* @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.
|
|
1567
|
+
* @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.
|
|
1568
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1569
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1570
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1571
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1572
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1573
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
1574
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1575
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1576
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1577
|
+
*/
|
|
1578
|
+
organizationAddDomain(organization_id, data) {
|
|
1579
|
+
requireId("organization_id", organization_id);
|
|
1580
|
+
return this.fetcher.post(`/organization/${organization_id}/domain`, data);
|
|
1581
|
+
}
|
|
1559
1582
|
/**
|
|
1560
1583
|
* `POST /organization` — operationId: `organization/create`
|
|
1561
1584
|
*
|
|
@@ -1659,6 +1682,29 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1659
1682
|
requireId("user_id", user_id);
|
|
1660
1683
|
return this.fetcher.delete(`/organization/${organization_id}/admin/${user_id}`);
|
|
1661
1684
|
}
|
|
1685
|
+
/**
|
|
1686
|
+
* `DELETE /organization/{organization_id}/domain/{domain}` — operationId: `organization/removeDomain`
|
|
1687
|
+
*
|
|
1688
|
+
* Remove an email domain from an Organization
|
|
1689
|
+
*
|
|
1690
|
+
* Removes the domain, verified or not. Logins of people already in the organization are unaffected.
|
|
1691
|
+
*
|
|
1692
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1693
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1694
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1695
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1696
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1697
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
1698
|
+
* @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
|
|
1699
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1700
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1701
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1702
|
+
*/
|
|
1703
|
+
organizationRemoveDomain(organization_id, domain) {
|
|
1704
|
+
requireId("organization_id", organization_id);
|
|
1705
|
+
requireId("domain", domain);
|
|
1706
|
+
return this.fetcher.delete(`/organization/${organization_id}/domain/${domain}`);
|
|
1707
|
+
}
|
|
1662
1708
|
/**
|
|
1663
1709
|
* `POST /organization/{organization_id}` — operationId: `organization/update`
|
|
1664
1710
|
*
|
|
@@ -1680,6 +1726,35 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1680
1726
|
requireId("organization_id", organization_id);
|
|
1681
1727
|
return this.fetcher.post(`/organization/${organization_id}`, data);
|
|
1682
1728
|
}
|
|
1729
|
+
/**
|
|
1730
|
+
* `POST /organization/{organization_id}/domain/{domain}/verify` — operationId: `organization/verifyDomain`
|
|
1731
|
+
*
|
|
1732
|
+
* Verify an Organization's email domain
|
|
1733
|
+
*
|
|
1734
|
+
* 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`).
|
|
1735
|
+
*
|
|
1736
|
+
* @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.
|
|
1737
|
+
* @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.
|
|
1738
|
+
* @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.
|
|
1739
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1740
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1741
|
+
* @throws {FaableApiError} `plan_required` (402) — The setting requires a higher plan. `message` says which.
|
|
1742
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1743
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1744
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1745
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
1746
|
+
* @throws {FaableApiError} `organization_domain_not_found` (404) — The organization has no such domain.
|
|
1747
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1748
|
+
* @throws {FaableApiError} `organization_domain_taken` (409) — Another organization of this tenant already verified this domain. A domain belongs to one organization.
|
|
1749
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1750
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1751
|
+
* @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.
|
|
1752
|
+
*/
|
|
1753
|
+
organizationVerifyDomain(organization_id, domain) {
|
|
1754
|
+
requireId("organization_id", organization_id);
|
|
1755
|
+
requireId("domain", domain);
|
|
1756
|
+
return this.fetcher.post(`/organization/${organization_id}/domain/${domain}/verify`, {});
|
|
1757
|
+
}
|
|
1683
1758
|
/**
|
|
1684
1759
|
* `POST /role/{role_id}/users` — operationId: `role/assign_users`
|
|
1685
1760
|
*
|