@faable/auth-sdk 2.7.103 → 2.7.104

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.
@@ -3164,6 +3164,35 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
3164
3164
  updatedAt?: string | undefined;
3165
3165
  }>>;
3166
3166
  };
3167
+ /**
3168
+ * `GET /internal/accounts` — operationId: `internal/accountsOverview`
3169
+ *
3170
+ * Every tenant with its usage counters (platform)
3171
+ *
3172
+ * All accounts on the platform, each with its users, clients, connections, last login, first end-user login and whether it has a verified custom domain. Platform token with `read:accounts`.
3173
+ *
3174
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
3175
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
3176
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
3177
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
3178
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
3179
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
3180
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
3181
+ */
3182
+ internalAccountsOverview(): Promise<{
3183
+ rows: {
3184
+ account_id: string;
3185
+ team: string | null;
3186
+ name: string;
3187
+ createdAt: string | null;
3188
+ first_login_at: string | null;
3189
+ users: number;
3190
+ last_login: string | null;
3191
+ clients: number;
3192
+ connections: number;
3193
+ custom_domain_verified: boolean;
3194
+ }[];
3195
+ }>;
3167
3196
  /**
3168
3197
  * `GET /internal/usage/m2m` — operationId: `internal/m2mUsage`
3169
3198
  *
@@ -1046,6 +1046,24 @@ export class GeneratedFaableAuthApi extends FaableApi {
1046
1046
  identityList(params) {
1047
1047
  return this.paginator({ url: `/identity`, params });
1048
1048
  }
1049
+ /**
1050
+ * `GET /internal/accounts` — operationId: `internal/accountsOverview`
1051
+ *
1052
+ * Every tenant with its usage counters (platform)
1053
+ *
1054
+ * All accounts on the platform, each with its users, clients, connections, last login, first end-user login and whether it has a verified custom domain. Platform token with `read:accounts`.
1055
+ *
1056
+ * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
1057
+ * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
1058
+ * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
1059
+ * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
1060
+ * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
1061
+ * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
1062
+ * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
1063
+ */
1064
+ internalAccountsOverview() {
1065
+ return this.fetcher.get(`/internal/accounts`);
1066
+ }
1049
1067
  /**
1050
1068
  * `GET /internal/usage/m2m` — operationId: `internal/m2mUsage`
1051
1069
  *
@@ -284,6 +284,26 @@ export interface paths {
284
284
  patch?: never;
285
285
  trace?: never;
286
286
  };
287
+ "/internal/accounts": {
288
+ parameters: {
289
+ query?: never;
290
+ header?: never;
291
+ path?: never;
292
+ cookie?: never;
293
+ };
294
+ /**
295
+ * Every tenant with its usage counters (platform)
296
+ * @description All accounts on the platform, each with its users, clients, connections, last login, first end-user login and whether it has a verified custom domain. Platform token with `read:accounts`.
297
+ */
298
+ get: operations["internal/accountsOverview"];
299
+ put?: never;
300
+ post?: never;
301
+ delete?: never;
302
+ options?: never;
303
+ head?: never;
304
+ patch?: never;
305
+ trace?: never;
306
+ };
287
307
  "/account/{account_id}/transfer": {
288
308
  parameters: {
289
309
  query?: never;
@@ -10236,6 +10256,106 @@ export interface operations {
10236
10256
  };
10237
10257
  };
10238
10258
  };
10259
+ "internal/accountsOverview": {
10260
+ parameters: {
10261
+ query?: never;
10262
+ header?: never;
10263
+ path?: never;
10264
+ cookie?: never;
10265
+ };
10266
+ requestBody?: never;
10267
+ responses: {
10268
+ /** @description Default Response */
10269
+ 200: {
10270
+ headers: {
10271
+ [name: string]: unknown;
10272
+ };
10273
+ content: {
10274
+ "application/json": {
10275
+ rows: {
10276
+ account_id: string;
10277
+ /** @description The project (`team_<hex>`), or null for a legacy account without one. */
10278
+ team: string | null;
10279
+ name: string;
10280
+ createdAt: string | null;
10281
+ first_login_at: string | null;
10282
+ users: number;
10283
+ last_login: string | null;
10284
+ clients: number;
10285
+ connections: number;
10286
+ custom_domain_verified: boolean;
10287
+ }[];
10288
+ };
10289
+ };
10290
+ };
10291
+ /** @description `unauthorized` — The request carries no valid credentials. */
10292
+ 401: {
10293
+ headers: {
10294
+ [name: string]: unknown;
10295
+ };
10296
+ content: {
10297
+ "application/json": components["schemas"]["ErrorResponse"] & {
10298
+ /** @enum {string} */
10299
+ error_code?: "unauthorized";
10300
+ };
10301
+ };
10302
+ };
10303
+ /**
10304
+ * @description `forbidden` — The credentials are valid but do not allow this operation.
10305
+ *
10306
+ * `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
10307
+ *
10308
+ * `user_suspended` — The user is suspended and cannot sign in or be modified.
10309
+ */
10310
+ 403: {
10311
+ headers: {
10312
+ [name: string]: unknown;
10313
+ };
10314
+ content: {
10315
+ "application/json": components["schemas"]["ErrorResponse"] & {
10316
+ /** @enum {string} */
10317
+ error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
10318
+ };
10319
+ };
10320
+ };
10321
+ /** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
10322
+ 404: {
10323
+ headers: {
10324
+ [name: string]: unknown;
10325
+ };
10326
+ content: {
10327
+ "application/json": components["schemas"]["ErrorResponse"] & {
10328
+ /** @enum {string} */
10329
+ error_code?: "account_not_found";
10330
+ };
10331
+ };
10332
+ };
10333
+ /** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
10334
+ 429: {
10335
+ headers: {
10336
+ [name: string]: unknown;
10337
+ };
10338
+ content: {
10339
+ "application/json": components["schemas"]["ErrorResponse"] & {
10340
+ /** @enum {string} */
10341
+ error_code?: "too_many_requests";
10342
+ };
10343
+ };
10344
+ };
10345
+ /** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
10346
+ 500: {
10347
+ headers: {
10348
+ [name: string]: unknown;
10349
+ };
10350
+ content: {
10351
+ "application/json": components["schemas"]["ErrorResponse"] & {
10352
+ /** @enum {string} */
10353
+ error_code?: "internal_error";
10354
+ };
10355
+ };
10356
+ };
10357
+ };
10358
+ };
10239
10359
  "account/transfer": {
10240
10360
  parameters: {
10241
10361
  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.103";
12
+ export const version = "2.7.104";
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 = "8dd16e6";
18
+ export const commit = "18e92bb";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.7.103",
3
+ "version": "2.7.104",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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.76.0",
6
+ "version": "2.77.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -14044,6 +14044,247 @@
14044
14044
  }
14045
14045
  }
14046
14046
  },
14047
+ "/internal/accounts": {
14048
+ "get": {
14049
+ "operationId": "internal/accountsOverview",
14050
+ "summary": "Every tenant with its usage counters (platform)",
14051
+ "tags": [
14052
+ "account"
14053
+ ],
14054
+ "description": "All accounts on the platform, each with its users, clients, connections, last login, first end-user login and whether it has a verified custom domain. Platform token with `read:accounts`.",
14055
+ "security": [
14056
+ {
14057
+ "bearerAuth": []
14058
+ }
14059
+ ],
14060
+ "responses": {
14061
+ "200": {
14062
+ "description": "Default Response",
14063
+ "content": {
14064
+ "application/json": {
14065
+ "schema": {
14066
+ "type": "object",
14067
+ "required": [
14068
+ "rows"
14069
+ ],
14070
+ "properties": {
14071
+ "rows": {
14072
+ "type": "array",
14073
+ "items": {
14074
+ "type": "object",
14075
+ "required": [
14076
+ "account_id",
14077
+ "team",
14078
+ "name",
14079
+ "createdAt",
14080
+ "first_login_at",
14081
+ "users",
14082
+ "last_login",
14083
+ "clients",
14084
+ "connections",
14085
+ "custom_domain_verified"
14086
+ ],
14087
+ "properties": {
14088
+ "account_id": {
14089
+ "type": "string"
14090
+ },
14091
+ "team": {
14092
+ "anyOf": [
14093
+ {
14094
+ "type": "string"
14095
+ },
14096
+ {
14097
+ "type": "null"
14098
+ }
14099
+ ],
14100
+ "description": "The project (`team_<hex>`), or null for a legacy account without one."
14101
+ },
14102
+ "name": {
14103
+ "type": "string"
14104
+ },
14105
+ "createdAt": {
14106
+ "anyOf": [
14107
+ {
14108
+ "type": "string",
14109
+ "format": "date-time"
14110
+ },
14111
+ {
14112
+ "type": "null"
14113
+ }
14114
+ ]
14115
+ },
14116
+ "first_login_at": {
14117
+ "anyOf": [
14118
+ {
14119
+ "type": "string",
14120
+ "description": "When the first end user ever completed a login on this tenant — the integration signal (arch/auth/activation-signal.md)."
14121
+ },
14122
+ {
14123
+ "type": "null"
14124
+ }
14125
+ ]
14126
+ },
14127
+ "users": {
14128
+ "type": "integer"
14129
+ },
14130
+ "last_login": {
14131
+ "anyOf": [
14132
+ {
14133
+ "type": "string",
14134
+ "format": "date-time"
14135
+ },
14136
+ {
14137
+ "type": "null"
14138
+ }
14139
+ ]
14140
+ },
14141
+ "clients": {
14142
+ "type": "integer"
14143
+ },
14144
+ "connections": {
14145
+ "type": "integer"
14146
+ },
14147
+ "custom_domain_verified": {
14148
+ "type": "boolean"
14149
+ }
14150
+ }
14151
+ }
14152
+ }
14153
+ }
14154
+ }
14155
+ }
14156
+ }
14157
+ },
14158
+ "401": {
14159
+ "description": "`unauthorized` — The request carries no valid credentials.",
14160
+ "content": {
14161
+ "application/json": {
14162
+ "schema": {
14163
+ "allOf": [
14164
+ {
14165
+ "$ref": "#/components/schemas/ErrorResponse"
14166
+ },
14167
+ {
14168
+ "type": "object",
14169
+ "properties": {
14170
+ "error_code": {
14171
+ "type": "string",
14172
+ "enum": [
14173
+ "unauthorized"
14174
+ ]
14175
+ }
14176
+ }
14177
+ }
14178
+ ]
14179
+ }
14180
+ }
14181
+ }
14182
+ },
14183
+ "403": {
14184
+ "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.",
14185
+ "content": {
14186
+ "application/json": {
14187
+ "schema": {
14188
+ "allOf": [
14189
+ {
14190
+ "$ref": "#/components/schemas/ErrorResponse"
14191
+ },
14192
+ {
14193
+ "type": "object",
14194
+ "properties": {
14195
+ "error_code": {
14196
+ "type": "string",
14197
+ "enum": [
14198
+ "forbidden",
14199
+ "insufficient_scope",
14200
+ "user_suspended"
14201
+ ]
14202
+ }
14203
+ }
14204
+ }
14205
+ ]
14206
+ }
14207
+ }
14208
+ }
14209
+ },
14210
+ "404": {
14211
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
14212
+ "content": {
14213
+ "application/json": {
14214
+ "schema": {
14215
+ "allOf": [
14216
+ {
14217
+ "$ref": "#/components/schemas/ErrorResponse"
14218
+ },
14219
+ {
14220
+ "type": "object",
14221
+ "properties": {
14222
+ "error_code": {
14223
+ "type": "string",
14224
+ "enum": [
14225
+ "account_not_found"
14226
+ ]
14227
+ }
14228
+ }
14229
+ }
14230
+ ]
14231
+ }
14232
+ }
14233
+ }
14234
+ },
14235
+ "429": {
14236
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
14237
+ "content": {
14238
+ "application/json": {
14239
+ "schema": {
14240
+ "allOf": [
14241
+ {
14242
+ "$ref": "#/components/schemas/ErrorResponse"
14243
+ },
14244
+ {
14245
+ "type": "object",
14246
+ "properties": {
14247
+ "error_code": {
14248
+ "type": "string",
14249
+ "enum": [
14250
+ "too_many_requests"
14251
+ ]
14252
+ }
14253
+ }
14254
+ }
14255
+ ]
14256
+ }
14257
+ }
14258
+ }
14259
+ },
14260
+ "500": {
14261
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
14262
+ "content": {
14263
+ "application/json": {
14264
+ "schema": {
14265
+ "allOf": [
14266
+ {
14267
+ "$ref": "#/components/schemas/ErrorResponse"
14268
+ },
14269
+ {
14270
+ "type": "object",
14271
+ "properties": {
14272
+ "error_code": {
14273
+ "type": "string",
14274
+ "enum": [
14275
+ "internal_error"
14276
+ ]
14277
+ }
14278
+ }
14279
+ }
14280
+ ]
14281
+ }
14282
+ }
14283
+ }
14284
+ }
14285
+ }
14286
+ }
14287
+ },
14047
14288
  "/account/{account_id}/transfer": {
14048
14289
  "post": {
14049
14290
  "operationId": "account/transfer",