@bymax-one/nest-auth 1.5.0 → 1.5.2
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/CHANGELOG.md +123 -1
- package/README.md +49 -7
- package/dist/client/index.cjs +9 -9
- package/dist/client/index.mjs +10 -10
- package/dist/react/index.cjs +18 -8
- package/dist/react/index.mjs +18 -8
- package/dist/server/index.cjs +225 -27
- package/dist/server/index.d.cts +127 -12
- package/dist/server/index.d.ts +127 -12
- package/dist/server/index.mjs +225 -28
- package/dist/shared/index.cjs +1 -0
- package/dist/shared/index.d.cts +55 -1
- package/dist/shared/index.d.ts +55 -1
- package/dist/shared/index.mjs +1 -1
- package/package.json +1 -1
package/dist/server/index.cjs
CHANGED
|
@@ -459,6 +459,41 @@ function resolveRegistration(userOptions) {
|
|
|
459
459
|
return mode;
|
|
460
460
|
}
|
|
461
461
|
__name(resolveRegistration, "resolveRegistration");
|
|
462
|
+
function assertInvitationControllers(resolved, workspaceController, tenantController) {
|
|
463
|
+
const workspacesEnabled = resolved.workspaces !== void 0;
|
|
464
|
+
if (workspaceController && !workspacesEnabled) {
|
|
465
|
+
throw new Error("[BymaxAuthModule] controllers.workspaceInvitations: true requires workspaces.enabled: true and both workspace repository providers in extraProviders.");
|
|
466
|
+
}
|
|
467
|
+
if (resolved.registration !== "invitation-only") return;
|
|
468
|
+
const workspacePath = missingPieces([
|
|
469
|
+
[
|
|
470
|
+
"workspaces.enabled",
|
|
471
|
+
workspacesEnabled
|
|
472
|
+
],
|
|
473
|
+
[
|
|
474
|
+
"controllers.workspaceInvitations",
|
|
475
|
+
workspaceController
|
|
476
|
+
]
|
|
477
|
+
]);
|
|
478
|
+
const tenantPath = missingPieces([
|
|
479
|
+
[
|
|
480
|
+
"invitations.enabled",
|
|
481
|
+
resolved.invitations.enabled
|
|
482
|
+
],
|
|
483
|
+
[
|
|
484
|
+
"controllers.invitations",
|
|
485
|
+
tenantController
|
|
486
|
+
]
|
|
487
|
+
]);
|
|
488
|
+
if (workspacePath.length > 0 && tenantPath.length > 0) {
|
|
489
|
+
throw new Error(`[BymaxAuthModule] registration: 'invitation-only' leaves no way to create an account. Enable one invitation path: workspaces (missing: ${workspacePath.join(", ")}) or tenant invitations (missing: ${tenantPath.join(", ")}).`);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
__name(assertInvitationControllers, "assertInvitationControllers");
|
|
493
|
+
function missingPieces(pieces) {
|
|
494
|
+
return pieces.filter(([, on]) => !on).map(([name]) => name);
|
|
495
|
+
}
|
|
496
|
+
__name(missingPieces, "missingPieces");
|
|
462
497
|
function resolveWorkspaceOptions(userOptions) {
|
|
463
498
|
const group = userOptions.workspaces;
|
|
464
499
|
if (group?.enabled !== true) return void 0;
|
|
@@ -15960,6 +15995,23 @@ function pageSize(limit) {
|
|
|
15960
15995
|
return Math.min(Math.max(limit, 1), MAX_PAGE_SIZE);
|
|
15961
15996
|
}
|
|
15962
15997
|
__name(pageSize, "pageSize");
|
|
15998
|
+
var MembershipBumpFailedError = class extends Error {
|
|
15999
|
+
static {
|
|
16000
|
+
__name(this, "MembershipBumpFailedError");
|
|
16001
|
+
}
|
|
16002
|
+
removed;
|
|
16003
|
+
failed;
|
|
16004
|
+
cause;
|
|
16005
|
+
/**
|
|
16006
|
+
* @param removed - Every membership the removal deleted.
|
|
16007
|
+
* @param failed - The ones whose cached access could not be dropped.
|
|
16008
|
+
* @param cause - The first error a bump failed with.
|
|
16009
|
+
*/
|
|
16010
|
+
constructor(removed, failed, cause) {
|
|
16011
|
+
super("The memberships were removed but their cached access could not be dropped."), this.removed = removed, this.failed = failed, this.cause = cause;
|
|
16012
|
+
this.name = "MembershipBumpFailedError";
|
|
16013
|
+
}
|
|
16014
|
+
};
|
|
15963
16015
|
exports.MembershipService = class MembershipService {
|
|
15964
16016
|
static {
|
|
15965
16017
|
__name(this, "MembershipService");
|
|
@@ -16041,6 +16093,76 @@ exports.MembershipService = class MembershipService {
|
|
|
16041
16093
|
});
|
|
16042
16094
|
}
|
|
16043
16095
|
/**
|
|
16096
|
+
* Removes every membership of an account that is about to be deleted or anonymised: in every
|
|
16097
|
+
* membership status and every workspace, with one `member.removed` event per removal and the
|
|
16098
|
+
* cached access of each dropped.
|
|
16099
|
+
*
|
|
16100
|
+
* Refuses while the account is the only owner of an active or suspended workspace, so the host can
|
|
16101
|
+
* transfer ownership or schedule deletion first. A workspace pending deletion does not block:
|
|
16102
|
+
* no one can finalize it early, so the owner's membership there is removed too, the workspace can
|
|
16103
|
+
* no longer be restored, and the host's finalize job deletes it when its grace period ends.
|
|
16104
|
+
*
|
|
16105
|
+
* @param tenantId - The account's tenant.
|
|
16106
|
+
* @param userId - The account.
|
|
16107
|
+
* @param actorUserId - Who authorizes the deletion: the account, an administrator, or `null` for a
|
|
16108
|
+
* job. No workspace role does, so none is checked.
|
|
16109
|
+
* @param context - Request metadata for the hook.
|
|
16110
|
+
* @returns The memberships removed.
|
|
16111
|
+
* @throws {AuthException} `auth.last_owner`, with `details.workspaces`, while a workspace would be
|
|
16112
|
+
* left without an owner; nothing is removed.
|
|
16113
|
+
* @throws {MembershipBumpFailedError} When the removal committed but a cache bump failed.
|
|
16114
|
+
*/
|
|
16115
|
+
async removeAllForUser(tenantId, userId, actorUserId, context) {
|
|
16116
|
+
const blocking = await this.soleOwnedBlocking(tenantId, userId);
|
|
16117
|
+
if (blocking.length > 0) throw new AuthException(AUTH_ERROR_CODES.LAST_OWNER, {
|
|
16118
|
+
workspaces: blocking
|
|
16119
|
+
});
|
|
16120
|
+
const at = now();
|
|
16121
|
+
const outcome = await this.memberships.removeAllForUser({
|
|
16122
|
+
tenantId,
|
|
16123
|
+
userId,
|
|
16124
|
+
ownerRole: this.group.roles.ownerRole,
|
|
16125
|
+
audit: {
|
|
16126
|
+
type: "member.removed",
|
|
16127
|
+
tenantId,
|
|
16128
|
+
actorUserId,
|
|
16129
|
+
userId,
|
|
16130
|
+
at
|
|
16131
|
+
}
|
|
16132
|
+
});
|
|
16133
|
+
if (outcome.result === "last_owner") {
|
|
16134
|
+
throw new AuthException(AUTH_ERROR_CODES.LAST_OWNER, {
|
|
16135
|
+
workspaces: outcome.workspaceIds.map((id) => ({
|
|
16136
|
+
id
|
|
16137
|
+
}))
|
|
16138
|
+
});
|
|
16139
|
+
}
|
|
16140
|
+
const failed = [];
|
|
16141
|
+
let cause;
|
|
16142
|
+
for (const removed of outcome.removed) {
|
|
16143
|
+
this.events.emit({
|
|
16144
|
+
type: "member.removed",
|
|
16145
|
+
tenantId,
|
|
16146
|
+
workspaceId: removed.workspaceId,
|
|
16147
|
+
actorUserId,
|
|
16148
|
+
userId,
|
|
16149
|
+
at
|
|
16150
|
+
}, context);
|
|
16151
|
+
try {
|
|
16152
|
+
await this.access.invalidateMembership({
|
|
16153
|
+
tenantId,
|
|
16154
|
+
workspaceId: removed.workspaceId,
|
|
16155
|
+
userId
|
|
16156
|
+
});
|
|
16157
|
+
} catch (error) {
|
|
16158
|
+
if (failed.length === 0) cause = error;
|
|
16159
|
+
failed.push(removed);
|
|
16160
|
+
}
|
|
16161
|
+
}
|
|
16162
|
+
if (failed.length > 0) throw new MembershipBumpFailedError(outcome.removed, failed, cause);
|
|
16163
|
+
return outcome.removed;
|
|
16164
|
+
}
|
|
16165
|
+
/**
|
|
16044
16166
|
* Changes a member's role.
|
|
16045
16167
|
*
|
|
16046
16168
|
* @param ref - The workspace.
|
|
@@ -16297,6 +16419,35 @@ exports.MembershipService = class MembershipService {
|
|
|
16297
16419
|
const { hierarchy, ownerRole } = this.group.roles;
|
|
16298
16420
|
return actorRole === ownerRole || actorRole !== otherRole && hasRole(actorRole, otherRole, hierarchy);
|
|
16299
16421
|
}
|
|
16422
|
+
/**
|
|
16423
|
+
* The workspaces that stop an account deletion: those the account alone owns, except the ones
|
|
16424
|
+
* pending deletion or deleted. Stops reading pages once a full page of them is known.
|
|
16425
|
+
*/
|
|
16426
|
+
async soleOwnedBlocking(tenantId, userId) {
|
|
16427
|
+
const blocking = [];
|
|
16428
|
+
let cursor;
|
|
16429
|
+
do {
|
|
16430
|
+
const page = await this.memberships.listSoleOwned({
|
|
16431
|
+
tenantId,
|
|
16432
|
+
userId,
|
|
16433
|
+
ownerRole: this.group.roles.ownerRole,
|
|
16434
|
+
...cursor === void 0 ? {} : {
|
|
16435
|
+
cursor
|
|
16436
|
+
},
|
|
16437
|
+
limit: MAX_PAGE_SIZE
|
|
16438
|
+
});
|
|
16439
|
+
for (const workspace of page.items) {
|
|
16440
|
+
if (workspace.status === "pending_deletion" || workspace.status === "deleted") continue;
|
|
16441
|
+
blocking.push({
|
|
16442
|
+
id: workspace.id,
|
|
16443
|
+
name: workspace.name,
|
|
16444
|
+
status: workspace.status
|
|
16445
|
+
});
|
|
16446
|
+
}
|
|
16447
|
+
cursor = page.nextCursor ?? void 0;
|
|
16448
|
+
} while (cursor !== void 0 && blocking.length < MAX_PAGE_SIZE);
|
|
16449
|
+
return blocking.slice(0, MAX_PAGE_SIZE);
|
|
16450
|
+
}
|
|
16300
16451
|
async removeWith(ref, userId, event, context, judged2) {
|
|
16301
16452
|
const result = await this.memberships.remove({
|
|
16302
16453
|
...ref,
|
|
@@ -17488,7 +17639,8 @@ exports.WorkspaceInvitationService = class WorkspaceInvitationService {
|
|
|
17488
17639
|
role: record.role,
|
|
17489
17640
|
inviteToken: token,
|
|
17490
17641
|
expiresAt: new Date(Date.parse(record.createdAt) + ttl * 1e3),
|
|
17491
|
-
accountExists
|
|
17642
|
+
accountExists,
|
|
17643
|
+
kind: record.kind
|
|
17492
17644
|
});
|
|
17493
17645
|
} catch (err) {
|
|
17494
17646
|
throw new Error(describeChannelStatus(err));
|
|
@@ -23689,9 +23841,7 @@ exports.BymaxAuthModule = class _BymaxAuthModule {
|
|
|
23689
23841
|
if (includeWorkspaceController && resolved.workspaces === void 0) {
|
|
23690
23842
|
throw new Error("[BymaxAuthModule] controllers.workspaces: true requires workspaces.enabled: true and both workspace repository providers in extraProviders.");
|
|
23691
23843
|
}
|
|
23692
|
-
|
|
23693
|
-
throw new Error("[BymaxAuthModule] controllers.workspaceInvitations: true requires workspaces.enabled: true and both workspace repository providers in extraProviders.");
|
|
23694
|
-
}
|
|
23844
|
+
assertInvitationControllers(resolved, includeWorkspaceInvitations, includeInvitations);
|
|
23695
23845
|
if (resolved.apiKeys.auditMode === "required" && cannotAuditApiKeys(extraProviders)) {
|
|
23696
23846
|
throw new Error("[BymaxAuthModule] apiKeys.auditMode: 'required' needs an onApiKeyRequest hook, and the BYMAX_AUTH_HOOKS provider has none. Implement it, or use auditMode: 'best-effort'.");
|
|
23697
23847
|
}
|
|
@@ -24068,29 +24218,39 @@ function authDocumentSecurity({ guard, tokenDelivery }) {
|
|
|
24068
24218
|
return Object.freeze(schemes.map(requirementFor));
|
|
24069
24219
|
}
|
|
24070
24220
|
__name(authDocumentSecurity, "authDocumentSecurity");
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
"passwordResetOtp",
|
|
24074
|
-
"emailVerificationOtp",
|
|
24075
|
-
"passwordChanged",
|
|
24076
|
-
"emailChangeVerification",
|
|
24077
|
-
"emailChanged",
|
|
24078
|
-
"mfaEnabled",
|
|
24079
|
-
"mfaDisabled",
|
|
24080
|
-
"newSessionAlert",
|
|
24081
|
-
"invitation"
|
|
24082
|
-
];
|
|
24083
|
-
Object.freeze(AUTH_EMAIL_KINDS);
|
|
24084
|
-
var CREDENTIAL_BEARING_KINDS = /* @__PURE__ */ new Set([
|
|
24085
|
-
"passwordResetToken",
|
|
24086
|
-
"passwordResetOtp",
|
|
24087
|
-
"emailVerificationOtp",
|
|
24088
|
-
"emailChangeVerification",
|
|
24089
|
-
"invitation"
|
|
24090
|
-
]);
|
|
24091
|
-
var KNOWN_EMAIL_KINDS = new Set(AUTH_EMAIL_KINDS);
|
|
24221
|
+
|
|
24222
|
+
// src/server/providers/default-auth-email.messages.ts
|
|
24092
24223
|
var CODE_VALIDITY_TEXT = "It expires shortly, so use it soon.";
|
|
24093
24224
|
var UNEXPECTED_CHANGE_TEXT = "If this was not you, secure your account immediately: change your password and sign out of every session.";
|
|
24225
|
+
function hasInviter(invite) {
|
|
24226
|
+
return invite.inviterName.trim() !== "";
|
|
24227
|
+
}
|
|
24228
|
+
__name(hasInviter, "hasInviter");
|
|
24229
|
+
function workspaceInvitationSubject(invite) {
|
|
24230
|
+
if (invite.kind === "member") {
|
|
24231
|
+
return `${invite.inviterName} invited you to ${invite.workspaceName}`;
|
|
24232
|
+
}
|
|
24233
|
+
return hasInviter(invite) ? `${invite.inviterName} invited you to set up ${invite.workspaceName}` : `You have been invited to set up ${invite.workspaceName}`;
|
|
24234
|
+
}
|
|
24235
|
+
__name(workspaceInvitationSubject, "workspaceInvitationSubject");
|
|
24236
|
+
function workspaceInvitationOpening(invite) {
|
|
24237
|
+
if (invite.kind === "member") {
|
|
24238
|
+
return `${invite.inviterName} invited you to the workspace ${invite.workspaceName} as ${invite.role}.`;
|
|
24239
|
+
}
|
|
24240
|
+
const subject = hasInviter(invite) ? `${invite.inviterName} invited you` : "You have been invited";
|
|
24241
|
+
return `${subject} to set up the workspace ${invite.workspaceName} as its owner.`;
|
|
24242
|
+
}
|
|
24243
|
+
__name(workspaceInvitationOpening, "workspaceInvitationOpening");
|
|
24244
|
+
function workspaceInvitationText(invite) {
|
|
24245
|
+
const step = invite.accountExists ? "Sign in" : "Create your account";
|
|
24246
|
+
return [
|
|
24247
|
+
workspaceInvitationOpening(invite),
|
|
24248
|
+
`${step} and use this token to accept: ${invite.inviteToken}`,
|
|
24249
|
+
`It expires on ${invite.expiresAt.toISOString()}.`,
|
|
24250
|
+
"If you were not expecting this invitation, ignore this message."
|
|
24251
|
+
].join("\n\n");
|
|
24252
|
+
}
|
|
24253
|
+
__name(workspaceInvitationText, "workspaceInvitationText");
|
|
24094
24254
|
var DEFAULT_MESSAGES = {
|
|
24095
24255
|
passwordResetToken: /* @__PURE__ */ __name(({ token }) => ({
|
|
24096
24256
|
subject: "Reset your password",
|
|
@@ -24167,8 +24327,37 @@ Use this token to accept: ${invite.inviteToken}
|
|
|
24167
24327
|
It expires on ${invite.expiresAt.toISOString()}.
|
|
24168
24328
|
|
|
24169
24329
|
If you were not expecting this invitation, ignore this message.`
|
|
24170
|
-
}), "invitation")
|
|
24330
|
+
}), "invitation"),
|
|
24331
|
+
workspaceInvitation: /* @__PURE__ */ __name(({ invite }) => ({
|
|
24332
|
+
subject: workspaceInvitationSubject(invite),
|
|
24333
|
+
text: workspaceInvitationText(invite)
|
|
24334
|
+
}), "workspaceInvitation")
|
|
24171
24335
|
};
|
|
24336
|
+
|
|
24337
|
+
// src/server/providers/default-auth-email.provider.ts
|
|
24338
|
+
var AUTH_EMAIL_KINDS = [
|
|
24339
|
+
"passwordResetToken",
|
|
24340
|
+
"passwordResetOtp",
|
|
24341
|
+
"emailVerificationOtp",
|
|
24342
|
+
"passwordChanged",
|
|
24343
|
+
"emailChangeVerification",
|
|
24344
|
+
"emailChanged",
|
|
24345
|
+
"mfaEnabled",
|
|
24346
|
+
"mfaDisabled",
|
|
24347
|
+
"newSessionAlert",
|
|
24348
|
+
"invitation",
|
|
24349
|
+
"workspaceInvitation"
|
|
24350
|
+
];
|
|
24351
|
+
Object.freeze(AUTH_EMAIL_KINDS);
|
|
24352
|
+
var CREDENTIAL_BEARING_KINDS = /* @__PURE__ */ new Set([
|
|
24353
|
+
"passwordResetToken",
|
|
24354
|
+
"passwordResetOtp",
|
|
24355
|
+
"emailVerificationOtp",
|
|
24356
|
+
"emailChangeVerification",
|
|
24357
|
+
"invitation",
|
|
24358
|
+
"workspaceInvitation"
|
|
24359
|
+
]);
|
|
24360
|
+
var KNOWN_EMAIL_KINDS = new Set(AUTH_EMAIL_KINDS);
|
|
24172
24361
|
function escapeHtml(value) {
|
|
24173
24362
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
24174
24363
|
}
|
|
@@ -24195,7 +24384,7 @@ var DefaultAuthEmailProvider = class _DefaultAuthEmailProvider {
|
|
|
24195
24384
|
*
|
|
24196
24385
|
* A `Map`, not the plain object the option accepts. An object lookup walks the prototype chain,
|
|
24197
24386
|
* so `policy['toString']` answers with a function rather than `undefined` — unreachable here,
|
|
24198
|
-
* because the key is a closed union of
|
|
24387
|
+
* because the key is a closed union of literals this file writes, but "the key cannot be
|
|
24199
24388
|
* dangerous" is a property of today's call sites and not of the lookup. A `Map` has no prototype
|
|
24200
24389
|
* chain to walk, which makes it a property of the data structure instead.
|
|
24201
24390
|
*/
|
|
@@ -24321,6 +24510,14 @@ var DefaultAuthEmailProvider = class _DefaultAuthEmailProvider {
|
|
|
24321
24510
|
locale
|
|
24322
24511
|
}), "invitation");
|
|
24323
24512
|
}
|
|
24513
|
+
async sendWorkspaceInvitation(tenantId, email, data, locale) {
|
|
24514
|
+
await this.deliver(tenantId, email, this.messages.workspaceInvitation({
|
|
24515
|
+
tenantId,
|
|
24516
|
+
email,
|
|
24517
|
+
invite: data,
|
|
24518
|
+
locale
|
|
24519
|
+
}), "workspaceInvitation");
|
|
24520
|
+
}
|
|
24324
24521
|
/**
|
|
24325
24522
|
* Renders the body to HTML (unless the message already carries its own), hands the message to the
|
|
24326
24523
|
* channel, and swallows any delivery error.
|
|
@@ -25029,6 +25226,7 @@ exports.DefaultAuthEmailProvider = DefaultAuthEmailProvider;
|
|
|
25029
25226
|
exports.ForgotPasswordDto = ForgotPasswordDto;
|
|
25030
25227
|
exports.IS_PUBLIC_KEY = IS_PUBLIC_KEY;
|
|
25031
25228
|
exports.LoginDto = LoginDto;
|
|
25229
|
+
exports.MembershipBumpFailedError = MembershipBumpFailedError;
|
|
25032
25230
|
exports.MfaChallengeDto = MfaChallengeDto;
|
|
25033
25231
|
exports.MfaDisableDto = MfaDisableDto;
|
|
25034
25232
|
exports.MfaRegenerateRecoveryCodesDto = MfaRegenerateRecoveryCodesDto;
|
package/dist/server/index.d.cts
CHANGED
|
@@ -707,8 +707,9 @@ declare const ANY_WORKSPACE_MEMBER: unique symbol;
|
|
|
707
707
|
* address. `POST /auth/register` and the OAuth `create` action answer `403
|
|
708
708
|
* auth.registration_closed`, the invitation accept routes stay open, and an OAuth flow started
|
|
709
709
|
* with a workspace invitation may create the account it was addressed to. Existing accounts
|
|
710
|
-
* keep signing in. Startup refuses the mode
|
|
711
|
-
*
|
|
710
|
+
* keep signing in. Startup refuses the mode unless an invitation controller is mounted
|
|
711
|
+
* (`controllers.workspaceInvitations` with `workspaces.enabled`, or `controllers.invitations`
|
|
712
|
+
* with `invitations.enabled`), since otherwise no account could ever be created.
|
|
712
713
|
*/
|
|
713
714
|
type RegistrationMode = 'open' | 'invitation-only';
|
|
714
715
|
/** A role list in which `ANY_WORKSPACE_MEMBER` stands for every active member. */
|
|
@@ -3001,6 +3002,12 @@ interface WorkspaceInviteData {
|
|
|
3001
3002
|
expiresAt: Date;
|
|
3002
3003
|
/** Whether an account already exists for the address: sign-in wording versus sign-up wording. */
|
|
3003
3004
|
accountExists: boolean;
|
|
3005
|
+
/**
|
|
3006
|
+
* `'member'` joins a workspace that exists; `'bootstrap'` is a platform invitation to own a
|
|
3007
|
+
* workspace that is created when the invitee accepts, so `workspaceName` names one that does not
|
|
3008
|
+
* exist yet and `inviterName` is a display name the platform chose, which may be empty.
|
|
3009
|
+
*/
|
|
3010
|
+
kind: 'member' | 'bootstrap';
|
|
3004
3011
|
}
|
|
3005
3012
|
/**
|
|
3006
3013
|
* Data required to render and send a tenant invitation email.
|
|
@@ -4948,6 +4955,48 @@ type GuardedWriteResult = 'ok' | 'not_found' | 'last_owner';
|
|
|
4948
4955
|
type MemberChangeResult = GuardedWriteResult | 'actor_changed';
|
|
4949
4956
|
/** Outcome of {@link IMembershipRepository.transferOwnership}. */
|
|
4950
4957
|
type TransferOwnershipResult = GuardedWriteResult | 'target_not_member';
|
|
4958
|
+
/**
|
|
4959
|
+
* The event persisted for each membership {@link IMembershipRepository.removeAllForUser} deletes.
|
|
4960
|
+
* The repository stores one `member.removed` event per removed membership, naming that
|
|
4961
|
+
* membership's workspace, and nothing else is added to it.
|
|
4962
|
+
*/
|
|
4963
|
+
interface AccountRemovalAudit {
|
|
4964
|
+
type: 'member.removed';
|
|
4965
|
+
/** The tenant of the account. */
|
|
4966
|
+
tenantId: string;
|
|
4967
|
+
/** Who authorized the removal: the member themselves, an administrator, or `null` for a job. */
|
|
4968
|
+
actorUserId: string | null;
|
|
4969
|
+
/** The account whose memberships are removed. */
|
|
4970
|
+
userId: string;
|
|
4971
|
+
/** When the removal was decided, as an ISO-8601 string. */
|
|
4972
|
+
at: string;
|
|
4973
|
+
}
|
|
4974
|
+
/** Input to {@link IMembershipRepository.removeAllForUser}. */
|
|
4975
|
+
interface RemoveAllMembershipsParams {
|
|
4976
|
+
/** The tenant of the account. */
|
|
4977
|
+
tenantId: string;
|
|
4978
|
+
/** The account whose memberships are removed. */
|
|
4979
|
+
userId: string;
|
|
4980
|
+
/** The role that owns a workspace, so the last-owner rule can be decided with the write. */
|
|
4981
|
+
ownerRole: string;
|
|
4982
|
+
/** The event to persist for each membership removed. */
|
|
4983
|
+
audit: AccountRemovalAudit;
|
|
4984
|
+
}
|
|
4985
|
+
/** One membership an account removal deleted. */
|
|
4986
|
+
interface RemovedMembership {
|
|
4987
|
+
/** The workspace the membership was in. */
|
|
4988
|
+
workspaceId: string;
|
|
4989
|
+
/** The role the account held there. */
|
|
4990
|
+
role: string;
|
|
4991
|
+
}
|
|
4992
|
+
/** Outcome of {@link IMembershipRepository.removeAllForUser}. */
|
|
4993
|
+
type RemoveAllMembershipsResult = {
|
|
4994
|
+
result: 'ok';
|
|
4995
|
+
removed: RemovedMembership[];
|
|
4996
|
+
} | {
|
|
4997
|
+
result: 'last_owner';
|
|
4998
|
+
workspaceIds: string[];
|
|
4999
|
+
};
|
|
4951
5000
|
/**
|
|
4952
5001
|
* The membership port a host implements.
|
|
4953
5002
|
*
|
|
@@ -5047,6 +5096,24 @@ interface IMembershipRepository {
|
|
|
5047
5096
|
* @param params - The membership key, the roles judged, owner role and audit event.
|
|
5048
5097
|
*/
|
|
5049
5098
|
remove(params: RemoveMembershipParams): Promise<MemberChangeResult>;
|
|
5099
|
+
/**
|
|
5100
|
+
* Removes every membership of an account, in every membership status and in every workspace
|
|
5101
|
+
* status, persisting one `audit` event per removed membership in the same transaction.
|
|
5102
|
+
*
|
|
5103
|
+
* For the host that is about to delete or anonymise a user. `listForUser` shows only active
|
|
5104
|
+
* memberships of active workspaces, so only the repository can find the rest.
|
|
5105
|
+
*
|
|
5106
|
+
* The last-owner rule is decided inside the transaction: when the account is the only active
|
|
5107
|
+
* `ownerRole` holder of a workspace that is not `pending_deletion` or `deleted`, nothing is
|
|
5108
|
+
* removed, no audit row is written and the answer names those workspaces. A workspace pending
|
|
5109
|
+
* deletion does not block: no one can finalize it early, and its owner must not wait out the
|
|
5110
|
+
* grace period to delete their account. Removing the owner's membership there means the
|
|
5111
|
+
* workspace can no longer be restored, and it is deleted when its grace period ends.
|
|
5112
|
+
*
|
|
5113
|
+
* @param params - The tenant, the account, the owner role and the event template.
|
|
5114
|
+
* @returns The removed memberships, or `'last_owner'` with the ids of the workspaces that block.
|
|
5115
|
+
*/
|
|
5116
|
+
removeAllForUser(params: RemoveAllMembershipsParams): Promise<RemoveAllMembershipsResult>;
|
|
5050
5117
|
/**
|
|
5051
5118
|
* Hands ownership from one member to another in one transaction, persisting `audit` with it.
|
|
5052
5119
|
*
|
|
@@ -5319,6 +5386,10 @@ interface AuthEmailCatalogue {
|
|
|
5319
5386
|
invitation(input: AuthEmailContext & {
|
|
5320
5387
|
invite: InviteData;
|
|
5321
5388
|
}): AuthEmailMessage;
|
|
5389
|
+
/** Invitation to a workspace, or to set one up and own it. */
|
|
5390
|
+
workspaceInvitation(input: AuthEmailContext & {
|
|
5391
|
+
invite: WorkspaceInviteData;
|
|
5392
|
+
}): AuthEmailMessage;
|
|
5322
5393
|
}
|
|
5323
5394
|
/** How the provider reacts to a delivery failure. */
|
|
5324
5395
|
type DeliveryErrorPolicy = 'swallow' | 'rethrow';
|
|
@@ -5331,7 +5402,7 @@ type AuthEmailKind = keyof AuthEmailCatalogue;
|
|
|
5331
5402
|
* bare `'rethrow'` needs the list. Kept adjacent to {@link AuthEmailCatalogue} so the two are read
|
|
5332
5403
|
* together; a catalogue entry added without a matching entry here fails the test that compares them.
|
|
5333
5404
|
*/
|
|
5334
|
-
declare const AUTH_EMAIL_KINDS: readonly ["passwordResetToken", "passwordResetOtp", "emailVerificationOtp", "passwordChanged", "emailChangeVerification", "emailChanged", "mfaEnabled", "mfaDisabled", "newSessionAlert", "invitation"];
|
|
5405
|
+
declare const AUTH_EMAIL_KINDS: readonly ["passwordResetToken", "passwordResetOtp", "emailVerificationOtp", "passwordChanged", "emailChangeVerification", "emailChanged", "mfaEnabled", "mfaDisabled", "newSessionAlert", "invitation", "workspaceInvitation"];
|
|
5335
5406
|
/**
|
|
5336
5407
|
* A delivery-error policy chosen per message.
|
|
5337
5408
|
*
|
|
@@ -5371,9 +5442,9 @@ interface DefaultAuthEmailProviderOptions {
|
|
|
5371
5442
|
* that. `redactSecrets` is for strings you know contain the literal value. This is the one
|
|
5372
5443
|
* credential this library cannot contain on your behalf.
|
|
5373
5444
|
*
|
|
5374
|
-
* **Which is why this takes a MAP as well as a bare policy.**
|
|
5445
|
+
* **Which is why this takes a MAP as well as a bare policy.** Six messages carry a credential
|
|
5375
5446
|
* in their body, and the two flows that motivate the opt-in are two of them — so a bare
|
|
5376
|
-
* `'rethrow'` reaches
|
|
5447
|
+
* `'rethrow'` reaches four MORE credential-bearing paths than anyone asked for, on top of every
|
|
5377
5448
|
* message that carries none. Naming the flows keeps the unlaundered error where a deployment
|
|
5378
5449
|
* wanted it and leaves it off the rest:
|
|
5379
5450
|
*
|
|
@@ -5385,7 +5456,7 @@ interface DefaultAuthEmailProviderOptions {
|
|
|
5385
5456
|
*
|
|
5386
5457
|
* A message left out of the map keeps `'swallow'`, so the safe value is what you get by saying
|
|
5387
5458
|
* nothing, and widening the opt-in is always an explicit act. A bare policy still works and
|
|
5388
|
-
* still applies to
|
|
5459
|
+
* still applies to every message — it is the coarse form, kept because it is the honest way to say
|
|
5389
5460
|
* "this deployment wants the throw everywhere".
|
|
5390
5461
|
*/
|
|
5391
5462
|
readonly onDeliveryError?: DeliveryErrorPolicy | DeliveryErrorPolicyMap;
|
|
@@ -5408,7 +5479,7 @@ interface DefaultAuthEmailProviderOptions {
|
|
|
5408
5479
|
* a channel that is down would turn each into a failed request over a message that is a
|
|
5409
5480
|
* notification rather than the operation itself. The failure is logged and the flow continues.
|
|
5410
5481
|
* Setting `'rethrow'` makes EVERY method reject with the channel's original error — there is one
|
|
5411
|
-
* `deliver()` behind all
|
|
5482
|
+
* `deliver()` behind all of them and one place the policy is read, so no method is exempt. That is the
|
|
5412
5483
|
* whole point of the option and is documented with the duty it carries.
|
|
5413
5484
|
*
|
|
5414
5485
|
* The three MFA notices are the exception at the CALLER rather than here: `MfaService` sends them
|
|
@@ -5424,8 +5495,8 @@ interface DefaultAuthEmailProviderOptions {
|
|
|
5424
5495
|
* verification the recipient never got, so it cannot complete. A deployment that wants the throw
|
|
5425
5496
|
* back on those two flows names them:
|
|
5426
5497
|
* `{ onDeliveryError: { passwordResetToken: 'rethrow', emailChangeVerification: 'rethrow' } }`.
|
|
5427
|
-
* A bare `'rethrow'` also works and opts in every message.
|
|
5428
|
-
* those two flows are two of the
|
|
5498
|
+
* A bare `'rethrow'` also works and opts in every message. Six of them render a credential, and
|
|
5499
|
+
* those two flows are two of the six — so the bare form reaches four further credential-bearing
|
|
5429
5500
|
* paths, a wider trade than either flow asks for. The default optimizes for the common case: a
|
|
5430
5501
|
* transient channel outage must not fail the user's action.
|
|
5431
5502
|
*
|
|
@@ -5446,7 +5517,7 @@ declare class DefaultAuthEmailProvider implements IEmailProvider {
|
|
|
5446
5517
|
*
|
|
5447
5518
|
* A `Map`, not the plain object the option accepts. An object lookup walks the prototype chain,
|
|
5448
5519
|
* so `policy['toString']` answers with a function rather than `undefined` — unreachable here,
|
|
5449
|
-
* because the key is a closed union of
|
|
5520
|
+
* because the key is a closed union of literals this file writes, but "the key cannot be
|
|
5450
5521
|
* dangerous" is a property of today's call sites and not of the lookup. A `Map` has no prototype
|
|
5451
5522
|
* chain to walk, which makes it a property of the data structure instead.
|
|
5452
5523
|
*/
|
|
@@ -5476,6 +5547,7 @@ declare class DefaultAuthEmailProvider implements IEmailProvider {
|
|
|
5476
5547
|
sendNewSessionAlert(tenantId: string, email: string, sessionInfo: SessionAlertInfo, locale?: string): Promise<void>;
|
|
5477
5548
|
/** @inheritdoc */
|
|
5478
5549
|
sendInvitation(tenantId: string, email: string, inviteData: InviteData, locale?: string): Promise<void>;
|
|
5550
|
+
sendWorkspaceInvitation(tenantId: string, email: string, data: WorkspaceInviteData, locale?: string): Promise<void>;
|
|
5479
5551
|
/**
|
|
5480
5552
|
* Renders the body to HTML (unless the message already carries its own), hands the message to the
|
|
5481
5553
|
* channel, and swallows any delivery error.
|
|
@@ -12211,6 +12283,23 @@ declare class AuthTokenVerifierService {
|
|
|
12211
12283
|
interface MyWorkspaces extends MembershipPage<MembershipWithWorkspace> {
|
|
12212
12284
|
lastActiveWorkspaceId: string | null;
|
|
12213
12285
|
}
|
|
12286
|
+
/**
|
|
12287
|
+
* Thrown by {@link MembershipService.removeAllForUser} when the memberships were removed but the
|
|
12288
|
+
* cached access of some of them could not be dropped. The removal is committed, so calling it again
|
|
12289
|
+
* finds nothing to remove: the host re-runs `WorkspaceAccessService.invalidateMembership` for each
|
|
12290
|
+
* entry of {@link MembershipBumpFailedError.failed}, or waits out `membershipCacheTtlSeconds`.
|
|
12291
|
+
*/
|
|
12292
|
+
declare class MembershipBumpFailedError extends Error {
|
|
12293
|
+
readonly removed: readonly RemovedMembership[];
|
|
12294
|
+
readonly failed: readonly RemovedMembership[];
|
|
12295
|
+
readonly cause: unknown;
|
|
12296
|
+
/**
|
|
12297
|
+
* @param removed - Every membership the removal deleted.
|
|
12298
|
+
* @param failed - The ones whose cached access could not be dropped.
|
|
12299
|
+
* @param cause - The first error a bump failed with.
|
|
12300
|
+
*/
|
|
12301
|
+
constructor(removed: readonly RemovedMembership[], failed: readonly RemovedMembership[], cause: unknown);
|
|
12302
|
+
}
|
|
12214
12303
|
/**
|
|
12215
12304
|
* Changes who belongs to a workspace and what they may do there.
|
|
12216
12305
|
*
|
|
@@ -12279,6 +12368,27 @@ declare class MembershipService {
|
|
|
12279
12368
|
cursor?: string;
|
|
12280
12369
|
limit?: number;
|
|
12281
12370
|
}): Promise<MembershipPage<AuthWorkspace>>;
|
|
12371
|
+
/**
|
|
12372
|
+
* Removes every membership of an account that is about to be deleted or anonymised: in every
|
|
12373
|
+
* membership status and every workspace, with one `member.removed` event per removal and the
|
|
12374
|
+
* cached access of each dropped.
|
|
12375
|
+
*
|
|
12376
|
+
* Refuses while the account is the only owner of an active or suspended workspace, so the host can
|
|
12377
|
+
* transfer ownership or schedule deletion first. A workspace pending deletion does not block:
|
|
12378
|
+
* no one can finalize it early, so the owner's membership there is removed too, the workspace can
|
|
12379
|
+
* no longer be restored, and the host's finalize job deletes it when its grace period ends.
|
|
12380
|
+
*
|
|
12381
|
+
* @param tenantId - The account's tenant.
|
|
12382
|
+
* @param userId - The account.
|
|
12383
|
+
* @param actorUserId - Who authorizes the deletion: the account, an administrator, or `null` for a
|
|
12384
|
+
* job. No workspace role does, so none is checked.
|
|
12385
|
+
* @param context - Request metadata for the hook.
|
|
12386
|
+
* @returns The memberships removed.
|
|
12387
|
+
* @throws {AuthException} `auth.last_owner`, with `details.workspaces`, while a workspace would be
|
|
12388
|
+
* left without an owner; nothing is removed.
|
|
12389
|
+
* @throws {MembershipBumpFailedError} When the removal committed but a cache bump failed.
|
|
12390
|
+
*/
|
|
12391
|
+
removeAllForUser(tenantId: string, userId: string, actorUserId: string | null, context: HookContext): Promise<RemovedMembership[]>;
|
|
12282
12392
|
/**
|
|
12283
12393
|
* Changes a member's role.
|
|
12284
12394
|
*
|
|
@@ -12394,6 +12504,11 @@ declare class MembershipService {
|
|
|
12394
12504
|
* only on a role it includes and does not itself hold.
|
|
12395
12505
|
*/
|
|
12396
12506
|
private outranks;
|
|
12507
|
+
/**
|
|
12508
|
+
* The workspaces that stop an account deletion: those the account alone owns, except the ones
|
|
12509
|
+
* pending deletion or deleted. Stops reading pages once a full page of them is known.
|
|
12510
|
+
*/
|
|
12511
|
+
private soleOwnedBlocking;
|
|
12397
12512
|
private removeWith;
|
|
12398
12513
|
/**
|
|
12399
12514
|
* Turns a guarded write's outcome into an error, or ends the affected members' cached access.
|
|
@@ -14273,5 +14388,5 @@ declare class WorkspaceInvitationService {
|
|
|
14273
14388
|
private activeWorkspace;
|
|
14274
14389
|
}
|
|
14275
14390
|
|
|
14276
|
-
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LoginDto, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encrypt, generateSecureToken, hasRole, hmacSha256, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspaceScopedName };
|
|
14277
|
-
export type { AcceptedInvitation, AcceptedSignup, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RegistrationMode, RemoveMembershipParams, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|
|
14391
|
+
export { ALLOW_PENDING_WORKSPACE_KEY, ANY_WORKSPACE_MEMBER, API_KEY_MAX_LABEL_LENGTH, API_KEY_MAX_OVERLAP_SECONDS, AUTH_EMAIL_KINDS, AUTH_ERROR_CODES, AUTH_ERROR_MESSAGES, AUTH_ERROR_STATUS, AUTH_SECURITY_SCHEMES, AUTH_THROTTLE_CONFIGS, AcceptInvitationDto, AccountStatusService, AllowAllBreachChecker, AllowPendingWorkspace, ApiKeyGuard, ApiKeyScopes, ApiKeyService, AuthException, AuthExceptionFilter, AuthRateLimit, AuthRateLimitGuard, AuthRevocationService, AuthService, AuthTokenVerifierService, Authenticated, BYMAX_AUTH_API_KEY_CLOCK, BYMAX_AUTH_API_KEY_REPOSITORY, BYMAX_AUTH_BREACH_CHECKER, BYMAX_AUTH_EMAIL_PROVIDER, BYMAX_AUTH_HOOKS, BYMAX_AUTH_MEMBERSHIP_REPOSITORY, BYMAX_AUTH_OPTIONS, BYMAX_AUTH_PLATFORM_USER_REPOSITORY, BYMAX_AUTH_REDIS_CLIENT, BYMAX_AUTH_USER_REPOSITORY, BYMAX_AUTH_WORKSPACE_REPOSITORY, BruteForceService, BymaxAuthModule, ChangePasswordDto, CommonPasswordChecker, CreateInvitationDto, CurrentApiKey, CurrentUser, CurrentWorkspace, CurrentWsWorkspace, DefaultAuthEmailProvider, EmailChangeService, ForgotPasswordDto, HibpBreachChecker, IS_PUBLIC_KEY, InvitationService, JwtAuthGuard, JwtPlatformGuard, LoginDto, MembershipBumpFailedError, MembershipService, MfaChallengeDto, MfaDisableDto, MfaRegenerateRecoveryCodesDto, MfaRequiredGuard, MfaService, MfaVerifyDto, NoOpAuthHooks, NoOpEmailProvider, OAuthService, OptionalAuthGuard, OtpService, PLATFORM_ROLES_KEY, PasswordResetService, PlatformAuthService, PlatformLoginDto, PlatformRoles, PlatformRolesGuard, Public, ROLES_KEY, ReauthenticationService, RegisterDto, RequestEncoding, RequestEncodingGuard, ResendOtpDto, ResendVerificationDto, ResetPasswordDto, Roles, RolesGuard, SKIP_MFA_KEY, SelfOrAdminGuard, ServiceKey, SessionService, SkipMfa, TokenDeliveryService, TrustedOriginGuard, UserStatusGuard, VerifyEmailDto, VerifyOtpDto, WORKSPACE_PERMISSION_KEY, WORKSPACE_ROLES_KEY, WS_TICKET_TTL_SECONDS, WorkspaceAccessService, WorkspaceActionsService, WorkspaceCallerService, WorkspaceGuard, WorkspaceInvitationService, WorkspacePermission, WorkspaceRoles, WorkspaceService, WsAuthExceptionFilter, WsJwtGuard, WsTicketService, WsWorkspaceGuard, authDocumentSecurity, createAuthValidationPipe, decodeWorkspaceScopedName, decrypt, describeChannelStatus, describeError, encrypt, generateSecureToken, hasRole, hmacSha256, redactSecrets, reduceToBaseWord, sanitizeHeaders, sha256, sleep, stampJobContext, timingSafeCompare, workspaceScopedName };
|
|
14392
|
+
export type { AcceptedInvitation, AcceptedSignup, AccountRemovalAudit, ActingMember, ApiKeyAccessEvent, ApiKeyClock, ApiKeyDenyReason, ApiKeyPrincipal, AuthApiKey, AuthApiKeySummary, AuthDocumentSecurityParams, AuthEmailCatalogue, AuthEmailContext, AuthEmailKind, AuthEmailMessage, AuthEmailSink, AuthErrorCode, AuthFieldError, AuthGuardFamily, AuthMembership, AuthModuleAsyncOptions, AuthPlane, AuthPlatformUser, AuthRateLimitWindow, AuthResult, AuthUser, AuthWorkspace, AuthenticatedRequest, BearerAuthResponse, BeforeRegisterResult, BeforeWorkspaceCreateResult, BootstrapInvitationRecord, BothAuthResponse, BymaxAuthModuleOptions, BymaxAuthRateLimitOptions, ChangeMembershipRoleParams, ClientIpSource, CookieAuthResponse, CountOwnedParams, CreateMembershipParams, CreateMembershipResult, CreateSessionParams, CreateUserData, CreateWithOAuthData, CreateWorkspaceResult, CreateWorkspaceWithOwnerParams, CurrentWorkspaceContext, DashboardJwtPayload, DefaultAuthEmailProviderOptions, DeliveryErrorPolicy, DeliveryErrorPolicyMap, FinalizeResult, FindUserByEmailParams, FindUserByOAuthIdParams, GuardedWriteResult, HookContext, IApiKeyRepository, IAuthHooks, IEmailProvider, IMembershipRepository, IPasswordBreachChecker, IPlatformUserRepository, IUserRepository, IWorkspaceRepository, InviteData, IssueApiKeyInput, IssuedApiKey, LastActiveWorkspaceRef, LinkOAuthParams, ListMembershipsForUserParams, ListMembershipsForWorkspaceParams, ListSessionsParams, ListSoleOwnedParams, LiveSessionParams, MemberChangeResult, MemberInvitationRecord, MembershipPage, MembershipRef, MembershipStatus, MembershipWithWorkspace, MfaChallengeResult, MfaSetupResult, MfaTempPayload, MyWorkspaces, OAuthLoginResult, OAuthMfaChallengeResult, OAuthProfile, OAuthProviderPlugin, OpenApiSecurityRequirement, PlatformAuthResult, PlatformAuthenticatedRequest, PlatformBearerAuthResponse, PlatformJwtPayload, RegistrationMode, RemoveAllMembershipsParams, RemoveAllMembershipsResult, RemoveMembershipParams, RemovedMembership, RenameWorkspaceParams, RenameWorkspaceResult, RequestEncodingPolicy, ResolvedOptions, ResolvedWorkspaceMember, RevocableTokenPayload, RevokeAllExceptCurrentParams, RevokeAllSessionsParams, RevokeSessionParams, RotateApiKeyInput, RotatedTokenResult, SafeAuthPlatformUser, SafeAuthUser, ScheduledDeletion, SessionAlertInfo, SessionInfo, SetLastActiveWorkspaceParams, SignupRequest, StoredWorkspaceInvitation, TenantResolverRequest, TenantScopedUserRef, TransferOwnershipParams, TransferOwnershipResult, UpdateEmailParams, UpdateEmailVerifiedParams, UpdateMfaData, UpdateMfaParams, UpdatePasswordParams, UpdatePlatformMfaData, UpdateStatusParams, UpdateWorkspaceStatusParams, UpdateWorkspaceStatusResult, VerifiedAccessToken, VerifiedWorkspaceAccessToken, VerifyAccessTokenOptions, WorkspaceAccess, WorkspaceAccessView, WorkspaceAction, WorkspaceActor, WorkspaceAuditEvent, WorkspaceCheck, WorkspaceInvitationPreview, WorkspaceInvitationView, WorkspaceInviteData, WorkspaceJobContext, WorkspaceOptions, WorkspacePermissionOptions, WorkspaceRef, WorkspaceRequest, WorkspaceRoleList, WorkspaceStatus, WsTicketSnapshot };
|