@faable/auth-sdk 1.3.12 → 1.3.13
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 +8 -0
- package/dist/api/types.d.ts +589 -2
- package/package.json +1 -1
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
29
29
|
notification_settings: {
|
|
30
30
|
welcome_email_enabled: boolean;
|
|
31
31
|
};
|
|
32
|
+
email_change_verification_mode?: "new_only" | "old_and_new" | undefined;
|
|
33
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync" | undefined;
|
|
32
34
|
createdAt: string;
|
|
33
35
|
updatedAt?: string | undefined;
|
|
34
36
|
}>;
|
|
@@ -45,6 +47,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
45
47
|
nickname?: string | null | undefined;
|
|
46
48
|
email?: string | null | undefined;
|
|
47
49
|
email_verified: boolean;
|
|
50
|
+
email_change_locked_at?: string | null | undefined;
|
|
48
51
|
phone?: string | null | undefined;
|
|
49
52
|
phone_verified: boolean;
|
|
50
53
|
country_iso?: string | null | undefined;
|
|
@@ -89,6 +92,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
89
92
|
nickname?: string | null | undefined;
|
|
90
93
|
email?: string | null | undefined;
|
|
91
94
|
email_verified: boolean;
|
|
95
|
+
email_change_locked_at?: string | null | undefined;
|
|
92
96
|
phone?: string | null | undefined;
|
|
93
97
|
phone_verified: boolean;
|
|
94
98
|
country_iso?: string | null | undefined;
|
|
@@ -136,6 +140,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
136
140
|
nickname?: string | null | undefined;
|
|
137
141
|
email?: string | null | undefined;
|
|
138
142
|
email_verified: boolean;
|
|
143
|
+
email_change_locked_at?: string | null | undefined;
|
|
139
144
|
phone?: string | null | undefined;
|
|
140
145
|
phone_verified: boolean;
|
|
141
146
|
country_iso?: string | null | undefined;
|
|
@@ -181,6 +186,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
181
186
|
nickname?: string | null | undefined;
|
|
182
187
|
email?: string | null | undefined;
|
|
183
188
|
email_verified: boolean;
|
|
189
|
+
email_change_locked_at?: string | null | undefined;
|
|
184
190
|
phone?: string | null | undefined;
|
|
185
191
|
phone_verified: boolean;
|
|
186
192
|
country_iso?: string | null | undefined;
|
|
@@ -225,6 +231,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
225
231
|
nickname?: string | null | undefined;
|
|
226
232
|
email?: string | null | undefined;
|
|
227
233
|
email_verified: boolean;
|
|
234
|
+
email_change_locked_at?: string | null | undefined;
|
|
228
235
|
phone?: string | null | undefined;
|
|
229
236
|
phone_verified: boolean;
|
|
230
237
|
country_iso?: string | null | undefined;
|
|
@@ -269,6 +276,7 @@ export declare class FaableAuthApi extends FaableApi {
|
|
|
269
276
|
nickname?: string | null | undefined;
|
|
270
277
|
email?: string | null | undefined;
|
|
271
278
|
email_verified: boolean;
|
|
279
|
+
email_change_locked_at?: string | null | undefined;
|
|
272
280
|
phone?: string | null | undefined;
|
|
273
281
|
phone_verified: boolean;
|
|
274
282
|
country_iso?: string | null | undefined;
|
package/dist/api/types.d.ts
CHANGED
|
@@ -243,6 +243,46 @@ export interface paths {
|
|
|
243
243
|
patch?: never;
|
|
244
244
|
trace?: never;
|
|
245
245
|
};
|
|
246
|
+
"/user/{user_id}/change-email": {
|
|
247
|
+
parameters: {
|
|
248
|
+
query?: never;
|
|
249
|
+
header?: never;
|
|
250
|
+
path?: never;
|
|
251
|
+
cookie?: never;
|
|
252
|
+
};
|
|
253
|
+
get?: never;
|
|
254
|
+
put?: never;
|
|
255
|
+
/**
|
|
256
|
+
* Start the user's email change flow
|
|
257
|
+
* @description Initiates the email-change flow for the given user. Validates the new email, ensures it is not already in use in the tenant, revokes any pending change for the same user, creates a Ticket (`type='change_email'`), and sends a verification email to the new address. Re-authentication is not required — an active session/Bearer is enough. The change does NOT take effect until the user clicks the link in the email and confirms via `/change-email-confirm`.
|
|
258
|
+
*/
|
|
259
|
+
post: operations["user/changeEmail"];
|
|
260
|
+
delete?: never;
|
|
261
|
+
options?: never;
|
|
262
|
+
head?: never;
|
|
263
|
+
patch?: never;
|
|
264
|
+
trace?: never;
|
|
265
|
+
};
|
|
266
|
+
"/change-email-verify": {
|
|
267
|
+
parameters: {
|
|
268
|
+
query?: never;
|
|
269
|
+
header?: never;
|
|
270
|
+
path?: never;
|
|
271
|
+
cookie?: never;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Verify a change-email ticket and apply the change
|
|
275
|
+
* @description Entry point for the link sent to the new email. Consumes the ticket, applies the email swap (in `new_only` mode) or issues a secondary verification ticket to the old email (in `old_and_new` mode, first step). Redirects to the `redirect_uri` supplied at flow start with `?status=applied|pending_old` appended; falls back to `/flow/email-change-done` on the auth host when no `redirect_uri` was given.
|
|
276
|
+
*/
|
|
277
|
+
get: operations["user_change_email_verify"];
|
|
278
|
+
put?: never;
|
|
279
|
+
post?: never;
|
|
280
|
+
delete?: never;
|
|
281
|
+
options?: never;
|
|
282
|
+
head?: never;
|
|
283
|
+
patch?: never;
|
|
284
|
+
trace?: never;
|
|
285
|
+
};
|
|
246
286
|
"/identity": {
|
|
247
287
|
parameters: {
|
|
248
288
|
query?: never;
|
|
@@ -328,7 +368,11 @@ export interface paths {
|
|
|
328
368
|
*/
|
|
329
369
|
get: operations["role/get"];
|
|
330
370
|
put?: never;
|
|
331
|
-
|
|
371
|
+
/**
|
|
372
|
+
* Update Roles in Account
|
|
373
|
+
* @description Update Roles in Account
|
|
374
|
+
*/
|
|
375
|
+
post: operations["role/update"];
|
|
332
376
|
/**
|
|
333
377
|
* Delete Role in Account
|
|
334
378
|
* @description Delete Role in Account
|
|
@@ -448,7 +492,11 @@ export interface paths {
|
|
|
448
492
|
*/
|
|
449
493
|
get: operations["team/get"];
|
|
450
494
|
put?: never;
|
|
451
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Update Teams in Account
|
|
497
|
+
* @description Update Teams in Account
|
|
498
|
+
*/
|
|
499
|
+
post: operations["team/update"];
|
|
452
500
|
/**
|
|
453
501
|
* Delete Team in Account
|
|
454
502
|
* @description Delete Team in Account
|
|
@@ -551,6 +599,70 @@ export interface paths {
|
|
|
551
599
|
patch?: never;
|
|
552
600
|
trace?: never;
|
|
553
601
|
};
|
|
602
|
+
"/team/{team_id}/invite": {
|
|
603
|
+
parameters: {
|
|
604
|
+
query?: never;
|
|
605
|
+
header?: never;
|
|
606
|
+
path?: never;
|
|
607
|
+
cookie?: never;
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* List pending invites for a Team
|
|
611
|
+
* @description Returns all pending (not consumed, not expired) team invites for the given team. Accepts a FaableQL `query` parameter on the `email` field.
|
|
612
|
+
*/
|
|
613
|
+
get: operations["team/listInvites"];
|
|
614
|
+
put?: never;
|
|
615
|
+
/**
|
|
616
|
+
* Invite a user to a Team by email
|
|
617
|
+
* @description Invites a user by email. `mode='auto'` (default) adds the user directly when the email already corresponds to a user in this tenant and falls back to a ticketed invite + email otherwise. `mode='invite'` always issues a ticket + email even when the user exists. Re-inviting the same email to the same team invalidates the previous pending invite.
|
|
618
|
+
*/
|
|
619
|
+
post: operations["team/invite"];
|
|
620
|
+
delete?: never;
|
|
621
|
+
options?: never;
|
|
622
|
+
head?: never;
|
|
623
|
+
patch?: never;
|
|
624
|
+
trace?: never;
|
|
625
|
+
};
|
|
626
|
+
"/team/{team_id}/invite/{ticket_id}": {
|
|
627
|
+
parameters: {
|
|
628
|
+
query?: never;
|
|
629
|
+
header?: never;
|
|
630
|
+
path?: never;
|
|
631
|
+
cookie?: never;
|
|
632
|
+
};
|
|
633
|
+
get?: never;
|
|
634
|
+
put?: never;
|
|
635
|
+
post?: never;
|
|
636
|
+
/**
|
|
637
|
+
* Revoke a pending team invite
|
|
638
|
+
* @description Marks a pending team invite as consumed so it can no longer be accepted. Returns 400 if the invite is already consumed and 404 if it does not exist or belongs to a different team.
|
|
639
|
+
*/
|
|
640
|
+
delete: operations["team/revokeInvite"];
|
|
641
|
+
options?: never;
|
|
642
|
+
head?: never;
|
|
643
|
+
patch?: never;
|
|
644
|
+
trace?: never;
|
|
645
|
+
};
|
|
646
|
+
"/invite-verify": {
|
|
647
|
+
parameters: {
|
|
648
|
+
query?: never;
|
|
649
|
+
header?: never;
|
|
650
|
+
path?: never;
|
|
651
|
+
cookie?: never;
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Verify a team-invite ticket and add the user to the team
|
|
655
|
+
* @description Entry point for the link sent to the invitee. Consumes the ticket, creates the user if needed (with `email_verified=true` — the click proves ownership), and adds them to the team with the invited roles. Then redirects to the `redirect_uri` supplied at invite time with `?status=accepted` appended; falls back to `/flow/team-invite-done` on the auth host when no `redirect_uri` was given. Idempotent if the user is already a member.
|
|
656
|
+
*/
|
|
657
|
+
get: operations["team_invite_verify"];
|
|
658
|
+
put?: never;
|
|
659
|
+
post?: never;
|
|
660
|
+
delete?: never;
|
|
661
|
+
options?: never;
|
|
662
|
+
head?: never;
|
|
663
|
+
patch?: never;
|
|
664
|
+
trace?: never;
|
|
665
|
+
};
|
|
554
666
|
"/api": {
|
|
555
667
|
parameters: {
|
|
556
668
|
query?: never;
|
|
@@ -1327,6 +1439,15 @@ export interface components {
|
|
|
1327
1439
|
*/
|
|
1328
1440
|
welcome_email_enabled: boolean;
|
|
1329
1441
|
};
|
|
1442
|
+
/** @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. */
|
|
1443
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
1444
|
+
/**
|
|
1445
|
+
* @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).
|
|
1446
|
+
*
|
|
1447
|
+
* - `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.
|
|
1448
|
+
* - `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.).
|
|
1449
|
+
*/
|
|
1450
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
1330
1451
|
/** @description AuthAccount creation date */
|
|
1331
1452
|
createdAt: string;
|
|
1332
1453
|
/** @description AuthAccount updated date */
|
|
@@ -1341,6 +1462,15 @@ export interface components {
|
|
|
1341
1462
|
*/
|
|
1342
1463
|
welcome_email_enabled: boolean;
|
|
1343
1464
|
};
|
|
1465
|
+
/** @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. */
|
|
1466
|
+
EmailChangeVerificationMode: "new_only" | "old_and_new";
|
|
1467
|
+
/**
|
|
1468
|
+
* @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).
|
|
1469
|
+
*
|
|
1470
|
+
* - `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.
|
|
1471
|
+
* - `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.).
|
|
1472
|
+
*/
|
|
1473
|
+
EmailOAuthSyncPolicy: "preserve_manual" | "always_sync";
|
|
1344
1474
|
/** @description Connection */
|
|
1345
1475
|
Connection: {
|
|
1346
1476
|
/** @description Connection ID */
|
|
@@ -1516,6 +1646,8 @@ export interface components {
|
|
|
1516
1646
|
* @default false
|
|
1517
1647
|
*/
|
|
1518
1648
|
email_verified: boolean;
|
|
1649
|
+
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
1650
|
+
email_change_locked_at?: string | null;
|
|
1519
1651
|
/** @description contact phone number */
|
|
1520
1652
|
phone?: string | null;
|
|
1521
1653
|
/** @description phone is verified */
|
|
@@ -1783,6 +1915,13 @@ export interface components {
|
|
|
1783
1915
|
RoleMetadataCreate: {
|
|
1784
1916
|
[key: string]: unknown;
|
|
1785
1917
|
};
|
|
1918
|
+
/** @description Partial update for a Role. Only the supplied fields are modified. */
|
|
1919
|
+
RoleUpdate: {
|
|
1920
|
+
/** @description New human-readable identifier for the role. */
|
|
1921
|
+
name?: string;
|
|
1922
|
+
/** @description New free-form description of what users in this role do. */
|
|
1923
|
+
description?: string;
|
|
1924
|
+
};
|
|
1786
1925
|
/** @description RoleMember */
|
|
1787
1926
|
RoleMember: {
|
|
1788
1927
|
/** @description RoleMember ID */
|
|
@@ -1879,6 +2018,21 @@ export interface components {
|
|
|
1879
2018
|
TeamMetadataCreate: {
|
|
1880
2019
|
[key: string]: unknown;
|
|
1881
2020
|
};
|
|
2021
|
+
/** @description Partial update for a Team. Only the supplied fields are modified. `slug` is auto-derived from `name` and is not user-editable. */
|
|
2022
|
+
TeamUpdate: {
|
|
2023
|
+
/** @description New human-readable name for the team. */
|
|
2024
|
+
name?: string;
|
|
2025
|
+
/** @description New free-form description for the team. */
|
|
2026
|
+
description?: string;
|
|
2027
|
+
/** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
|
|
2028
|
+
metadata?: {
|
|
2029
|
+
[key: string]: unknown;
|
|
2030
|
+
};
|
|
2031
|
+
};
|
|
2032
|
+
/** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
|
|
2033
|
+
TeamUpdateMetadata: {
|
|
2034
|
+
[key: string]: unknown;
|
|
2035
|
+
};
|
|
1882
2036
|
/** @description TeamMember */
|
|
1883
2037
|
TeamMember: {
|
|
1884
2038
|
/** @description TeamMember ID */
|
|
@@ -1919,6 +2073,14 @@ export interface components {
|
|
|
1919
2073
|
* ]
|
|
1920
2074
|
*/
|
|
1921
2075
|
users: string[];
|
|
2076
|
+
/**
|
|
2077
|
+
* @description Role ids to grant to the added members within the scope of this team.
|
|
2078
|
+
* @default []
|
|
2079
|
+
* @example [
|
|
2080
|
+
* "role_6555fd293acc2f0fac0e3452"
|
|
2081
|
+
* ]
|
|
2082
|
+
*/
|
|
2083
|
+
roles: string[];
|
|
1922
2084
|
};
|
|
1923
2085
|
/** @description A permission exposed by an API: a single value that may end up in the `permissions` claim of an access_token, plus a human-readable description shown in the consent prompt. */
|
|
1924
2086
|
Permission: {
|
|
@@ -2656,6 +2818,15 @@ export interface operations {
|
|
|
2656
2818
|
*/
|
|
2657
2819
|
welcome_email_enabled: boolean;
|
|
2658
2820
|
};
|
|
2821
|
+
/** @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. */
|
|
2822
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
2823
|
+
/**
|
|
2824
|
+
* @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).
|
|
2825
|
+
*
|
|
2826
|
+
* - `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.
|
|
2827
|
+
* - `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.).
|
|
2828
|
+
*/
|
|
2829
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
2659
2830
|
/** @description AuthAccount creation date */
|
|
2660
2831
|
createdAt: string;
|
|
2661
2832
|
/** @description AuthAccount updated date */
|
|
@@ -2753,6 +2924,15 @@ export interface operations {
|
|
|
2753
2924
|
*/
|
|
2754
2925
|
welcome_email_enabled: boolean;
|
|
2755
2926
|
};
|
|
2927
|
+
/** @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. */
|
|
2928
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
2929
|
+
/**
|
|
2930
|
+
* @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).
|
|
2931
|
+
*
|
|
2932
|
+
* - `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.
|
|
2933
|
+
* - `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.).
|
|
2934
|
+
*/
|
|
2935
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
2756
2936
|
/** @description AuthAccount creation date */
|
|
2757
2937
|
createdAt: string;
|
|
2758
2938
|
/** @description AuthAccount updated date */
|
|
@@ -2805,6 +2985,15 @@ export interface operations {
|
|
|
2805
2985
|
*/
|
|
2806
2986
|
welcome_email_enabled: boolean;
|
|
2807
2987
|
};
|
|
2988
|
+
/** @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. */
|
|
2989
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
2990
|
+
/**
|
|
2991
|
+
* @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).
|
|
2992
|
+
*
|
|
2993
|
+
* - `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.
|
|
2994
|
+
* - `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.).
|
|
2995
|
+
*/
|
|
2996
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
2808
2997
|
/** @description AuthAccount creation date */
|
|
2809
2998
|
createdAt: string;
|
|
2810
2999
|
/** @description AuthAccount updated date */
|
|
@@ -2865,6 +3054,15 @@ export interface operations {
|
|
|
2865
3054
|
*/
|
|
2866
3055
|
welcome_email_enabled: boolean;
|
|
2867
3056
|
};
|
|
3057
|
+
/** @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. */
|
|
3058
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
3059
|
+
/**
|
|
3060
|
+
* @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).
|
|
3061
|
+
*
|
|
3062
|
+
* - `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.
|
|
3063
|
+
* - `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.).
|
|
3064
|
+
*/
|
|
3065
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
2868
3066
|
/** @description AuthAccount creation date */
|
|
2869
3067
|
createdAt: string;
|
|
2870
3068
|
/** @description AuthAccount updated date */
|
|
@@ -2926,6 +3124,15 @@ export interface operations {
|
|
|
2926
3124
|
*/
|
|
2927
3125
|
welcome_email_enabled: boolean;
|
|
2928
3126
|
};
|
|
3127
|
+
/** @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. */
|
|
3128
|
+
email_change_verification_mode?: "new_only" | "old_and_new";
|
|
3129
|
+
/**
|
|
3130
|
+
* @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).
|
|
3131
|
+
*
|
|
3132
|
+
* - `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.
|
|
3133
|
+
* - `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.).
|
|
3134
|
+
*/
|
|
3135
|
+
email_oauth_sync_policy?: "preserve_manual" | "always_sync";
|
|
2929
3136
|
/** @description AuthAccount creation date */
|
|
2930
3137
|
createdAt: string;
|
|
2931
3138
|
/** @description AuthAccount updated date */
|
|
@@ -3450,6 +3657,8 @@ export interface operations {
|
|
|
3450
3657
|
* @default false
|
|
3451
3658
|
*/
|
|
3452
3659
|
email_verified: boolean;
|
|
3660
|
+
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
3661
|
+
email_change_locked_at?: string | null;
|
|
3453
3662
|
/** @description contact phone number */
|
|
3454
3663
|
phone?: string | null;
|
|
3455
3664
|
/** @description phone is verified */
|
|
@@ -3559,6 +3768,8 @@ export interface operations {
|
|
|
3559
3768
|
* @default false
|
|
3560
3769
|
*/
|
|
3561
3770
|
email_verified: boolean;
|
|
3771
|
+
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
3772
|
+
email_change_locked_at?: string | null;
|
|
3562
3773
|
/** @description contact phone number */
|
|
3563
3774
|
phone?: string | null;
|
|
3564
3775
|
/** @description phone is verified */
|
|
@@ -3702,6 +3913,8 @@ export interface operations {
|
|
|
3702
3913
|
* @default false
|
|
3703
3914
|
*/
|
|
3704
3915
|
email_verified: boolean;
|
|
3916
|
+
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
3917
|
+
email_change_locked_at?: string | null;
|
|
3705
3918
|
/** @description contact phone number */
|
|
3706
3919
|
phone?: string | null;
|
|
3707
3920
|
/** @description phone is verified */
|
|
@@ -3792,6 +4005,65 @@ export interface operations {
|
|
|
3792
4005
|
};
|
|
3793
4006
|
};
|
|
3794
4007
|
};
|
|
4008
|
+
"user/changeEmail": {
|
|
4009
|
+
parameters: {
|
|
4010
|
+
query?: never;
|
|
4011
|
+
header?: never;
|
|
4012
|
+
path: {
|
|
4013
|
+
user_id: string;
|
|
4014
|
+
};
|
|
4015
|
+
cookie?: never;
|
|
4016
|
+
};
|
|
4017
|
+
/** @description Payload for `POST /user/:user_id/change-email`. Triggers the verification flow: a Ticket is created and an email is sent to the new address with a confirmation link. */
|
|
4018
|
+
requestBody: {
|
|
4019
|
+
content: {
|
|
4020
|
+
"application/json": {
|
|
4021
|
+
/** @description The email address the user wants to switch to. */
|
|
4022
|
+
new_email: string;
|
|
4023
|
+
/** @description Override the account-wide policy. Can only raise the bar: passing `old_and_new` forces double verification; `new_only` is ignored if the account requires `old_and_new`. */
|
|
4024
|
+
verification_mode?: "new_only" | "old_and_new";
|
|
4025
|
+
/** @description Where to send the user after they click the link in the verification email. The status of the operation is appended as a `?status=applied|pending_old` query param so the calling app can render the right screen. When omitted, the user lands on the auth host's `/flow/email-change-done` fallback. */
|
|
4026
|
+
redirect_uri?: string;
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
};
|
|
4030
|
+
responses: {
|
|
4031
|
+
/** @description Default Response */
|
|
4032
|
+
200: {
|
|
4033
|
+
headers: {
|
|
4034
|
+
[name: string]: unknown;
|
|
4035
|
+
};
|
|
4036
|
+
content: {
|
|
4037
|
+
"application/json": {
|
|
4038
|
+
/** @enum {string} */
|
|
4039
|
+
status: "verification_sent";
|
|
4040
|
+
ticket_id: string;
|
|
4041
|
+
verification_mode: "new_only" | "old_and_new";
|
|
4042
|
+
};
|
|
4043
|
+
};
|
|
4044
|
+
};
|
|
4045
|
+
};
|
|
4046
|
+
};
|
|
4047
|
+
user_change_email_verify: {
|
|
4048
|
+
parameters: {
|
|
4049
|
+
query: {
|
|
4050
|
+
ticket: string;
|
|
4051
|
+
};
|
|
4052
|
+
header?: never;
|
|
4053
|
+
path?: never;
|
|
4054
|
+
cookie?: never;
|
|
4055
|
+
};
|
|
4056
|
+
requestBody?: never;
|
|
4057
|
+
responses: {
|
|
4058
|
+
/** @description Default Response */
|
|
4059
|
+
200: {
|
|
4060
|
+
headers: {
|
|
4061
|
+
[name: string]: unknown;
|
|
4062
|
+
};
|
|
4063
|
+
content?: never;
|
|
4064
|
+
};
|
|
4065
|
+
};
|
|
4066
|
+
};
|
|
3795
4067
|
"identity/list": {
|
|
3796
4068
|
parameters: {
|
|
3797
4069
|
query?: {
|
|
@@ -4091,6 +4363,61 @@ export interface operations {
|
|
|
4091
4363
|
};
|
|
4092
4364
|
};
|
|
4093
4365
|
};
|
|
4366
|
+
"role/update": {
|
|
4367
|
+
parameters: {
|
|
4368
|
+
query?: never;
|
|
4369
|
+
header?: never;
|
|
4370
|
+
path: {
|
|
4371
|
+
role_id: string;
|
|
4372
|
+
};
|
|
4373
|
+
cookie?: never;
|
|
4374
|
+
};
|
|
4375
|
+
/** @description Partial update for a Role. Only the supplied fields are modified. */
|
|
4376
|
+
requestBody: {
|
|
4377
|
+
content: {
|
|
4378
|
+
"application/json": {
|
|
4379
|
+
/** @description New human-readable identifier for the role. */
|
|
4380
|
+
name?: string;
|
|
4381
|
+
/** @description New free-form description of what users in this role do. */
|
|
4382
|
+
description?: string;
|
|
4383
|
+
};
|
|
4384
|
+
};
|
|
4385
|
+
};
|
|
4386
|
+
responses: {
|
|
4387
|
+
/** @description Role */
|
|
4388
|
+
200: {
|
|
4389
|
+
headers: {
|
|
4390
|
+
[name: string]: unknown;
|
|
4391
|
+
};
|
|
4392
|
+
content: {
|
|
4393
|
+
"application/json": {
|
|
4394
|
+
/** @description Role ID */
|
|
4395
|
+
id: string;
|
|
4396
|
+
/**
|
|
4397
|
+
* @description Short, human-readable identifier for the role (e.g. `admin`, `editor`, `billing-manager`). Surfaced in the dashboard role pickers.
|
|
4398
|
+
* @example admin
|
|
4399
|
+
*/
|
|
4400
|
+
name: string;
|
|
4401
|
+
/** @description Free-form explanation of what users in this role are expected to do or have access to. Shown alongside the role in the dashboard. */
|
|
4402
|
+
description: string;
|
|
4403
|
+
/** @description Object is related with this account */
|
|
4404
|
+
account: string;
|
|
4405
|
+
/**
|
|
4406
|
+
* @description RoleMetadata
|
|
4407
|
+
* @default {}
|
|
4408
|
+
*/
|
|
4409
|
+
metadata: {
|
|
4410
|
+
[key: string]: unknown;
|
|
4411
|
+
};
|
|
4412
|
+
/** @description Role creation date */
|
|
4413
|
+
createdAt: string;
|
|
4414
|
+
/** @description Role updated date */
|
|
4415
|
+
updatedAt?: string;
|
|
4416
|
+
};
|
|
4417
|
+
};
|
|
4418
|
+
};
|
|
4419
|
+
};
|
|
4420
|
+
};
|
|
4094
4421
|
"role/remove": {
|
|
4095
4422
|
parameters: {
|
|
4096
4423
|
query?: never;
|
|
@@ -4485,6 +4812,72 @@ export interface operations {
|
|
|
4485
4812
|
};
|
|
4486
4813
|
};
|
|
4487
4814
|
};
|
|
4815
|
+
"team/update": {
|
|
4816
|
+
parameters: {
|
|
4817
|
+
query?: never;
|
|
4818
|
+
header?: never;
|
|
4819
|
+
path: {
|
|
4820
|
+
team_id: string;
|
|
4821
|
+
};
|
|
4822
|
+
cookie?: never;
|
|
4823
|
+
};
|
|
4824
|
+
/** @description Partial update for a Team. Only the supplied fields are modified. `slug` is auto-derived from `name` and is not user-editable. */
|
|
4825
|
+
requestBody: {
|
|
4826
|
+
content: {
|
|
4827
|
+
"application/json": {
|
|
4828
|
+
/** @description New human-readable name for the team. */
|
|
4829
|
+
name?: string;
|
|
4830
|
+
/** @description New free-form description for the team. */
|
|
4831
|
+
description?: string;
|
|
4832
|
+
/** @description Arbitrary key/value pairs attached to the team. Replaces the previous metadata entirely. */
|
|
4833
|
+
metadata?: {
|
|
4834
|
+
[key: string]: unknown;
|
|
4835
|
+
};
|
|
4836
|
+
};
|
|
4837
|
+
};
|
|
4838
|
+
};
|
|
4839
|
+
responses: {
|
|
4840
|
+
/** @description Team */
|
|
4841
|
+
200: {
|
|
4842
|
+
headers: {
|
|
4843
|
+
[name: string]: unknown;
|
|
4844
|
+
};
|
|
4845
|
+
content: {
|
|
4846
|
+
"application/json": {
|
|
4847
|
+
/** @description Team ID */
|
|
4848
|
+
id: string;
|
|
4849
|
+
/**
|
|
4850
|
+
* @description Human-readable name of the team. Shown in the dashboard and in team-picker UI.
|
|
4851
|
+
* @example Acme Engineering
|
|
4852
|
+
*/
|
|
4853
|
+
name: string;
|
|
4854
|
+
/**
|
|
4855
|
+
* @description URL-safe identifier auto-derived from `name`. Unique within the tenant; used in routes that address a team by slug.
|
|
4856
|
+
* @example acme-engineering
|
|
4857
|
+
*/
|
|
4858
|
+
slug: string;
|
|
4859
|
+
/** @description Optional free-form description of the team. */
|
|
4860
|
+
description: string | null;
|
|
4861
|
+
/** @description Optional URL of an image used as the team avatar/logo. */
|
|
4862
|
+
logo_url: string | null;
|
|
4863
|
+
/** @description Object is related with this account */
|
|
4864
|
+
account: string;
|
|
4865
|
+
/**
|
|
4866
|
+
* @description TeamMetadata
|
|
4867
|
+
* @default {}
|
|
4868
|
+
*/
|
|
4869
|
+
metadata: {
|
|
4870
|
+
[key: string]: unknown;
|
|
4871
|
+
};
|
|
4872
|
+
/** @description Team creation date */
|
|
4873
|
+
createdAt: string;
|
|
4874
|
+
/** @description Team updated date */
|
|
4875
|
+
updatedAt?: string;
|
|
4876
|
+
};
|
|
4877
|
+
};
|
|
4878
|
+
};
|
|
4879
|
+
};
|
|
4880
|
+
};
|
|
4488
4881
|
"team/remove": {
|
|
4489
4882
|
parameters: {
|
|
4490
4883
|
query?: never;
|
|
@@ -4559,6 +4952,14 @@ export interface operations {
|
|
|
4559
4952
|
* ]
|
|
4560
4953
|
*/
|
|
4561
4954
|
users: string[];
|
|
4955
|
+
/**
|
|
4956
|
+
* @description Role ids to grant to the added members within the scope of this team.
|
|
4957
|
+
* @default []
|
|
4958
|
+
* @example [
|
|
4959
|
+
* "role_6555fd293acc2f0fac0e3452"
|
|
4960
|
+
* ]
|
|
4961
|
+
*/
|
|
4962
|
+
roles?: string[];
|
|
4562
4963
|
};
|
|
4563
4964
|
};
|
|
4564
4965
|
};
|
|
@@ -4717,6 +5118,14 @@ export interface operations {
|
|
|
4717
5118
|
* ]
|
|
4718
5119
|
*/
|
|
4719
5120
|
users: string[];
|
|
5121
|
+
/**
|
|
5122
|
+
* @description Role ids to grant to the added members within the scope of this team.
|
|
5123
|
+
* @default []
|
|
5124
|
+
* @example [
|
|
5125
|
+
* "role_6555fd293acc2f0fac0e3452"
|
|
5126
|
+
* ]
|
|
5127
|
+
*/
|
|
5128
|
+
roles?: string[];
|
|
4720
5129
|
};
|
|
4721
5130
|
};
|
|
4722
5131
|
};
|
|
@@ -4806,6 +5215,182 @@ export interface operations {
|
|
|
4806
5215
|
};
|
|
4807
5216
|
};
|
|
4808
5217
|
};
|
|
5218
|
+
"team/listInvites": {
|
|
5219
|
+
parameters: {
|
|
5220
|
+
query?: {
|
|
5221
|
+
/** @description FaableQL filter. Supported fields: `email`. Example: `?query=email:foo@bar.com` */
|
|
5222
|
+
query?: string;
|
|
5223
|
+
};
|
|
5224
|
+
header?: never;
|
|
5225
|
+
path: {
|
|
5226
|
+
team_id: string;
|
|
5227
|
+
};
|
|
5228
|
+
cookie?: never;
|
|
5229
|
+
};
|
|
5230
|
+
requestBody?: never;
|
|
5231
|
+
responses: {
|
|
5232
|
+
/** @description Default Response */
|
|
5233
|
+
200: {
|
|
5234
|
+
headers: {
|
|
5235
|
+
[name: string]: unknown;
|
|
5236
|
+
};
|
|
5237
|
+
content: {
|
|
5238
|
+
"application/json": {
|
|
5239
|
+
data: {
|
|
5240
|
+
/** @description TeamInvite ID */
|
|
5241
|
+
id: string;
|
|
5242
|
+
/** @description Email address that was invited */
|
|
5243
|
+
email: string;
|
|
5244
|
+
/** @description Team the invitee will be added to upon acceptance. */
|
|
5245
|
+
team: components["schemas"]["Team"] | string | unknown;
|
|
5246
|
+
/** @description User that created the invitation, if known. */
|
|
5247
|
+
inviter?: components["schemas"]["User"] | string | unknown;
|
|
5248
|
+
/** @description Role ids that will be applied to the new TeamMember on acceptance. */
|
|
5249
|
+
roles: string[];
|
|
5250
|
+
/** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
|
|
5251
|
+
mode: "auto" | "invite";
|
|
5252
|
+
/** @description URI to redirect the invitee to after a successful accept. */
|
|
5253
|
+
redirect_uri?: string;
|
|
5254
|
+
/** @description ISO 8601 timestamp at which the invite stops being valid. */
|
|
5255
|
+
expires_at: string;
|
|
5256
|
+
/** @description ISO 8601 timestamp at which the invite was accepted. Absent for pending invites. */
|
|
5257
|
+
consume_date?: string;
|
|
5258
|
+
/** @description Object is related with this account */
|
|
5259
|
+
account: string;
|
|
5260
|
+
/**
|
|
5261
|
+
* @description TeamInviteMetadata
|
|
5262
|
+
* @default {}
|
|
5263
|
+
*/
|
|
5264
|
+
metadata: {
|
|
5265
|
+
[key: string]: unknown;
|
|
5266
|
+
};
|
|
5267
|
+
/** @description TeamInvite creation date */
|
|
5268
|
+
createdAt: string;
|
|
5269
|
+
/** @description TeamInvite updated date */
|
|
5270
|
+
updatedAt?: string;
|
|
5271
|
+
}[];
|
|
5272
|
+
};
|
|
5273
|
+
};
|
|
5274
|
+
};
|
|
5275
|
+
};
|
|
5276
|
+
};
|
|
5277
|
+
"team/invite": {
|
|
5278
|
+
parameters: {
|
|
5279
|
+
query?: never;
|
|
5280
|
+
header?: never;
|
|
5281
|
+
path: {
|
|
5282
|
+
team_id: string;
|
|
5283
|
+
};
|
|
5284
|
+
cookie?: never;
|
|
5285
|
+
};
|
|
5286
|
+
/** @description Payload for inviting a user to a team by email. `mode='auto'` (default) adds the user immediately if they already exist in the tenant and falls back to a ticketed invite otherwise. `mode='invite'` always issues a ticket + email. */
|
|
5287
|
+
requestBody: {
|
|
5288
|
+
content: {
|
|
5289
|
+
"application/json": {
|
|
5290
|
+
/**
|
|
5291
|
+
* @description Email of the user to invite to the team.
|
|
5292
|
+
* @example someone@example.com
|
|
5293
|
+
*/
|
|
5294
|
+
email: string;
|
|
5295
|
+
/**
|
|
5296
|
+
* @description Role ids granted to the resulting TeamMember within the scope of this team.
|
|
5297
|
+
* @default []
|
|
5298
|
+
*/
|
|
5299
|
+
roles?: string[];
|
|
5300
|
+
/** @description `auto` adds the user directly if they already exist in the tenant and only falls back to a ticketed invite when the email is unknown. `invite` always issues a ticket + email regardless of whether the user exists. */
|
|
5301
|
+
mode?: "auto" | "invite";
|
|
5302
|
+
/** @description Where to redirect the invitee after a successful accept. Defaults to `/`. */
|
|
5303
|
+
redirect_uri?: string;
|
|
5304
|
+
};
|
|
5305
|
+
};
|
|
5306
|
+
};
|
|
5307
|
+
responses: {
|
|
5308
|
+
/** @description Default Response */
|
|
5309
|
+
200: {
|
|
5310
|
+
headers: {
|
|
5311
|
+
[name: string]: unknown;
|
|
5312
|
+
};
|
|
5313
|
+
content: {
|
|
5314
|
+
"application/json": {
|
|
5315
|
+
/** @description `invited` when a ticket + email was issued, `added` when the user was added directly (auto mode + existing user). */
|
|
5316
|
+
status: "invited" | "added";
|
|
5317
|
+
/** @description ID of the issued invite ticket (when status=invited). */
|
|
5318
|
+
ticket_id?: string;
|
|
5319
|
+
/** @description TeamMember */
|
|
5320
|
+
member?: {
|
|
5321
|
+
/** @description TeamMember ID */
|
|
5322
|
+
id: string;
|
|
5323
|
+
/** @description User that belongs to the team. Returned as an id by default; pass `?expand=user` to inline the full User object. */
|
|
5324
|
+
user: components["schemas"]["User"] | string | unknown;
|
|
5325
|
+
/** @description Team the user belongs to. Returned as an id by default; pass `?expand=team` to inline the full Team object. */
|
|
5326
|
+
team: components["schemas"]["Team"] | string | unknown;
|
|
5327
|
+
/** @description Roles granted to the user *within this team*. Distinct from account-wide RoleMember grants — these only apply in the scope of the team. Each entry is an id by default; pass `?expand=roles` to inline. */
|
|
5328
|
+
roles: (components["schemas"]["Role"] | string | unknown)[];
|
|
5329
|
+
/** @description Object is related with this account */
|
|
5330
|
+
account: string;
|
|
5331
|
+
/**
|
|
5332
|
+
* @description TeamMemberMetadata
|
|
5333
|
+
* @default {}
|
|
5334
|
+
*/
|
|
5335
|
+
metadata: {
|
|
5336
|
+
[key: string]: unknown;
|
|
5337
|
+
};
|
|
5338
|
+
/** @description TeamMember creation date */
|
|
5339
|
+
createdAt: string;
|
|
5340
|
+
/** @description TeamMember updated date */
|
|
5341
|
+
updatedAt?: string;
|
|
5342
|
+
};
|
|
5343
|
+
};
|
|
5344
|
+
};
|
|
5345
|
+
};
|
|
5346
|
+
};
|
|
5347
|
+
};
|
|
5348
|
+
"team/revokeInvite": {
|
|
5349
|
+
parameters: {
|
|
5350
|
+
query?: never;
|
|
5351
|
+
header?: never;
|
|
5352
|
+
path: {
|
|
5353
|
+
team_id: string;
|
|
5354
|
+
ticket_id: string;
|
|
5355
|
+
};
|
|
5356
|
+
cookie?: never;
|
|
5357
|
+
};
|
|
5358
|
+
requestBody?: never;
|
|
5359
|
+
responses: {
|
|
5360
|
+
/** @description Default Response */
|
|
5361
|
+
200: {
|
|
5362
|
+
headers: {
|
|
5363
|
+
[name: string]: unknown;
|
|
5364
|
+
};
|
|
5365
|
+
content: {
|
|
5366
|
+
"application/json": {
|
|
5367
|
+
/** @enum {string} */
|
|
5368
|
+
status: "revoked";
|
|
5369
|
+
};
|
|
5370
|
+
};
|
|
5371
|
+
};
|
|
5372
|
+
};
|
|
5373
|
+
};
|
|
5374
|
+
team_invite_verify: {
|
|
5375
|
+
parameters: {
|
|
5376
|
+
query: {
|
|
5377
|
+
ticket: string;
|
|
5378
|
+
};
|
|
5379
|
+
header?: never;
|
|
5380
|
+
path?: never;
|
|
5381
|
+
cookie?: never;
|
|
5382
|
+
};
|
|
5383
|
+
requestBody?: never;
|
|
5384
|
+
responses: {
|
|
5385
|
+
/** @description Default Response */
|
|
5386
|
+
200: {
|
|
5387
|
+
headers: {
|
|
5388
|
+
[name: string]: unknown;
|
|
5389
|
+
};
|
|
5390
|
+
content?: never;
|
|
5391
|
+
};
|
|
5392
|
+
};
|
|
5393
|
+
};
|
|
4809
5394
|
"api/list": {
|
|
4810
5395
|
parameters: {
|
|
4811
5396
|
query?: {
|
|
@@ -6073,6 +6658,8 @@ export interface operations {
|
|
|
6073
6658
|
* @default false
|
|
6074
6659
|
*/
|
|
6075
6660
|
email_verified: boolean;
|
|
6661
|
+
/** @description ISO 8601 timestamp of the user's last verified email change. When set, OAuth callbacks will not overwrite `email`/`email_verified` from the federated provider — the manually-chosen email wins. */
|
|
6662
|
+
email_change_locked_at?: string | null;
|
|
6076
6663
|
/** @description contact phone number */
|
|
6077
6664
|
phone?: string | null;
|
|
6078
6665
|
/** @description phone is verified */
|