@faable/auth-sdk 2.7.60 → 2.7.62
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/api/api-types.d.ts +0 -2
- package/dist/api/generated-client.d.ts +143 -37
- package/dist/api/generated-client.js +105 -23
- package/dist/api/types.d.ts +2031 -1109
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +2729 -1547
package/dist/api/api-types.d.ts
CHANGED
|
@@ -81,7 +81,6 @@ export type PermissionCreate = components["schemas"]["PermissionCreate"];
|
|
|
81
81
|
export type Role = components["schemas"]["Role"];
|
|
82
82
|
export type RoleCreate = components["schemas"]["RoleCreate"];
|
|
83
83
|
export type RoleMember = components["schemas"]["RoleMember"];
|
|
84
|
-
export type RoleMemberCreate = components["schemas"]["RoleMemberCreate"];
|
|
85
84
|
export type RoleMemberMetadata = components["schemas"]["RoleMemberMetadata"];
|
|
86
85
|
export type RoleMetadata = components["schemas"]["RoleMetadata"];
|
|
87
86
|
export type RoleMetadataCreate = components["schemas"]["RoleMetadataCreate"];
|
|
@@ -91,7 +90,6 @@ export type SessionMetadata = components["schemas"]["SessionMetadata"];
|
|
|
91
90
|
export type Team = components["schemas"]["Team"];
|
|
92
91
|
export type TeamCreate = components["schemas"]["TeamCreate"];
|
|
93
92
|
export type TeamMember = components["schemas"]["TeamMember"];
|
|
94
|
-
export type TeamMemberCreate = components["schemas"]["TeamMemberCreate"];
|
|
95
93
|
export type TeamMemberMetadata = components["schemas"]["TeamMemberMetadata"];
|
|
96
94
|
export type TeamMetadata = components["schemas"]["TeamMetadata"];
|
|
97
95
|
export type TeamMetadataCreate = components["schemas"]["TeamMetadataCreate"];
|
|
@@ -4088,8 +4088,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4088
4088
|
active: boolean;
|
|
4089
4089
|
config: {
|
|
4090
4090
|
url: string;
|
|
4091
|
-
|
|
4091
|
+
previous_secret_expires_at?: string | undefined;
|
|
4092
4092
|
};
|
|
4093
|
+
status?: "healthy" | "failing" | undefined;
|
|
4094
|
+
consecutive_failures?: number | undefined;
|
|
4095
|
+
last_failure_at?: string | undefined;
|
|
4096
|
+
last_success_at?: string | undefined;
|
|
4097
|
+
secret?: string | undefined;
|
|
4093
4098
|
account: string;
|
|
4094
4099
|
metadata: {
|
|
4095
4100
|
[key: string]: unknown;
|
|
@@ -4134,8 +4139,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4134
4139
|
active: boolean;
|
|
4135
4140
|
config: {
|
|
4136
4141
|
url: string;
|
|
4137
|
-
|
|
4142
|
+
previous_secret_expires_at?: string | undefined;
|
|
4138
4143
|
};
|
|
4144
|
+
status?: "healthy" | "failing" | undefined;
|
|
4145
|
+
consecutive_failures?: number | undefined;
|
|
4146
|
+
last_failure_at?: string | undefined;
|
|
4147
|
+
last_success_at?: string | undefined;
|
|
4148
|
+
secret?: string | undefined;
|
|
4139
4149
|
account: string;
|
|
4140
4150
|
metadata: {
|
|
4141
4151
|
[key: string]: unknown;
|
|
@@ -4181,8 +4191,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4181
4191
|
active: boolean;
|
|
4182
4192
|
config: {
|
|
4183
4193
|
url: string;
|
|
4184
|
-
|
|
4194
|
+
previous_secret_expires_at?: string | undefined;
|
|
4185
4195
|
};
|
|
4196
|
+
status?: "healthy" | "failing" | undefined;
|
|
4197
|
+
consecutive_failures?: number | undefined;
|
|
4198
|
+
last_failure_at?: string | undefined;
|
|
4199
|
+
last_success_at?: string | undefined;
|
|
4200
|
+
secret?: string | undefined;
|
|
4186
4201
|
account: string;
|
|
4187
4202
|
metadata: {
|
|
4188
4203
|
[key: string]: unknown;
|
|
@@ -4229,8 +4244,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4229
4244
|
active: boolean;
|
|
4230
4245
|
config: {
|
|
4231
4246
|
url: string;
|
|
4232
|
-
|
|
4247
|
+
previous_secret_expires_at?: string | undefined;
|
|
4233
4248
|
};
|
|
4249
|
+
status?: "healthy" | "failing" | undefined;
|
|
4250
|
+
consecutive_failures?: number | undefined;
|
|
4251
|
+
last_failure_at?: string | undefined;
|
|
4252
|
+
last_success_at?: string | undefined;
|
|
4253
|
+
secret?: string | undefined;
|
|
4234
4254
|
account: string;
|
|
4235
4255
|
metadata: {
|
|
4236
4256
|
[key: string]: unknown;
|
|
@@ -4259,8 +4279,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4259
4279
|
active: boolean;
|
|
4260
4280
|
config: {
|
|
4261
4281
|
url: string;
|
|
4262
|
-
|
|
4282
|
+
previous_secret_expires_at?: string | undefined;
|
|
4263
4283
|
};
|
|
4284
|
+
status?: "healthy" | "failing" | undefined;
|
|
4285
|
+
consecutive_failures?: number | undefined;
|
|
4286
|
+
last_failure_at?: string | undefined;
|
|
4287
|
+
last_success_at?: string | undefined;
|
|
4288
|
+
secret?: string | undefined;
|
|
4264
4289
|
account: string;
|
|
4265
4290
|
metadata: {
|
|
4266
4291
|
[key: string]: unknown;
|
|
@@ -4292,8 +4317,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4292
4317
|
active: boolean;
|
|
4293
4318
|
config: {
|
|
4294
4319
|
url: string;
|
|
4295
|
-
|
|
4320
|
+
previous_secret_expires_at?: string | undefined;
|
|
4296
4321
|
};
|
|
4322
|
+
status?: "healthy" | "failing" | undefined;
|
|
4323
|
+
consecutive_failures?: number | undefined;
|
|
4324
|
+
last_failure_at?: string | undefined;
|
|
4325
|
+
last_success_at?: string | undefined;
|
|
4326
|
+
secret?: string | undefined;
|
|
4297
4327
|
account: string;
|
|
4298
4328
|
metadata: {
|
|
4299
4329
|
[key: string]: unknown;
|
|
@@ -4302,6 +4332,75 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4302
4332
|
updatedAt?: string | undefined;
|
|
4303
4333
|
}>>;
|
|
4304
4334
|
};
|
|
4335
|
+
/**
|
|
4336
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/deliveries/{delivery_id}/redeliver` — operationId: `notificationsubscription/redeliver`
|
|
4337
|
+
*
|
|
4338
|
+
* Redeliver a webhook delivery
|
|
4339
|
+
*
|
|
4340
|
+
* Queues a past delivery (succeeded, failed or still retrying) to be sent again within the next few seconds, with the same event id (`x-faable-delivery`) and a fresh retry schedule (1 min, 5 min, 30 min, 2 h, 12 h on timeouts, network errors, 5xx and 429). The delivery id is `data.delivery_id` in the `webhook.<event>` Log rows. Deliveries are kept for 30 days after they finish.
|
|
4341
|
+
*
|
|
4342
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
4343
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4344
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4345
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4346
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4347
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4348
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4349
|
+
* @throws {FaableApiError} `delivery_not_found` (404) — No webhook delivery with that id for this subscription.
|
|
4350
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4351
|
+
* @throws {FaableApiError} `delivery_in_progress` (409) — The delivery is being attempted right now; retry the redeliver in a minute.
|
|
4352
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4353
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4354
|
+
*/
|
|
4355
|
+
notificationsubscriptionRedeliver(notificationsubscription_id: string, delivery_id: string): Promise<void>;
|
|
4356
|
+
/**
|
|
4357
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/rotate-secret` — operationId: `notificationsubscription/rotateSecret`
|
|
4358
|
+
*
|
|
4359
|
+
* Rotate a webhook's signing secret
|
|
4360
|
+
*
|
|
4361
|
+
* Replaces the signing secret with a new one (generated, or the one in the body) and keeps the previous one valid for 24 hours. During that overlap every delivery carries two signatures, `x-faable-signature: sha256=<new>,sha256=<previous>`, so receivers can switch to the new secret at their own pace: accept a delivery when any of the signatures matches. The new secret is returned only in this response. Rotating again during an overlap drops the oldest secret.
|
|
4362
|
+
*
|
|
4363
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
4364
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4365
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4366
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4367
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4368
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4369
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4370
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4371
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4372
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4373
|
+
*/
|
|
4374
|
+
notificationsubscriptionRotateSecret(notificationsubscription_id: string, data: OpBody<"notificationsubscription/rotateSecret">): Promise<{
|
|
4375
|
+
id: string;
|
|
4376
|
+
secret: string;
|
|
4377
|
+
previous_secret_expires_at: string;
|
|
4378
|
+
}>;
|
|
4379
|
+
/**
|
|
4380
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/test` — operationId: `notificationsubscription/test`
|
|
4381
|
+
*
|
|
4382
|
+
* Send a test event to a webhook
|
|
4383
|
+
*
|
|
4384
|
+
* Sends a signed `ping` event to the subscription URL right now and returns the outcome. The request is signed exactly like a real delivery (`x-faable-signature`, `x-faable-timestamp`, `x-faable-delivery`), with `payload: { subscription_id }`. It is not retried and is recorded in the Log as `webhook.ping`. A successful test sets a `failing` subscription back to `healthy`. Works on inactive subscriptions too.
|
|
4385
|
+
*
|
|
4386
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
4387
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4388
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4389
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4390
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4391
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4392
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
4393
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4394
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4395
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4396
|
+
*/
|
|
4397
|
+
notificationsubscriptionTest(notificationsubscription_id: string): Promise<{
|
|
4398
|
+
ok: boolean;
|
|
4399
|
+
event_id: string;
|
|
4400
|
+
status?: number | undefined;
|
|
4401
|
+
duration_ms: number;
|
|
4402
|
+
error?: string | undefined;
|
|
4403
|
+
}>;
|
|
4305
4404
|
/**
|
|
4306
4405
|
* `POST /notificationsubscription/{notificationsubscription_id}` — operationId: `notificationsubscription/update`
|
|
4307
4406
|
*
|
|
@@ -4340,8 +4439,13 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4340
4439
|
active: boolean;
|
|
4341
4440
|
config: {
|
|
4342
4441
|
url: string;
|
|
4343
|
-
|
|
4442
|
+
previous_secret_expires_at?: string | undefined;
|
|
4344
4443
|
};
|
|
4444
|
+
status?: "healthy" | "failing" | undefined;
|
|
4445
|
+
consecutive_failures?: number | undefined;
|
|
4446
|
+
last_failure_at?: string | undefined;
|
|
4447
|
+
last_success_at?: string | undefined;
|
|
4448
|
+
secret?: string | undefined;
|
|
4345
4449
|
account: string;
|
|
4346
4450
|
metadata: {
|
|
4347
4451
|
[key: string]: unknown;
|
|
@@ -4583,32 +4687,6 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4583
4687
|
updatedAt?: string | undefined;
|
|
4584
4688
|
}>>;
|
|
4585
4689
|
};
|
|
4586
|
-
/**
|
|
4587
|
-
* `POST /rolemember` — operationId: `rolemember/create`
|
|
4588
|
-
*
|
|
4589
|
-
* Create Rolemember
|
|
4590
|
-
*
|
|
4591
|
-
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
4592
|
-
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4593
|
-
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4594
|
-
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
4595
|
-
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
4596
|
-
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
4597
|
-
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
4598
|
-
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
4599
|
-
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
4600
|
-
*/
|
|
4601
|
-
rolememberCreate(data: OpBody<"rolemember/create">): Promise<{
|
|
4602
|
-
id: string;
|
|
4603
|
-
role: unknown;
|
|
4604
|
-
user: unknown;
|
|
4605
|
-
account: string;
|
|
4606
|
-
metadata: {
|
|
4607
|
-
[key: string]: unknown;
|
|
4608
|
-
};
|
|
4609
|
-
createdAt: string;
|
|
4610
|
-
updatedAt?: string | undefined;
|
|
4611
|
-
}>;
|
|
4612
4690
|
/**
|
|
4613
4691
|
* `DELETE /rolemember/{rolemember_id}` — operationId: `rolemember/delete`
|
|
4614
4692
|
*
|
|
@@ -4894,6 +4972,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4894
4972
|
* Adds one or more Users of this tenant as members of the given Team, with the same roles. Users already in the team are skipped; `already_member` only when all of them are. A user or team that is not in this tenant is a 404. Returns the TeamMember record of the first user in `users`.
|
|
4895
4973
|
*
|
|
4896
4974
|
* @throws {FaableApiError} `already_member` (400) — The user is already a member of the team.
|
|
4975
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
4897
4976
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
4898
4977
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
4899
4978
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -5040,6 +5119,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5040
5119
|
* Invites a user by email. `mode='auto'` (default) adds the user directly when the email already corresponds to a user in this tenant and falls back to a ticketed invite + email otherwise. `mode='invite'` always issues a ticket + email even when the user exists. Re-inviting the same email to the same team invalidates the previous pending invite.
|
|
5041
5120
|
*
|
|
5042
5121
|
* @throws {FaableApiError} `invite_used` (400) — The invite was already accepted.
|
|
5122
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
5043
5123
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5044
5124
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5045
5125
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -5218,6 +5298,28 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5218
5298
|
updatedAt?: string | undefined;
|
|
5219
5299
|
}>>;
|
|
5220
5300
|
};
|
|
5301
|
+
/**
|
|
5302
|
+
* `DELETE /team/{team_id}/member/{user_id}` — operationId: `team/removeMember`
|
|
5303
|
+
*
|
|
5304
|
+
* Remove a User from a Team
|
|
5305
|
+
*
|
|
5306
|
+
* Removes the User's membership of the given Team (the User itself is not deleted). Emits `team.member.removed` and leaves an entry in the tenant's log.
|
|
5307
|
+
*
|
|
5308
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5309
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5310
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5311
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5312
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5313
|
+
* @throws {FaableApiError} `not_a_member` (404) — The user is not a member of the team.
|
|
5314
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
5315
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5316
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5317
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5318
|
+
*/
|
|
5319
|
+
teamRemoveMember(team_id: string, user_id: string): Promise<{
|
|
5320
|
+
id: string;
|
|
5321
|
+
deleted: true;
|
|
5322
|
+
}>;
|
|
5221
5323
|
/**
|
|
5222
5324
|
* `DELETE /team/{team_id}/invite/{ticket_id}` — operationId: `team/revokeInvite`
|
|
5223
5325
|
*
|
|
@@ -5269,21 +5371,25 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5269
5371
|
updatedAt?: string | undefined;
|
|
5270
5372
|
}>;
|
|
5271
5373
|
/**
|
|
5272
|
-
* `POST /
|
|
5374
|
+
* `POST /team/{team_id}/member/{user_id}` — operationId: `team/updateMember`
|
|
5273
5375
|
*
|
|
5274
|
-
*
|
|
5376
|
+
* Change a Team member's roles
|
|
5275
5377
|
*
|
|
5276
|
-
*
|
|
5378
|
+
* Replaces the roles a User holds within the given Team. Every role must be a Role of this tenant. Emits `team.member.updated` when the roles actually change, and leaves an entry in the tenant's log.
|
|
5379
|
+
*
|
|
5380
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
5277
5381
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5278
5382
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5279
5383
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5280
5384
|
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5281
5385
|
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5386
|
+
* @throws {FaableApiError} `not_a_member` (404) — The user is not a member of the team.
|
|
5387
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
5282
5388
|
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5283
5389
|
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5284
5390
|
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5285
5391
|
*/
|
|
5286
|
-
|
|
5392
|
+
teamUpdateMember(team_id: string, user_id: string, data: OpBody<"team/updateMember">): Promise<{
|
|
5287
5393
|
id: string;
|
|
5288
5394
|
user: unknown;
|
|
5289
5395
|
team: unknown;
|
|
@@ -1444,6 +1444,75 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1444
1444
|
notificationsubscriptionList(params) {
|
|
1445
1445
|
return this.paginator({ url: `/notificationsubscription`, params });
|
|
1446
1446
|
}
|
|
1447
|
+
/**
|
|
1448
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/deliveries/{delivery_id}/redeliver` — operationId: `notificationsubscription/redeliver`
|
|
1449
|
+
*
|
|
1450
|
+
* Redeliver a webhook delivery
|
|
1451
|
+
*
|
|
1452
|
+
* Queues a past delivery (succeeded, failed or still retrying) to be sent again within the next few seconds, with the same event id (`x-faable-delivery`) and a fresh retry schedule (1 min, 5 min, 30 min, 2 h, 12 h on timeouts, network errors, 5xx and 429). The delivery id is `data.delivery_id` in the `webhook.<event>` Log rows. Deliveries are kept for 30 days after they finish.
|
|
1453
|
+
*
|
|
1454
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
1455
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1456
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1457
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1458
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1459
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1460
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1461
|
+
* @throws {FaableApiError} `delivery_not_found` (404) — No webhook delivery with that id for this subscription.
|
|
1462
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1463
|
+
* @throws {FaableApiError} `delivery_in_progress` (409) — The delivery is being attempted right now; retry the redeliver in a minute.
|
|
1464
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1465
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1466
|
+
*/
|
|
1467
|
+
notificationsubscriptionRedeliver(notificationsubscription_id, delivery_id) {
|
|
1468
|
+
requireId("notificationsubscription_id", notificationsubscription_id);
|
|
1469
|
+
requireId("delivery_id", delivery_id);
|
|
1470
|
+
return this.fetcher.post(`/notificationsubscription/${notificationsubscription_id}/deliveries/${delivery_id}/redeliver`, {});
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/rotate-secret` — operationId: `notificationsubscription/rotateSecret`
|
|
1474
|
+
*
|
|
1475
|
+
* Rotate a webhook's signing secret
|
|
1476
|
+
*
|
|
1477
|
+
* Replaces the signing secret with a new one (generated, or the one in the body) and keeps the previous one valid for 24 hours. During that overlap every delivery carries two signatures, `x-faable-signature: sha256=<new>,sha256=<previous>`, so receivers can switch to the new secret at their own pace: accept a delivery when any of the signatures matches. The new secret is returned only in this response. Rotating again during an overlap drops the oldest secret.
|
|
1478
|
+
*
|
|
1479
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
1480
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1481
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1482
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1483
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1484
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1485
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1486
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1487
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1488
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1489
|
+
*/
|
|
1490
|
+
notificationsubscriptionRotateSecret(notificationsubscription_id, data) {
|
|
1491
|
+
requireId("notificationsubscription_id", notificationsubscription_id);
|
|
1492
|
+
return this.fetcher.post(`/notificationsubscription/${notificationsubscription_id}/rotate-secret`, data);
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* `POST /notificationsubscription/{notificationsubscription_id}/test` — operationId: `notificationsubscription/test`
|
|
1496
|
+
*
|
|
1497
|
+
* Send a test event to a webhook
|
|
1498
|
+
*
|
|
1499
|
+
* Sends a signed `ping` event to the subscription URL right now and returns the outcome. The request is signed exactly like a real delivery (`x-faable-signature`, `x-faable-timestamp`, `x-faable-delivery`), with `payload: { subscription_id }`. It is not retried and is recorded in the Log as `webhook.ping`. A successful test sets a `failing` subscription back to `healthy`. Works on inactive subscriptions too.
|
|
1500
|
+
*
|
|
1501
|
+
* @throws {FaableApiError} `not_a_webhook` (400) — The operation only applies to `webhook` subscriptions.
|
|
1502
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1503
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1504
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1505
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1506
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1507
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1508
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1509
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1510
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1511
|
+
*/
|
|
1512
|
+
notificationsubscriptionTest(notificationsubscription_id) {
|
|
1513
|
+
requireId("notificationsubscription_id", notificationsubscription_id);
|
|
1514
|
+
return this.fetcher.post(`/notificationsubscription/${notificationsubscription_id}/test`, {});
|
|
1515
|
+
}
|
|
1447
1516
|
/**
|
|
1448
1517
|
* `POST /notificationsubscription/{notificationsubscription_id}` — operationId: `notificationsubscription/update`
|
|
1449
1518
|
*
|
|
@@ -1604,24 +1673,6 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1604
1673
|
requireId("role_id", role_id);
|
|
1605
1674
|
return this.paginator({ url: `/role/${role_id}/users`, params });
|
|
1606
1675
|
}
|
|
1607
|
-
/**
|
|
1608
|
-
* `POST /rolemember` — operationId: `rolemember/create`
|
|
1609
|
-
*
|
|
1610
|
-
* Create Rolemember
|
|
1611
|
-
*
|
|
1612
|
-
* @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
|
|
1613
|
-
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1614
|
-
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1615
|
-
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1616
|
-
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1617
|
-
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1618
|
-
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1619
|
-
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1620
|
-
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1621
|
-
*/
|
|
1622
|
-
rolememberCreate(data) {
|
|
1623
|
-
return this.fetcher.post(`/rolemember`, data);
|
|
1624
|
-
}
|
|
1625
1676
|
/**
|
|
1626
1677
|
* `DELETE /rolemember/{rolemember_id}` — operationId: `rolemember/delete`
|
|
1627
1678
|
*
|
|
@@ -1754,6 +1805,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1754
1805
|
* Adds one or more Users of this tenant as members of the given Team, with the same roles. Users already in the team are skipped; `already_member` only when all of them are. A user or team that is not in this tenant is a 404. Returns the TeamMember record of the first user in `users`.
|
|
1755
1806
|
*
|
|
1756
1807
|
* @throws {FaableApiError} `already_member` (400) — The user is already a member of the team.
|
|
1808
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
1757
1809
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1758
1810
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1759
1811
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -1857,6 +1909,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1857
1909
|
* Invites a user by email. `mode='auto'` (default) adds the user directly when the email already corresponds to a user in this tenant and falls back to a ticketed invite + email otherwise. `mode='invite'` always issues a ticket + email even when the user exists. Re-inviting the same email to the same team invalidates the previous pending invite.
|
|
1858
1910
|
*
|
|
1859
1911
|
* @throws {FaableApiError} `invite_used` (400) — The invite was already accepted.
|
|
1912
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
1860
1913
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1861
1914
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1862
1915
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -1930,6 +1983,29 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1930
1983
|
requireId("team_id", team_id);
|
|
1931
1984
|
return this.paginator({ url: `/team/${team_id}/member`, params });
|
|
1932
1985
|
}
|
|
1986
|
+
/**
|
|
1987
|
+
* `DELETE /team/{team_id}/member/{user_id}` — operationId: `team/removeMember`
|
|
1988
|
+
*
|
|
1989
|
+
* Remove a User from a Team
|
|
1990
|
+
*
|
|
1991
|
+
* Removes the User's membership of the given Team (the User itself is not deleted). Emits `team.member.removed` and leaves an entry in the tenant's log.
|
|
1992
|
+
*
|
|
1993
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1994
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1995
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1996
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1997
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1998
|
+
* @throws {FaableApiError} `not_a_member` (404) — The user is not a member of the team.
|
|
1999
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
2000
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2001
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2002
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2003
|
+
*/
|
|
2004
|
+
teamRemoveMember(team_id, user_id) {
|
|
2005
|
+
requireId("team_id", team_id);
|
|
2006
|
+
requireId("user_id", user_id);
|
|
2007
|
+
return this.fetcher.delete(`/team/${team_id}/member/${user_id}`);
|
|
2008
|
+
}
|
|
1933
2009
|
/**
|
|
1934
2010
|
* `DELETE /team/{team_id}/invite/{ticket_id}` — operationId: `team/revokeInvite`
|
|
1935
2011
|
*
|
|
@@ -1974,22 +2050,28 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1974
2050
|
return this.fetcher.post(`/team/${team_id}`, data);
|
|
1975
2051
|
}
|
|
1976
2052
|
/**
|
|
1977
|
-
* `POST /
|
|
2053
|
+
* `POST /team/{team_id}/member/{user_id}` — operationId: `team/updateMember`
|
|
1978
2054
|
*
|
|
1979
|
-
*
|
|
2055
|
+
* Change a Team member's roles
|
|
1980
2056
|
*
|
|
1981
|
-
*
|
|
2057
|
+
* Replaces the roles a User holds within the given Team. Every role must be a Role of this tenant. Emits `team.member.updated` when the roles actually change, and leaves an entry in the tenant's log.
|
|
2058
|
+
*
|
|
2059
|
+
* @throws {FaableApiError} `invalid_role` (400) — The role belongs to another account.
|
|
1982
2060
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1983
2061
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1984
2062
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1985
2063
|
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1986
2064
|
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2065
|
+
* @throws {FaableApiError} `not_a_member` (404) — The user is not a member of the team.
|
|
2066
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1987
2067
|
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1988
2068
|
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1989
2069
|
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1990
2070
|
*/
|
|
1991
|
-
|
|
1992
|
-
|
|
2071
|
+
teamUpdateMember(team_id, user_id, data) {
|
|
2072
|
+
requireId("team_id", team_id);
|
|
2073
|
+
requireId("user_id", user_id);
|
|
2074
|
+
return this.fetcher.post(`/team/${team_id}/member/${user_id}`, data);
|
|
1993
2075
|
}
|
|
1994
2076
|
/**
|
|
1995
2077
|
* `DELETE /teammember/{teammember_id}` — operationId: `teammember/delete`
|