@faable/auth-sdk 2.7.36 → 2.7.37
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 +45 -0
- package/dist/api/generated-client.js +38 -0
- package/dist/api/types.d.ts +260 -1
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +452 -2
|
@@ -2771,6 +2771,51 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2771
2771
|
updatedAt?: string | undefined;
|
|
2772
2772
|
}>>;
|
|
2773
2773
|
};
|
|
2774
|
+
/**
|
|
2775
|
+
* `GET /internal/usage/m2m` — operationId: `internal/m2mUsage`
|
|
2776
|
+
*
|
|
2777
|
+
* M2M tokens served per project in a month (platform)
|
|
2778
|
+
*
|
|
2779
|
+
* Per-project count of successful client_credentials token responses in the given month (cached ones included), read from the monthly counters. Consumed by the billing usage job. Platform token with `read:usage`.
|
|
2780
|
+
*
|
|
2781
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2782
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2783
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2784
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2785
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2786
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2787
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2788
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2789
|
+
*/
|
|
2790
|
+
internalM2mUsage(params?: OpQuery<"internal/m2mUsage">): Promise<{
|
|
2791
|
+
month: string;
|
|
2792
|
+
rows: {
|
|
2793
|
+
team: string;
|
|
2794
|
+
tokens: number;
|
|
2795
|
+
}[];
|
|
2796
|
+
}>;
|
|
2797
|
+
/**
|
|
2798
|
+
* `GET /internal/usage/m2m/range` — operationId: `internal/m2mUsageRange`
|
|
2799
|
+
*
|
|
2800
|
+
* M2M tokens a project was served in a time range (platform)
|
|
2801
|
+
*
|
|
2802
|
+
* Sum of the hourly client_credentials counters of one project between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
2803
|
+
*
|
|
2804
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2805
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2806
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2807
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2808
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2809
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2810
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2811
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2812
|
+
*/
|
|
2813
|
+
internalM2mUsageRange(params?: OpQuery<"internal/m2mUsageRange">): Promise<{
|
|
2814
|
+
team: string;
|
|
2815
|
+
from: string;
|
|
2816
|
+
to: string;
|
|
2817
|
+
tokens: number;
|
|
2818
|
+
}>;
|
|
2774
2819
|
/**
|
|
2775
2820
|
* `POST /internal/mgmt-token` — operationId: `internal/mintMgmtToken`
|
|
2776
2821
|
*
|
|
@@ -985,6 +985,44 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
985
985
|
identityList(params) {
|
|
986
986
|
return this.paginator({ url: `/identity`, params });
|
|
987
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* `GET /internal/usage/m2m` — operationId: `internal/m2mUsage`
|
|
990
|
+
*
|
|
991
|
+
* M2M tokens served per project in a month (platform)
|
|
992
|
+
*
|
|
993
|
+
* Per-project count of successful client_credentials token responses in the given month (cached ones included), read from the monthly counters. Consumed by the billing usage job. Platform token with `read:usage`.
|
|
994
|
+
*
|
|
995
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
996
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
997
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
998
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
999
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1000
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1001
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1002
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1003
|
+
*/
|
|
1004
|
+
internalM2mUsage(params) {
|
|
1005
|
+
return this.fetcher.request({ method: "GET", url: `/internal/usage/m2m`, params });
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* `GET /internal/usage/m2m/range` — operationId: `internal/m2mUsageRange`
|
|
1009
|
+
*
|
|
1010
|
+
* M2M tokens a project was served in a time range (platform)
|
|
1011
|
+
*
|
|
1012
|
+
* Sum of the hourly client_credentials counters of one project between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
1013
|
+
*
|
|
1014
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1015
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1016
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1017
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1018
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1019
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1020
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1021
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1022
|
+
*/
|
|
1023
|
+
internalM2mUsageRange(params) {
|
|
1024
|
+
return this.fetcher.request({ method: "GET", url: `/internal/usage/m2m/range`, params });
|
|
1025
|
+
}
|
|
988
1026
|
/**
|
|
989
1027
|
* `POST /internal/mgmt-token` — operationId: `internal/mintMgmtToken`
|
|
990
1028
|
*
|
package/dist/api/types.d.ts
CHANGED
|
@@ -224,6 +224,46 @@ export interface paths {
|
|
|
224
224
|
patch?: never;
|
|
225
225
|
trace?: never;
|
|
226
226
|
};
|
|
227
|
+
"/internal/usage/m2m": {
|
|
228
|
+
parameters: {
|
|
229
|
+
query?: never;
|
|
230
|
+
header?: never;
|
|
231
|
+
path?: never;
|
|
232
|
+
cookie?: never;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* M2M tokens served per project in a month (platform)
|
|
236
|
+
* @description Per-project count of successful client_credentials token responses in the given month (cached ones included), read from the monthly counters. Consumed by the billing usage job. Platform token with `read:usage`.
|
|
237
|
+
*/
|
|
238
|
+
get: operations["internal/m2mUsage"];
|
|
239
|
+
put?: never;
|
|
240
|
+
post?: never;
|
|
241
|
+
delete?: never;
|
|
242
|
+
options?: never;
|
|
243
|
+
head?: never;
|
|
244
|
+
patch?: never;
|
|
245
|
+
trace?: never;
|
|
246
|
+
};
|
|
247
|
+
"/internal/usage/m2m/range": {
|
|
248
|
+
parameters: {
|
|
249
|
+
query?: never;
|
|
250
|
+
header?: never;
|
|
251
|
+
path?: never;
|
|
252
|
+
cookie?: never;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* M2M tokens a project was served in a time range (platform)
|
|
256
|
+
* @description Sum of the hourly client_credentials counters of one project between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
257
|
+
*/
|
|
258
|
+
get: operations["internal/m2mUsageRange"];
|
|
259
|
+
put?: never;
|
|
260
|
+
post?: never;
|
|
261
|
+
delete?: never;
|
|
262
|
+
options?: never;
|
|
263
|
+
head?: never;
|
|
264
|
+
patch?: never;
|
|
265
|
+
trace?: never;
|
|
266
|
+
};
|
|
227
267
|
"/account/{account_id}/transfer": {
|
|
228
268
|
parameters: {
|
|
229
269
|
query?: never;
|
|
@@ -6352,6 +6392,7 @@ export interface components {
|
|
|
6352
6392
|
* - `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.
|
|
6353
6393
|
* - `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.
|
|
6354
6394
|
* - `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.
|
|
6395
|
+
* - `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.
|
|
6355
6396
|
* - `signup_disabled` (403): Self-service sign-up is disabled on this connection.
|
|
6356
6397
|
* - `email_taken` (409): Another user in this account already uses that email.
|
|
6357
6398
|
* - `invalid_email` (400): The email address is not valid.
|
|
@@ -6430,7 +6471,7 @@ export interface components {
|
|
|
6430
6471
|
* - `revision_not_found` (404): The revision is not in the flow history.
|
|
6431
6472
|
* @enum {string}
|
|
6432
6473
|
*/
|
|
6433
|
-
ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "plan_required" | "not_logged_in" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "signup_disabled" | "email_taken" | "invalid_email" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found";
|
|
6474
|
+
ErrorCode: "bad_request" | "validation_error" | "unauthorized" | "payment_required" | "forbidden" | "not_found" | "method_not_allowed" | "conflict" | "payload_too_large" | "unsupported_media_type" | "unprocessable_entity" | "too_many_requests" | "internal_error" | "already_exists" | "invalid_id" | "account_not_found" | "invalid_query" | "search_not_supported" | "invalid_expand" | "access_denied" | "insufficient_scope" | "team_required" | "account_limit_reached" | "invalid_project_id" | "account_transfer_refused" | "plan_required" | "not_logged_in" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "invalid_email" | "same_email" | "user_has_no_email" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "invalid_code" | "invalid_phone" | "phone_changed" | "phone_already_verified" | "sms_unavailable" | "sms_failed" | "invalid_state" | "state_mismatch" | "invalid_ticket" | "ticket_used" | "ticket_expired" | "ticket_not_found" | "credential_not_found" | "invalid_link" | "expired_link" | "invalid_otp" | "invalid_client" | "client_not_found" | "client_mismatch" | "invalid_client_metadata" | "invalid_connection" | "connection_required" | "connection_misconfigured" | "passwordless_unavailable" | "ambiguous_connection" | "invalid_redirect_uri" | "origin_not_allowed" | "audience_not_found" | "system_resource" | "invalid_request" | "invalid_device_code" | "provider_error" | "identity_already_linked" | "identity_link_denied" | "identity_conflict" | "identity_orphaned" | "no_provider_token" | "no_refresh_token" | "action_unavailable" | "login_flow_misconfigured" | "mfa_required" | "step_up_required" | "interaction_required" | "passkey_login_disabled" | "mfa_pending" | "mfa_invalid_code" | "mfa_invalid_recovery_code" | "too_many_attempts" | "too_many_login_attempts" | "totp_not_allowed" | "no_usable_factor" | "factor_not_found" | "factor_already_confirmed" | "invalid_factor" | "session_missing" | "passkey_verification_failed" | "no_passkey_enrolled" | "malformed_credential" | "unknown_passkey" | "invalid_passkey" | "invite_not_found" | "invite_used" | "already_member" | "not_a_member" | "role_not_found" | "invalid_role" | "flow_not_found" | "revision_not_found";
|
|
6434
6475
|
/** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
|
|
6435
6476
|
ErrorResponse: {
|
|
6436
6477
|
/** @description The HTTP status, repeated. */
|
|
@@ -8093,6 +8134,224 @@ export interface operations {
|
|
|
8093
8134
|
};
|
|
8094
8135
|
};
|
|
8095
8136
|
};
|
|
8137
|
+
"internal/m2mUsage": {
|
|
8138
|
+
parameters: {
|
|
8139
|
+
query: {
|
|
8140
|
+
/** @description YYYY-MM, UTC. */
|
|
8141
|
+
month: string;
|
|
8142
|
+
};
|
|
8143
|
+
header?: never;
|
|
8144
|
+
path?: never;
|
|
8145
|
+
cookie?: never;
|
|
8146
|
+
};
|
|
8147
|
+
requestBody?: never;
|
|
8148
|
+
responses: {
|
|
8149
|
+
/** @description Default Response */
|
|
8150
|
+
200: {
|
|
8151
|
+
headers: {
|
|
8152
|
+
[name: string]: unknown;
|
|
8153
|
+
};
|
|
8154
|
+
content: {
|
|
8155
|
+
"application/json": {
|
|
8156
|
+
month: string;
|
|
8157
|
+
rows: {
|
|
8158
|
+
/** @description The project (`team_<hex>`), or the account id for a legacy account without one. */
|
|
8159
|
+
team: string;
|
|
8160
|
+
tokens: number;
|
|
8161
|
+
}[];
|
|
8162
|
+
};
|
|
8163
|
+
};
|
|
8164
|
+
};
|
|
8165
|
+
/** @description `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field. */
|
|
8166
|
+
400: {
|
|
8167
|
+
headers: {
|
|
8168
|
+
[name: string]: unknown;
|
|
8169
|
+
};
|
|
8170
|
+
content: {
|
|
8171
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8172
|
+
/** @enum {string} */
|
|
8173
|
+
error_code?: "validation_error";
|
|
8174
|
+
};
|
|
8175
|
+
};
|
|
8176
|
+
};
|
|
8177
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
8178
|
+
401: {
|
|
8179
|
+
headers: {
|
|
8180
|
+
[name: string]: unknown;
|
|
8181
|
+
};
|
|
8182
|
+
content: {
|
|
8183
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8184
|
+
/** @enum {string} */
|
|
8185
|
+
error_code?: "unauthorized";
|
|
8186
|
+
};
|
|
8187
|
+
};
|
|
8188
|
+
};
|
|
8189
|
+
/**
|
|
8190
|
+
* @description `forbidden` — The credentials are valid but do not allow this operation.
|
|
8191
|
+
*
|
|
8192
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
8193
|
+
*
|
|
8194
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
8195
|
+
*/
|
|
8196
|
+
403: {
|
|
8197
|
+
headers: {
|
|
8198
|
+
[name: string]: unknown;
|
|
8199
|
+
};
|
|
8200
|
+
content: {
|
|
8201
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8202
|
+
/** @enum {string} */
|
|
8203
|
+
error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
|
|
8204
|
+
};
|
|
8205
|
+
};
|
|
8206
|
+
};
|
|
8207
|
+
/** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
|
|
8208
|
+
404: {
|
|
8209
|
+
headers: {
|
|
8210
|
+
[name: string]: unknown;
|
|
8211
|
+
};
|
|
8212
|
+
content: {
|
|
8213
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8214
|
+
/** @enum {string} */
|
|
8215
|
+
error_code?: "account_not_found";
|
|
8216
|
+
};
|
|
8217
|
+
};
|
|
8218
|
+
};
|
|
8219
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
8220
|
+
429: {
|
|
8221
|
+
headers: {
|
|
8222
|
+
[name: string]: unknown;
|
|
8223
|
+
};
|
|
8224
|
+
content: {
|
|
8225
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8226
|
+
/** @enum {string} */
|
|
8227
|
+
error_code?: "too_many_requests";
|
|
8228
|
+
};
|
|
8229
|
+
};
|
|
8230
|
+
};
|
|
8231
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
8232
|
+
500: {
|
|
8233
|
+
headers: {
|
|
8234
|
+
[name: string]: unknown;
|
|
8235
|
+
};
|
|
8236
|
+
content: {
|
|
8237
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8238
|
+
/** @enum {string} */
|
|
8239
|
+
error_code?: "internal_error";
|
|
8240
|
+
};
|
|
8241
|
+
};
|
|
8242
|
+
};
|
|
8243
|
+
};
|
|
8244
|
+
};
|
|
8245
|
+
"internal/m2mUsageRange": {
|
|
8246
|
+
parameters: {
|
|
8247
|
+
query: {
|
|
8248
|
+
/** @description The project to read, as `team_<hex>`. */
|
|
8249
|
+
team: string;
|
|
8250
|
+
/** @description Start of the range — the subscription period start. Counted from the first full hour after it. */
|
|
8251
|
+
from: string;
|
|
8252
|
+
/** @description End of the range. Defaults to now. */
|
|
8253
|
+
to?: string;
|
|
8254
|
+
};
|
|
8255
|
+
header?: never;
|
|
8256
|
+
path?: never;
|
|
8257
|
+
cookie?: never;
|
|
8258
|
+
};
|
|
8259
|
+
requestBody?: never;
|
|
8260
|
+
responses: {
|
|
8261
|
+
/** @description Default Response */
|
|
8262
|
+
200: {
|
|
8263
|
+
headers: {
|
|
8264
|
+
[name: string]: unknown;
|
|
8265
|
+
};
|
|
8266
|
+
content: {
|
|
8267
|
+
"application/json": {
|
|
8268
|
+
team: string;
|
|
8269
|
+
from: string;
|
|
8270
|
+
to: string;
|
|
8271
|
+
tokens: number;
|
|
8272
|
+
};
|
|
8273
|
+
};
|
|
8274
|
+
};
|
|
8275
|
+
/** @description `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field. */
|
|
8276
|
+
400: {
|
|
8277
|
+
headers: {
|
|
8278
|
+
[name: string]: unknown;
|
|
8279
|
+
};
|
|
8280
|
+
content: {
|
|
8281
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8282
|
+
/** @enum {string} */
|
|
8283
|
+
error_code?: "validation_error";
|
|
8284
|
+
};
|
|
8285
|
+
};
|
|
8286
|
+
};
|
|
8287
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
8288
|
+
401: {
|
|
8289
|
+
headers: {
|
|
8290
|
+
[name: string]: unknown;
|
|
8291
|
+
};
|
|
8292
|
+
content: {
|
|
8293
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8294
|
+
/** @enum {string} */
|
|
8295
|
+
error_code?: "unauthorized";
|
|
8296
|
+
};
|
|
8297
|
+
};
|
|
8298
|
+
};
|
|
8299
|
+
/**
|
|
8300
|
+
* @description `forbidden` — The credentials are valid but do not allow this operation.
|
|
8301
|
+
*
|
|
8302
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
8303
|
+
*
|
|
8304
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
8305
|
+
*/
|
|
8306
|
+
403: {
|
|
8307
|
+
headers: {
|
|
8308
|
+
[name: string]: unknown;
|
|
8309
|
+
};
|
|
8310
|
+
content: {
|
|
8311
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8312
|
+
/** @enum {string} */
|
|
8313
|
+
error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
|
|
8314
|
+
};
|
|
8315
|
+
};
|
|
8316
|
+
};
|
|
8317
|
+
/** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
|
|
8318
|
+
404: {
|
|
8319
|
+
headers: {
|
|
8320
|
+
[name: string]: unknown;
|
|
8321
|
+
};
|
|
8322
|
+
content: {
|
|
8323
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8324
|
+
/** @enum {string} */
|
|
8325
|
+
error_code?: "account_not_found";
|
|
8326
|
+
};
|
|
8327
|
+
};
|
|
8328
|
+
};
|
|
8329
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
8330
|
+
429: {
|
|
8331
|
+
headers: {
|
|
8332
|
+
[name: string]: unknown;
|
|
8333
|
+
};
|
|
8334
|
+
content: {
|
|
8335
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8336
|
+
/** @enum {string} */
|
|
8337
|
+
error_code?: "too_many_requests";
|
|
8338
|
+
};
|
|
8339
|
+
};
|
|
8340
|
+
};
|
|
8341
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
8342
|
+
500: {
|
|
8343
|
+
headers: {
|
|
8344
|
+
[name: string]: unknown;
|
|
8345
|
+
};
|
|
8346
|
+
content: {
|
|
8347
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8348
|
+
/** @enum {string} */
|
|
8349
|
+
error_code?: "internal_error";
|
|
8350
|
+
};
|
|
8351
|
+
};
|
|
8352
|
+
};
|
|
8353
|
+
};
|
|
8354
|
+
};
|
|
8096
8355
|
"account/transfer": {
|
|
8097
8356
|
parameters: {
|
|
8098
8357
|
query?: never;
|
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.37";
|
|
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 = "8d19009";
|
|
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.40.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -7064,7 +7064,7 @@
|
|
|
7064
7064
|
},
|
|
7065
7065
|
"ErrorCode": {
|
|
7066
7066
|
"type": "string",
|
|
7067
|
-
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.",
|
|
7067
|
+
"description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.",
|
|
7068
7068
|
"enum": [
|
|
7069
7069
|
"bad_request",
|
|
7070
7070
|
"validation_error",
|
|
@@ -7100,6 +7100,7 @@
|
|
|
7100
7100
|
"login_denied",
|
|
7101
7101
|
"signup_denied",
|
|
7102
7102
|
"client_credentials_denied",
|
|
7103
|
+
"m2m_quota_exceeded",
|
|
7103
7104
|
"signup_disabled",
|
|
7104
7105
|
"email_taken",
|
|
7105
7106
|
"invalid_email",
|
|
@@ -11873,6 +11874,455 @@
|
|
|
11873
11874
|
}
|
|
11874
11875
|
}
|
|
11875
11876
|
},
|
|
11877
|
+
"/internal/usage/m2m": {
|
|
11878
|
+
"get": {
|
|
11879
|
+
"operationId": "internal/m2mUsage",
|
|
11880
|
+
"summary": "M2M tokens served per project in a month (platform)",
|
|
11881
|
+
"tags": [
|
|
11882
|
+
"account"
|
|
11883
|
+
],
|
|
11884
|
+
"description": "Per-project count of successful client_credentials token responses in the given month (cached ones included), read from the monthly counters. Consumed by the billing usage job. Platform token with `read:usage`.",
|
|
11885
|
+
"parameters": [
|
|
11886
|
+
{
|
|
11887
|
+
"schema": {
|
|
11888
|
+
"type": "string",
|
|
11889
|
+
"pattern": "^\\d{4}-\\d{2}$"
|
|
11890
|
+
},
|
|
11891
|
+
"in": "query",
|
|
11892
|
+
"name": "month",
|
|
11893
|
+
"required": true,
|
|
11894
|
+
"description": "YYYY-MM, UTC."
|
|
11895
|
+
}
|
|
11896
|
+
],
|
|
11897
|
+
"security": [
|
|
11898
|
+
{
|
|
11899
|
+
"bearerAuth": []
|
|
11900
|
+
}
|
|
11901
|
+
],
|
|
11902
|
+
"responses": {
|
|
11903
|
+
"200": {
|
|
11904
|
+
"description": "Default Response",
|
|
11905
|
+
"content": {
|
|
11906
|
+
"application/json": {
|
|
11907
|
+
"schema": {
|
|
11908
|
+
"type": "object",
|
|
11909
|
+
"required": [
|
|
11910
|
+
"month",
|
|
11911
|
+
"rows"
|
|
11912
|
+
],
|
|
11913
|
+
"properties": {
|
|
11914
|
+
"month": {
|
|
11915
|
+
"type": "string"
|
|
11916
|
+
},
|
|
11917
|
+
"rows": {
|
|
11918
|
+
"type": "array",
|
|
11919
|
+
"items": {
|
|
11920
|
+
"type": "object",
|
|
11921
|
+
"required": [
|
|
11922
|
+
"team",
|
|
11923
|
+
"tokens"
|
|
11924
|
+
],
|
|
11925
|
+
"properties": {
|
|
11926
|
+
"team": {
|
|
11927
|
+
"type": "string",
|
|
11928
|
+
"description": "The project (`team_<hex>`), or the account id for a legacy account without one."
|
|
11929
|
+
},
|
|
11930
|
+
"tokens": {
|
|
11931
|
+
"type": "integer"
|
|
11932
|
+
}
|
|
11933
|
+
}
|
|
11934
|
+
}
|
|
11935
|
+
}
|
|
11936
|
+
}
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
}
|
|
11940
|
+
},
|
|
11941
|
+
"400": {
|
|
11942
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
11943
|
+
"content": {
|
|
11944
|
+
"application/json": {
|
|
11945
|
+
"schema": {
|
|
11946
|
+
"allOf": [
|
|
11947
|
+
{
|
|
11948
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
11949
|
+
},
|
|
11950
|
+
{
|
|
11951
|
+
"type": "object",
|
|
11952
|
+
"properties": {
|
|
11953
|
+
"error_code": {
|
|
11954
|
+
"type": "string",
|
|
11955
|
+
"enum": [
|
|
11956
|
+
"validation_error"
|
|
11957
|
+
]
|
|
11958
|
+
}
|
|
11959
|
+
}
|
|
11960
|
+
}
|
|
11961
|
+
]
|
|
11962
|
+
}
|
|
11963
|
+
}
|
|
11964
|
+
}
|
|
11965
|
+
},
|
|
11966
|
+
"401": {
|
|
11967
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
11968
|
+
"content": {
|
|
11969
|
+
"application/json": {
|
|
11970
|
+
"schema": {
|
|
11971
|
+
"allOf": [
|
|
11972
|
+
{
|
|
11973
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
11974
|
+
},
|
|
11975
|
+
{
|
|
11976
|
+
"type": "object",
|
|
11977
|
+
"properties": {
|
|
11978
|
+
"error_code": {
|
|
11979
|
+
"type": "string",
|
|
11980
|
+
"enum": [
|
|
11981
|
+
"unauthorized"
|
|
11982
|
+
]
|
|
11983
|
+
}
|
|
11984
|
+
}
|
|
11985
|
+
}
|
|
11986
|
+
]
|
|
11987
|
+
}
|
|
11988
|
+
}
|
|
11989
|
+
}
|
|
11990
|
+
},
|
|
11991
|
+
"403": {
|
|
11992
|
+
"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.",
|
|
11993
|
+
"content": {
|
|
11994
|
+
"application/json": {
|
|
11995
|
+
"schema": {
|
|
11996
|
+
"allOf": [
|
|
11997
|
+
{
|
|
11998
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
11999
|
+
},
|
|
12000
|
+
{
|
|
12001
|
+
"type": "object",
|
|
12002
|
+
"properties": {
|
|
12003
|
+
"error_code": {
|
|
12004
|
+
"type": "string",
|
|
12005
|
+
"enum": [
|
|
12006
|
+
"forbidden",
|
|
12007
|
+
"insufficient_scope",
|
|
12008
|
+
"user_suspended"
|
|
12009
|
+
]
|
|
12010
|
+
}
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
12013
|
+
]
|
|
12014
|
+
}
|
|
12015
|
+
}
|
|
12016
|
+
}
|
|
12017
|
+
},
|
|
12018
|
+
"404": {
|
|
12019
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
12020
|
+
"content": {
|
|
12021
|
+
"application/json": {
|
|
12022
|
+
"schema": {
|
|
12023
|
+
"allOf": [
|
|
12024
|
+
{
|
|
12025
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12026
|
+
},
|
|
12027
|
+
{
|
|
12028
|
+
"type": "object",
|
|
12029
|
+
"properties": {
|
|
12030
|
+
"error_code": {
|
|
12031
|
+
"type": "string",
|
|
12032
|
+
"enum": [
|
|
12033
|
+
"account_not_found"
|
|
12034
|
+
]
|
|
12035
|
+
}
|
|
12036
|
+
}
|
|
12037
|
+
}
|
|
12038
|
+
]
|
|
12039
|
+
}
|
|
12040
|
+
}
|
|
12041
|
+
}
|
|
12042
|
+
},
|
|
12043
|
+
"429": {
|
|
12044
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
12045
|
+
"content": {
|
|
12046
|
+
"application/json": {
|
|
12047
|
+
"schema": {
|
|
12048
|
+
"allOf": [
|
|
12049
|
+
{
|
|
12050
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12051
|
+
},
|
|
12052
|
+
{
|
|
12053
|
+
"type": "object",
|
|
12054
|
+
"properties": {
|
|
12055
|
+
"error_code": {
|
|
12056
|
+
"type": "string",
|
|
12057
|
+
"enum": [
|
|
12058
|
+
"too_many_requests"
|
|
12059
|
+
]
|
|
12060
|
+
}
|
|
12061
|
+
}
|
|
12062
|
+
}
|
|
12063
|
+
]
|
|
12064
|
+
}
|
|
12065
|
+
}
|
|
12066
|
+
}
|
|
12067
|
+
},
|
|
12068
|
+
"500": {
|
|
12069
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
12070
|
+
"content": {
|
|
12071
|
+
"application/json": {
|
|
12072
|
+
"schema": {
|
|
12073
|
+
"allOf": [
|
|
12074
|
+
{
|
|
12075
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12076
|
+
},
|
|
12077
|
+
{
|
|
12078
|
+
"type": "object",
|
|
12079
|
+
"properties": {
|
|
12080
|
+
"error_code": {
|
|
12081
|
+
"type": "string",
|
|
12082
|
+
"enum": [
|
|
12083
|
+
"internal_error"
|
|
12084
|
+
]
|
|
12085
|
+
}
|
|
12086
|
+
}
|
|
12087
|
+
}
|
|
12088
|
+
]
|
|
12089
|
+
}
|
|
12090
|
+
}
|
|
12091
|
+
}
|
|
12092
|
+
}
|
|
12093
|
+
}
|
|
12094
|
+
}
|
|
12095
|
+
},
|
|
12096
|
+
"/internal/usage/m2m/range": {
|
|
12097
|
+
"get": {
|
|
12098
|
+
"operationId": "internal/m2mUsageRange",
|
|
12099
|
+
"summary": "M2M tokens a project was served in a time range (platform)",
|
|
12100
|
+
"tags": [
|
|
12101
|
+
"account"
|
|
12102
|
+
],
|
|
12103
|
+
"description": "Sum of the hourly client_credentials counters of one project between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.",
|
|
12104
|
+
"parameters": [
|
|
12105
|
+
{
|
|
12106
|
+
"schema": {
|
|
12107
|
+
"type": "string"
|
|
12108
|
+
},
|
|
12109
|
+
"in": "query",
|
|
12110
|
+
"name": "team",
|
|
12111
|
+
"required": true,
|
|
12112
|
+
"description": "The project to read, as `team_<hex>`."
|
|
12113
|
+
},
|
|
12114
|
+
{
|
|
12115
|
+
"schema": {
|
|
12116
|
+
"type": "string",
|
|
12117
|
+
"format": "date-time"
|
|
12118
|
+
},
|
|
12119
|
+
"in": "query",
|
|
12120
|
+
"name": "from",
|
|
12121
|
+
"required": true,
|
|
12122
|
+
"description": "Start of the range — the subscription period start. Counted from the first full hour after it."
|
|
12123
|
+
},
|
|
12124
|
+
{
|
|
12125
|
+
"schema": {
|
|
12126
|
+
"type": "string",
|
|
12127
|
+
"format": "date-time"
|
|
12128
|
+
},
|
|
12129
|
+
"in": "query",
|
|
12130
|
+
"name": "to",
|
|
12131
|
+
"required": false,
|
|
12132
|
+
"description": "End of the range. Defaults to now."
|
|
12133
|
+
}
|
|
12134
|
+
],
|
|
12135
|
+
"security": [
|
|
12136
|
+
{
|
|
12137
|
+
"bearerAuth": []
|
|
12138
|
+
}
|
|
12139
|
+
],
|
|
12140
|
+
"responses": {
|
|
12141
|
+
"200": {
|
|
12142
|
+
"description": "Default Response",
|
|
12143
|
+
"content": {
|
|
12144
|
+
"application/json": {
|
|
12145
|
+
"schema": {
|
|
12146
|
+
"type": "object",
|
|
12147
|
+
"required": [
|
|
12148
|
+
"team",
|
|
12149
|
+
"from",
|
|
12150
|
+
"to",
|
|
12151
|
+
"tokens"
|
|
12152
|
+
],
|
|
12153
|
+
"properties": {
|
|
12154
|
+
"team": {
|
|
12155
|
+
"type": "string"
|
|
12156
|
+
},
|
|
12157
|
+
"from": {
|
|
12158
|
+
"type": "string"
|
|
12159
|
+
},
|
|
12160
|
+
"to": {
|
|
12161
|
+
"type": "string"
|
|
12162
|
+
},
|
|
12163
|
+
"tokens": {
|
|
12164
|
+
"type": "integer"
|
|
12165
|
+
}
|
|
12166
|
+
}
|
|
12167
|
+
}
|
|
12168
|
+
}
|
|
12169
|
+
}
|
|
12170
|
+
},
|
|
12171
|
+
"400": {
|
|
12172
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
12173
|
+
"content": {
|
|
12174
|
+
"application/json": {
|
|
12175
|
+
"schema": {
|
|
12176
|
+
"allOf": [
|
|
12177
|
+
{
|
|
12178
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12179
|
+
},
|
|
12180
|
+
{
|
|
12181
|
+
"type": "object",
|
|
12182
|
+
"properties": {
|
|
12183
|
+
"error_code": {
|
|
12184
|
+
"type": "string",
|
|
12185
|
+
"enum": [
|
|
12186
|
+
"validation_error"
|
|
12187
|
+
]
|
|
12188
|
+
}
|
|
12189
|
+
}
|
|
12190
|
+
}
|
|
12191
|
+
]
|
|
12192
|
+
}
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12195
|
+
},
|
|
12196
|
+
"401": {
|
|
12197
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
12198
|
+
"content": {
|
|
12199
|
+
"application/json": {
|
|
12200
|
+
"schema": {
|
|
12201
|
+
"allOf": [
|
|
12202
|
+
{
|
|
12203
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12204
|
+
},
|
|
12205
|
+
{
|
|
12206
|
+
"type": "object",
|
|
12207
|
+
"properties": {
|
|
12208
|
+
"error_code": {
|
|
12209
|
+
"type": "string",
|
|
12210
|
+
"enum": [
|
|
12211
|
+
"unauthorized"
|
|
12212
|
+
]
|
|
12213
|
+
}
|
|
12214
|
+
}
|
|
12215
|
+
}
|
|
12216
|
+
]
|
|
12217
|
+
}
|
|
12218
|
+
}
|
|
12219
|
+
}
|
|
12220
|
+
},
|
|
12221
|
+
"403": {
|
|
12222
|
+
"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.",
|
|
12223
|
+
"content": {
|
|
12224
|
+
"application/json": {
|
|
12225
|
+
"schema": {
|
|
12226
|
+
"allOf": [
|
|
12227
|
+
{
|
|
12228
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12229
|
+
},
|
|
12230
|
+
{
|
|
12231
|
+
"type": "object",
|
|
12232
|
+
"properties": {
|
|
12233
|
+
"error_code": {
|
|
12234
|
+
"type": "string",
|
|
12235
|
+
"enum": [
|
|
12236
|
+
"forbidden",
|
|
12237
|
+
"insufficient_scope",
|
|
12238
|
+
"user_suspended"
|
|
12239
|
+
]
|
|
12240
|
+
}
|
|
12241
|
+
}
|
|
12242
|
+
}
|
|
12243
|
+
]
|
|
12244
|
+
}
|
|
12245
|
+
}
|
|
12246
|
+
}
|
|
12247
|
+
},
|
|
12248
|
+
"404": {
|
|
12249
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
12250
|
+
"content": {
|
|
12251
|
+
"application/json": {
|
|
12252
|
+
"schema": {
|
|
12253
|
+
"allOf": [
|
|
12254
|
+
{
|
|
12255
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12256
|
+
},
|
|
12257
|
+
{
|
|
12258
|
+
"type": "object",
|
|
12259
|
+
"properties": {
|
|
12260
|
+
"error_code": {
|
|
12261
|
+
"type": "string",
|
|
12262
|
+
"enum": [
|
|
12263
|
+
"account_not_found"
|
|
12264
|
+
]
|
|
12265
|
+
}
|
|
12266
|
+
}
|
|
12267
|
+
}
|
|
12268
|
+
]
|
|
12269
|
+
}
|
|
12270
|
+
}
|
|
12271
|
+
}
|
|
12272
|
+
},
|
|
12273
|
+
"429": {
|
|
12274
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
12275
|
+
"content": {
|
|
12276
|
+
"application/json": {
|
|
12277
|
+
"schema": {
|
|
12278
|
+
"allOf": [
|
|
12279
|
+
{
|
|
12280
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12281
|
+
},
|
|
12282
|
+
{
|
|
12283
|
+
"type": "object",
|
|
12284
|
+
"properties": {
|
|
12285
|
+
"error_code": {
|
|
12286
|
+
"type": "string",
|
|
12287
|
+
"enum": [
|
|
12288
|
+
"too_many_requests"
|
|
12289
|
+
]
|
|
12290
|
+
}
|
|
12291
|
+
}
|
|
12292
|
+
}
|
|
12293
|
+
]
|
|
12294
|
+
}
|
|
12295
|
+
}
|
|
12296
|
+
}
|
|
12297
|
+
},
|
|
12298
|
+
"500": {
|
|
12299
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
12300
|
+
"content": {
|
|
12301
|
+
"application/json": {
|
|
12302
|
+
"schema": {
|
|
12303
|
+
"allOf": [
|
|
12304
|
+
{
|
|
12305
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12306
|
+
},
|
|
12307
|
+
{
|
|
12308
|
+
"type": "object",
|
|
12309
|
+
"properties": {
|
|
12310
|
+
"error_code": {
|
|
12311
|
+
"type": "string",
|
|
12312
|
+
"enum": [
|
|
12313
|
+
"internal_error"
|
|
12314
|
+
]
|
|
12315
|
+
}
|
|
12316
|
+
}
|
|
12317
|
+
}
|
|
12318
|
+
]
|
|
12319
|
+
}
|
|
12320
|
+
}
|
|
12321
|
+
}
|
|
12322
|
+
}
|
|
12323
|
+
}
|
|
12324
|
+
}
|
|
12325
|
+
},
|
|
11876
12326
|
"/account/{account_id}/transfer": {
|
|
11877
12327
|
"post": {
|
|
11878
12328
|
"operationId": "account/transfer",
|