@openhi/constructs 0.0.113 → 0.0.115
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-AHYQFT4N.mjs +212 -0
- package/lib/chunk-AHYQFT4N.mjs.map +1 -0
- package/lib/{chunk-CUUKXDB2.mjs → chunk-AJQUWHFK.mjs} +460 -54
- package/lib/chunk-AJQUWHFK.mjs.map +1 -0
- package/lib/{chunk-GBDIGTNV.mjs → chunk-QWWLM452.mjs} +2 -2
- package/lib/{chunk-QMBJ4VHC.mjs → chunk-U7L7T4XU.mjs} +25 -25
- package/lib/{chunk-QMBJ4VHC.mjs.map → chunk-U7L7T4XU.mjs.map} +1 -1
- package/lib/{chunk-NZRW7ROK.mjs → chunk-YYRWDEG4.mjs} +2 -2
- package/lib/{chunk-KSFC72TT.mjs → chunk-ZHMHLK3S.mjs} +2 -2
- package/lib/{events-DPodvl07.d.mts → events-CMG8xanm.d.mts} +7 -53
- package/lib/{events-DPodvl07.d.ts → events-CMG8xanm.d.ts} +7 -53
- package/lib/index.d.mts +64 -77
- package/lib/index.d.ts +70 -129
- package/lib/index.js +499 -241
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +58 -184
- package/lib/index.mjs.map +1 -1
- package/lib/pre-token-generation.handler.mjs +3 -3
- package/lib/provision-default-workspace.handler.mjs +3 -3
- package/lib/rest-api-lambda.handler.mjs +282 -452
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.d.mts +6 -3
- package/lib/seed-demo-data.handler.d.ts +6 -3
- package/lib/seed-demo-data.handler.js +656 -0
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +4 -4
- package/package.json +8 -8
- package/lib/chunk-53OHXLIL.mjs +0 -27
- package/lib/chunk-53OHXLIL.mjs.map +0 -1
- package/lib/chunk-CUUKXDB2.mjs.map +0 -1
- /package/lib/{chunk-GBDIGTNV.mjs.map → chunk-QWWLM452.mjs.map} +0 -0
- /package/lib/{chunk-NZRW7ROK.mjs.map → chunk-YYRWDEG4.mjs.map} +0 -0
- /package/lib/{chunk-KSFC72TT.mjs.map → chunk-ZHMHLK3S.mjs.map} +0 -0
package/lib/index.js
CHANGED
|
@@ -771,7 +771,6 @@ __export(src_exports, {
|
|
|
771
771
|
CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE: () => CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE,
|
|
772
772
|
CONTROL_EVENT_BUS_NAME_ENV_VAR: () => CONTROL_EVENT_BUS_NAME_ENV_VAR,
|
|
773
773
|
ChildHostedZone: () => ChildHostedZone,
|
|
774
|
-
CognitoFixtureSeederClient: () => CognitoFixtureSeederClient,
|
|
775
774
|
CognitoUserPool: () => CognitoUserPool,
|
|
776
775
|
CognitoUserPoolClient: () => CognitoUserPoolClient,
|
|
777
776
|
CognitoUserPoolDomain: () => CognitoUserPoolDomain,
|
|
@@ -786,6 +785,7 @@ __export(src_exports, {
|
|
|
786
785
|
DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES: () => DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES,
|
|
787
786
|
DATA_STORE_CHANGE_DETAIL_TYPE: () => DATA_STORE_CHANGE_DETAIL_TYPE,
|
|
788
787
|
DATA_STORE_CHANGE_EVENT_SOURCE: () => DATA_STORE_CHANGE_EVENT_SOURCE,
|
|
788
|
+
DEMO_DATA_PLANE_FIXTURES: () => DEMO_DATA_PLANE_FIXTURES,
|
|
789
789
|
DEMO_PERIOD: () => DEMO_PERIOD,
|
|
790
790
|
DEMO_TENANT_SPECS: () => DEMO_TENANT_SPECS,
|
|
791
791
|
DEMO_URN_SYSTEM: () => DEMO_URN_SYSTEM,
|
|
@@ -864,23 +864,15 @@ __export(src_exports, {
|
|
|
864
864
|
WorkflowDedupTableDuplicateError: () => WorkflowDedupTableDuplicateError,
|
|
865
865
|
buildFhirCurrentResourceChangeDetail: () => buildFhirCurrentResourceChangeDetail,
|
|
866
866
|
buildProvisionDefaultWorkspaceRequestedDetail: () => buildProvisionDefaultWorkspaceRequestedDetail,
|
|
867
|
-
demoBasePartitionKeys: () => demoBasePartitionKeys,
|
|
868
|
-
demoDevUserPartitionKeys: () => demoDevUserPartitionKeys,
|
|
869
867
|
demoMembershipId: () => demoMembershipId,
|
|
870
|
-
demoMembershipPartitionKey: () => demoMembershipPartitionKey,
|
|
871
868
|
demoRoleAssignmentId: () => demoRoleAssignmentId,
|
|
872
|
-
demoRoleAssignmentPartitionKey: () => demoRoleAssignmentPartitionKey,
|
|
873
869
|
demoRolesForUserInTenant: () => demoRolesForUserInTenant,
|
|
874
870
|
demoScenarioIdentifier: () => demoScenarioIdentifier,
|
|
875
|
-
demoTenantPartitionKey: () => demoTenantPartitionKey,
|
|
876
|
-
demoUserPartitionKey: () => demoUserPartitionKey,
|
|
877
|
-
demoWorkspacePartitionKey: () => demoWorkspacePartitionKey,
|
|
878
871
|
getDynamoDbDataStoreTableName: () => getDynamoDbDataStoreTableName,
|
|
879
872
|
getPostgresReplicaSchemaName: () => getPostgresReplicaSchemaName,
|
|
880
873
|
getWorkflowDedupTableName: () => getWorkflowDedupTableName,
|
|
881
874
|
openHiTagKey: () => openHiTagKey,
|
|
882
|
-
openhiResourceIdentifier: () => openhiResourceIdentifier
|
|
883
|
-
rolePartitionKey: () => rolePartitionKey
|
|
875
|
+
openhiResourceIdentifier: () => openhiResourceIdentifier
|
|
884
876
|
});
|
|
885
877
|
module.exports = __toCommonJS(src_exports);
|
|
886
878
|
|
|
@@ -1352,47 +1344,9 @@ var _RootGraphqlApi = class _RootGraphqlApi extends import_aws_appsync.GraphqlAp
|
|
|
1352
1344
|
_RootGraphqlApi.SSM_PARAM_NAME = "ROOT_GRAPHQL_API";
|
|
1353
1345
|
var RootGraphqlApi = _RootGraphqlApi;
|
|
1354
1346
|
|
|
1355
|
-
// src/components/cognito/cognito-fixture-seeder-client.ts
|
|
1356
|
-
var import_aws_cdk_lib6 = require("aws-cdk-lib");
|
|
1357
|
-
var import_aws_cognito = require("aws-cdk-lib/aws-cognito");
|
|
1358
|
-
var CognitoFixtureSeederClient = class extends import_aws_cognito.UserPoolClient {
|
|
1359
|
-
constructor(scope, props) {
|
|
1360
|
-
const { userPool, ...rest } = props;
|
|
1361
|
-
super(scope, "fixture-seeder-client", {
|
|
1362
|
-
userPool,
|
|
1363
|
-
generateSecret: false,
|
|
1364
|
-
authFlows: {
|
|
1365
|
-
userPassword: true
|
|
1366
|
-
},
|
|
1367
|
-
// No OAuth flows — the seeder calls Cognito's `InitiateAuth`
|
|
1368
|
-
// directly with USER_PASSWORD_AUTH, not through the hosted-UI
|
|
1369
|
-
// OAuth grant flows the SPA client uses. `disableOAuth: true`
|
|
1370
|
-
// causes CDK to omit `AllowedOAuthFlowsUserPoolClient` entirely;
|
|
1371
|
-
// passing an empty `oAuth` block instead still flips that flag on
|
|
1372
|
-
// and Cognito rejects the create call for missing flows/scopes.
|
|
1373
|
-
disableOAuth: true,
|
|
1374
|
-
// Short-lived tokens: a seeder run takes seconds, not hours.
|
|
1375
|
-
// 1h access-token validity is the minimum Cognito permits and is
|
|
1376
|
-
// plenty for a fixture run.
|
|
1377
|
-
accessTokenValidity: import_aws_cdk_lib6.Duration.hours(1),
|
|
1378
|
-
idTokenValidity: import_aws_cdk_lib6.Duration.hours(1),
|
|
1379
|
-
refreshTokenValidity: import_aws_cdk_lib6.Duration.days(1),
|
|
1380
|
-
preventUserExistenceErrors: true,
|
|
1381
|
-
...rest
|
|
1382
|
-
});
|
|
1383
|
-
}
|
|
1384
|
-
};
|
|
1385
|
-
/**
|
|
1386
|
-
* SSM parameter name suffix used to publish this client's ID for
|
|
1387
|
-
* cross-stack lookups. Built into a full parameter name via
|
|
1388
|
-
* `buildParameterName` with `serviceType` AUTH (since the auth stack
|
|
1389
|
-
* owns this resource).
|
|
1390
|
-
*/
|
|
1391
|
-
CognitoFixtureSeederClient.SSM_PARAM_NAME = "COGNITO_FIXTURE_SEEDER_CLIENT";
|
|
1392
|
-
|
|
1393
1347
|
// src/components/cognito/cognito-user-pool.ts
|
|
1394
|
-
var
|
|
1395
|
-
var CognitoUserPool = class extends
|
|
1348
|
+
var import_aws_cognito = require("aws-cdk-lib/aws-cognito");
|
|
1349
|
+
var CognitoUserPool = class extends import_aws_cognito.UserPool {
|
|
1396
1350
|
constructor(scope, props = {}) {
|
|
1397
1351
|
const service = OpenHiService.of(scope);
|
|
1398
1352
|
super(scope, "user-pool", {
|
|
@@ -1406,13 +1360,13 @@ var CognitoUserPool = class extends import_aws_cognito2.UserPool {
|
|
|
1406
1360
|
userVerification: {
|
|
1407
1361
|
emailSubject: "Verify your email!",
|
|
1408
1362
|
emailBody: "Your verification code is {####}.",
|
|
1409
|
-
emailStyle:
|
|
1363
|
+
emailStyle: import_aws_cognito.VerificationEmailStyle.CODE
|
|
1410
1364
|
},
|
|
1411
1365
|
removalPolicy: props.removalPolicy ?? service.removalPolicy,
|
|
1412
1366
|
// Plus is required for access-token V2 claim customization in the
|
|
1413
1367
|
// pre-token-generation Lambda. Essentials silently drops
|
|
1414
1368
|
// claimsAndScopeOverrideDetails.accessTokenGeneration.claimsToAddOrOverride.
|
|
1415
|
-
featurePlan:
|
|
1369
|
+
featurePlan: import_aws_cognito.FeaturePlan.PLUS,
|
|
1416
1370
|
/**
|
|
1417
1371
|
* Over-rideable props
|
|
1418
1372
|
*/
|
|
@@ -1430,8 +1384,8 @@ var CognitoUserPool = class extends import_aws_cognito2.UserPool {
|
|
|
1430
1384
|
CognitoUserPool.SSM_PARAM_NAME = "COGNITO_USER_POOL";
|
|
1431
1385
|
|
|
1432
1386
|
// src/components/cognito/cognito-user-pool-client.ts
|
|
1433
|
-
var
|
|
1434
|
-
var CognitoUserPoolClient = class extends
|
|
1387
|
+
var import_aws_cognito2 = require("aws-cdk-lib/aws-cognito");
|
|
1388
|
+
var CognitoUserPoolClient = class extends import_aws_cognito2.UserPoolClient {
|
|
1435
1389
|
constructor(scope, props) {
|
|
1436
1390
|
super(scope, "user-pool-client", {
|
|
1437
1391
|
/**
|
|
@@ -1458,8 +1412,8 @@ var CognitoUserPoolClient = class extends import_aws_cognito3.UserPoolClient {
|
|
|
1458
1412
|
CognitoUserPoolClient.SSM_PARAM_NAME = "COGNITO_USER_POOL_CLIENT";
|
|
1459
1413
|
|
|
1460
1414
|
// src/components/cognito/cognito-user-pool-domain.ts
|
|
1461
|
-
var
|
|
1462
|
-
var CognitoUserPoolDomain = class extends
|
|
1415
|
+
var import_aws_cognito3 = require("aws-cdk-lib/aws-cognito");
|
|
1416
|
+
var CognitoUserPoolDomain = class extends import_aws_cognito3.UserPoolDomain {
|
|
1463
1417
|
constructor(scope, props) {
|
|
1464
1418
|
const id = props.cognitoDomain?.domainPrefix ? "cognito-domain" : "custom-domain";
|
|
1465
1419
|
super(scope, id, {
|
|
@@ -1697,7 +1651,7 @@ function buildFhirCurrentResourceChangeDetail(record, keys) {
|
|
|
1697
1651
|
// src/components/dynamodb/data-store-historical-archive.ts
|
|
1698
1652
|
var import_node_fs4 = __toESM(require("fs"));
|
|
1699
1653
|
var import_node_path4 = __toESM(require("path"));
|
|
1700
|
-
var
|
|
1654
|
+
var import_aws_cdk_lib6 = require("aws-cdk-lib");
|
|
1701
1655
|
var kinesisfirehose = __toESM(require("aws-cdk-lib/aws-kinesisfirehose"));
|
|
1702
1656
|
var import_aws_lambda4 = require("aws-cdk-lib/aws-lambda");
|
|
1703
1657
|
var import_aws_lambda_nodejs4 = require("aws-cdk-lib/aws-lambda-nodejs");
|
|
@@ -1719,7 +1673,7 @@ var DataStoreHistoricalArchive = class extends import_constructs4.Construct {
|
|
|
1719
1673
|
encryption: s3.BucketEncryption.S3_MANAGED,
|
|
1720
1674
|
enforceSSL: true,
|
|
1721
1675
|
removalPolicy: props.removalPolicy,
|
|
1722
|
-
autoDeleteObjects: props.removalPolicy ===
|
|
1676
|
+
autoDeleteObjects: props.removalPolicy === import_aws_cdk_lib6.RemovalPolicy.DESTROY,
|
|
1723
1677
|
versioned: true
|
|
1724
1678
|
});
|
|
1725
1679
|
const putEventsFailureDlqBucket = props.dataEventBus ? new s3.Bucket(this, "PutEventsFailureDlq", {
|
|
@@ -1727,7 +1681,7 @@ var DataStoreHistoricalArchive = class extends import_constructs4.Construct {
|
|
|
1727
1681
|
encryption: s3.BucketEncryption.S3_MANAGED,
|
|
1728
1682
|
enforceSSL: true,
|
|
1729
1683
|
removalPolicy: props.removalPolicy,
|
|
1730
|
-
autoDeleteObjects: props.removalPolicy ===
|
|
1684
|
+
autoDeleteObjects: props.removalPolicy === import_aws_cdk_lib6.RemovalPolicy.DESTROY,
|
|
1731
1685
|
versioned: false
|
|
1732
1686
|
}) : void 0;
|
|
1733
1687
|
this.putEventsFailureDlqBucket = putEventsFailureDlqBucket;
|
|
@@ -1735,7 +1689,7 @@ var DataStoreHistoricalArchive = class extends import_constructs4.Construct {
|
|
|
1735
1689
|
entry: resolveHandlerEntry4(__dirname),
|
|
1736
1690
|
runtime: import_aws_lambda4.Runtime.NODEJS_LATEST,
|
|
1737
1691
|
memorySize: 512,
|
|
1738
|
-
timeout:
|
|
1692
|
+
timeout: import_aws_cdk_lib6.Duration.minutes(1),
|
|
1739
1693
|
description: "Firehose transform: filter CURRENT resource rows, S3 keys, EventBridge PutEvents",
|
|
1740
1694
|
environment: props.dataEventBus && putEventsFailureDlqBucket ? {
|
|
1741
1695
|
DATA_EVENT_BUS_NAME: props.dataEventBus.eventBusName,
|
|
@@ -1751,16 +1705,16 @@ var DataStoreHistoricalArchive = class extends import_constructs4.Construct {
|
|
|
1751
1705
|
const processor = new kinesisfirehose.LambdaFunctionProcessor(
|
|
1752
1706
|
this.transformFunction,
|
|
1753
1707
|
{
|
|
1754
|
-
bufferInterval:
|
|
1755
|
-
bufferSize:
|
|
1708
|
+
bufferInterval: import_aws_cdk_lib6.Duration.seconds(60),
|
|
1709
|
+
bufferSize: import_aws_cdk_lib6.Size.mebibytes(3),
|
|
1756
1710
|
retries: 3
|
|
1757
1711
|
}
|
|
1758
1712
|
);
|
|
1759
1713
|
const destination = new kinesisfirehose.S3Bucket(this.archiveBucket, {
|
|
1760
1714
|
compression: kinesisfirehose.Compression.GZIP,
|
|
1761
|
-
bufferingInterval:
|
|
1715
|
+
bufferingInterval: import_aws_cdk_lib6.Duration.seconds(300),
|
|
1762
1716
|
// Firehose requires SizeInMBs ≥ 64 when dynamic partitioning is enabled.
|
|
1763
|
-
bufferingSize:
|
|
1717
|
+
bufferingSize: import_aws_cdk_lib6.Size.mebibytes(64),
|
|
1764
1718
|
processors: [processor],
|
|
1765
1719
|
errorOutputPrefix: "errors/!{firehose:error-output-type}/!{timestamp:yyyy/MM/dd/HH}/",
|
|
1766
1720
|
loggingConfig: new kinesisfirehose.EnableLogging()
|
|
@@ -1868,7 +1822,7 @@ var DynamoDbDataStore = class extends import_aws_dynamodb.Table {
|
|
|
1868
1822
|
|
|
1869
1823
|
// src/components/dynamodb/workflow-dedup-table.ts
|
|
1870
1824
|
var import_workflows = __toESM(require_lib2());
|
|
1871
|
-
var
|
|
1825
|
+
var import_aws_cdk_lib7 = require("aws-cdk-lib");
|
|
1872
1826
|
var import_aws_dynamodb2 = require("aws-cdk-lib/aws-dynamodb");
|
|
1873
1827
|
var import_aws_iam = require("aws-cdk-lib/aws-iam");
|
|
1874
1828
|
var import_constructs5 = require("constructs");
|
|
@@ -1999,7 +1953,7 @@ var _WorkflowDedupTable = class _WorkflowDedupTable extends import_constructs5.C
|
|
|
1999
1953
|
grantConsumer(fn, consumerName, options = {}) {
|
|
2000
1954
|
this.assertConsumerName(consumerName);
|
|
2001
1955
|
if (this.registeredConsumers.has(consumerName)) {
|
|
2002
|
-
|
|
1956
|
+
import_aws_cdk_lib7.Annotations.of(this).addWarning(
|
|
2003
1957
|
`WorkflowDedupTable: consumerName "${consumerName}" registered more than once; subsequent grantConsumer calls add policy statements but do not re-inject the env var.`
|
|
2004
1958
|
);
|
|
2005
1959
|
}
|
|
@@ -2133,7 +2087,7 @@ var ControlEventBus = class _ControlEventBus extends import_aws_events3.EventBus
|
|
|
2133
2087
|
// src/components/postgres/data-store-postgres-replica.ts
|
|
2134
2088
|
var import_node_fs5 = __toESM(require("fs"));
|
|
2135
2089
|
var import_node_path5 = __toESM(require("path"));
|
|
2136
|
-
var
|
|
2090
|
+
var import_aws_cdk_lib8 = require("aws-cdk-lib");
|
|
2137
2091
|
var ec2 = __toESM(require("aws-cdk-lib/aws-ec2"));
|
|
2138
2092
|
var import_aws_lambda5 = require("aws-cdk-lib/aws-lambda");
|
|
2139
2093
|
var import_aws_lambda_event_sources = require("aws-cdk-lib/aws-lambda-event-sources");
|
|
@@ -2199,7 +2153,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2199
2153
|
super(scope, id);
|
|
2200
2154
|
this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
|
|
2201
2155
|
this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
|
|
2202
|
-
const region =
|
|
2156
|
+
const region = import_aws_cdk_lib8.Stack.of(this).region;
|
|
2203
2157
|
this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
|
|
2204
2158
|
availabilityZones: [`${region}a`, `${region}b`],
|
|
2205
2159
|
natGateways: 0,
|
|
@@ -2235,7 +2189,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2235
2189
|
entry: resolveHandlerEntry5(__dirname),
|
|
2236
2190
|
runtime: import_aws_lambda5.Runtime.NODEJS_LATEST,
|
|
2237
2191
|
memorySize: 512,
|
|
2238
|
-
timeout:
|
|
2192
|
+
timeout: import_aws_cdk_lib8.Duration.minutes(1),
|
|
2239
2193
|
vpc: this.vpc,
|
|
2240
2194
|
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
|
|
2241
2195
|
description: "Replicates DynamoDB current-resource changes into the Postgres `resources` JSONB table (ADR 2026-04-17-01).",
|
|
@@ -2262,7 +2216,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2262
2216
|
new import_aws_lambda_event_sources.KinesisEventSource(props.kinesisStream, {
|
|
2263
2217
|
startingPosition: import_aws_lambda5.StartingPosition.LATEST,
|
|
2264
2218
|
batchSize: 100,
|
|
2265
|
-
maxBatchingWindow:
|
|
2219
|
+
maxBatchingWindow: import_aws_cdk_lib8.Duration.seconds(5),
|
|
2266
2220
|
retryAttempts: 10,
|
|
2267
2221
|
bisectBatchOnError: true,
|
|
2268
2222
|
parallelizationFactor: 2,
|
|
@@ -2295,7 +2249,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2295
2249
|
};
|
|
2296
2250
|
|
|
2297
2251
|
// src/components/route-53/child-hosted-zone.ts
|
|
2298
|
-
var
|
|
2252
|
+
var import_aws_cdk_lib9 = require("aws-cdk-lib");
|
|
2299
2253
|
var import_aws_route53 = require("aws-cdk-lib/aws-route53");
|
|
2300
2254
|
var ChildHostedZone = class extends import_aws_route53.HostedZone {
|
|
2301
2255
|
constructor(scope, id, props) {
|
|
@@ -2304,7 +2258,7 @@ var ChildHostedZone = class extends import_aws_route53.HostedZone {
|
|
|
2304
2258
|
zone: props.parentHostedZone,
|
|
2305
2259
|
recordName: this.zoneName,
|
|
2306
2260
|
values: this.hostedZoneNameServers || [],
|
|
2307
|
-
ttl:
|
|
2261
|
+
ttl: import_aws_cdk_lib9.Duration.minutes(5)
|
|
2308
2262
|
});
|
|
2309
2263
|
}
|
|
2310
2264
|
};
|
|
@@ -2377,8 +2331,7 @@ _StaticHosting.SSM_PARAM_NAME_DISTRIBUTION_ARN = "STATIC_HOSTING_DISTRIBUTION_AR
|
|
|
2377
2331
|
var StaticHosting = _StaticHosting;
|
|
2378
2332
|
|
|
2379
2333
|
// src/services/open-hi-auth-service.ts
|
|
2380
|
-
var
|
|
2381
|
-
var import_aws_cognito5 = require("aws-cdk-lib/aws-cognito");
|
|
2334
|
+
var import_aws_cognito4 = require("aws-cdk-lib/aws-cognito");
|
|
2382
2335
|
var import_aws_iam6 = require("aws-cdk-lib/aws-iam");
|
|
2383
2336
|
var import_aws_kms2 = require("aws-cdk-lib/aws-kms");
|
|
2384
2337
|
var import_core2 = require("aws-cdk-lib/core");
|
|
@@ -2409,7 +2362,7 @@ var import_constructs10 = require("constructs");
|
|
|
2409
2362
|
// src/workflows/control-plane/platform-deploy-bridge/platform-deploy-bridge-lambda.ts
|
|
2410
2363
|
var import_node_fs6 = __toESM(require("fs"));
|
|
2411
2364
|
var import_node_path6 = __toESM(require("path"));
|
|
2412
|
-
var
|
|
2365
|
+
var import_aws_cdk_lib10 = require("aws-cdk-lib");
|
|
2413
2366
|
var import_aws_events4 = require("aws-cdk-lib/aws-events");
|
|
2414
2367
|
var import_aws_events_targets = require("aws-cdk-lib/aws-events-targets");
|
|
2415
2368
|
var import_aws_iam2 = require("aws-cdk-lib/aws-iam");
|
|
@@ -2433,15 +2386,15 @@ var PlatformDeployBridgeLambda = class extends import_constructs9.Construct {
|
|
|
2433
2386
|
OPENHI_TAG_SUFFIX_REPO_NAME
|
|
2434
2387
|
);
|
|
2435
2388
|
const tagKeyPrefix = `${service.appName}:`;
|
|
2436
|
-
const ownStackName =
|
|
2437
|
-
const ownSuffix = `-${service.serviceId}-${
|
|
2389
|
+
const ownStackName = import_aws_cdk_lib10.Stack.of(this).stackName;
|
|
2390
|
+
const ownSuffix = `-${service.serviceId}-${import_aws_cdk_lib10.Stack.of(this).account}-${import_aws_cdk_lib10.Stack.of(this).region}`;
|
|
2438
2391
|
const sharedPrefix = ownStackName.endsWith(ownSuffix) ? ownStackName.slice(0, -ownSuffix.length) : service.branchHash;
|
|
2439
|
-
const stackIdPrefix = `arn:aws:cloudformation:${
|
|
2392
|
+
const stackIdPrefix = `arn:aws:cloudformation:${import_aws_cdk_lib10.Stack.of(this).region}:${import_aws_cdk_lib10.Stack.of(this).account}:stack/${sharedPrefix}-`;
|
|
2440
2393
|
this.lambda = new import_aws_lambda_nodejs6.NodejsFunction(this, "handler", {
|
|
2441
2394
|
entry: resolveHandlerEntry6(__dirname),
|
|
2442
2395
|
runtime: import_aws_lambda6.Runtime.NODEJS_LATEST,
|
|
2443
2396
|
memorySize: 256,
|
|
2444
|
-
timeout:
|
|
2397
|
+
timeout: import_aws_cdk_lib10.Duration.seconds(30),
|
|
2445
2398
|
environment: {
|
|
2446
2399
|
[CONTROL_EVENT_BUS_NAME_ENV_VAR]: props.controlEventBus.eventBusName,
|
|
2447
2400
|
[OPENHI_REPO_TAG_KEY_ENV_VAR]: repoTagKey,
|
|
@@ -2453,7 +2406,7 @@ var PlatformDeployBridgeLambda = class extends import_constructs9.Construct {
|
|
|
2453
2406
|
effect: import_aws_iam2.Effect.ALLOW,
|
|
2454
2407
|
actions: ["cloudformation:DescribeStacks"],
|
|
2455
2408
|
resources: [
|
|
2456
|
-
`arn:aws:cloudformation:${
|
|
2409
|
+
`arn:aws:cloudformation:${import_aws_cdk_lib10.Stack.of(this).region}:${import_aws_cdk_lib10.Stack.of(this).account}:stack/*`
|
|
2457
2410
|
]
|
|
2458
2411
|
})
|
|
2459
2412
|
);
|
|
@@ -2472,7 +2425,7 @@ var PlatformDeployBridgeLambda = class extends import_constructs9.Construct {
|
|
|
2472
2425
|
targets: [
|
|
2473
2426
|
new import_aws_events_targets.LambdaFunction(this.lambda, {
|
|
2474
2427
|
retryAttempts: 2,
|
|
2475
|
-
maxEventAge:
|
|
2428
|
+
maxEventAge: import_aws_cdk_lib10.Duration.hours(2)
|
|
2476
2429
|
})
|
|
2477
2430
|
]
|
|
2478
2431
|
});
|
|
@@ -2764,61 +2717,428 @@ var demoRolesForUserInTenant = (_user, _tenantId) => {
|
|
|
2764
2717
|
void _tenantId;
|
|
2765
2718
|
return [import_types.PLATFORM_ROLE_CODE.TENANT_ADMIN];
|
|
2766
2719
|
};
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
var
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2720
|
+
|
|
2721
|
+
// src/workflows/control-plane/seed-demo-data/data-plane-fixtures.ts
|
|
2722
|
+
var fixtureIdentifiers = (scenario, tenantId, workspaceId, resourceType, id, roleSuffix) => [
|
|
2723
|
+
demoScenarioIdentifier(scenario, roleSuffix),
|
|
2724
|
+
openhiResourceIdentifier({
|
|
2725
|
+
tenantId,
|
|
2726
|
+
workspaceId,
|
|
2727
|
+
resourceType,
|
|
2728
|
+
id
|
|
2729
|
+
})
|
|
2730
|
+
];
|
|
2731
|
+
var buildWoundCareFixtures = (scenario, tenantId, workspaceId, idPrefix) => ({
|
|
2732
|
+
tenantId,
|
|
2733
|
+
workspaceId,
|
|
2734
|
+
scenario,
|
|
2735
|
+
patients: [
|
|
2736
|
+
{
|
|
2737
|
+
resourceType: "Patient",
|
|
2738
|
+
id: `${idPrefix}-patient-1`,
|
|
2739
|
+
identifier: fixtureIdentifiers(
|
|
2740
|
+
scenario,
|
|
2741
|
+
tenantId,
|
|
2742
|
+
workspaceId,
|
|
2743
|
+
"Patient",
|
|
2744
|
+
`${idPrefix}-patient-1`,
|
|
2745
|
+
`patient-1`
|
|
2746
|
+
),
|
|
2747
|
+
active: true,
|
|
2748
|
+
name: [{ family: "Carter", given: ["Eleanor"], use: "official" }],
|
|
2749
|
+
gender: "female",
|
|
2750
|
+
birthDate: "1952-04-18"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
resourceType: "Patient",
|
|
2754
|
+
id: `${idPrefix}-patient-2`,
|
|
2755
|
+
identifier: fixtureIdentifiers(
|
|
2756
|
+
scenario,
|
|
2757
|
+
tenantId,
|
|
2758
|
+
workspaceId,
|
|
2759
|
+
"Patient",
|
|
2760
|
+
`${idPrefix}-patient-2`,
|
|
2761
|
+
`patient-2`
|
|
2762
|
+
),
|
|
2763
|
+
active: true,
|
|
2764
|
+
name: [{ family: "Nguyen", given: ["Hao"], use: "official" }],
|
|
2765
|
+
gender: "male",
|
|
2766
|
+
birthDate: "1968-11-02"
|
|
2779
2767
|
}
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2768
|
+
],
|
|
2769
|
+
practitioners: [
|
|
2770
|
+
{
|
|
2771
|
+
resourceType: "Practitioner",
|
|
2772
|
+
id: `${idPrefix}-practitioner-1`,
|
|
2773
|
+
identifier: fixtureIdentifiers(
|
|
2774
|
+
scenario,
|
|
2775
|
+
tenantId,
|
|
2776
|
+
workspaceId,
|
|
2777
|
+
"Practitioner",
|
|
2778
|
+
`${idPrefix}-practitioner-1`,
|
|
2779
|
+
`practitioner-1`
|
|
2780
|
+
),
|
|
2781
|
+
active: true,
|
|
2782
|
+
name: [{ family: "Reyes", given: ["Maria"], prefix: ["Dr."] }],
|
|
2783
|
+
gender: "female"
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
resourceType: "Practitioner",
|
|
2787
|
+
id: `${idPrefix}-practitioner-2`,
|
|
2788
|
+
identifier: fixtureIdentifiers(
|
|
2789
|
+
scenario,
|
|
2790
|
+
tenantId,
|
|
2791
|
+
workspaceId,
|
|
2792
|
+
"Practitioner",
|
|
2793
|
+
`${idPrefix}-practitioner-2`,
|
|
2794
|
+
`practitioner-2`
|
|
2795
|
+
),
|
|
2796
|
+
active: true,
|
|
2797
|
+
name: [{ family: "Okafor", given: ["Chinedu"], prefix: ["Dr."] }],
|
|
2798
|
+
gender: "male"
|
|
2799
|
+
}
|
|
2800
|
+
],
|
|
2801
|
+
observations: [
|
|
2802
|
+
{
|
|
2803
|
+
resourceType: "Observation",
|
|
2804
|
+
id: `${idPrefix}-observation-1`,
|
|
2805
|
+
identifier: fixtureIdentifiers(
|
|
2806
|
+
scenario,
|
|
2807
|
+
tenantId,
|
|
2808
|
+
workspaceId,
|
|
2809
|
+
"Observation",
|
|
2810
|
+
`${idPrefix}-observation-1`,
|
|
2811
|
+
`observation-1`
|
|
2812
|
+
),
|
|
2813
|
+
status: "final",
|
|
2814
|
+
code: {
|
|
2815
|
+
coding: [
|
|
2816
|
+
{
|
|
2817
|
+
system: "http://loinc.org",
|
|
2818
|
+
code: "39135-9",
|
|
2819
|
+
display: "Wound size"
|
|
2820
|
+
}
|
|
2821
|
+
]
|
|
2822
|
+
},
|
|
2823
|
+
subject: { reference: `Patient/${idPrefix}-patient-1` },
|
|
2824
|
+
valueString: "3.2cm x 2.1cm"
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
resourceType: "Observation",
|
|
2828
|
+
id: `${idPrefix}-observation-2`,
|
|
2829
|
+
identifier: fixtureIdentifiers(
|
|
2830
|
+
scenario,
|
|
2831
|
+
tenantId,
|
|
2832
|
+
workspaceId,
|
|
2833
|
+
"Observation",
|
|
2834
|
+
`${idPrefix}-observation-2`,
|
|
2835
|
+
`observation-2`
|
|
2836
|
+
),
|
|
2837
|
+
status: "final",
|
|
2838
|
+
code: {
|
|
2839
|
+
coding: [
|
|
2840
|
+
{
|
|
2841
|
+
system: "http://loinc.org",
|
|
2842
|
+
code: "72287-2",
|
|
2843
|
+
display: "Wound exudate amount"
|
|
2844
|
+
}
|
|
2845
|
+
]
|
|
2846
|
+
},
|
|
2847
|
+
subject: { reference: `Patient/${idPrefix}-patient-2` },
|
|
2848
|
+
valueString: "moderate"
|
|
2849
|
+
}
|
|
2850
|
+
],
|
|
2851
|
+
encounters: [
|
|
2852
|
+
{
|
|
2853
|
+
resourceType: "Encounter",
|
|
2854
|
+
id: `${idPrefix}-encounter-1`,
|
|
2855
|
+
identifier: fixtureIdentifiers(
|
|
2856
|
+
scenario,
|
|
2857
|
+
tenantId,
|
|
2858
|
+
workspaceId,
|
|
2859
|
+
"Encounter",
|
|
2860
|
+
`${idPrefix}-encounter-1`,
|
|
2861
|
+
`encounter-1`
|
|
2862
|
+
),
|
|
2863
|
+
status: "finished",
|
|
2864
|
+
class: {
|
|
2865
|
+
system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
|
2866
|
+
code: "AMB",
|
|
2867
|
+
display: "ambulatory"
|
|
2868
|
+
},
|
|
2869
|
+
subject: { reference: `Patient/${idPrefix}-patient-1` }
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
resourceType: "Encounter",
|
|
2873
|
+
id: `${idPrefix}-encounter-2`,
|
|
2874
|
+
identifier: fixtureIdentifiers(
|
|
2875
|
+
scenario,
|
|
2876
|
+
tenantId,
|
|
2877
|
+
workspaceId,
|
|
2878
|
+
"Encounter",
|
|
2879
|
+
`${idPrefix}-encounter-2`,
|
|
2880
|
+
`encounter-2`
|
|
2881
|
+
),
|
|
2882
|
+
status: "finished",
|
|
2883
|
+
class: {
|
|
2884
|
+
system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
|
2885
|
+
code: "AMB",
|
|
2886
|
+
display: "ambulatory"
|
|
2887
|
+
},
|
|
2888
|
+
subject: { reference: `Patient/${idPrefix}-patient-2` }
|
|
2889
|
+
}
|
|
2890
|
+
],
|
|
2891
|
+
accounts: [
|
|
2892
|
+
{
|
|
2893
|
+
resourceType: "Account",
|
|
2894
|
+
id: `${idPrefix}-account-1`,
|
|
2895
|
+
identifier: fixtureIdentifiers(
|
|
2896
|
+
scenario,
|
|
2897
|
+
tenantId,
|
|
2898
|
+
workspaceId,
|
|
2899
|
+
"Account",
|
|
2900
|
+
`${idPrefix}-account-1`,
|
|
2901
|
+
`account-1`
|
|
2902
|
+
),
|
|
2903
|
+
status: "active",
|
|
2904
|
+
name: "Wound-care self-pay account",
|
|
2905
|
+
subject: [{ reference: `Patient/${idPrefix}-patient-1` }]
|
|
2906
|
+
}
|
|
2907
|
+
]
|
|
2908
|
+
});
|
|
2909
|
+
var buildPrimaryCareFixtures = (scenario, tenantId, workspaceId, idPrefix) => ({
|
|
2910
|
+
tenantId,
|
|
2911
|
+
workspaceId,
|
|
2912
|
+
scenario,
|
|
2913
|
+
patients: [
|
|
2914
|
+
{
|
|
2915
|
+
resourceType: "Patient",
|
|
2916
|
+
id: `${idPrefix}-patient-1`,
|
|
2917
|
+
identifier: fixtureIdentifiers(
|
|
2918
|
+
scenario,
|
|
2919
|
+
tenantId,
|
|
2920
|
+
workspaceId,
|
|
2921
|
+
"Patient",
|
|
2922
|
+
`${idPrefix}-patient-1`,
|
|
2923
|
+
`patient-1`
|
|
2924
|
+
),
|
|
2925
|
+
active: true,
|
|
2926
|
+
name: [{ family: "Bennett", given: ["Sophia"], use: "official" }],
|
|
2927
|
+
gender: "female",
|
|
2928
|
+
birthDate: "1985-06-09"
|
|
2929
|
+
},
|
|
2930
|
+
{
|
|
2931
|
+
resourceType: "Patient",
|
|
2932
|
+
id: `${idPrefix}-patient-2`,
|
|
2933
|
+
identifier: fixtureIdentifiers(
|
|
2934
|
+
scenario,
|
|
2935
|
+
tenantId,
|
|
2936
|
+
workspaceId,
|
|
2937
|
+
"Patient",
|
|
2938
|
+
`${idPrefix}-patient-2`,
|
|
2939
|
+
`patient-2`
|
|
2940
|
+
),
|
|
2941
|
+
active: true,
|
|
2942
|
+
name: [{ family: "Patel", given: ["Arjun"], use: "official" }],
|
|
2943
|
+
gender: "male",
|
|
2944
|
+
birthDate: "1979-02-21"
|
|
2945
|
+
}
|
|
2946
|
+
],
|
|
2947
|
+
practitioners: [
|
|
2948
|
+
{
|
|
2949
|
+
resourceType: "Practitioner",
|
|
2950
|
+
id: `${idPrefix}-practitioner-1`,
|
|
2951
|
+
identifier: fixtureIdentifiers(
|
|
2952
|
+
scenario,
|
|
2953
|
+
tenantId,
|
|
2954
|
+
workspaceId,
|
|
2955
|
+
"Practitioner",
|
|
2956
|
+
`${idPrefix}-practitioner-1`,
|
|
2957
|
+
`practitioner-1`
|
|
2958
|
+
),
|
|
2959
|
+
active: true,
|
|
2960
|
+
name: [{ family: "Lin", given: ["Wei"], prefix: ["Dr."] }],
|
|
2961
|
+
gender: "female"
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
resourceType: "Practitioner",
|
|
2965
|
+
id: `${idPrefix}-practitioner-2`,
|
|
2966
|
+
identifier: fixtureIdentifiers(
|
|
2967
|
+
scenario,
|
|
2968
|
+
tenantId,
|
|
2969
|
+
workspaceId,
|
|
2970
|
+
"Practitioner",
|
|
2971
|
+
`${idPrefix}-practitioner-2`,
|
|
2972
|
+
`practitioner-2`
|
|
2973
|
+
),
|
|
2974
|
+
active: true,
|
|
2975
|
+
name: [{ family: "Kowalski", given: ["Piotr"], prefix: ["Dr."] }],
|
|
2976
|
+
gender: "male"
|
|
2977
|
+
}
|
|
2978
|
+
],
|
|
2979
|
+
observations: [
|
|
2980
|
+
{
|
|
2981
|
+
resourceType: "Observation",
|
|
2982
|
+
id: `${idPrefix}-observation-1`,
|
|
2983
|
+
identifier: fixtureIdentifiers(
|
|
2984
|
+
scenario,
|
|
2985
|
+
tenantId,
|
|
2986
|
+
workspaceId,
|
|
2987
|
+
"Observation",
|
|
2988
|
+
`${idPrefix}-observation-1`,
|
|
2989
|
+
`observation-1`
|
|
2990
|
+
),
|
|
2991
|
+
status: "final",
|
|
2992
|
+
code: {
|
|
2993
|
+
coding: [
|
|
2994
|
+
{
|
|
2995
|
+
system: "http://loinc.org",
|
|
2996
|
+
code: "8480-6",
|
|
2997
|
+
display: "Systolic blood pressure"
|
|
2998
|
+
}
|
|
2999
|
+
]
|
|
3000
|
+
},
|
|
3001
|
+
subject: { reference: `Patient/${idPrefix}-patient-1` },
|
|
3002
|
+
valueQuantity: { value: 122, unit: "mm[Hg]" }
|
|
3003
|
+
},
|
|
3004
|
+
{
|
|
3005
|
+
resourceType: "Observation",
|
|
3006
|
+
id: `${idPrefix}-observation-2`,
|
|
3007
|
+
identifier: fixtureIdentifiers(
|
|
3008
|
+
scenario,
|
|
3009
|
+
tenantId,
|
|
3010
|
+
workspaceId,
|
|
3011
|
+
"Observation",
|
|
3012
|
+
`${idPrefix}-observation-2`,
|
|
3013
|
+
`observation-2`
|
|
3014
|
+
),
|
|
3015
|
+
status: "final",
|
|
3016
|
+
code: {
|
|
3017
|
+
coding: [
|
|
3018
|
+
{
|
|
3019
|
+
system: "http://loinc.org",
|
|
3020
|
+
code: "8462-4",
|
|
3021
|
+
display: "Diastolic blood pressure"
|
|
3022
|
+
}
|
|
3023
|
+
]
|
|
3024
|
+
},
|
|
3025
|
+
subject: { reference: `Patient/${idPrefix}-patient-2` },
|
|
3026
|
+
valueQuantity: { value: 78, unit: "mm[Hg]" }
|
|
3027
|
+
}
|
|
3028
|
+
],
|
|
3029
|
+
encounters: [
|
|
3030
|
+
{
|
|
3031
|
+
resourceType: "Encounter",
|
|
3032
|
+
id: `${idPrefix}-encounter-1`,
|
|
3033
|
+
identifier: fixtureIdentifiers(
|
|
3034
|
+
scenario,
|
|
3035
|
+
tenantId,
|
|
3036
|
+
workspaceId,
|
|
3037
|
+
"Encounter",
|
|
3038
|
+
`${idPrefix}-encounter-1`,
|
|
3039
|
+
`encounter-1`
|
|
3040
|
+
),
|
|
3041
|
+
status: "finished",
|
|
3042
|
+
class: {
|
|
3043
|
+
system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
|
3044
|
+
code: "AMB",
|
|
3045
|
+
display: "ambulatory"
|
|
3046
|
+
},
|
|
3047
|
+
subject: { reference: `Patient/${idPrefix}-patient-1` }
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
resourceType: "Encounter",
|
|
3051
|
+
id: `${idPrefix}-encounter-2`,
|
|
3052
|
+
identifier: fixtureIdentifiers(
|
|
3053
|
+
scenario,
|
|
3054
|
+
tenantId,
|
|
3055
|
+
workspaceId,
|
|
3056
|
+
"Encounter",
|
|
3057
|
+
`${idPrefix}-encounter-2`,
|
|
3058
|
+
`encounter-2`
|
|
3059
|
+
),
|
|
3060
|
+
status: "in-progress",
|
|
3061
|
+
class: {
|
|
3062
|
+
system: "http://terminology.hl7.org/CodeSystem/v3-ActCode",
|
|
3063
|
+
code: "AMB",
|
|
3064
|
+
display: "ambulatory"
|
|
3065
|
+
},
|
|
3066
|
+
subject: { reference: `Patient/${idPrefix}-patient-2` }
|
|
3067
|
+
}
|
|
3068
|
+
],
|
|
3069
|
+
accounts: [
|
|
3070
|
+
{
|
|
3071
|
+
resourceType: "Account",
|
|
3072
|
+
id: `${idPrefix}-account-1`,
|
|
3073
|
+
identifier: fixtureIdentifiers(
|
|
3074
|
+
scenario,
|
|
3075
|
+
tenantId,
|
|
3076
|
+
workspaceId,
|
|
3077
|
+
"Account",
|
|
3078
|
+
`${idPrefix}-account-1`,
|
|
3079
|
+
`account-1`
|
|
3080
|
+
),
|
|
3081
|
+
status: "active",
|
|
3082
|
+
name: "Primary-care insurance account",
|
|
3083
|
+
subject: [{ reference: `Patient/${idPrefix}-patient-1` }]
|
|
3084
|
+
}
|
|
3085
|
+
]
|
|
3086
|
+
});
|
|
3087
|
+
var DEMO_DATA_PLANE_FIXTURES = [
|
|
3088
|
+
buildWoundCareFixtures(
|
|
3089
|
+
"demo-wound-care",
|
|
3090
|
+
"demo-wound-care-tenant",
|
|
3091
|
+
"demo-wound-care-workspace",
|
|
3092
|
+
"demo-wound-care"
|
|
3093
|
+
),
|
|
3094
|
+
buildPrimaryCareFixtures(
|
|
3095
|
+
"demo-primary-care",
|
|
3096
|
+
"demo-primary-care-tenant",
|
|
3097
|
+
"demo-primary-care-workspace",
|
|
3098
|
+
"demo-primary-care"
|
|
3099
|
+
),
|
|
3100
|
+
buildWoundCareFixtures(
|
|
3101
|
+
"demo-mixed",
|
|
3102
|
+
"demo-mixed-tenant",
|
|
3103
|
+
"demo-mixed-workspace-wound-care",
|
|
3104
|
+
"demo-mixed-wound-care"
|
|
3105
|
+
),
|
|
3106
|
+
buildPrimaryCareFixtures(
|
|
3107
|
+
"demo-mixed",
|
|
3108
|
+
"demo-mixed-tenant",
|
|
3109
|
+
"demo-mixed-workspace-primary-care",
|
|
3110
|
+
"demo-mixed-primary-care"
|
|
3111
|
+
)
|
|
3112
|
+
];
|
|
3113
|
+
var _validateFixturesAgainstTenantSpecs = () => {
|
|
3114
|
+
for (const group of DEMO_DATA_PLANE_FIXTURES) {
|
|
3115
|
+
if (group.tenantId === PLACEHOLDER_TENANT_ID) {
|
|
3116
|
+
throw new Error(
|
|
3117
|
+
"The placeholder tenant must not carry data-plane fixtures."
|
|
2793
3118
|
);
|
|
2794
|
-
for (const roleCode of demoRolesForUserInTenant(user, spec.tenantId)) {
|
|
2795
|
-
keys.push(
|
|
2796
|
-
demoRoleAssignmentPartitionKey(
|
|
2797
|
-
spec.tenantId,
|
|
2798
|
-
demoRoleAssignmentId(user.id, spec.tenantId, roleCode)
|
|
2799
|
-
)
|
|
2800
|
-
);
|
|
2801
|
-
}
|
|
2802
3119
|
}
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
)
|
|
3120
|
+
const tenant = DEMO_TENANT_SPECS.find((s) => s.tenantId === group.tenantId);
|
|
3121
|
+
if (!tenant) {
|
|
3122
|
+
throw new Error(
|
|
3123
|
+
`Fixture references unknown tenantId "${group.tenantId}". Add a matching entry to DEMO_TENANT_SPECS first.`
|
|
3124
|
+
);
|
|
3125
|
+
}
|
|
3126
|
+
const workspace = tenant.workspaces.find(
|
|
3127
|
+
(ws) => ws.id === group.workspaceId
|
|
2812
3128
|
);
|
|
3129
|
+
if (!workspace) {
|
|
3130
|
+
throw new Error(
|
|
3131
|
+
`Fixture references unknown workspaceId "${group.workspaceId}" for tenant "${group.tenantId}".`
|
|
3132
|
+
);
|
|
3133
|
+
}
|
|
2813
3134
|
}
|
|
2814
|
-
return keys;
|
|
2815
3135
|
};
|
|
3136
|
+
_validateFixturesAgainstTenantSpecs();
|
|
2816
3137
|
|
|
2817
3138
|
// src/workflows/control-plane/seed-demo-data/seed-demo-data-lambda.ts
|
|
2818
3139
|
var import_node_fs7 = __toESM(require("fs"));
|
|
2819
3140
|
var import_node_path7 = __toESM(require("path"));
|
|
2820
|
-
var
|
|
2821
|
-
var import_aws_cdk_lib12 = require("aws-cdk-lib");
|
|
3141
|
+
var import_aws_cdk_lib11 = require("aws-cdk-lib");
|
|
2822
3142
|
var import_aws_events6 = require("aws-cdk-lib/aws-events");
|
|
2823
3143
|
var import_aws_events_targets2 = require("aws-cdk-lib/aws-events-targets");
|
|
2824
3144
|
var import_aws_iam3 = require("aws-cdk-lib/aws-iam");
|
|
@@ -5678,6 +5998,21 @@ var import_types10 = require("@openhi/types");
|
|
|
5678
5998
|
// src/lib/compression.ts
|
|
5679
5999
|
var import_node_zlib = require("zlib");
|
|
5680
6000
|
|
|
6001
|
+
// src/data/operations/data/account/account-create-operation.ts
|
|
6002
|
+
var import_ulid = require("ulid");
|
|
6003
|
+
|
|
6004
|
+
// src/data/operations/data/encounter/encounter-create-operation.ts
|
|
6005
|
+
var import_ulid2 = require("ulid");
|
|
6006
|
+
|
|
6007
|
+
// src/data/operations/data/observation/observation-create-operation.ts
|
|
6008
|
+
var import_ulid3 = require("ulid");
|
|
6009
|
+
|
|
6010
|
+
// src/data/operations/data/patient/patient-create-operation.ts
|
|
6011
|
+
var import_ulid4 = require("ulid");
|
|
6012
|
+
|
|
6013
|
+
// src/data/operations/data/practitioner/practitioner-create-operation.ts
|
|
6014
|
+
var import_ulid5 = require("ulid");
|
|
6015
|
+
|
|
5681
6016
|
// src/workflows/control-plane/seed-demo-data/seed-demo-data.handler.ts
|
|
5682
6017
|
var SEED_DEMO_DATA_USER_POOL_ID_ENV_VAR = "SEED_DEMO_DATA_USER_POOL_ID";
|
|
5683
6018
|
|
|
@@ -5697,39 +6032,24 @@ var SeedDemoDataLambda = class extends import_constructs11.Construct {
|
|
|
5697
6032
|
entry: resolveHandlerEntry7(__dirname),
|
|
5698
6033
|
runtime: import_aws_lambda7.Runtime.NODEJS_LATEST,
|
|
5699
6034
|
memorySize: 512,
|
|
5700
|
-
timeout:
|
|
6035
|
+
timeout: import_aws_cdk_lib11.Duration.minutes(2),
|
|
5701
6036
|
environment: {
|
|
5702
6037
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
5703
6038
|
[SEED_DEMO_DATA_USER_POOL_ID_ENV_VAR]: props.userPool.userPoolId
|
|
5704
6039
|
}
|
|
5705
6040
|
});
|
|
5706
|
-
const roleReadKeys = Object.values(import_types13.PLATFORM_ROLE_IDS).map(rolePartitionKey);
|
|
5707
6041
|
this.lambda.addToRolePolicy(
|
|
5708
6042
|
new import_aws_iam3.PolicyStatement({
|
|
5709
6043
|
effect: import_aws_iam3.Effect.ALLOW,
|
|
5710
6044
|
actions: ["dynamodb:GetItem"],
|
|
5711
|
-
resources: [props.dataStoreTable.tableArn]
|
|
5712
|
-
conditions: {
|
|
5713
|
-
"ForAllValues:StringEquals": {
|
|
5714
|
-
"dynamodb:LeadingKeys": roleReadKeys
|
|
5715
|
-
}
|
|
5716
|
-
}
|
|
6045
|
+
resources: [props.dataStoreTable.tableArn]
|
|
5717
6046
|
})
|
|
5718
6047
|
);
|
|
5719
|
-
const writeKeys = [
|
|
5720
|
-
...demoBasePartitionKeys(),
|
|
5721
|
-
...demoDevUserPartitionKeys(DEV_USERS)
|
|
5722
|
-
];
|
|
5723
6048
|
this.lambda.addToRolePolicy(
|
|
5724
6049
|
new import_aws_iam3.PolicyStatement({
|
|
5725
6050
|
effect: import_aws_iam3.Effect.ALLOW,
|
|
5726
6051
|
actions: ["dynamodb:PutItem", "dynamodb:UpdateItem"],
|
|
5727
|
-
resources: [props.dataStoreTable.tableArn]
|
|
5728
|
-
conditions: {
|
|
5729
|
-
"ForAllValues:StringEquals": {
|
|
5730
|
-
"dynamodb:LeadingKeys": writeKeys
|
|
5731
|
-
}
|
|
5732
|
-
}
|
|
6052
|
+
resources: [props.dataStoreTable.tableArn]
|
|
5733
6053
|
})
|
|
5734
6054
|
);
|
|
5735
6055
|
this.lambda.addToRolePolicy(
|
|
@@ -5741,7 +6061,7 @@ var SeedDemoDataLambda = class extends import_constructs11.Construct {
|
|
|
5741
6061
|
"cognito-idp:AdminSetUserPassword"
|
|
5742
6062
|
],
|
|
5743
6063
|
resources: [
|
|
5744
|
-
|
|
6064
|
+
import_aws_cdk_lib11.Stack.of(this).formatArn({
|
|
5745
6065
|
service: "cognito-idp",
|
|
5746
6066
|
resource: "userpool",
|
|
5747
6067
|
resourceName: props.userPool.userPoolId
|
|
@@ -5758,7 +6078,7 @@ var SeedDemoDataLambda = class extends import_constructs11.Construct {
|
|
|
5758
6078
|
targets: [
|
|
5759
6079
|
new import_aws_events_targets2.LambdaFunction(this.lambda, {
|
|
5760
6080
|
retryAttempts: 2,
|
|
5761
|
-
maxEventAge:
|
|
6081
|
+
maxEventAge: import_aws_cdk_lib11.Duration.hours(2)
|
|
5762
6082
|
})
|
|
5763
6083
|
]
|
|
5764
6084
|
});
|
|
@@ -5792,8 +6112,8 @@ var SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR = "CONTROL_EVENT_BUS_NAME";
|
|
|
5792
6112
|
// src/workflows/control-plane/seed-system-data/seed-system-data-lambda.ts
|
|
5793
6113
|
var import_node_fs8 = __toESM(require("fs"));
|
|
5794
6114
|
var import_node_path8 = __toESM(require("path"));
|
|
5795
|
-
var
|
|
5796
|
-
var
|
|
6115
|
+
var import_types13 = require("@openhi/types");
|
|
6116
|
+
var import_aws_cdk_lib12 = require("aws-cdk-lib");
|
|
5797
6117
|
var import_aws_events7 = require("aws-cdk-lib/aws-events");
|
|
5798
6118
|
var import_aws_events_targets3 = require("aws-cdk-lib/aws-events-targets");
|
|
5799
6119
|
var import_aws_iam4 = require("aws-cdk-lib/aws-iam");
|
|
@@ -5815,13 +6135,13 @@ var SeedSystemDataLambda = class extends import_constructs13.Construct {
|
|
|
5815
6135
|
entry: resolveHandlerEntry8(__dirname),
|
|
5816
6136
|
runtime: import_aws_lambda8.Runtime.NODEJS_LATEST,
|
|
5817
6137
|
memorySize: 512,
|
|
5818
|
-
timeout:
|
|
6138
|
+
timeout: import_aws_cdk_lib12.Duration.minutes(1),
|
|
5819
6139
|
environment: {
|
|
5820
6140
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
5821
6141
|
[SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR]: props.controlEventBus.eventBusName
|
|
5822
6142
|
}
|
|
5823
6143
|
});
|
|
5824
|
-
const roleArns = Object.values(
|
|
6144
|
+
const roleArns = Object.values(import_types13.PLATFORM_ROLE_IDS).map(
|
|
5825
6145
|
(id) => `role#id#${id}`
|
|
5826
6146
|
);
|
|
5827
6147
|
this.lambda.addToRolePolicy(
|
|
@@ -5837,7 +6157,7 @@ var SeedSystemDataLambda = class extends import_constructs13.Construct {
|
|
|
5837
6157
|
})
|
|
5838
6158
|
);
|
|
5839
6159
|
props.controlEventBus.grantPutEventsTo(this.lambda);
|
|
5840
|
-
const hostStackName =
|
|
6160
|
+
const hostStackName = import_aws_cdk_lib12.Stack.of(this).stackName;
|
|
5841
6161
|
this.rule = new import_aws_events7.Rule(this, "rule", {
|
|
5842
6162
|
eventBus: props.controlEventBus,
|
|
5843
6163
|
eventPattern: {
|
|
@@ -5852,7 +6172,7 @@ var SeedSystemDataLambda = class extends import_constructs13.Construct {
|
|
|
5852
6172
|
targets: [
|
|
5853
6173
|
new import_aws_events_targets3.LambdaFunction(this.lambda, {
|
|
5854
6174
|
retryAttempts: 2,
|
|
5855
|
-
maxEventAge:
|
|
6175
|
+
maxEventAge: import_aws_cdk_lib12.Duration.hours(2)
|
|
5856
6176
|
})
|
|
5857
6177
|
]
|
|
5858
6178
|
});
|
|
@@ -6014,7 +6334,7 @@ var buildProvisionDefaultWorkspaceRequestedDetail = (event) => {
|
|
|
6014
6334
|
// src/workflows/control-plane/user-onboarding/provision-default-workspace-lambda.ts
|
|
6015
6335
|
var import_node_fs9 = __toESM(require("fs"));
|
|
6016
6336
|
var import_node_path9 = __toESM(require("path"));
|
|
6017
|
-
var
|
|
6337
|
+
var import_aws_cdk_lib13 = require("aws-cdk-lib");
|
|
6018
6338
|
var import_aws_events8 = require("aws-cdk-lib/aws-events");
|
|
6019
6339
|
var import_aws_events_targets4 = require("aws-cdk-lib/aws-events-targets");
|
|
6020
6340
|
var import_aws_iam5 = require("aws-cdk-lib/aws-iam");
|
|
@@ -6061,7 +6381,7 @@ var ProvisionDefaultWorkspaceLambda = class extends import_constructs15.Construc
|
|
|
6061
6381
|
targets: [
|
|
6062
6382
|
new import_aws_events_targets4.LambdaFunction(this.lambda, {
|
|
6063
6383
|
retryAttempts: 2,
|
|
6064
|
-
maxEventAge:
|
|
6384
|
+
maxEventAge: import_aws_cdk_lib13.Duration.hours(2)
|
|
6065
6385
|
})
|
|
6066
6386
|
]
|
|
6067
6387
|
});
|
|
@@ -6104,7 +6424,6 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6104
6424
|
this.grantPostConfirmationPermissions();
|
|
6105
6425
|
this.userPoolClient = this.createUserPoolClient();
|
|
6106
6426
|
this.userPoolDomain = this.createUserPoolDomain();
|
|
6107
|
-
this.fixtureSeederClient = this.createFixtureSeederClient();
|
|
6108
6427
|
}
|
|
6109
6428
|
/**
|
|
6110
6429
|
* Returns an IUserPool by looking up the Auth stack's User Pool ID from SSM.
|
|
@@ -6114,7 +6433,7 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6114
6433
|
ssmParamName: CognitoUserPool.SSM_PARAM_NAME,
|
|
6115
6434
|
serviceType: _OpenHiAuthService.SERVICE_TYPE
|
|
6116
6435
|
});
|
|
6117
|
-
return
|
|
6436
|
+
return import_aws_cognito4.UserPool.fromUserPoolId(scope, "user-pool", userPoolId);
|
|
6118
6437
|
}
|
|
6119
6438
|
/**
|
|
6120
6439
|
* Returns an IUserPoolClient by looking up the Auth stack's User Pool Client ID from SSM.
|
|
@@ -6127,33 +6446,12 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6127
6446
|
serviceType: _OpenHiAuthService.SERVICE_TYPE
|
|
6128
6447
|
}
|
|
6129
6448
|
);
|
|
6130
|
-
return
|
|
6449
|
+
return import_aws_cognito4.UserPoolClient.fromUserPoolClientId(
|
|
6131
6450
|
scope,
|
|
6132
6451
|
"user-pool-client",
|
|
6133
6452
|
userPoolClientId
|
|
6134
6453
|
);
|
|
6135
6454
|
}
|
|
6136
|
-
/**
|
|
6137
|
-
* Returns the dedicated fixture-seeder IUserPoolClient by looking up
|
|
6138
|
-
* its ID from SSM. Only non-prod auth stacks publish this parameter
|
|
6139
|
-
* (per the conditional in {@link createFixtureSeederClient}); calling
|
|
6140
|
-
* this against a prod-deployed stack will fail at lookup time.
|
|
6141
|
-
*
|
|
6142
|
-
* Consumed by `OpenHiRestApiService` (in non-prod) so the authorizer
|
|
6143
|
-
* accepts tokens issued by this client, and by the seed-fixtures CLI
|
|
6144
|
-
* to drive USER_PASSWORD_AUTH against this client's ID.
|
|
6145
|
-
*/
|
|
6146
|
-
static fixtureSeederClientFromConstruct(scope) {
|
|
6147
|
-
const clientId = DiscoverableStringParameter.valueForLookupName(scope, {
|
|
6148
|
-
ssmParamName: CognitoFixtureSeederClient.SSM_PARAM_NAME,
|
|
6149
|
-
serviceType: _OpenHiAuthService.SERVICE_TYPE
|
|
6150
|
-
});
|
|
6151
|
-
return import_aws_cognito5.UserPoolClient.fromUserPoolClientId(
|
|
6152
|
-
scope,
|
|
6153
|
-
"fixture-seeder-client",
|
|
6154
|
-
clientId
|
|
6155
|
-
);
|
|
6156
|
-
}
|
|
6157
6455
|
/**
|
|
6158
6456
|
* Returns an IUserPoolDomain by looking up the Auth stack's User Pool Domain from SSM.
|
|
6159
6457
|
*/
|
|
@@ -6162,7 +6460,7 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6162
6460
|
ssmParamName: CognitoUserPoolDomain.SSM_PARAM_NAME,
|
|
6163
6461
|
serviceType: _OpenHiAuthService.SERVICE_TYPE
|
|
6164
6462
|
});
|
|
6165
|
-
return
|
|
6463
|
+
return import_aws_cognito4.UserPoolDomain.fromDomainName(scope, "user-pool-domain", domainName);
|
|
6166
6464
|
}
|
|
6167
6465
|
/**
|
|
6168
6466
|
* Returns an IKey (KMS) by looking up the Auth stack's User Pool KMS Key ARN from SSM.
|
|
@@ -6252,16 +6550,16 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6252
6550
|
customSenderKmsKey: this.userPoolKmsKey
|
|
6253
6551
|
});
|
|
6254
6552
|
userPool.addTrigger(
|
|
6255
|
-
|
|
6553
|
+
import_aws_cognito4.UserPoolOperation.PRE_TOKEN_GENERATION_CONFIG,
|
|
6256
6554
|
this.preTokenGenerationLambda,
|
|
6257
|
-
|
|
6555
|
+
import_aws_cognito4.LambdaVersion.V2_0
|
|
6258
6556
|
);
|
|
6259
6557
|
userPool.addTrigger(
|
|
6260
|
-
|
|
6558
|
+
import_aws_cognito4.UserPoolOperation.POST_AUTHENTICATION,
|
|
6261
6559
|
this.postAuthenticationLambda
|
|
6262
6560
|
);
|
|
6263
6561
|
userPool.addTrigger(
|
|
6264
|
-
|
|
6562
|
+
import_aws_cognito4.UserPoolOperation.POST_CONFIRMATION,
|
|
6265
6563
|
this.postConfirmationLambda
|
|
6266
6564
|
);
|
|
6267
6565
|
new DiscoverableStringParameter(this, "user-pool-param", {
|
|
@@ -6342,31 +6640,6 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6342
6640
|
});
|
|
6343
6641
|
return client;
|
|
6344
6642
|
}
|
|
6345
|
-
/**
|
|
6346
|
-
* Creates the dedicated USER_PASSWORD_AUTH app client for the
|
|
6347
|
-
* `@openhi/seed-fixtures` CLI, **only** in non-prod environments.
|
|
6348
|
-
* Returns `undefined` when this stack is being deployed to a prod
|
|
6349
|
-
* stage so the prod auth stack carries no fixture-seeder code path.
|
|
6350
|
-
*
|
|
6351
|
-
* Operator post-deploy: create a `fixture-seeder` Cognito user with
|
|
6352
|
-
* a service password (manually via console or scripted with
|
|
6353
|
-
* `aws cognito-idp admin-create-user`); the CLI consumes those creds
|
|
6354
|
-
* via env vars to drive `InitiateAuth`.
|
|
6355
|
-
*/
|
|
6356
|
-
createFixtureSeederClient() {
|
|
6357
|
-
if (this.ohEnv.ohStage.stageType === import_config5.OPEN_HI_STAGE.PROD) {
|
|
6358
|
-
return void 0;
|
|
6359
|
-
}
|
|
6360
|
-
const client = new CognitoFixtureSeederClient(this, {
|
|
6361
|
-
userPool: this.userPool
|
|
6362
|
-
});
|
|
6363
|
-
new DiscoverableStringParameter(this, "fixture-seeder-client-param", {
|
|
6364
|
-
ssmParamName: CognitoFixtureSeederClient.SSM_PARAM_NAME,
|
|
6365
|
-
stringValue: client.userPoolClientId,
|
|
6366
|
-
description: "Cognito User Pool Client ID for the OpenHI fixture-seeder CLI (USER_PASSWORD_AUTH; non-prod only); cross-stack reference"
|
|
6367
|
-
});
|
|
6368
|
-
return client;
|
|
6369
|
-
}
|
|
6370
6643
|
/**
|
|
6371
6644
|
* Creates the User Pool Domain (Cognito hosted UI) and exports domain name to SSM.
|
|
6372
6645
|
* Look up via {@link OpenHiAuthService.userPoolDomainFromConstruct}.
|
|
@@ -6391,7 +6664,6 @@ _OpenHiAuthService.SERVICE_TYPE = "auth";
|
|
|
6391
6664
|
var OpenHiAuthService = _OpenHiAuthService;
|
|
6392
6665
|
|
|
6393
6666
|
// src/services/open-hi-rest-api-service.ts
|
|
6394
|
-
var import_config6 = __toESM(require_lib());
|
|
6395
6667
|
var import_aws_apigatewayv22 = require("aws-cdk-lib/aws-apigatewayv2");
|
|
6396
6668
|
var import_aws_apigatewayv2_authorizers = require("aws-cdk-lib/aws-apigatewayv2-authorizers");
|
|
6397
6669
|
var import_aws_apigatewayv2_integrations = require("aws-cdk-lib/aws-apigatewayv2-integrations");
|
|
@@ -6683,16 +6955,10 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
|
|
|
6683
6955
|
createRootHttpApi(domainName) {
|
|
6684
6956
|
const userPool = OpenHiAuthService.userPoolFromConstruct(this);
|
|
6685
6957
|
const userPoolClient = OpenHiAuthService.userPoolClientFromConstruct(this);
|
|
6686
|
-
const userPoolClients = [userPoolClient];
|
|
6687
|
-
if (this.ohEnv.ohStage.stageType !== import_config6.OPEN_HI_STAGE.PROD) {
|
|
6688
|
-
userPoolClients.push(
|
|
6689
|
-
OpenHiAuthService.fixtureSeederClientFromConstruct(this)
|
|
6690
|
-
);
|
|
6691
|
-
}
|
|
6692
6958
|
const cognitoAuthorizer = new import_aws_apigatewayv2_authorizers.HttpUserPoolAuthorizer(
|
|
6693
6959
|
"cognito-authorizer",
|
|
6694
6960
|
userPool,
|
|
6695
|
-
{ userPoolClients }
|
|
6961
|
+
{ userPoolClients: [userPoolClient] }
|
|
6696
6962
|
);
|
|
6697
6963
|
const { corsPreflight: cors, ...restRootHttpApiProps } = this.props.rootHttpApiProps ?? {};
|
|
6698
6964
|
const corsPreflight = cors !== void 0 ? {
|
|
@@ -6783,7 +7049,7 @@ var OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR = "OWNING_DELETE_OPS_EVENT_BUS_NAME";
|
|
|
6783
7049
|
// src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-lambdas.ts
|
|
6784
7050
|
var import_node_fs12 = __toESM(require("fs"));
|
|
6785
7051
|
var import_node_path12 = __toESM(require("path"));
|
|
6786
|
-
var
|
|
7052
|
+
var import_aws_cdk_lib14 = require("aws-cdk-lib");
|
|
6787
7053
|
var import_aws_iam8 = require("aws-cdk-lib/aws-iam");
|
|
6788
7054
|
var import_aws_lambda12 = require("aws-cdk-lib/aws-lambda");
|
|
6789
7055
|
var import_aws_lambda_nodejs12 = require("aws-cdk-lib/aws-lambda-nodejs");
|
|
@@ -6807,7 +7073,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs19.Construct {
|
|
|
6807
7073
|
entry: listResolved.entry,
|
|
6808
7074
|
runtime: import_aws_lambda12.Runtime.NODEJS_LATEST,
|
|
6809
7075
|
memorySize: 512,
|
|
6810
|
-
timeout:
|
|
7076
|
+
timeout: import_aws_cdk_lib14.Duration.minutes(1),
|
|
6811
7077
|
environment: {
|
|
6812
7078
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
6813
7079
|
}
|
|
@@ -6821,7 +7087,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs19.Construct {
|
|
|
6821
7087
|
entry: deleteResolved.entry,
|
|
6822
7088
|
runtime: import_aws_lambda12.Runtime.NODEJS_LATEST,
|
|
6823
7089
|
memorySize: 512,
|
|
6824
|
-
timeout:
|
|
7090
|
+
timeout: import_aws_cdk_lib14.Duration.minutes(1),
|
|
6825
7091
|
environment: {
|
|
6826
7092
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
6827
7093
|
}
|
|
@@ -6840,7 +7106,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs19.Construct {
|
|
|
6840
7106
|
entry: finalizeResolved.entry,
|
|
6841
7107
|
runtime: import_aws_lambda12.Runtime.NODEJS_LATEST,
|
|
6842
7108
|
memorySize: 512,
|
|
6843
|
-
timeout:
|
|
7109
|
+
timeout: import_aws_cdk_lib14.Duration.minutes(1),
|
|
6844
7110
|
environment: {
|
|
6845
7111
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
6846
7112
|
[OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
|
|
@@ -6858,7 +7124,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs19.Construct {
|
|
|
6858
7124
|
};
|
|
6859
7125
|
|
|
6860
7126
|
// src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-workflow.ts
|
|
6861
|
-
var
|
|
7127
|
+
var import_aws_cdk_lib15 = require("aws-cdk-lib");
|
|
6862
7128
|
var import_aws_events9 = require("aws-cdk-lib/aws-events");
|
|
6863
7129
|
var import_aws_events_targets5 = require("aws-cdk-lib/aws-events-targets");
|
|
6864
7130
|
var import_aws_stepfunctions = require("aws-cdk-lib/aws-stepfunctions");
|
|
@@ -6973,7 +7239,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs20.Construct {
|
|
|
6973
7239
|
}
|
|
6974
7240
|
});
|
|
6975
7241
|
const interPageWait = new import_aws_stepfunctions.Wait(this, "inter-page-wait", {
|
|
6976
|
-
time: import_aws_stepfunctions.WaitTime.duration(
|
|
7242
|
+
time: import_aws_stepfunctions.WaitTime.duration(import_aws_cdk_lib15.Duration.seconds(0))
|
|
6977
7243
|
});
|
|
6978
7244
|
const isExhausted = new import_aws_stepfunctions.Choice(this, "is-exhausted");
|
|
6979
7245
|
const finalize = new import_aws_stepfunctions_tasks.LambdaInvoke(this, "finalize", {
|
|
@@ -7004,7 +7270,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs20.Construct {
|
|
|
7004
7270
|
// Long timeout because real-world cascades can run minutes when
|
|
7005
7271
|
// a workspace has thousands of members. The stuck-cascade alarm
|
|
7006
7272
|
// fires at 15 minutes; the state machine itself does not abort.
|
|
7007
|
-
timeout:
|
|
7273
|
+
timeout: import_aws_cdk_lib15.Duration.hours(2)
|
|
7008
7274
|
});
|
|
7009
7275
|
this.rule = new import_aws_events9.Rule(this, "rule", {
|
|
7010
7276
|
eventBus: props.dataEventBus,
|
|
@@ -7015,7 +7281,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs20.Construct {
|
|
|
7015
7281
|
targets: [
|
|
7016
7282
|
new import_aws_events_targets5.SfnStateMachine(this.stateMachine, {
|
|
7017
7283
|
retryAttempts: 2,
|
|
7018
|
-
maxEventAge:
|
|
7284
|
+
maxEventAge: import_aws_cdk_lib15.Duration.hours(2)
|
|
7019
7285
|
})
|
|
7020
7286
|
]
|
|
7021
7287
|
});
|
|
@@ -7033,7 +7299,7 @@ var RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR = "RENAME_CASCADE_OPS_EVENT_BUS_NAME";
|
|
|
7033
7299
|
// src/workflows/control-plane/rename-cascade/rename-cascade-lambdas.ts
|
|
7034
7300
|
var import_node_fs13 = __toESM(require("fs"));
|
|
7035
7301
|
var import_node_path13 = __toESM(require("path"));
|
|
7036
|
-
var
|
|
7302
|
+
var import_aws_cdk_lib16 = require("aws-cdk-lib");
|
|
7037
7303
|
var import_aws_iam9 = require("aws-cdk-lib/aws-iam");
|
|
7038
7304
|
var import_aws_lambda13 = require("aws-cdk-lib/aws-lambda");
|
|
7039
7305
|
var import_aws_lambda_nodejs13 = require("aws-cdk-lib/aws-lambda-nodejs");
|
|
@@ -7057,7 +7323,7 @@ var RenameCascadeLambdas = class extends import_constructs21.Construct {
|
|
|
7057
7323
|
entry: listResolved.entry,
|
|
7058
7324
|
runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
|
|
7059
7325
|
memorySize: 512,
|
|
7060
|
-
timeout:
|
|
7326
|
+
timeout: import_aws_cdk_lib16.Duration.minutes(1),
|
|
7061
7327
|
environment: {
|
|
7062
7328
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
7063
7329
|
}
|
|
@@ -7071,7 +7337,7 @@ var RenameCascadeLambdas = class extends import_constructs21.Construct {
|
|
|
7071
7337
|
entry: rewriteResolved.entry,
|
|
7072
7338
|
runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
|
|
7073
7339
|
memorySize: 512,
|
|
7074
|
-
timeout:
|
|
7340
|
+
timeout: import_aws_cdk_lib16.Duration.minutes(1),
|
|
7075
7341
|
environment: {
|
|
7076
7342
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
7077
7343
|
}
|
|
@@ -7090,7 +7356,7 @@ var RenameCascadeLambdas = class extends import_constructs21.Construct {
|
|
|
7090
7356
|
entry: finalizeResolved.entry,
|
|
7091
7357
|
runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
|
|
7092
7358
|
memorySize: 512,
|
|
7093
|
-
timeout:
|
|
7359
|
+
timeout: import_aws_cdk_lib16.Duration.minutes(1),
|
|
7094
7360
|
environment: {
|
|
7095
7361
|
[RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
|
|
7096
7362
|
}
|
|
@@ -7106,7 +7372,7 @@ var RenameCascadeLambdas = class extends import_constructs21.Construct {
|
|
|
7106
7372
|
};
|
|
7107
7373
|
|
|
7108
7374
|
// src/workflows/control-plane/rename-cascade/rename-cascade-workflow.ts
|
|
7109
|
-
var
|
|
7375
|
+
var import_aws_cdk_lib17 = require("aws-cdk-lib");
|
|
7110
7376
|
var import_aws_events10 = require("aws-cdk-lib/aws-events");
|
|
7111
7377
|
var import_aws_events_targets6 = require("aws-cdk-lib/aws-events-targets");
|
|
7112
7378
|
var import_aws_stepfunctions2 = require("aws-cdk-lib/aws-stepfunctions");
|
|
@@ -7256,7 +7522,7 @@ var RenameCascadeWorkflow = class extends import_constructs22.Construct {
|
|
|
7256
7522
|
// Long timeout — large renames may rewrite thousands of rows;
|
|
7257
7523
|
// the `CascadeSlow` alarm fires at 300s p99 but the state
|
|
7258
7524
|
// machine itself does not abort.
|
|
7259
|
-
timeout:
|
|
7525
|
+
timeout: import_aws_cdk_lib17.Duration.hours(2)
|
|
7260
7526
|
});
|
|
7261
7527
|
this.rule = new import_aws_events10.Rule(this, "rule", {
|
|
7262
7528
|
eventBus: props.dataEventBus,
|
|
@@ -7267,7 +7533,7 @@ var RenameCascadeWorkflow = class extends import_constructs22.Construct {
|
|
|
7267
7533
|
targets: [
|
|
7268
7534
|
new import_aws_events_targets6.SfnStateMachine(this.stateMachine, {
|
|
7269
7535
|
retryAttempts: 2,
|
|
7270
|
-
maxEventAge:
|
|
7536
|
+
maxEventAge: import_aws_cdk_lib17.Duration.hours(2)
|
|
7271
7537
|
})
|
|
7272
7538
|
]
|
|
7273
7539
|
});
|
|
@@ -7280,7 +7546,6 @@ var RenameCascadeWorkflow = class extends import_constructs22.Construct {
|
|
|
7280
7546
|
CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE,
|
|
7281
7547
|
CONTROL_EVENT_BUS_NAME_ENV_VAR,
|
|
7282
7548
|
ChildHostedZone,
|
|
7283
|
-
CognitoFixtureSeederClient,
|
|
7284
7549
|
CognitoUserPool,
|
|
7285
7550
|
CognitoUserPoolClient,
|
|
7286
7551
|
CognitoUserPoolDomain,
|
|
@@ -7295,6 +7560,7 @@ var RenameCascadeWorkflow = class extends import_constructs22.Construct {
|
|
|
7295
7560
|
DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES,
|
|
7296
7561
|
DATA_STORE_CHANGE_DETAIL_TYPE,
|
|
7297
7562
|
DATA_STORE_CHANGE_EVENT_SOURCE,
|
|
7563
|
+
DEMO_DATA_PLANE_FIXTURES,
|
|
7298
7564
|
DEMO_PERIOD,
|
|
7299
7565
|
DEMO_TENANT_SPECS,
|
|
7300
7566
|
DEMO_URN_SYSTEM,
|
|
@@ -7373,22 +7639,14 @@ var RenameCascadeWorkflow = class extends import_constructs22.Construct {
|
|
|
7373
7639
|
WorkflowDedupTableDuplicateError,
|
|
7374
7640
|
buildFhirCurrentResourceChangeDetail,
|
|
7375
7641
|
buildProvisionDefaultWorkspaceRequestedDetail,
|
|
7376
|
-
demoBasePartitionKeys,
|
|
7377
|
-
demoDevUserPartitionKeys,
|
|
7378
7642
|
demoMembershipId,
|
|
7379
|
-
demoMembershipPartitionKey,
|
|
7380
7643
|
demoRoleAssignmentId,
|
|
7381
|
-
demoRoleAssignmentPartitionKey,
|
|
7382
7644
|
demoRolesForUserInTenant,
|
|
7383
7645
|
demoScenarioIdentifier,
|
|
7384
|
-
demoTenantPartitionKey,
|
|
7385
|
-
demoUserPartitionKey,
|
|
7386
|
-
demoWorkspacePartitionKey,
|
|
7387
7646
|
getDynamoDbDataStoreTableName,
|
|
7388
7647
|
getPostgresReplicaSchemaName,
|
|
7389
7648
|
getWorkflowDedupTableName,
|
|
7390
7649
|
openHiTagKey,
|
|
7391
|
-
openhiResourceIdentifier
|
|
7392
|
-
rolePartitionKey
|
|
7650
|
+
openhiResourceIdentifier
|
|
7393
7651
|
});
|
|
7394
7652
|
//# sourceMappingURL=index.js.map
|