@faable/auth-sdk 2.7.52 → 2.7.54
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 +2 -0
- package/dist/api/api-types.d.ts +2 -0
- package/dist/api/generated-client.d.ts +92 -0
- package/dist/api/generated-client.js +21 -0
- package/dist/api/types.d.ts +280 -1
- package/dist/version.js +2 -2
- package/package.json +1 -1
- package/spec/openapi.json +795 -2
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -58,6 +58,8 @@ export declare class FaableAuthApi extends GeneratedFaableAuthApi {
|
|
|
58
58
|
verify_email_auto_send: boolean;
|
|
59
59
|
};
|
|
60
60
|
email_reply_to?: string | null | undefined;
|
|
61
|
+
email_from_name?: string | null | undefined;
|
|
62
|
+
email_from_address?: string | null | undefined;
|
|
61
63
|
welcome_email?: {
|
|
62
64
|
cta_url?: string | null | undefined;
|
|
63
65
|
body?: string | null | undefined;
|
package/dist/api/api-types.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { components } from "./types.js";
|
|
2
|
+
export type AccountEmailSenderBody = components["schemas"]["AccountEmailSenderBody"];
|
|
3
|
+
export type AccountEmailSenderParams = components["schemas"]["AccountEmailSenderParams"];
|
|
2
4
|
export type AccountNotificationSettings = components["schemas"]["AccountNotificationSettings"];
|
|
3
5
|
export type AccountTransferBody = components["schemas"]["AccountTransferBody"];
|
|
4
6
|
export type AccountTransferResponse = components["schemas"]["AccountTransferResponse"];
|
|
@@ -57,6 +57,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
57
57
|
verify_email_auto_send: boolean;
|
|
58
58
|
};
|
|
59
59
|
email_reply_to?: string | null | undefined;
|
|
60
|
+
email_from_name?: string | null | undefined;
|
|
61
|
+
email_from_address?: string | null | undefined;
|
|
60
62
|
welcome_email?: {
|
|
61
63
|
cta_url?: string | null | undefined;
|
|
62
64
|
body?: string | null | undefined;
|
|
@@ -132,6 +134,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
132
134
|
verify_email_auto_send: boolean;
|
|
133
135
|
};
|
|
134
136
|
email_reply_to?: string | null | undefined;
|
|
137
|
+
email_from_name?: string | null | undefined;
|
|
138
|
+
email_from_address?: string | null | undefined;
|
|
135
139
|
welcome_email?: {
|
|
136
140
|
cta_url?: string | null | undefined;
|
|
137
141
|
body?: string | null | undefined;
|
|
@@ -191,6 +195,84 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
191
195
|
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
192
196
|
*/
|
|
193
197
|
accountDelete(account_id: string): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* `POST /account/{account_id}/email_sender` — operationId: `account/email_sender`
|
|
200
|
+
*
|
|
201
|
+
* Set an Account's sender address
|
|
202
|
+
*
|
|
203
|
+
* Sets the From address of every email this Auth Account sends to its users. The address must be in a domain the platform signs email for. `null` returns to the platform default. Platform credentials only.
|
|
204
|
+
*
|
|
205
|
+
* @throws {FaableApiError} `email_sender_domain_not_allowed` (400) — The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).
|
|
206
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
207
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
208
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
209
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
210
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
211
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
212
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
213
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
214
|
+
*/
|
|
215
|
+
accountEmailSender(account_id: string, data: OpBody<"account/email_sender">): Promise<{
|
|
216
|
+
id: string;
|
|
217
|
+
name: string;
|
|
218
|
+
domain: string;
|
|
219
|
+
slug: string;
|
|
220
|
+
logo_src?: string | null | undefined;
|
|
221
|
+
icon_src?: string | null | undefined;
|
|
222
|
+
callback_hostnames: string[];
|
|
223
|
+
token_signature: string;
|
|
224
|
+
token_signing_alg: "RS256";
|
|
225
|
+
default_connection?: unknown;
|
|
226
|
+
enabled_locales: string[];
|
|
227
|
+
tags?: string[] | undefined;
|
|
228
|
+
team?: string | null | undefined;
|
|
229
|
+
notification_settings: {
|
|
230
|
+
welcome_email_enabled: boolean;
|
|
231
|
+
verify_email_auto_send: boolean;
|
|
232
|
+
};
|
|
233
|
+
email_reply_to?: string | null | undefined;
|
|
234
|
+
email_from_name?: string | null | undefined;
|
|
235
|
+
email_from_address?: string | null | undefined;
|
|
236
|
+
welcome_email?: {
|
|
237
|
+
cta_url?: string | null | undefined;
|
|
238
|
+
body?: string | null | undefined;
|
|
239
|
+
social_links?: {
|
|
240
|
+
label: string;
|
|
241
|
+
url: string;
|
|
242
|
+
}[] | null | undefined;
|
|
243
|
+
} | null | undefined;
|
|
244
|
+
email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
|
|
245
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
246
|
+
login_methods?: {
|
|
247
|
+
order?: string[] | undefined;
|
|
248
|
+
disabled_connections?: string[] | undefined;
|
|
249
|
+
passkey_login_enabled?: boolean | undefined;
|
|
250
|
+
identifier_first?: boolean | undefined;
|
|
251
|
+
remember_last_method?: boolean | undefined;
|
|
252
|
+
passkey_promotion?: "offer" | "off" | undefined;
|
|
253
|
+
passkey_promotion_snooze_days?: number | undefined;
|
|
254
|
+
passkey_promotion_max_prompts?: number | undefined;
|
|
255
|
+
remember_me?: "optional" | "off" | undefined;
|
|
256
|
+
remember_me_days?: number | undefined;
|
|
257
|
+
} | undefined;
|
|
258
|
+
login_flow?: string | null | undefined;
|
|
259
|
+
mfa_policy?: {
|
|
260
|
+
mode?: "required" | "optional" | "off" | undefined;
|
|
261
|
+
allowed_factors?: ("webauthn" | "totp")[] | undefined;
|
|
262
|
+
remember_device_days?: number | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
recovery_channels?: {
|
|
265
|
+
enabled?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
|
|
266
|
+
default?: "email" | "sms" | "whatsapp" | "factor" | undefined;
|
|
267
|
+
visible?: ("email" | "sms" | "whatsapp" | "factor")[] | undefined;
|
|
268
|
+
} | undefined;
|
|
269
|
+
default_country_iso?: string | null | undefined;
|
|
270
|
+
webauthn_rp_id?: string | null | undefined;
|
|
271
|
+
logout_confirm_required?: boolean | undefined;
|
|
272
|
+
canonical_host?: string | null | undefined;
|
|
273
|
+
createdAt: string;
|
|
274
|
+
updatedAt?: string | undefined;
|
|
275
|
+
}>;
|
|
194
276
|
/**
|
|
195
277
|
* `GET /account/{account_id}` — operationId: `account/get`
|
|
196
278
|
*
|
|
@@ -229,6 +311,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
229
311
|
verify_email_auto_send: boolean;
|
|
230
312
|
};
|
|
231
313
|
email_reply_to?: string | null | undefined;
|
|
314
|
+
email_from_name?: string | null | undefined;
|
|
315
|
+
email_from_address?: string | null | undefined;
|
|
232
316
|
welcome_email?: {
|
|
233
317
|
cta_url?: string | null | undefined;
|
|
234
318
|
body?: string | null | undefined;
|
|
@@ -328,6 +412,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
328
412
|
verify_email_auto_send: boolean;
|
|
329
413
|
};
|
|
330
414
|
email_reply_to?: string | null | undefined;
|
|
415
|
+
email_from_name?: string | null | undefined;
|
|
416
|
+
email_from_address?: string | null | undefined;
|
|
331
417
|
welcome_email?: {
|
|
332
418
|
cta_url?: string | null | undefined;
|
|
333
419
|
body?: string | null | undefined;
|
|
@@ -387,6 +473,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
387
473
|
verify_email_auto_send: boolean;
|
|
388
474
|
};
|
|
389
475
|
email_reply_to?: string | null | undefined;
|
|
476
|
+
email_from_name?: string | null | undefined;
|
|
477
|
+
email_from_address?: string | null | undefined;
|
|
390
478
|
welcome_email?: {
|
|
391
479
|
cta_url?: string | null | undefined;
|
|
392
480
|
body?: string | null | undefined;
|
|
@@ -449,6 +537,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
449
537
|
verify_email_auto_send: boolean;
|
|
450
538
|
};
|
|
451
539
|
email_reply_to?: string | null | undefined;
|
|
540
|
+
email_from_name?: string | null | undefined;
|
|
541
|
+
email_from_address?: string | null | undefined;
|
|
452
542
|
welcome_email?: {
|
|
453
543
|
cta_url?: string | null | undefined;
|
|
454
544
|
body?: string | null | undefined;
|
|
@@ -683,6 +773,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
|
|
|
683
773
|
verify_email_auto_send: boolean;
|
|
684
774
|
};
|
|
685
775
|
email_reply_to?: string | null | undefined;
|
|
776
|
+
email_from_name?: string | null | undefined;
|
|
777
|
+
email_from_address?: string | null | undefined;
|
|
686
778
|
welcome_email?: {
|
|
687
779
|
cta_url?: string | null | undefined;
|
|
688
780
|
body?: string | null | undefined;
|
|
@@ -73,6 +73,27 @@ export class GeneratedFaableAuthApi extends FaableApi {
|
|
|
73
73
|
requireId("account_id", account_id);
|
|
74
74
|
return this.fetcher.delete(`/account/${account_id}`);
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* `POST /account/{account_id}/email_sender` — operationId: `account/email_sender`
|
|
78
|
+
*
|
|
79
|
+
* Set an Account's sender address
|
|
80
|
+
*
|
|
81
|
+
* Sets the From address of every email this Auth Account sends to its users. The address must be in a domain the platform signs email for. `null` returns to the platform default. Platform credentials only.
|
|
82
|
+
*
|
|
83
|
+
* @throws {FaableApiError} `email_sender_domain_not_allowed` (400) — The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).
|
|
84
|
+
* @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
85
|
+
* @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
|
|
86
|
+
* @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
|
|
87
|
+
* @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
|
|
88
|
+
* @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
|
|
89
|
+
* @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
|
|
90
|
+
* @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
|
|
91
|
+
* @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
|
|
92
|
+
*/
|
|
93
|
+
accountEmailSender(account_id, data) {
|
|
94
|
+
requireId("account_id", account_id);
|
|
95
|
+
return this.fetcher.post(`/account/${account_id}/email_sender`, data);
|
|
96
|
+
}
|
|
76
97
|
/**
|
|
77
98
|
* `GET /account/{account_id}` — operationId: `account/get`
|
|
78
99
|
*
|
package/dist/api/types.d.ts
CHANGED
|
@@ -304,6 +304,26 @@ export interface paths {
|
|
|
304
304
|
patch?: never;
|
|
305
305
|
trace?: never;
|
|
306
306
|
};
|
|
307
|
+
"/account/{account_id}/email_sender": {
|
|
308
|
+
parameters: {
|
|
309
|
+
query?: never;
|
|
310
|
+
header?: never;
|
|
311
|
+
path?: never;
|
|
312
|
+
cookie?: never;
|
|
313
|
+
};
|
|
314
|
+
get?: never;
|
|
315
|
+
put?: never;
|
|
316
|
+
/**
|
|
317
|
+
* Set an Account's sender address
|
|
318
|
+
* @description Sets the From address of every email this Auth Account sends to its users. The address must be in a domain the platform signs email for. `null` returns to the platform default. Platform credentials only.
|
|
319
|
+
*/
|
|
320
|
+
post: operations["account/email_sender"];
|
|
321
|
+
delete?: never;
|
|
322
|
+
options?: never;
|
|
323
|
+
head?: never;
|
|
324
|
+
patch?: never;
|
|
325
|
+
trace?: never;
|
|
326
|
+
};
|
|
307
327
|
"/connection": {
|
|
308
328
|
parameters: {
|
|
309
329
|
query?: never;
|
|
@@ -4444,6 +4464,10 @@ export interface components {
|
|
|
4444
4464
|
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
4445
4465
|
*/
|
|
4446
4466
|
email_reply_to?: string | null;
|
|
4467
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
4468
|
+
email_from_name?: string | null;
|
|
4469
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
4470
|
+
email_from_address?: string | null;
|
|
4447
4471
|
welcome_email?: {
|
|
4448
4472
|
/**
|
|
4449
4473
|
* Format: uri
|
|
@@ -6423,6 +6447,13 @@ export interface components {
|
|
|
6423
6447
|
tenants_left_in_source?: number;
|
|
6424
6448
|
tenants_in_target?: number;
|
|
6425
6449
|
};
|
|
6450
|
+
AccountEmailSenderParams: {
|
|
6451
|
+
account_id: string;
|
|
6452
|
+
};
|
|
6453
|
+
AccountEmailSenderBody: {
|
|
6454
|
+
/** Format: email */
|
|
6455
|
+
address: string | null;
|
|
6456
|
+
};
|
|
6426
6457
|
/** @description AuthAccountUpdate */
|
|
6427
6458
|
AuthAccountUpdate: {
|
|
6428
6459
|
name?: string;
|
|
@@ -6446,6 +6477,7 @@ export interface components {
|
|
|
6446
6477
|
};
|
|
6447
6478
|
/** Format: email */
|
|
6448
6479
|
email_reply_to?: string | null;
|
|
6480
|
+
email_from_name?: string | null;
|
|
6449
6481
|
welcome_email?: {
|
|
6450
6482
|
/**
|
|
6451
6483
|
* Format: uri
|
|
@@ -6617,6 +6649,7 @@ export interface components {
|
|
|
6617
6649
|
* - `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.
|
|
6618
6650
|
* - `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.
|
|
6619
6651
|
* - `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.
|
|
6652
|
+
* - `email_sender_domain_not_allowed` (400): The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).
|
|
6620
6653
|
* - `plan_required` (402): The setting requires a higher plan. `message` says which.
|
|
6621
6654
|
* - `invalid_canonical_host` (400): `canonical_host` must be this account's own platform host or one of its verified custom domains.
|
|
6622
6655
|
* - `canonical_host_breaks_passkeys` (400): `canonical_host` is outside the account's current WebAuthn RP ID — every passkey already enrolled would stop working. Set `webauthn_rp_id` in the same request to a suffix that covers both.
|
|
@@ -6710,7 +6743,7 @@ export interface components {
|
|
|
6710
6743
|
* - `revision_not_found` (404): The revision is not in the flow history.
|
|
6711
6744
|
* @enum {string}
|
|
6712
6745
|
*/
|
|
6713
|
-
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" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "invalid_email" | "invalid_name" | "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" | "no_database_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";
|
|
6746
|
+
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" | "email_sender_domain_not_allowed" | "plan_required" | "invalid_canonical_host" | "canonical_host_breaks_passkeys" | "not_logged_in" | "session_already_revoked" | "invalid_token" | "not_owner" | "user_suspended" | "invalid_credentials" | "login_denied" | "signup_denied" | "client_credentials_denied" | "m2m_quota_exceeded" | "signup_disabled" | "email_taken" | "invalid_email" | "invalid_name" | "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" | "no_database_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";
|
|
6714
6747
|
/** @description Every error response has this shape. Branch on `error_code`, never on `message`: the message is written for a person and may change. */
|
|
6715
6748
|
ErrorResponse: {
|
|
6716
6749
|
/** @description The HTTP status, repeated. */
|
|
@@ -6791,6 +6824,10 @@ export interface operations {
|
|
|
6791
6824
|
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
6792
6825
|
*/
|
|
6793
6826
|
email_reply_to?: string | null;
|
|
6827
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
6828
|
+
email_from_name?: string | null;
|
|
6829
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
6830
|
+
email_from_address?: string | null;
|
|
6794
6831
|
welcome_email?: {
|
|
6795
6832
|
/**
|
|
6796
6833
|
* Format: uri
|
|
@@ -7140,6 +7177,10 @@ export interface operations {
|
|
|
7140
7177
|
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
7141
7178
|
*/
|
|
7142
7179
|
email_reply_to?: string | null;
|
|
7180
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
7181
|
+
email_from_name?: string | null;
|
|
7182
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
7183
|
+
email_from_address?: string | null;
|
|
7143
7184
|
welcome_email?: {
|
|
7144
7185
|
/**
|
|
7145
7186
|
* Format: uri
|
|
@@ -7377,6 +7418,10 @@ export interface operations {
|
|
|
7377
7418
|
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
7378
7419
|
*/
|
|
7379
7420
|
email_reply_to?: string | null;
|
|
7421
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
7422
|
+
email_from_name?: string | null;
|
|
7423
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
7424
|
+
email_from_address?: string | null;
|
|
7380
7425
|
welcome_email?: {
|
|
7381
7426
|
/**
|
|
7382
7427
|
* Format: uri
|
|
@@ -7583,6 +7628,7 @@ export interface operations {
|
|
|
7583
7628
|
};
|
|
7584
7629
|
/** Format: email */
|
|
7585
7630
|
email_reply_to?: string | null;
|
|
7631
|
+
email_from_name?: string | null;
|
|
7586
7632
|
welcome_email?: {
|
|
7587
7633
|
/**
|
|
7588
7634
|
* Format: uri
|
|
@@ -7686,6 +7732,10 @@ export interface operations {
|
|
|
7686
7732
|
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
7687
7733
|
*/
|
|
7688
7734
|
email_reply_to?: string | null;
|
|
7735
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
7736
|
+
email_from_name?: string | null;
|
|
7737
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
7738
|
+
email_from_address?: string | null;
|
|
7689
7739
|
welcome_email?: {
|
|
7690
7740
|
/**
|
|
7691
7741
|
* Format: uri
|
|
@@ -8883,6 +8933,235 @@ export interface operations {
|
|
|
8883
8933
|
};
|
|
8884
8934
|
};
|
|
8885
8935
|
};
|
|
8936
|
+
"account/email_sender": {
|
|
8937
|
+
parameters: {
|
|
8938
|
+
query?: never;
|
|
8939
|
+
header?: never;
|
|
8940
|
+
path: {
|
|
8941
|
+
account_id: string;
|
|
8942
|
+
};
|
|
8943
|
+
cookie?: never;
|
|
8944
|
+
};
|
|
8945
|
+
requestBody: {
|
|
8946
|
+
content: {
|
|
8947
|
+
"application/json": {
|
|
8948
|
+
/** Format: email */
|
|
8949
|
+
address: string | null;
|
|
8950
|
+
};
|
|
8951
|
+
};
|
|
8952
|
+
};
|
|
8953
|
+
responses: {
|
|
8954
|
+
/** @description AuthAccount */
|
|
8955
|
+
200: {
|
|
8956
|
+
headers: {
|
|
8957
|
+
[name: string]: unknown;
|
|
8958
|
+
};
|
|
8959
|
+
content: {
|
|
8960
|
+
"application/json": {
|
|
8961
|
+
/** @description AuthAccount ID */
|
|
8962
|
+
id: string;
|
|
8963
|
+
name: string;
|
|
8964
|
+
domain: string;
|
|
8965
|
+
slug: string;
|
|
8966
|
+
logo_src?: string | null;
|
|
8967
|
+
icon_src?: string | null;
|
|
8968
|
+
callback_hostnames: string[];
|
|
8969
|
+
/** @description Shared HMAC secret. Used when token_signing_alg is an HS* algorithm; ignored for RS*\/ES*\/PS*. */
|
|
8970
|
+
token_signature: string;
|
|
8971
|
+
/** @description JWA algorithm used to sign tokens issued by this Account. Today only RS256 is implemented. */
|
|
8972
|
+
token_signing_alg: "RS256";
|
|
8973
|
+
default_connection?: components["schemas"]["Connection"] | string | unknown;
|
|
8974
|
+
enabled_locales: string[];
|
|
8975
|
+
/** @description Free-form labels on the account. The dashboard stores the environment as an `env:<name>` tag (e.g. `env:production`, `env:staging`, `env:test`). */
|
|
8976
|
+
tags?: string[];
|
|
8977
|
+
team?: string | null;
|
|
8978
|
+
notification_settings: {
|
|
8979
|
+
/**
|
|
8980
|
+
* @description Send the built-in welcome email on user.created
|
|
8981
|
+
* @default false
|
|
8982
|
+
*/
|
|
8983
|
+
welcome_email_enabled: boolean;
|
|
8984
|
+
/**
|
|
8985
|
+
* @description Send a verification email automatically when a user is created with `email_verified=false` and an email address. The link in the email lands on `GET /verify-email?ticket=...` and flips `email_verified=true` with `email_verified_method=verification_flow`. When `false`, verification emails must be requested explicitly via `POST /user/:id/verify-email/start`.
|
|
8986
|
+
* @default false
|
|
8987
|
+
*/
|
|
8988
|
+
verify_email_auto_send: boolean;
|
|
8989
|
+
};
|
|
8990
|
+
/**
|
|
8991
|
+
* Format: email
|
|
8992
|
+
* @description Reply-To on every email this tenant sends to its users. Absent = no Reply-To, so a reply goes to the From address — which is a `no-reply@` mailbox nobody reads. Set it to your own support address if you want your users to be able to answer.
|
|
8993
|
+
*/
|
|
8994
|
+
email_reply_to?: string | null;
|
|
8995
|
+
/** @description Display name on every email this tenant sends to its users. Absent = the account `name`. */
|
|
8996
|
+
email_from_name?: string | null;
|
|
8997
|
+
/** @description Sender address of every email this tenant sends to its users. Absent = the platform default. Set by Faable only. */
|
|
8998
|
+
email_from_address?: string | null;
|
|
8999
|
+
welcome_email?: {
|
|
9000
|
+
/**
|
|
9001
|
+
* Format: uri
|
|
9002
|
+
* @description Where the welcome button sends the user. Defaults to `https://<first callback hostname>`. Point it at your app (not your marketing site) so a fresh user lands somewhere useful.
|
|
9003
|
+
*/
|
|
9004
|
+
cta_url?: string | null;
|
|
9005
|
+
/** @description Replaces the default one-line body ("Your account on … is ready to go."). Plain text, sent verbatim in every enabled locale. */
|
|
9006
|
+
body?: string | null;
|
|
9007
|
+
/** @description Rendered as a "Follow <account>" block after the button — GitHub, LinkedIn, X, YouTube… Empty or absent hides the block. */
|
|
9008
|
+
social_links?: {
|
|
9009
|
+
label: string;
|
|
9010
|
+
/** Format: uri */
|
|
9011
|
+
url: string;
|
|
9012
|
+
}[] | null;
|
|
9013
|
+
} | null;
|
|
9014
|
+
/** @description Policy for the user email-change flow. `new_only` (default) sends a single confirmation link to the new email. `old_and_new` requires the user to also click a link sent to the previous email before the swap takes effect — stricter, useful for tenants with higher-risk users. */
|
|
9015
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
9016
|
+
/**
|
|
9017
|
+
* @description Controls what happens to `user.email` on subsequent OAuth/federated logins when the user previously changed their email manually through this auth server (i.e. `user.email_change_locked_at` is set).
|
|
9018
|
+
*
|
|
9019
|
+
* - `preserve_manual` (default): the manually-set email wins. The federated provider's email is ignored on re-sync; `email` and `email_verified` are not touched. The identity link stays valid via `provider_user_id`, so the user can still log in with Google/etc.
|
|
9020
|
+
* - `always_sync`: the federated provider's email is always written back, overwriting any manual change. Useful for tenants whose source of truth for identity is the IdP (corporate SSO, etc.).
|
|
9021
|
+
*/
|
|
9022
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
9023
|
+
/** @description Which login methods the hosted login screen offers and in what order. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so a client can flip one flag without restating the rest. Absent everywhere = built-in defaults. */
|
|
9024
|
+
login_methods?: {
|
|
9025
|
+
/** @description Order in which the hosted login screen renders the available methods. Entries are Connection resource ids (`connection_xxx`) or the literal `passkey`. Methods not listed keep the built-in order (passwordless, database, social) after the listed ones; ids that no longer resolve are ignored. Listing an `oidc` connection here is also the only way to surface it on the login screen — see resolveLoginMethods(). */
|
|
9026
|
+
order?: string[];
|
|
9027
|
+
/** @description Connection resource ids (`connection_xxx`) this client does NOT offer. Removing a method here is enforced, not cosmetic: the connection disappears from the login screen AND `/authorize?connection=<id>` is refused for this client, the same as a connection whose `enabled_clients` excludes it. Use it to say "this app does not do Google"; use `enabled_clients` on the connection itself to say "that connection is not for this app". A connection has to pass both. */
|
|
9028
|
+
disabled_connections?: string[];
|
|
9029
|
+
/** @description Offer passkey (WebAuthn) as a primary login method on the hosted login screen. Defaults to false. */
|
|
9030
|
+
passkey_login_enabled?: boolean;
|
|
9031
|
+
/** @description Ask for the email first and only then reveal the methods that apply to it, instead of showing every method up front. Defaults to false. */
|
|
9032
|
+
identifier_first?: boolean;
|
|
9033
|
+
/** @description Surface the method the returning user chose last time. Defaults to false. */
|
|
9034
|
+
remember_last_method?: boolean;
|
|
9035
|
+
/** @description Invite users to create a passkey right after a successful login with another method. `offer` shows a hosted screen once per `passkey_promotion_snooze_days`, at most `passkey_promotion_max_prompts` times, to users who have no second factor yet; it never blocks the login. Requires `passkey_login_enabled`. Defaults to `off`. */
|
|
9036
|
+
passkey_promotion?: "off" | "offer";
|
|
9037
|
+
/** @description Days to wait before offering a passkey again to a user who dismissed it. Defaults to 30. */
|
|
9038
|
+
passkey_promotion_snooze_days?: number;
|
|
9039
|
+
/** @description How many times a user is offered a passkey over their lifetime. `0` switches the offer off for this tenant without changing `passkey_promotion`. Defaults to 3. */
|
|
9040
|
+
passkey_promotion_max_prompts?: number;
|
|
9041
|
+
/** @description Show a "Remember me on this device" checkbox on the password and email-code forms. `optional`: unchecked, the session ends when the browser closes; checked, it lasts `remember_me_days`. `off` (the default): no checkbox, every session lasts the built-in 30 days. */
|
|
9042
|
+
remember_me?: "off" | "optional";
|
|
9043
|
+
/** @description How long a session lasts when the user ticked "Remember me". Defaults to 30. */
|
|
9044
|
+
remember_me_days?: number;
|
|
9045
|
+
};
|
|
9046
|
+
/** @description The login flow bound to this account (`loginflow_xxx`). Absent = the flow compiled from the settings. A Client may bind its own. */
|
|
9047
|
+
login_flow?: string | null;
|
|
9048
|
+
/** @description Second-factor policy. Set on the Account as the tenant default; the same object on a Client overrides it **field by field**, so one app can require MFA without changing the rest. */
|
|
9049
|
+
mfa_policy?: {
|
|
9050
|
+
/** @description `off` (default) never challenges. `optional` challenges a user who has enrolled a factor, and lets everyone else in. `required` challenges everyone and sends users with no factor through enrolment during login — it never locks anyone out in place. */
|
|
9051
|
+
mode?: "off" | "optional" | "required";
|
|
9052
|
+
/** @description Which kinds of second factor satisfy the policy. Empty or unset means all of them. A user whose only factor is of a kind not listed here is treated as having none. */
|
|
9053
|
+
allowed_factors?: ("totp" | "webauthn")[];
|
|
9054
|
+
/** @description How long a browser that already passed a challenge may skip the next one. 0 (default) challenges every time. */
|
|
9055
|
+
remember_device_days?: number;
|
|
9056
|
+
};
|
|
9057
|
+
/** @description Password-recovery delivery channels. Set on the Account as the tenant default; the same object on a Client overrides it field by field, like `login_methods` and `mfa_policy`. */
|
|
9058
|
+
recovery_channels?: {
|
|
9059
|
+
/** @description Channels the tenant has turned on. `email` is always on regardless of this list: it is what every other channel falls back to. A channel listed here is still offered only if the platform can send it, the plan allows it and the user has a verified destination for it. */
|
|
9060
|
+
enabled?: ("email" | "sms" | "whatsapp" | "factor")[];
|
|
9061
|
+
/** @description The channel used when the user is not asked to choose. Falls back to `email` when it is not available for that user. */
|
|
9062
|
+
default?: "email" | "sms" | "whatsapp" | "factor";
|
|
9063
|
+
/** @description Channels the recovery screen offers the user to pick from, after they enter their identifier. Empty (the default) keeps today's behaviour: the default channel is used silently and the response never reveals whether the account exists. A non-empty list shows a picker with masked destinations — which does reveal that the account exists and which channels it has, the same trade-off Google and Microsoft make. A tenant decision. */
|
|
9064
|
+
visible?: ("email" | "sms" | "whatsapp" | "factor")[];
|
|
9065
|
+
};
|
|
9066
|
+
/** @description ISO 3166-1 alpha-2 country assumed for phone numbers written without an international prefix (`636647460` → `+34…` with `ES`). Needed before SMS can reach anyone: most people type their number without a prefix. */
|
|
9067
|
+
default_country_iso?: string | null;
|
|
9068
|
+
/** @description WebAuthn Relying Party ID for this tenant's passkeys. Defaults to the account domain. Set it to a registrable suffix you own (e.g. `acme.com`) when the login screen is served from more than one host — the RP ID is frozen into every credential at registration, so changing it afterwards invalidates every passkey already enrolled. */
|
|
9069
|
+
webauthn_rp_id?: string | null;
|
|
9070
|
+
/** @description When true, `/logout` asks the End-User to confirm before ending the session unless the request carries a verified `id_token_hint`. Off by default — a plain link to `/logout` is otherwise enough to sign anyone out (logout CSRF). */
|
|
9071
|
+
logout_confirm_required?: boolean;
|
|
9072
|
+
/** @description The one host this tenant's OIDC issuer and discovery document are always minted with, regardless of which host actually served the request — must be the account's own platform host or one of its verified custom domains. `/authorize` and `/logout` 302 here from any other host of the tenant. Unset (the default): every URL uses whatever host served the request, as before this field existed. Changing it can invalidate every WebAuthn passkey already enrolled unless `webauthn_rp_id` already covers the new host. */
|
|
9073
|
+
canonical_host?: string | null;
|
|
9074
|
+
/** @description AuthAccount creation date */
|
|
9075
|
+
createdAt: string;
|
|
9076
|
+
/** @description AuthAccount updated date */
|
|
9077
|
+
updatedAt?: string;
|
|
9078
|
+
};
|
|
9079
|
+
};
|
|
9080
|
+
};
|
|
9081
|
+
/**
|
|
9082
|
+
* @description `email_sender_domain_not_allowed` — The sender address is not in a domain this platform signs email for (AUTH_EMAIL_SENDER_DOMAINS).
|
|
9083
|
+
*
|
|
9084
|
+
* `validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.
|
|
9085
|
+
*/
|
|
9086
|
+
400: {
|
|
9087
|
+
headers: {
|
|
9088
|
+
[name: string]: unknown;
|
|
9089
|
+
};
|
|
9090
|
+
content: {
|
|
9091
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9092
|
+
/** @enum {string} */
|
|
9093
|
+
error_code?: "email_sender_domain_not_allowed" | "validation_error";
|
|
9094
|
+
};
|
|
9095
|
+
};
|
|
9096
|
+
};
|
|
9097
|
+
/** @description `unauthorized` — The request carries no valid credentials. */
|
|
9098
|
+
401: {
|
|
9099
|
+
headers: {
|
|
9100
|
+
[name: string]: unknown;
|
|
9101
|
+
};
|
|
9102
|
+
content: {
|
|
9103
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9104
|
+
/** @enum {string} */
|
|
9105
|
+
error_code?: "unauthorized";
|
|
9106
|
+
};
|
|
9107
|
+
};
|
|
9108
|
+
};
|
|
9109
|
+
/**
|
|
9110
|
+
* @description `forbidden` — The credentials are valid but do not allow this operation.
|
|
9111
|
+
*
|
|
9112
|
+
* `insufficient_scope` — The token lacks a scope this operation requires. `message` names it.
|
|
9113
|
+
*
|
|
9114
|
+
* `user_suspended` — The user is suspended and cannot sign in or be modified.
|
|
9115
|
+
*/
|
|
9116
|
+
403: {
|
|
9117
|
+
headers: {
|
|
9118
|
+
[name: string]: unknown;
|
|
9119
|
+
};
|
|
9120
|
+
content: {
|
|
9121
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9122
|
+
/** @enum {string} */
|
|
9123
|
+
error_code?: "forbidden" | "insufficient_scope" | "user_suspended";
|
|
9124
|
+
};
|
|
9125
|
+
};
|
|
9126
|
+
};
|
|
9127
|
+
/** @description `account_not_found` — No Auth Account matches the request (domain, header or token). */
|
|
9128
|
+
404: {
|
|
9129
|
+
headers: {
|
|
9130
|
+
[name: string]: unknown;
|
|
9131
|
+
};
|
|
9132
|
+
content: {
|
|
9133
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9134
|
+
/** @enum {string} */
|
|
9135
|
+
error_code?: "account_not_found";
|
|
9136
|
+
};
|
|
9137
|
+
};
|
|
9138
|
+
};
|
|
9139
|
+
/** @description `too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header. */
|
|
9140
|
+
429: {
|
|
9141
|
+
headers: {
|
|
9142
|
+
[name: string]: unknown;
|
|
9143
|
+
};
|
|
9144
|
+
content: {
|
|
9145
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9146
|
+
/** @enum {string} */
|
|
9147
|
+
error_code?: "too_many_requests";
|
|
9148
|
+
};
|
|
9149
|
+
};
|
|
9150
|
+
};
|
|
9151
|
+
/** @description `internal_error` — Unexpected server error. Retry later; the request id is logged. */
|
|
9152
|
+
500: {
|
|
9153
|
+
headers: {
|
|
9154
|
+
[name: string]: unknown;
|
|
9155
|
+
};
|
|
9156
|
+
content: {
|
|
9157
|
+
"application/json": components["schemas"]["ErrorResponse"] & {
|
|
9158
|
+
/** @enum {string} */
|
|
9159
|
+
error_code?: "internal_error";
|
|
9160
|
+
};
|
|
9161
|
+
};
|
|
9162
|
+
};
|
|
9163
|
+
};
|
|
9164
|
+
};
|
|
8886
9165
|
"connection/list": {
|
|
8887
9166
|
parameters: {
|
|
8888
9167
|
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.54";
|
|
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 = "d5258a3";
|
|
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
|