@openhi/constructs 0.0.151 → 0.0.152

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
@@ -3101,11 +3101,15 @@ var OpenHiGlobalService = _OpenHiGlobalService;
3101
3101
  // src/workflows/control-plane/seed-demo-data/events.ts
3102
3102
  var import_types = require("@openhi/types");
3103
3103
  var import_workflows2 = __toESM(require_lib2());
3104
+
3105
+ // src/data/operations/control/membership-constraints/platform-scope-tenant-id.ts
3106
+ var PLATFORM_SCOPE_TENANT_ID = "platform";
3107
+
3108
+ // src/workflows/control-plane/seed-demo-data/events.ts
3104
3109
  var SEED_DEMO_DATA_CONSUMER_NAME = "seed-demo-data";
3105
3110
  var DEMO_URN_SYSTEM = "urn:openhi:demo";
3106
3111
  var OPENHI_RESOURCE_URN_SYSTEM = "http://openhi.org/";
3107
3112
  var DEMO_PERIOD = { start: "2026-01-01T00:00:00Z" };
3108
- var PLATFORM_SCOPE_TENANT_ID = "platform";
3109
3113
  var PLACEHOLDER_TENANT_ID = "placeholder-tenant-id";
3110
3114
  var PLACEHOLDER_WORKSPACE_ID = "placeholder-workspace-id";
3111
3115
  var DEV_USERS = [
@@ -6522,7 +6526,7 @@ var SeedDemoDataLambda = class extends import_constructs13.Construct {
6522
6526
  this.lambda.addToRolePolicy(
6523
6527
  new import_aws_iam3.PolicyStatement({
6524
6528
  effect: import_aws_iam3.Effect.ALLOW,
6525
- actions: ["dynamodb:PutItem", "dynamodb:UpdateItem"],
6529
+ actions: ["dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:Query"],
6526
6530
  resources: [props.dataStoreTable.tableArn]
6527
6531
  })
6528
6532
  );
@@ -6784,6 +6788,7 @@ var OpenHiDataService = _OpenHiDataService;
6784
6788
 
6785
6789
  // src/services/open-hi-website-service.ts
6786
6790
  var import_config6 = __toESM(require_lib());
6791
+ var import_aws_cdk_lib15 = require("aws-cdk-lib");
6787
6792
  var import_aws_s32 = require("aws-cdk-lib/aws-s3");
6788
6793
 
6789
6794
  // src/services/open-hi-rest-api-service.ts
@@ -7360,6 +7365,7 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7360
7365
  const isReleaseBranch = this.branchName === this.defaultReleaseBranch;
7361
7366
  const hostedZone = this.createHostedZone();
7362
7367
  this.fullDomain = this.computeFullDomain(hostedZone);
7368
+ this.createAdminConsoleEndpointOutput();
7363
7369
  const shouldCreateHostingInfra = props.createHostingInfrastructure ?? isReleaseBranch;
7364
7370
  if (shouldCreateHostingInfra) {
7365
7371
  const certificate = this.createCertificate();
@@ -7499,6 +7505,25 @@ var _OpenHiWebsiteService = class _OpenHiWebsiteService extends OpenHiService {
7499
7505
  description: "Full website domain (e.g. www.example.com)"
7500
7506
  });
7501
7507
  }
7508
+ /**
7509
+ * Adds a CloudFormation `AdminConsoleEndpoint` output exposing the
7510
+ * admin-console invocation URL (`https://<fullDomain>`) on every
7511
+ * deploy of this stack — release-branch and per-PR alike. The
7512
+ * configulator `aws-deploy-workflow` filters CFN outputs by the
7513
+ * `Endpoint$` logical-id suffix to surface them in the GitHub
7514
+ * Actions run summary and sticky PR comment, so the logical id is
7515
+ * pinned via {@link CfnOutput.overrideLogicalId} to keep the
7516
+ * literal key stable across synths.
7517
+ */
7518
+ createAdminConsoleEndpointOutput() {
7519
+ const output = new import_aws_cdk_lib15.CfnOutput(this, "admin-console-endpoint-output", {
7520
+ value: `https://${this.fullDomain}`,
7521
+ description: "Admin console endpoint for this deploy (https://<fullDomain>). Surfaced by the deploy workflow's sticky PR comment and job summary."
7522
+ });
7523
+ output.overrideLogicalId(
7524
+ _OpenHiWebsiteService.ADMIN_CONSOLE_ENDPOINT_OUTPUT_NAME
7525
+ );
7526
+ }
7502
7527
  /**
7503
7528
  * Creates the StaticContent uploader. Receives the resolved static-hosting
7504
7529
  * bucket from the constructor — on the release-branch deploy this is the
@@ -7565,6 +7590,15 @@ _OpenHiWebsiteService.SERVICE_TYPE = "website";
7565
7590
  * `www-<childZonePrefix>.<zone>`.
7566
7591
  */
7567
7592
  _OpenHiWebsiteService.DEFAULT_DOMAIN_PREFIX = "www";
7593
+ /**
7594
+ * CloudFormation logical key for the admin-console endpoint `CfnOutput`.
7595
+ * The configulator deploy workflow filters outputs whose logical id
7596
+ * matches the `Endpoint$` regex to surface them in the GitHub Actions
7597
+ * run summary and sticky PR comment, so the suffix must be `Endpoint`.
7598
+ * The logical id is pinned via {@link CfnOutput.overrideLogicalId} so
7599
+ * it does not pick up a synth-time hash suffix.
7600
+ */
7601
+ _OpenHiWebsiteService.ADMIN_CONSOLE_ENDPOINT_OUTPUT_NAME = "AdminConsoleEndpoint";
7568
7602
  var OpenHiWebsiteService = _OpenHiWebsiteService;
7569
7603
 
7570
7604
  // src/workflows/control-plane/user-onboarding/events.ts
@@ -7595,7 +7629,7 @@ var buildProvisionDefaultWorkspaceRequestedDetail = (event) => {
7595
7629
  // src/workflows/control-plane/user-onboarding/provision-default-workspace-lambda.ts
7596
7630
  var import_node_fs11 = __toESM(require("fs"));
7597
7631
  var import_node_path11 = __toESM(require("path"));
7598
- var import_aws_cdk_lib15 = require("aws-cdk-lib");
7632
+ var import_aws_cdk_lib16 = require("aws-cdk-lib");
7599
7633
  var import_aws_events8 = require("aws-cdk-lib/aws-events");
7600
7634
  var import_aws_events_targets4 = require("aws-cdk-lib/aws-events-targets");
7601
7635
  var import_aws_iam6 = require("aws-cdk-lib/aws-iam");
@@ -7642,7 +7676,7 @@ var ProvisionDefaultWorkspaceLambda = class extends import_constructs20.Construc
7642
7676
  targets: [
7643
7677
  new import_aws_events_targets4.LambdaFunction(this.lambda, {
7644
7678
  retryAttempts: 2,
7645
- maxEventAge: import_aws_cdk_lib15.Duration.hours(2)
7679
+ maxEventAge: import_aws_cdk_lib16.Duration.hours(2)
7646
7680
  })
7647
7681
  ]
7648
7682
  });
@@ -8081,7 +8115,7 @@ var OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR = "OWNING_DELETE_OPS_EVENT_BUS_NAME";
8081
8115
  // src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-lambdas.ts
8082
8116
  var import_node_fs12 = __toESM(require("fs"));
8083
8117
  var import_node_path12 = __toESM(require("path"));
8084
- var import_aws_cdk_lib16 = require("aws-cdk-lib");
8118
+ var import_aws_cdk_lib17 = require("aws-cdk-lib");
8085
8119
  var import_aws_iam8 = require("aws-cdk-lib/aws-iam");
8086
8120
  var import_aws_lambda13 = require("aws-cdk-lib/aws-lambda");
8087
8121
  var import_aws_lambda_nodejs13 = require("aws-cdk-lib/aws-lambda-nodejs");
@@ -8105,7 +8139,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs22.Construct {
8105
8139
  entry: listResolved.entry,
8106
8140
  runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
8107
8141
  memorySize: 512,
8108
- timeout: import_aws_cdk_lib16.Duration.minutes(1),
8142
+ timeout: import_aws_cdk_lib17.Duration.minutes(1),
8109
8143
  environment: {
8110
8144
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
8111
8145
  }
@@ -8119,7 +8153,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs22.Construct {
8119
8153
  entry: deleteResolved.entry,
8120
8154
  runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
8121
8155
  memorySize: 512,
8122
- timeout: import_aws_cdk_lib16.Duration.minutes(1),
8156
+ timeout: import_aws_cdk_lib17.Duration.minutes(1),
8123
8157
  environment: {
8124
8158
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
8125
8159
  }
@@ -8138,7 +8172,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs22.Construct {
8138
8172
  entry: finalizeResolved.entry,
8139
8173
  runtime: import_aws_lambda13.Runtime.NODEJS_LATEST,
8140
8174
  memorySize: 512,
8141
- timeout: import_aws_cdk_lib16.Duration.minutes(1),
8175
+ timeout: import_aws_cdk_lib17.Duration.minutes(1),
8142
8176
  environment: {
8143
8177
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
8144
8178
  [OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
@@ -8156,7 +8190,7 @@ var OwningDeleteCascadeLambdas = class extends import_constructs22.Construct {
8156
8190
  };
8157
8191
 
8158
8192
  // src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-workflow.ts
8159
- var import_aws_cdk_lib17 = require("aws-cdk-lib");
8193
+ var import_aws_cdk_lib18 = require("aws-cdk-lib");
8160
8194
  var import_aws_events9 = require("aws-cdk-lib/aws-events");
8161
8195
  var import_aws_events_targets5 = require("aws-cdk-lib/aws-events-targets");
8162
8196
  var import_aws_stepfunctions = require("aws-cdk-lib/aws-stepfunctions");
@@ -8271,7 +8305,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs23.Construct {
8271
8305
  }
8272
8306
  });
8273
8307
  const interPageWait = new import_aws_stepfunctions.Wait(this, "inter-page-wait", {
8274
- time: import_aws_stepfunctions.WaitTime.duration(import_aws_cdk_lib17.Duration.seconds(0))
8308
+ time: import_aws_stepfunctions.WaitTime.duration(import_aws_cdk_lib18.Duration.seconds(0))
8275
8309
  });
8276
8310
  const isExhausted = new import_aws_stepfunctions.Choice(this, "is-exhausted");
8277
8311
  const finalize = new import_aws_stepfunctions_tasks.LambdaInvoke(this, "finalize", {
@@ -8302,7 +8336,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs23.Construct {
8302
8336
  // Long timeout because real-world cascades can run minutes when
8303
8337
  // a workspace has thousands of members. The stuck-cascade alarm
8304
8338
  // fires at 15 minutes; the state machine itself does not abort.
8305
- timeout: import_aws_cdk_lib17.Duration.hours(2)
8339
+ timeout: import_aws_cdk_lib18.Duration.hours(2)
8306
8340
  });
8307
8341
  this.rule = new import_aws_events9.Rule(this, "rule", {
8308
8342
  eventBus: props.dataEventBus,
@@ -8313,7 +8347,7 @@ var OwningDeleteCascadeWorkflow = class extends import_constructs23.Construct {
8313
8347
  targets: [
8314
8348
  new import_aws_events_targets5.SfnStateMachine(this.stateMachine, {
8315
8349
  retryAttempts: 2,
8316
- maxEventAge: import_aws_cdk_lib17.Duration.hours(2)
8350
+ maxEventAge: import_aws_cdk_lib18.Duration.hours(2)
8317
8351
  })
8318
8352
  ]
8319
8353
  });
@@ -8331,7 +8365,7 @@ var RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR = "RENAME_CASCADE_OPS_EVENT_BUS_NAME";
8331
8365
  // src/workflows/control-plane/rename-cascade/rename-cascade-lambdas.ts
8332
8366
  var import_node_fs13 = __toESM(require("fs"));
8333
8367
  var import_node_path13 = __toESM(require("path"));
8334
- var import_aws_cdk_lib18 = require("aws-cdk-lib");
8368
+ var import_aws_cdk_lib19 = require("aws-cdk-lib");
8335
8369
  var import_aws_iam9 = require("aws-cdk-lib/aws-iam");
8336
8370
  var import_aws_lambda14 = require("aws-cdk-lib/aws-lambda");
8337
8371
  var import_aws_lambda_nodejs14 = require("aws-cdk-lib/aws-lambda-nodejs");
@@ -8355,7 +8389,7 @@ var RenameCascadeLambdas = class extends import_constructs24.Construct {
8355
8389
  entry: listResolved.entry,
8356
8390
  runtime: import_aws_lambda14.Runtime.NODEJS_LATEST,
8357
8391
  memorySize: 512,
8358
- timeout: import_aws_cdk_lib18.Duration.minutes(1),
8392
+ timeout: import_aws_cdk_lib19.Duration.minutes(1),
8359
8393
  environment: {
8360
8394
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
8361
8395
  }
@@ -8369,7 +8403,7 @@ var RenameCascadeLambdas = class extends import_constructs24.Construct {
8369
8403
  entry: rewriteResolved.entry,
8370
8404
  runtime: import_aws_lambda14.Runtime.NODEJS_LATEST,
8371
8405
  memorySize: 512,
8372
- timeout: import_aws_cdk_lib18.Duration.minutes(1),
8406
+ timeout: import_aws_cdk_lib19.Duration.minutes(1),
8373
8407
  environment: {
8374
8408
  DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
8375
8409
  }
@@ -8388,7 +8422,7 @@ var RenameCascadeLambdas = class extends import_constructs24.Construct {
8388
8422
  entry: finalizeResolved.entry,
8389
8423
  runtime: import_aws_lambda14.Runtime.NODEJS_LATEST,
8390
8424
  memorySize: 512,
8391
- timeout: import_aws_cdk_lib18.Duration.minutes(1),
8425
+ timeout: import_aws_cdk_lib19.Duration.minutes(1),
8392
8426
  environment: {
8393
8427
  [RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
8394
8428
  }
@@ -8404,7 +8438,7 @@ var RenameCascadeLambdas = class extends import_constructs24.Construct {
8404
8438
  };
8405
8439
 
8406
8440
  // src/workflows/control-plane/rename-cascade/rename-cascade-workflow.ts
8407
- var import_aws_cdk_lib19 = require("aws-cdk-lib");
8441
+ var import_aws_cdk_lib20 = require("aws-cdk-lib");
8408
8442
  var import_aws_events10 = require("aws-cdk-lib/aws-events");
8409
8443
  var import_aws_events_targets6 = require("aws-cdk-lib/aws-events-targets");
8410
8444
  var import_aws_stepfunctions2 = require("aws-cdk-lib/aws-stepfunctions");
@@ -8554,7 +8588,7 @@ var RenameCascadeWorkflow = class extends import_constructs25.Construct {
8554
8588
  // Long timeout — large renames may rewrite thousands of rows;
8555
8589
  // the `CascadeSlow` alarm fires at 300s p99 but the state
8556
8590
  // machine itself does not abort.
8557
- timeout: import_aws_cdk_lib19.Duration.hours(2)
8591
+ timeout: import_aws_cdk_lib20.Duration.hours(2)
8558
8592
  });
8559
8593
  this.rule = new import_aws_events10.Rule(this, "rule", {
8560
8594
  eventBus: props.dataEventBus,
@@ -8565,7 +8599,7 @@ var RenameCascadeWorkflow = class extends import_constructs25.Construct {
8565
8599
  targets: [
8566
8600
  new import_aws_events_targets6.SfnStateMachine(this.stateMachine, {
8567
8601
  retryAttempts: 2,
8568
- maxEventAge: import_aws_cdk_lib19.Duration.hours(2)
8602
+ maxEventAge: import_aws_cdk_lib20.Duration.hours(2)
8569
8603
  })
8570
8604
  ]
8571
8605
  });