@faable/auth-sdk 2.7.42 → 2.7.43
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 +22 -0
- package/dist/api/generated-client.js +19 -0
- package/dist/api/types.d.ts +130 -0
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +231 -1
|
@@ -2862,6 +2862,28 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2862
2862
|
sent: number;
|
|
2863
2863
|
}[];
|
|
2864
2864
|
}>;
|
|
2865
|
+
/**
|
|
2866
|
+
* `GET /internal/usage/sms/range` — operationId: `internal/smsUsageRange`
|
|
2867
|
+
*
|
|
2868
|
+
* SMS a project sent in a time range (platform)
|
|
2869
|
+
*
|
|
2870
|
+
* Sum of the hourly counters of SMS and WhatsApp messages one project handed to the provider between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
2871
|
+
*
|
|
2872
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2873
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2874
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2875
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2876
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2877
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2878
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2879
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2880
|
+
*/
|
|
2881
|
+
internalSmsUsageRange(params?: OpQuery<"internal/smsUsageRange">): Promise<{
|
|
2882
|
+
team: string;
|
|
2883
|
+
from: string;
|
|
2884
|
+
to: string;
|
|
2885
|
+
sent: number;
|
|
2886
|
+
}>;
|
|
2865
2887
|
/**
|
|
2866
2888
|
* `GET /log/{log_id}` — operationId: `log/get`
|
|
2867
2889
|
*
|
|
@@ -1062,6 +1062,25 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1062
1062
|
internalSmsUsage(params) {
|
|
1063
1063
|
return this.fetcher.request({ method: "GET", url: `/internal/usage/sms`, params });
|
|
1064
1064
|
}
|
|
1065
|
+
/**
|
|
1066
|
+
* `GET /internal/usage/sms/range` — operationId: `internal/smsUsageRange`
|
|
1067
|
+
*
|
|
1068
|
+
* SMS a project sent in a time range (platform)
|
|
1069
|
+
*
|
|
1070
|
+
* Sum of the hourly counters of SMS and WhatsApp messages one project handed to the provider between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
1071
|
+
*
|
|
1072
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1073
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1074
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1075
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1076
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1077
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1078
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1079
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1080
|
+
*/
|
|
1081
|
+
internalSmsUsageRange(params) {
|
|
1082
|
+
return this.fetcher.request({ method: "GET", url: `/internal/usage/sms/range`, params });
|
|
1083
|
+
}
|
|
1065
1084
|
/**
|
|
1066
1085
|
* `GET /log/{log_id}` — operationId: `log/get`
|
|
1067
1086
|
*
|
package/dist/api/types.d.ts
CHANGED
|
@@ -224,6 +224,26 @@ export interface paths {
|
|
|
224
224
|
patch?: never;
|
|
225
225
|
trace?: never;
|
|
226
226
|
};
|
|
227
|
+
"/internal/usage/sms/range": {
|
|
228
|
+
parameters: {
|
|
229
|
+
query?: never;
|
|
230
|
+
header?: never;
|
|
231
|
+
path?: never;
|
|
232
|
+
cookie?: never;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* SMS a project sent in a time range (platform)
|
|
236
|
+
* @description Sum of the hourly counters of SMS and WhatsApp messages one project handed to the provider between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.
|
|
237
|
+
*/
|
|
238
|
+
get: operations["internal/smsUsageRange"];
|
|
239
|
+
put?: never;
|
|
240
|
+
post?: never;
|
|
241
|
+
delete?: never;
|
|
242
|
+
options?: never;
|
|
243
|
+
head?: never;
|
|
244
|
+
patch?: never;
|
|
245
|
+
trace?: never;
|
|
246
|
+
};
|
|
227
247
|
"/internal/usage/m2m": {
|
|
228
248
|
parameters: {
|
|
229
249
|
query?: never;
|
|
@@ -8285,6 +8305,116 @@ export interface operations {
|
|
|
8285
8305
|
};
|
|
8286
8306
|
};
|
|
8287
8307
|
};
|
|
8308
|
+
"internal/smsUsageRange": {
|
|
8309
|
+
parameters: {
|
|
8310
|
+
query: {
|
|
8311
|
+
/** @description The project to read, as `team_<hex>`. */
|
|
8312
|
+
team: string;
|
|
8313
|
+
/** @description Start of the range — the subscription period start. Counted from the first full hour after it. */
|
|
8314
|
+
from: string;
|
|
8315
|
+
/** @description End of the range. Defaults to now. */
|
|
8316
|
+
to?: string;
|
|
8317
|
+
};
|
|
8318
|
+
header?: never;
|
|
8319
|
+
path?: never;
|
|
8320
|
+
cookie?: never;
|
|
8321
|
+
};
|
|
8322
|
+
requestBody?: never;
|
|
8323
|
+
responses: {
|
|
8324
|
+
/** @description Default Response */
|
|
8325
|
+
200: {
|
|
8326
|
+
headers: {
|
|
8327
|
+
[name: string]: unknown;
|
|
8328
|
+
};
|
|
8329
|
+
content: {
|
|
8330
|
+
"application/json": {
|
|
8331
|
+
team: string;
|
|
8332
|
+
from: string;
|
|
8333
|
+
to: string;
|
|
8334
|
+
sent: number;
|
|
8335
|
+
};
|
|
8336
|
+
};
|
|
8337
|
+
};
|
|
8338
|
+
/** @description `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field. */
|
|
8339
|
+
400: {
|
|
8340
|
+
headers: {
|
|
8341
|
+
[name: string]: unknown;
|
|
8342
|
+
};
|
|
8343
|
+
content: {
|
|
8344
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8345
|
+
/** @enum {string} */
|
|
8346
|
+
error_code?: "validation_error";
|
|
8347
|
+
};
|
|
8348
|
+
};
|
|
8349
|
+
};
|
|
8350
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
8351
|
+
401: {
|
|
8352
|
+
headers: {
|
|
8353
|
+
[name: string]: unknown;
|
|
8354
|
+
};
|
|
8355
|
+
content: {
|
|
8356
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8357
|
+
/** @enum {string} */
|
|
8358
|
+
error_code?: "unauthorized";
|
|
8359
|
+
};
|
|
8360
|
+
};
|
|
8361
|
+
};
|
|
8362
|
+
/**
|
|
8363
|
+
* @description `forbidden` — The credentials are valid but do not allow this operation.
|
|
8364
|
+
*
|
|
8365
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
8366
|
+
*
|
|
8367
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
8368
|
+
*/
|
|
8369
|
+
403: {
|
|
8370
|
+
headers: {
|
|
8371
|
+
[name: string]: unknown;
|
|
8372
|
+
};
|
|
8373
|
+
content: {
|
|
8374
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8375
|
+
/** @enum {string} */
|
|
8376
|
+
error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
|
|
8377
|
+
};
|
|
8378
|
+
};
|
|
8379
|
+
};
|
|
8380
|
+
/** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
|
|
8381
|
+
404: {
|
|
8382
|
+
headers: {
|
|
8383
|
+
[name: string]: unknown;
|
|
8384
|
+
};
|
|
8385
|
+
content: {
|
|
8386
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8387
|
+
/** @enum {string} */
|
|
8388
|
+
error_code?: "account_not_found";
|
|
8389
|
+
};
|
|
8390
|
+
};
|
|
8391
|
+
};
|
|
8392
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
8393
|
+
429: {
|
|
8394
|
+
headers: {
|
|
8395
|
+
[name: string]: unknown;
|
|
8396
|
+
};
|
|
8397
|
+
content: {
|
|
8398
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8399
|
+
/** @enum {string} */
|
|
8400
|
+
error_code?: "too_many_requests";
|
|
8401
|
+
};
|
|
8402
|
+
};
|
|
8403
|
+
};
|
|
8404
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
8405
|
+
500: {
|
|
8406
|
+
headers: {
|
|
8407
|
+
[name: string]: unknown;
|
|
8408
|
+
};
|
|
8409
|
+
content: {
|
|
8410
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
8411
|
+
/** @enum {string} */
|
|
8412
|
+
error_code?: "internal_error";
|
|
8413
|
+
};
|
|
8414
|
+
};
|
|
8415
|
+
};
|
|
8416
|
+
};
|
|
8417
|
+
};
|
|
8288
8418
|
"internal/m2mUsage": {
|
|
8289
8419
|
parameters: {
|
|
8290
8420
|
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.43";
|
|
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 = "c6f16f9";
|
|
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.43.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -12202,6 +12202,236 @@
|
|
|
12202
12202
|
}
|
|
12203
12203
|
}
|
|
12204
12204
|
},
|
|
12205
|
+
"/internal/usage/sms/range": {
|
|
12206
|
+
"get": {
|
|
12207
|
+
"operationId": "internal/smsUsageRange",
|
|
12208
|
+
"summary": "SMS a project sent in a time range (platform)",
|
|
12209
|
+
"tags": [
|
|
12210
|
+
"account"
|
|
12211
|
+
],
|
|
12212
|
+
"description": "Sum of the hourly counters of SMS and WhatsApp messages one project handed to the provider between `from` (first full hour after it) and `to`. At most 40 days back. Platform token with `read:usage`.",
|
|
12213
|
+
"parameters": [
|
|
12214
|
+
{
|
|
12215
|
+
"schema": {
|
|
12216
|
+
"type": "string"
|
|
12217
|
+
},
|
|
12218
|
+
"in": "query",
|
|
12219
|
+
"name": "team",
|
|
12220
|
+
"required": true,
|
|
12221
|
+
"description": "The project to read, as `team_<hex>`."
|
|
12222
|
+
},
|
|
12223
|
+
{
|
|
12224
|
+
"schema": {
|
|
12225
|
+
"type": "string",
|
|
12226
|
+
"format": "date-time"
|
|
12227
|
+
},
|
|
12228
|
+
"in": "query",
|
|
12229
|
+
"name": "from",
|
|
12230
|
+
"required": true,
|
|
12231
|
+
"description": "Start of the range — the subscription period start. Counted from the first full hour after it."
|
|
12232
|
+
},
|
|
12233
|
+
{
|
|
12234
|
+
"schema": {
|
|
12235
|
+
"type": "string",
|
|
12236
|
+
"format": "date-time"
|
|
12237
|
+
},
|
|
12238
|
+
"in": "query",
|
|
12239
|
+
"name": "to",
|
|
12240
|
+
"required": false,
|
|
12241
|
+
"description": "End of the range. Defaults to now."
|
|
12242
|
+
}
|
|
12243
|
+
],
|
|
12244
|
+
"security": [
|
|
12245
|
+
{
|
|
12246
|
+
"bearerAuth": []
|
|
12247
|
+
}
|
|
12248
|
+
],
|
|
12249
|
+
"responses": {
|
|
12250
|
+
"200": {
|
|
12251
|
+
"description": "Default Response",
|
|
12252
|
+
"content": {
|
|
12253
|
+
"application/json": {
|
|
12254
|
+
"schema": {
|
|
12255
|
+
"type": "object",
|
|
12256
|
+
"required": [
|
|
12257
|
+
"team",
|
|
12258
|
+
"from",
|
|
12259
|
+
"to",
|
|
12260
|
+
"sent"
|
|
12261
|
+
],
|
|
12262
|
+
"properties": {
|
|
12263
|
+
"team": {
|
|
12264
|
+
"type": "string"
|
|
12265
|
+
},
|
|
12266
|
+
"from": {
|
|
12267
|
+
"type": "string"
|
|
12268
|
+
},
|
|
12269
|
+
"to": {
|
|
12270
|
+
"type": "string"
|
|
12271
|
+
},
|
|
12272
|
+
"sent": {
|
|
12273
|
+
"type": "integer"
|
|
12274
|
+
}
|
|
12275
|
+
}
|
|
12276
|
+
}
|
|
12277
|
+
}
|
|
12278
|
+
}
|
|
12279
|
+
},
|
|
12280
|
+
"400": {
|
|
12281
|
+
"description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
|
|
12282
|
+
"content": {
|
|
12283
|
+
"application/json": {
|
|
12284
|
+
"schema": {
|
|
12285
|
+
"allOf": [
|
|
12286
|
+
{
|
|
12287
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12288
|
+
},
|
|
12289
|
+
{
|
|
12290
|
+
"type": "object",
|
|
12291
|
+
"properties": {
|
|
12292
|
+
"error_code": {
|
|
12293
|
+
"type": "string",
|
|
12294
|
+
"enum": [
|
|
12295
|
+
"validation_error"
|
|
12296
|
+
]
|
|
12297
|
+
}
|
|
12298
|
+
}
|
|
12299
|
+
}
|
|
12300
|
+
]
|
|
12301
|
+
}
|
|
12302
|
+
}
|
|
12303
|
+
}
|
|
12304
|
+
},
|
|
12305
|
+
"401": {
|
|
12306
|
+
"description": "`unauthorized` — The request carries no valid credentials.",
|
|
12307
|
+
"content": {
|
|
12308
|
+
"application/json": {
|
|
12309
|
+
"schema": {
|
|
12310
|
+
"allOf": [
|
|
12311
|
+
{
|
|
12312
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12313
|
+
},
|
|
12314
|
+
{
|
|
12315
|
+
"type": "object",
|
|
12316
|
+
"properties": {
|
|
12317
|
+
"error_code": {
|
|
12318
|
+
"type": "string",
|
|
12319
|
+
"enum": [
|
|
12320
|
+
"unauthorized"
|
|
12321
|
+
]
|
|
12322
|
+
}
|
|
12323
|
+
}
|
|
12324
|
+
}
|
|
12325
|
+
]
|
|
12326
|
+
}
|
|
12327
|
+
}
|
|
12328
|
+
}
|
|
12329
|
+
},
|
|
12330
|
+
"403": {
|
|
12331
|
+
"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.",
|
|
12332
|
+
"content": {
|
|
12333
|
+
"application/json": {
|
|
12334
|
+
"schema": {
|
|
12335
|
+
"allOf": [
|
|
12336
|
+
{
|
|
12337
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12338
|
+
},
|
|
12339
|
+
{
|
|
12340
|
+
"type": "object",
|
|
12341
|
+
"properties": {
|
|
12342
|
+
"error_code": {
|
|
12343
|
+
"type": "string",
|
|
12344
|
+
"enum": [
|
|
12345
|
+
"forbidden",
|
|
12346
|
+
"insufficient_scope",
|
|
12347
|
+
"user_suspended"
|
|
12348
|
+
]
|
|
12349
|
+
}
|
|
12350
|
+
}
|
|
12351
|
+
}
|
|
12352
|
+
]
|
|
12353
|
+
}
|
|
12354
|
+
}
|
|
12355
|
+
}
|
|
12356
|
+
},
|
|
12357
|
+
"404": {
|
|
12358
|
+
"description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
|
|
12359
|
+
"content": {
|
|
12360
|
+
"application/json": {
|
|
12361
|
+
"schema": {
|
|
12362
|
+
"allOf": [
|
|
12363
|
+
{
|
|
12364
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12365
|
+
},
|
|
12366
|
+
{
|
|
12367
|
+
"type": "object",
|
|
12368
|
+
"properties": {
|
|
12369
|
+
"error_code": {
|
|
12370
|
+
"type": "string",
|
|
12371
|
+
"enum": [
|
|
12372
|
+
"account_not_found"
|
|
12373
|
+
]
|
|
12374
|
+
}
|
|
12375
|
+
}
|
|
12376
|
+
}
|
|
12377
|
+
]
|
|
12378
|
+
}
|
|
12379
|
+
}
|
|
12380
|
+
}
|
|
12381
|
+
},
|
|
12382
|
+
"429": {
|
|
12383
|
+
"description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
|
|
12384
|
+
"content": {
|
|
12385
|
+
"application/json": {
|
|
12386
|
+
"schema": {
|
|
12387
|
+
"allOf": [
|
|
12388
|
+
{
|
|
12389
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12390
|
+
},
|
|
12391
|
+
{
|
|
12392
|
+
"type": "object",
|
|
12393
|
+
"properties": {
|
|
12394
|
+
"error_code": {
|
|
12395
|
+
"type": "string",
|
|
12396
|
+
"enum": [
|
|
12397
|
+
"too_many_requests"
|
|
12398
|
+
]
|
|
12399
|
+
}
|
|
12400
|
+
}
|
|
12401
|
+
}
|
|
12402
|
+
]
|
|
12403
|
+
}
|
|
12404
|
+
}
|
|
12405
|
+
}
|
|
12406
|
+
},
|
|
12407
|
+
"500": {
|
|
12408
|
+
"description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
|
|
12409
|
+
"content": {
|
|
12410
|
+
"application/json": {
|
|
12411
|
+
"schema": {
|
|
12412
|
+
"allOf": [
|
|
12413
|
+
{
|
|
12414
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
12415
|
+
},
|
|
12416
|
+
{
|
|
12417
|
+
"type": "object",
|
|
12418
|
+
"properties": {
|
|
12419
|
+
"error_code": {
|
|
12420
|
+
"type": "string",
|
|
12421
|
+
"enum": [
|
|
12422
|
+
"internal_error"
|
|
12423
|
+
]
|
|
12424
|
+
}
|
|
12425
|
+
}
|
|
12426
|
+
}
|
|
12427
|
+
]
|
|
12428
|
+
}
|
|
12429
|
+
}
|
|
12430
|
+
}
|
|
12431
|
+
}
|
|
12432
|
+
}
|
|
12433
|
+
}
|
|
12434
|
+
},
|
|
12205
12435
|
"/internal/usage/m2m": {
|
|
12206
12436
|
"get": {
|
|
12207
12437
|
"operationId": "internal/m2mUsage",
|