@openhi/constructs 0.0.159 → 0.0.161
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/lib/{chunk-HQ67J7BP.mjs → chunk-5S6VFBLT.mjs} +12 -70
- package/lib/chunk-5S6VFBLT.mjs.map +1 -0
- package/lib/{chunk-MVQWAIMC.mjs → chunk-6BB4CRSS.mjs} +3 -312
- package/lib/chunk-6BB4CRSS.mjs.map +1 -0
- package/lib/{chunk-WPCBVDFZ.mjs → chunk-76UM2LQ5.mjs} +2 -2
- package/lib/chunk-7TRO2STL.mjs +4616 -0
- package/lib/chunk-7TRO2STL.mjs.map +1 -0
- package/lib/chunk-BUAYVN3C.mjs +87 -0
- package/lib/chunk-BUAYVN3C.mjs.map +1 -0
- package/lib/{chunk-23PUSHBV.mjs → chunk-D2Y6DDOC.mjs} +2 -2
- package/lib/chunk-DWSWCUZR.mjs +123 -0
- package/lib/chunk-DWSWCUZR.mjs.map +1 -0
- package/lib/{chunk-VZCPGQXA.mjs → chunk-EUIP2U5F.mjs} +69 -1
- package/lib/{chunk-VZCPGQXA.mjs.map → chunk-EUIP2U5F.mjs.map} +1 -1
- package/lib/chunk-GJTPXJKD.mjs +46 -0
- package/lib/chunk-GJTPXJKD.mjs.map +1 -0
- package/lib/chunk-I6LUPJUY.mjs +61 -0
- package/lib/chunk-I6LUPJUY.mjs.map +1 -0
- package/lib/{chunk-KR2Y2CVQ.mjs → chunk-KA3OMP3X.mjs} +2 -2
- package/lib/{chunk-ZM4GDHHC.mjs → chunk-KMEWULMX.mjs} +51 -3
- package/lib/chunk-KMEWULMX.mjs.map +1 -0
- package/lib/chunk-LKKLO66E.mjs +25 -0
- package/lib/chunk-LKKLO66E.mjs.map +1 -0
- package/lib/{chunk-CFJDATDK.mjs → chunk-MLFMW5IF.mjs} +43 -9
- package/lib/chunk-MLFMW5IF.mjs.map +1 -0
- package/lib/chunk-O5VQWB6U.mjs +315 -0
- package/lib/chunk-O5VQWB6U.mjs.map +1 -0
- package/lib/{chunk-7BQHLC7U.mjs → chunk-P3CTZWC2.mjs} +8 -40
- package/lib/chunk-P3CTZWC2.mjs.map +1 -0
- package/lib/chunk-P3NFCKTZ.mjs +502 -0
- package/lib/chunk-P3NFCKTZ.mjs.map +1 -0
- package/lib/{chunk-M7Y3BOQW.mjs → chunk-Q3MKITPY.mjs} +5 -5
- package/lib/chunk-Q64MOYJ7.mjs +218 -0
- package/lib/chunk-Q64MOYJ7.mjs.map +1 -0
- package/lib/chunk-RQKJNMX5.mjs +89 -0
- package/lib/chunk-RQKJNMX5.mjs.map +1 -0
- package/lib/{chunk-ZWSGM6PZ.mjs → chunk-SD7J3N3C.mjs} +2 -2
- package/lib/{chunk-7RZHFI77.mjs → chunk-VESULYQQ.mjs} +2 -2
- package/lib/{chunk-AOSEKL7U.mjs → chunk-WOTU36P3.mjs} +6 -103
- package/lib/chunk-WOTU36P3.mjs.map +1 -0
- package/lib/{chunk-X5E4YJGZ.mjs → chunk-YPTJJ35S.mjs} +2 -2
- package/lib/counter-apply-operation-DZM3MIDm.d.mts +63 -0
- package/lib/counter-apply-operation-DZM3MIDm.d.ts +63 -0
- package/lib/counter-maintenance.handler.d.mts +38 -0
- package/lib/counter-maintenance.handler.d.ts +38 -0
- package/lib/counter-maintenance.handler.js +2885 -0
- package/lib/counter-maintenance.handler.js.map +1 -0
- package/lib/counter-maintenance.handler.mjs +180 -0
- package/lib/counter-maintenance.handler.mjs.map +1 -0
- package/lib/counter-reconciliation.handler.d.mts +116 -0
- package/lib/counter-reconciliation.handler.d.ts +116 -0
- package/lib/counter-reconciliation.handler.js +3324 -0
- package/lib/counter-reconciliation.handler.js.map +1 -0
- package/lib/counter-reconciliation.handler.mjs +295 -0
- package/lib/counter-reconciliation.handler.mjs.map +1 -0
- package/lib/data-store-postgres-replication.handler.js +50 -2
- package/lib/data-store-postgres-replication.handler.js.map +1 -1
- package/lib/data-store-postgres-replication.handler.mjs +2 -2
- package/lib/delete-chunk.handler.js +118 -2
- package/lib/delete-chunk.handler.js.map +1 -1
- package/lib/delete-chunk.handler.mjs +3 -3
- package/lib/{events-DTgo2dcW.d.mts → events-TG654e7L.d.mts} +68 -19
- package/lib/{events-DTgo2dcW.d.ts → events-TG654e7L.d.ts} +68 -19
- package/lib/finalize.handler.js +50 -2
- package/lib/finalize.handler.js.map +1 -1
- package/lib/finalize.handler.mjs +4 -4
- package/lib/firehose-archive-transform.handler.js +50 -2
- package/lib/firehose-archive-transform.handler.js.map +1 -1
- package/lib/firehose-archive-transform.handler.mjs +2 -2
- package/lib/index.d.mts +1283 -4
- package/lib/index.d.ts +1389 -24
- package/lib/index.js +4113 -320
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +602 -195
- package/lib/index.mjs.map +1 -1
- package/lib/list-chunks.handler.js +118 -2
- package/lib/list-chunks.handler.js.map +1 -1
- package/lib/list-chunks.handler.mjs +3 -3
- package/lib/platform-deploy-bridge.handler.js +50 -2
- package/lib/platform-deploy-bridge.handler.js.map +1 -1
- package/lib/platform-deploy-bridge.handler.mjs +1 -1
- package/lib/pre-token-generation.handler.js +68 -0
- package/lib/pre-token-generation.handler.js.map +1 -1
- package/lib/pre-token-generation.handler.mjs +9 -5
- package/lib/pre-token-generation.handler.mjs.map +1 -1
- package/lib/provision-default-workspace.handler.js +887 -4
- package/lib/provision-default-workspace.handler.js.map +1 -1
- package/lib/provision-default-workspace.handler.mjs +14 -9
- package/lib/provision-default-workspace.handler.mjs.map +1 -1
- package/lib/rename-finalize.handler.js +50 -2
- package/lib/rename-finalize.handler.js.map +1 -1
- package/lib/rename-finalize.handler.mjs +2 -2
- package/lib/rename-list-targets.handler.js +118 -2
- package/lib/rename-list-targets.handler.js.map +1 -1
- package/lib/rename-list-targets.handler.mjs +11 -9
- package/lib/rename-list-targets.handler.mjs.map +1 -1
- package/lib/rename-rewrite-chunk.handler.js +68 -0
- package/lib/rename-rewrite-chunk.handler.js.map +1 -1
- package/lib/rename-rewrite-chunk.handler.mjs +2 -2
- package/lib/rest-api-lambda.handler.js +1454 -251
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +673 -821
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.d.mts +1 -1
- package/lib/seed-demo-data.handler.d.ts +1 -1
- package/lib/seed-demo-data.handler.js +4004 -201
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +10 -7
- package/lib/seed-system-data.handler.js +118 -2
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +5 -5
- package/package.json +1 -1
- package/lib/chunk-7BQHLC7U.mjs.map +0 -1
- package/lib/chunk-AOSEKL7U.mjs.map +0 -1
- package/lib/chunk-BQMJSDOD.mjs +0 -1136
- package/lib/chunk-BQMJSDOD.mjs.map +0 -1
- package/lib/chunk-CFJDATDK.mjs.map +0 -1
- package/lib/chunk-E6MCKJVS.mjs +0 -212
- package/lib/chunk-E6MCKJVS.mjs.map +0 -1
- package/lib/chunk-HQ67J7BP.mjs.map +0 -1
- package/lib/chunk-MVQWAIMC.mjs.map +0 -1
- package/lib/chunk-ZM4GDHHC.mjs.map +0 -1
- /package/lib/{chunk-WPCBVDFZ.mjs.map → chunk-76UM2LQ5.mjs.map} +0 -0
- /package/lib/{chunk-23PUSHBV.mjs.map → chunk-D2Y6DDOC.mjs.map} +0 -0
- /package/lib/{chunk-KR2Y2CVQ.mjs.map → chunk-KA3OMP3X.mjs.map} +0 -0
- /package/lib/{chunk-M7Y3BOQW.mjs.map → chunk-Q3MKITPY.mjs.map} +0 -0
- /package/lib/{chunk-ZWSGM6PZ.mjs.map → chunk-SD7J3N3C.mjs.map} +0 -0
- /package/lib/{chunk-7RZHFI77.mjs.map → chunk-VESULYQQ.mjs.map} +0 -0
- /package/lib/{chunk-X5E4YJGZ.mjs.map → chunk-YPTJJ35S.mjs.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OWNING_DELETE_PROJECTION_ENTITY,
|
|
3
3
|
deleteOwningChildChunkOperation
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-ZM4GDHHC.mjs";
|
|
4
|
+
} from "./chunk-Q3MKITPY.mjs";
|
|
6
5
|
import "./chunk-QJDHVMKT.mjs";
|
|
7
6
|
import "./chunk-FYHBHHWK.mjs";
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-EUIP2U5F.mjs";
|
|
9
8
|
import "./chunk-TRY7JGWO.mjs";
|
|
9
|
+
import "./chunk-KMEWULMX.mjs";
|
|
10
10
|
import "./chunk-LZOMFHX3.mjs";
|
|
11
11
|
|
|
12
12
|
// src/workflows/control-plane/owning-delete-cascade/delete-chunk.handler.ts
|
|
@@ -30,16 +30,54 @@ declare const DEMO_PERIOD: {
|
|
|
30
30
|
readonly start: "2026-01-01T00:00:00Z";
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Placeholder Tenant id.
|
|
35
|
+
*
|
|
36
|
+
* The placeholder is a **system sentinel**, not a user-facing demo
|
|
37
|
+
* tenant. It exists for two reasons:
|
|
38
|
+
*
|
|
39
|
+
* 1. `pre-token-generation.handler.ts` stamps this id into the
|
|
40
|
+
* JWT `ohi_tid` claim when a User cannot be resolved (no
|
|
41
|
+
* DynamoDB record, missing `currentTenant`/`currentWorkspace`,
|
|
42
|
+
* etc.) so the token still satisfies `openHiContextMiddleware`
|
|
43
|
+
* and downstream APIs return a deterministic 403 instead of
|
|
44
|
+
* crashing on a missing claim.
|
|
45
|
+
* 2. The seed workflow re-asserts a Tenant + Workspace record at
|
|
46
|
+
* these ids so the JWT fallback dereferences to a real DynamoDB
|
|
47
|
+
* row (avoids dangling references on read paths that follow
|
|
48
|
+
* `Tenant/placeholder-tenant-id`).
|
|
49
|
+
*
|
|
50
|
+
* Dev users' `currentTenant`/`currentWorkspace` no longer point here
|
|
51
|
+
* (issue #1301) — they point at the on-site demo tenant below. The
|
|
52
|
+
* placeholder records remain seeded purely as a structural sentinel.
|
|
53
|
+
*/
|
|
34
54
|
declare const PLACEHOLDER_TENANT_ID = "placeholder-tenant-id";
|
|
35
|
-
/** Placeholder Workspace id
|
|
55
|
+
/** Placeholder Workspace id. See {@link PLACEHOLDER_TENANT_ID}. */
|
|
36
56
|
declare const PLACEHOLDER_WORKSPACE_ID = "placeholder-workspace-id";
|
|
57
|
+
/**
|
|
58
|
+
* Stable Tenant id for the on-site-medical UAT demo tenant
|
|
59
|
+
* (issue #1301). Downstream demo-data tickets (#1302 providers,
|
|
60
|
+
* #1303 facilities, #1304 patients/encounters, etc.) import this
|
|
61
|
+
* constant to attach their fixture resources without re-discovering
|
|
62
|
+
* the tenant.
|
|
63
|
+
*
|
|
64
|
+
* This is the tenant every seeded dev user lands on at sign-in
|
|
65
|
+
* (`currentTenant` on the seeded User resource). UAT testers see
|
|
66
|
+
* "On-Site Medical — Demo" in the Tenant Switcher on first sign-in.
|
|
67
|
+
*/
|
|
68
|
+
declare const ON_SITE_DEMO_TENANT_ID = "on-site-demo-tenant";
|
|
69
|
+
/**
|
|
70
|
+
* Stable Workspace id under {@link ON_SITE_DEMO_TENANT_ID}. Single
|
|
71
|
+
* workspace for v1 UAT; workspace topology (per business line vs
|
|
72
|
+
* per jurisdiction) is deferred pending an ADR (#1301 design note).
|
|
73
|
+
*/
|
|
74
|
+
declare const ON_SITE_DEMO_WORKSPACE_ID = "on-site-demo-workspace";
|
|
37
75
|
/**
|
|
38
76
|
* Dev-user descriptor. Every entry produces:
|
|
39
77
|
* - one Cognito user (idempotent create-then-skip),
|
|
40
78
|
* - one DynamoDB User record (id = `dev-<email-local-part>`),
|
|
41
|
-
* -
|
|
42
|
-
* -
|
|
79
|
+
* - five Memberships (placeholder + on-site demo + three demo tenants),
|
|
80
|
+
* - five `tenant-admin` RoleAssignments (one per tenant the user
|
|
43
81
|
* belongs to),
|
|
44
82
|
* - one `system-admin` RoleAssignment scoped to {@link PLATFORM_SCOPE_TENANT_ID}.
|
|
45
83
|
*/
|
|
@@ -48,6 +86,10 @@ interface DemoDevUser {
|
|
|
48
86
|
readonly id: string;
|
|
49
87
|
/** Email used as the Cognito `Username` and as the seed for the password algorithm. */
|
|
50
88
|
readonly email: string;
|
|
89
|
+
/** Given name, populated on the seeded User FHIR resource as `name[0].given[0]`. */
|
|
90
|
+
readonly firstName: string;
|
|
91
|
+
/** Family name, populated on the seeded User FHIR resource as `name[0].family`. */
|
|
92
|
+
readonly lastName: string;
|
|
51
93
|
}
|
|
52
94
|
/**
|
|
53
95
|
* Hardcoded dev-user roster. Adding a new developer is a one-line
|
|
@@ -58,8 +100,9 @@ interface DemoDevUser {
|
|
|
58
100
|
declare const DEV_USERS: ReadonlyArray<DemoDevUser>;
|
|
59
101
|
/**
|
|
60
102
|
* A single workspace inside a demo tenant. The mixed tenant has two
|
|
61
|
-
* workspaces (wound-care and primary-care sub-workspaces);
|
|
62
|
-
*
|
|
103
|
+
* workspaces (wound-care and primary-care sub-workspaces); every
|
|
104
|
+
* other tenant (placeholder, on-site demo, wound-care, primary-care)
|
|
105
|
+
* has exactly one.
|
|
63
106
|
*/
|
|
64
107
|
interface DemoWorkspaceSpec {
|
|
65
108
|
/** Stable id (DynamoDB record id; also drives the canonical OHI URN). */
|
|
@@ -80,9 +123,10 @@ interface DemoWorkspaceSpec {
|
|
|
80
123
|
*/
|
|
81
124
|
interface DemoTenantSpec {
|
|
82
125
|
/**
|
|
83
|
-
* Scenario slug — `placeholder`, `
|
|
84
|
-
* `demo-mixed`. The placeholder tenant
|
|
85
|
-
*
|
|
126
|
+
* Scenario slug — `placeholder`, `on-site-demo`, `demo-wound-care`,
|
|
127
|
+
* `demo-primary-care`, `demo-mixed`. The placeholder tenant uses
|
|
128
|
+
* `placeholder`; the on-site UAT demo tenant uses `on-site-demo`
|
|
129
|
+
* (#1301); the three demo tenants use `demo-*` slugs.
|
|
86
130
|
*/
|
|
87
131
|
readonly scenario: string;
|
|
88
132
|
/** Stable id (DynamoDB record id; also drives the canonical OHI URN). */
|
|
@@ -93,17 +137,22 @@ interface DemoTenantSpec {
|
|
|
93
137
|
readonly workspaces: ReadonlyArray<DemoWorkspaceSpec>;
|
|
94
138
|
}
|
|
95
139
|
/**
|
|
96
|
-
* The full demo-tenant graph.
|
|
97
|
-
* JWT-claim fallback resolves to,
|
|
98
|
-
*
|
|
140
|
+
* The full demo-tenant graph. Five entries: the placeholder tenant
|
|
141
|
+
* the JWT-claim fallback resolves to, the on-site-medical UAT demo
|
|
142
|
+
* tenant every dev user lands on at sign-in (#1301), and the three
|
|
143
|
+
* v1 demo scenarios (OPS-009 §"v1 scenarios"):
|
|
99
144
|
*
|
|
100
145
|
* 0. Placeholder tenant — dereferences the JWT-claim fallback in
|
|
101
|
-
* `pre-token-generation.handler.ts
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* 1.
|
|
105
|
-
*
|
|
106
|
-
*
|
|
146
|
+
* `pre-token-generation.handler.ts`. Carries no user-facing
|
|
147
|
+
* content; exists purely so the JWT fallback resolves to a real
|
|
148
|
+
* DynamoDB row instead of dangling.
|
|
149
|
+
* 1. On-site-medical UAT demo tenant — every seeded dev user's
|
|
150
|
+
* `currentTenant`/`currentWorkspace`. Downstream demo-data
|
|
151
|
+
* tickets (providers, facilities, patients) attach to this
|
|
152
|
+
* tenant via {@link ON_SITE_DEMO_TENANT_ID}.
|
|
153
|
+
* 2. Single-workspace wound-care tenant.
|
|
154
|
+
* 3. Single-workspace primary-care tenant.
|
|
155
|
+
* 4. Two-workspace mixed tenant — exercises the cross-workspace
|
|
107
156
|
* isolation flow that single-workspace tenants cannot.
|
|
108
157
|
*/
|
|
109
158
|
declare const DEMO_TENANT_SPECS: ReadonlyArray<DemoTenantSpec>;
|
|
@@ -146,4 +195,4 @@ declare const openhiResourceIdentifier: (params: {
|
|
|
146
195
|
*/
|
|
147
196
|
declare const demoRolesForUserInTenant: (_user: DemoDevUser, _tenantId: string) => ReadonlyArray<PlatformRoleCode>;
|
|
148
197
|
|
|
149
|
-
export { DEMO_PERIOD as D,
|
|
198
|
+
export { DEMO_PERIOD as D, ON_SITE_DEMO_TENANT_ID as O, PLACEHOLDER_TENANT_ID as P, SEED_DEMO_DATA_CONSUMER_NAME as S, DEMO_TENANT_SPECS as a, DEMO_URN_SYSTEM as b, DEV_USERS as c, type DemoDevUser as d, type DemoTenantSpec as e, type DemoWorkspaceSpec as f, ON_SITE_DEMO_WORKSPACE_ID as g, OPENHI_RESOURCE_URN_SYSTEM as h, PLACEHOLDER_WORKSPACE_ID as i, demoMembershipId as j, demoRoleAssignmentId as k, demoRolesForUserInTenant as l, demoScenarioIdentifier as m, openhiResourceIdentifier as o };
|
|
@@ -30,16 +30,54 @@ declare const DEMO_PERIOD: {
|
|
|
30
30
|
readonly start: "2026-01-01T00:00:00Z";
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Placeholder Tenant id.
|
|
35
|
+
*
|
|
36
|
+
* The placeholder is a **system sentinel**, not a user-facing demo
|
|
37
|
+
* tenant. It exists for two reasons:
|
|
38
|
+
*
|
|
39
|
+
* 1. `pre-token-generation.handler.ts` stamps this id into the
|
|
40
|
+
* JWT `ohi_tid` claim when a User cannot be resolved (no
|
|
41
|
+
* DynamoDB record, missing `currentTenant`/`currentWorkspace`,
|
|
42
|
+
* etc.) so the token still satisfies `openHiContextMiddleware`
|
|
43
|
+
* and downstream APIs return a deterministic 403 instead of
|
|
44
|
+
* crashing on a missing claim.
|
|
45
|
+
* 2. The seed workflow re-asserts a Tenant + Workspace record at
|
|
46
|
+
* these ids so the JWT fallback dereferences to a real DynamoDB
|
|
47
|
+
* row (avoids dangling references on read paths that follow
|
|
48
|
+
* `Tenant/placeholder-tenant-id`).
|
|
49
|
+
*
|
|
50
|
+
* Dev users' `currentTenant`/`currentWorkspace` no longer point here
|
|
51
|
+
* (issue #1301) — they point at the on-site demo tenant below. The
|
|
52
|
+
* placeholder records remain seeded purely as a structural sentinel.
|
|
53
|
+
*/
|
|
34
54
|
declare const PLACEHOLDER_TENANT_ID = "placeholder-tenant-id";
|
|
35
|
-
/** Placeholder Workspace id
|
|
55
|
+
/** Placeholder Workspace id. See {@link PLACEHOLDER_TENANT_ID}. */
|
|
36
56
|
declare const PLACEHOLDER_WORKSPACE_ID = "placeholder-workspace-id";
|
|
57
|
+
/**
|
|
58
|
+
* Stable Tenant id for the on-site-medical UAT demo tenant
|
|
59
|
+
* (issue #1301). Downstream demo-data tickets (#1302 providers,
|
|
60
|
+
* #1303 facilities, #1304 patients/encounters, etc.) import this
|
|
61
|
+
* constant to attach their fixture resources without re-discovering
|
|
62
|
+
* the tenant.
|
|
63
|
+
*
|
|
64
|
+
* This is the tenant every seeded dev user lands on at sign-in
|
|
65
|
+
* (`currentTenant` on the seeded User resource). UAT testers see
|
|
66
|
+
* "On-Site Medical — Demo" in the Tenant Switcher on first sign-in.
|
|
67
|
+
*/
|
|
68
|
+
declare const ON_SITE_DEMO_TENANT_ID = "on-site-demo-tenant";
|
|
69
|
+
/**
|
|
70
|
+
* Stable Workspace id under {@link ON_SITE_DEMO_TENANT_ID}. Single
|
|
71
|
+
* workspace for v1 UAT; workspace topology (per business line vs
|
|
72
|
+
* per jurisdiction) is deferred pending an ADR (#1301 design note).
|
|
73
|
+
*/
|
|
74
|
+
declare const ON_SITE_DEMO_WORKSPACE_ID = "on-site-demo-workspace";
|
|
37
75
|
/**
|
|
38
76
|
* Dev-user descriptor. Every entry produces:
|
|
39
77
|
* - one Cognito user (idempotent create-then-skip),
|
|
40
78
|
* - one DynamoDB User record (id = `dev-<email-local-part>`),
|
|
41
|
-
* -
|
|
42
|
-
* -
|
|
79
|
+
* - five Memberships (placeholder + on-site demo + three demo tenants),
|
|
80
|
+
* - five `tenant-admin` RoleAssignments (one per tenant the user
|
|
43
81
|
* belongs to),
|
|
44
82
|
* - one `system-admin` RoleAssignment scoped to {@link PLATFORM_SCOPE_TENANT_ID}.
|
|
45
83
|
*/
|
|
@@ -48,6 +86,10 @@ interface DemoDevUser {
|
|
|
48
86
|
readonly id: string;
|
|
49
87
|
/** Email used as the Cognito `Username` and as the seed for the password algorithm. */
|
|
50
88
|
readonly email: string;
|
|
89
|
+
/** Given name, populated on the seeded User FHIR resource as `name[0].given[0]`. */
|
|
90
|
+
readonly firstName: string;
|
|
91
|
+
/** Family name, populated on the seeded User FHIR resource as `name[0].family`. */
|
|
92
|
+
readonly lastName: string;
|
|
51
93
|
}
|
|
52
94
|
/**
|
|
53
95
|
* Hardcoded dev-user roster. Adding a new developer is a one-line
|
|
@@ -58,8 +100,9 @@ interface DemoDevUser {
|
|
|
58
100
|
declare const DEV_USERS: ReadonlyArray<DemoDevUser>;
|
|
59
101
|
/**
|
|
60
102
|
* A single workspace inside a demo tenant. The mixed tenant has two
|
|
61
|
-
* workspaces (wound-care and primary-care sub-workspaces);
|
|
62
|
-
*
|
|
103
|
+
* workspaces (wound-care and primary-care sub-workspaces); every
|
|
104
|
+
* other tenant (placeholder, on-site demo, wound-care, primary-care)
|
|
105
|
+
* has exactly one.
|
|
63
106
|
*/
|
|
64
107
|
interface DemoWorkspaceSpec {
|
|
65
108
|
/** Stable id (DynamoDB record id; also drives the canonical OHI URN). */
|
|
@@ -80,9 +123,10 @@ interface DemoWorkspaceSpec {
|
|
|
80
123
|
*/
|
|
81
124
|
interface DemoTenantSpec {
|
|
82
125
|
/**
|
|
83
|
-
* Scenario slug — `placeholder`, `
|
|
84
|
-
* `demo-mixed`. The placeholder tenant
|
|
85
|
-
*
|
|
126
|
+
* Scenario slug — `placeholder`, `on-site-demo`, `demo-wound-care`,
|
|
127
|
+
* `demo-primary-care`, `demo-mixed`. The placeholder tenant uses
|
|
128
|
+
* `placeholder`; the on-site UAT demo tenant uses `on-site-demo`
|
|
129
|
+
* (#1301); the three demo tenants use `demo-*` slugs.
|
|
86
130
|
*/
|
|
87
131
|
readonly scenario: string;
|
|
88
132
|
/** Stable id (DynamoDB record id; also drives the canonical OHI URN). */
|
|
@@ -93,17 +137,22 @@ interface DemoTenantSpec {
|
|
|
93
137
|
readonly workspaces: ReadonlyArray<DemoWorkspaceSpec>;
|
|
94
138
|
}
|
|
95
139
|
/**
|
|
96
|
-
* The full demo-tenant graph.
|
|
97
|
-
* JWT-claim fallback resolves to,
|
|
98
|
-
*
|
|
140
|
+
* The full demo-tenant graph. Five entries: the placeholder tenant
|
|
141
|
+
* the JWT-claim fallback resolves to, the on-site-medical UAT demo
|
|
142
|
+
* tenant every dev user lands on at sign-in (#1301), and the three
|
|
143
|
+
* v1 demo scenarios (OPS-009 §"v1 scenarios"):
|
|
99
144
|
*
|
|
100
145
|
* 0. Placeholder tenant — dereferences the JWT-claim fallback in
|
|
101
|
-
* `pre-token-generation.handler.ts
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* 1.
|
|
105
|
-
*
|
|
106
|
-
*
|
|
146
|
+
* `pre-token-generation.handler.ts`. Carries no user-facing
|
|
147
|
+
* content; exists purely so the JWT fallback resolves to a real
|
|
148
|
+
* DynamoDB row instead of dangling.
|
|
149
|
+
* 1. On-site-medical UAT demo tenant — every seeded dev user's
|
|
150
|
+
* `currentTenant`/`currentWorkspace`. Downstream demo-data
|
|
151
|
+
* tickets (providers, facilities, patients) attach to this
|
|
152
|
+
* tenant via {@link ON_SITE_DEMO_TENANT_ID}.
|
|
153
|
+
* 2. Single-workspace wound-care tenant.
|
|
154
|
+
* 3. Single-workspace primary-care tenant.
|
|
155
|
+
* 4. Two-workspace mixed tenant — exercises the cross-workspace
|
|
107
156
|
* isolation flow that single-workspace tenants cannot.
|
|
108
157
|
*/
|
|
109
158
|
declare const DEMO_TENANT_SPECS: ReadonlyArray<DemoTenantSpec>;
|
|
@@ -146,4 +195,4 @@ declare const openhiResourceIdentifier: (params: {
|
|
|
146
195
|
*/
|
|
147
196
|
declare const demoRolesForUserInTenant: (_user: DemoDevUser, _tenantId: string) => ReadonlyArray<PlatformRoleCode>;
|
|
148
197
|
|
|
149
|
-
export { DEMO_PERIOD as D,
|
|
198
|
+
export { DEMO_PERIOD as D, ON_SITE_DEMO_TENANT_ID as O, PLACEHOLDER_TENANT_ID as P, SEED_DEMO_DATA_CONSUMER_NAME as S, DEMO_TENANT_SPECS as a, DEMO_URN_SYSTEM as b, DEV_USERS as c, type DemoDevUser as d, type DemoTenantSpec as e, type DemoWorkspaceSpec as f, ON_SITE_DEMO_WORKSPACE_ID as g, OPENHI_RESOURCE_URN_SYSTEM as h, PLACEHOLDER_WORKSPACE_ID as i, demoMembershipId as j, demoRoleAssignmentId as k, demoRolesForUserInTenant as l, demoScenarioIdentifier as m, openhiResourceIdentifier as o };
|
package/lib/finalize.handler.js
CHANGED
|
@@ -139,7 +139,7 @@ var require_control_plane = __commonJS({
|
|
|
139
139
|
"../workflows/lib/detail-types/control-plane.js"(exports2) {
|
|
140
140
|
"use strict";
|
|
141
141
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
142
|
-
exports2.ControlPlaneRenameFailedV1 = exports2.ControlPlaneRenameCompleteV1 = exports2.ControlPlaneRenameV1 = exports2.RENAMABLE_ENTITY_TYPE = exports2.ControlPlaneOwningDeleteFailedV1 = exports2.ControlPlaneOwningDeleteCompleteV1 = exports2.ControlPlaneOwningDeleteV1 = exports2.OWNING_ENTITY_TYPE = void 0;
|
|
142
|
+
exports2.ControlPlaneWorkspaceDeletedV1 = exports2.ControlPlaneWorkspaceCreatedV1 = exports2.ControlPlaneRoleAssignmentDeletedV1 = exports2.ControlPlaneRoleAssignmentCreatedV1 = exports2.ControlPlaneMembershipDeletedV1 = exports2.ControlPlaneMembershipCreatedV1 = exports2.ControlPlaneRenameFailedV1 = exports2.ControlPlaneRenameCompleteV1 = exports2.ControlPlaneRenameV1 = exports2.RENAMABLE_ENTITY_TYPE = exports2.ControlPlaneOwningDeleteFailedV1 = exports2.ControlPlaneOwningDeleteCompleteV1 = exports2.ControlPlaneOwningDeleteV1 = exports2.OWNING_ENTITY_TYPE = void 0;
|
|
143
143
|
var sources_1 = require_sources();
|
|
144
144
|
var registry_1 = require_registry();
|
|
145
145
|
exports2.OWNING_ENTITY_TYPE = {
|
|
@@ -181,6 +181,36 @@ var require_control_plane = __commonJS({
|
|
|
181
181
|
source: sources_1.OPENHI_OPS_SOURCE,
|
|
182
182
|
dedupRequired: true
|
|
183
183
|
});
|
|
184
|
+
exports2.ControlPlaneMembershipCreatedV1 = (0, registry_1.defineDetailType)({
|
|
185
|
+
detailType: "control-plane.membership-created.v1",
|
|
186
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
187
|
+
dedupRequired: true
|
|
188
|
+
});
|
|
189
|
+
exports2.ControlPlaneMembershipDeletedV1 = (0, registry_1.defineDetailType)({
|
|
190
|
+
detailType: "control-plane.membership-deleted.v1",
|
|
191
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
192
|
+
dedupRequired: true
|
|
193
|
+
});
|
|
194
|
+
exports2.ControlPlaneRoleAssignmentCreatedV1 = (0, registry_1.defineDetailType)({
|
|
195
|
+
detailType: "control-plane.role-assignment-created.v1",
|
|
196
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
197
|
+
dedupRequired: true
|
|
198
|
+
});
|
|
199
|
+
exports2.ControlPlaneRoleAssignmentDeletedV1 = (0, registry_1.defineDetailType)({
|
|
200
|
+
detailType: "control-plane.role-assignment-deleted.v1",
|
|
201
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
202
|
+
dedupRequired: true
|
|
203
|
+
});
|
|
204
|
+
exports2.ControlPlaneWorkspaceCreatedV1 = (0, registry_1.defineDetailType)({
|
|
205
|
+
detailType: "control-plane.workspace-created.v1",
|
|
206
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
207
|
+
dedupRequired: true
|
|
208
|
+
});
|
|
209
|
+
exports2.ControlPlaneWorkspaceDeletedV1 = (0, registry_1.defineDetailType)({
|
|
210
|
+
detailType: "control-plane.workspace-deleted.v1",
|
|
211
|
+
source: sources_1.OPENHI_CONTROL_SOURCE,
|
|
212
|
+
dedupRequired: true
|
|
213
|
+
});
|
|
184
214
|
}
|
|
185
215
|
});
|
|
186
216
|
|
|
@@ -578,7 +608,7 @@ var require_lib = __commonJS({
|
|
|
578
608
|
"../workflows/lib/index.js"(exports2) {
|
|
579
609
|
"use strict";
|
|
580
610
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
581
|
-
exports2.workflowDedupClient = exports2.recordIfAbsent = exports2.markFailed = exports2.encodeSortKey = exports2.WorkflowDedupTableNameMissingError = exports2.WorkflowDedupInvalidInputError = exports2.WORKFLOW_DEDUP_TABLE_NAME_ENV_VAR = exports2.WORKFLOW_DEDUP_MAX_CONSUMER_NAME_LENGTH = exports2.WORKFLOW_DEDUP_DEFAULT_TTL_SECONDS = exports2.parseWorkflowEvent = exports2.UnsupportedEnvelopeVersionError = exports2.InvalidWorkflowEventError = exports2.workflowsClient = exports2.publishWorkflowEvent = exports2.WorkflowPublishError = exports2.isWellFormedDetailType = exports2.defineDetailType = exports2.RENAMABLE_ENTITY_TYPE = exports2.PlatformSystemDataSeededV1 = exports2.PlatformDeploymentCompletedV1 = exports2.OWNING_ENTITY_TYPE = exports2.InvalidDetailTypeRegistrationError = exports2.ControlPlaneRenameV1 = exports2.ControlPlaneRenameFailedV1 = exports2.ControlPlaneRenameCompleteV1 = exports2.ControlPlaneOwningDeleteV1 = exports2.ControlPlaneOwningDeleteFailedV1 = exports2.ControlPlaneOwningDeleteCompleteV1 = exports2.OPENHI_OPS_SOURCE = exports2.OPENHI_DATA_SOURCE = exports2.OPENHI_CONTROL_SOURCE = exports2.DEFAULT_BUS_NAME_BY_SOURCE = exports2.workflowUserActorFromClaims = exports2.isWorkflowUserActor = exports2.isWorkflowSystemActor = exports2.MissingActorContextError = exports2.isSupportedEnvelopeVersion = exports2.ENVELOPE_VERSION = void 0;
|
|
611
|
+
exports2.workflowDedupClient = exports2.recordIfAbsent = exports2.markFailed = exports2.encodeSortKey = exports2.WorkflowDedupTableNameMissingError = exports2.WorkflowDedupInvalidInputError = exports2.WORKFLOW_DEDUP_TABLE_NAME_ENV_VAR = exports2.WORKFLOW_DEDUP_MAX_CONSUMER_NAME_LENGTH = exports2.WORKFLOW_DEDUP_DEFAULT_TTL_SECONDS = exports2.parseWorkflowEvent = exports2.UnsupportedEnvelopeVersionError = exports2.InvalidWorkflowEventError = exports2.workflowsClient = exports2.publishWorkflowEvent = exports2.WorkflowPublishError = exports2.isWellFormedDetailType = exports2.defineDetailType = exports2.RENAMABLE_ENTITY_TYPE = exports2.PlatformSystemDataSeededV1 = exports2.PlatformDeploymentCompletedV1 = exports2.OWNING_ENTITY_TYPE = exports2.InvalidDetailTypeRegistrationError = exports2.ControlPlaneWorkspaceDeletedV1 = exports2.ControlPlaneWorkspaceCreatedV1 = exports2.ControlPlaneRoleAssignmentDeletedV1 = exports2.ControlPlaneRoleAssignmentCreatedV1 = exports2.ControlPlaneRenameV1 = exports2.ControlPlaneRenameFailedV1 = exports2.ControlPlaneRenameCompleteV1 = exports2.ControlPlaneOwningDeleteV1 = exports2.ControlPlaneOwningDeleteFailedV1 = exports2.ControlPlaneOwningDeleteCompleteV1 = exports2.ControlPlaneMembershipDeletedV1 = exports2.ControlPlaneMembershipCreatedV1 = exports2.OPENHI_OPS_SOURCE = exports2.OPENHI_DATA_SOURCE = exports2.OPENHI_CONTROL_SOURCE = exports2.DEFAULT_BUS_NAME_BY_SOURCE = exports2.workflowUserActorFromClaims = exports2.isWorkflowUserActor = exports2.isWorkflowSystemActor = exports2.MissingActorContextError = exports2.isSupportedEnvelopeVersion = exports2.ENVELOPE_VERSION = void 0;
|
|
582
612
|
var envelope_version_1 = require_envelope_version();
|
|
583
613
|
Object.defineProperty(exports2, "ENVELOPE_VERSION", { enumerable: true, get: function() {
|
|
584
614
|
return envelope_version_1.ENVELOPE_VERSION;
|
|
@@ -613,6 +643,12 @@ var require_lib = __commonJS({
|
|
|
613
643
|
return sources_1.OPENHI_OPS_SOURCE;
|
|
614
644
|
} });
|
|
615
645
|
var detail_types_1 = require_detail_types();
|
|
646
|
+
Object.defineProperty(exports2, "ControlPlaneMembershipCreatedV1", { enumerable: true, get: function() {
|
|
647
|
+
return detail_types_1.ControlPlaneMembershipCreatedV1;
|
|
648
|
+
} });
|
|
649
|
+
Object.defineProperty(exports2, "ControlPlaneMembershipDeletedV1", { enumerable: true, get: function() {
|
|
650
|
+
return detail_types_1.ControlPlaneMembershipDeletedV1;
|
|
651
|
+
} });
|
|
616
652
|
Object.defineProperty(exports2, "ControlPlaneOwningDeleteCompleteV1", { enumerable: true, get: function() {
|
|
617
653
|
return detail_types_1.ControlPlaneOwningDeleteCompleteV1;
|
|
618
654
|
} });
|
|
@@ -631,6 +667,18 @@ var require_lib = __commonJS({
|
|
|
631
667
|
Object.defineProperty(exports2, "ControlPlaneRenameV1", { enumerable: true, get: function() {
|
|
632
668
|
return detail_types_1.ControlPlaneRenameV1;
|
|
633
669
|
} });
|
|
670
|
+
Object.defineProperty(exports2, "ControlPlaneRoleAssignmentCreatedV1", { enumerable: true, get: function() {
|
|
671
|
+
return detail_types_1.ControlPlaneRoleAssignmentCreatedV1;
|
|
672
|
+
} });
|
|
673
|
+
Object.defineProperty(exports2, "ControlPlaneRoleAssignmentDeletedV1", { enumerable: true, get: function() {
|
|
674
|
+
return detail_types_1.ControlPlaneRoleAssignmentDeletedV1;
|
|
675
|
+
} });
|
|
676
|
+
Object.defineProperty(exports2, "ControlPlaneWorkspaceCreatedV1", { enumerable: true, get: function() {
|
|
677
|
+
return detail_types_1.ControlPlaneWorkspaceCreatedV1;
|
|
678
|
+
} });
|
|
679
|
+
Object.defineProperty(exports2, "ControlPlaneWorkspaceDeletedV1", { enumerable: true, get: function() {
|
|
680
|
+
return detail_types_1.ControlPlaneWorkspaceDeletedV1;
|
|
681
|
+
} });
|
|
634
682
|
Object.defineProperty(exports2, "InvalidDetailTypeRegistrationError", { enumerable: true, get: function() {
|
|
635
683
|
return detail_types_1.InvalidDetailTypeRegistrationError;
|
|
636
684
|
} });
|