@faable/auth-sdk 2.6.17 → 2.6.19
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 +13 -0
- package/dist/api/generated-client.js +8 -0
- package/dist/api/types.d.ts +185 -0
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +234 -1
|
@@ -2165,6 +2165,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2165
2165
|
updatedAt?: string | undefined;
|
|
2166
2166
|
}>>;
|
|
2167
2167
|
};
|
|
2168
|
+
/**
|
|
2169
|
+
* `GET /internal/usage/sms` — operationId: `internal/smsUsage`
|
|
2170
|
+
*
|
|
2171
|
+
* SMS sent per tenant in a month (platform)
|
|
2172
|
+
*/
|
|
2173
|
+
internalSmsUsage(params?: OpQuery<"internal/smsUsage">): Promise<{
|
|
2174
|
+
month: string;
|
|
2175
|
+
rows: {
|
|
2176
|
+
account_id: string;
|
|
2177
|
+
team: string | null;
|
|
2178
|
+
sent: number;
|
|
2179
|
+
}[];
|
|
2180
|
+
}>;
|
|
2168
2181
|
/**
|
|
2169
2182
|
* `GET /log/{log_id}` — operationId: `log/get`
|
|
2170
2183
|
*
|
|
@@ -412,6 +412,14 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
412
412
|
identityList(params) {
|
|
413
413
|
return this.paginator({ url: `/identity`, params });
|
|
414
414
|
}
|
|
415
|
+
/**
|
|
416
|
+
* `GET /internal/usage/sms` — operationId: `internal/smsUsage`
|
|
417
|
+
*
|
|
418
|
+
* SMS sent per tenant in a month (platform)
|
|
419
|
+
*/
|
|
420
|
+
internalSmsUsage(params) {
|
|
421
|
+
return this.fetcher.request({ method: "GET", url: `/internal/usage/sms`, params });
|
|
422
|
+
}
|
|
415
423
|
/**
|
|
416
424
|
* `GET /log/{log_id}` — operationId: `log/get`
|
|
417
425
|
*
|
package/dist/api/types.d.ts
CHANGED
|
@@ -148,6 +148,26 @@ export interface paths {
|
|
|
148
148
|
patch?: never;
|
|
149
149
|
trace?: never;
|
|
150
150
|
};
|
|
151
|
+
"/internal/usage/sms": {
|
|
152
|
+
parameters: {
|
|
153
|
+
query?: never;
|
|
154
|
+
header?: never;
|
|
155
|
+
path?: never;
|
|
156
|
+
cookie?: never;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* SMS sent per tenant in a month (platform)
|
|
160
|
+
* @description Per-account count of recovery/verification SMS sent in the given month, read from the monthly quota counters. Consumed by the billing usage job. Platform token with `read:usage`.
|
|
161
|
+
*/
|
|
162
|
+
get: operations["internal/smsUsage"];
|
|
163
|
+
put?: never;
|
|
164
|
+
post?: never;
|
|
165
|
+
delete?: never;
|
|
166
|
+
options?: never;
|
|
167
|
+
head?: never;
|
|
168
|
+
patch?: never;
|
|
169
|
+
trace?: never;
|
|
170
|
+
};
|
|
151
171
|
"/connection": {
|
|
152
172
|
parameters: {
|
|
153
173
|
query?: never;
|
|
@@ -2365,6 +2385,141 @@ export interface paths {
|
|
|
2365
2385
|
patch?: never;
|
|
2366
2386
|
trace?: never;
|
|
2367
2387
|
};
|
|
2388
|
+
"/mfa/recovery/options": {
|
|
2389
|
+
parameters: {
|
|
2390
|
+
query?: never;
|
|
2391
|
+
header?: never;
|
|
2392
|
+
path?: never;
|
|
2393
|
+
cookie?: never;
|
|
2394
|
+
};
|
|
2395
|
+
/** What a recovery-by-factor screen should offer */
|
|
2396
|
+
get: {
|
|
2397
|
+
parameters: {
|
|
2398
|
+
query: {
|
|
2399
|
+
state: string;
|
|
2400
|
+
};
|
|
2401
|
+
header?: never;
|
|
2402
|
+
path?: never;
|
|
2403
|
+
cookie?: never;
|
|
2404
|
+
};
|
|
2405
|
+
requestBody?: never;
|
|
2406
|
+
responses: {
|
|
2407
|
+
/** @description Default Response */
|
|
2408
|
+
200: {
|
|
2409
|
+
headers: {
|
|
2410
|
+
[name: string]: unknown;
|
|
2411
|
+
};
|
|
2412
|
+
content: {
|
|
2413
|
+
"application/json": {
|
|
2414
|
+
/** @description Factors the person can answer with here. Passkeys are not offered for recovery yet: their assertion flow is bound to the login session. */
|
|
2415
|
+
factors: "totp"[];
|
|
2416
|
+
/** @enum {string} */
|
|
2417
|
+
preferred?: "totp";
|
|
2418
|
+
/** @description Whether they hold recovery codes. */
|
|
2419
|
+
recovery: boolean;
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
};
|
|
2425
|
+
put?: never;
|
|
2426
|
+
post?: never;
|
|
2427
|
+
delete?: never;
|
|
2428
|
+
options?: never;
|
|
2429
|
+
head?: never;
|
|
2430
|
+
patch?: never;
|
|
2431
|
+
trace?: never;
|
|
2432
|
+
};
|
|
2433
|
+
"/mfa/recovery/verify": {
|
|
2434
|
+
parameters: {
|
|
2435
|
+
query?: never;
|
|
2436
|
+
header?: never;
|
|
2437
|
+
path?: never;
|
|
2438
|
+
cookie?: never;
|
|
2439
|
+
};
|
|
2440
|
+
get?: never;
|
|
2441
|
+
put?: never;
|
|
2442
|
+
/** Answer a recovery-by-factor challenge with a TOTP code */
|
|
2443
|
+
post: {
|
|
2444
|
+
parameters: {
|
|
2445
|
+
query?: never;
|
|
2446
|
+
header?: never;
|
|
2447
|
+
path?: never;
|
|
2448
|
+
cookie?: never;
|
|
2449
|
+
};
|
|
2450
|
+
requestBody: {
|
|
2451
|
+
content: {
|
|
2452
|
+
"application/json": {
|
|
2453
|
+
state: string;
|
|
2454
|
+
code: string;
|
|
2455
|
+
};
|
|
2456
|
+
};
|
|
2457
|
+
};
|
|
2458
|
+
responses: {
|
|
2459
|
+
/** @description Default Response */
|
|
2460
|
+
200: {
|
|
2461
|
+
headers: {
|
|
2462
|
+
[name: string]: unknown;
|
|
2463
|
+
};
|
|
2464
|
+
content: {
|
|
2465
|
+
"application/json": {
|
|
2466
|
+
redirect_url: string;
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
};
|
|
2470
|
+
};
|
|
2471
|
+
};
|
|
2472
|
+
delete?: never;
|
|
2473
|
+
options?: never;
|
|
2474
|
+
head?: never;
|
|
2475
|
+
patch?: never;
|
|
2476
|
+
trace?: never;
|
|
2477
|
+
};
|
|
2478
|
+
"/mfa/recovery/code": {
|
|
2479
|
+
parameters: {
|
|
2480
|
+
query?: never;
|
|
2481
|
+
header?: never;
|
|
2482
|
+
path?: never;
|
|
2483
|
+
cookie?: never;
|
|
2484
|
+
};
|
|
2485
|
+
get?: never;
|
|
2486
|
+
put?: never;
|
|
2487
|
+
/** Answer a recovery-by-factor challenge with a recovery code */
|
|
2488
|
+
post: {
|
|
2489
|
+
parameters: {
|
|
2490
|
+
query?: never;
|
|
2491
|
+
header?: never;
|
|
2492
|
+
path?: never;
|
|
2493
|
+
cookie?: never;
|
|
2494
|
+
};
|
|
2495
|
+
requestBody: {
|
|
2496
|
+
content: {
|
|
2497
|
+
"application/json": {
|
|
2498
|
+
state: string;
|
|
2499
|
+
code: string;
|
|
2500
|
+
};
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2503
|
+
responses: {
|
|
2504
|
+
/** @description Default Response */
|
|
2505
|
+
200: {
|
|
2506
|
+
headers: {
|
|
2507
|
+
[name: string]: unknown;
|
|
2508
|
+
};
|
|
2509
|
+
content: {
|
|
2510
|
+
"application/json": {
|
|
2511
|
+
redirect_url: string;
|
|
2512
|
+
};
|
|
2513
|
+
};
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
};
|
|
2517
|
+
delete?: never;
|
|
2518
|
+
options?: never;
|
|
2519
|
+
head?: never;
|
|
2520
|
+
patch?: never;
|
|
2521
|
+
trace?: never;
|
|
2522
|
+
};
|
|
2368
2523
|
"/me": {
|
|
2369
2524
|
parameters: {
|
|
2370
2525
|
query?: never;
|
|
@@ -5775,6 +5930,36 @@ export interface operations {
|
|
|
5775
5930
|
};
|
|
5776
5931
|
};
|
|
5777
5932
|
};
|
|
5933
|
+
"internal/smsUsage": {
|
|
5934
|
+
parameters: {
|
|
5935
|
+
query: {
|
|
5936
|
+
/** @description YYYY-MM, UTC. Defaults to the current month. */
|
|
5937
|
+
month: string;
|
|
5938
|
+
};
|
|
5939
|
+
header?: never;
|
|
5940
|
+
path?: never;
|
|
5941
|
+
cookie?: never;
|
|
5942
|
+
};
|
|
5943
|
+
requestBody?: never;
|
|
5944
|
+
responses: {
|
|
5945
|
+
/** @description Default Response */
|
|
5946
|
+
200: {
|
|
5947
|
+
headers: {
|
|
5948
|
+
[name: string]: unknown;
|
|
5949
|
+
};
|
|
5950
|
+
content: {
|
|
5951
|
+
"application/json": {
|
|
5952
|
+
month: string;
|
|
5953
|
+
rows: {
|
|
5954
|
+
account_id: string;
|
|
5955
|
+
team: string | null;
|
|
5956
|
+
sent: number;
|
|
5957
|
+
}[];
|
|
5958
|
+
};
|
|
5959
|
+
};
|
|
5960
|
+
};
|
|
5961
|
+
};
|
|
5962
|
+
};
|
|
5778
5963
|
"connection/list": {
|
|
5779
5964
|
parameters: {
|
|
5780
5965
|
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.6.
|
|
12
|
+
export const version = "2.6.19";
|
|
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 = "c0ff254";
|
|
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.20.0",
|
|
7
7
|
"license": {
|
|
8
8
|
"name": "private",
|
|
9
9
|
"url": "https://faable.com/docs/platform/privacy-policy"
|
|
@@ -10158,6 +10158,83 @@
|
|
|
10158
10158
|
}
|
|
10159
10159
|
}
|
|
10160
10160
|
},
|
|
10161
|
+
"/internal/usage/sms": {
|
|
10162
|
+
"get": {
|
|
10163
|
+
"operationId": "internal/smsUsage",
|
|
10164
|
+
"summary": "SMS sent per tenant in a month (platform)",
|
|
10165
|
+
"tags": [
|
|
10166
|
+
"account"
|
|
10167
|
+
],
|
|
10168
|
+
"description": "Per-account count of recovery/verification SMS sent in the given month, read from the monthly quota counters. Consumed by the billing usage job. Platform token with `read:usage`.",
|
|
10169
|
+
"parameters": [
|
|
10170
|
+
{
|
|
10171
|
+
"schema": {
|
|
10172
|
+
"type": "string",
|
|
10173
|
+
"pattern": "^\\d{4}-\\d{2}$"
|
|
10174
|
+
},
|
|
10175
|
+
"in": "query",
|
|
10176
|
+
"name": "month",
|
|
10177
|
+
"required": true,
|
|
10178
|
+
"description": "YYYY-MM, UTC. Defaults to the current month."
|
|
10179
|
+
}
|
|
10180
|
+
],
|
|
10181
|
+
"security": [
|
|
10182
|
+
{
|
|
10183
|
+
"bearerAuth": []
|
|
10184
|
+
}
|
|
10185
|
+
],
|
|
10186
|
+
"responses": {
|
|
10187
|
+
"200": {
|
|
10188
|
+
"description": "Default Response",
|
|
10189
|
+
"content": {
|
|
10190
|
+
"application/json": {
|
|
10191
|
+
"schema": {
|
|
10192
|
+
"type": "object",
|
|
10193
|
+
"required": [
|
|
10194
|
+
"month",
|
|
10195
|
+
"rows"
|
|
10196
|
+
],
|
|
10197
|
+
"properties": {
|
|
10198
|
+
"month": {
|
|
10199
|
+
"type": "string"
|
|
10200
|
+
},
|
|
10201
|
+
"rows": {
|
|
10202
|
+
"type": "array",
|
|
10203
|
+
"items": {
|
|
10204
|
+
"type": "object",
|
|
10205
|
+
"required": [
|
|
10206
|
+
"account_id",
|
|
10207
|
+
"team",
|
|
10208
|
+
"sent"
|
|
10209
|
+
],
|
|
10210
|
+
"properties": {
|
|
10211
|
+
"account_id": {
|
|
10212
|
+
"type": "string"
|
|
10213
|
+
},
|
|
10214
|
+
"team": {
|
|
10215
|
+
"anyOf": [
|
|
10216
|
+
{
|
|
10217
|
+
"type": "string"
|
|
10218
|
+
},
|
|
10219
|
+
{
|
|
10220
|
+
"type": "null"
|
|
10221
|
+
}
|
|
10222
|
+
]
|
|
10223
|
+
},
|
|
10224
|
+
"sent": {
|
|
10225
|
+
"type": "integer"
|
|
10226
|
+
}
|
|
10227
|
+
}
|
|
10228
|
+
}
|
|
10229
|
+
}
|
|
10230
|
+
}
|
|
10231
|
+
}
|
|
10232
|
+
}
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
}
|
|
10236
|
+
}
|
|
10237
|
+
},
|
|
10161
10238
|
"/connection": {
|
|
10162
10239
|
"get": {
|
|
10163
10240
|
"operationId": "connection/list",
|
|
@@ -31746,6 +31823,162 @@
|
|
|
31746
31823
|
}
|
|
31747
31824
|
}
|
|
31748
31825
|
},
|
|
31826
|
+
"/mfa/recovery/options": {
|
|
31827
|
+
"get": {
|
|
31828
|
+
"summary": "What a recovery-by-factor screen should offer",
|
|
31829
|
+
"tags": [
|
|
31830
|
+
"mfa"
|
|
31831
|
+
],
|
|
31832
|
+
"parameters": [
|
|
31833
|
+
{
|
|
31834
|
+
"schema": {
|
|
31835
|
+
"type": "string"
|
|
31836
|
+
},
|
|
31837
|
+
"in": "query",
|
|
31838
|
+
"name": "state",
|
|
31839
|
+
"required": true
|
|
31840
|
+
}
|
|
31841
|
+
],
|
|
31842
|
+
"responses": {
|
|
31843
|
+
"200": {
|
|
31844
|
+
"description": "Default Response",
|
|
31845
|
+
"content": {
|
|
31846
|
+
"application/json": {
|
|
31847
|
+
"schema": {
|
|
31848
|
+
"type": "object",
|
|
31849
|
+
"required": [
|
|
31850
|
+
"factors",
|
|
31851
|
+
"recovery"
|
|
31852
|
+
],
|
|
31853
|
+
"properties": {
|
|
31854
|
+
"factors": {
|
|
31855
|
+
"type": "array",
|
|
31856
|
+
"items": {
|
|
31857
|
+
"type": "string",
|
|
31858
|
+
"enum": [
|
|
31859
|
+
"totp"
|
|
31860
|
+
]
|
|
31861
|
+
},
|
|
31862
|
+
"description": "Factors the person can answer with here. Passkeys are not offered for recovery yet: their assertion flow is bound to the login session."
|
|
31863
|
+
},
|
|
31864
|
+
"preferred": {
|
|
31865
|
+
"type": "string",
|
|
31866
|
+
"enum": [
|
|
31867
|
+
"totp"
|
|
31868
|
+
]
|
|
31869
|
+
},
|
|
31870
|
+
"recovery": {
|
|
31871
|
+
"type": "boolean",
|
|
31872
|
+
"description": "Whether they hold recovery codes."
|
|
31873
|
+
}
|
|
31874
|
+
}
|
|
31875
|
+
}
|
|
31876
|
+
}
|
|
31877
|
+
}
|
|
31878
|
+
}
|
|
31879
|
+
}
|
|
31880
|
+
}
|
|
31881
|
+
},
|
|
31882
|
+
"/mfa/recovery/verify": {
|
|
31883
|
+
"post": {
|
|
31884
|
+
"summary": "Answer a recovery-by-factor challenge with a TOTP code",
|
|
31885
|
+
"tags": [
|
|
31886
|
+
"mfa"
|
|
31887
|
+
],
|
|
31888
|
+
"requestBody": {
|
|
31889
|
+
"required": true,
|
|
31890
|
+
"content": {
|
|
31891
|
+
"application/json": {
|
|
31892
|
+
"schema": {
|
|
31893
|
+
"type": "object",
|
|
31894
|
+
"required": [
|
|
31895
|
+
"state",
|
|
31896
|
+
"code"
|
|
31897
|
+
],
|
|
31898
|
+
"properties": {
|
|
31899
|
+
"state": {
|
|
31900
|
+
"type": "string"
|
|
31901
|
+
},
|
|
31902
|
+
"code": {
|
|
31903
|
+
"type": "string"
|
|
31904
|
+
}
|
|
31905
|
+
}
|
|
31906
|
+
}
|
|
31907
|
+
}
|
|
31908
|
+
}
|
|
31909
|
+
},
|
|
31910
|
+
"responses": {
|
|
31911
|
+
"200": {
|
|
31912
|
+
"description": "Default Response",
|
|
31913
|
+
"content": {
|
|
31914
|
+
"application/json": {
|
|
31915
|
+
"schema": {
|
|
31916
|
+
"type": "object",
|
|
31917
|
+
"required": [
|
|
31918
|
+
"redirect_url"
|
|
31919
|
+
],
|
|
31920
|
+
"properties": {
|
|
31921
|
+
"redirect_url": {
|
|
31922
|
+
"type": "string"
|
|
31923
|
+
}
|
|
31924
|
+
}
|
|
31925
|
+
}
|
|
31926
|
+
}
|
|
31927
|
+
}
|
|
31928
|
+
}
|
|
31929
|
+
}
|
|
31930
|
+
}
|
|
31931
|
+
},
|
|
31932
|
+
"/mfa/recovery/code": {
|
|
31933
|
+
"post": {
|
|
31934
|
+
"summary": "Answer a recovery-by-factor challenge with a recovery code",
|
|
31935
|
+
"tags": [
|
|
31936
|
+
"mfa"
|
|
31937
|
+
],
|
|
31938
|
+
"requestBody": {
|
|
31939
|
+
"required": true,
|
|
31940
|
+
"content": {
|
|
31941
|
+
"application/json": {
|
|
31942
|
+
"schema": {
|
|
31943
|
+
"type": "object",
|
|
31944
|
+
"required": [
|
|
31945
|
+
"state",
|
|
31946
|
+
"code"
|
|
31947
|
+
],
|
|
31948
|
+
"properties": {
|
|
31949
|
+
"state": {
|
|
31950
|
+
"type": "string"
|
|
31951
|
+
},
|
|
31952
|
+
"code": {
|
|
31953
|
+
"type": "string"
|
|
31954
|
+
}
|
|
31955
|
+
}
|
|
31956
|
+
}
|
|
31957
|
+
}
|
|
31958
|
+
}
|
|
31959
|
+
},
|
|
31960
|
+
"responses": {
|
|
31961
|
+
"200": {
|
|
31962
|
+
"description": "Default Response",
|
|
31963
|
+
"content": {
|
|
31964
|
+
"application/json": {
|
|
31965
|
+
"schema": {
|
|
31966
|
+
"type": "object",
|
|
31967
|
+
"required": [
|
|
31968
|
+
"redirect_url"
|
|
31969
|
+
],
|
|
31970
|
+
"properties": {
|
|
31971
|
+
"redirect_url": {
|
|
31972
|
+
"type": "string"
|
|
31973
|
+
}
|
|
31974
|
+
}
|
|
31975
|
+
}
|
|
31976
|
+
}
|
|
31977
|
+
}
|
|
31978
|
+
}
|
|
31979
|
+
}
|
|
31980
|
+
}
|
|
31981
|
+
},
|
|
31749
31982
|
"/me": {
|
|
31750
31983
|
"get": {
|
|
31751
31984
|
"operationId": "session/me",
|