@faable/auth-sdk 2.7.74 → 2.7.76
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/generated-client.d.ts +114 -5
- package/dist/api/generated-client.js +48 -3
- package/dist/api/types.d.ts +313 -5
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +532 -5
|
@@ -2081,7 +2081,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2081
2081
|
all: () => Promise<{
|
|
2082
2082
|
id: string;
|
|
2083
2083
|
connection_name: string;
|
|
2084
|
-
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
|
|
2084
|
+
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
|
|
2085
|
+
* `GET /user/{user_id}` — operationId: `user/get`
|
|
2086
|
+
*
|
|
2087
|
+
* Get User
|
|
2088
|
+
*
|
|
2089
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
2090
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
2091
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2092
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2093
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2094
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2095
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2096
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
2097
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2098
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2099
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2100
|
+
*/
|
|
2085
2101
|
authorize_url: string;
|
|
2086
2102
|
token_url: string;
|
|
2087
2103
|
userinfo_url: string;
|
|
@@ -2121,7 +2137,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2121
2137
|
first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
2122
2138
|
id: string;
|
|
2123
2139
|
connection_name: string;
|
|
2124
|
-
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
|
|
2140
|
+
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
|
|
2141
|
+
* `GET /user/{user_id}` — operationId: `user/get`
|
|
2142
|
+
*
|
|
2143
|
+
* Get User
|
|
2144
|
+
*
|
|
2145
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
2146
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
2147
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2148
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2149
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2150
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2151
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2152
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
2153
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2154
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2155
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2156
|
+
*/
|
|
2125
2157
|
authorize_url: string;
|
|
2126
2158
|
token_url: string;
|
|
2127
2159
|
userinfo_url: string;
|
|
@@ -2164,7 +2196,23 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2164
2196
|
} | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
|
|
2165
2197
|
id: string;
|
|
2166
2198
|
connection_name: string;
|
|
2167
|
-
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email";
|
|
2199
|
+
connection_type: "custom" | "database" | "github" | "figma" | "google_oauth2" | "microsoft" | "oidc" | "passwordless_email"; /**
|
|
2200
|
+
* `GET /user/{user_id}` — operationId: `user/get`
|
|
2201
|
+
*
|
|
2202
|
+
* Get User
|
|
2203
|
+
*
|
|
2204
|
+
* @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
|
|
2205
|
+
* @throws {FaableApiError} `invalid_expand` (400) — An `?expand=` path is not allowed on this resource.
|
|
2206
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2207
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2208
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2209
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2210
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2211
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
2212
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2213
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2214
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2215
|
+
*/
|
|
2168
2216
|
authorize_url: string;
|
|
2169
2217
|
token_url: string;
|
|
2170
2218
|
userinfo_url: string;
|
|
@@ -4969,7 +5017,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
4969
5017
|
*
|
|
4970
5018
|
* Accept a team invite for a signed-in user
|
|
4971
5019
|
*
|
|
4972
|
-
* Accepts the invite
|
|
5020
|
+
* Accepts the invite — by the `token` of its link, or by `invite_id` — on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use `token` from the page you gave as the invite's `accept_url`, and `invite_id` from a pending-invitation notice in your app.
|
|
4973
5021
|
*
|
|
4974
5022
|
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
4975
5023
|
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
@@ -5080,6 +5128,31 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5080
5128
|
createdAt: string;
|
|
5081
5129
|
updatedAt?: string | undefined;
|
|
5082
5130
|
}>;
|
|
5131
|
+
/**
|
|
5132
|
+
* `POST /team/invite/decline` — operationId: `team/declineInvite`
|
|
5133
|
+
*
|
|
5134
|
+
* Decline a team invite for a signed-in user
|
|
5135
|
+
*
|
|
5136
|
+
* The invited user says no: the invite is spent (its link stops working) and `team.invite.revoked` is emitted with reason `declined`. Same checks as accepting.
|
|
5137
|
+
*
|
|
5138
|
+
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
5139
|
+
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
5140
|
+
* @throws {FaableApiError} `ticket_expired` (400) — The ticket is past its expiry.
|
|
5141
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5142
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5143
|
+
* @throws {FaableApiError} `invite_email_mismatch` (403) — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
5144
|
+
* @throws {FaableApiError} `invite_email_unverified` (403) — The accepting user's email matches the invite but is not verified yet.
|
|
5145
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5146
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5147
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5148
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
5149
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5150
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5151
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5152
|
+
*/
|
|
5153
|
+
teamDeclineInvite(data: OpBody<"team/declineInvite">): Promise<{
|
|
5154
|
+
status: "declined";
|
|
5155
|
+
}>;
|
|
5083
5156
|
/**
|
|
5084
5157
|
* `DELETE /team/{team_id}` — operationId: `team/delete`
|
|
5085
5158
|
*
|
|
@@ -5270,6 +5343,42 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5270
5343
|
updatedAt?: string | undefined;
|
|
5271
5344
|
}[];
|
|
5272
5345
|
}>;
|
|
5346
|
+
/**
|
|
5347
|
+
* `GET /user/{user_id}/team-invites` — operationId: `team/listInvitesForUser`
|
|
5348
|
+
*
|
|
5349
|
+
* List a user's pending team invites
|
|
5350
|
+
*
|
|
5351
|
+
* Pending (not accepted, revoked, declined or expired) invites to any team of this tenant addressed to the user's email. Only when that email is verified; otherwise `email_verified: false` and an empty list.
|
|
5352
|
+
*
|
|
5353
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5354
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5355
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5356
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5357
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5358
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5359
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5360
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5361
|
+
*/
|
|
5362
|
+
teamListInvitesForUser(user_id: string): Promise<{
|
|
5363
|
+
email_verified: boolean;
|
|
5364
|
+
data: {
|
|
5365
|
+
id: string;
|
|
5366
|
+
email: string;
|
|
5367
|
+
team: string;
|
|
5368
|
+
inviter?: string | undefined;
|
|
5369
|
+
roles: string[];
|
|
5370
|
+
mode: "auto" | "invite";
|
|
5371
|
+
redirect_uri?: string | undefined;
|
|
5372
|
+
expires_at: string;
|
|
5373
|
+
consume_date?: string | undefined;
|
|
5374
|
+
account: string;
|
|
5375
|
+
metadata: {
|
|
5376
|
+
[key: string]: unknown;
|
|
5377
|
+
};
|
|
5378
|
+
createdAt: string;
|
|
5379
|
+
updatedAt?: string | undefined;
|
|
5380
|
+
}[];
|
|
5381
|
+
}>;
|
|
5273
5382
|
/**
|
|
5274
5383
|
* `GET /team/{team_id}/member` — operationId: `team/listMembers`
|
|
5275
5384
|
*
|
|
@@ -5345,7 +5454,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5345
5454
|
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5346
5455
|
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5347
5456
|
*/
|
|
5348
|
-
teamRemoveMember(team_id: string, user_id: string): Promise<{
|
|
5457
|
+
teamRemoveMember(team_id: string, user_id: string, params?: OpQuery<"team/removeMember">): Promise<{
|
|
5349
5458
|
id: string;
|
|
5350
5459
|
deleted: true;
|
|
5351
5460
|
}>;
|
|
@@ -1802,7 +1802,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1802
1802
|
*
|
|
1803
1803
|
* Accept a team invite for a signed-in user
|
|
1804
1804
|
*
|
|
1805
|
-
* Accepts the invite
|
|
1805
|
+
* Accepts the invite — by the `token` of its link, or by `invite_id` — on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use `token` from the page you gave as the invite's `accept_url`, and `invite_id` from a pending-invitation notice in your app.
|
|
1806
1806
|
*
|
|
1807
1807
|
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
1808
1808
|
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
@@ -1885,6 +1885,31 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1885
1885
|
teamCreate(data) {
|
|
1886
1886
|
return this.fetcher.post(`/team`, data);
|
|
1887
1887
|
}
|
|
1888
|
+
/**
|
|
1889
|
+
* `POST /team/invite/decline` — operationId: `team/declineInvite`
|
|
1890
|
+
*
|
|
1891
|
+
* Decline a team invite for a signed-in user
|
|
1892
|
+
*
|
|
1893
|
+
* The invited user says no: the invite is spent (its link stops working) and `team.invite.revoked` is emitted with reason `declined`. Same checks as accepting.
|
|
1894
|
+
*
|
|
1895
|
+
* @throws {FaableApiError} `invalid_ticket` (400) — The ticket does not exist or is not the kind this endpoint accepts.
|
|
1896
|
+
* @throws {FaableApiError} `ticket_used` (400) — The ticket was already consumed.
|
|
1897
|
+
* @throws {FaableApiError} `ticket_expired` (400) — The ticket is past its expiry.
|
|
1898
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1899
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1900
|
+
* @throws {FaableApiError} `invite_email_mismatch` (403) — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
1901
|
+
* @throws {FaableApiError} `invite_email_unverified` (403) — The accepting user's email matches the invite but is not verified yet.
|
|
1902
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1903
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1904
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1905
|
+
* @throws {FaableApiError} `not_found` (404) — The resource does not exist in this account.
|
|
1906
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1907
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1908
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1909
|
+
*/
|
|
1910
|
+
teamDeclineInvite(data) {
|
|
1911
|
+
return this.fetcher.post(`/team/invite/decline`, data);
|
|
1912
|
+
}
|
|
1888
1913
|
/**
|
|
1889
1914
|
* `DELETE /team/{team_id}` — operationId: `team/delete`
|
|
1890
1915
|
*
|
|
@@ -1989,6 +2014,26 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1989
2014
|
requireId("team_id", team_id);
|
|
1990
2015
|
return this.fetcher.request({ method: "GET", url: `/team/${team_id}/invite`, params });
|
|
1991
2016
|
}
|
|
2017
|
+
/**
|
|
2018
|
+
* `GET /user/{user_id}/team-invites` — operationId: `team/listInvitesForUser`
|
|
2019
|
+
*
|
|
2020
|
+
* List a user's pending team invites
|
|
2021
|
+
*
|
|
2022
|
+
* Pending (not accepted, revoked, declined or expired) invites to any team of this tenant addressed to the user's email. Only when that email is verified; otherwise `email_verified: false` and an empty list.
|
|
2023
|
+
*
|
|
2024
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2025
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2026
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2027
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2028
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2029
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2030
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2031
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2032
|
+
*/
|
|
2033
|
+
teamListInvitesForUser(user_id) {
|
|
2034
|
+
requireId("user_id", user_id);
|
|
2035
|
+
return this.fetcher.get(`/user/${user_id}/team-invites`);
|
|
2036
|
+
}
|
|
1992
2037
|
/**
|
|
1993
2038
|
* `GET /team/{team_id}/member` — operationId: `team/listMembers`
|
|
1994
2039
|
*
|
|
@@ -2027,10 +2072,10 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2027
2072
|
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2028
2073
|
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2029
2074
|
*/
|
|
2030
|
-
teamRemoveMember(team_id, user_id) {
|
|
2075
|
+
teamRemoveMember(team_id, user_id, params) {
|
|
2031
2076
|
requireId("team_id", team_id);
|
|
2032
2077
|
requireId("user_id", user_id);
|
|
2033
|
-
return this.fetcher.
|
|
2078
|
+
return this.fetcher.request({ method: "DELETE", url: `/team/${team_id}/member/${user_id}`, params });
|
|
2034
2079
|
}
|
|
2035
2080
|
/**
|
|
2036
2081
|
* `DELETE /team/{team_id}/invite/{ticket_id}` — operationId: `team/revokeInvite`
|
package/dist/api/types.d.ts
CHANGED
|
@@ -1383,7 +1383,7 @@ export interface paths {
|
|
|
1383
1383
|
put?: never;
|
|
1384
1384
|
/**
|
|
1385
1385
|
* Accept a team invite for a signed-in user
|
|
1386
|
-
* @description Accepts the invite
|
|
1386
|
+
* @description Accepts the invite — by the `token` of its link, or by `invite_id` — on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use `token` from the page you gave as the invite's `accept_url`, and `invite_id` from a pending-invitation notice in your app.
|
|
1387
1387
|
*/
|
|
1388
1388
|
post: operations["team/acceptInvite"];
|
|
1389
1389
|
delete?: never;
|
|
@@ -1392,6 +1392,46 @@ export interface paths {
|
|
|
1392
1392
|
patch?: never;
|
|
1393
1393
|
trace?: never;
|
|
1394
1394
|
};
|
|
1395
|
+
"/user/{user_id}/team-invites": {
|
|
1396
|
+
parameters: {
|
|
1397
|
+
query?: never;
|
|
1398
|
+
header?: never;
|
|
1399
|
+
path?: never;
|
|
1400
|
+
cookie?: never;
|
|
1401
|
+
};
|
|
1402
|
+
/**
|
|
1403
|
+
* List a user's pending team invites
|
|
1404
|
+
* @description Pending (not accepted, revoked, declined or expired) invites to any team of this tenant addressed to the user's email. Only when that email is verified; otherwise `email_verified: false` and an empty list.
|
|
1405
|
+
*/
|
|
1406
|
+
get: operations["team/listInvitesForUser"];
|
|
1407
|
+
put?: never;
|
|
1408
|
+
post?: never;
|
|
1409
|
+
delete?: never;
|
|
1410
|
+
options?: never;
|
|
1411
|
+
head?: never;
|
|
1412
|
+
patch?: never;
|
|
1413
|
+
trace?: never;
|
|
1414
|
+
};
|
|
1415
|
+
"/team/invite/decline": {
|
|
1416
|
+
parameters: {
|
|
1417
|
+
query?: never;
|
|
1418
|
+
header?: never;
|
|
1419
|
+
path?: never;
|
|
1420
|
+
cookie?: never;
|
|
1421
|
+
};
|
|
1422
|
+
get?: never;
|
|
1423
|
+
put?: never;
|
|
1424
|
+
/**
|
|
1425
|
+
* Decline a team invite for a signed-in user
|
|
1426
|
+
* @description The invited user says no: the invite is spent (its link stops working) and `team.invite.revoked` is emitted with reason `declined`. Same checks as accepting.
|
|
1427
|
+
*/
|
|
1428
|
+
post: operations["team/declineInvite"];
|
|
1429
|
+
delete?: never;
|
|
1430
|
+
options?: never;
|
|
1431
|
+
head?: never;
|
|
1432
|
+
patch?: never;
|
|
1433
|
+
trace?: never;
|
|
1434
|
+
};
|
|
1395
1435
|
"/api": {
|
|
1396
1436
|
parameters: {
|
|
1397
1437
|
query?: never;
|
|
@@ -19178,6 +19218,8 @@ export interface operations {
|
|
|
19178
19218
|
* ]
|
|
19179
19219
|
*/
|
|
19180
19220
|
roles: string[];
|
|
19221
|
+
/** @description The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant. */
|
|
19222
|
+
actor_user_id?: string;
|
|
19181
19223
|
};
|
|
19182
19224
|
};
|
|
19183
19225
|
};
|
|
@@ -19305,7 +19347,10 @@ export interface operations {
|
|
|
19305
19347
|
};
|
|
19306
19348
|
"team/removeMember": {
|
|
19307
19349
|
parameters: {
|
|
19308
|
-
query?:
|
|
19350
|
+
query?: {
|
|
19351
|
+
/** @description The person removing (or leaving), when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant. */
|
|
19352
|
+
actor_user_id?: string;
|
|
19353
|
+
};
|
|
19309
19354
|
header?: never;
|
|
19310
19355
|
path: {
|
|
19311
19356
|
team_id: string;
|
|
@@ -19577,7 +19622,7 @@ export interface operations {
|
|
|
19577
19622
|
roles?: string[];
|
|
19578
19623
|
/** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
|
|
19579
19624
|
mode?: "auto" | "invite";
|
|
19580
|
-
/** @description Where `/invite-verify` redirects
|
|
19625
|
+
/** @description Where the invitee goes once in: `/invite-verify` redirects there after a successful accept, and it is the button of the "you were added" email (otherwise your auth domain). Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`. */
|
|
19581
19626
|
redirect_uri?: string;
|
|
19582
19627
|
/** @description The user who is inviting, when you call on their behalf with a machine token. Shown in the invite email. Must be a user of this tenant; defaults to the token's own user. */
|
|
19583
19628
|
inviter_user_id?: string;
|
|
@@ -19912,8 +19957,10 @@ export interface operations {
|
|
|
19912
19957
|
requestBody: {
|
|
19913
19958
|
content: {
|
|
19914
19959
|
"application/json": {
|
|
19915
|
-
/** @description The invite secret, as it arrived in the fragment of the `accept_url` link. */
|
|
19916
|
-
token
|
|
19960
|
+
/** @description The invite secret, as it arrived in the fragment of the `accept_url` link. Give this or `invite_id`. */
|
|
19961
|
+
token?: string;
|
|
19962
|
+
/** @description The invite id, for accepting from your app without the link (a "pending invitation" notice; see `GET /user/{user_id}/team-invites`). Give this or `token`. */
|
|
19963
|
+
invite_id?: string;
|
|
19917
19964
|
/** @description The user accepting — the one signed in on your page. Must exist in this tenant and have the invited email, verified. */
|
|
19918
19965
|
user_id: string;
|
|
19919
19966
|
};
|
|
@@ -20031,6 +20078,267 @@ export interface operations {
|
|
|
20031
20078
|
};
|
|
20032
20079
|
};
|
|
20033
20080
|
};
|
|
20081
|
+
"team/listInvitesForUser": {
|
|
20082
|
+
parameters: {
|
|
20083
|
+
query?: never;
|
|
20084
|
+
header?: never;
|
|
20085
|
+
path: {
|
|
20086
|
+
user_id: string;
|
|
20087
|
+
};
|
|
20088
|
+
cookie?: never;
|
|
20089
|
+
};
|
|
20090
|
+
requestBody?: never;
|
|
20091
|
+
responses: {
|
|
20092
|
+
/** @description Default Response */
|
|
20093
|
+
200: {
|
|
20094
|
+
headers: {
|
|
20095
|
+
[name: string]: unknown;
|
|
20096
|
+
};
|
|
20097
|
+
content: {
|
|
20098
|
+
"application/json": {
|
|
20099
|
+
/** @description False when the user's email is not verified: nothing is listed then, since the address could be anybody's. */
|
|
20100
|
+
email_verified: boolean;
|
|
20101
|
+
data: {
|
|
20102
|
+
/** @description TeamInvite ID */
|
|
20103
|
+
id: string;
|
|
20104
|
+
/** @description Email address that was invited */
|
|
20105
|
+
email: string;
|
|
20106
|
+
/** @description Id of the team the invitee will be added to upon acceptance. */
|
|
20107
|
+
team: string;
|
|
20108
|
+
/** @description Id of the user that created the invitation, if known. */
|
|
20109
|
+
inviter?: string;
|
|
20110
|
+
/** @description Role ids that will be applied to the new TeamMember on acceptance. */
|
|
20111
|
+
roles: string[];
|
|
20112
|
+
/** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
|
|
20113
|
+
mode: "auto" | "invite";
|
|
20114
|
+
/** @description URI to redirect the invitee to after a successful accept. */
|
|
20115
|
+
redirect_uri?: string;
|
|
20116
|
+
/** @description ISO 8601 timestamp at which the invite stops being valid. */
|
|
20117
|
+
expires_at: string;
|
|
20118
|
+
/** @description ISO 8601 timestamp at which the invite was accepted. Absent for pending invites. */
|
|
20119
|
+
consume_date?: string;
|
|
20120
|
+
/** @description Object is related with this account */
|
|
20121
|
+
account: string;
|
|
20122
|
+
/**
|
|
20123
|
+
* @description TeamInviteMetadata
|
|
20124
|
+
* @default {}
|
|
20125
|
+
*/
|
|
20126
|
+
metadata: {
|
|
20127
|
+
[key: string]: unknown;
|
|
20128
|
+
};
|
|
20129
|
+
/** @description TeamInvite creation date */
|
|
20130
|
+
createdAt: string;
|
|
20131
|
+
/** @description TeamInvite updated date */
|
|
20132
|
+
updatedAt?: string;
|
|
20133
|
+
}[];
|
|
20134
|
+
};
|
|
20135
|
+
};
|
|
20136
|
+
};
|
|
20137
|
+
/** @description `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field. */
|
|
20138
|
+
400: {
|
|
20139
|
+
headers: {
|
|
20140
|
+
[name: string]: unknown;
|
|
20141
|
+
};
|
|
20142
|
+
content: {
|
|
20143
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20144
|
+
/** @enum {string} */
|
|
20145
|
+
error_code?: "validation_error";
|
|
20146
|
+
};
|
|
20147
|
+
};
|
|
20148
|
+
};
|
|
20149
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
20150
|
+
401: {
|
|
20151
|
+
headers: {
|
|
20152
|
+
[name: string]: unknown;
|
|
20153
|
+
};
|
|
20154
|
+
content: {
|
|
20155
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20156
|
+
/** @enum {string} */
|
|
20157
|
+
error_code?: "unauthorized";
|
|
20158
|
+
};
|
|
20159
|
+
};
|
|
20160
|
+
};
|
|
20161
|
+
/**
|
|
20162
|
+
* @description `forbidden` — The credentials are valid but do not allow this operation.
|
|
20163
|
+
*
|
|
20164
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
20165
|
+
*
|
|
20166
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
20167
|
+
*/
|
|
20168
|
+
403: {
|
|
20169
|
+
headers: {
|
|
20170
|
+
[name: string]: unknown;
|
|
20171
|
+
};
|
|
20172
|
+
content: {
|
|
20173
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20174
|
+
/** @enum {string} */
|
|
20175
|
+
error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
|
|
20176
|
+
};
|
|
20177
|
+
};
|
|
20178
|
+
};
|
|
20179
|
+
/** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
|
|
20180
|
+
404: {
|
|
20181
|
+
headers: {
|
|
20182
|
+
[name: string]: unknown;
|
|
20183
|
+
};
|
|
20184
|
+
content: {
|
|
20185
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20186
|
+
/** @enum {string} */
|
|
20187
|
+
error_code?: "account_not_found";
|
|
20188
|
+
};
|
|
20189
|
+
};
|
|
20190
|
+
};
|
|
20191
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
20192
|
+
429: {
|
|
20193
|
+
headers: {
|
|
20194
|
+
[name: string]: unknown;
|
|
20195
|
+
};
|
|
20196
|
+
content: {
|
|
20197
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20198
|
+
/** @enum {string} */
|
|
20199
|
+
error_code?: "too_many_requests";
|
|
20200
|
+
};
|
|
20201
|
+
};
|
|
20202
|
+
};
|
|
20203
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
20204
|
+
500: {
|
|
20205
|
+
headers: {
|
|
20206
|
+
[name: string]: unknown;
|
|
20207
|
+
};
|
|
20208
|
+
content: {
|
|
20209
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20210
|
+
/** @enum {string} */
|
|
20211
|
+
error_code?: "internal_error";
|
|
20212
|
+
};
|
|
20213
|
+
};
|
|
20214
|
+
};
|
|
20215
|
+
};
|
|
20216
|
+
};
|
|
20217
|
+
"team/declineInvite": {
|
|
20218
|
+
parameters: {
|
|
20219
|
+
query?: never;
|
|
20220
|
+
header?: never;
|
|
20221
|
+
path?: never;
|
|
20222
|
+
cookie?: never;
|
|
20223
|
+
};
|
|
20224
|
+
requestBody: {
|
|
20225
|
+
content: {
|
|
20226
|
+
"application/json": {
|
|
20227
|
+
invite_id: string;
|
|
20228
|
+
/** @description The user declining — must have the invited email, verified. */
|
|
20229
|
+
user_id: string;
|
|
20230
|
+
};
|
|
20231
|
+
};
|
|
20232
|
+
};
|
|
20233
|
+
responses: {
|
|
20234
|
+
/** @description Default Response */
|
|
20235
|
+
200: {
|
|
20236
|
+
headers: {
|
|
20237
|
+
[name: string]: unknown;
|
|
20238
|
+
};
|
|
20239
|
+
content: {
|
|
20240
|
+
"application/json": {
|
|
20241
|
+
/** @enum {string} */
|
|
20242
|
+
status: "declined";
|
|
20243
|
+
};
|
|
20244
|
+
};
|
|
20245
|
+
};
|
|
20246
|
+
/**
|
|
20247
|
+
* @description `invalid_ticket` — The ticket does not exist or is not the kind this endpoint accepts.
|
|
20248
|
+
*
|
|
20249
|
+
* `ticket_used` — The ticket was already consumed.
|
|
20250
|
+
*
|
|
20251
|
+
* `ticket_expired` — The ticket is past its expiry.
|
|
20252
|
+
*
|
|
20253
|
+
* `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
20254
|
+
*/
|
|
20255
|
+
400: {
|
|
20256
|
+
headers: {
|
|
20257
|
+
[name: string]: unknown;
|
|
20258
|
+
};
|
|
20259
|
+
content: {
|
|
20260
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20261
|
+
/** @enum {string} */
|
|
20262
|
+
error_code?: "invalid_ticket" | "ticket_used" | "ticket_expired" | "validation_error";
|
|
20263
|
+
};
|
|
20264
|
+
};
|
|
20265
|
+
};
|
|
20266
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
20267
|
+
401: {
|
|
20268
|
+
headers: {
|
|
20269
|
+
[name: string]: unknown;
|
|
20270
|
+
};
|
|
20271
|
+
content: {
|
|
20272
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20273
|
+
/** @enum {string} */
|
|
20274
|
+
error_code?: "unauthorized";
|
|
20275
|
+
};
|
|
20276
|
+
};
|
|
20277
|
+
};
|
|
20278
|
+
/**
|
|
20279
|
+
* @description `invite_email_mismatch` — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.
|
|
20280
|
+
*
|
|
20281
|
+
* `invite_email_unverified` — The accepting user's email matches the invite but is not verified yet.
|
|
20282
|
+
*
|
|
20283
|
+
* `forbidden` — The credentials are valid but do not allow this operation.
|
|
20284
|
+
*
|
|
20285
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
20286
|
+
*
|
|
20287
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
20288
|
+
*/
|
|
20289
|
+
403: {
|
|
20290
|
+
headers: {
|
|
20291
|
+
[name: string]: unknown;
|
|
20292
|
+
};
|
|
20293
|
+
content: {
|
|
20294
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20295
|
+
/** @enum {string} */
|
|
20296
|
+
error_code?: "invite_email_mismatch" | "invite_email_unverified" | "forbidden" | "insufficient_scope" | "user_suspended";
|
|
20297
|
+
};
|
|
20298
|
+
};
|
|
20299
|
+
};
|
|
20300
|
+
/**
|
|
20301
|
+
* @description `not_found` — The resource does not exist in this account.
|
|
20302
|
+
*
|
|
20303
|
+
* `account_not_found` — No Auth Account matches the request (domain, header or token).
|
|
20304
|
+
*/
|
|
20305
|
+
404: {
|
|
20306
|
+
headers: {
|
|
20307
|
+
[name: string]: unknown;
|
|
20308
|
+
};
|
|
20309
|
+
content: {
|
|
20310
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20311
|
+
/** @enum {string} */
|
|
20312
|
+
error_code?: "not_found" | "account_not_found";
|
|
20313
|
+
};
|
|
20314
|
+
};
|
|
20315
|
+
};
|
|
20316
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
20317
|
+
429: {
|
|
20318
|
+
headers: {
|
|
20319
|
+
[name: string]: unknown;
|
|
20320
|
+
};
|
|
20321
|
+
content: {
|
|
20322
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20323
|
+
/** @enum {string} */
|
|
20324
|
+
error_code?: "too_many_requests";
|
|
20325
|
+
};
|
|
20326
|
+
};
|
|
20327
|
+
};
|
|
20328
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
20329
|
+
500: {
|
|
20330
|
+
headers: {
|
|
20331
|
+
[name: string]: unknown;
|
|
20332
|
+
};
|
|
20333
|
+
content: {
|
|
20334
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
20335
|
+
/** @enum {string} */
|
|
20336
|
+
error_code?: "internal_error";
|
|
20337
|
+
};
|
|
20338
|
+
};
|
|
20339
|
+
};
|
|
20340
|
+
};
|
|
20341
|
+
};
|
|
20034
20342
|
"api/list": {
|
|
20035
20343
|
parameters: {
|
|
20036
20344
|
query?: {
|
package/dist/version.js
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
// login pages could not import the SDK at all. Same pattern as auth-js.
|
|
10
10
|
//
|
|
11
11
|
// The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
|
|
12
|
-
export const version = "2.7.
|
|
12
|
+
export const version = "2.7.76";
|
|
13
13
|
// Short git SHA of the released commit. The version dates a build; this names
|
|
14
14
|
// the exact tree, so a canonical log line or an audit entry leads straight to
|
|
15
15
|
// `git show <sha>`. Deliberately NOT hex: an unreleased build (dev, a local
|
|
16
16
|
// link) cannot be mistaken for a real commit — auth only records values that
|
|
17
17
|
// look like a SHA, and this one never will.
|
|
18
|
-
export const commit = "
|
|
18
|
+
export const commit = "07be5e1";
|
|
19
19
|
// What this SDK writes in `x-faable-client`. Exported for a consumer that
|
|
20
20
|
// builds a strategy on its own (outside `FaableAuthApi`) and still wants the
|
|
21
21
|
// token request attributed — a bare `authClientCredentials` stamps only what
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@faablecloud/auth",
|
|
5
5
|
"description": "Auth Platform made by Faable. Manage Users and Roles",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.61.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -36278,6 +36278,10 @@
|
|
|
36278
36278
|
"example": [
|
|
36279
36279
|
"role_6555fd293acc2f0fac0e3452"
|
|
36280
36280
|
]
|
|
36281
|
+
},
|
|
36282
|
+
"actor_user_id": {
|
|
36283
|
+
"type": "string",
|
|
36284
|
+
"description": "The person making the change, when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
36281
36285
|
}
|
|
36282
36286
|
},
|
|
36283
36287
|
"additionalProperties": false,
|
|
@@ -36559,6 +36563,15 @@
|
|
|
36559
36563
|
],
|
|
36560
36564
|
"description": "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.",
|
|
36561
36565
|
"parameters": [
|
|
36566
|
+
{
|
|
36567
|
+
"schema": {
|
|
36568
|
+
"type": "string"
|
|
36569
|
+
},
|
|
36570
|
+
"in": "query",
|
|
36571
|
+
"name": "actor_user_id",
|
|
36572
|
+
"required": false,
|
|
36573
|
+
"description": "The person removing (or leaving), when your backend calls on their behalf with a machine token: it is who the tenant's log names. Must be a user of this tenant."
|
|
36574
|
+
},
|
|
36562
36575
|
{
|
|
36563
36576
|
"schema": {
|
|
36564
36577
|
"type": "string"
|
|
@@ -36815,7 +36828,7 @@
|
|
|
36815
36828
|
},
|
|
36816
36829
|
"redirect_uri": {
|
|
36817
36830
|
"type": "string",
|
|
36818
|
-
"description": "Where `/invite-verify` redirects
|
|
36831
|
+
"description": "Where the invitee goes once in: `/invite-verify` redirects there after a successful accept, and it is the button of the \"you were added\" email (otherwise your auth domain). Must be at an origin of one of this tenant's client callbacks or `callback_hostnames`."
|
|
36819
36832
|
},
|
|
36820
36833
|
"inviter_user_id": {
|
|
36821
36834
|
"type": "string",
|
|
@@ -37766,7 +37779,7 @@
|
|
|
37766
37779
|
"tags": [
|
|
37767
37780
|
"team"
|
|
37768
37781
|
],
|
|
37769
|
-
"description": "Accepts the invite
|
|
37782
|
+
"description": "Accepts the invite — by the `token` of its link, or by `invite_id` — on behalf of `user_id`, an existing user of this tenant. The user's email must be verified and equal to the invited one (`invite_email_mismatch` otherwise, with the invited address masked in `details`). Never creates a user. Use `token` from the page you gave as the invite's `accept_url`, and `invite_id` from a pending-invitation notice in your app.",
|
|
37770
37783
|
"requestBody": {
|
|
37771
37784
|
"required": true,
|
|
37772
37785
|
"content": {
|
|
@@ -37774,14 +37787,18 @@
|
|
|
37774
37787
|
"schema": {
|
|
37775
37788
|
"type": "object",
|
|
37776
37789
|
"required": [
|
|
37777
|
-
"token",
|
|
37778
37790
|
"user_id"
|
|
37779
37791
|
],
|
|
37780
37792
|
"properties": {
|
|
37781
37793
|
"token": {
|
|
37782
37794
|
"type": "string",
|
|
37783
37795
|
"minLength": 1,
|
|
37784
|
-
"description": "The invite secret, as it arrived in the fragment of the `accept_url` link."
|
|
37796
|
+
"description": "The invite secret, as it arrived in the fragment of the `accept_url` link. Give this or `invite_id`."
|
|
37797
|
+
},
|
|
37798
|
+
"invite_id": {
|
|
37799
|
+
"type": "string",
|
|
37800
|
+
"minLength": 1,
|
|
37801
|
+
"description": "The invite id, for accepting from your app without the link (a \"pending invitation\" notice; see `GET /user/{user_id}/team-invites`). Give this or `token`."
|
|
37785
37802
|
},
|
|
37786
37803
|
"user_id": {
|
|
37787
37804
|
"type": "string",
|
|
@@ -38008,6 +38025,516 @@
|
|
|
38008
38025
|
}
|
|
38009
38026
|
}
|
|
38010
38027
|
},
|
|
38028
|
+
"/user/{user_id}/team-invites": {
|
|
38029
|
+
"get": {
|
|
38030
|
+
"operationId": "team/listInvitesForUser",
|
|
38031
|
+
"summary": "List a user's pending team invites",
|
|
38032
|
+
"tags": [
|
|
38033
|
+
"team"
|
|
38034
|
+
],
|
|
38035
|
+
"description": "Pending (not accepted, revoked, declined or expired) invites to any team of this tenant addressed to the user's email. Only when that email is verified; otherwise `email_verified: false` and an empty list.",
|
|
38036
|
+
"parameters": [
|
|
38037
|
+
{
|
|
38038
|
+
"schema": {
|
|
38039
|
+
"type": "string"
|
|
38040
|
+
},
|
|
38041
|
+
"in": "path",
|
|
38042
|
+
"name": "user_id",
|
|
38043
|
+
"required": true
|
|
38044
|
+
}
|
|
38045
|
+
],
|
|
38046
|
+
"security": [
|
|
38047
|
+
{
|
|
38048
|
+
"bearerAuth": []
|
|
38049
|
+
}
|
|
38050
|
+
],
|
|
38051
|
+
"responses": {
|
|
38052
|
+
"200": {
|
|
38053
|
+
"description": "Default Response",
|
|
38054
|
+
"content": {
|
|
38055
|
+
"application/json": {
|
|
38056
|
+
"schema": {
|
|
38057
|
+
"type": "object",
|
|
38058
|
+
"required": [
|
|
38059
|
+
"email_verified",
|
|
38060
|
+
"data"
|
|
38061
|
+
],
|
|
38062
|
+
"properties": {
|
|
38063
|
+
"email_verified": {
|
|
38064
|
+
"type": "boolean",
|
|
38065
|
+
"description": "False when the user's email is not verified: nothing is listed then, since the address could be anybody's."
|
|
38066
|
+
},
|
|
38067
|
+
"data": {
|
|
38068
|
+
"type": "array",
|
|
38069
|
+
"items": {
|
|
38070
|
+
"type": "object",
|
|
38071
|
+
"required": [
|
|
38072
|
+
"id",
|
|
38073
|
+
"email",
|
|
38074
|
+
"team",
|
|
38075
|
+
"roles",
|
|
38076
|
+
"mode",
|
|
38077
|
+
"expires_at",
|
|
38078
|
+
"account",
|
|
38079
|
+
"createdAt"
|
|
38080
|
+
],
|
|
38081
|
+
"properties": {
|
|
38082
|
+
"id": {
|
|
38083
|
+
"type": "string",
|
|
38084
|
+
"description": "TeamInvite ID"
|
|
38085
|
+
},
|
|
38086
|
+
"email": {
|
|
38087
|
+
"type": "string",
|
|
38088
|
+
"description": "Email address that was invited"
|
|
38089
|
+
},
|
|
38090
|
+
"team": {
|
|
38091
|
+
"type": "string",
|
|
38092
|
+
"description": "Id of the team the invitee will be added to upon acceptance."
|
|
38093
|
+
},
|
|
38094
|
+
"inviter": {
|
|
38095
|
+
"type": "string",
|
|
38096
|
+
"description": "Id of the user that created the invitation, if known."
|
|
38097
|
+
},
|
|
38098
|
+
"roles": {
|
|
38099
|
+
"type": "array",
|
|
38100
|
+
"items": {
|
|
38101
|
+
"type": "string"
|
|
38102
|
+
},
|
|
38103
|
+
"description": "Role ids that will be applied to the new TeamMember on acceptance."
|
|
38104
|
+
},
|
|
38105
|
+
"mode": {
|
|
38106
|
+
"anyOf": [
|
|
38107
|
+
{
|
|
38108
|
+
"type": "string",
|
|
38109
|
+
"enum": [
|
|
38110
|
+
"auto"
|
|
38111
|
+
]
|
|
38112
|
+
},
|
|
38113
|
+
{
|
|
38114
|
+
"type": "string",
|
|
38115
|
+
"enum": [
|
|
38116
|
+
"invite"
|
|
38117
|
+
]
|
|
38118
|
+
}
|
|
38119
|
+
],
|
|
38120
|
+
"description": "`auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists."
|
|
38121
|
+
},
|
|
38122
|
+
"redirect_uri": {
|
|
38123
|
+
"type": "string",
|
|
38124
|
+
"description": "URI to redirect the invitee to after a successful accept."
|
|
38125
|
+
},
|
|
38126
|
+
"expires_at": {
|
|
38127
|
+
"type": "string",
|
|
38128
|
+
"description": "ISO 8601 timestamp at which the invite stops being valid."
|
|
38129
|
+
},
|
|
38130
|
+
"consume_date": {
|
|
38131
|
+
"type": "string",
|
|
38132
|
+
"description": "ISO 8601 timestamp at which the invite was accepted. Absent for pending invites."
|
|
38133
|
+
},
|
|
38134
|
+
"account": {
|
|
38135
|
+
"type": "string",
|
|
38136
|
+
"description": "Object is related with this account"
|
|
38137
|
+
},
|
|
38138
|
+
"metadata": {
|
|
38139
|
+
"type": "object",
|
|
38140
|
+
"properties": {},
|
|
38141
|
+
"additionalProperties": true,
|
|
38142
|
+
"description": "TeamInviteMetadata",
|
|
38143
|
+
"default": {}
|
|
38144
|
+
},
|
|
38145
|
+
"createdAt": {
|
|
38146
|
+
"type": "string",
|
|
38147
|
+
"description": "TeamInvite creation date"
|
|
38148
|
+
},
|
|
38149
|
+
"updatedAt": {
|
|
38150
|
+
"type": "string",
|
|
38151
|
+
"description": "TeamInvite updated date"
|
|
38152
|
+
}
|
|
38153
|
+
},
|
|
38154
|
+
"description": "TeamInvite"
|
|
38155
|
+
}
|
|
38156
|
+
}
|
|
38157
|
+
}
|
|
38158
|
+
}
|
|
38159
|
+
}
|
|
38160
|
+
}
|
|
38161
|
+
},
|
|
38162
|
+
"400": {
|
|
38163
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
38164
|
+
"content": {
|
|
38165
|
+
"application/json": {
|
|
38166
|
+
"schema": {
|
|
38167
|
+
"allOf": [
|
|
38168
|
+
{
|
|
38169
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38170
|
+
},
|
|
38171
|
+
{
|
|
38172
|
+
"type": "object",
|
|
38173
|
+
"properties": {
|
|
38174
|
+
"error_code": {
|
|
38175
|
+
"type": "string",
|
|
38176
|
+
"enum": [
|
|
38177
|
+
"validation_error"
|
|
38178
|
+
]
|
|
38179
|
+
}
|
|
38180
|
+
}
|
|
38181
|
+
}
|
|
38182
|
+
]
|
|
38183
|
+
}
|
|
38184
|
+
}
|
|
38185
|
+
}
|
|
38186
|
+
},
|
|
38187
|
+
"401": {
|
|
38188
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
38189
|
+
"content": {
|
|
38190
|
+
"application/json": {
|
|
38191
|
+
"schema": {
|
|
38192
|
+
"allOf": [
|
|
38193
|
+
{
|
|
38194
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38195
|
+
},
|
|
38196
|
+
{
|
|
38197
|
+
"type": "object",
|
|
38198
|
+
"properties": {
|
|
38199
|
+
"error_code": {
|
|
38200
|
+
"type": "string",
|
|
38201
|
+
"enum": [
|
|
38202
|
+
"unauthorized"
|
|
38203
|
+
]
|
|
38204
|
+
}
|
|
38205
|
+
}
|
|
38206
|
+
}
|
|
38207
|
+
]
|
|
38208
|
+
}
|
|
38209
|
+
}
|
|
38210
|
+
}
|
|
38211
|
+
},
|
|
38212
|
+
"403": {
|
|
38213
|
+
"description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
38214
|
+
"content": {
|
|
38215
|
+
"application/json": {
|
|
38216
|
+
"schema": {
|
|
38217
|
+
"allOf": [
|
|
38218
|
+
{
|
|
38219
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38220
|
+
},
|
|
38221
|
+
{
|
|
38222
|
+
"type": "object",
|
|
38223
|
+
"properties": {
|
|
38224
|
+
"error_code": {
|
|
38225
|
+
"type": "string",
|
|
38226
|
+
"enum": [
|
|
38227
|
+
"forbidden",
|
|
38228
|
+
"insufficient_scope",
|
|
38229
|
+
"user_suspended"
|
|
38230
|
+
]
|
|
38231
|
+
}
|
|
38232
|
+
}
|
|
38233
|
+
}
|
|
38234
|
+
]
|
|
38235
|
+
}
|
|
38236
|
+
}
|
|
38237
|
+
}
|
|
38238
|
+
},
|
|
38239
|
+
"404": {
|
|
38240
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
38241
|
+
"content": {
|
|
38242
|
+
"application/json": {
|
|
38243
|
+
"schema": {
|
|
38244
|
+
"allOf": [
|
|
38245
|
+
{
|
|
38246
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38247
|
+
},
|
|
38248
|
+
{
|
|
38249
|
+
"type": "object",
|
|
38250
|
+
"properties": {
|
|
38251
|
+
"error_code": {
|
|
38252
|
+
"type": "string",
|
|
38253
|
+
"enum": [
|
|
38254
|
+
"account_not_found"
|
|
38255
|
+
]
|
|
38256
|
+
}
|
|
38257
|
+
}
|
|
38258
|
+
}
|
|
38259
|
+
]
|
|
38260
|
+
}
|
|
38261
|
+
}
|
|
38262
|
+
}
|
|
38263
|
+
},
|
|
38264
|
+
"429": {
|
|
38265
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
38266
|
+
"content": {
|
|
38267
|
+
"application/json": {
|
|
38268
|
+
"schema": {
|
|
38269
|
+
"allOf": [
|
|
38270
|
+
{
|
|
38271
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38272
|
+
},
|
|
38273
|
+
{
|
|
38274
|
+
"type": "object",
|
|
38275
|
+
"properties": {
|
|
38276
|
+
"error_code": {
|
|
38277
|
+
"type": "string",
|
|
38278
|
+
"enum": [
|
|
38279
|
+
"too_many_requests"
|
|
38280
|
+
]
|
|
38281
|
+
}
|
|
38282
|
+
}
|
|
38283
|
+
}
|
|
38284
|
+
]
|
|
38285
|
+
}
|
|
38286
|
+
}
|
|
38287
|
+
}
|
|
38288
|
+
},
|
|
38289
|
+
"500": {
|
|
38290
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
38291
|
+
"content": {
|
|
38292
|
+
"application/json": {
|
|
38293
|
+
"schema": {
|
|
38294
|
+
"allOf": [
|
|
38295
|
+
{
|
|
38296
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38297
|
+
},
|
|
38298
|
+
{
|
|
38299
|
+
"type": "object",
|
|
38300
|
+
"properties": {
|
|
38301
|
+
"error_code": {
|
|
38302
|
+
"type": "string",
|
|
38303
|
+
"enum": [
|
|
38304
|
+
"internal_error"
|
|
38305
|
+
]
|
|
38306
|
+
}
|
|
38307
|
+
}
|
|
38308
|
+
}
|
|
38309
|
+
]
|
|
38310
|
+
}
|
|
38311
|
+
}
|
|
38312
|
+
}
|
|
38313
|
+
}
|
|
38314
|
+
}
|
|
38315
|
+
}
|
|
38316
|
+
},
|
|
38317
|
+
"/team/invite/decline": {
|
|
38318
|
+
"post": {
|
|
38319
|
+
"operationId": "team/declineInvite",
|
|
38320
|
+
"summary": "Decline a team invite for a signed-in user",
|
|
38321
|
+
"tags": [
|
|
38322
|
+
"team"
|
|
38323
|
+
],
|
|
38324
|
+
"description": "The invited user says no: the invite is spent (its link stops working) and `team.invite.revoked` is emitted with reason `declined`. Same checks as accepting.",
|
|
38325
|
+
"requestBody": {
|
|
38326
|
+
"required": true,
|
|
38327
|
+
"content": {
|
|
38328
|
+
"application/json": {
|
|
38329
|
+
"schema": {
|
|
38330
|
+
"type": "object",
|
|
38331
|
+
"required": [
|
|
38332
|
+
"invite_id",
|
|
38333
|
+
"user_id"
|
|
38334
|
+
],
|
|
38335
|
+
"properties": {
|
|
38336
|
+
"invite_id": {
|
|
38337
|
+
"type": "string",
|
|
38338
|
+
"minLength": 1
|
|
38339
|
+
},
|
|
38340
|
+
"user_id": {
|
|
38341
|
+
"type": "string",
|
|
38342
|
+
"description": "The user declining — must have the invited email, verified."
|
|
38343
|
+
}
|
|
38344
|
+
},
|
|
38345
|
+
"additionalProperties": false
|
|
38346
|
+
}
|
|
38347
|
+
}
|
|
38348
|
+
}
|
|
38349
|
+
},
|
|
38350
|
+
"security": [
|
|
38351
|
+
{
|
|
38352
|
+
"bearerAuth": []
|
|
38353
|
+
}
|
|
38354
|
+
],
|
|
38355
|
+
"responses": {
|
|
38356
|
+
"200": {
|
|
38357
|
+
"description": "Default Response",
|
|
38358
|
+
"content": {
|
|
38359
|
+
"application/json": {
|
|
38360
|
+
"schema": {
|
|
38361
|
+
"type": "object",
|
|
38362
|
+
"required": [
|
|
38363
|
+
"status"
|
|
38364
|
+
],
|
|
38365
|
+
"properties": {
|
|
38366
|
+
"status": {
|
|
38367
|
+
"type": "string",
|
|
38368
|
+
"enum": [
|
|
38369
|
+
"declined"
|
|
38370
|
+
]
|
|
38371
|
+
}
|
|
38372
|
+
}
|
|
38373
|
+
}
|
|
38374
|
+
}
|
|
38375
|
+
}
|
|
38376
|
+
},
|
|
38377
|
+
"400": {
|
|
38378
|
+
"description": "`invalid_ticket` — The ticket does not exist or is not the kind this endpoint accepts.\n\n`ticket_used` — The ticket was already consumed.\n\n`ticket_expired` — The ticket is past its expiry.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
38379
|
+
"content": {
|
|
38380
|
+
"application/json": {
|
|
38381
|
+
"schema": {
|
|
38382
|
+
"allOf": [
|
|
38383
|
+
{
|
|
38384
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38385
|
+
},
|
|
38386
|
+
{
|
|
38387
|
+
"type": "object",
|
|
38388
|
+
"properties": {
|
|
38389
|
+
"error_code": {
|
|
38390
|
+
"type": "string",
|
|
38391
|
+
"enum": [
|
|
38392
|
+
"invalid_ticket",
|
|
38393
|
+
"ticket_used",
|
|
38394
|
+
"ticket_expired",
|
|
38395
|
+
"validation_error"
|
|
38396
|
+
]
|
|
38397
|
+
}
|
|
38398
|
+
}
|
|
38399
|
+
}
|
|
38400
|
+
]
|
|
38401
|
+
}
|
|
38402
|
+
}
|
|
38403
|
+
}
|
|
38404
|
+
},
|
|
38405
|
+
"401": {
|
|
38406
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
38407
|
+
"content": {
|
|
38408
|
+
"application/json": {
|
|
38409
|
+
"schema": {
|
|
38410
|
+
"allOf": [
|
|
38411
|
+
{
|
|
38412
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38413
|
+
},
|
|
38414
|
+
{
|
|
38415
|
+
"type": "object",
|
|
38416
|
+
"properties": {
|
|
38417
|
+
"error_code": {
|
|
38418
|
+
"type": "string",
|
|
38419
|
+
"enum": [
|
|
38420
|
+
"unauthorized"
|
|
38421
|
+
]
|
|
38422
|
+
}
|
|
38423
|
+
}
|
|
38424
|
+
}
|
|
38425
|
+
]
|
|
38426
|
+
}
|
|
38427
|
+
}
|
|
38428
|
+
}
|
|
38429
|
+
},
|
|
38430
|
+
"403": {
|
|
38431
|
+
"description": "`invite_email_mismatch` — The invite is for another email address than the accepting user's. `details.invited_email` shows it masked.\n\n`invite_email_unverified` — The accepting user's email matches the invite but is not verified yet.\n\n`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
|
|
38432
|
+
"content": {
|
|
38433
|
+
"application/json": {
|
|
38434
|
+
"schema": {
|
|
38435
|
+
"allOf": [
|
|
38436
|
+
{
|
|
38437
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38438
|
+
},
|
|
38439
|
+
{
|
|
38440
|
+
"type": "object",
|
|
38441
|
+
"properties": {
|
|
38442
|
+
"error_code": {
|
|
38443
|
+
"type": "string",
|
|
38444
|
+
"enum": [
|
|
38445
|
+
"invite_email_mismatch",
|
|
38446
|
+
"invite_email_unverified",
|
|
38447
|
+
"forbidden",
|
|
38448
|
+
"insufficient_scope",
|
|
38449
|
+
"user_suspended"
|
|
38450
|
+
]
|
|
38451
|
+
}
|
|
38452
|
+
}
|
|
38453
|
+
}
|
|
38454
|
+
]
|
|
38455
|
+
}
|
|
38456
|
+
}
|
|
38457
|
+
}
|
|
38458
|
+
},
|
|
38459
|
+
"404": {
|
|
38460
|
+
"description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
38461
|
+
"content": {
|
|
38462
|
+
"application/json": {
|
|
38463
|
+
"schema": {
|
|
38464
|
+
"allOf": [
|
|
38465
|
+
{
|
|
38466
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38467
|
+
},
|
|
38468
|
+
{
|
|
38469
|
+
"type": "object",
|
|
38470
|
+
"properties": {
|
|
38471
|
+
"error_code": {
|
|
38472
|
+
"type": "string",
|
|
38473
|
+
"enum": [
|
|
38474
|
+
"not_found",
|
|
38475
|
+
"account_not_found"
|
|
38476
|
+
]
|
|
38477
|
+
}
|
|
38478
|
+
}
|
|
38479
|
+
}
|
|
38480
|
+
]
|
|
38481
|
+
}
|
|
38482
|
+
}
|
|
38483
|
+
}
|
|
38484
|
+
},
|
|
38485
|
+
"429": {
|
|
38486
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
38487
|
+
"content": {
|
|
38488
|
+
"application/json": {
|
|
38489
|
+
"schema": {
|
|
38490
|
+
"allOf": [
|
|
38491
|
+
{
|
|
38492
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38493
|
+
},
|
|
38494
|
+
{
|
|
38495
|
+
"type": "object",
|
|
38496
|
+
"properties": {
|
|
38497
|
+
"error_code": {
|
|
38498
|
+
"type": "string",
|
|
38499
|
+
"enum": [
|
|
38500
|
+
"too_many_requests"
|
|
38501
|
+
]
|
|
38502
|
+
}
|
|
38503
|
+
}
|
|
38504
|
+
}
|
|
38505
|
+
]
|
|
38506
|
+
}
|
|
38507
|
+
}
|
|
38508
|
+
}
|
|
38509
|
+
},
|
|
38510
|
+
"500": {
|
|
38511
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
38512
|
+
"content": {
|
|
38513
|
+
"application/json": {
|
|
38514
|
+
"schema": {
|
|
38515
|
+
"allOf": [
|
|
38516
|
+
{
|
|
38517
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
38518
|
+
},
|
|
38519
|
+
{
|
|
38520
|
+
"type": "object",
|
|
38521
|
+
"properties": {
|
|
38522
|
+
"error_code": {
|
|
38523
|
+
"type": "string",
|
|
38524
|
+
"enum": [
|
|
38525
|
+
"internal_error"
|
|
38526
|
+
]
|
|
38527
|
+
}
|
|
38528
|
+
}
|
|
38529
|
+
}
|
|
38530
|
+
]
|
|
38531
|
+
}
|
|
38532
|
+
}
|
|
38533
|
+
}
|
|
38534
|
+
}
|
|
38535
|
+
}
|
|
38536
|
+
}
|
|
38537
|
+
},
|
|
38011
38538
|
"/api": {
|
|
38012
38539
|
"get": {
|
|
38013
38540
|
"operationId": "api/list",
|