@openhi/constructs 0.0.104 → 0.0.106

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 (83) hide show
  1. package/README.md +14 -0
  2. package/lib/chunk-2PM2NGXI.mjs +31 -0
  3. package/lib/chunk-2PM2NGXI.mjs.map +1 -0
  4. package/lib/chunk-AGF3RAAZ.mjs +20 -0
  5. package/lib/chunk-AGF3RAAZ.mjs.map +1 -0
  6. package/lib/chunk-AO3E22CS.mjs +108 -0
  7. package/lib/chunk-AO3E22CS.mjs.map +1 -0
  8. package/lib/chunk-CHPEQRXU.mjs +45 -0
  9. package/lib/chunk-CHPEQRXU.mjs.map +1 -0
  10. package/lib/chunk-JUNL76HF.mjs +428 -0
  11. package/lib/chunk-JUNL76HF.mjs.map +1 -0
  12. package/lib/chunk-L6UAP4KP.mjs +27 -0
  13. package/lib/chunk-L6UAP4KP.mjs.map +1 -0
  14. package/lib/{chunk-3QS3WKRC.mjs → chunk-LZOMFHX3.mjs} +9 -2
  15. package/lib/chunk-QMIOLLAS.mjs +531 -0
  16. package/lib/chunk-QMIOLLAS.mjs.map +1 -0
  17. package/lib/chunk-SYBADQXI.mjs +607 -0
  18. package/lib/chunk-SYBADQXI.mjs.map +1 -0
  19. package/lib/chunk-VXX4I3EF.mjs +19 -0
  20. package/lib/chunk-VXX4I3EF.mjs.map +1 -0
  21. package/lib/{chunk-MLTYFMSE.mjs → chunk-VYDIGFIX.mjs} +74 -29
  22. package/lib/chunk-VYDIGFIX.mjs.map +1 -0
  23. package/lib/chunk-YU2HRNUP.mjs +33 -0
  24. package/lib/chunk-YU2HRNUP.mjs.map +1 -0
  25. package/lib/chunk-YZZDUJHI.mjs +37 -0
  26. package/lib/chunk-YZZDUJHI.mjs.map +1 -0
  27. package/lib/cors-options-lambda.handler.mjs +1 -1
  28. package/lib/data-store-postgres-replication.handler.mjs +1 -1
  29. package/lib/events-BfrkMoBD.d.mts +44 -0
  30. package/lib/events-BfrkMoBD.d.ts +44 -0
  31. package/lib/events-CVA3_eEB.d.mts +23 -0
  32. package/lib/events-CVA3_eEB.d.ts +23 -0
  33. package/lib/events-DGep6C7w.d.mts +207 -0
  34. package/lib/events-DGep6C7w.d.ts +207 -0
  35. package/lib/firehose-archive-transform.handler.mjs +1 -1
  36. package/lib/index.d.mts +508 -29
  37. package/lib/index.d.ts +773 -30
  38. package/lib/index.js +2536 -105
  39. package/lib/index.js.map +1 -1
  40. package/lib/index.mjs +899 -106
  41. package/lib/index.mjs.map +1 -1
  42. package/lib/openhi-context-CaBH8SFo.d.mts +39 -0
  43. package/lib/openhi-context-CaBH8SFo.d.ts +39 -0
  44. package/lib/platform-deploy-bridge.handler.d.mts +14 -0
  45. package/lib/platform-deploy-bridge.handler.d.ts +14 -0
  46. package/lib/platform-deploy-bridge.handler.js +762 -0
  47. package/lib/platform-deploy-bridge.handler.js.map +1 -0
  48. package/lib/platform-deploy-bridge.handler.mjs +134 -0
  49. package/lib/platform-deploy-bridge.handler.mjs.map +1 -0
  50. package/lib/post-authentication.handler.mjs +1 -1
  51. package/lib/post-confirmation.handler.js +50 -904
  52. package/lib/post-confirmation.handler.js.map +1 -1
  53. package/lib/post-confirmation.handler.mjs +37 -112
  54. package/lib/post-confirmation.handler.mjs.map +1 -1
  55. package/lib/pre-token-generation.handler.js +135 -55
  56. package/lib/pre-token-generation.handler.js.map +1 -1
  57. package/lib/pre-token-generation.handler.mjs +25 -32
  58. package/lib/pre-token-generation.handler.mjs.map +1 -1
  59. package/lib/provision-default-workspace.handler.d.mts +13 -0
  60. package/lib/provision-default-workspace.handler.d.ts +13 -0
  61. package/lib/provision-default-workspace.handler.js +1172 -0
  62. package/lib/provision-default-workspace.handler.js.map +1 -0
  63. package/lib/provision-default-workspace.handler.mjs +175 -0
  64. package/lib/provision-default-workspace.handler.mjs.map +1 -0
  65. package/lib/rest-api-lambda.handler.js +114 -59
  66. package/lib/rest-api-lambda.handler.js.map +1 -1
  67. package/lib/rest-api-lambda.handler.mjs +60 -587
  68. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  69. package/lib/seed-demo-data.handler.d.mts +107 -0
  70. package/lib/seed-demo-data.handler.d.ts +107 -0
  71. package/lib/seed-demo-data.handler.js +2037 -0
  72. package/lib/seed-demo-data.handler.js.map +1 -0
  73. package/lib/seed-demo-data.handler.mjs +23 -0
  74. package/lib/seed-demo-data.handler.mjs.map +1 -0
  75. package/lib/seed-system-data.handler.d.mts +64 -0
  76. package/lib/seed-system-data.handler.d.ts +64 -0
  77. package/lib/seed-system-data.handler.js +1631 -0
  78. package/lib/seed-system-data.handler.js.map +1 -0
  79. package/lib/seed-system-data.handler.mjs +135 -0
  80. package/lib/seed-system-data.handler.mjs.map +1 -0
  81. package/package.json +4 -2
  82. package/lib/chunk-MLTYFMSE.mjs.map +0 -1
  83. /package/lib/{chunk-3QS3WKRC.mjs.map → chunk-LZOMFHX3.mjs.map} +0 -0
package/lib/index.d.mts CHANGED
@@ -9,19 +9,25 @@ import { Key, KeyProps, IKey } from 'aws-cdk-lib/aws-kms';
9
9
  import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
10
10
  import { D as DynamoDbStreamKinesisRecord } from './dynamodb-stream-record-CJtV6a1t.mjs';
11
11
  import * as events from 'aws-cdk-lib/aws-events';
12
- import { EventBus, EventBusProps, IEventBus } from 'aws-cdk-lib/aws-events';
12
+ import { EventBus, EventBusProps, Rule, IEventBus } from 'aws-cdk-lib/aws-events';
13
13
  import * as kinesis from 'aws-cdk-lib/aws-kinesis';
14
14
  import * as kinesisfirehose from 'aws-cdk-lib/aws-kinesisfirehose';
15
15
  import * as s3 from 'aws-cdk-lib/aws-s3';
16
16
  import { IBucket, BucketProps } from 'aws-cdk-lib/aws-s3';
17
17
  import { Table, TableProps, ITable } from 'aws-cdk-lib/aws-dynamodb';
18
+ import { Function, IFunction } from 'aws-cdk-lib/aws-lambda';
18
19
  import * as ec2 from 'aws-cdk-lib/aws-ec2';
19
20
  import * as rds from 'aws-cdk-lib/aws-rds';
20
21
  import { HostedZone, HostedZoneProps, IHostedZone, HostedZoneAttributes } from 'aws-cdk-lib/aws-route53';
21
22
  import { StringParameterProps, StringParameter } from 'aws-cdk-lib/aws-ssm';
22
23
  import { Distribution, DistributionProps } from 'aws-cdk-lib/aws-cloudfront';
23
- import { IFunction } from 'aws-cdk-lib/aws-lambda';
24
+ export { B as BRIDGED_STATUSES, a as BridgedStatus, C as CLOUDFORMATION_EVENT_SOURCE, b as CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, c as CONTROL_EVENT_BUS_NAME_ENV_VAR, d as CloudFormationStackStatusChangeDetail, O as OPENHI_REPO_TAG_KEY_ENV_VAR, e as OPENHI_TAG_KEY_PREFIX_ENV_VAR, P as PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM } from './events-BfrkMoBD.mjs';
25
+ export { D as DEMO_PERIOD, a as DEMO_TENANT_SPECS, b as DEMO_URN_SYSTEM, c as DEV_USERS, d as DemoDevUser, e as DemoTenantSpec, f as DemoWorkspaceSpec, O as OPENHI_RESOURCE_URN_SYSTEM, P as PLACEHOLDER_TENANT_ID, g as PLACEHOLDER_WORKSPACE_ID, h as PLATFORM_SCOPE_TENANT_ID, S as SEED_DEMO_DATA_CONSUMER_NAME, i as demoBasePartitionKeys, j as demoDevUserPartitionKeys, k as demoMembershipId, l as demoMembershipPartitionKey, m as demoRoleAssignmentId, n as demoRoleAssignmentPartitionKey, o as demoRolesForUserInTenant, p as demoScenarioIdentifier, q as demoTenantPartitionKey, r as demoUserPartitionKey, s as demoWorkspacePartitionKey, t as openhiResourceIdentifier, u as rolePartitionKey } from './events-DGep6C7w.mjs';
26
+ export { P as PROVISION_DEFAULT_WORKSPACE_DETAIL_TYPE, a as ProvisionDefaultWorkspaceRequestedDetail, U as USER_ONBOARDING_EVENT_SOURCE, b as buildProvisionDefaultWorkspaceRequestedDetail } from './events-CVA3_eEB.mjs';
27
+ export { PlatformDeploymentCompletedV1, PlatformSystemDataSeededV1 } from '@openhi/workflows';
24
28
  import '@aws-sdk/client-dynamodb';
29
+ import '@openhi/types';
30
+ import 'aws-lambda';
25
31
 
26
32
  /**
27
33
  * Properties for creating an OpenHiStage instance.
@@ -237,6 +243,28 @@ declare class OpenHiApp extends App {
237
243
  * @public
238
244
  */
239
245
  type OpenHiServiceType = "auth" | "rest-api" | "data" | "global" | "graphql-api";
246
+ /**
247
+ * Tag-key suffixes applied by every OpenHiService stack via Tags.of().
248
+ * Full keys are composed `${appName}:${suffix}` — see {@link openHiTagKey}.
249
+ * Consumers that filter or project these tags (e.g. the platform-deploy
250
+ * bridge) import these suffixes rather than redeclaring the strings.
251
+ *
252
+ * @public
253
+ */
254
+ declare const OPENHI_TAG_SUFFIX_REPO_NAME = "repo-name";
255
+ /** @public */
256
+ declare const OPENHI_TAG_SUFFIX_BRANCH_NAME = "branch-name";
257
+ /** @public */
258
+ declare const OPENHI_TAG_SUFFIX_SERVICE_TYPE = "service-type";
259
+ /** @public */
260
+ declare const OPENHI_TAG_SUFFIX_STAGE_TYPE = "stage-type";
261
+ /**
262
+ * Compose a full stack-tag key from an `appName` and a suffix from
263
+ * {@link OPENHI_TAG_SUFFIX_REPO_NAME} et al.
264
+ *
265
+ * @public
266
+ */
267
+ declare const openHiTagKey: (appName: string, suffix: string) => string;
240
268
  /**
241
269
  * Properties for creating an {@link OpenHiService} stack.
242
270
  *
@@ -484,16 +512,14 @@ declare class PostAuthenticationLambda extends Construct {
484
512
 
485
513
  interface PostConfirmationLambdaProps {
486
514
  /**
487
- * DynamoDB data store table name. Passed to the Lambda as DYNAMO_TABLE_NAME
488
- * so the control-plane ElectroDB service writes to the same single-table store.
515
+ * Control-plane EventBridge bus name. Passed to the Lambda as
516
+ * CONTROL_EVENT_BUS_NAME so it can publish onboarding workflow events.
489
517
  */
490
- readonly dynamoTableName: string;
518
+ readonly controlEventBusName: string;
491
519
  }
492
520
  /**
493
- * Lambda used as Cognito Post Confirmation trigger. Creates the new user's
494
- * default Tenant, Workspace, Memberships, and RoleAssignment, plus a User
495
- * record carrying the Cognito `sub` and current tenant/workspace pointers
496
- * (ADR 2026-03-17-01).
521
+ * Lambda used as Cognito Post Confirmation trigger. It publishes a control
522
+ * event and returns quickly; workflow Lambdas own provisioning.
497
523
  */
498
524
  declare class PostConfirmationLambda extends Construct {
499
525
  readonly lambda: NodejsFunction;
@@ -631,6 +657,108 @@ declare class DynamoDbDataStore extends Table {
631
657
  constructor(scope: Construct, id: string, props?: DynamoDbDataStoreProps);
632
658
  }
633
659
 
660
+ /**
661
+ * @see sites/www-docs/content/packages/@openhi/constructs/components/dynamodb/workflow-dedup-table.md
662
+ */
663
+ /**
664
+ * Deterministic table name for the shared workflow dedup table.
665
+ * Mirrors `getDynamoDbDataStoreTableName` naming: `workflow-dedup-${branchHash}`.
666
+ */
667
+ declare function getWorkflowDedupTableName(scope: Construct): string;
668
+ /** Props for `WorkflowDedupTable`. */
669
+ interface WorkflowDedupTableProps {
670
+ /**
671
+ * Optional removal policy override. Defaults to the service's default
672
+ * (RETAIN for prod, DESTROY otherwise).
673
+ */
674
+ readonly removalPolicy?: RemovalPolicy;
675
+ }
676
+ /** Options for `WorkflowDedupTable.grantConsumer`. */
677
+ interface GrantConsumerOptions {
678
+ /**
679
+ * Override the default TTL applied by the runtime client. The 14-day
680
+ * default lives in `@openhi/workflows`; per-consumer overrides clamp
681
+ * shorter per TR-015. Stored in the consumer's environment so the
682
+ * `WorkflowDedupClient` factory can pick it up.
683
+ */
684
+ readonly defaultTtlSeconds?: number;
685
+ }
686
+ /**
687
+ * Shared platform-level dedup table every retryable workflow consumer
688
+ * dedupes against. Provisioned exactly once at the platform stack.
689
+ *
690
+ * Schema (per TR-015):
691
+ * - Partition key `consumerName` (S)
692
+ * - Sort key `sk` (S) — encodes `<eventId>#<attempt>`
693
+ * - TTL attribute `expiresAt` (N, Unix epoch seconds)
694
+ * - On-demand billing
695
+ *
696
+ * @see https://github.com/codedrifters/openhi-planning/blob/main/docs/src/content/docs/requirements/technical-requirements/TR-015-workflow-dedup-table.md
697
+ */
698
+ declare class WorkflowDedupTable extends Construct {
699
+ /** SSM param name (short) used by `DiscoverableStringParameter` for the table name lookup. */
700
+ static readonly TABLE_NAME_SSM_PARAM_NAME = "workflow-dedup-table-name";
701
+ /** SSM param name (short) used by `DiscoverableStringParameter` for the table ARN lookup. */
702
+ static readonly TABLE_ARN_SSM_PARAM_NAME = "workflow-dedup-table-arn";
703
+ /** Cross-stack lookup for the table name. */
704
+ static tableNameFromLookup(scope: Construct): string;
705
+ /** Cross-stack lookup for the table ARN. */
706
+ static tableArnFromLookup(scope: Construct): string;
707
+ /**
708
+ * Cross-stack equivalent of {@link grantConsumer}. Use when the dedup
709
+ * table is on a different stack than the consumer Lambda — the
710
+ * grant resolves the table name + ARN via SSM at synth time, so the
711
+ * consumer stack does not pick up a CloudFormation export dependency
712
+ * on the global stack.
713
+ *
714
+ * Inverts the singleton-guard semantics of `grantConsumer`: there is
715
+ * no synth-time check that the same `consumerName` was registered
716
+ * twice across stacks. Consumer names are agreed by convention
717
+ * (see TR-015); double-registration is operator error caught at
718
+ * design time, not synth time.
719
+ */
720
+ static grantConsumerFromLookup(scope: Construct, fn: Function, consumerName: string, options?: GrantConsumerOptions): void;
721
+ /**
722
+ * Service-type the publishing stack runs under. The cross-stack lookups
723
+ * pin to this value so consumer stacks on a different service-type
724
+ * (e.g. `data`, `auth`) resolve the parameter at the publisher's SSM
725
+ * path instead of their own. Typed against `OpenHiServiceType` so a
726
+ * future rename of the literal triggers a compile error; not pulled
727
+ * from `OpenHiGlobalService.SERVICE_TYPE` because
728
+ * `OpenHiGlobalService` already imports `WorkflowDedupTable` — a
729
+ * back-import would create a circular dependency.
730
+ */
731
+ private static readonly PUBLISHER_SERVICE_TYPE;
732
+ /**
733
+ * Standalone consumer-name validator shared by the instance method
734
+ * and `grantConsumerFromLookup` so the two grants enforce identical
735
+ * invariants.
736
+ */
737
+ private static assertConsumerNameStatic;
738
+ /** The underlying DynamoDB table. */
739
+ readonly table: Table;
740
+ private readonly registeredConsumers;
741
+ constructor(scope: Construct, id: string, props?: WorkflowDedupTableProps);
742
+ /**
743
+ * Wire a Lambda consumer to this table. Injects the table-name env var
744
+ * so the runtime `WorkflowDedupClient` can resolve it, then attaches a
745
+ * per-consumer IAM grant scoped by `dynamodb:LeadingKeys` so the
746
+ * consumer can only read/write its own partition.
747
+ */
748
+ grantConsumer(fn: Function, consumerName: string, options?: GrantConsumerOptions): void;
749
+ private assertConsumerName;
750
+ }
751
+ /** Thrown when a second `WorkflowDedupTable` is instantiated in the same app. */
752
+ declare class WorkflowDedupTableDuplicateError extends Error {
753
+ /** @param message - human-readable description of the duplicate. */
754
+ constructor(message: string);
755
+ }
756
+ /** Thrown when a consumerName violates the TR-015 invariants. */
757
+ declare class WorkflowDedupConsumerNameInvalidError extends Error {
758
+ /** @param message - human-readable description of the invariant violation. */
759
+ constructor(message: string);
760
+ }
761
+
634
762
  /**
635
763
  * @see sites/www-docs/content/packages/@openhi/constructs/components/event-bridge/data-event-bus.md
636
764
  */
@@ -661,6 +789,21 @@ declare class OpsEventBus extends EventBus {
661
789
  constructor(scope: Construct, props?: EventBusProps);
662
790
  }
663
791
 
792
+ /**
793
+ * @see sites/www-docs/content/packages/@openhi/constructs/components/event-bridge/control-event-bus.md
794
+ */
795
+ declare class ControlEventBus extends EventBus {
796
+ /*****************************************************************************
797
+ *
798
+ * Return a name for this EventBus based on the stack environment hash. This
799
+ * name is common across all stacks since it's using the environment hash in
800
+ * its name.
801
+ *
802
+ ****************************************************************************/
803
+ static getEventBusName(scope: Construct): string;
804
+ constructor(scope: Construct, props?: EventBusProps);
805
+ }
806
+
664
807
  /**
665
808
  * SSM parameter names that publish the Postgres replica's coordinates so other
666
809
  * stacks (notably the REST API stack) can discover them without a direct CDK
@@ -905,6 +1048,47 @@ declare class StaticHosting extends Construct {
905
1048
  constructor(scope: Construct, id: string, props?: StaticHostingProps);
906
1049
  }
907
1050
 
1051
+ interface ProvisionDefaultWorkspaceLambdaProps {
1052
+ /**
1053
+ * DynamoDB data store table. Used for the Lambda's `DYNAMO_TABLE_NAME`
1054
+ * env var and for granting the Lambda the writes + GSI queries it needs
1055
+ * to provision default control-plane resources.
1056
+ */
1057
+ readonly dataStoreTable: ITable;
1058
+ /**
1059
+ * Control-plane event bus that the EventBridge Rule listens on.
1060
+ */
1061
+ readonly controlEventBus: IEventBus;
1062
+ }
1063
+ /**
1064
+ * Lambda used by the user-onboarding workflow to create a user's default
1065
+ * Tenant, Workspace, Memberships, and RoleAssignment.
1066
+ *
1067
+ * Owns the EventBridge Rule that routes the default-workspace onboarding
1068
+ * event to itself, and the IAM permissions it needs on the data store
1069
+ * table — colocating routing + permissions with the function they target.
1070
+ */
1071
+ declare class ProvisionDefaultWorkspaceLambda extends Construct {
1072
+ readonly lambda: NodejsFunction;
1073
+ readonly rule: Rule;
1074
+ constructor(scope: Construct, props: ProvisionDefaultWorkspaceLambdaProps);
1075
+ }
1076
+
1077
+ /**
1078
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/user-onboarding/user-onboarding-workflow.md
1079
+ */
1080
+ interface UserOnboardingWorkflowProps {
1081
+ readonly controlEventBus: IEventBus;
1082
+ readonly dataStoreTable: ITable;
1083
+ }
1084
+ /**
1085
+ * Control-plane workflow for onboarding users after Cognito confirmation.
1086
+ */
1087
+ declare class UserOnboardingWorkflow extends Construct {
1088
+ readonly provisionDefaultWorkspace: ProvisionDefaultWorkspaceLambda;
1089
+ constructor(scope: Construct, props: UserOnboardingWorkflowProps);
1090
+ }
1091
+
908
1092
  /**
909
1093
  * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-auth-service.md
910
1094
  */
@@ -935,7 +1119,7 @@ interface OpenHiAuthServiceProps extends OpenHiServiceProps {
935
1119
  * @public
936
1120
  */
937
1121
  declare class OpenHiAuthService extends OpenHiService {
938
- static readonly SERVICE_TYPE = "auth";
1122
+ static readonly SERVICE_TYPE: "auth";
939
1123
  /**
940
1124
  * Returns an IUserPool by looking up the Auth stack's User Pool ID from SSM.
941
1125
  */
@@ -970,6 +1154,7 @@ declare class OpenHiAuthService extends OpenHiService {
970
1154
  readonly preTokenGenerationLambda: IFunction;
971
1155
  readonly postAuthenticationLambda: IFunction;
972
1156
  readonly postConfirmationLambda: IFunction;
1157
+ readonly userOnboardingWorkflow: UserOnboardingWorkflow;
973
1158
  readonly userPool: IUserPool;
974
1159
  readonly userPoolClient: IUserPoolClient;
975
1160
  readonly userPoolDomain: IUserPoolDomain;
@@ -986,6 +1171,7 @@ declare class OpenHiAuthService extends OpenHiService {
986
1171
  * would collide.
987
1172
  */
988
1173
  private _dataStoreTable;
1174
+ private _controlEventBus;
989
1175
  constructor(ohEnv: OpenHiEnvironment, props?: OpenHiAuthServiceProps);
990
1176
  /**
991
1177
  * Creates the KMS key for the Cognito User Pool and exports its ARN to SSM.
@@ -1008,13 +1194,13 @@ declare class OpenHiAuthService extends OpenHiService {
1008
1194
  protected createPostAuthenticationLambda(): IFunction;
1009
1195
  /**
1010
1196
  * Creates the Post Confirmation Lambda (Cognito trigger). On sign-up
1011
- * confirmation, writes the new user's default Tenant, Workspace,
1012
- * Memberships, and `tenant-user` RoleAssignment, plus a User record
1013
- * carrying the Cognito `sub` and current tenant/workspace pointers
1014
- * (ADR 2026-03-17-01 invariants).
1197
+ * confirmation, publishes a control-plane workflow event; provisioning lives
1198
+ * behind EventBridge.
1015
1199
  */
1016
1200
  protected createPostConfirmationLambda(): IFunction;
1201
+ protected createUserOnboardingWorkflow(): UserOnboardingWorkflow;
1017
1202
  private dataStoreTable;
1203
+ private controlEventBus;
1018
1204
  /**
1019
1205
  * Creates the Cognito User Pool and exports its ID to SSM.
1020
1206
  * Look up via {@link OpenHiAuthService.userPoolFromConstruct}.
@@ -1046,9 +1232,8 @@ declare class OpenHiAuthService extends OpenHiService {
1046
1232
  */
1047
1233
  protected grantPostAuthenticationPermissions(): void;
1048
1234
  /**
1049
- * Grants the Post Confirmation Lambda write access to the data store
1050
- * table (and its GSIs) so it can seed the new user's Tenant, Workspace,
1051
- * Memberships, RoleAssignment, and User records on sign-up confirmation.
1235
+ * Grants the Post Confirmation Lambda publish-only access to the
1236
+ * control-plane event bus. Workflow Lambdas own DynamoDB writes.
1052
1237
  */
1053
1238
  protected grantPostConfirmationPermissions(): void;
1054
1239
  /**
@@ -1077,6 +1262,52 @@ declare class OpenHiAuthService extends OpenHiService {
1077
1262
  protected createUserPoolDomain(): IUserPoolDomain;
1078
1263
  }
1079
1264
 
1265
+ interface PlatformDeployBridgeLambdaProps {
1266
+ /** Destination control event bus the bridge republishes onto. */
1267
+ readonly controlEventBus: IEventBus;
1268
+ }
1269
+ /**
1270
+ * Lambda that bridges CloudFormation Stack Status Change events from the
1271
+ * default AWS bus into typed `platform.deployment-completed.v1` envelopes on
1272
+ * the OpenHI control event bus.
1273
+ *
1274
+ * Owns its EventBridge Rule (on the default AWS bus) and the IAM
1275
+ * permissions it needs — colocating routing + permissions with the
1276
+ * function they target.
1277
+ *
1278
+ * The EventBridge rule pre-filters by stack-id prefix so the rule (and
1279
+ * therefore the Lambda) only fires on the host stack's own branch deploys.
1280
+ * This prevents cross-branch leak when multiple branches are deployed into
1281
+ * the same account.
1282
+ */
1283
+ declare class PlatformDeployBridgeLambda extends Construct {
1284
+ readonly lambda: NodejsFunction;
1285
+ readonly rule: Rule;
1286
+ constructor(scope: Construct, props: PlatformDeployBridgeLambdaProps);
1287
+ }
1288
+
1289
+ /**
1290
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/platform-deploy-bridge/index.md
1291
+ */
1292
+ interface PlatformDeployBridgeProps {
1293
+ /** Destination control event bus the bridge republishes onto. */
1294
+ readonly controlEventBus: IEventBus;
1295
+ }
1296
+ /**
1297
+ * Source-side reactor that watches CloudFormation Stack Status Change
1298
+ * events on the default AWS bus and republishes terminal-success events
1299
+ * (`CREATE_COMPLETE` / `UPDATE_COMPLETE`) for OpenHi-tagged stacks onto
1300
+ * the control event bus as `platform.deployment-completed.v1`.
1301
+ *
1302
+ * Implements row 4 of the workflow placement matrix
1303
+ * (codedrifters/openhi#953): ops-plane reactor → republishes to
1304
+ * control event bus.
1305
+ */
1306
+ declare class PlatformDeployBridge extends Construct {
1307
+ readonly bridgeLambda: PlatformDeployBridgeLambda;
1308
+ constructor(scope: Construct, props: PlatformDeployBridgeProps);
1309
+ }
1310
+
1080
1311
  /**
1081
1312
  * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-global-service.md
1082
1313
  */
@@ -1084,12 +1315,12 @@ interface OpenHiGlobalServiceProps extends OpenHiServiceProps {
1084
1315
  }
1085
1316
  /**
1086
1317
  * Global Infrastructure stack: owns global DNS, certificates, and the
1087
- * cross-region EventBridge buses (data, ops). Resources (root zone, optional
1088
- * child zone, wildcard cert, data/ops buses) are created in protected methods;
1089
- * subclasses may override to customize.
1318
+ * cross-region EventBridge buses (data, ops, control). Resources (root zone,
1319
+ * optional child zone, wildcard cert, data/ops/control buses) are created in
1320
+ * protected methods; subclasses may override to customize.
1090
1321
  */
1091
1322
  declare class OpenHiGlobalService extends OpenHiService {
1092
- static readonly SERVICE_TYPE = "global";
1323
+ static readonly SERVICE_TYPE: "global";
1093
1324
  /**
1094
1325
  * Returns an IHostedZone from the given attributes (no SSM). Use when the zone is imported from config.
1095
1326
  */
@@ -1113,6 +1344,19 @@ declare class OpenHiGlobalService extends OpenHiService {
1113
1344
  * Returns the ops event bus by name (deterministic per branch). Use from other stacks to obtain an IEventBus reference.
1114
1345
  */
1115
1346
  static opsEventBusFromConstruct(scope: Construct): IEventBus;
1347
+ /**
1348
+ * Returns the control-plane event bus by name (deterministic per branch). Use from other stacks to obtain an IEventBus reference.
1349
+ */
1350
+ static controlEventBusFromConstruct(scope: Construct): IEventBus;
1351
+ /**
1352
+ * Returns the workflow dedup table by name (deterministic per branch).
1353
+ * Use from other stacks to obtain an ITable reference. Consumer Lambdas
1354
+ * are typically wired via `WorkflowDedupTable.grantConsumer(fn, name)`
1355
+ * on the owning service's `workflowDedupTable` reference; the
1356
+ * `tableNameFromLookup` / `tableArnFromLookup` SSM helpers on the
1357
+ * construct cover cross-stack consumers that need only the name/ARN.
1358
+ */
1359
+ static workflowDedupTableNameFromLookup(scope: Construct): string;
1116
1360
  get serviceType(): string;
1117
1361
  /** Override so this.props is typed with this service's options. */
1118
1362
  props: OpenHiGlobalServiceProps;
@@ -1129,6 +1373,23 @@ declare class OpenHiGlobalService extends OpenHiService {
1129
1373
  * Other stacks obtain it via {@link OpenHiGlobalService.opsEventBusFromConstruct}.
1130
1374
  */
1131
1375
  readonly opsEventBus: IEventBus;
1376
+ /**
1377
+ * Event bus for control-plane lifecycle and command events.
1378
+ * Other stacks obtain it via {@link OpenHiGlobalService.controlEventBusFromConstruct}.
1379
+ */
1380
+ readonly controlEventBus: IEventBus;
1381
+ /**
1382
+ * Bridge that watches CloudFormation Stack Status Change events on the
1383
+ * default AWS bus and republishes terminal-success events for OpenHi-tagged
1384
+ * stacks onto {@link controlEventBus} as `platform.deployment-completed.v1`.
1385
+ */
1386
+ readonly platformDeployBridge: PlatformDeployBridge;
1387
+ /**
1388
+ * Shared dedup table every retryable workflow consumer dedupes against
1389
+ * (TR-015). Singleton per deployment — provisioned here on the global
1390
+ * stack so consumer stacks reach it via SSM lookups, not props.
1391
+ */
1392
+ readonly workflowDedupTable: WorkflowDedupTable;
1132
1393
  constructor(ohEnv: OpenHiEnvironment, props?: OpenHiGlobalServiceProps);
1133
1394
  /**
1134
1395
  * Validates that config required for the Global stack is present.
@@ -1162,6 +1423,22 @@ declare class OpenHiGlobalService extends OpenHiService {
1162
1423
  * Override to customize.
1163
1424
  */
1164
1425
  protected createOpsEventBus(): IEventBus;
1426
+ /**
1427
+ * Creates the control-plane event bus.
1428
+ * Override to customize.
1429
+ */
1430
+ protected createControlEventBus(): IEventBus;
1431
+ /**
1432
+ * Creates the platform deploy bridge that republishes CloudFormation
1433
+ * Stack Status Change events onto the control event bus.
1434
+ * Override to customize.
1435
+ */
1436
+ protected createPlatformDeployBridge(): PlatformDeployBridge;
1437
+ /**
1438
+ * Creates the shared workflow dedup table (TR-015 singleton).
1439
+ * Override to customize.
1440
+ */
1441
+ protected createWorkflowDedupTable(): WorkflowDedupTable;
1165
1442
  }
1166
1443
 
1167
1444
  /**
@@ -1184,7 +1461,7 @@ declare const REST_API_BASE_URL_SSM_NAME = "REST_API_BASE_URL";
1184
1461
  * Resources are created in protected methods; subclasses may override to customize.
1185
1462
  */
1186
1463
  declare class OpenHiRestApiService extends OpenHiService {
1187
- static readonly SERVICE_TYPE = "rest-api";
1464
+ static readonly SERVICE_TYPE: "rest-api";
1188
1465
  /**
1189
1466
  * Returns an IHttpApi by looking up the REST API stack's HTTP API ID from SSM.
1190
1467
  */
@@ -1242,20 +1519,176 @@ declare class OpenHiRestApiService extends OpenHiService {
1242
1519
  protected createRootHttpApi(domainName: DomainName): RootHttpApi;
1243
1520
  }
1244
1521
 
1522
+ interface SeedDemoDataLambdaProps {
1523
+ /**
1524
+ * Data-store table the workflow upserts demo-data records into.
1525
+ * Wired via `DYNAMO_TABLE_NAME` env var; granted scoped read on the
1526
+ * Role PKs (pre-flight check) and scoped write on the enumerated
1527
+ * demo Tenant / Workspace / Membership / RoleAssignment / User PKs.
1528
+ */
1529
+ readonly dataStoreTable: ITable;
1530
+ /**
1531
+ * Control event bus that re-publishes
1532
+ * `platform.deployment-completed.v1` from the platform-deploy bridge.
1533
+ * The Rule mounts here.
1534
+ */
1535
+ readonly controlEventBus: IEventBus;
1536
+ /**
1537
+ * Cognito User Pool the workflow provisions dev users into. The
1538
+ * Lambda's IAM grant is scoped to this exact user-pool ARN — the
1539
+ * grant uses the user-pool ARN, **not** the wildcard formatArn
1540
+ * pattern used by `post-authentication-lambda` (that Lambda's
1541
+ * trigger-driven dependency cycle does not apply here, so the
1542
+ * tighter scope is safe).
1543
+ */
1544
+ readonly userPool: IUserPool;
1545
+ }
1245
1546
  /**
1246
- * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-data-service.md
1547
+ * Lambda + EventBridge Rule pair for the seed-demo-data workflow.
1548
+ * Owns the routing (`source` / `detail-type` pattern), the scoped
1549
+ * DynamoDB grants, and the scoped Cognito Admin grant — co-locating
1550
+ * routing + permissions with the function they target. Wiring to the
1551
+ * workflow dedup table is the parent construct's job (it has the
1552
+ * singleton reference) and happens via `WorkflowDedupTable.grantConsumer`.
1553
+ *
1554
+ * Stage-gating is the parent's job too — this construct itself never
1555
+ * checks the stage. The CDK stage-router (`OpenHiDataService`)
1556
+ * decides whether to instantiate it at all on each stage.
1247
1557
  */
1248
- interface OpenHiDataServiceProps extends OpenHiServiceProps {
1558
+ declare class SeedDemoDataLambda extends Construct {
1559
+ readonly lambda: NodejsFunction;
1560
+ readonly rule: Rule;
1561
+ constructor(scope: Construct, props: SeedDemoDataLambdaProps);
1249
1562
  }
1563
+
1564
+ /**
1565
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-demo-data/seed-demo-data-workflow.md
1566
+ */
1567
+ interface SeedDemoDataWorkflowProps {
1568
+ /** Control event bus carrying `platform.system-data-seeded.v1`. */
1569
+ readonly controlEventBus: IEventBus;
1570
+ /** Data-store table the workflow upserts demo-data records into. */
1571
+ readonly dataStoreTable: ITable;
1572
+ /** Cognito User Pool the workflow provisions dev users into. */
1573
+ readonly userPool: IUserPool;
1574
+ }
1575
+ /**
1576
+ * Control-plane workflow that fires on every platform deploy and
1577
+ * idempotently re-asserts the demo-data graph: placeholder tenant +
1578
+ * workspace, 3 demo tenants + 4 workspaces, and per-dev-user Cognito
1579
+ * users with their DynamoDB User records, Memberships, and
1580
+ * RoleAssignments.
1581
+ *
1582
+ * Mounted on the data-service stack so the IAM grants against the
1583
+ * data-store table stay local. The control event bus and the workflow
1584
+ * dedup table reach in cross-stack via the SSM lookups
1585
+ * `OpenHiGlobalService.controlEventBusFromConstruct` and
1586
+ * `WorkflowDedupTable.grantConsumerFromLookup` respectively. The
1587
+ * Cognito User Pool similarly reaches in via
1588
+ * `OpenHiAuthService.userPoolFromConstruct`.
1589
+ *
1590
+ * Non-prod-only: the CDK stage-router (`OpenHiDataService`)
1591
+ * conditionally constructs this workflow only on non-prod stages.
1592
+ * The construct itself never checks the stage — its absence in prod
1593
+ * stacks is the gate.
1594
+ */
1595
+ declare class SeedDemoDataWorkflow extends Construct {
1596
+ readonly seedDemoData: SeedDemoDataLambda;
1597
+ constructor(scope: Construct, props: SeedDemoDataWorkflowProps);
1598
+ }
1599
+
1600
+ /**
1601
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-system-data/events.md
1602
+ */
1603
+ /**
1604
+ * Stable logical name this workflow registers with the shared
1605
+ * `WorkflowDedupTable` (TR-015). Used in both the construct grant
1606
+ * (`workflowDedupTable.grantConsumer(lambda, SEED_SYSTEM_DATA_CONSUMER_NAME)`)
1607
+ * and the handler's runtime `recordIfAbsent` call — keep them aligned by
1608
+ * importing this constant in both places.
1609
+ */
1610
+ declare const SEED_SYSTEM_DATA_CONSUMER_NAME = "seed-system-data";
1611
+ /**
1612
+ * Free-form `actor.system` value the handler stamps on the
1613
+ * `platform.system-data-seeded.v1` event it publishes when seeding
1614
+ * completes. Pinned here so the test can assert the wire value without
1615
+ * importing private handler internals.
1616
+ */
1617
+ declare const SEED_SYSTEM_DATA_ACTOR_SYSTEM = "seed-system-data";
1618
+ /**
1619
+ * Env var the Lambda construct injects with the control event bus
1620
+ * name. The handler reads it to build the publisher target when
1621
+ * emitting `platform.system-data-seeded.v1` after a successful seed.
1622
+ */
1623
+ declare const SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR = "CONTROL_EVENT_BUS_NAME";
1624
+
1625
+ interface SeedSystemDataLambdaProps {
1626
+ /**
1627
+ * Data-store table the workflow upserts platform-singleton control-plane
1628
+ * records into. Wired via `DYNAMO_TABLE_NAME` env var; granted scoped
1629
+ * write permission to the role records' partition keys only.
1630
+ */
1631
+ readonly dataStoreTable: ITable;
1632
+ /**
1633
+ * Control event bus that re-publishes
1634
+ * `platform.deployment-completed.v1` from the platform-deploy bridge.
1635
+ * The Rule mounts here.
1636
+ */
1637
+ readonly controlEventBus: IEventBus;
1638
+ }
1639
+ /**
1640
+ * Lambda + EventBridge Rule pair for the seed-system-data workflow. Owns
1641
+ * the routing (`source` / `detail-type` pattern) and the scoped data-store
1642
+ * grants — co-locating routing + permissions with the function they
1643
+ * target. Wiring to the workflow dedup table is the parent construct's
1644
+ * job (it has the singleton reference) and happens via
1645
+ * `WorkflowDedupTable.grantConsumer`.
1646
+ */
1647
+ declare class SeedSystemDataLambda extends Construct {
1648
+ readonly lambda: NodejsFunction;
1649
+ readonly rule: Rule;
1650
+ constructor(scope: Construct, props: SeedSystemDataLambdaProps);
1651
+ }
1652
+
1653
+ /**
1654
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/seed-system-data/seed-system-data-workflow.md
1655
+ */
1656
+ interface SeedSystemDataWorkflowProps {
1657
+ /** Control event bus carrying `platform.deployment-completed.v1`. */
1658
+ readonly controlEventBus: IEventBus;
1659
+ /** Data-store table the workflow upserts platform-singleton records into. */
1660
+ readonly dataStoreTable: ITable;
1661
+ }
1662
+ /**
1663
+ * Control-plane workflow that fires on every platform deploy and
1664
+ * idempotently re-asserts the platform-singleton control-plane records
1665
+ * (today: the three canonical Roles; future: additional system data
1666
+ * slotted in as sibling steps under the same dedup record).
1667
+ *
1668
+ * Mounted on the data-service stack so the IAM grants against the
1669
+ * data-store table stay local. The control event bus and the
1670
+ * workflow dedup table reach in cross-stack via the SSM lookups
1671
+ * `OpenHiGlobalService.controlEventBusFromConstruct` and
1672
+ * `WorkflowDedupTable.grantConsumerFromLookup` respectively.
1673
+ */
1674
+ declare class SeedSystemDataWorkflow extends Construct {
1675
+ readonly seedSystemData: SeedSystemDataLambda;
1676
+ constructor(scope: Construct, props: SeedSystemDataWorkflowProps);
1677
+ }
1678
+
1679
+ /**
1680
+ * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-data-service.md
1681
+ */
1682
+ type OpenHiDataServiceProps = OpenHiServiceProps;
1250
1683
  /**
1251
1684
  * Data storage service stack: centralizes DynamoDB, S3, and other persistence
1252
1685
  * resources for OpenHI. Creates the single-table data store in a protected
1253
1686
  * method; subclasses may override to customize. EventBridge event buses
1254
- * (data, ops) are owned by {@link OpenHiGlobalService} so they deploy ahead of
1255
- * regional services.
1687
+ * (data, ops, control) are owned by {@link OpenHiGlobalService} so they deploy
1688
+ * ahead of regional services.
1256
1689
  */
1257
1690
  declare class OpenHiDataService extends OpenHiService {
1258
- static readonly SERVICE_TYPE = "data";
1691
+ static readonly SERVICE_TYPE: "data";
1259
1692
  /**
1260
1693
  * Returns the data store table by name. Use from other stacks (e.g. REST API Lambda) to obtain an ITable reference.
1261
1694
  */
@@ -1284,7 +1717,53 @@ declare class OpenHiDataService extends OpenHiService {
1284
1717
  * the read path is not wired up yet.
1285
1718
  */
1286
1719
  readonly dataStorePostgresReplica: DataStorePostgresReplica;
1720
+ /**
1721
+ * Deploy-triggered workflow that idempotently re-asserts the
1722
+ * platform-singleton control-plane records (today: the three canonical
1723
+ * Roles via `CONTROL_PLANE_ROLE_CONCEPTS`; future: additional system
1724
+ * data). Subscribes to `platform.deployment-completed.v1` on the
1725
+ * control event bus and dedups via the shared `WorkflowDedupTable`.
1726
+ */
1727
+ readonly seedSystemDataWorkflow: SeedSystemDataWorkflow;
1728
+ /**
1729
+ * Deploy-triggered workflow that idempotently re-asserts the demo
1730
+ * data graph (placeholder + 3 demo Tenants + 5 Workspaces; per
1731
+ * dev-user Cognito users with their DynamoDB User records,
1732
+ * Memberships, and RoleAssignments). **Non-prod only** —
1733
+ * `undefined` on prod stages. The synth-time stage gate in
1734
+ * {@link createSeedDemoDataWorkflow} is the only guarantee
1735
+ * separating prod stacks from the workflow's IAM grants and rule
1736
+ * target; the construct itself never checks the stage.
1737
+ */
1738
+ readonly seedDemoDataWorkflow?: SeedDemoDataWorkflow;
1739
+ /**
1740
+ * Cached control-event-bus lookup. `OpenHiGlobalService.controlEventBusFromConstruct`
1741
+ * registers a child `EventBus.fromEventBusName` construct with a
1742
+ * fixed id under the scope it is passed, so calling it twice on the
1743
+ * same `OpenHiDataService` instance collides. The cache mirrors the
1744
+ * `private controlEventBus()` pattern already used in
1745
+ * `OpenHiAuthService`. Use {@link controlEventBus} from this class
1746
+ * — never call the static lookup from inside `OpenHiDataService`.
1747
+ */
1748
+ private _controlEventBus;
1287
1749
  constructor(ohEnv: OpenHiEnvironment, props?: OpenHiDataServiceProps);
1750
+ /**
1751
+ * Lazily looks up the control event bus exactly once per
1752
+ * `OpenHiDataService` instance and caches the reference. Every
1753
+ * workflow that consumes the bus must read it through this method
1754
+ * — see {@link _controlEventBus} for the underlying collision risk.
1755
+ */
1756
+ private controlEventBus;
1757
+ /**
1758
+ * Creates the seed-system-data workflow. Override to customize.
1759
+ */
1760
+ protected createSeedSystemDataWorkflow(): SeedSystemDataWorkflow;
1761
+ /**
1762
+ * Creates the seed-demo-data workflow — but only on non-prod
1763
+ * stages. Returns `undefined` on prod so the workflow literally
1764
+ * does not exist in prod stacks. Override to customize.
1765
+ */
1766
+ protected createSeedDemoDataWorkflow(): SeedDemoDataWorkflow | undefined;
1288
1767
  /**
1289
1768
  * Creates the single-table DynamoDB data store.
1290
1769
  * Override to customize.
@@ -1300,7 +1779,7 @@ interface OpenHiGraphqlServiceProps extends OpenHiServiceProps {
1300
1779
  * {@link OpenHiGraphqlService.graphqlApiFromConstruct}.
1301
1780
  */
1302
1781
  declare class OpenHiGraphqlService extends OpenHiService {
1303
- static readonly SERVICE_TYPE = "graphql-api";
1782
+ static readonly SERVICE_TYPE: "graphql-api";
1304
1783
  /**
1305
1784
  * Returns the GraphQL API by looking up the GraphQL stack's API ID from SSM.
1306
1785
  * Use from other stacks to obtain an IGraphqlApi reference.
@@ -1314,4 +1793,4 @@ declare class OpenHiGraphqlService extends OpenHiService {
1314
1793
  protected createRootGraphqlApi(): RootGraphqlApi;
1315
1794
  }
1316
1795
 
1317
- export { type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoFixtureSeederClient, type CognitoFixtureSeederClientProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DataEventBus, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, type FhirCurrentResourceChangeDetail, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiGraphqlService, type OpenHiGraphqlServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpsEventBus, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, REST_API_BASE_URL_SSM_NAME, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, type RootHttpApiProps, RootWildcardCertificate, STATIC_HOSTING_SERVICE_TYPE, StaticHosting, type StaticHostingProps, buildFhirCurrentResourceChangeDetail, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName };
1796
+ export { type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoFixtureSeederClient, type CognitoFixtureSeederClientProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DataEventBus, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, type FhirCurrentResourceChangeDetail, type GrantConsumerOptions, OPENHI_TAG_SUFFIX_BRANCH_NAME, OPENHI_TAG_SUFFIX_REPO_NAME, OPENHI_TAG_SUFFIX_SERVICE_TYPE, OPENHI_TAG_SUFFIX_STAGE_TYPE, OpenHiApp, type OpenHiAppProps, OpenHiAuthService, type OpenHiAuthServiceProps, OpenHiDataService, type OpenHiDataServiceProps, OpenHiEnvironment, type OpenHiEnvironmentProps, OpenHiGlobalService, type OpenHiGlobalServiceProps, OpenHiGraphqlService, type OpenHiGraphqlServiceProps, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpsEventBus, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PlatformDeployBridge, PlatformDeployBridgeLambda, type PlatformDeployBridgeLambdaProps, type PlatformDeployBridgeProps, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambda, type ProvisionDefaultWorkspaceLambdaProps, REST_API_BASE_URL_SSM_NAME, RootGraphqlApi, type RootGraphqlApiProps, RootHostedZone, RootHttpApi, type RootHttpApiProps, RootWildcardCertificate, SEED_SYSTEM_DATA_ACTOR_SYSTEM, SEED_SYSTEM_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, type SeedDemoDataLambdaProps, SeedDemoDataWorkflow, type SeedDemoDataWorkflowProps, SeedSystemDataLambda, type SeedSystemDataLambdaProps, SeedSystemDataWorkflow, type SeedSystemDataWorkflowProps, StaticHosting, type StaticHostingProps, UserOnboardingWorkflow, type UserOnboardingWorkflowProps, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, type WorkflowDedupTableProps, buildFhirCurrentResourceChangeDetail, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey };