@faable/auth-sdk 2.7.51 → 2.7.53

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.
@@ -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;
@@ -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"];
@@ -28,6 +28,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
28
28
  * @throws {FaableApiError} `team_required` (400) — An Auth Account must belong to a project (team).
29
29
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
30
30
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
31
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
31
32
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
32
33
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
33
34
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
@@ -56,6 +57,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
56
57
  verify_email_auto_send: boolean;
57
58
  };
58
59
  email_reply_to?: string | null | undefined;
60
+ email_from_name?: string | null | undefined;
61
+ email_from_address?: string | null | undefined;
59
62
  welcome_email?: {
60
63
  cta_url?: string | null | undefined;
61
64
  body?: string | null | undefined;
@@ -131,6 +134,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
131
134
  verify_email_auto_send: boolean;
132
135
  };
133
136
  email_reply_to?: string | null | undefined;
137
+ email_from_name?: string | null | undefined;
138
+ email_from_address?: string | null | undefined;
134
139
  welcome_email?: {
135
140
  cta_url?: string | null | undefined;
136
141
  body?: string | null | undefined;
@@ -190,6 +195,84 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
190
195
  * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
191
196
  */
192
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
+ }>;
193
276
  /**
194
277
  * `GET /account/{account_id}` — operationId: `account/get`
195
278
  *
@@ -228,6 +311,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
228
311
  verify_email_auto_send: boolean;
229
312
  };
230
313
  email_reply_to?: string | null | undefined;
314
+ email_from_name?: string | null | undefined;
315
+ email_from_address?: string | null | undefined;
231
316
  welcome_email?: {
232
317
  cta_url?: string | null | undefined;
233
318
  body?: string | null | undefined;
@@ -327,6 +412,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
327
412
  verify_email_auto_send: boolean;
328
413
  };
329
414
  email_reply_to?: string | null | undefined;
415
+ email_from_name?: string | null | undefined;
416
+ email_from_address?: string | null | undefined;
330
417
  welcome_email?: {
331
418
  cta_url?: string | null | undefined;
332
419
  body?: string | null | undefined;
@@ -386,6 +473,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
386
473
  verify_email_auto_send: boolean;
387
474
  };
388
475
  email_reply_to?: string | null | undefined;
476
+ email_from_name?: string | null | undefined;
477
+ email_from_address?: string | null | undefined;
389
478
  welcome_email?: {
390
479
  cta_url?: string | null | undefined;
391
480
  body?: string | null | undefined;
@@ -448,6 +537,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
448
537
  verify_email_auto_send: boolean;
449
538
  };
450
539
  email_reply_to?: string | null | undefined;
540
+ email_from_name?: string | null | undefined;
541
+ email_from_address?: string | null | undefined;
451
542
  welcome_email?: {
452
543
  cta_url?: string | null | undefined;
453
544
  body?: string | null | undefined;
@@ -652,6 +743,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
652
743
  * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
653
744
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
654
745
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
746
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
655
747
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
656
748
  * @throws {FaableApiError} `plan_required` (402) — The setting requires a higher plan. `message` says which.
657
749
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
@@ -681,6 +773,8 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
681
773
  verify_email_auto_send: boolean;
682
774
  };
683
775
  email_reply_to?: string | null | undefined;
776
+ email_from_name?: string | null | undefined;
777
+ email_from_address?: string | null | undefined;
684
778
  welcome_email?: {
685
779
  cta_url?: string | null | undefined;
686
780
  body?: string | null | undefined;
@@ -5318,6 +5412,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5318
5412
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
5319
5413
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
5320
5414
  * @throws {FaableApiError} `invalid_phone` (400) — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
5415
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
5321
5416
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
5322
5417
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
5323
5418
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
@@ -5973,6 +6068,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
5973
6068
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
5974
6069
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
5975
6070
  * @throws {FaableApiError} `invalid_phone` (400) — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
6071
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
5976
6072
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
5977
6073
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
5978
6074
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
@@ -19,6 +19,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
19
19
  * @throws {FaableApiError} `team_required` (400) — An Auth Account must belong to a project (team).
20
20
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
21
21
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
22
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
22
23
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
23
24
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
24
25
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
@@ -72,6 +73,27 @@ export class GeneratedFaableAuthApi extends FaableApi {
72
73
  requireId("account_id", account_id);
73
74
  return this.fetcher.delete(`/account/${account_id}`);
74
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
+ }
75
97
  /**
76
98
  * `GET /account/{account_id}` — operationId: `account/get`
77
99
  *
@@ -226,6 +248,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
226
248
  * @throws {FaableApiError} `invalid_id` (400) — The id in the path is not a valid id for this resource.
227
249
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
228
250
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
251
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
229
252
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
230
253
  * @throws {FaableApiError} `plan_required` (402) — The setting requires a higher plan. `message` says which.
231
254
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
@@ -2036,6 +2059,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
2036
2059
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
2037
2060
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2038
2061
  * @throws {FaableApiError} `invalid_phone` (400) — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
2062
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
2039
2063
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2040
2064
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2041
2065
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
@@ -2284,6 +2308,7 @@ export class GeneratedFaableAuthApi extends FaableApi {
2284
2308
  * @throws {FaableApiError} `already_exists` (400) — A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.
2285
2309
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
2286
2310
  * @throws {FaableApiError} `invalid_phone` (400) — The phone number is not E.164 and could not be resolved with the account default country. Include the country code.
2311
+ * @throws {FaableApiError} `invalid_name` (400) — The name contains a link. `message` says which field.
2287
2312
  * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
2288
2313
  * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
2289
2314
  * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.