@x12i/keyrox-store 0.1.0 → 0.2.1

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.
Files changed (45) hide show
  1. package/dist/application-lifecycle.d.ts +6 -0
  2. package/dist/application-lifecycle.d.ts.map +1 -0
  3. package/dist/application-lifecycle.js +28 -0
  4. package/dist/application-lifecycle.js.map +1 -0
  5. package/dist/directory-access.d.ts +61 -0
  6. package/dist/directory-access.d.ts.map +1 -0
  7. package/dist/directory-access.js +20 -0
  8. package/dist/directory-access.js.map +1 -0
  9. package/dist/directory-invitation.d.ts +34 -0
  10. package/dist/directory-invitation.d.ts.map +1 -0
  11. package/dist/directory-invitation.js +29 -0
  12. package/dist/directory-invitation.js.map +1 -0
  13. package/dist/directory-memory.d.ts +21 -4
  14. package/dist/directory-memory.d.ts.map +1 -1
  15. package/dist/directory-memory.js +1096 -24
  16. package/dist/directory-memory.js.map +1 -1
  17. package/dist/email-code-policy.d.ts +7 -0
  18. package/dist/email-code-policy.d.ts.map +1 -0
  19. package/dist/email-code-policy.js +7 -0
  20. package/dist/email-code-policy.js.map +1 -0
  21. package/dist/errors.d.ts +1 -1
  22. package/dist/errors.d.ts.map +1 -1
  23. package/dist/errors.js.map +1 -1
  24. package/dist/hosted-human-sessions.d.ts +48 -0
  25. package/dist/hosted-human-sessions.d.ts.map +1 -0
  26. package/dist/hosted-human-sessions.js +2 -0
  27. package/dist/hosted-human-sessions.js.map +1 -0
  28. package/dist/index.d.ts +8 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +5 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/memory.d.ts.map +1 -1
  33. package/dist/memory.js +1115 -85
  34. package/dist/memory.js.map +1 -1
  35. package/dist/notification-delivery.d.ts +44 -0
  36. package/dist/notification-delivery.d.ts.map +1 -0
  37. package/dist/notification-delivery.js +58 -0
  38. package/dist/notification-delivery.js.map +1 -0
  39. package/dist/notification-webhook-jobs.d.ts +43 -0
  40. package/dist/notification-webhook-jobs.d.ts.map +1 -0
  41. package/dist/notification-webhook-jobs.js +59 -0
  42. package/dist/notification-webhook-jobs.js.map +1 -0
  43. package/dist/repository.d.ts +188 -12
  44. package/dist/repository.d.ts.map +1 -1
  45. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import type { AppEnvironment, TrashedApplication } from "@x12i/keyrox-types";
2
+ export declare function applicationLifecycleTime(at: string, previous: string): string;
3
+ export declare function verifyApplicationTrashSnapshot(current: Array<Pick<TrashedApplication, "id" | "trashedAt">>, confirmed: Array<Pick<TrashedApplication, "id" | "trashedAt">>): void;
4
+ export declare function applicationMoveKeys(environments: AppEnvironment[], replacements: Array<Pick<AppEnvironment, "id" | "keyVersion" | "secretEnc" | "secretHash">>): Map<string, Pick<AppEnvironment, "id" | "keyVersion" | "secretEnc" | "secretHash">>;
5
+ export declare function appIdFromTenantResource(orgId: string, resource: string): string | undefined;
6
+ //# sourceMappingURL=application-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-lifecycle.d.ts","sourceRoot":"","sources":["../src/application-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAI7E,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,EAC5D,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,GAC7D,IAAI,CAMN;AAED,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC,uFAW5F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG3F"}
@@ -0,0 +1,28 @@
1
+ import { fail } from "./errors.js";
2
+ import { asTime } from "./time.js";
3
+ export function applicationLifecycleTime(at, previous) {
4
+ return new Date(Math.max(Date.parse(asTime(at)), Date.parse(previous) + 1)).toISOString();
5
+ }
6
+ export function verifyApplicationTrashSnapshot(current, confirmed) {
7
+ const timestamps = new Map(confirmed.map(({ id, trashedAt }) => [id, trashedAt]));
8
+ if (confirmed.length !== current.length || timestamps.size !== confirmed.length
9
+ || current.some(({ id, trashedAt }) => timestamps.get(id) !== trashedAt)) {
10
+ fail("conflict", "Trash changed. Review the current contents before emptying it.");
11
+ }
12
+ }
13
+ export function applicationMoveKeys(environments, replacements) {
14
+ const keys = new Map(replacements.map((key) => [key.id, key]));
15
+ if (environments.length !== replacements.length || keys.size !== replacements.length || environments.some((environment) => {
16
+ const key = keys.get(environment.id);
17
+ return !key || key.keyVersion !== environment.keyVersion + 1 || !key.secretEnc || !key.secretHash
18
+ || key.secretHash === environment.secretHash || key.secretHash === environment.previousSecretHash;
19
+ })) {
20
+ fail("conflict", "Application environments changed. Review the application and try moving it again.");
21
+ }
22
+ return keys;
23
+ }
24
+ export function appIdFromTenantResource(orgId, resource) {
25
+ const prefix = `/tenants/${orgId}/apps/`;
26
+ return resource.startsWith(prefix) ? resource.slice(prefix.length).split("/")[0] || undefined : undefined;
27
+ }
28
+ //# sourceMappingURL=application-lifecycle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-lifecycle.js","sourceRoot":"","sources":["../src/application-lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,UAAU,wBAAwB,CAAC,EAAU,EAAE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CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,WAAW,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,UAAU;eAC5F,GAAG,CAAC,UAAU,KAAK,WAAW,CAAC,UAAU,IAAI,GAAG,CAAC,UAAU,KAAK,WAAW,CAAC,kBAAkB,CAAC;IACtG,CAAC,CAAC,EAAE,CAAC;QACH,IAAI,CAAC,UAAU,EAAE,mFAAmF,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAAa,EAAE,QAAgB;IACrE,MAAM,MAAM,GAAG,YAAY,KAAK,QAAQ,CAAC;IACzC,OAAO,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5G,CAAC"}
@@ -0,0 +1,61 @@
1
+ import type { DirectoryRelation, DirectoryWorkspaceMembership, ProductRoleBinding } from "@x12i/keyrox-types";
2
+ export type DirectoryAccessExpected = {
3
+ /** Null means the caller last read no product role. Omit the field to leave the role unasserted. */
4
+ roleId?: string | null;
5
+ relation?: DirectoryRelation;
6
+ };
7
+ /** A product-role grant for one person in one directory scope. Omit roleId or relation to leave that field unchanged. */
8
+ export type DirectoryAccessRequest = {
9
+ appId: string;
10
+ environmentId: string;
11
+ identityId: string;
12
+ roleId?: string;
13
+ relation?: DirectoryRelation;
14
+ workspaceId?: string;
15
+ organizationId?: string;
16
+ membershipId?: string;
17
+ bindingId?: string;
18
+ expected?: DirectoryAccessExpected;
19
+ ownerRoleId: string | null;
20
+ at: string;
21
+ newMembershipId: string;
22
+ newBindingId: string;
23
+ newOrganizationMembershipId: string;
24
+ };
25
+ export type DirectoryAccessResult = {
26
+ outcome: "created" | "updated" | "unchanged";
27
+ membership: DirectoryWorkspaceMembership | null;
28
+ binding: ProductRoleBinding | null;
29
+ relation: DirectoryRelation | null;
30
+ previousRoleId: string | null;
31
+ roleId: string | null;
32
+ };
33
+ export type DirectoryAccessClear = {
34
+ cleared: boolean;
35
+ previousRoleId: string | null;
36
+ identityId: string;
37
+ workspaceId: string | null;
38
+ organizationId: string | null;
39
+ };
40
+ export type DirectoryAccessCheck = {
41
+ id: string;
42
+ environmentId: string;
43
+ clientId: string;
44
+ identityId: string;
45
+ workspaceId: string | null;
46
+ organizationId: string | null;
47
+ roleId: string;
48
+ reference: string;
49
+ auditId: string;
50
+ createdAt: string;
51
+ };
52
+ export declare function existingGrantDecision(current: {
53
+ roleId: string | null;
54
+ relation: DirectoryRelation;
55
+ }, requested: {
56
+ roleId?: string;
57
+ relation?: DirectoryRelation;
58
+ }, expected?: DirectoryAccessExpected): "unchanged" | "update" | "conflict";
59
+ /** A missing row has no product role. An expected role id is a conflict; an expected empty role can create one. */
60
+ export declare function missingGrantDecision(expected?: DirectoryAccessExpected): "create" | "conflict";
61
+ //# sourceMappingURL=directory-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-access.d.ts","sourceRoot":"","sources":["../src/directory-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE9G,MAAM,MAAM,uBAAuB,GAAG;IACpC,oGAAoG;IACpG,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAEF,yHAAyH;AACzH,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB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EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,EAC/D,SAAS,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAAE,EAC5D,QAAQ,CAAC,EAAE,uBAAuB,GACjC,WAAW,GAAG,QAAQ,GAAG,UAAU,CASrC;AAED,mHAAmH;AACnH,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,uBAAuB,GAAG,QAAQ,GAAG,UAAU,CAG9F"}
@@ -0,0 +1,20 @@
1
+ export function existingGrantDecision(current, requested, expected) {
2
+ const desiredRole = requested.roleId === undefined ? current.roleId : requested.roleId;
3
+ const desiredRelation = requested.relation ?? current.relation;
4
+ if (expected) {
5
+ if (expected.roleId !== undefined && requested.roleId !== undefined && current.roleId !== expected.roleId && current.roleId !== requested.roleId)
6
+ return "conflict";
7
+ if (expected.relation && current.relation !== expected.relation && current.relation !== desiredRelation)
8
+ return "conflict";
9
+ }
10
+ if ((desiredRole ?? null) === (current.roleId ?? null) && desiredRelation === current.relation)
11
+ return "unchanged";
12
+ return "update";
13
+ }
14
+ /** A missing row has no product role. An expected role id is a conflict; an expected empty role can create one. */
15
+ export function missingGrantDecision(expected) {
16
+ if (typeof expected?.roleId === "string")
17
+ return "conflict";
18
+ return "create";
19
+ }
20
+ //# sourceMappingURL=directory-access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-access.js","sourceRoot":"","sources":["../src/directory-access.ts"],"names":[],"mappings":"AAyDA,MAAM,UAAU,qBAAqB,CACnC,OAA+D,EAC/D,SAA4D,EAC5D,QAAkC;IAElC,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;IACvF,MAAM,eAAe,GAAG,SAAS,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAC/D,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;YAAE,OAAO,UAAU,CAAC;QACpK,IAAI,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,eAAe;YAAE,OAAO,UAAU,CAAC;IAC7H,CAAC;IACD,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,eAAe,KAAK,OAAO,CAAC,QAAQ;QAAE,OAAO,WAAW,CAAC;IACnH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,mHAAmH;AACnH,MAAM,UAAU,oBAAoB,CAAC,QAAkC;IACrE,IAAI,OAAO,QAAQ,EAAE,MAAM,KAAK,QAAQ;QAAE,OAAO,UAAU,CAAC;IAC5D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { AppWaitlistEntry } from "@x12i/keyrox-types";
2
+ export type InvitationLifecycle = "pending" | "accepted" | "expired" | "revoked";
3
+ export type DirectoryInvitationPreview = {
4
+ id: string;
5
+ appId: string;
6
+ environmentId: string;
7
+ email: string;
8
+ status: InvitationLifecycle;
9
+ expiresAt: string | null;
10
+ roleId: string;
11
+ workspaceId: string | null;
12
+ organizationId: string | null;
13
+ delivery: "email" | "link" | null;
14
+ auditId: string | null;
15
+ };
16
+ export type DirectoryInvitationRedemption = {
17
+ outcome: "unavailable" | "recipient" | "unverified";
18
+ } | {
19
+ outcome: "applied" | "existing";
20
+ identityId: string;
21
+ roleId: string;
22
+ membershipId: string | null;
23
+ bindingId: string | null;
24
+ };
25
+ export declare function invitationLifecycle(status: AppWaitlistEntry["status"], challenge: {
26
+ expiresAt: string;
27
+ usedAt: string | null;
28
+ } | null, now: string): InvitationLifecycle | null;
29
+ export declare function redactInvitationId(id: string): string;
30
+ export declare function invitationPreview(row: AppWaitlistEntry, challenge: {
31
+ expiresAt: string;
32
+ usedAt: string | null;
33
+ } | null, now: string): DirectoryInvitationPreview | null;
34
+ //# sourceMappingURL=directory-invitation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-invitation.d.ts","sourceRoot":"","sources":["../src/directory-invitation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjF,MAAM,MAAM,0BAA0B,GAAG;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,mBAAmB,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GACrC;IAAE,OAAO,EAAE,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;CAAE,GACvD;IAAE,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEnI,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAClC,SAAS,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,EAC9D,GAAG,EAAE,MAAM,GACV,mBAAmB,GAAG,IAAI,CAM5B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,0BAA0B,GAAG,IAAI,CAUvK"}
@@ -0,0 +1,29 @@
1
+ import { isExpired } from "./time.js";
2
+ export function invitationLifecycle(status, challenge, now) {
3
+ if (status === "waiting")
4
+ return null;
5
+ if (status === "revoked")
6
+ return "revoked";
7
+ if (status === "admitted")
8
+ return "accepted";
9
+ if (!challenge || challenge.usedAt || isExpired(challenge.expiresAt, now))
10
+ return "expired";
11
+ return "pending";
12
+ }
13
+ export function redactInvitationId(id) {
14
+ return id.length <= 8 ? `${id.slice(0, 2)}…` : `${id.slice(0, 4)}…${id.slice(-4)}`;
15
+ }
16
+ export function invitationPreview(row, challenge, now) {
17
+ if (!row.invitation?.roleId && row.status !== "revoked")
18
+ return null;
19
+ const status = invitationLifecycle(row.status, challenge, now);
20
+ if (!status)
21
+ return null;
22
+ return {
23
+ id: row.id, appId: row.appId, environmentId: row.environmentId, email: row.email, status,
24
+ expiresAt: challenge?.expiresAt ?? null, roleId: row.invitation?.roleId ?? "",
25
+ workspaceId: row.invitation?.workspaceId ?? null, organizationId: row.invitation?.organizationId ?? null,
26
+ delivery: row.invitation?.delivery ?? null, auditId: row.auditId ?? null,
27
+ };
28
+ }
29
+ //# sourceMappingURL=directory-invitation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-invitation.js","sourceRoot":"","sources":["../src/directory-invitation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAsBtC,MAAM,UAAU,mBAAmB,CACjC,MAAkC,EAClC,SAA8D,EAC9D,GAAW;IAEX,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACtC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC7C,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5F,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAqB,EAAE,SAA8D,EAAE,GAAW;IAClI,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACrE,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAC/D,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM;QACxF,SAAS,EAAE,SAAS,EAAE,SAAS,IAAI,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,MAAM,IAAI,EAAE;QAC7E,WAAW,EAAE,GAAG,CAAC,UAAU,EAAE,WAAW,IAAI,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,UAAU,EAAE,cAAc,IAAI,IAAI;QACxG,QAAQ,EAAE,GAAG,CAAC,UAAU,EAAE,QAAQ,IAAI,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,IAAI;KACzE,CAAC;AACJ,CAAC"}
@@ -1,5 +1,8 @@
1
- import type { AppWaitlistEntry, DirectoryChallenge, DirectoryGroup, DirectoryGroupMember, DirectoryIdentity, DirectoryMembership, FeatureAssignment, FeatureDefinition, PlatformSignup, PlatformWaitlistEntry, ProductPermission, ProductRole, ProductRoleBinding } from "@x12i/keyrox-types";
2
- import type { KeyroxStore } from "./repository.js";
1
+ import { type DirectoryModel } from "@x12i/keyrox-types";
2
+ import type { Application, AppWaitlistEntry, DirectoryChallenge, DirectoryGroup, DirectoryGroupMember, DirectoryIdentity, DirectoryMembership, DirectoryOnboardingResponse, DirectoryWorkspace, DirectoryWorkspaceMembership, FeatureAssignment, FeatureDefinition, HostedSsoIdentity, PlatformSignup, PlatformWaitlistEntry, ProductPermission, ProductRole, ProductRoleBinding, TenantProductRole } from "@x12i/keyrox-types";
3
+ import { type DirectoryAccessCheck } from "./directory-access.js";
4
+ import type { DirectoryStructureRepair } from "./repository.js";
5
+ import type { DirectorySignupInput, KeyroxStore } from "./repository.js";
3
6
  export interface DirectoryMaps {
4
7
  settings: PlatformSignup;
5
8
  platformWaitlist: Map<string, PlatformWaitlistEntry>;
@@ -7,17 +10,31 @@ export interface DirectoryMaps {
7
10
  directoryMemberships: Map<string, DirectoryMembership>;
8
11
  permissions: Map<string, ProductPermission>;
9
12
  productRoles: Map<string, ProductRole>;
13
+ tenantProductRoles: Map<string, TenantProductRole>;
14
+ signupRoles: Map<string, string>;
10
15
  groups: Map<string, DirectoryGroup>;
11
16
  groupMembers: Map<string, DirectoryGroupMember>;
12
17
  bindings: Map<string, ProductRoleBinding>;
13
18
  features: Map<string, FeatureDefinition>;
14
19
  featureAssignments: Map<string, FeatureAssignment>;
15
20
  appWaitlist: Map<string, AppWaitlistEntry>;
21
+ waitlistConfirmations: Map<string, {
22
+ claimedAt: string | null;
23
+ }>;
16
24
  directoryChallenges: Map<string, DirectoryChallenge>;
25
+ hostedSsoIdentities: Map<string, HostedSsoIdentity>;
26
+ workspaces: Map<string, DirectoryWorkspace>;
27
+ workspaceMemberships: Map<string, DirectoryWorkspaceMembership>;
28
+ onboardingResponses: Map<string, DirectoryOnboardingResponse>;
29
+ accessChecks: Map<string, DirectoryAccessCheck>;
17
30
  userCount: () => number;
18
31
  }
19
- type DirectoryApi = Pick<KeyroxStore, "countUsers" | "getPlatformSignup" | "setPlatformSignup" | "savePlatformWaitlist" | "listPlatformWaitlist" | "findPlatformWaitlist" | "saveDirectoryIdentity" | "getDirectoryIdentity" | "listDirectoryIdentities" | "findDirectoryIdentityByEmail" | "saveDirectoryMembership" | "deleteDirectoryMembership" | "listDirectoryMemberships" | "saveProductPermission" | "deleteProductPermission" | "listProductPermissions" | "saveProductRole" | "deleteProductRole" | "listProductRoles" | "saveDirectoryGroup" | "deleteDirectoryGroup" | "listDirectoryGroups" | "saveGroupMember" | "deleteGroupMember" | "listGroupMembers" | "saveRoleBinding" | "deleteRoleBinding" | "listRoleBindings" | "saveFeatureDefinition" | "deleteFeatureDefinition" | "listFeatureDefinitions" | "saveFeatureAssignment" | "deleteFeatureAssignment" | "listFeatureAssignments" | "saveAppWaitlist" | "listAppWaitlist" | "findAppWaitlist" | "insertDirectoryChallenge" | "takeDirectoryChallenge">;
32
+ type DirectoryApi = Pick<KeyroxStore, "countUsers" | "getPlatformSignup" | "setPlatformSignup" | "insertPlatformWaitlist" | "savePlatformWaitlist" | "listPlatformWaitlist" | "findPlatformWaitlist" | "saveDirectoryIdentity" | "proveDirectoryEmail" | "getDirectoryIdentity" | "listDirectoryIdentities" | "findDirectoryIdentityByEmail" | "findHostedSsoIdentity" | "listHostedSsoIdentityIds" | "saveHostedSsoIdentity" | "signupDirectoryPerson" | "getDirectorySignupRole" | "setDirectorySignupRole" | "saveDirectoryMembership" | "deleteDirectoryMembership" | "listDirectoryMemberships" | "createDirectoryWorkspace" | "getDirectoryWorkspace" | "listDirectoryWorkspaces" | "updateDirectoryWorkspace" | "addDirectoryWorkspaceMembership" | "listDirectoryWorkspaceMemberships" | "removeDirectoryWorkspaceMembership" | "applyDirectoryAccess" | "clearDirectoryProductRole" | "saveDirectoryAccessCheck" | "listDirectoryAccessChecks" | "getDirectoryOnboardingResponse" | "saveDirectoryOnboardingResponse" | "saveProductPermission" | "deleteProductPermission" | "listProductPermissions" | "saveProductRole" | "deleteProductRole" | "listProductRoles" | "insertTenantProductRole" | "listTenantProductRoles" | "updateTenantProductRole" | "deleteTenantProductRole" | "setProductRoleCatalogLink" | "saveDirectoryGroup" | "deleteDirectoryGroup" | "listDirectoryGroups" | "saveGroupMember" | "deleteGroupMember" | "listGroupMembers" | "saveRoleBinding" | "deleteRoleBinding" | "listRoleBindings" | "saveFeatureDefinition" | "updateFeatureDefinition" | "deleteFeatureDefinition" | "listFeatureDefinitions" | "saveFeatureAssignment" | "deleteFeatureAssignment" | "listFeatureAssignments" | "insertAppWaitlist" | "saveAppWaitlist" | "readDirectoryInvitation" | "listDirectoryInvitations" | "setDirectoryInvitationAudit" | "revokeDirectoryInvitation" | "redeemDirectoryInvitation" | "acceptDirectoryWorkspaceInvitation" | "acceptDirectoryWorkspaceInvitationByToken" | "completeDirectoryPasswordSetup" | "listAppWaitlist" | "findAppWaitlist" | "claimWaitlistConfirmation" | "finishWaitlistConfirmation" | "insertDirectoryChallenge" | "insertDirectoryChallengeWithCooldown" | "takeDirectoryChallenge" | "verifyDirectoryEmail">;
20
33
  export declare function emptyDirectory(): Omit<DirectoryMaps, "userCount">;
21
- export declare function bindDirectoryMemory(source: () => Omit<DirectoryMaps, "userCount">, users: () => number, tx: <T>(run: () => T) => T): DirectoryApi;
34
+ export declare function bindDirectoryMemory(source: () => Omit<DirectoryMaps, "userCount">, users: () => number, tx: <T>(run: () => T) => T, activeApplicationForEnvironment: (environmentId: string, includeDisabled?: boolean) => Application | null, insertNotification: (identity: DirectoryIdentity, job: DirectorySignupInput["notificationDelivery"]) => void): DirectoryApi;
35
+ export declare function repairDirectoryStructure(maps: Omit<DirectoryMaps, "userCount">, environmentIds: ReadonlySet<string>, app: {
36
+ id: string;
37
+ orgId: string;
38
+ }, model: DirectoryModel, at: string): DirectoryStructureRepair;
22
39
  export {};
23
40
  //# sourceMappingURL=directory-memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"directory-memory.d.ts","sourceRoot":"","sources":["../src/directory-memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,cAAc,CAAC;IACzB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACrD,UAAU,EAAE,G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