@openhi/constructs 0.0.121 → 0.0.123

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/index.js CHANGED
@@ -842,6 +842,7 @@ __export(src_exports, {
842
842
  RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR: () => RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR,
843
843
  RENAME_CASCADE_SLOW_THRESHOLD_SECONDS: () => RENAME_CASCADE_SLOW_THRESHOLD_SECONDS,
844
844
  REST_API_BASE_URL_SSM_NAME: () => REST_API_BASE_URL_SSM_NAME,
845
+ REST_API_DOMAIN_NAME_SSM_NAME: () => REST_API_DOMAIN_NAME_SSM_NAME,
845
846
  RenameCascadeLambdas: () => RenameCascadeLambdas,
846
847
  RenameCascadeWorkflow: () => RenameCascadeWorkflow,
847
848
  RootGraphqlApi: () => RootGraphqlApi,
@@ -867,6 +868,7 @@ __export(src_exports, {
867
868
  WorkflowDedupTableDuplicateError: () => WorkflowDedupTableDuplicateError,
868
869
  buildFhirCurrentResourceChangeDetail: () => buildFhirCurrentResourceChangeDetail,
869
870
  buildProvisionDefaultWorkspaceRequestedDetail: () => buildProvisionDefaultWorkspaceRequestedDetail,
871
+ computeBranchHash: () => computeBranchHash,
870
872
  demoMembershipId: () => demoMembershipId,
871
873
  demoRoleAssignmentId: () => demoRoleAssignmentId,
872
874
  demoRolesForUserInTenant: () => demoRolesForUserInTenant,
@@ -879,6 +881,16 @@ __export(src_exports, {
879
881
  });
880
882
  module.exports = __toCommonJS(src_exports);
881
883
 
884
+ // src/app/compute-branch-hash.ts
885
+ var import_utils = require("@codedrifters/utils");
886
+ var computeBranchHash = (options) => {
887
+ const { appName, deploymentTargetRole, account, region, branchName } = options;
888
+ return (0, import_utils.hashString)(
889
+ [appName, deploymentTargetRole, account, region, branchName].join("-"),
890
+ 6
891
+ );
892
+ };
893
+
882
894
  // src/app/open-hi-app.ts
883
895
  var import_config2 = __toESM(require_lib());
884
896
  var import_aws_cdk_lib3 = require("aws-cdk-lib");
@@ -1086,7 +1098,7 @@ var OpenHiApp = class _OpenHiApp extends import_aws_cdk_lib3.App {
1086
1098
  };
1087
1099
 
1088
1100
  // src/app/open-hi-service.ts
1089
- var import_utils = require("@codedrifters/utils");
1101
+ var import_utils2 = require("@codedrifters/utils");
1090
1102
  var import_config3 = __toESM(require_lib());
1091
1103
  var import_aws_cdk_lib4 = require("aws-cdk-lib");
1092
1104
  var import_change_case = require("change-case");
@@ -1114,20 +1126,21 @@ var OpenHiService = class extends import_aws_cdk_lib4.Stack {
1114
1126
  );
1115
1127
  }
1116
1128
  const appName = props.appName ?? ohEnv.ohStage.ohApp.appName ?? "openhi";
1117
- const repoName = props.repoName ?? (0, import_utils.findGitRepoName)();
1129
+ const repoName = props.repoName ?? (0, import_utils2.findGitRepoName)();
1118
1130
  const defaultReleaseBranch = props.defaultReleaseBranch ?? "main";
1119
- const branchName = props.branchName ?? (process.env.JEST_WORKER_ID ? "test-branch" : process.env.GIT_BRANCH_NAME?.trim() || (ohEnv.ohStage.stageType === import_config3.OPEN_HI_STAGE.DEV ? (0, import_utils.findGitBranch)() : defaultReleaseBranch));
1120
- const environmentHash = (0, import_utils.hashString)(
1131
+ const branchName = props.branchName ?? (process.env.JEST_WORKER_ID ? "test-branch" : process.env.GIT_BRANCH_NAME?.trim() || (ohEnv.ohStage.stageType === import_config3.OPEN_HI_STAGE.DEV ? (0, import_utils2.findGitBranch)() : defaultReleaseBranch));
1132
+ const environmentHash = (0, import_utils2.hashString)(
1121
1133
  [appName, ohEnv.deploymentTargetRole, account, region].join("-"),
1122
1134
  6
1123
1135
  );
1124
- const branchHash = (0, import_utils.hashString)(
1125
- [appName, ohEnv.deploymentTargetRole, account, region, branchName].join(
1126
- "-"
1127
- ),
1128
- 6
1129
- );
1130
- const releaseBranchHash = (0, import_utils.hashString)(
1136
+ const branchHash = computeBranchHash({
1137
+ appName,
1138
+ deploymentTargetRole: ohEnv.deploymentTargetRole,
1139
+ account,
1140
+ region,
1141
+ branchName
1142
+ });
1143
+ const releaseBranchHash = (0, import_utils2.hashString)(
1131
1144
  [
1132
1145
  appName,
1133
1146
  ohEnv.deploymentTargetRole,
@@ -1137,7 +1150,7 @@ var OpenHiService = class extends import_aws_cdk_lib4.Stack {
1137
1150
  ].join("-"),
1138
1151
  6
1139
1152
  );
1140
- const stackHash = (0, import_utils.hashString)(
1153
+ const stackHash = (0, import_utils2.hashString)(
1141
1154
  [
1142
1155
  appName,
1143
1156
  ohEnv.deploymentTargetRole,
@@ -1411,7 +1424,10 @@ var CognitoUserPoolClient = class extends import_aws_cognito2.UserPoolClient {
1411
1424
  authorizationCodeGrant: true,
1412
1425
  implicitCodeGrant: true
1413
1426
  },
1414
- callbackUrls: [`https://localhost:3000/oauth/callback`]
1427
+ callbackUrls: [
1428
+ `http://localhost:3000/oauth/callback`,
1429
+ `https://localhost:3000/oauth/callback`
1430
+ ]
1415
1431
  },
1416
1432
  /**
1417
1433
  * Overrideable props
@@ -2415,6 +2431,10 @@ var _StaticHosting = class _StaticHosting extends import_constructs9.Construct {
2415
2431
  originAccessLevels: [import_aws_cloudfront.AccessLevel.READ]
2416
2432
  });
2417
2433
  const hasCustomDomain = props.certificate !== void 0 && props.hostedZone !== void 0 && props.domainNames !== void 0 && props.domainNames.length > 0;
2434
+ const additionalBehaviors = this.buildRestApiBehaviors(
2435
+ stack.branchHash,
2436
+ props.restApi
2437
+ );
2418
2438
  this.distribution = new import_aws_cloudfront.Distribution(this, "distribution", {
2419
2439
  comment: `Static hosting distribution for ${props.description ?? id}`,
2420
2440
  ...hasCustomDomain ? {
@@ -2435,6 +2455,7 @@ var _StaticHosting = class _StaticHosting extends import_constructs9.Construct {
2435
2455
  }
2436
2456
  ]
2437
2457
  },
2458
+ ...additionalBehaviors !== void 0 && { additionalBehaviors },
2438
2459
  ...props.distributionProps
2439
2460
  });
2440
2461
  if (hasCustomDomain) {
@@ -2473,6 +2494,51 @@ var _StaticHosting = class _StaticHosting extends import_constructs9.Construct {
2473
2494
  description: `Static hosting distribution ID (${props.description ?? id})`
2474
2495
  });
2475
2496
  }
2497
+ /**
2498
+ * Builds the `/api/*` and `/api/control/runtime-config` behaviors backed
2499
+ * by the REST API custom-domain origin. Returns `undefined` when no
2500
+ * `restApi` prop is supplied so the Distribution stays S3-only.
2501
+ */
2502
+ buildRestApiBehaviors(branchHash, restApi) {
2503
+ if (restApi === void 0) {
2504
+ return void 0;
2505
+ }
2506
+ const apiOrigin = new import_aws_cloudfront_origins.HttpOrigin(restApi.domainName, {
2507
+ protocolPolicy: import_aws_cloudfront.OriginProtocolPolicy.HTTPS_ONLY
2508
+ });
2509
+ const runtimeConfigCachePolicy = new import_aws_cloudfront.CachePolicy(
2510
+ this,
2511
+ "runtime-config-cache-policy",
2512
+ {
2513
+ cachePolicyName: `static-hosting-runtime-config-${branchHash}`,
2514
+ comment: "/api/control/runtime-config: cache key includes only `v` so the bundle's deploy-hash bust works automatically.",
2515
+ defaultTtl: restApi.runtimeConfigCacheTtl?.defaultTtl ?? import_aws_cdk_lib11.Duration.minutes(5),
2516
+ minTtl: import_aws_cdk_lib11.Duration.seconds(0),
2517
+ maxTtl: restApi.runtimeConfigCacheTtl?.maxTtl ?? import_aws_cdk_lib11.Duration.hours(1),
2518
+ headerBehavior: import_aws_cloudfront.CacheHeaderBehavior.none(),
2519
+ queryStringBehavior: import_aws_cloudfront.CacheQueryStringBehavior.allowList("v"),
2520
+ cookieBehavior: import_aws_cloudfront.CacheCookieBehavior.none(),
2521
+ enableAcceptEncodingGzip: true,
2522
+ enableAcceptEncodingBrotli: true
2523
+ }
2524
+ );
2525
+ return {
2526
+ "/api/control/runtime-config": {
2527
+ origin: apiOrigin,
2528
+ viewerProtocolPolicy: import_aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
2529
+ allowedMethods: import_aws_cloudfront.AllowedMethods.ALLOW_GET_HEAD_OPTIONS,
2530
+ cachePolicy: runtimeConfigCachePolicy,
2531
+ originRequestPolicy: import_aws_cloudfront.OriginRequestPolicy.ALL_VIEWER_EXCEPT_HOST_HEADER
2532
+ },
2533
+ "/api/*": {
2534
+ origin: apiOrigin,
2535
+ viewerProtocolPolicy: import_aws_cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
2536
+ allowedMethods: import_aws_cloudfront.AllowedMethods.ALLOW_ALL,
2537
+ cachePolicy: import_aws_cloudfront.CachePolicy.CACHING_DISABLED,
2538
+ originRequestPolicy: import_aws_cloudfront.OriginRequestPolicy.ALL_VIEWER_EXCEPT_HOST_HEADER
2539
+ }
2540
+ };
2541
+ }
2476
2542
  };
2477
2543
  /**
2478
2544
  * SSM parameter name for the S3 bucket ARN.
@@ -6834,6 +6900,7 @@ var import_aws_iam7 = require("aws-cdk-lib/aws-iam");
6834
6900
  var import_aws_route534 = require("aws-cdk-lib/aws-route53");
6835
6901
  var import_aws_route53_targets2 = require("aws-cdk-lib/aws-route53-targets");
6836
6902
  var import_core2 = require("aws-cdk-lib/core");
6903
+ var import_constructs20 = require("constructs");
6837
6904
 
6838
6905
  // src/data/lambda/cors-options-lambda.ts
6839
6906
  var import_node_fs10 = __toESM(require("fs"));
@@ -6890,7 +6957,8 @@ var RestApiLambda = class extends import_constructs19.Construct {
6890
6957
  OPENHI_PG_CLUSTER_ARN: props.postgresClusterArn,
6891
6958
  OPENHI_PG_SECRET_ARN: props.postgresSecretArn,
6892
6959
  OPENHI_PG_DATABASE: props.postgresDatabase,
6893
- OPENHI_PG_SCHEMA: props.postgresSchema
6960
+ OPENHI_PG_SCHEMA: props.postgresSchema,
6961
+ ...props.extraEnvironment
6894
6962
  },
6895
6963
  bundling: {
6896
6964
  minify: true,
@@ -6902,6 +6970,7 @@ var RestApiLambda = class extends import_constructs19.Construct {
6902
6970
 
6903
6971
  // src/services/open-hi-rest-api-service.ts
6904
6972
  var REST_API_BASE_URL_SSM_NAME = "REST_API_BASE_URL";
6973
+ var REST_API_DOMAIN_NAME_SSM_NAME = "REST_API_DOMAIN_NAME";
6905
6974
  var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
6906
6975
  /**
6907
6976
  * Returns an IHttpApi by looking up the REST API stack's HTTP API ID from SSM.
@@ -6923,6 +6992,18 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
6923
6992
  serviceType: _OpenHiRestApiService.SERVICE_TYPE
6924
6993
  });
6925
6994
  }
6995
+ /**
6996
+ * Returns the REST API's custom domain name (bare hostname, no scheme — e.g.
6997
+ * `api.example.com`) by looking it up from SSM. Use as the host for a
6998
+ * CloudFront `HttpOrigin` so the website's distribution can proxy `/api/*`
6999
+ * to this stack's API Gateway without per-branch DNS knowledge.
7000
+ */
7001
+ static restApiDomainNameFromConstruct(scope) {
7002
+ return DiscoverableStringParameter.valueForLookupName(scope, {
7003
+ ssmParamName: REST_API_DOMAIN_NAME_SSM_NAME,
7004
+ serviceType: _OpenHiRestApiService.SERVICE_TYPE
7005
+ });
7006
+ }
6926
7007
  get serviceType() {
6927
7008
  return _OpenHiRestApiService.SERVICE_TYPE;
6928
7009
  }
@@ -6934,6 +7015,7 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
6934
7015
  const certificate = this.createCertificate();
6935
7016
  const apiDomainName = this.createApiDomainNameString(hostedZone);
6936
7017
  this.createRestApiBaseUrlParameter(apiDomainName);
7018
+ this.createRestApiDomainNameParameter(apiDomainName);
6937
7019
  const domainName = this.createDomainName(hostedZone, certificate);
6938
7020
  this.rootHttpApi = this.createRootHttpApi(domainName);
6939
7021
  this.createRestApiLambdaAndRoutes(hostedZone, domainName);
@@ -6992,6 +7074,20 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
6992
7074
  description: "REST API base URL for this deployment (E2E, scripts)"
6993
7075
  });
6994
7076
  }
7077
+ /**
7078
+ * Creates the SSM parameter exposing the REST API's custom domain (bare
7079
+ * hostname, no scheme). Consumed by the website service as the CloudFront
7080
+ * `/api/*` origin host.
7081
+ * Look up via {@link OpenHiRestApiService.restApiDomainNameFromConstruct}.
7082
+ * Override to customize.
7083
+ */
7084
+ createRestApiDomainNameParameter(apiDomainName) {
7085
+ new DiscoverableStringParameter(this, "rest-api-domain-name-param", {
7086
+ ssmParamName: REST_API_DOMAIN_NAME_SSM_NAME,
7087
+ stringValue: apiDomainName,
7088
+ description: "REST API custom domain name (bare hostname) for cross-stack CloudFront origin lookup"
7089
+ });
7090
+ }
6995
7091
  /**
6996
7092
  * Creates the API Gateway custom domain name resource.
6997
7093
  * Override to customize.
@@ -7013,6 +7109,7 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
7013
7109
  const postgresSecretArn = DataStorePostgresReplica.secretArnFromConstruct(this);
7014
7110
  const postgresDatabase = DataStorePostgresReplica.databaseNameFromConstruct(this);
7015
7111
  const postgresSchema = getPostgresReplicaSchemaName(this.branchHash);
7112
+ const extraEnvironment = this.resolveRuntimeConfigEnvVars();
7016
7113
  const { lambda } = new RestApiLambda(this, {
7017
7114
  dynamoTableName: dataStoreTable.tableName,
7018
7115
  branchTagValue: this.branchName,
@@ -7020,7 +7117,8 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
7020
7117
  postgresClusterArn,
7021
7118
  postgresSecretArn,
7022
7119
  postgresDatabase,
7023
- postgresSchema
7120
+ postgresSchema,
7121
+ ...extraEnvironment !== void 0 && { extraEnvironment }
7024
7122
  });
7025
7123
  lambda.addToRolePolicy(
7026
7124
  new import_aws_iam7.PolicyStatement({
@@ -7161,6 +7259,32 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
7161
7259
  });
7162
7260
  return rootHttpApi;
7163
7261
  }
7262
+ /**
7263
+ * Builds the `OPENHI_RUNTIME_CONFIG_*` env-var map the REST API Lambda
7264
+ * exposes through `GET /control/runtime-config`. Returns `undefined` when
7265
+ * the `runtimeConfig` prop is omitted so no env vars are set.
7266
+ *
7267
+ * The three Cognito IDs are resolved via SSM lookups against the auth
7268
+ * stack from a dedicated sub-scope (`runtime-config`) so they don't
7269
+ * collide with the user-pool / user-pool-client constructs already
7270
+ * created in {@link createRootHttpApi}.
7271
+ */
7272
+ resolveRuntimeConfigEnvVars() {
7273
+ if (this.props.runtimeConfig === void 0) {
7274
+ return void 0;
7275
+ }
7276
+ const cognitoScope = new import_constructs20.Construct(this, "runtime-config");
7277
+ const userPool = OpenHiAuthService.userPoolFromConstruct(cognitoScope);
7278
+ const userPoolClient = OpenHiAuthService.userPoolClientFromConstruct(cognitoScope);
7279
+ const userPoolDomain = OpenHiAuthService.userPoolDomainFromConstruct(cognitoScope);
7280
+ return {
7281
+ OPENHI_RUNTIME_CONFIG_COGNITO_USER_POOL_ID: userPool.userPoolId,
7282
+ OPENHI_RUNTIME_CONFIG_COGNITO_USER_POOL_CLIENT_ID: userPoolClient.userPoolClientId,
7283
+ OPENHI_RUNTIME_CONFIG_COGNITO_DOMAIN: userPoolDomain.domainName,
7284
+ OPENHI_RUNTIME_CONFIG_COGNITO_REDIRECT_URI: this.props.runtimeConfig.cognitoRedirectUri,
7285
+ OPENHI_RUNTIME_CONFIG_API_BASE_URL: this.props.runtimeConfig.apiBaseUrl
7286
+ };
7287
+ }
7164
7288
  };
7165
7289
  _OpenHiRestApiService.SERVICE_TYPE = "rest-api";
7166
7290
  var OpenHiRestApiService = _OpenHiRestApiService;
@@ -7275,7 +7399,8 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7275
7399
  this.createFullDomainParameter();
7276
7400
  }
7277
7401
  if (props.createStaticContent !== false) {
7278
- this.staticContent = this.createStaticContent();
7402
+ const bucket = this.resolveStaticHostingBucket();
7403
+ this.staticContent = this.createStaticContent(bucket);
7279
7404
  }
7280
7405
  }
7281
7406
  /**
@@ -7326,14 +7451,26 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7326
7451
  * Lambda@Edge + 4 SSM params + DNS).
7327
7452
  */
7328
7453
  createStaticHosting(deps) {
7454
+ const restApi = this.props.restApi === true ? this.resolveRestApi() : void 0;
7329
7455
  return new StaticHosting(this, "static-hosting", {
7330
7456
  serviceType: _OpenHiWebsiteService.SERVICE_TYPE,
7331
7457
  certificate: deps.certificate,
7332
7458
  hostedZone: deps.hostedZone,
7333
7459
  domainNames: [this.fullDomain],
7334
- description: `OpenHI website (${this.fullDomain})`
7460
+ description: `OpenHI website (${this.fullDomain})`,
7461
+ ...restApi !== void 0 && { restApi }
7335
7462
  });
7336
7463
  }
7464
+ /**
7465
+ * Resolves the REST API custom-domain hostname from the rest-api stack's
7466
+ * `REST_API_DOMAIN_NAME` SSM parameter. Wrapped in a private method so
7467
+ * it can be overridden / stubbed in subclasses and tests.
7468
+ */
7469
+ resolveRestApi() {
7470
+ return {
7471
+ domainName: OpenHiRestApiService.restApiDomainNameFromConstruct(this)
7472
+ };
7473
+ }
7337
7474
  /**
7338
7475
  * Creates the SSM parameter that publishes the website's full domain.
7339
7476
  * Look up via {@link OpenHiWebsiteService.fullDomainFromConstruct}.
@@ -7347,21 +7484,18 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7347
7484
  });
7348
7485
  }
7349
7486
  /**
7350
- * Creates the StaticContent uploader. Always created so feature-branch
7351
- * deploys can publish content to their own sub-domain folder against the
7352
- * release-branch bucket.
7353
- *
7354
- * The destination bucket is resolved here so the construct never has to
7355
- * branch on release-vs-feature: on the release branch we pass the
7356
- * just-created {@link staticHosting} bucket directly (no SSM round-trip
7357
- * within a single stack); on every other branch we look up the bucket
7358
- * ARN published by the release-branch deploy, addressed against
7359
- * {@link OpenHiService.releaseBranchHash}.
7487
+ * Creates the StaticContent uploader. Receives the resolved static-hosting
7488
+ * bucket from the constructor on the release-branch deploy this is the
7489
+ * just-created {@link staticHosting} bucket (no SSM round-trip within a
7490
+ * single stack); on every other deploy it is imported from the bucket ARN
7491
+ * the release-branch deploy publishes to SSM, addressed against
7492
+ * {@link OpenHiService.releaseBranchHash}. See
7493
+ * {@link resolveStaticHostingBucket}.
7360
7494
  */
7361
- createStaticContent() {
7495
+ createStaticContent(bucket) {
7362
7496
  const { contentSourceDirectory, contentDestinationDirectory } = this.props;
7363
7497
  return new StaticContent(this, "static-content", {
7364
- bucket: this.resolveStaticHostingBucket(),
7498
+ bucket,
7365
7499
  contentSourceDirectory,
7366
7500
  contentDestinationDirectory,
7367
7501
  fullDomain: this.fullDomain
@@ -7369,7 +7503,7 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7369
7503
  }
7370
7504
  /**
7371
7505
  * Returns an {@link IBucket} pointing at the static-hosting bucket the
7372
- * uploader writes to. On the release-branch deploy this is the bucket
7506
+ * uploaders write to. On the release-branch deploy this is the bucket
7373
7507
  * just provisioned by {@link staticHosting}; on every other deploy it's
7374
7508
  * imported from the bucket ARN the release-branch deploy publishes to
7375
7509
  * SSM, addressed against {@link OpenHiService.releaseBranchHash}.
@@ -7403,7 +7537,7 @@ var import_aws_cdk_lib16 = require("aws-cdk-lib");
7403
7537
  var import_aws_iam8 = require("aws-cdk-lib/aws-iam");
7404
7538
  var import_aws_lambda13 = require("aws-cdk-lib/aws-lambda");
7405
7539
  var import_aws_lambda_nodejs13 = require("aws-cdk-lib/aws-lambda-nodejs");
7406
- var import_constructs20 = require("constructs");
7540
+ var import_constructs21 = require("constructs");
7407
7541
  function resolveHandlerEntry12(dirname, handlerName) {
7408
7542
  const sameDir = import_node_path12.default.join(dirname, handlerName);
7409
7543
  if (import_node_fs12.default.existsSync(sameDir)) {
@@ -7412,7 +7546,7 @@ function resolveHandlerEntry12(dirname, handlerName) {
7412
7546
  const libDir = import_node_path12.default.join(dirname, "..", "..", "..", "..", "lib", handlerName);
7413
7547
  return { entry: libDir, handler: "handler" };
7414
7548
  }
7415
- var OwningDeleteCascadeLambdas = class extends import_constructs20.Construct {
7549
+ var OwningDeleteCascadeLambdas = class extends import_constructs21.Construct {
7416
7550
  constructor(scope, props) {
7417
7551
  super(scope, "owning-delete-cascade-lambdas");
7418
7552
  const listResolved = resolveHandlerEntry12(
@@ -7479,8 +7613,8 @@ var import_aws_events9 = require("aws-cdk-lib/aws-events");
7479
7613
  var import_aws_events_targets5 = require("aws-cdk-lib/aws-events-targets");
7480
7614
  var import_aws_stepfunctions = require("aws-cdk-lib/aws-stepfunctions");
7481
7615
  var import_aws_stepfunctions_tasks = require("aws-cdk-lib/aws-stepfunctions-tasks");
7482
- var import_constructs21 = require("constructs");
7483
- var OwningDeleteCascadeWorkflow = class extends import_constructs21.Construct {
7616
+ var import_constructs22 = require("constructs");
7617
+ var OwningDeleteCascadeWorkflow = class extends import_constructs22.Construct {
7484
7618
  constructor(scope, props) {
7485
7619
  super(scope, "owning-delete-cascade-workflow");
7486
7620
  this.lambdas = new OwningDeleteCascadeLambdas(this, {
@@ -7653,7 +7787,7 @@ var import_aws_cdk_lib18 = require("aws-cdk-lib");
7653
7787
  var import_aws_iam9 = require("aws-cdk-lib/aws-iam");
7654
7788
  var import_aws_lambda14 = require("aws-cdk-lib/aws-lambda");
7655
7789
  var import_aws_lambda_nodejs14 = require("aws-cdk-lib/aws-lambda-nodejs");
7656
- var import_constructs22 = require("constructs");
7790
+ var import_constructs23 = require("constructs");
7657
7791
  function resolveHandlerEntry13(dirname, handlerName) {
7658
7792
  const sameDir = import_node_path13.default.join(dirname, handlerName);
7659
7793
  if (import_node_fs13.default.existsSync(sameDir)) {
@@ -7662,7 +7796,7 @@ function resolveHandlerEntry13(dirname, handlerName) {
7662
7796
  const libDir = import_node_path13.default.join(dirname, "..", "..", "..", "..", "lib", handlerName);
7663
7797
  return { entry: libDir, handler: "handler" };
7664
7798
  }
7665
- var RenameCascadeLambdas = class extends import_constructs22.Construct {
7799
+ var RenameCascadeLambdas = class extends import_constructs23.Construct {
7666
7800
  constructor(scope, props) {
7667
7801
  super(scope, "rename-cascade-lambdas");
7668
7802
  const listResolved = resolveHandlerEntry13(
@@ -7727,8 +7861,8 @@ var import_aws_events10 = require("aws-cdk-lib/aws-events");
7727
7861
  var import_aws_events_targets6 = require("aws-cdk-lib/aws-events-targets");
7728
7862
  var import_aws_stepfunctions2 = require("aws-cdk-lib/aws-stepfunctions");
7729
7863
  var import_aws_stepfunctions_tasks2 = require("aws-cdk-lib/aws-stepfunctions-tasks");
7730
- var import_constructs23 = require("constructs");
7731
- var RenameCascadeWorkflow = class extends import_constructs23.Construct {
7864
+ var import_constructs24 = require("constructs");
7865
+ var RenameCascadeWorkflow = class extends import_constructs24.Construct {
7732
7866
  constructor(scope, props) {
7733
7867
  super(scope, "rename-cascade-workflow");
7734
7868
  this.lambdas = new RenameCascadeLambdas(this, {
@@ -7967,6 +8101,7 @@ var RenameCascadeWorkflow = class extends import_constructs23.Construct {
7967
8101
  RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR,
7968
8102
  RENAME_CASCADE_SLOW_THRESHOLD_SECONDS,
7969
8103
  REST_API_BASE_URL_SSM_NAME,
8104
+ REST_API_DOMAIN_NAME_SSM_NAME,
7970
8105
  RenameCascadeLambdas,
7971
8106
  RenameCascadeWorkflow,
7972
8107
  RootGraphqlApi,
@@ -7992,6 +8127,7 @@ var RenameCascadeWorkflow = class extends import_constructs23.Construct {
7992
8127
  WorkflowDedupTableDuplicateError,
7993
8128
  buildFhirCurrentResourceChangeDetail,
7994
8129
  buildProvisionDefaultWorkspaceRequestedDetail,
8130
+ computeBranchHash,
7995
8131
  demoMembershipId,
7996
8132
  demoRoleAssignmentId,
7997
8133
  demoRolesForUserInTenant,