@faable/auth-sdk 2.7.28 → 2.7.30
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/FaableAuthApi.d.ts +18 -12
- package/dist/api/generated-client.d.ts +108 -15
- package/dist/api/generated-client.js +43 -1
- package/dist/api/types.d.ts +423 -26
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +1116 -138
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -108,18 +108,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
108
108
|
nickname?: string | null | undefined;
|
|
109
109
|
email?: string | null | undefined;
|
|
110
110
|
email_verified: boolean;
|
|
111
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
111
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
112
112
|
email_verified_at?: string | null | undefined;
|
|
113
113
|
email_change_locked_at?: string | null | undefined;
|
|
114
114
|
email_bounced_at?: string | null | undefined;
|
|
115
115
|
welcome_sent_at?: string | null | undefined;
|
|
116
|
+
imported_at?: string | null | undefined;
|
|
116
117
|
passkey_prompted_at?: string | null | undefined;
|
|
117
118
|
passkey_prompt_count?: number | undefined;
|
|
118
119
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
119
120
|
phone?: string | null | undefined;
|
|
120
121
|
phone_e164?: boolean | undefined;
|
|
121
122
|
phone_verified: boolean;
|
|
122
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
123
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
123
124
|
phone_verified_at?: string | null | undefined;
|
|
124
125
|
country_iso?: string | null | undefined;
|
|
125
126
|
birth_date?: string | null | undefined;
|
|
@@ -167,18 +168,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
167
168
|
nickname?: string | null | undefined;
|
|
168
169
|
email?: string | null | undefined;
|
|
169
170
|
email_verified: boolean;
|
|
170
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
171
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
171
172
|
email_verified_at?: string | null | undefined;
|
|
172
173
|
email_change_locked_at?: string | null | undefined;
|
|
173
174
|
email_bounced_at?: string | null | undefined;
|
|
174
175
|
welcome_sent_at?: string | null | undefined;
|
|
176
|
+
imported_at?: string | null | undefined;
|
|
175
177
|
passkey_prompted_at?: string | null | undefined;
|
|
176
178
|
passkey_prompt_count?: number | undefined;
|
|
177
179
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
178
180
|
phone?: string | null | undefined;
|
|
179
181
|
phone_e164?: boolean | undefined;
|
|
180
182
|
phone_verified: boolean;
|
|
181
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
183
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
182
184
|
phone_verified_at?: string | null | undefined;
|
|
183
185
|
country_iso?: string | null | undefined;
|
|
184
186
|
birth_date?: string | null | undefined;
|
|
@@ -229,18 +231,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
229
231
|
nickname?: string | null | undefined;
|
|
230
232
|
email?: string | null | undefined;
|
|
231
233
|
email_verified: boolean;
|
|
232
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
234
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
233
235
|
email_verified_at?: string | null | undefined;
|
|
234
236
|
email_change_locked_at?: string | null | undefined;
|
|
235
237
|
email_bounced_at?: string | null | undefined;
|
|
236
238
|
welcome_sent_at?: string | null | undefined;
|
|
239
|
+
imported_at?: string | null | undefined;
|
|
237
240
|
passkey_prompted_at?: string | null | undefined;
|
|
238
241
|
passkey_prompt_count?: number | undefined;
|
|
239
242
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
240
243
|
phone?: string | null | undefined;
|
|
241
244
|
phone_e164?: boolean | undefined;
|
|
242
245
|
phone_verified: boolean;
|
|
243
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
246
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
244
247
|
phone_verified_at?: string | null | undefined;
|
|
245
248
|
country_iso?: string | null | undefined;
|
|
246
249
|
birth_date?: string | null | undefined;
|
|
@@ -290,18 +293,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
290
293
|
nickname?: string | null | undefined;
|
|
291
294
|
email?: string | null | undefined;
|
|
292
295
|
email_verified: boolean;
|
|
293
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
296
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
294
297
|
email_verified_at?: string | null | undefined;
|
|
295
298
|
email_change_locked_at?: string | null | undefined;
|
|
296
299
|
email_bounced_at?: string | null | undefined;
|
|
297
300
|
welcome_sent_at?: string | null | undefined;
|
|
301
|
+
imported_at?: string | null | undefined;
|
|
298
302
|
passkey_prompted_at?: string | null | undefined;
|
|
299
303
|
passkey_prompt_count?: number | undefined;
|
|
300
304
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
301
305
|
phone?: string | null | undefined;
|
|
302
306
|
phone_e164?: boolean | undefined;
|
|
303
307
|
phone_verified: boolean;
|
|
304
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
308
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
305
309
|
phone_verified_at?: string | null | undefined;
|
|
306
310
|
country_iso?: string | null | undefined;
|
|
307
311
|
birth_date?: string | null | undefined;
|
|
@@ -350,18 +354,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
350
354
|
nickname?: string | null | undefined;
|
|
351
355
|
email?: string | null | undefined;
|
|
352
356
|
email_verified: boolean;
|
|
353
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
357
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
354
358
|
email_verified_at?: string | null | undefined;
|
|
355
359
|
email_change_locked_at?: string | null | undefined;
|
|
356
360
|
email_bounced_at?: string | null | undefined;
|
|
357
361
|
welcome_sent_at?: string | null | undefined;
|
|
362
|
+
imported_at?: string | null | undefined;
|
|
358
363
|
passkey_prompted_at?: string | null | undefined;
|
|
359
364
|
passkey_prompt_count?: number | undefined;
|
|
360
365
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
361
366
|
phone?: string | null | undefined;
|
|
362
367
|
phone_e164?: boolean | undefined;
|
|
363
368
|
phone_verified: boolean;
|
|
364
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
369
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
365
370
|
phone_verified_at?: string | null | undefined;
|
|
366
371
|
country_iso?: string | null | undefined;
|
|
367
372
|
birth_date?: string | null | undefined;
|
|
@@ -410,18 +415,19 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
410
415
|
nickname?: string | null | undefined;
|
|
411
416
|
email?: string | null | undefined;
|
|
412
417
|
email_verified: boolean;
|
|
413
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
418
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
414
419
|
email_verified_at?: string | null | undefined;
|
|
415
420
|
email_change_locked_at?: string | null | undefined;
|
|
416
421
|
email_bounced_at?: string | null | undefined;
|
|
417
422
|
welcome_sent_at?: string | null | undefined;
|
|
423
|
+
imported_at?: string | null | undefined;
|
|
418
424
|
passkey_prompted_at?: string | null | undefined;
|
|
419
425
|
passkey_prompt_count?: number | undefined;
|
|
420
426
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
421
427
|
phone?: string | null | undefined;
|
|
422
428
|
phone_e164?: boolean | undefined;
|
|
423
429
|
phone_verified: boolean;
|
|
424
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
430
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
425
431
|
phone_verified_at?: string | null | undefined;
|
|
426
432
|
country_iso?: string | null | undefined;
|
|
427
433
|
birth_date?: string | null | undefined;
|
|
@@ -2279,8 +2279,11 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2279
2279
|
*
|
|
2280
2280
|
* Set a credential's password
|
|
2281
2281
|
*
|
|
2282
|
-
* Sets or rotates the password for a database credential. The previous password is invalidated immediately.
|
|
2282
|
+
* Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
|
|
2283
2283
|
*
|
|
2284
|
+
* @throws {FaableApiError} `bad_request` (400) — The request is malformed. `message` says what is wrong.
|
|
2285
|
+
* @throws {FaableApiError} `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.
|
|
2286
|
+
* @throws {FaableApiError} `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.
|
|
2284
2287
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2285
2288
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2286
2289
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -5065,18 +5068,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5065
5068
|
nickname?: string | null | undefined;
|
|
5066
5069
|
email?: string | null | undefined;
|
|
5067
5070
|
email_verified: boolean;
|
|
5068
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5071
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5069
5072
|
email_verified_at?: string | null | undefined;
|
|
5070
5073
|
email_change_locked_at?: string | null | undefined;
|
|
5071
5074
|
email_bounced_at?: string | null | undefined;
|
|
5072
5075
|
welcome_sent_at?: string | null | undefined;
|
|
5076
|
+
imported_at?: string | null | undefined;
|
|
5073
5077
|
passkey_prompted_at?: string | null | undefined;
|
|
5074
5078
|
passkey_prompt_count?: number | undefined;
|
|
5075
5079
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5076
5080
|
phone?: string | null | undefined;
|
|
5077
5081
|
phone_e164?: boolean | undefined;
|
|
5078
5082
|
phone_verified: boolean;
|
|
5079
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5083
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5080
5084
|
phone_verified_at?: string | null | undefined;
|
|
5081
5085
|
country_iso?: string | null | undefined;
|
|
5082
5086
|
birth_date?: string | null | undefined;
|
|
@@ -5140,18 +5144,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5140
5144
|
nickname?: string | null | undefined;
|
|
5141
5145
|
email?: string | null | undefined;
|
|
5142
5146
|
email_verified: boolean;
|
|
5143
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5147
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5144
5148
|
email_verified_at?: string | null | undefined;
|
|
5145
5149
|
email_change_locked_at?: string | null | undefined;
|
|
5146
5150
|
email_bounced_at?: string | null | undefined;
|
|
5147
5151
|
welcome_sent_at?: string | null | undefined;
|
|
5152
|
+
imported_at?: string | null | undefined;
|
|
5148
5153
|
passkey_prompted_at?: string | null | undefined;
|
|
5149
5154
|
passkey_prompt_count?: number | undefined;
|
|
5150
5155
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5151
5156
|
phone?: string | null | undefined;
|
|
5152
5157
|
phone_e164?: boolean | undefined;
|
|
5153
5158
|
phone_verified: boolean;
|
|
5154
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5159
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5155
5160
|
phone_verified_at?: string | null | undefined;
|
|
5156
5161
|
country_iso?: string | null | undefined;
|
|
5157
5162
|
birth_date?: string | null | undefined;
|
|
@@ -5209,6 +5214,54 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5209
5214
|
userDeleteFactor(user_id: string, factor_id: string): Promise<{
|
|
5210
5215
|
deleted: boolean;
|
|
5211
5216
|
}>;
|
|
5217
|
+
/**
|
|
5218
|
+
* `GET /user/export` — operationId: `user/export`
|
|
5219
|
+
*
|
|
5220
|
+
* Export users, optionally with their password hashes
|
|
5221
|
+
*
|
|
5222
|
+
* Pages through every user of the tenant, 500 at a time, in the row shape `POST /user/import` takes. With `include_hashes` each row carries its `password_hash` (needs the `read:password_hashes` scope, is audited as `credentials.exported` and notifies its subscribers). Provider access and refresh tokens of linked identities are never exported. Available on every plan.
|
|
5223
|
+
*
|
|
5224
|
+
* @throws {FaableApiError} `invalid_connection` (400) — The connection does not exist, is disabled, or is not of the type this flow needs.
|
|
5225
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5226
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5227
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5228
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5229
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5230
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5231
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5232
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5233
|
+
*/
|
|
5234
|
+
userExport(params?: OpQuery<"user/export">): Promise<{
|
|
5235
|
+
users: {
|
|
5236
|
+
user_id: string;
|
|
5237
|
+
email: string | null;
|
|
5238
|
+
email_verified: boolean;
|
|
5239
|
+
name?: string | undefined;
|
|
5240
|
+
given_name?: string | undefined;
|
|
5241
|
+
family_name?: string | undefined;
|
|
5242
|
+
phone?: string | undefined;
|
|
5243
|
+
birth_date?: string | undefined;
|
|
5244
|
+
locale?: string | undefined;
|
|
5245
|
+
picture?: string | undefined;
|
|
5246
|
+
user_metadata?: {
|
|
5247
|
+
[key: string]: unknown;
|
|
5248
|
+
} | undefined;
|
|
5249
|
+
app_metadata?: {
|
|
5250
|
+
[key: string]: unknown;
|
|
5251
|
+
} | undefined;
|
|
5252
|
+
password_hash_status: "set" | "not_set" | "no_credential" | "legacy_unexportable";
|
|
5253
|
+
password_hash?: string | undefined;
|
|
5254
|
+
identities?: {
|
|
5255
|
+
connection: string;
|
|
5256
|
+
identity_id: string;
|
|
5257
|
+
profile_data?: {
|
|
5258
|
+
[key: string]: unknown;
|
|
5259
|
+
} | undefined;
|
|
5260
|
+
}[] | undefined;
|
|
5261
|
+
}[];
|
|
5262
|
+
next_cursor: string | null;
|
|
5263
|
+
connection: string | null;
|
|
5264
|
+
}>;
|
|
5212
5265
|
/**
|
|
5213
5266
|
* `GET /user/{user_id}/factors` — operationId: `user/factors`
|
|
5214
5267
|
*
|
|
@@ -5260,18 +5313,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5260
5313
|
nickname?: string | null | undefined;
|
|
5261
5314
|
email?: string | null | undefined;
|
|
5262
5315
|
email_verified: boolean;
|
|
5263
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5316
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5264
5317
|
email_verified_at?: string | null | undefined;
|
|
5265
5318
|
email_change_locked_at?: string | null | undefined;
|
|
5266
5319
|
email_bounced_at?: string | null | undefined;
|
|
5267
5320
|
welcome_sent_at?: string | null | undefined;
|
|
5321
|
+
imported_at?: string | null | undefined;
|
|
5268
5322
|
passkey_prompted_at?: string | null | undefined;
|
|
5269
5323
|
passkey_prompt_count?: number | undefined;
|
|
5270
5324
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5271
5325
|
phone?: string | null | undefined;
|
|
5272
5326
|
phone_e164?: boolean | undefined;
|
|
5273
5327
|
phone_verified: boolean;
|
|
5274
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5328
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5275
5329
|
phone_verified_at?: string | null | undefined;
|
|
5276
5330
|
country_iso?: string | null | undefined;
|
|
5277
5331
|
birth_date?: string | null | undefined;
|
|
@@ -5309,6 +5363,41 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5309
5363
|
createdAt: string;
|
|
5310
5364
|
updatedAt?: string | undefined;
|
|
5311
5365
|
}>;
|
|
5366
|
+
/**
|
|
5367
|
+
* `POST /user/import` — operationId: `user/import`
|
|
5368
|
+
*
|
|
5369
|
+
* Import users, with their password hashes
|
|
5370
|
+
*
|
|
5371
|
+
* Creates up to 500 users per request, for migrations from another provider. Each row can carry a `password_hash` exported from that provider (bcrypt, scrypt, Firebase scrypt, PBKDF2, argon2): the user signs in with their existing password and the hash is upgraded to argon2id on that first login. Fast digests (MD5, SHA-1, SHA-2) and low costs are refused per row with `weak_password_hash`. Rows are matched by email, so the same file can be sent twice: existing users are `skipped` unless `update_existing`. A bad row never fails the batch: each row gets its own `status` and `error`. Imported users get none of the built-in new-user emails. The response never contains a hash, and neither does the audit log.
|
|
5372
|
+
*
|
|
5373
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
5374
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
5375
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
5376
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
5377
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
5378
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
5379
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
5380
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
5381
|
+
*/
|
|
5382
|
+
userImport(data: OpBody<"user/import">): Promise<{
|
|
5383
|
+
summary: {
|
|
5384
|
+
total: number;
|
|
5385
|
+
created: number;
|
|
5386
|
+
updated: number;
|
|
5387
|
+
skipped: number;
|
|
5388
|
+
error: number;
|
|
5389
|
+
};
|
|
5390
|
+
results: {
|
|
5391
|
+
index: number;
|
|
5392
|
+
email: string;
|
|
5393
|
+
status: "error" | "created" | "skipped" | "updated";
|
|
5394
|
+
user_id?: string | undefined;
|
|
5395
|
+
error?: {
|
|
5396
|
+
code: string;
|
|
5397
|
+
message: string;
|
|
5398
|
+
} | undefined;
|
|
5399
|
+
}[];
|
|
5400
|
+
}>;
|
|
5312
5401
|
/**
|
|
5313
5402
|
* `GET /user` — operationId: `user/list`
|
|
5314
5403
|
*
|
|
@@ -5337,18 +5426,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5337
5426
|
nickname?: string | null | undefined;
|
|
5338
5427
|
email?: string | null | undefined;
|
|
5339
5428
|
email_verified: boolean;
|
|
5340
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5429
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5341
5430
|
email_verified_at?: string | null | undefined;
|
|
5342
5431
|
email_change_locked_at?: string | null | undefined;
|
|
5343
5432
|
email_bounced_at?: string | null | undefined;
|
|
5344
5433
|
welcome_sent_at?: string | null | undefined;
|
|
5434
|
+
imported_at?: string | null | undefined;
|
|
5345
5435
|
passkey_prompted_at?: string | null | undefined;
|
|
5346
5436
|
passkey_prompt_count?: number | undefined;
|
|
5347
5437
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5348
5438
|
phone?: string | null | undefined;
|
|
5349
5439
|
phone_e164?: boolean | undefined;
|
|
5350
5440
|
phone_verified: boolean;
|
|
5351
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5441
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5352
5442
|
phone_verified_at?: string | null | undefined;
|
|
5353
5443
|
country_iso?: string | null | undefined;
|
|
5354
5444
|
birth_date?: string | null | undefined;
|
|
@@ -5396,18 +5486,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5396
5486
|
nickname?: string | null | undefined;
|
|
5397
5487
|
email?: string | null | undefined;
|
|
5398
5488
|
email_verified: boolean;
|
|
5399
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5489
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5400
5490
|
email_verified_at?: string | null | undefined;
|
|
5401
5491
|
email_change_locked_at?: string | null | undefined;
|
|
5402
5492
|
email_bounced_at?: string | null | undefined;
|
|
5403
5493
|
welcome_sent_at?: string | null | undefined;
|
|
5494
|
+
imported_at?: string | null | undefined;
|
|
5404
5495
|
passkey_prompted_at?: string | null | undefined;
|
|
5405
5496
|
passkey_prompt_count?: number | undefined;
|
|
5406
5497
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5407
5498
|
phone?: string | null | undefined;
|
|
5408
5499
|
phone_e164?: boolean | undefined;
|
|
5409
5500
|
phone_verified: boolean;
|
|
5410
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5501
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5411
5502
|
phone_verified_at?: string | null | undefined;
|
|
5412
5503
|
country_iso?: string | null | undefined;
|
|
5413
5504
|
birth_date?: string | null | undefined;
|
|
@@ -5458,18 +5549,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5458
5549
|
nickname?: string | null | undefined;
|
|
5459
5550
|
email?: string | null | undefined;
|
|
5460
5551
|
email_verified: boolean;
|
|
5461
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5552
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5462
5553
|
email_verified_at?: string | null | undefined;
|
|
5463
5554
|
email_change_locked_at?: string | null | undefined;
|
|
5464
5555
|
email_bounced_at?: string | null | undefined;
|
|
5465
5556
|
welcome_sent_at?: string | null | undefined;
|
|
5557
|
+
imported_at?: string | null | undefined;
|
|
5466
5558
|
passkey_prompted_at?: string | null | undefined;
|
|
5467
5559
|
passkey_prompt_count?: number | undefined;
|
|
5468
5560
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5469
5561
|
phone?: string | null | undefined;
|
|
5470
5562
|
phone_e164?: boolean | undefined;
|
|
5471
5563
|
phone_verified: boolean;
|
|
5472
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5564
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5473
5565
|
phone_verified_at?: string | null | undefined;
|
|
5474
5566
|
country_iso?: string | null | undefined;
|
|
5475
5567
|
birth_date?: string | null | undefined;
|
|
@@ -5630,18 +5722,19 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
5630
5722
|
nickname?: string | null | undefined;
|
|
5631
5723
|
email?: string | null | undefined;
|
|
5632
5724
|
email_verified: boolean;
|
|
5633
|
-
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5725
|
+
email_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5634
5726
|
email_verified_at?: string | null | undefined;
|
|
5635
5727
|
email_change_locked_at?: string | null | undefined;
|
|
5636
5728
|
email_bounced_at?: string | null | undefined;
|
|
5637
5729
|
welcome_sent_at?: string | null | undefined;
|
|
5730
|
+
imported_at?: string | null | undefined;
|
|
5638
5731
|
passkey_prompted_at?: string | null | undefined;
|
|
5639
5732
|
passkey_prompt_count?: number | undefined;
|
|
5640
5733
|
passkey_prompt_dismissed_at?: string | null | undefined;
|
|
5641
5734
|
phone?: string | null | undefined;
|
|
5642
5735
|
phone_e164?: boolean | undefined;
|
|
5643
5736
|
phone_verified: boolean;
|
|
5644
|
-
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | null | undefined;
|
|
5737
|
+
phone_verified_method?: "manual" | "verification_flow" | "passwordless_otp" | "team_invite" | "email_change" | "federated" | "sms_otp" | "password_reset" | "import" | null | undefined;
|
|
5645
5738
|
phone_verified_at?: string | null | undefined;
|
|
5646
5739
|
country_iso?: string | null | undefined;
|
|
5647
5740
|
birth_date?: string | null | undefined;
|
|
@@ -744,8 +744,11 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
744
744
|
*
|
|
745
745
|
* Set a credential's password
|
|
746
746
|
*
|
|
747
|
-
* Sets or rotates the password for a database credential. The previous password is invalidated immediately.
|
|
747
|
+
* Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
|
|
748
748
|
*
|
|
749
|
+
* @throws {FaableApiError} `bad_request` (400) — The request is malformed. `message` says what is wrong.
|
|
750
|
+
* @throws {FaableApiError} `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.
|
|
751
|
+
* @throws {FaableApiError} `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.
|
|
749
752
|
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
750
753
|
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
751
754
|
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
@@ -1964,6 +1967,26 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
1964
1967
|
requireId("factor_id", factor_id);
|
|
1965
1968
|
return this.fetcher.delete(`/user/${user_id}/factors/${factor_id}`);
|
|
1966
1969
|
}
|
|
1970
|
+
/**
|
|
1971
|
+
* `GET /user/export` — operationId: `user/export`
|
|
1972
|
+
*
|
|
1973
|
+
* Export users, optionally with their password hashes
|
|
1974
|
+
*
|
|
1975
|
+
* Pages through every user of the tenant, 500 at a time, in the row shape `POST /user/import` takes. With `include_hashes` each row carries its `password_hash` (needs the `read:password_hashes` scope, is audited as `credentials.exported` and notifies its subscribers). Provider access and refresh tokens of linked identities are never exported. Available on every plan.
|
|
1976
|
+
*
|
|
1977
|
+
* @throws {FaableApiError} `invalid_connection` (400) — The connection does not exist, is disabled, or is not of the type this flow needs.
|
|
1978
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
1979
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
1980
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
1981
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
1982
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
1983
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
1984
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
1985
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
1986
|
+
*/
|
|
1987
|
+
userExport(params) {
|
|
1988
|
+
return this.fetcher.request({ method: "GET", url: `/user/export`, params });
|
|
1989
|
+
}
|
|
1967
1990
|
/**
|
|
1968
1991
|
* `GET /user/{user_id}/factors` — operationId: `user/factors`
|
|
1969
1992
|
*
|
|
@@ -2005,6 +2028,25 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
2005
2028
|
requireId("user_id", user_id);
|
|
2006
2029
|
return this.fetcher.get(`/user/${user_id}`);
|
|
2007
2030
|
}
|
|
2031
|
+
/**
|
|
2032
|
+
* `POST /user/import` — operationId: `user/import`
|
|
2033
|
+
*
|
|
2034
|
+
* Import users, with their password hashes
|
|
2035
|
+
*
|
|
2036
|
+
* Creates up to 500 users per request, for migrations from another provider. Each row can carry a `password_hash` exported from that provider (bcrypt, scrypt, Firebase scrypt, PBKDF2, argon2): the user signs in with their existing password and the hash is upgraded to argon2id on that first login. Fast digests (MD5, SHA-1, SHA-2) and low costs are refused per row with `weak_password_hash`. Rows are matched by email, so the same file can be sent twice: existing users are `skipped` unless `update_existing`. A bad row never fails the batch: each row gets its own `status` and `error`. Imported users get none of the built-in new-user emails. The response never contains a hash, and neither does the audit log.
|
|
2037
|
+
*
|
|
2038
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
2039
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
2040
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
2041
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
2042
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
2043
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
2044
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
2045
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
2046
|
+
*/
|
|
2047
|
+
userImport(data) {
|
|
2048
|
+
return this.fetcher.post(`/user/import`, data);
|
|
2049
|
+
}
|
|
2008
2050
|
/**
|
|
2009
2051
|
* `GET /user` — operationId: `user/list`
|
|
2010
2052
|
*
|