@finueva/auth 0.33.0 → 0.34.0
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/device.d.ts +6 -2
- package/dist/device.js +211 -58
- package/dist/index.d.ts +2 -2
- package/dist/index.js +150 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +37 -2
- package/dist/{types-BU8vZrhF.d.ts → types-QJnXZXYY.d.ts} +73 -5
- package/package.json +1 -1
package/dist/device.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as OrganizationPage, At as SocialIdTokenInput, Bt as UpdateOrganizationTeamDisplayInput, D as CreatedOrganizationTeam, E as CreatedOrganizationMemberInvitation, G as OrganizationDisplay, It as TwoFactorStatus, J as OrganizationMember, Jt as AuthErrorAccountDeletion, K as OrganizationInvitation, M as DriveCredential, N as DriveCredentialInput, Q as OrganizationMemberPageInput, Qt as UserApiCredentialInput, T as CreatedOrganization, Vt as UpdateProfileInput, X as OrganizationMemberAuthorityV2, Xt as AuthErrorStatus, Y as OrganizationMemberAuthority, Yt as AuthErrorCode, Z as OrganizationMemberPage, Zt as UserApiCredential, _ as CeremonyHandoff, a as AccountDeletionStartRequest, at as OrganizationTeamMemberPage, c as AuthOrganization, ct as PasskeyInventory, d as AuthSession, et as OrganizationPageInput, f as AuthSessionInventory, i as AccountDeletionRestoreInput, it as OrganizationTeamDisplay, jt as SocialIdTokenProvider, n as AccountDeletionEligibility, ot as OrganizationTeamPage, q as OrganizationInvitationPage, qt as AuthError, r as AccountDeletionOrganization, rt as OrganizationTeam, v as CeremonyHandoffInput, vt as ReceivedOrganizationInvitation, w as CreateOrganizationMemberInvitationInput, yt as ReceivedOrganizationInvitationPage, zt as UpdateOrganizationDisplayInput } from "./types-QJnXZXYY.js";
|
|
2
2
|
//#region src/device.d.ts
|
|
3
3
|
export type DeviceAuthorizationErrorCode = "device_access_denied" | "device_authorization_cancelled" | "device_code_expired" | "invalid_device_authorization" | "identity_authority_unavailable";
|
|
4
4
|
export declare class DeviceAuthorizationError extends Error {
|
|
@@ -80,6 +80,10 @@ export interface DeviceAuthClient {
|
|
|
80
80
|
* browser. The device never runs WebAuthn for the Auth Relying Party itself.
|
|
81
81
|
*/
|
|
82
82
|
createCeremonyHandoff(input: CeremonyHandoffInput): Promise<CeremonyHandoff>;
|
|
83
|
+
/** Reads whether this device's User can delete the account now. The read changes nothing. */
|
|
84
|
+
getAccountDeletionEligibility(): Promise<AccountDeletionEligibility>;
|
|
85
|
+
/** Restores an account that is scheduled for deletion. It needs no session and creates none. */
|
|
86
|
+
restoreAccount(input: AccountDeletionRestoreInput): Promise<void>;
|
|
83
87
|
listPasskeys(): Promise<PasskeyInventory>;
|
|
84
88
|
renamePasskey(passkeyId: string, name: string): Promise<void>;
|
|
85
89
|
signInWithSocialIdToken(input: SocialIdTokenInput): Promise<AuthSession>;
|
|
@@ -92,4 +96,4 @@ export interface DeviceAuthClient {
|
|
|
92
96
|
}
|
|
93
97
|
export declare function createDeviceAuth(options: DeviceAuthOptions): DeviceAuthClient;
|
|
94
98
|
//#endregion
|
|
95
|
-
export { AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type TwoFactorStatus, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UserApiCredential, type UserApiCredentialInput };
|
|
99
|
+
export { type AccountDeletionEligibility, type AccountDeletionOrganization, type AccountDeletionRestoreInput, type AccountDeletionStartRequest, AuthError, type AuthErrorAccountDeletion, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type TwoFactorStatus, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UserApiCredential, type UserApiCredentialInput };
|
package/dist/device.js
CHANGED
|
@@ -1,3 +1,182 @@
|
|
|
1
|
+
//#region src/errors.ts
|
|
2
|
+
const messages = {
|
|
3
|
+
invalid_credentials: "The credentials are invalid.",
|
|
4
|
+
invalid_auth_input: "The authentication input is invalid.",
|
|
5
|
+
account_conflict: "The account is not available.",
|
|
6
|
+
social_signup_required: "No account is available for this social sign-in. Start sign-up to create one.",
|
|
7
|
+
google_recovery_in_progress: "A Google connection is already being completed. Return to that sign-in, or wait up to ten minutes and restart.",
|
|
8
|
+
google_recovery_not_required: "Google account recovery is not required.",
|
|
9
|
+
google_recovery_invalid: "The Google account recovery request is invalid.",
|
|
10
|
+
google_recovery_expired: "Google account recovery has expired. Start Google sign-in again.",
|
|
11
|
+
google_recovery_account_mismatch: "Sign in to the existing account associated with this Google identity.",
|
|
12
|
+
password_reset_invalid: "The password reset request is invalid.",
|
|
13
|
+
authentication_required: "Authentication is required.",
|
|
14
|
+
request_origin_denied: "The request origin is not allowed.",
|
|
15
|
+
invalid_request: "The request is invalid.",
|
|
16
|
+
invalid_invitation: "The invitation is invalid.",
|
|
17
|
+
invitation_unavailable: "The invitation is not available.",
|
|
18
|
+
recipient_unavailable: "The recipient is unavailable.",
|
|
19
|
+
invitation_recipient_mismatch: "The invitation cannot be accepted by this account.",
|
|
20
|
+
invitation_recovery_required: "Invitation administration requires separate recovery.",
|
|
21
|
+
membership_removal_recovery_required: "Membership removal requires separate recovery.",
|
|
22
|
+
email_verification_required: "Email verification is required.",
|
|
23
|
+
invalid_workspace_selection: "The workspace selection is invalid.",
|
|
24
|
+
organization_context_too_large: "The organization context is too large.",
|
|
25
|
+
credential_rate_limited: "Credential requests are temporarily limited.",
|
|
26
|
+
auth_request_rate_limited: "Authentication requests are temporarily limited.",
|
|
27
|
+
organization_slug_unavailable: "The organization address is unavailable.",
|
|
28
|
+
state_conflict: "The authentication state conflicts with the request.",
|
|
29
|
+
access_denied: "Access is denied.",
|
|
30
|
+
platform_target_unavailable: "The platform administration target is unavailable.",
|
|
31
|
+
platform_quorum_unavailable: "Platform administration quorum is unavailable.",
|
|
32
|
+
platform_recovery_required: "Platform administration requires separate recovery.",
|
|
33
|
+
identity_authority_unavailable: "Authentication is temporarily unavailable.",
|
|
34
|
+
two_factor_required: "A second authentication factor is required.",
|
|
35
|
+
two_factor_code_invalid: "The verification code is invalid.",
|
|
36
|
+
two_factor_challenge_expired: "The second-factor challenge has ended. Sign in again.",
|
|
37
|
+
two_factor_locked: "Second-factor verification is temporarily locked.",
|
|
38
|
+
recent_sign_in_required: "A recent sign-in is required.",
|
|
39
|
+
enterprise_recovery_required: "Enterprise administration evidence requires operator recovery.",
|
|
40
|
+
recent_authentication_required: "A ready recent-authentication action is required.",
|
|
41
|
+
organization_closure_confirmation_mismatch: "The confirmation does not match the organization.",
|
|
42
|
+
organization_closure_cancellation_ended: "The closure cancellation period has ended.",
|
|
43
|
+
ceremony_return_refused: "The return address is not registered for this application.",
|
|
44
|
+
password_sign_in_required: "A password sign-in method is required for this passkey change.",
|
|
45
|
+
account_deletion_pending: "This account is scheduled for deletion.",
|
|
46
|
+
account_restore_unavailable: "The restore ticket or link is used or expired, or the account is not scheduled for deletion."
|
|
47
|
+
};
|
|
48
|
+
var AuthError = class extends Error {
|
|
49
|
+
code;
|
|
50
|
+
status;
|
|
51
|
+
retryAfterSeconds;
|
|
52
|
+
accountDeletion;
|
|
53
|
+
constructor(code, status, retryAfterSeconds, details) {
|
|
54
|
+
super(messages[code]);
|
|
55
|
+
this.name = "AuthError";
|
|
56
|
+
this.code = code;
|
|
57
|
+
this.status = status;
|
|
58
|
+
this.retryAfterSeconds = retryAfterSeconds;
|
|
59
|
+
if (details?.accountDeletion) this.accountDeletion = details.accountDeletion;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/account-deletion.ts
|
|
64
|
+
function isObject$1(value) {
|
|
65
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
66
|
+
}
|
|
67
|
+
function authorityUnavailable$1() {
|
|
68
|
+
return new AuthError("identity_authority_unavailable", 503);
|
|
69
|
+
}
|
|
70
|
+
const idPattern$2 = /^[A-Za-z0-9_-]{1,128}$(?![\s\S])/;
|
|
71
|
+
const tokenPattern = /^[A-Za-z0-9_-]{43}$(?![\s\S])/;
|
|
72
|
+
const idempotencyPattern = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$(?![\s\S])/;
|
|
73
|
+
const MAX_SOLE_ORGANIZATIONS = 20;
|
|
74
|
+
const MAX_BLOCKING_ORGANIZATIONS = 100;
|
|
75
|
+
const organizationBlockers = new Set(["owner_with_members", "enterprise_connection"]);
|
|
76
|
+
const accountBlockers = new Set(["managed_account", "platform_role"]);
|
|
77
|
+
const stepUps = new Set([
|
|
78
|
+
"recent_sign_in",
|
|
79
|
+
"password",
|
|
80
|
+
"sign_in_again"
|
|
81
|
+
]);
|
|
82
|
+
function exact$3(value, keys) {
|
|
83
|
+
return isObject$1(value) && Object.keys(value).length === keys.length && keys.every((key) => {
|
|
84
|
+
return Object.hasOwn(value, key);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function isoDate(value) {
|
|
88
|
+
if (typeof value !== "string") throw authorityUnavailable$1();
|
|
89
|
+
const parsed = new Date(value);
|
|
90
|
+
if (!Number.isFinite(parsed.getTime()) || parsed.toISOString() !== value) throw authorityUnavailable$1();
|
|
91
|
+
return parsed;
|
|
92
|
+
}
|
|
93
|
+
function organization(value, keys) {
|
|
94
|
+
if (!exact$3(value, keys) || typeof value.id !== "string" || !idPattern$2.test(value.id) || typeof value.name !== "string" || value.name.length === 0 || value.name.length > 255 || value.slug !== null && (typeof value.slug !== "string" || value.slug.length === 0 || value.slug.length > 255)) throw authorityUnavailable$1();
|
|
95
|
+
return {
|
|
96
|
+
id: value.id,
|
|
97
|
+
name: value.name,
|
|
98
|
+
slug: value.slug
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function normalizeAccountDeletionStartRequest(value) {
|
|
102
|
+
if (!isObject$1(value) || typeof value.idempotencyKey !== "string" || !idempotencyPattern.test(value.idempotencyKey)) throw new TypeError("idempotencyKey is invalid");
|
|
103
|
+
const ids = value.soleOrganizationIds;
|
|
104
|
+
if (!Array.isArray(ids) || ids.length > MAX_SOLE_ORGANIZATIONS || !ids.every((id) => {
|
|
105
|
+
return typeof id === "string" && idPattern$2.test(id);
|
|
106
|
+
})) throw new TypeError("soleOrganizationIds is invalid");
|
|
107
|
+
return {
|
|
108
|
+
idempotencyKey: value.idempotencyKey,
|
|
109
|
+
soleOrganizationIds: [...ids]
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function normalizeAccountDeletionEligibility(value) {
|
|
113
|
+
if (!exact$3(value, [
|
|
114
|
+
"accountBlocker",
|
|
115
|
+
"blockingOrganizations",
|
|
116
|
+
"deleteAfter",
|
|
117
|
+
"eligible",
|
|
118
|
+
"soleOrganizations",
|
|
119
|
+
"stepUp"
|
|
120
|
+
]) || typeof value.eligible !== "boolean" || value.accountBlocker !== null && !accountBlockers.has(value.accountBlocker) || !Array.isArray(value.blockingOrganizations) || value.blockingOrganizations.length > MAX_BLOCKING_ORGANIZATIONS || !Array.isArray(value.soleOrganizations) || value.soleOrganizations.length > MAX_SOLE_ORGANIZATIONS || !stepUps.has(value.stepUp)) throw authorityUnavailable$1();
|
|
121
|
+
const blockingOrganizations = value.blockingOrganizations.map((entry) => {
|
|
122
|
+
const summary = organization(entry, [
|
|
123
|
+
"id",
|
|
124
|
+
"name",
|
|
125
|
+
"reason",
|
|
126
|
+
"slug"
|
|
127
|
+
]);
|
|
128
|
+
const reason = entry.reason;
|
|
129
|
+
if (!organizationBlockers.has(reason)) throw authorityUnavailable$1();
|
|
130
|
+
return {
|
|
131
|
+
...summary,
|
|
132
|
+
reason
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
eligible: value.eligible,
|
|
137
|
+
accountBlocker: value.accountBlocker,
|
|
138
|
+
blockingOrganizations,
|
|
139
|
+
soleOrganizations: value.soleOrganizations.map((entry) => {
|
|
140
|
+
return organization(entry, [
|
|
141
|
+
"id",
|
|
142
|
+
"name",
|
|
143
|
+
"slug"
|
|
144
|
+
]);
|
|
145
|
+
}),
|
|
146
|
+
stepUp: value.stepUp,
|
|
147
|
+
deleteAfter: isoDate(value.deleteAfter)
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function normalizeAccountDeletionRestoreInput(value) {
|
|
151
|
+
if (exact$3(value, ["restoreTicket"]) && typeof value.restoreTicket === "string" && tokenPattern.test(value.restoreTicket)) return { restoreTicket: value.restoreTicket };
|
|
152
|
+
if (exact$3(value, ["restoreLinkToken"]) && typeof value.restoreLinkToken === "string" && tokenPattern.test(value.restoreLinkToken)) return { restoreLinkToken: value.restoreLinkToken };
|
|
153
|
+
throw new TypeError("restore input is invalid");
|
|
154
|
+
}
|
|
155
|
+
function normalizeAccountDeletionRestore(value) {
|
|
156
|
+
if (!exact$3(value, ["status"]) || value.status !== "restored") throw authorityUnavailable$1();
|
|
157
|
+
}
|
|
158
|
+
function accountDeletionPending(value, status) {
|
|
159
|
+
if (status !== 403 || !isObject$1(value) || value.code !== "ACCOUNT_DELETION_PENDING") return null;
|
|
160
|
+
let deleteAfter;
|
|
161
|
+
try {
|
|
162
|
+
deleteAfter = isoDate(value.deleteAfter);
|
|
163
|
+
} catch {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
const restoreTicket = typeof value.restoreTicket === "string" && tokenPattern.test(value.restoreTicket) ? value.restoreTicket : null;
|
|
167
|
+
return {
|
|
168
|
+
deleteAfter,
|
|
169
|
+
restoreTicket
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function fromAccountDeletionError(value, status) {
|
|
173
|
+
const code = isObject$1(value) ? value.code : void 0;
|
|
174
|
+
if (status === 401) return new AuthError("authentication_required", 401);
|
|
175
|
+
if (status === 403) return new AuthError("request_origin_denied", 403);
|
|
176
|
+
if (status === 404 && code === "RESTORE_UNAVAILABLE") return new AuthError("account_restore_unavailable", 404);
|
|
177
|
+
if (status === 400 || status === 413 || status === 415) return new AuthError("invalid_request", 400);
|
|
178
|
+
return authorityUnavailable$1();
|
|
179
|
+
}
|
|
1
180
|
String.fromCharCode;
|
|
2
181
|
const HASH_RE = /#/g;
|
|
3
182
|
const AMPERSAND_RE = /&/g;
|
|
@@ -173,64 +352,6 @@ function stringifyParsedURL(parsed) {
|
|
|
173
352
|
return (parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : "") + auth + host + pathname + search + hash;
|
|
174
353
|
}
|
|
175
354
|
//#endregion
|
|
176
|
-
//#region src/errors.ts
|
|
177
|
-
const messages = {
|
|
178
|
-
invalid_credentials: "The credentials are invalid.",
|
|
179
|
-
invalid_auth_input: "The authentication input is invalid.",
|
|
180
|
-
account_conflict: "The account is not available.",
|
|
181
|
-
social_signup_required: "No account is available for this social sign-in. Start sign-up to create one.",
|
|
182
|
-
google_recovery_in_progress: "A Google connection is already being completed. Return to that sign-in, or wait up to ten minutes and restart.",
|
|
183
|
-
google_recovery_not_required: "Google account recovery is not required.",
|
|
184
|
-
google_recovery_invalid: "The Google account recovery request is invalid.",
|
|
185
|
-
google_recovery_expired: "Google account recovery has expired. Start Google sign-in again.",
|
|
186
|
-
google_recovery_account_mismatch: "Sign in to the existing account associated with this Google identity.",
|
|
187
|
-
password_reset_invalid: "The password reset request is invalid.",
|
|
188
|
-
authentication_required: "Authentication is required.",
|
|
189
|
-
request_origin_denied: "The request origin is not allowed.",
|
|
190
|
-
invalid_request: "The request is invalid.",
|
|
191
|
-
invalid_invitation: "The invitation is invalid.",
|
|
192
|
-
invitation_unavailable: "The invitation is not available.",
|
|
193
|
-
recipient_unavailable: "The recipient is unavailable.",
|
|
194
|
-
invitation_recipient_mismatch: "The invitation cannot be accepted by this account.",
|
|
195
|
-
invitation_recovery_required: "Invitation administration requires separate recovery.",
|
|
196
|
-
membership_removal_recovery_required: "Membership removal requires separate recovery.",
|
|
197
|
-
email_verification_required: "Email verification is required.",
|
|
198
|
-
invalid_workspace_selection: "The workspace selection is invalid.",
|
|
199
|
-
organization_context_too_large: "The organization context is too large.",
|
|
200
|
-
credential_rate_limited: "Credential requests are temporarily limited.",
|
|
201
|
-
auth_request_rate_limited: "Authentication requests are temporarily limited.",
|
|
202
|
-
organization_slug_unavailable: "The organization address is unavailable.",
|
|
203
|
-
state_conflict: "The authentication state conflicts with the request.",
|
|
204
|
-
access_denied: "Access is denied.",
|
|
205
|
-
platform_target_unavailable: "The platform administration target is unavailable.",
|
|
206
|
-
platform_quorum_unavailable: "Platform administration quorum is unavailable.",
|
|
207
|
-
platform_recovery_required: "Platform administration requires separate recovery.",
|
|
208
|
-
identity_authority_unavailable: "Authentication is temporarily unavailable.",
|
|
209
|
-
two_factor_required: "A second authentication factor is required.",
|
|
210
|
-
two_factor_code_invalid: "The verification code is invalid.",
|
|
211
|
-
two_factor_challenge_expired: "The second-factor challenge has ended. Sign in again.",
|
|
212
|
-
two_factor_locked: "Second-factor verification is temporarily locked.",
|
|
213
|
-
recent_sign_in_required: "A recent sign-in is required.",
|
|
214
|
-
enterprise_recovery_required: "Enterprise administration evidence requires operator recovery.",
|
|
215
|
-
recent_authentication_required: "A ready recent-authentication action is required.",
|
|
216
|
-
organization_closure_confirmation_mismatch: "The confirmation does not match the organization.",
|
|
217
|
-
organization_closure_cancellation_ended: "The closure cancellation period has ended.",
|
|
218
|
-
ceremony_return_refused: "The return address is not registered for this application.",
|
|
219
|
-
password_sign_in_required: "A password sign-in method is required for this passkey change."
|
|
220
|
-
};
|
|
221
|
-
var AuthError = class extends Error {
|
|
222
|
-
code;
|
|
223
|
-
status;
|
|
224
|
-
retryAfterSeconds;
|
|
225
|
-
constructor(code, status, retryAfterSeconds) {
|
|
226
|
-
super(messages[code]);
|
|
227
|
-
this.name = "AuthError";
|
|
228
|
-
this.code = code;
|
|
229
|
-
this.status = status;
|
|
230
|
-
this.retryAfterSeconds = retryAfterSeconds;
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
//#endregion
|
|
234
355
|
//#region src/shared.ts
|
|
235
356
|
const DRIVE_CREDENTIAL_LIFETIME_SECONDS = 840;
|
|
236
357
|
const id = /^[A-Za-z0-9_-]{1,128}$/;
|
|
@@ -701,6 +822,8 @@ function fromAuthorityError(value, fallbackStatus, retryAfter) {
|
|
|
701
822
|
}
|
|
702
823
|
function fromAccountAuthorityError(value, status, retryAfter) {
|
|
703
824
|
const code = isObject(value) && typeof value.code === "string" ? value.code : void 0;
|
|
825
|
+
const pendingDeletion = accountDeletionPending(value, status);
|
|
826
|
+
if (pendingDeletion) return new AuthError("account_deletion_pending", 403, void 0, { accountDeletion: pendingDeletion });
|
|
704
827
|
if (status === 403 && (code === "INVALID_ORIGIN" || code === "MISSING_OR_NULL_ORIGIN")) return new AuthError("request_origin_denied", 403);
|
|
705
828
|
if (code === "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL") return new AuthError("account_conflict", 409);
|
|
706
829
|
if (code === "INVALID_TOKEN") return new AuthError("password_reset_invalid", 422);
|
|
@@ -1577,6 +1700,11 @@ function normalizeCeremonyHandoffInput(value) {
|
|
|
1577
1700
|
}
|
|
1578
1701
|
throw new TypeError("request action is invalid");
|
|
1579
1702
|
}
|
|
1703
|
+
case "user_closure": return {
|
|
1704
|
+
purpose: input.purpose,
|
|
1705
|
+
...base,
|
|
1706
|
+
request: normalizeAccountDeletionStartRequest(input.request)
|
|
1707
|
+
};
|
|
1580
1708
|
default: throw new TypeError("purpose is invalid");
|
|
1581
1709
|
}
|
|
1582
1710
|
}
|
|
@@ -1640,6 +1768,7 @@ function fromCeremonyHandoffError(value, status, retryAfter) {
|
|
|
1640
1768
|
if (status === 403) return new AuthError("request_origin_denied", 403);
|
|
1641
1769
|
if (status === 404) return new AuthError("state_conflict", 409);
|
|
1642
1770
|
if (status === 409 && code === "PASSWORD_REQUIRED") return new AuthError("password_sign_in_required", 409);
|
|
1771
|
+
if (status === 409 && code === "RECENT_SIGN_IN_REQUIRED") return new AuthError("recent_sign_in_required", 409);
|
|
1643
1772
|
if (status === 409) return new AuthError("state_conflict", 409);
|
|
1644
1773
|
if (status === 429) return new AuthError("auth_request_rate_limited", 429, parseRetryAfter(retryAfter));
|
|
1645
1774
|
return authorityUnavailable();
|
|
@@ -1891,6 +2020,22 @@ function createDeviceAuth(options) {
|
|
|
1891
2020
|
mapError: fromCeremonyHandoffError
|
|
1892
2021
|
})).value);
|
|
1893
2022
|
}
|
|
2023
|
+
async function accountDeletionRequest(method, path, body, normalize, bearer) {
|
|
2024
|
+
const current = bearer ? await readToken() : void 0;
|
|
2025
|
+
if (bearer && !current) throw new AuthError("authentication_required", 401);
|
|
2026
|
+
return normalize((await requestJsonResponse(joinURL(authOrigin, "api/v1/auth/user/closure", path), {
|
|
2027
|
+
fetch: requestFetch,
|
|
2028
|
+
timeoutMs,
|
|
2029
|
+
method,
|
|
2030
|
+
credentials: "omit",
|
|
2031
|
+
headers: {
|
|
2032
|
+
...current ? { authorization: `Bearer ${current.accessToken}` } : {},
|
|
2033
|
+
...body ? { "content-type": "application/json" } : {}
|
|
2034
|
+
},
|
|
2035
|
+
...body ? { body } : {},
|
|
2036
|
+
mapError: fromAccountDeletionError
|
|
2037
|
+
})).value);
|
|
2038
|
+
}
|
|
1894
2039
|
async function revoke(path) {
|
|
1895
2040
|
const current = await readToken();
|
|
1896
2041
|
if (!current) return;
|
|
@@ -2379,6 +2524,14 @@ function createDeviceAuth(options) {
|
|
|
2379
2524
|
return ceremonyRequest("POST", "ceremony-handoffs", body, normalizeCeremonyHandoff);
|
|
2380
2525
|
});
|
|
2381
2526
|
},
|
|
2527
|
+
getAccountDeletionEligibility() {
|
|
2528
|
+
return serializeAuthority(() => {
|
|
2529
|
+
return accountDeletionRequest("GET", "eligibility", void 0, normalizeAccountDeletionEligibility, true);
|
|
2530
|
+
});
|
|
2531
|
+
},
|
|
2532
|
+
async restoreAccount(input) {
|
|
2533
|
+
await accountDeletionRequest("POST", "restore", normalizeAccountDeletionRestoreInput(input), normalizeAccountDeletionRestore, false);
|
|
2534
|
+
},
|
|
2382
2535
|
listPasskeys() {
|
|
2383
2536
|
return serializeAuthority(() => {
|
|
2384
2537
|
return ceremonyRequest("GET", "passkeys", void 0, normalizePasskeyInventory);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as OrganizationPage, A as DepartedOrganizationMember, At as SocialIdTokenInput, B as InvitationDecline, Bt as UpdateOrganizationTeamDisplayInput, C as CreateEnterpriseConnectionInput, Ct as ResentOrganizationInvitation, D as CreatedOrganizationTeam, Dt as ScimCredentialState, E as CreatedOrganizationMemberInvitation, Et as ScimCredentialIssuance, F as EnterpriseConnectionAction, Ft as TwoFactorEnrollment, G as OrganizationDisplay, Gt as RegisteredOrganizationApplication, H as OrganizationClosureCancelInput, Ht as WorkspaceSelection, I as EnterpriseConnectionDomain, It as TwoFactorStatus, J as OrganizationMember, Jt as AuthErrorAccountDeletion, K as OrganizationInvitation, L as EnterpriseConnectionSetup, Lt as TwoFactorStepUpInput, M as DriveCredential, Mt as SuspendedOrganizationMember, N as DriveCredentialInput, Nt as SuspendedOrganizationMemberPage, O as DeclineInvitationInput, Ot as SendVerificationEmailInput, P as EnterpriseConnection, Pt as SuspendedOrganizationMemberStatus, Q as OrganizationMemberPageInput, Qt as UserApiCredentialInput, R as FinuevaAuthClient, Rt as UpdateEnterpriseConnectionInput, S as ClosingOrganizationList, St as RemovedOrganizationTeamMember, T as CreatedOrganization, Tt as RotateScimCredentialInput, U as OrganizationClosureStartInput, Ut as OrganizationApplicationRegistration, V as OrganizationClosure, Vt as UpdateProfileInput, W as OrganizationDeparture, Wt as RegisterOrganizationApplicationInput, X as OrganizationMemberAuthorityV2, Xt as AuthErrorStatus, Y as OrganizationMemberAuthority, Yt as AuthErrorCode, Z as OrganizationMemberPage, Zt as UserApiCredential, _ as CeremonyHandoff, _t as PlatformStatus, a as AccountDeletionStartRequest, at as OrganizationTeamMemberPage, b as CeremonyReturnInput, bt as RecentAuthenticationStatus, c as AuthOrganization, ct as PasskeyInventory, d as AuthSession, dt as PlatformBootstrapRoleChangeInput, et as OrganizationPageInput, f as AuthSessionInventory, ft as PlatformRole, g as CanceledOrganizationInvitation, gt as PlatformRoleFirstApproval, h as AuthUser, ht as PlatformRoleChangeRecentAuthenticationInput, i as AccountDeletionRestoreInput, it as OrganizationTeamDisplay, j as DepartedOrganizationMemberPage, jt as SocialIdTokenProvider, k as DeletedOrganizationTeam, kt as SignInInput, l as AuthPersistence, lt as PasskeySummary, m as AuthState, mt as PlatformRoleApproval, n as AccountDeletionEligibility, nt as OrganizationSignInStates, o as AddedOrganizationTeamMember, ot as OrganizationTeamPage, p as AuthSessionSummary, pt as PlatformRoleApplied, q as OrganizationInvitationPage, qt as AuthError, r as AccountDeletionOrganization, rt as OrganizationTeam, s as AuthClientOptions, st as OrganizationWorkspaceSelection, t as AcceptInvitationInput, tt as OrganizationSignInState, u as AuthPersistenceDriver, ut as PersonalWorkspaceSelection, v as CeremonyHandoffInput, vt as ReceivedOrganizationInvitation, w as CreateOrganizationMemberInvitationInput, wt as RestoredOrganizationMember, x as ClosingOrganization, xt as RemovedOrganizationMember, y as CeremonyRecentAuthenticationRequest, yt as ReceivedOrganizationInvitationPage, z as InvitationAcceptance, zt as UpdateOrganizationDisplayInput } from "./types-QJnXZXYY.js";
|
|
2
2
|
//#region src/client.d.ts
|
|
3
3
|
export declare function createAuthClient(options: AuthClientOptions): FinuevaAuthClient;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { type AcceptInvitationInput, type AddedOrganizationTeamMember, type AuthClientOptions, AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthPersistence, type AuthPersistenceDriver, type AuthSession, type AuthSessionInventory, type AuthSessionSummary, type AuthState, type AuthUser, type CanceledOrganizationInvitation, type CeremonyHandoff, type CeremonyHandoffInput, type CeremonyRecentAuthenticationRequest, type CeremonyReturnInput, type ClosingOrganization, type ClosingOrganizationList, type CreateEnterpriseConnectionInput, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DeclineInvitationInput, type DeletedOrganizationTeam, type DepartedOrganizationMember, type DepartedOrganizationMemberPage, type DriveCredential, type DriveCredentialInput, type EnterpriseConnection, type EnterpriseConnectionAction, type EnterpriseConnectionDomain, type EnterpriseConnectionSetup, type FinuevaAuthClient, type InvitationAcceptance, type InvitationDecline, type OrganizationApplicationRegistration, type OrganizationClosure, type OrganizationClosureCancelInput, type OrganizationClosureStartInput, type OrganizationDeparture, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationSignInState, type OrganizationSignInStates, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PasskeyInventory, type PasskeySummary, type PersonalWorkspaceSelection, type PlatformBootstrapRoleChangeInput, type PlatformRole, type PlatformRoleApplied, type PlatformRoleApproval, type PlatformRoleChangeRecentAuthenticationInput, type PlatformRoleFirstApproval, type PlatformStatus, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type RecentAuthenticationStatus, type RegisterOrganizationApplicationInput, type RegisteredOrganizationApplication, type RemovedOrganizationMember, type RemovedOrganizationTeamMember, type ResentOrganizationInvitation, type RestoredOrganizationMember, type RotateScimCredentialInput, type ScimCredentialIssuance, type ScimCredentialState, type SendVerificationEmailInput, type SignInInput, type SocialIdTokenInput, type SocialIdTokenProvider, type SuspendedOrganizationMember, type SuspendedOrganizationMemberPage, type SuspendedOrganizationMemberStatus, type TwoFactorEnrollment, type TwoFactorStatus, type TwoFactorStepUpInput, type UpdateEnterpriseConnectionInput, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UpdateProfileInput, type UserApiCredential, type UserApiCredentialInput, type WorkspaceSelection };
|
|
5
|
+
export { type AcceptInvitationInput, type AccountDeletionEligibility, type AccountDeletionOrganization, type AccountDeletionRestoreInput, type AccountDeletionStartRequest, type AddedOrganizationTeamMember, type AuthClientOptions, AuthError, type AuthErrorAccountDeletion, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthPersistence, type AuthPersistenceDriver, type AuthSession, type AuthSessionInventory, type AuthSessionSummary, type AuthState, type AuthUser, type CanceledOrganizationInvitation, type CeremonyHandoff, type CeremonyHandoffInput, type CeremonyRecentAuthenticationRequest, type CeremonyReturnInput, type ClosingOrganization, type ClosingOrganizationList, type CreateEnterpriseConnectionInput, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DeclineInvitationInput, type DeletedOrganizationTeam, type DepartedOrganizationMember, type DepartedOrganizationMemberPage, type DriveCredential, type DriveCredentialInput, type EnterpriseConnection, type EnterpriseConnectionAction, type EnterpriseConnectionDomain, type EnterpriseConnectionSetup, type FinuevaAuthClient, type InvitationAcceptance, type InvitationDecline, type OrganizationApplicationRegistration, type OrganizationClosure, type OrganizationClosureCancelInput, type OrganizationClosureStartInput, type OrganizationDeparture, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationSignInState, type OrganizationSignInStates, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PasskeyInventory, type PasskeySummary, type PersonalWorkspaceSelection, type PlatformBootstrapRoleChangeInput, type PlatformRole, type PlatformRoleApplied, type PlatformRoleApproval, type PlatformRoleChangeRecentAuthenticationInput, type PlatformRoleFirstApproval, type PlatformStatus, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type RecentAuthenticationStatus, type RegisterOrganizationApplicationInput, type RegisteredOrganizationApplication, type RemovedOrganizationMember, type RemovedOrganizationTeamMember, type ResentOrganizationInvitation, type RestoredOrganizationMember, type RotateScimCredentialInput, type ScimCredentialIssuance, type ScimCredentialState, type SendVerificationEmailInput, type SignInInput, type SocialIdTokenInput, type SocialIdTokenProvider, type SuspendedOrganizationMember, type SuspendedOrganizationMemberPage, type SuspendedOrganizationMemberStatus, type TwoFactorEnrollment, type TwoFactorStatus, type TwoFactorStepUpInput, type UpdateEnterpriseConnectionInput, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UpdateProfileInput, type UserApiCredential, type UserApiCredentialInput, type WorkspaceSelection };
|
package/dist/index.js
CHANGED
|
@@ -61,21 +61,143 @@ const messages = {
|
|
|
61
61
|
organization_closure_confirmation_mismatch: "The confirmation does not match the organization.",
|
|
62
62
|
organization_closure_cancellation_ended: "The closure cancellation period has ended.",
|
|
63
63
|
ceremony_return_refused: "The return address is not registered for this application.",
|
|
64
|
-
password_sign_in_required: "A password sign-in method is required for this passkey change."
|
|
64
|
+
password_sign_in_required: "A password sign-in method is required for this passkey change.",
|
|
65
|
+
account_deletion_pending: "This account is scheduled for deletion.",
|
|
66
|
+
account_restore_unavailable: "The restore ticket or link is used or expired, or the account is not scheduled for deletion."
|
|
65
67
|
};
|
|
66
68
|
var AuthError = class extends Error {
|
|
67
69
|
code;
|
|
68
70
|
status;
|
|
69
71
|
retryAfterSeconds;
|
|
70
|
-
|
|
72
|
+
accountDeletion;
|
|
73
|
+
constructor(code, status, retryAfterSeconds, details) {
|
|
71
74
|
super(messages[code]);
|
|
72
75
|
this.name = "AuthError";
|
|
73
76
|
this.code = code;
|
|
74
77
|
this.status = status;
|
|
75
78
|
this.retryAfterSeconds = retryAfterSeconds;
|
|
79
|
+
if (details?.accountDeletion) this.accountDeletion = details.accountDeletion;
|
|
76
80
|
}
|
|
77
81
|
};
|
|
78
82
|
//#endregion
|
|
83
|
+
//#region src/account-deletion.ts
|
|
84
|
+
function isObject$1(value) {
|
|
85
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
86
|
+
}
|
|
87
|
+
function authorityUnavailable$1() {
|
|
88
|
+
return new AuthError("identity_authority_unavailable", 503);
|
|
89
|
+
}
|
|
90
|
+
const idPattern$3 = /^[A-Za-z0-9_-]{1,128}$(?![\s\S])/;
|
|
91
|
+
const tokenPattern = /^[A-Za-z0-9_-]{43}$(?![\s\S])/;
|
|
92
|
+
const idempotencyPattern = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$(?![\s\S])/;
|
|
93
|
+
const MAX_SOLE_ORGANIZATIONS = 20;
|
|
94
|
+
const MAX_BLOCKING_ORGANIZATIONS = 100;
|
|
95
|
+
const organizationBlockers = new Set(["owner_with_members", "enterprise_connection"]);
|
|
96
|
+
const accountBlockers = new Set(["managed_account", "platform_role"]);
|
|
97
|
+
const stepUps = new Set([
|
|
98
|
+
"recent_sign_in",
|
|
99
|
+
"password",
|
|
100
|
+
"sign_in_again"
|
|
101
|
+
]);
|
|
102
|
+
function exact$5(value, keys) {
|
|
103
|
+
return isObject$1(value) && Object.keys(value).length === keys.length && keys.every((key) => {
|
|
104
|
+
return Object.hasOwn(value, key);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function isoDate(value) {
|
|
108
|
+
if (typeof value !== "string") throw authorityUnavailable$1();
|
|
109
|
+
const parsed = new Date(value);
|
|
110
|
+
if (!Number.isFinite(parsed.getTime()) || parsed.toISOString() !== value) throw authorityUnavailable$1();
|
|
111
|
+
return parsed;
|
|
112
|
+
}
|
|
113
|
+
function organization(value, keys) {
|
|
114
|
+
if (!exact$5(value, keys) || typeof value.id !== "string" || !idPattern$3.test(value.id) || typeof value.name !== "string" || value.name.length === 0 || value.name.length > 255 || value.slug !== null && (typeof value.slug !== "string" || value.slug.length === 0 || value.slug.length > 255)) throw authorityUnavailable$1();
|
|
115
|
+
return {
|
|
116
|
+
id: value.id,
|
|
117
|
+
name: value.name,
|
|
118
|
+
slug: value.slug
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function normalizeAccountDeletionStartRequest(value) {
|
|
122
|
+
if (!isObject$1(value) || typeof value.idempotencyKey !== "string" || !idempotencyPattern.test(value.idempotencyKey)) throw new TypeError("idempotencyKey is invalid");
|
|
123
|
+
const ids = value.soleOrganizationIds;
|
|
124
|
+
if (!Array.isArray(ids) || ids.length > MAX_SOLE_ORGANIZATIONS || !ids.every((id) => {
|
|
125
|
+
return typeof id === "string" && idPattern$3.test(id);
|
|
126
|
+
})) throw new TypeError("soleOrganizationIds is invalid");
|
|
127
|
+
return {
|
|
128
|
+
idempotencyKey: value.idempotencyKey,
|
|
129
|
+
soleOrganizationIds: [...ids]
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function normalizeAccountDeletionEligibility(value) {
|
|
133
|
+
if (!exact$5(value, [
|
|
134
|
+
"accountBlocker",
|
|
135
|
+
"blockingOrganizations",
|
|
136
|
+
"deleteAfter",
|
|
137
|
+
"eligible",
|
|
138
|
+
"soleOrganizations",
|
|
139
|
+
"stepUp"
|
|
140
|
+
]) || typeof value.eligible !== "boolean" || value.accountBlocker !== null && !accountBlockers.has(value.accountBlocker) || !Array.isArray(value.blockingOrganizations) || value.blockingOrganizations.length > MAX_BLOCKING_ORGANIZATIONS || !Array.isArray(value.soleOrganizations) || value.soleOrganizations.length > MAX_SOLE_ORGANIZATIONS || !stepUps.has(value.stepUp)) throw authorityUnavailable$1();
|
|
141
|
+
const blockingOrganizations = value.blockingOrganizations.map((entry) => {
|
|
142
|
+
const summary = organization(entry, [
|
|
143
|
+
"id",
|
|
144
|
+
"name",
|
|
145
|
+
"reason",
|
|
146
|
+
"slug"
|
|
147
|
+
]);
|
|
148
|
+
const reason = entry.reason;
|
|
149
|
+
if (!organizationBlockers.has(reason)) throw authorityUnavailable$1();
|
|
150
|
+
return {
|
|
151
|
+
...summary,
|
|
152
|
+
reason
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
return {
|
|
156
|
+
eligible: value.eligible,
|
|
157
|
+
accountBlocker: value.accountBlocker,
|
|
158
|
+
blockingOrganizations,
|
|
159
|
+
soleOrganizations: value.soleOrganizations.map((entry) => {
|
|
160
|
+
return organization(entry, [
|
|
161
|
+
"id",
|
|
162
|
+
"name",
|
|
163
|
+
"slug"
|
|
164
|
+
]);
|
|
165
|
+
}),
|
|
166
|
+
stepUp: value.stepUp,
|
|
167
|
+
deleteAfter: isoDate(value.deleteAfter)
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function normalizeAccountDeletionRestoreInput(value) {
|
|
171
|
+
if (exact$5(value, ["restoreTicket"]) && typeof value.restoreTicket === "string" && tokenPattern.test(value.restoreTicket)) return { restoreTicket: value.restoreTicket };
|
|
172
|
+
if (exact$5(value, ["restoreLinkToken"]) && typeof value.restoreLinkToken === "string" && tokenPattern.test(value.restoreLinkToken)) return { restoreLinkToken: value.restoreLinkToken };
|
|
173
|
+
throw new TypeError("restore input is invalid");
|
|
174
|
+
}
|
|
175
|
+
function normalizeAccountDeletionRestore(value) {
|
|
176
|
+
if (!exact$5(value, ["status"]) || value.status !== "restored") throw authorityUnavailable$1();
|
|
177
|
+
}
|
|
178
|
+
function accountDeletionPending(value, status) {
|
|
179
|
+
if (status !== 403 || !isObject$1(value) || value.code !== "ACCOUNT_DELETION_PENDING") return null;
|
|
180
|
+
let deleteAfter;
|
|
181
|
+
try {
|
|
182
|
+
deleteAfter = isoDate(value.deleteAfter);
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
const restoreTicket = typeof value.restoreTicket === "string" && tokenPattern.test(value.restoreTicket) ? value.restoreTicket : null;
|
|
187
|
+
return {
|
|
188
|
+
deleteAfter,
|
|
189
|
+
restoreTicket
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function fromAccountDeletionError(value, status) {
|
|
193
|
+
const code = isObject$1(value) ? value.code : void 0;
|
|
194
|
+
if (status === 401) return new AuthError("authentication_required", 401);
|
|
195
|
+
if (status === 403) return new AuthError("request_origin_denied", 403);
|
|
196
|
+
if (status === 404 && code === "RESTORE_UNAVAILABLE") return new AuthError("account_restore_unavailable", 404);
|
|
197
|
+
if (status === 400 || status === 413 || status === 415) return new AuthError("invalid_request", 400);
|
|
198
|
+
return authorityUnavailable$1();
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
79
201
|
//#region src/shared.ts
|
|
80
202
|
const DRIVE_CREDENTIAL_LIFETIME_SECONDS = 840;
|
|
81
203
|
const id = /^[A-Za-z0-9_-]{1,128}$/;
|
|
@@ -713,6 +835,8 @@ function fromAuthorityError(value, fallbackStatus, retryAfter) {
|
|
|
713
835
|
}
|
|
714
836
|
function fromAccountAuthorityError(value, status, retryAfter) {
|
|
715
837
|
const code = isObject(value) && typeof value.code === "string" ? value.code : void 0;
|
|
838
|
+
const pendingDeletion = accountDeletionPending(value, status);
|
|
839
|
+
if (pendingDeletion) return new AuthError("account_deletion_pending", 403, void 0, { accountDeletion: pendingDeletion });
|
|
716
840
|
if (status === 403 && (code === "INVALID_ORIGIN" || code === "MISSING_OR_NULL_ORIGIN")) return new AuthError("request_origin_denied", 403);
|
|
717
841
|
if (code === "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL") return new AuthError("account_conflict", 409);
|
|
718
842
|
if (code === "INVALID_TOKEN") return new AuthError("password_reset_invalid", 422);
|
|
@@ -5083,6 +5207,11 @@ function normalizeCeremonyHandoffInput(value) {
|
|
|
5083
5207
|
}
|
|
5084
5208
|
throw new TypeError("request action is invalid");
|
|
5085
5209
|
}
|
|
5210
|
+
case "user_closure": return {
|
|
5211
|
+
purpose: input.purpose,
|
|
5212
|
+
...base,
|
|
5213
|
+
request: normalizeAccountDeletionStartRequest(input.request)
|
|
5214
|
+
};
|
|
5086
5215
|
default: throw new TypeError("purpose is invalid");
|
|
5087
5216
|
}
|
|
5088
5217
|
}
|
|
@@ -5146,6 +5275,7 @@ function fromCeremonyHandoffError(value, status, retryAfter) {
|
|
|
5146
5275
|
if (status === 403) return new AuthError("request_origin_denied", 403);
|
|
5147
5276
|
if (status === 404) return new AuthError("state_conflict", 409);
|
|
5148
5277
|
if (status === 409 && code === "PASSWORD_REQUIRED") return new AuthError("password_sign_in_required", 409);
|
|
5278
|
+
if (status === 409 && code === "RECENT_SIGN_IN_REQUIRED") return new AuthError("recent_sign_in_required", 409);
|
|
5149
5279
|
if (status === 409) return new AuthError("state_conflict", 409);
|
|
5150
5280
|
if (status === 429) return new AuthError("auth_request_rate_limited", 429, parseRetryAfter(retryAfter));
|
|
5151
5281
|
return authorityUnavailable();
|
|
@@ -5934,6 +6064,18 @@ function createAuthClient(options) {
|
|
|
5934
6064
|
if (generation !== authorityGeneration) throw new AuthError("state_conflict", 409);
|
|
5935
6065
|
return normalize(value);
|
|
5936
6066
|
}
|
|
6067
|
+
async function accountDeletionRequest(method, path, body, normalize) {
|
|
6068
|
+
return normalize(await requestJson(joinURL(authOrigin, "api/v1/auth/user/closure", path), {
|
|
6069
|
+
fetch: fetchImpl,
|
|
6070
|
+
timeoutMs,
|
|
6071
|
+
method,
|
|
6072
|
+
...body ? {
|
|
6073
|
+
headers: { "content-type": "application/json" },
|
|
6074
|
+
body
|
|
6075
|
+
} : {},
|
|
6076
|
+
mapError: fromAccountDeletionError
|
|
6077
|
+
}));
|
|
6078
|
+
}
|
|
5937
6079
|
async function ceremonyRequest(method, path, body, normalize) {
|
|
5938
6080
|
if (signOutRequest || activeAccountMutationGeneration !== void 0 || invitationRequest) throw new AuthError("state_conflict", 409);
|
|
5939
6081
|
const generation = authorityGeneration;
|
|
@@ -6707,6 +6849,12 @@ function createAuthClient(options) {
|
|
|
6707
6849
|
async listPasskeys() {
|
|
6708
6850
|
return ceremonyRequest("GET", "passkeys", void 0, normalizePasskeyInventory);
|
|
6709
6851
|
},
|
|
6852
|
+
async getAccountDeletionEligibility() {
|
|
6853
|
+
return accountDeletionRequest("GET", "eligibility", void 0, normalizeAccountDeletionEligibility);
|
|
6854
|
+
},
|
|
6855
|
+
async restoreAccount(input) {
|
|
6856
|
+
await accountDeletionRequest("POST", "restore", normalizeAccountDeletionRestoreInput(input), normalizeAccountDeletionRestore);
|
|
6857
|
+
},
|
|
6710
6858
|
async renamePasskey(passkeyId, name) {
|
|
6711
6859
|
const id = normalizePasskeyId(passkeyId);
|
|
6712
6860
|
const body = { name: normalizePasskeyName(name) };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as OrganizationPage, At as SocialIdTokenInput, B as InvitationDecline, Bt as UpdateOrganizationTeamDisplayInput, Ct as ResentOrganizationInvitation, D as CreatedOrganizationTeam, E as CreatedOrganizationMemberInvitation, G as OrganizationDisplay, Gt as RegisteredOrganizationApplication, Ht as WorkspaceSelection, J as OrganizationMember, K as OrganizationInvitation, Kt as OrganizationDirectoryEntry, M as DriveCredential, N as DriveCredentialInput, O as DeclineInvitationInput, Q as OrganizationMemberPageInput, Qt as UserApiCredentialInput, St as RemovedOrganizationTeamMember, T as CreatedOrganization, Ut as OrganizationApplicationRegistration, W as OrganizationDeparture, Wt as RegisterOrganizationApplicationInput, X as OrganizationMemberAuthorityV2, Xt as AuthErrorStatus, Y as OrganizationMemberAuthority, Yt as AuthErrorCode, Z as OrganizationMemberPage, Zt as UserApiCredential, at as OrganizationTeamMemberPage, c as AuthOrganization, d as AuthSession, et as OrganizationPageInput, g as CanceledOrganizationInvitation, h as AuthUser, it as OrganizationTeamDisplay, jt as SocialIdTokenProvider, k as DeletedOrganizationTeam, nt as OrganizationSignInStates, o as AddedOrganizationTeamMember, ot as OrganizationTeamPage, q as OrganizationInvitationPage, qt as AuthError, rt as OrganizationTeam, st as OrganizationWorkspaceSelection, t as AcceptInvitationInput, tt as OrganizationSignInState, ut as PersonalWorkspaceSelection, vt as ReceivedOrganizationInvitation, w as CreateOrganizationMemberInvitationInput, xt as RemovedOrganizationMember, yt as ReceivedOrganizationInvitationPage, z as InvitationAcceptance, zt as UpdateOrganizationDisplayInput } from "./types-QJnXZXYY.js";
|
|
2
2
|
//#region src/organization-directory/service.d.ts
|
|
3
3
|
interface OrganizationDirectoryLookupInput {
|
|
4
4
|
organizationId: string;
|
package/dist/server.js
CHANGED
|
@@ -41,21 +41,54 @@ const messages = {
|
|
|
41
41
|
organization_closure_confirmation_mismatch: "The confirmation does not match the organization.",
|
|
42
42
|
organization_closure_cancellation_ended: "The closure cancellation period has ended.",
|
|
43
43
|
ceremony_return_refused: "The return address is not registered for this application.",
|
|
44
|
-
password_sign_in_required: "A password sign-in method is required for this passkey change."
|
|
44
|
+
password_sign_in_required: "A password sign-in method is required for this passkey change.",
|
|
45
|
+
account_deletion_pending: "This account is scheduled for deletion.",
|
|
46
|
+
account_restore_unavailable: "The restore ticket or link is used or expired, or the account is not scheduled for deletion."
|
|
45
47
|
};
|
|
46
48
|
var AuthError = class extends Error {
|
|
47
49
|
code;
|
|
48
50
|
status;
|
|
49
51
|
retryAfterSeconds;
|
|
50
|
-
|
|
52
|
+
accountDeletion;
|
|
53
|
+
constructor(code, status, retryAfterSeconds, details) {
|
|
51
54
|
super(messages[code]);
|
|
52
55
|
this.name = "AuthError";
|
|
53
56
|
this.code = code;
|
|
54
57
|
this.status = status;
|
|
55
58
|
this.retryAfterSeconds = retryAfterSeconds;
|
|
59
|
+
if (details?.accountDeletion) this.accountDeletion = details.accountDeletion;
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
62
|
//#endregion
|
|
63
|
+
//#region src/account-deletion.ts
|
|
64
|
+
function isObject$2(value) {
|
|
65
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
66
|
+
}
|
|
67
|
+
function authorityUnavailable$1() {
|
|
68
|
+
return new AuthError("identity_authority_unavailable", 503);
|
|
69
|
+
}
|
|
70
|
+
const tokenPattern = /^[A-Za-z0-9_-]{43}$(?![\s\S])/;
|
|
71
|
+
function isoDate(value) {
|
|
72
|
+
if (typeof value !== "string") throw authorityUnavailable$1();
|
|
73
|
+
const parsed = new Date(value);
|
|
74
|
+
if (!Number.isFinite(parsed.getTime()) || parsed.toISOString() !== value) throw authorityUnavailable$1();
|
|
75
|
+
return parsed;
|
|
76
|
+
}
|
|
77
|
+
function accountDeletionPending(value, status) {
|
|
78
|
+
if (status !== 403 || !isObject$2(value) || value.code !== "ACCOUNT_DELETION_PENDING") return null;
|
|
79
|
+
let deleteAfter;
|
|
80
|
+
try {
|
|
81
|
+
deleteAfter = isoDate(value.deleteAfter);
|
|
82
|
+
} catch {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const restoreTicket = typeof value.restoreTicket === "string" && tokenPattern.test(value.restoreTicket) ? value.restoreTicket : null;
|
|
86
|
+
return {
|
|
87
|
+
deleteAfter,
|
|
88
|
+
restoreTicket
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
59
92
|
//#region src/shared.ts
|
|
60
93
|
const DRIVE_CREDENTIAL_LIFETIME_SECONDS = 840;
|
|
61
94
|
const id$3 = /^[A-Za-z0-9_-]{1,128}$/;
|
|
@@ -564,6 +597,8 @@ function fromAuthorityError(value, fallbackStatus, retryAfter) {
|
|
|
564
597
|
}
|
|
565
598
|
function fromAccountAuthorityError(value, status, retryAfter) {
|
|
566
599
|
const code = isObject$1(value) && typeof value.code === "string" ? value.code : void 0;
|
|
600
|
+
const pendingDeletion = accountDeletionPending(value, status);
|
|
601
|
+
if (pendingDeletion) return new AuthError("account_deletion_pending", 403, void 0, { accountDeletion: pendingDeletion });
|
|
567
602
|
if (status === 403 && (code === "INVALID_ORIGIN" || code === "MISSING_OR_NULL_ORIGIN")) return new AuthError("request_origin_denied", 403);
|
|
568
603
|
if (code === "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL") return new AuthError("account_conflict", 409);
|
|
569
604
|
if (code === "INVALID_TOKEN") return new AuthError("password_reset_invalid", 422);
|
|
@@ -10,13 +10,27 @@ interface UserApiCredential {
|
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/errors.d.ts
|
|
13
|
-
type AuthErrorCode = "invalid_credentials" | "invalid_auth_input" | "account_conflict" | "social_signup_required" | "google_recovery_in_progress" | "google_recovery_not_required" | "google_recovery_invalid" | "google_recovery_expired" | "google_recovery_account_mismatch" | "password_reset_invalid" | "authentication_required" | "request_origin_denied" | "invalid_request" | "invalid_invitation" | "invitation_unavailable" | "recipient_unavailable" | "invitation_recipient_mismatch" | "invitation_recovery_required" | "membership_removal_recovery_required" | "email_verification_required" | "invalid_workspace_selection" | "organization_context_too_large" | "credential_rate_limited" | "auth_request_rate_limited" | "organization_slug_unavailable" | "state_conflict" | "access_denied" | "platform_target_unavailable" | "platform_quorum_unavailable" | "platform_recovery_required" | "identity_authority_unavailable" | "two_factor_required" | "two_factor_code_invalid" | "two_factor_challenge_expired" | "two_factor_locked" | "recent_sign_in_required" | "enterprise_recovery_required" | "recent_authentication_required" | "organization_closure_confirmation_mismatch" | "organization_closure_cancellation_ended" | "ceremony_return_refused" | "password_sign_in_required";
|
|
13
|
+
type AuthErrorCode = "invalid_credentials" | "invalid_auth_input" | "account_conflict" | "social_signup_required" | "google_recovery_in_progress" | "google_recovery_not_required" | "google_recovery_invalid" | "google_recovery_expired" | "google_recovery_account_mismatch" | "password_reset_invalid" | "authentication_required" | "request_origin_denied" | "invalid_request" | "invalid_invitation" | "invitation_unavailable" | "recipient_unavailable" | "invitation_recipient_mismatch" | "invitation_recovery_required" | "membership_removal_recovery_required" | "email_verification_required" | "invalid_workspace_selection" | "organization_context_too_large" | "credential_rate_limited" | "auth_request_rate_limited" | "organization_slug_unavailable" | "state_conflict" | "access_denied" | "platform_target_unavailable" | "platform_quorum_unavailable" | "platform_recovery_required" | "identity_authority_unavailable" | "two_factor_required" | "two_factor_code_invalid" | "two_factor_challenge_expired" | "two_factor_locked" | "recent_sign_in_required" | "enterprise_recovery_required" | "recent_authentication_required" | "organization_closure_confirmation_mismatch" | "organization_closure_cancellation_ended" | "ceremony_return_refused" | "password_sign_in_required" | "account_deletion_pending" | "account_restore_unavailable";
|
|
14
14
|
type AuthErrorStatus = 400 | 401 | 403 | 404 | 405 | 409 | 410 | 413 | 415 | 422 | 429 | 503;
|
|
15
|
+
/** What a sign-in refusal says about an account that is scheduled for deletion. */
|
|
16
|
+
interface AuthErrorAccountDeletion {
|
|
17
|
+
/** When Auth deletes the account unless it is restored first. */
|
|
18
|
+
deleteAfter: Date;
|
|
19
|
+
/**
|
|
20
|
+
* A single-use, 15-minute ticket that restores the account without another sign-in. It is null when Auth could not
|
|
21
|
+
* issue one; the emailed restore link still works. Keep it in memory only.
|
|
22
|
+
*/
|
|
23
|
+
restoreTicket: string | null;
|
|
24
|
+
}
|
|
15
25
|
declare class AuthError extends Error {
|
|
16
26
|
readonly code: AuthErrorCode;
|
|
17
27
|
readonly status: AuthErrorStatus;
|
|
18
28
|
readonly retryAfterSeconds?: number;
|
|
19
|
-
|
|
29
|
+
/** Present only on `account_deletion_pending`. */
|
|
30
|
+
readonly accountDeletion?: AuthErrorAccountDeletion;
|
|
31
|
+
constructor(code: AuthErrorCode, status: AuthErrorStatus, retryAfterSeconds?: number, details?: {
|
|
32
|
+
accountDeletion?: AuthErrorAccountDeletion;
|
|
33
|
+
});
|
|
20
34
|
}
|
|
21
35
|
//#endregion
|
|
22
36
|
//#region src/organization-directory/contract.d.ts
|
|
@@ -337,6 +351,16 @@ type CeremonyRecentAuthenticationRequest = ({
|
|
|
337
351
|
action: "organization_closure_cancel";
|
|
338
352
|
organizationId: string;
|
|
339
353
|
} & OrganizationClosureCancelInput);
|
|
354
|
+
/** What the person confirmed before deleting the account. */
|
|
355
|
+
interface AccountDeletionStartRequest {
|
|
356
|
+
/** One key for one confirmation. A retry with the same key returns the same deletion. */
|
|
357
|
+
idempotencyKey: string;
|
|
358
|
+
/**
|
|
359
|
+
* The organizations that close with the account, exactly as `getAccountDeletionEligibility` listed them in
|
|
360
|
+
* `soleOrganizations`. Auth refuses the start when its own list differs, for example after a member joined.
|
|
361
|
+
*/
|
|
362
|
+
soleOrganizationIds: string[];
|
|
363
|
+
}
|
|
340
364
|
type CeremonyHandoffInput = CeremonyReturnInput & ({
|
|
341
365
|
purpose: "passkey_enrollment";
|
|
342
366
|
} | {
|
|
@@ -345,7 +369,43 @@ type CeremonyHandoffInput = CeremonyReturnInput & ({
|
|
|
345
369
|
} | {
|
|
346
370
|
purpose: "recent_authentication";
|
|
347
371
|
request: CeremonyRecentAuthenticationRequest;
|
|
372
|
+
} | {
|
|
373
|
+
purpose: "user_closure";
|
|
374
|
+
request: AccountDeletionStartRequest;
|
|
348
375
|
});
|
|
376
|
+
interface AccountDeletionOrganization {
|
|
377
|
+
id: string;
|
|
378
|
+
name: string;
|
|
379
|
+
slug: string | null;
|
|
380
|
+
}
|
|
381
|
+
/** Whether the current User can delete the account now, and what the deletion includes. */
|
|
382
|
+
interface AccountDeletionEligibility {
|
|
383
|
+
eligible: boolean;
|
|
384
|
+
/** `managed_account`: an organization's identity provider manages the account. `platform_role`: a Finueva platform role. */
|
|
385
|
+
accountBlocker: "managed_account" | "platform_role" | null;
|
|
386
|
+
/**
|
|
387
|
+
* Organizations that stop the deletion: the User owns one that has other members (`owner_with_members`), or a
|
|
388
|
+
* sole-member organization has an enterprise connection (`enterprise_connection`).
|
|
389
|
+
*/
|
|
390
|
+
blockingOrganizations: (AccountDeletionOrganization & {
|
|
391
|
+
reason: "owner_with_members" | "enterprise_connection";
|
|
392
|
+
})[];
|
|
393
|
+
/** Organizations where the User is the only member. They close with the account. */
|
|
394
|
+
soleOrganizations: AccountDeletionOrganization[];
|
|
395
|
+
/**
|
|
396
|
+
* What the deletion ceremony asks for: nothing more after a sign-in in the last ten minutes (`recent_sign_in`), the
|
|
397
|
+
* password (`password`), or a new sign-in first (`sign_in_again`, an account without a password).
|
|
398
|
+
*/
|
|
399
|
+
stepUp: "recent_sign_in" | "password" | "sign_in_again";
|
|
400
|
+
/** The deletion date if the deletion started now. */
|
|
401
|
+
deleteAfter: Date;
|
|
402
|
+
}
|
|
403
|
+
/** The single-use secret that restores an account during its 30-day deletion window. */
|
|
404
|
+
type AccountDeletionRestoreInput = {
|
|
405
|
+
restoreTicket: string;
|
|
406
|
+
} | {
|
|
407
|
+
restoreLinkToken: string;
|
|
408
|
+
};
|
|
349
409
|
/** An Auth-Origin ceremony address. The fragment carries a single-use code that expires at `expiresAt`. */
|
|
350
410
|
interface CeremonyHandoff {
|
|
351
411
|
url: string;
|
|
@@ -718,10 +778,18 @@ interface FinuevaAuthClient {
|
|
|
718
778
|
revoked: number;
|
|
719
779
|
}>;
|
|
720
780
|
/**
|
|
721
|
-
* Starts one Auth-Origin ceremony for the current session: passkey enrollment, passkey removal,
|
|
722
|
-
* organization recent-authentication action. Open the returned address in a
|
|
781
|
+
* Starts one Auth-Origin ceremony for the current session: passkey enrollment, passkey removal, one
|
|
782
|
+
* organization recent-authentication action, or the deletion of the account. Open the returned address in a
|
|
783
|
+
* top-level browser context.
|
|
723
784
|
*/
|
|
724
785
|
createCeremonyHandoff(input: CeremonyHandoffInput): Promise<CeremonyHandoff>;
|
|
786
|
+
/** Reads whether the current User can delete the account now. The read changes nothing. */
|
|
787
|
+
getAccountDeletionEligibility(): Promise<AccountDeletionEligibility>;
|
|
788
|
+
/**
|
|
789
|
+
* Restores an account that is scheduled for deletion, with the ticket from an `account_deletion_pending` sign-in
|
|
790
|
+
* refusal or the token of the emailed restore link. It needs no session and creates none: sign in afterwards.
|
|
791
|
+
*/
|
|
792
|
+
restoreAccount(input: AccountDeletionRestoreInput): Promise<void>;
|
|
725
793
|
listPasskeys(): Promise<PasskeyInventory>;
|
|
726
794
|
renamePasskey(passkeyId: string, name: string): Promise<void>;
|
|
727
795
|
signInWithSocialIdToken(input: SocialIdTokenInput): Promise<AuthSession>;
|
|
@@ -736,4 +804,4 @@ interface FinuevaAuthClient {
|
|
|
736
804
|
onSessionChange(listener: (session: AuthSession | null) => void): () => void;
|
|
737
805
|
}
|
|
738
806
|
//#endregion
|
|
739
|
-
export {
|
|
807
|
+
export { OrganizationPage as $, DepartedOrganizationMember as A, SocialIdTokenInput as At, InvitationDecline as B, UpdateOrganizationTeamDisplayInput as Bt, CreateEnterpriseConnectionInput as C, ResentOrganizationInvitation as Ct, CreatedOrganizationTeam as D, ScimCredentialState as Dt, CreatedOrganizationMemberInvitation as E, ScimCredentialIssuance as Et, EnterpriseConnectionAction as F, TwoFactorEnrollment as Ft, OrganizationDisplay as G, RegisteredOrganizationApplication as Gt, OrganizationClosureCancelInput as H, WorkspaceSelection as Ht, EnterpriseConnectionDomain as I, TwoFactorStatus as It, OrganizationMember as J, AuthErrorAccountDeletion as Jt, OrganizationInvitation as K, OrganizationDirectoryEntry as Kt, EnterpriseConnectionSetup as L, TwoFactorStepUpInput as Lt, DriveCredential as M, SuspendedOrganizationMember as Mt, DriveCredentialInput as N, SuspendedOrganizationMemberPage as Nt, DeclineInvitationInput as O, SendVerificationEmailInput as Ot, EnterpriseConnection as P, SuspendedOrganizationMemberStatus as Pt, OrganizationMemberPageInput as Q, UserApiCredentialInput as Qt, FinuevaAuthClient as R, UpdateEnterpriseConnectionInput as Rt, ClosingOrganizationList as S, RemovedOrganizationTeamMember as St, CreatedOrganization as T, RotateScimCredentialInput as Tt, OrganizationClosureStartInput as U, OrganizationApplicationRegistration as Ut, OrganizationClosure as V, UpdateProfileInput as Vt, OrganizationDeparture as W, RegisterOrganizationApplicationInput as Wt, OrganizationMemberAuthorityV2 as X, AuthErrorStatus as Xt, OrganizationMemberAuthority as Y, AuthErrorCode as Yt, OrganizationMemberPage as Z, UserApiCredential as Zt, CeremonyHandoff as _, PlatformStatus as _t, AccountDeletionStartRequest as a, OrganizationTeamMemberPage as at, CeremonyReturnInput as b, RecentAuthenticationStatus as bt, AuthOrganization as c, PasskeyInventory as ct, AuthSession as d, PlatformBootstrapRoleChangeInput as dt, OrganizationPageInput as et, AuthSessionInventory as f, PlatformRole as ft, CanceledOrganizationInvitation as g, PlatformRoleFirstApproval as gt, AuthUser as h, PlatformRoleChangeRecentAuthenticationInput as ht, AccountDeletionRestoreInput as i, OrganizationTeamDisplay as it, DepartedOrganizationMemberPage as j, SocialIdTokenProvider as jt, DeletedOrganizationTeam as k, SignInInput as kt, AuthPersistence as l, PasskeySummary as lt, AuthState as m, PlatformRoleApproval as mt, AccountDeletionEligibility as n, OrganizationSignInStates as nt, AddedOrganizationTeamMember as o, OrganizationTeamPage as ot, AuthSessionSummary as p, PlatformRoleApplied as pt, OrganizationInvitationPage as q, AuthError as qt, AccountDeletionOrganization as r, OrganizationTeam as rt, AuthClientOptions as s, OrganizationWorkspaceSelection as st, AcceptInvitationInput as t, OrganizationSignInState as tt, AuthPersistenceDriver as u, PersonalWorkspaceSelection as ut, CeremonyHandoffInput as v, ReceivedOrganizationInvitation as vt, CreateOrganizationMemberInvitationInput as w, RestoredOrganizationMember as wt, ClosingOrganization as x, RemovedOrganizationMember as xt, CeremonyRecentAuthenticationRequest as y, ReceivedOrganizationInvitationPage as yt, InvitationAcceptance as z, UpdateOrganizationDisplayInput as zt };
|