@faable/auth-sdk 2.7.81 → 2.7.82
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 +7 -0
- package/dist/api/api-types.d.ts +6 -0
- package/dist/api/generated-client.d.ts +265 -0
- package/dist/api/generated-client.js +146 -0
- package/dist/api/types.d.ts +1518 -75
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +2916 -493
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
97
97
|
default_country_iso?: string | null | undefined;
|
|
98
98
|
webauthn_rp_id?: string | null | undefined;
|
|
99
99
|
logout_confirm_required?: boolean | undefined;
|
|
100
|
+
dynamic_client_registration_enabled?: boolean | undefined;
|
|
100
101
|
canonical_host?: string | null | undefined;
|
|
101
102
|
createdAt: string;
|
|
102
103
|
updatedAt?: string | undefined;
|
|
@@ -477,6 +478,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
477
478
|
slug: string;
|
|
478
479
|
description: string | null;
|
|
479
480
|
logo_url: string | null;
|
|
481
|
+
organization?: string | null | undefined;
|
|
480
482
|
account: string;
|
|
481
483
|
metadata: {
|
|
482
484
|
[key: string]: unknown;
|
|
@@ -491,6 +493,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
491
493
|
slug: string;
|
|
492
494
|
description: string | null;
|
|
493
495
|
logo_url: string | null;
|
|
496
|
+
organization?: string | null | undefined;
|
|
494
497
|
account: string;
|
|
495
498
|
metadata: {
|
|
496
499
|
[key: string]: unknown;
|
|
@@ -505,6 +508,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
505
508
|
slug: string;
|
|
506
509
|
description: string | null;
|
|
507
510
|
logo_url: string | null;
|
|
511
|
+
organization?: string | null | undefined;
|
|
508
512
|
account: string;
|
|
509
513
|
metadata: {
|
|
510
514
|
[key: string]: unknown;
|
|
@@ -520,6 +524,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
520
524
|
slug: string;
|
|
521
525
|
description: string | null;
|
|
522
526
|
logo_url: string | null;
|
|
527
|
+
organization?: string | null | undefined;
|
|
523
528
|
account: string;
|
|
524
529
|
metadata: {
|
|
525
530
|
[key: string]: unknown;
|
|
@@ -533,6 +538,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
533
538
|
slug: string;
|
|
534
539
|
description: string | null;
|
|
535
540
|
logo_url: string | null;
|
|
541
|
+
organization?: string | null | undefined;
|
|
536
542
|
account: string;
|
|
537
543
|
metadata: {
|
|
538
544
|
[key: string]: unknown;
|
|
@@ -549,6 +555,7 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
549
555
|
slug: string;
|
|
550
556
|
description: string | null;
|
|
551
557
|
logo_url: string | null;
|
|
558
|
+
organization?: string | null | undefined;
|
|
552
559
|
account: string;
|
|
553
560
|
metadata: {
|
|
554
561
|
[key: string]: unknown;
|
package/dist/api/api-types.d.ts
CHANGED
|
@@ -76,6 +76,12 @@ export type NotificationSubscriptionWebhookMetadataCreate = components["schemas"
|
|
|
76
76
|
export type NotificationSubscriptionWebhookMetadataUpdate = components["schemas"]["NotificationSubscriptionWebhookMetadataUpdate"];
|
|
77
77
|
export type OAuthGrantType = components["schemas"]["OAuthGrantType"];
|
|
78
78
|
export type OAuthTokenParams = components["schemas"]["OAuthTokenParams"];
|
|
79
|
+
export type Organization = components["schemas"]["Organization"];
|
|
80
|
+
export type OrganizationCreate = components["schemas"]["OrganizationCreate"];
|
|
81
|
+
export type OrganizationMetadata = components["schemas"]["OrganizationMetadata"];
|
|
82
|
+
export type OrganizationMetadataCreate = components["schemas"]["OrganizationMetadataCreate"];
|
|
83
|
+
export type OrganizationUpdate = components["schemas"]["OrganizationUpdate"];
|
|
84
|
+
export type OrganizationUpdateMetadata = components["schemas"]["OrganizationUpdateMetadata"];
|
|
79
85
|
export type Permission = components["schemas"]["Permission"];
|
|
80
86
|
export type PermissionCreate = components["schemas"]["PermissionCreate"];
|
|
81
87
|
export type Role = components["schemas"]["Role"];
|
|
@@ -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;
|
|
@@ -4469,6 +4477,256 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4469
4477
|
createdAt: string;
|
|
4470
4478
|
updatedAt?: string | undefined;
|
|
4471
4479
|
}>;
|
|
4480
|
+
/**
|
|
4481
|
+
* `POST /organization/{organization_id}/admin` — operationId: `organization/addAdmin`
|
|
4482
|
+
*
|
|
4483
|
+
* Add an admin to an Organization
|
|
4484
|
+
*
|
|
4485
|
+
* 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`.
|
|
4486
|
+
*
|
|
4487
|
+
* @throws {FaableApiError} `invalid_user` (400) — The user does not exist in this account.
|
|
4488
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4489
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4490
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4491
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4492
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4493
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
4494
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4495
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4496
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4497
|
+
*/
|
|
4498
|
+
organizationAddAdmin(organization_id: string, data: OpBody<"organization/addAdmin">): Promise<{
|
|
4499
|
+
id: string;
|
|
4500
|
+
name: string;
|
|
4501
|
+
slug: string;
|
|
4502
|
+
description: string | null;
|
|
4503
|
+
logo_url: string | null;
|
|
4504
|
+
admins: string[];
|
|
4505
|
+
account: string;
|
|
4506
|
+
metadata: {
|
|
4507
|
+
[key: string]: unknown;
|
|
4508
|
+
};
|
|
4509
|
+
createdAt: string;
|
|
4510
|
+
updatedAt?: string | undefined;
|
|
4511
|
+
}>;
|
|
4512
|
+
/**
|
|
4513
|
+
* `POST /organization` — operationId: `organization/create`
|
|
4514
|
+
*
|
|
4515
|
+
* Create Organization
|
|
4516
|
+
*
|
|
4517
|
+
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
4518
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4519
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4520
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4521
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4522
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4523
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4524
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4525
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4526
|
+
*/
|
|
4527
|
+
organizationCreate(data: OpBody<"organization/create">): Promise<{
|
|
4528
|
+
id: string;
|
|
4529
|
+
name: string;
|
|
4530
|
+
slug: string;
|
|
4531
|
+
description: string | null;
|
|
4532
|
+
logo_url: string | null;
|
|
4533
|
+
admins: string[];
|
|
4534
|
+
account: string;
|
|
4535
|
+
metadata: {
|
|
4536
|
+
[key: string]: unknown;
|
|
4537
|
+
};
|
|
4538
|
+
createdAt: string;
|
|
4539
|
+
updatedAt?: string | undefined;
|
|
4540
|
+
}>;
|
|
4541
|
+
/**
|
|
4542
|
+
* `DELETE /organization/{organization_id}` — operationId: `organization/delete`
|
|
4543
|
+
*
|
|
4544
|
+
* Delete Organization
|
|
4545
|
+
*
|
|
4546
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
4547
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4548
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4549
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4550
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4551
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4552
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4553
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4554
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4555
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4556
|
+
*/
|
|
4557
|
+
organizationDelete(organization_id: string): Promise<{
|
|
4558
|
+
id: string;
|
|
4559
|
+
name: string;
|
|
4560
|
+
slug: string;
|
|
4561
|
+
description: string | null;
|
|
4562
|
+
logo_url: string | null;
|
|
4563
|
+
admins: string[];
|
|
4564
|
+
account: string;
|
|
4565
|
+
metadata: {
|
|
4566
|
+
[key: string]: unknown;
|
|
4567
|
+
};
|
|
4568
|
+
createdAt: string;
|
|
4569
|
+
updatedAt?: string | undefined;
|
|
4570
|
+
}>;
|
|
4571
|
+
/**
|
|
4572
|
+
* `GET /organization/{organization_id}` — operationId: `organization/get`
|
|
4573
|
+
*
|
|
4574
|
+
* Get Organization
|
|
4575
|
+
*
|
|
4576
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
4577
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
4578
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4579
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4580
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4581
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4582
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4583
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4584
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4585
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4586
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4587
|
+
*/
|
|
4588
|
+
organizationGet(organization_id: string): Promise<{
|
|
4589
|
+
id: string;
|
|
4590
|
+
name: string;
|
|
4591
|
+
slug: string;
|
|
4592
|
+
description: string | null;
|
|
4593
|
+
logo_url: string | null;
|
|
4594
|
+
admins: string[];
|
|
4595
|
+
account: string;
|
|
4596
|
+
metadata: {
|
|
4597
|
+
[key: string]: unknown;
|
|
4598
|
+
};
|
|
4599
|
+
createdAt: string;
|
|
4600
|
+
updatedAt?: string | undefined;
|
|
4601
|
+
}>;
|
|
4602
|
+
/**
|
|
4603
|
+
* `GET /organization` — operationId: `organization/list`
|
|
4604
|
+
*
|
|
4605
|
+
* List Organizations
|
|
4606
|
+
*
|
|
4607
|
+
* @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
|
|
4608
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
4609
|
+
* @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
|
|
4610
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4611
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4612
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4613
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4614
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4615
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4616
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4617
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4618
|
+
*/
|
|
4619
|
+
organizationList(params?: Omit<OpQuery<"organization/list">, "cursor" | "next">): {
|
|
4620
|
+
all: () => Promise<{
|
|
4621
|
+
id: string;
|
|
4622
|
+
name: string;
|
|
4623
|
+
slug: string;
|
|
4624
|
+
description: string | null;
|
|
4625
|
+
logo_url: string | null;
|
|
4626
|
+
admins: string[];
|
|
4627
|
+
account: string;
|
|
4628
|
+
metadata: {
|
|
4629
|
+
[key: string]: unknown;
|
|
4630
|
+
};
|
|
4631
|
+
createdAt: string;
|
|
4632
|
+
updatedAt?: string | undefined;
|
|
4633
|
+
}[]>;
|
|
4634
|
+
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
4635
|
+
id: string;
|
|
4636
|
+
name: string;
|
|
4637
|
+
slug: string;
|
|
4638
|
+
description: string | null;
|
|
4639
|
+
logo_url: string | null;
|
|
4640
|
+
admins: string[];
|
|
4641
|
+
account: string;
|
|
4642
|
+
metadata: {
|
|
4643
|
+
[key: string]: unknown;
|
|
4644
|
+
};
|
|
4645
|
+
createdAt: string;
|
|
4646
|
+
updatedAt?: string | undefined;
|
|
4647
|
+
}>>;
|
|
4648
|
+
pass: (params?: {
|
|
4649
|
+
cursor?: string | undefined;
|
|
4650
|
+
pageSize?: string | undefined;
|
|
4651
|
+
} | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
4652
|
+
id: string;
|
|
4653
|
+
name: string;
|
|
4654
|
+
slug: string;
|
|
4655
|
+
description: string | null;
|
|
4656
|
+
logo_url: string | null;
|
|
4657
|
+
admins: string[];
|
|
4658
|
+
account: string;
|
|
4659
|
+
metadata: {
|
|
4660
|
+
[key: string]: unknown;
|
|
4661
|
+
};
|
|
4662
|
+
createdAt: string;
|
|
4663
|
+
updatedAt?: string | undefined;
|
|
4664
|
+
}>>;
|
|
4665
|
+
};
|
|
4666
|
+
/**
|
|
4667
|
+
* `DELETE /organization/{organization_id}/admin/{user_id}` — operationId: `organization/removeAdmin`
|
|
4668
|
+
*
|
|
4669
|
+
* Remove an admin from an Organization
|
|
4670
|
+
*
|
|
4671
|
+
* 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`.
|
|
4672
|
+
*
|
|
4673
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4674
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4675
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4676
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4677
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4678
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
4679
|
+
* @throws {FaableApiError} `not_an_organization_admin` (404) — The user is not an admin of the organization.
|
|
4680
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4681
|
+
* @throws {FaableApiError} `last_organization_admin` (409) — An organization keeps at least one admin. Add another admin before removing this one.
|
|
4682
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4683
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4684
|
+
*/
|
|
4685
|
+
organizationRemoveAdmin(organization_id: string, user_id: string): Promise<{
|
|
4686
|
+
id: string;
|
|
4687
|
+
name: string;
|
|
4688
|
+
slug: string;
|
|
4689
|
+
description: string | null;
|
|
4690
|
+
logo_url: string | null;
|
|
4691
|
+
admins: string[];
|
|
4692
|
+
account: string;
|
|
4693
|
+
metadata: {
|
|
4694
|
+
[key: string]: unknown;
|
|
4695
|
+
};
|
|
4696
|
+
createdAt: string;
|
|
4697
|
+
updatedAt?: string | undefined;
|
|
4698
|
+
}>;
|
|
4699
|
+
/**
|
|
4700
|
+
* `POST /organization/{organization_id}` — operationId: `organization/update`
|
|
4701
|
+
*
|
|
4702
|
+
* Update Organization
|
|
4703
|
+
*
|
|
4704
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
4705
|
+
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
4706
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4707
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4708
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4709
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4710
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4711
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4712
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4713
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4714
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4715
|
+
*/
|
|
4716
|
+
organizationUpdate(organization_id: string, data: OpBody<"organization/update">): Promise<{
|
|
4717
|
+
id: string;
|
|
4718
|
+
name: string;
|
|
4719
|
+
slug: string;
|
|
4720
|
+
description: string | null;
|
|
4721
|
+
logo_url: string | null;
|
|
4722
|
+
admins: string[];
|
|
4723
|
+
account: string;
|
|
4724
|
+
metadata: {
|
|
4725
|
+
[key: string]: unknown;
|
|
4726
|
+
};
|
|
4727
|
+
createdAt: string;
|
|
4728
|
+
updatedAt?: string | undefined;
|
|
4729
|
+
}>;
|
|
4472
4730
|
/**
|
|
4473
4731
|
* `POST /role/{role_id}/users` — operationId: `role/assign_users`
|
|
4474
4732
|
*
|
|
@@ -5089,6 +5347,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5089
5347
|
slug: string;
|
|
5090
5348
|
description: string | null;
|
|
5091
5349
|
logo_url: string | null;
|
|
5350
|
+
organization?: string | null | undefined;
|
|
5092
5351
|
account: string;
|
|
5093
5352
|
metadata: {
|
|
5094
5353
|
[key: string]: unknown;
|
|
@@ -5143,6 +5402,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5143
5402
|
slug: string;
|
|
5144
5403
|
description: string | null;
|
|
5145
5404
|
logo_url: string | null;
|
|
5405
|
+
organization?: string | null | undefined;
|
|
5146
5406
|
account: string;
|
|
5147
5407
|
metadata: {
|
|
5148
5408
|
[key: string]: unknown;
|
|
@@ -5173,6 +5433,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5173
5433
|
slug: string;
|
|
5174
5434
|
description: string | null;
|
|
5175
5435
|
logo_url: string | null;
|
|
5436
|
+
organization?: string | null | undefined;
|
|
5176
5437
|
account: string;
|
|
5177
5438
|
metadata: {
|
|
5178
5439
|
[key: string]: unknown;
|
|
@@ -5239,6 +5500,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5239
5500
|
slug: string;
|
|
5240
5501
|
description: string | null;
|
|
5241
5502
|
logo_url: string | null;
|
|
5503
|
+
organization?: string | null | undefined;
|
|
5242
5504
|
account: string;
|
|
5243
5505
|
metadata: {
|
|
5244
5506
|
[key: string]: unknown;
|
|
@@ -5252,6 +5514,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5252
5514
|
slug: string;
|
|
5253
5515
|
description: string | null;
|
|
5254
5516
|
logo_url: string | null;
|
|
5517
|
+
organization?: string | null | undefined;
|
|
5255
5518
|
account: string;
|
|
5256
5519
|
metadata: {
|
|
5257
5520
|
[key: string]: unknown;
|
|
@@ -5268,6 +5531,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5268
5531
|
slug: string;
|
|
5269
5532
|
description: string | null;
|
|
5270
5533
|
logo_url: string | null;
|
|
5534
|
+
organization?: string | null | undefined;
|
|
5271
5535
|
account: string;
|
|
5272
5536
|
metadata: {
|
|
5273
5537
|
[key: string]: unknown;
|
|
@@ -5469,6 +5733,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5469
5733
|
slug: string;
|
|
5470
5734
|
description: string | null;
|
|
5471
5735
|
logo_url: string | null;
|
|
5736
|
+
organization?: string | null | undefined;
|
|
5472
5737
|
account: string;
|
|
5473
5738
|
metadata: {
|
|
5474
5739
|
[key: string]: unknown;
|
|
@@ -1534,6 +1534,152 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1534
1534
|
requireId("notificationsubscription_id", notificationsubscription_id);
|
|
1535
1535
|
return this.fetcher.post(`/notificationsubscription/${notificationsubscription_id}`, data);
|
|
1536
1536
|
}
|
|
1537
|
+
/**
|
|
1538
|
+
* `POST /organization/{organization_id}/admin` — operationId: `organization/addAdmin`
|
|
1539
|
+
*
|
|
1540
|
+
* Add an admin to an Organization
|
|
1541
|
+
*
|
|
1542
|
+
* 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`.
|
|
1543
|
+
*
|
|
1544
|
+
* @throws {FaableApiError} `invalid_user` (400) — The user does not exist in this account.
|
|
1545
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1546
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1547
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1548
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1549
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1550
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
1551
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1552
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1553
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1554
|
+
*/
|
|
1555
|
+
organizationAddAdmin(organization_id, data) {
|
|
1556
|
+
requireId("organization_id", organization_id);
|
|
1557
|
+
return this.fetcher.post(`/organization/${organization_id}/admin`, data);
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* `POST /organization` — operationId: `organization/create`
|
|
1561
|
+
*
|
|
1562
|
+
* Create Organization
|
|
1563
|
+
*
|
|
1564
|
+
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
1565
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1566
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1567
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1568
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1569
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1570
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1571
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1572
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1573
|
+
*/
|
|
1574
|
+
organizationCreate(data) {
|
|
1575
|
+
return this.fetcher.post(`/organization`, data);
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* `DELETE /organization/{organization_id}` — operationId: `organization/delete`
|
|
1579
|
+
*
|
|
1580
|
+
* Delete Organization
|
|
1581
|
+
*
|
|
1582
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
1583
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1584
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1585
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1586
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1587
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1588
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1589
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1590
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1591
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1592
|
+
*/
|
|
1593
|
+
organizationDelete(organization_id) {
|
|
1594
|
+
requireId("organization_id", organization_id);
|
|
1595
|
+
return this.fetcher.delete(`/organization/${organization_id}`);
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* `GET /organization/{organization_id}` — operationId: `organization/get`
|
|
1599
|
+
*
|
|
1600
|
+
* Get Organization
|
|
1601
|
+
*
|
|
1602
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
1603
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
1604
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1605
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1606
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1607
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1608
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1609
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1610
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1611
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1612
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1613
|
+
*/
|
|
1614
|
+
organizationGet(organization_id) {
|
|
1615
|
+
requireId("organization_id", organization_id);
|
|
1616
|
+
return this.fetcher.get(`/organization/${organization_id}`);
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* `GET /organization` — operationId: `organization/list`
|
|
1620
|
+
*
|
|
1621
|
+
* List Organizations
|
|
1622
|
+
*
|
|
1623
|
+
* @throws {FaableApiError} `invalid_query` (400) — The `?query=` FaableQL expression could not be parsed.
|
|
1624
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
1625
|
+
* @throws {FaableApiError} `search_not_supported` (400) — This resource does not support `?search=`.
|
|
1626
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1627
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1628
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1629
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1630
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1631
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1632
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1633
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1634
|
+
*/
|
|
1635
|
+
organizationList(params) {
|
|
1636
|
+
return this.paginator({ url: `/organization`, params });
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* `DELETE /organization/{organization_id}/admin/{user_id}` — operationId: `organization/removeAdmin`
|
|
1640
|
+
*
|
|
1641
|
+
* Remove an admin from an Organization
|
|
1642
|
+
*
|
|
1643
|
+
* 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`.
|
|
1644
|
+
*
|
|
1645
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1646
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1647
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1648
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1649
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1650
|
+
* @throws {FaableApiError} `organization_not_found` (404) — No organization with that id in this account.
|
|
1651
|
+
* @throws {FaableApiError} `not_an_organization_admin` (404) — The user is not an admin of the organization.
|
|
1652
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1653
|
+
* @throws {FaableApiError} `last_organization_admin` (409) — An organization keeps at least one admin. Add another admin before removing this one.
|
|
1654
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1655
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1656
|
+
*/
|
|
1657
|
+
organizationRemoveAdmin(organization_id, user_id) {
|
|
1658
|
+
requireId("organization_id", organization_id);
|
|
1659
|
+
requireId("user_id", user_id);
|
|
1660
|
+
return this.fetcher.delete(`/organization/${organization_id}/admin/${user_id}`);
|
|
1661
|
+
}
|
|
1662
|
+
/**
|
|
1663
|
+
* `POST /organization/{organization_id}` — operationId: `organization/update`
|
|
1664
|
+
*
|
|
1665
|
+
* Update Organization
|
|
1666
|
+
*
|
|
1667
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
1668
|
+
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
1669
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1670
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1671
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1672
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1673
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1674
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1675
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1676
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1677
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1678
|
+
*/
|
|
1679
|
+
organizationUpdate(organization_id, data) {
|
|
1680
|
+
requireId("organization_id", organization_id);
|
|
1681
|
+
return this.fetcher.post(`/organization/${organization_id}`, data);
|
|
1682
|
+
}
|
|
1537
1683
|
/**
|
|
1538
1684
|
* `POST /role/{role_id}/users` — operationId: `role/assign_users`
|
|
1539
1685
|
*
|