@openhi/constructs 0.0.169 → 0.0.170

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 (51) hide show
  1. package/lib/{chunk-DWSWCUZR.mjs → chunk-6HGSR3TG.mjs} +2 -2
  2. package/lib/chunk-APVVG7BO.mjs +61 -0
  3. package/lib/chunk-APVVG7BO.mjs.map +1 -0
  4. package/lib/{chunk-ZODGX37H.mjs → chunk-E2OWEBBH.mjs} +3 -3
  5. package/lib/{chunk-GJTPXJKD.mjs → chunk-EBB4RNUG.mjs} +2 -2
  6. package/lib/{chunk-O5VQWB6U.mjs → chunk-FDBBTNCI.mjs} +5 -61
  7. package/lib/chunk-FDBBTNCI.mjs.map +1 -0
  8. package/lib/{chunk-P3CTZWC2.mjs → chunk-GG2WD6TA.mjs} +2 -2
  9. package/lib/{chunk-Q64MOYJ7.mjs → chunk-JUSVETWK.mjs} +3 -3
  10. package/lib/{chunk-KA3OMP3X.mjs → chunk-USNOOCSZ.mjs} +9 -3
  11. package/lib/chunk-USNOOCSZ.mjs.map +1 -0
  12. package/lib/{chunk-2O3CXY2C.mjs → chunk-XJ5SRUGN.mjs} +2 -2
  13. package/lib/{chunk-2O3CXY2C.mjs.map → chunk-XJ5SRUGN.mjs.map} +1 -1
  14. package/lib/{chunk-P3NFCKTZ.mjs → chunk-XNUCKVSE.mjs} +2 -2
  15. package/lib/{chunk-WFTDH2NM.mjs → chunk-Y4RGUAM2.mjs} +2 -2
  16. package/lib/{chunk-XHG4SODS.mjs → chunk-Z4PZSLYY.mjs} +2 -2
  17. package/lib/counter-reconciliation.handler.mjs +5 -4
  18. package/lib/counter-reconciliation.handler.mjs.map +1 -1
  19. package/lib/data-store-postgres-replication.handler.js +42 -4
  20. package/lib/data-store-postgres-replication.handler.js.map +1 -1
  21. package/lib/data-store-postgres-replication.handler.mjs +9 -4
  22. package/lib/data-store-postgres-replication.handler.mjs.map +1 -1
  23. package/lib/firehose-archive-transform.handler.d.mts +2 -1
  24. package/lib/firehose-archive-transform.handler.d.ts +2 -1
  25. package/lib/firehose-archive-transform.handler.js +42 -2
  26. package/lib/firehose-archive-transform.handler.js.map +1 -1
  27. package/lib/firehose-archive-transform.handler.mjs +4 -1
  28. package/lib/index.js +21 -2
  29. package/lib/index.js.map +1 -1
  30. package/lib/index.mjs +26 -6
  31. package/lib/index.mjs.map +1 -1
  32. package/lib/pre-token-generation.handler.mjs +6 -5
  33. package/lib/pre-token-generation.handler.mjs.map +1 -1
  34. package/lib/provision-default-workspace.handler.mjs +5 -4
  35. package/lib/provision-default-workspace.handler.mjs.map +1 -1
  36. package/lib/rest-api-lambda.handler.js +1 -1
  37. package/lib/rest-api-lambda.handler.js.map +1 -1
  38. package/lib/rest-api-lambda.handler.mjs +14 -12
  39. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  40. package/lib/seed-demo-data.handler.mjs +5 -4
  41. package/package.json +1 -1
  42. package/lib/chunk-KA3OMP3X.mjs.map +0 -1
  43. package/lib/chunk-O5VQWB6U.mjs.map +0 -1
  44. /package/lib/{chunk-DWSWCUZR.mjs.map → chunk-6HGSR3TG.mjs.map} +0 -0
  45. /package/lib/{chunk-ZODGX37H.mjs.map → chunk-E2OWEBBH.mjs.map} +0 -0
  46. /package/lib/{chunk-GJTPXJKD.mjs.map → chunk-EBB4RNUG.mjs.map} +0 -0
  47. /package/lib/{chunk-P3CTZWC2.mjs.map → chunk-GG2WD6TA.mjs.map} +0 -0
  48. /package/lib/{chunk-Q64MOYJ7.mjs.map → chunk-JUSVETWK.mjs.map} +0 -0
  49. /package/lib/{chunk-P3NFCKTZ.mjs.map → chunk-XNUCKVSE.mjs.map} +0 -0
  50. /package/lib/{chunk-WFTDH2NM.mjs.map → chunk-Y4RGUAM2.mjs.map} +0 -0
  51. /package/lib/{chunk-XHG4SODS.mjs.map → chunk-Z4PZSLYY.mjs.map} +0 -0
package/lib/index.js CHANGED
@@ -1743,7 +1743,8 @@ var PostAuthenticationLambda = class extends import_constructs.Construct {
1743
1743
  this.lambda = new import_aws_lambda_nodejs.NodejsFunction(this, "handler", {
1744
1744
  entry: resolveHandlerEntry(__dirname),
1745
1745
  runtime: import_aws_lambda.Runtime.NODEJS_LATEST,
1746
- memorySize: 1024
1746
+ memorySize: 1024,
1747
+ description: "Cognito Post Authentication trigger. Invalidates other active sessions for the signing-in user via `AdminUserGlobalSignOut` to enforce single-session login."
1747
1748
  });
1748
1749
  }
1749
1750
  };
@@ -1769,6 +1770,7 @@ var PostConfirmationLambda = class extends import_constructs2.Construct {
1769
1770
  entry: resolveHandlerEntry2(__dirname),
1770
1771
  runtime: import_aws_lambda2.Runtime.NODEJS_LATEST,
1771
1772
  memorySize: 1024,
1773
+ description: "Cognito Post Confirmation trigger. Publishes the user-onboarding start event onto the control bus and returns \u2014 workflow Lambdas own provisioning.",
1772
1774
  environment: {
1773
1775
  CONTROL_EVENT_BUS_NAME: props.controlEventBusName
1774
1776
  }
@@ -1798,6 +1800,7 @@ var PreTokenGenerationLambda = class extends import_constructs3.Construct {
1798
1800
  entry: resolveHandlerEntry3(__dirname),
1799
1801
  runtime: import_aws_lambda3.Runtime.NODEJS_LATEST,
1800
1802
  memorySize: 1024,
1803
+ description: "Cognito Pre Token Generation trigger. Resolves the OpenHI User from Cognito `sub` and injects `ohi_tid` / `ohi_wid` / `ohi_uid` / `ohi_uname` claims into the ID + access tokens (ADR 2026-03-17-01).",
1801
1804
  environment: {
1802
1805
  DYNAMO_TABLE_NAME: props.dynamoTableName
1803
1806
  }
@@ -2653,6 +2656,7 @@ var _StaticHosting = class _StaticHosting extends import_constructs8.Construct {
2653
2656
  handler: hostingMode === "static" ? "staticHandler" : "spaHandler",
2654
2657
  memorySize: 128,
2655
2658
  runtime: import_aws_lambda6.Runtime.NODEJS_LATEST,
2659
+ description: `CloudFront Lambda@Edge viewer-request handler for static hosting (${hostingMode} mode). Rewrites the incoming URI (SPA fallback to /index.html or /<path>/index.html synthesis) before the origin lookup.`,
2656
2660
  logGroup: new import_aws_logs.LogGroup(this, "viewer-request-handler-log-group", {
2657
2661
  retention: import_aws_logs.RetentionDays.ONE_MONTH
2658
2662
  })
@@ -2847,6 +2851,7 @@ var _StaticHosting = class _StaticHosting extends import_constructs8.Construct {
2847
2851
  handler: "originRequestHandler",
2848
2852
  memorySize: 128,
2849
2853
  runtime: import_aws_lambda6.Runtime.NODEJS_LATEST,
2854
+ description: "CloudFront Lambda@Edge origin-request handler for static hosting. Routes requests between the viewer (static-hosting) origin and the API origin based on the configured host prefixes (inlined at synth time via esbuild `define`).",
2850
2855
  logGroup: new import_aws_logs.LogGroup(this, "origin-request-handler-log-group", {
2851
2856
  retention: import_aws_logs.RetentionDays.ONE_MONTH
2852
2857
  }),
@@ -3070,6 +3075,7 @@ var PlatformDeployBridgeLambda = class extends import_constructs11.Construct {
3070
3075
  runtime: import_aws_lambda7.Runtime.NODEJS_LATEST,
3071
3076
  memorySize: 256,
3072
3077
  timeout: import_aws_cdk_lib12.Duration.seconds(30),
3078
+ description: "Bridges CloudFormation Stack Status Change events from the default AWS bus into typed `platform.deployment-completed.v1` envelopes on the OpenHI control bus. Scoped by stack-id prefix to this branch's stacks.",
3073
3079
  environment: {
3074
3080
  [CONTROL_EVENT_BUS_NAME_ENV_VAR]: props.controlEventBus.eventBusName,
3075
3081
  [OPENHI_REPO_TAG_KEY_ENV_VAR]: repoTagKey,
@@ -3337,6 +3343,7 @@ var CounterMaintenanceLambda = class extends import_constructs13.Construct {
3337
3343
  runtime: import_aws_lambda8.Runtime.NODEJS_LATEST,
3338
3344
  memorySize: 256,
3339
3345
  timeout: import_aws_cdk_lib13.Duration.minutes(1),
3346
+ description: "Event-driven consumer that applies atomic counter ADDs to Tenant/Workspace/User canonical rows on Membership / RoleAssignment / Workspace lifecycle events (ADR-028).",
3340
3347
  environment: {
3341
3348
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
3342
3349
  }
@@ -3401,6 +3408,7 @@ var CounterReconciliationLambda = class extends import_constructs15.Construct {
3401
3408
  // heavier than the single-event counter-maintenance consumer, so
3402
3409
  // the on-demand job gets a longer ceiling.
3403
3410
  timeout: import_aws_cdk_lib14.Duration.minutes(15),
3411
+ description: "On-demand sweep that recomputes and repairs Tenant/Workspace/User membership counters in DynamoDB (ADR-028). Invoked manually or by an external schedule \u2014 no EventBridge trigger.",
3404
3412
  environment: {
3405
3413
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
3406
3414
  }
@@ -10410,6 +10418,7 @@ var SeedDemoDataLambda = class extends import_constructs17.Construct {
10410
10418
  runtime: import_aws_lambda10.Runtime.NODEJS_LATEST,
10411
10419
  memorySize: 512,
10412
10420
  timeout: import_aws_cdk_lib15.Duration.minutes(2),
10421
+ description: "Seeds demo Tenants, Workspaces, Users, Memberships, and RoleAssignments into DynamoDB and provisions Cognito dev users. Triggered by `platform.system-data-seeded.v1` on the control bus. Non-prod stages only.",
10413
10422
  environment: {
10414
10423
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
10415
10424
  [SEED_DEMO_DATA_USER_POOL_ID_ENV_VAR]: props.userPool.userPoolId
@@ -10539,6 +10548,7 @@ var SeedSystemDataLambda = class extends import_constructs19.Construct {
10539
10548
  runtime: import_aws_lambda11.Runtime.NODEJS_LATEST,
10540
10549
  memorySize: 512,
10541
10550
  timeout: import_aws_cdk_lib16.Duration.minutes(1),
10551
+ description: "Seeds platform-singleton control-plane records (Roles) into DynamoDB after the host stack's deployment completes. Emits `platform.system-data-seeded.v1` on the control bus when done.",
10542
10552
  environment: {
10543
10553
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
10544
10554
  [SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR]: props.controlEventBus.eventBusName
@@ -10773,7 +10783,8 @@ var CorsOptionsLambda = class extends import_constructs21.Construct {
10773
10783
  this.lambda = new import_aws_lambda_nodejs12.NodejsFunction(this, "handler", {
10774
10784
  entry: resolveHandlerEntry11(__dirname),
10775
10785
  runtime: import_aws_lambda12.Runtime.NODEJS_LATEST,
10776
- memorySize: 128
10786
+ memorySize: 128,
10787
+ description: "CORS preflight (OPTIONS) handler. Returns 204 so API Gateway can attach CORS response headers from the API's corsPreflight config."
10777
10788
  });
10778
10789
  }
10779
10790
  };
@@ -10800,6 +10811,7 @@ var RestApiLambda = class extends import_constructs22.Construct {
10800
10811
  entry: resolveHandlerEntry12(__dirname),
10801
10812
  runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
10802
10813
  memorySize: 1024,
10814
+ description: "OpenHI REST API handler. Serves every FHIR resource route and the control-plane data operations behind the HTTP API; reads DynamoDB and the Postgres replication tier and publishes control events for membership / role changes (ADR-028).",
10803
10815
  environment: {
10804
10816
  DYNAMO_TABLE_NAME: props.dynamoTableName,
10805
10817
  BRANCH_TAG_VALUE: props.branchTagValue,
@@ -11609,6 +11621,7 @@ var ProvisionDefaultWorkspaceLambda = class extends import_constructs24.Construc
11609
11621
  entry: resolveHandlerEntry13(__dirname),
11610
11622
  runtime: import_aws_lambda14.Runtime.NODEJS_LATEST,
11611
11623
  memorySize: 1024,
11624
+ description: "User-onboarding worker that creates a new user's default Tenant, Workspace, Memberships, and RoleAssignment in DynamoDB on the `provision-default-workspace` event.",
11612
11625
  environment: {
11613
11626
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
11614
11627
  }
@@ -12098,6 +12111,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs26.Construct {
12098
12111
  runtime: import_aws_lambda15.Runtime.NODEJS_LATEST,
12099
12112
  memorySize: 512,
12100
12113
  timeout: import_aws_cdk_lib19.Duration.minutes(1),
12114
+ description: "TR-022 owning-entity delete cascade: pages the owner's adjacency-list partition and splits each page into <=100-item chunks for the inline Map state.",
12101
12115
  environment: {
12102
12116
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
12103
12117
  }
@@ -12112,6 +12126,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs26.Construct {
12112
12126
  runtime: import_aws_lambda15.Runtime.NODEJS_LATEST,
12113
12127
  memorySize: 512,
12114
12128
  timeout: import_aws_cdk_lib19.Duration.minutes(1),
12129
+ description: "TR-022 owning-entity delete cascade: Map iteration handler. Deletes one chunk of owned items via a single TransactWriteItems.",
12115
12130
  environment: {
12116
12131
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
12117
12132
  }
@@ -12131,6 +12146,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs26.Construct {
12131
12146
  runtime: import_aws_lambda15.Runtime.NODEJS_LATEST,
12132
12147
  memorySize: 512,
12133
12148
  timeout: import_aws_cdk_lib19.Duration.minutes(1),
12149
+ description: "TR-022 owning-entity delete cascade: terminal step. Conditionally deletes the owning canonical record and emits `control-plane.owning-delete-complete.v1` on the ops bus.",
12134
12150
  environment: {
12135
12151
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
12136
12152
  [OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
@@ -12348,6 +12364,7 @@ var RenameCascadeLambdas = class extends import_constructs28.Construct {
12348
12364
  runtime: import_aws_lambda16.Runtime.NODEJS_LATEST,
12349
12365
  memorySize: 512,
12350
12366
  timeout: import_aws_cdk_lib21.Duration.minutes(1),
12367
+ description: "TR-023 rename cascade: pages affected projection partitions and emits chunks of up to 50 rewrite targets for the state machine's Distributed Map.",
12351
12368
  environment: {
12352
12369
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
12353
12370
  }
@@ -12362,6 +12379,7 @@ var RenameCascadeLambdas = class extends import_constructs28.Construct {
12362
12379
  runtime: import_aws_lambda16.Runtime.NODEJS_LATEST,
12363
12380
  memorySize: 512,
12364
12381
  timeout: import_aws_cdk_lib21.Duration.minutes(1),
12382
+ description: "TR-023 rename cascade: Distributed-Map iteration handler. Rewrites one chunk of projection rows via a single TransactWriteItems.",
12365
12383
  environment: {
12366
12384
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
12367
12385
  }
@@ -12381,6 +12399,7 @@ var RenameCascadeLambdas = class extends import_constructs28.Construct {
12381
12399
  runtime: import_aws_lambda16.Runtime.NODEJS_LATEST,
12382
12400
  memorySize: 512,
12383
12401
  timeout: import_aws_cdk_lib21.Duration.minutes(1),
12402
+ description: "TR-023 rename cascade: terminal step. Emits `control-plane.rename-complete.v1` on the ops event bus once all chunks have been rewritten.",
12384
12403
  environment: {
12385
12404
  [RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
12386
12405
  }