@openhi/constructs 0.0.134 → 0.0.136

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.d.mts CHANGED
@@ -2,7 +2,7 @@ import { OPEN_HI_STAGE, OPEN_HI_DEPLOYMENT_TARGET_ROLE, OpenHiEnvironmentConfig,
2
2
  import { Stage, StageProps, App, AppProps, Stack, StackProps, RemovalPolicy, Duration } from 'aws-cdk-lib';
3
3
  import { IConstruct, Construct } from 'constructs';
4
4
  import { Certificate, CertificateProps, ICertificate } from 'aws-cdk-lib/aws-certificatemanager';
5
- import { HttpApiProps, HttpApi, IHttpApi, DomainName } from 'aws-cdk-lib/aws-apigatewayv2';
5
+ import { HttpApiProps, HttpApi, IHttpApi, DomainName, CorsPreflightOptions } from 'aws-cdk-lib/aws-apigatewayv2';
6
6
  import { GraphqlApi, IGraphqlApi, GraphqlApiProps } from 'aws-cdk-lib/aws-appsync';
7
7
  import { UserPool, UserPoolProps, UserPoolClient, UserPoolClientProps, UserPoolDomain, UserPoolDomainProps, IUserPool, IUserPoolClient, IUserPoolDomain } from 'aws-cdk-lib/aws-cognito';
8
8
  import { Key, KeyProps, IKey } from 'aws-cdk-lib/aws-kms';
@@ -277,6 +277,24 @@ declare class OpenHiApp extends App {
277
277
  * @public
278
278
  */
279
279
  type OpenHiServiceType = "auth" | "rest-api" | "data" | "global" | "graphql-api" | "website";
280
+ /**
281
+ * Inputs to {@link OpenHiService.composeServiceDomain}. All fields are
282
+ * supplied by the caller — the helper itself reads no environment state.
283
+ *
284
+ * @public
285
+ */
286
+ interface ComposeServiceDomainOptions {
287
+ /** Sub-domain prefix (e.g. `"api"`, `"admin"`). */
288
+ readonly domainPrefix: string;
289
+ /** Branch name being deployed. */
290
+ readonly branchName: string;
291
+ /** Release branch name (e.g. `"main"`). */
292
+ readonly defaultReleaseBranch: string;
293
+ /** Per-branch child-zone prefix (typically `paramCase(branchName)` truncated). */
294
+ readonly childZonePrefix: string;
295
+ /** DNS zone name (e.g. `"dev.openhi.org"`). */
296
+ readonly zoneName: string;
297
+ }
280
298
  /**
281
299
  * Tag-key suffixes applied by every OpenHiService stack via Tags.of().
282
300
  * Full keys are composed `${appName}:${suffix}` — see {@link openHiTagKey}.
@@ -341,6 +359,46 @@ interface OpenHiServiceProps extends StackProps {
341
359
  declare abstract class OpenHiService extends Stack {
342
360
  ohEnv: OpenHiEnvironment;
343
361
  props: OpenHiServiceProps;
362
+ /**
363
+ * Compose the full per-deploy domain for an OpenHI service.
364
+ *
365
+ * On the release branch (`branchName === defaultReleaseBranch`), the
366
+ * full domain is `<domainPrefix>.<zoneName>`. On every other branch
367
+ * the per-PR preview hostname is
368
+ * `<domainPrefix>-<childZonePrefix>.<zoneName>`.
369
+ *
370
+ * Pure helper — reads no environment state. Subclasses expose thin
371
+ * statics (`composeFullDomain`) that fill in `domainPrefix` from their
372
+ * own service constant and delegate here.
373
+ */
374
+ static composeServiceDomain(opts: ComposeServiceDomainOptions): string;
375
+ /**
376
+ * Compute the `childZonePrefix` segment for a given branch — kebab-cased
377
+ * and truncated to {@link CHILD_ZONE_PREFIX_MAX_LENGTH}. Matches the
378
+ * per-instance {@link OpenHiService.childZonePrefix} getter so consumers
379
+ * can compose hostnames identical to the service's own without
380
+ * instantiating it.
381
+ */
382
+ static computeChildZonePrefix(branchName: string): string;
383
+ /**
384
+ * Resolve the branch context the service would compute internally given
385
+ * an environment and optional overrides. Mirrors the same defaulting
386
+ * (props override → JEST sentinel → `GIT_BRANCH_NAME` env → git
387
+ * detection on DEV → release branch on stage/prod) the
388
+ * {@link OpenHiService} constructor uses.
389
+ *
390
+ * Consumers (e.g. sibling stack entries) call this to predict the
391
+ * branch values a service will see at synth time so they can compose
392
+ * hostnames against the same inputs.
393
+ */
394
+ static resolveBranchContext(ohEnv: OpenHiEnvironment, overrides?: {
395
+ branchName?: string;
396
+ defaultReleaseBranch?: string;
397
+ }): {
398
+ branchName: string;
399
+ defaultReleaseBranch: string;
400
+ childZonePrefix: string;
401
+ };
344
402
  /**
345
403
  * The service/stack ID that was passed to the constructor.
346
404
  */
@@ -1794,35 +1852,12 @@ declare class OpenHiGlobalService extends OpenHiService {
1794
1852
  /**
1795
1853
  * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-rest-api-service.md
1796
1854
  */
1797
- /**
1798
- * Caller-supplied portion of the runtime-config payload exposed through the
1799
- * public `GET /control/runtime-config` route. The three Cognito IDs are
1800
- * resolved inside the service via SSM lookups against the auth stack, and
1801
- * the API base URL is derived from this stack's own custom domain — so the
1802
- * caller only supplies the OAuth redirect URI (depends on the website's
1803
- * domain).
1804
- */
1805
- interface OpenHiRestApiRuntimeConfig {
1806
- /** OAuth redirect URI registered on the User Pool client (e.g. https://admin.example.com/oauth/callback). */
1807
- readonly cognitoRedirectUri: string;
1808
- }
1809
1855
  interface OpenHiRestApiServiceProps extends OpenHiServiceProps {
1810
1856
  /**
1811
1857
  * Optional props passed through to the RootHttpApi (API Gateway HTTP API) construct.
1812
1858
  * Use corsPreflight (CDK CorsPreflightOptions) for CORS; other HttpApiProps (e.g. description, disableExecuteApiEndpoint) apply as well.
1813
1859
  */
1814
1860
  readonly rootHttpApiProps?: RootHttpApiProps;
1815
- /**
1816
- * Values exposed through the public `GET /control/runtime-config` route.
1817
- * When supplied, the service plumbs five `OPENHI_RUNTIME_CONFIG_*`
1818
- * environment variables to the REST API Lambda — the three Cognito IDs
1819
- * are resolved internally from the auth stack via SSM, the API base URL
1820
- * is derived from this stack's own custom domain (e.g.
1821
- * `https://api.<zone>`), and the OAuth redirect URI is passed verbatim.
1822
- *
1823
- * Omit to leave the route returning 500 (missing-env-var diagnostic).
1824
- */
1825
- readonly runtimeConfig?: OpenHiRestApiRuntimeConfig;
1826
1861
  }
1827
1862
  /**
1828
1863
  * SSM parameter name suffix for the REST API base URL.
@@ -1835,12 +1870,40 @@ declare const REST_API_BASE_URL_SSM_NAME = "REST_API_BASE_URL";
1835
1870
  * the CloudFront `/api/*` origin host.
1836
1871
  */
1837
1872
  declare const REST_API_DOMAIN_NAME_SSM_NAME = "REST_API_DOMAIN_NAME";
1873
+ /**
1874
+ * Localhost / 127.0.0.1 dev origins auto-injected into CORS `allowOrigins`
1875
+ * on every non-prod (`stageType !== "prod"`) REST API deploy. Both schemes
1876
+ * (`http`, `https`) and both ports the local SPAs use (`3000`, `5173`) are
1877
+ * covered so admin-console / on-site previews running on `localhost` or
1878
+ * `127.0.0.1` can call the API direct cross-origin without per-consumer
1879
+ * boilerplate.
1880
+ */
1881
+ declare const DEV_CORS_ALLOW_ORIGINS: ReadonlyArray<string>;
1838
1882
  /**
1839
1883
  * REST API service stack: HTTP API, custom domain, and Lambda; exports base URL via SSM.
1840
1884
  * Resources are created in protected methods; subclasses may override to customize.
1841
1885
  */
1842
1886
  declare class OpenHiRestApiService extends OpenHiService {
1843
1887
  static readonly SERVICE_TYPE: "rest-api";
1888
+ /**
1889
+ * Sub-domain prefix used by the REST API. Release-branch hostname is
1890
+ * `api.<zone>`; per-PR preview hostname is `api-<childZonePrefix>.<zone>`.
1891
+ */
1892
+ static readonly API_DOMAIN_PREFIX = "api";
1893
+ /**
1894
+ * Compose the REST API's full per-deploy domain. Thin wrapper over
1895
+ * {@link OpenHiService.composeServiceDomain} that pins `domainPrefix`
1896
+ * to {@link API_DOMAIN_PREFIX}.
1897
+ *
1898
+ * Use from sibling stacks that need to predict the API's hostname
1899
+ * before the REST API stack is synthesised.
1900
+ */
1901
+ static composeFullDomain(opts: {
1902
+ branchName: string;
1903
+ defaultReleaseBranch: string;
1904
+ childZonePrefix: string;
1905
+ zoneName: string;
1906
+ }): string;
1844
1907
  /**
1845
1908
  * Returns an IHttpApi by looking up the REST API stack's HTTP API ID from SSM.
1846
1909
  */
@@ -1884,6 +1947,9 @@ declare class OpenHiRestApiService extends OpenHiService {
1884
1947
  protected createCertificate(): ICertificate;
1885
1948
  /**
1886
1949
  * Returns the API domain name string (e.g. api.example.com or api-\{prefix\}.example.com).
1950
+ * Delegates to {@link OpenHiRestApiService.composeFullDomain} so the
1951
+ * release-vs-feature composition stays in one place; picks up
1952
+ * `this.defaultReleaseBranch` (not a hard-coded `"main"`).
1887
1953
  * Override to customize.
1888
1954
  */
1889
1955
  protected createApiDomainNameString(hostedZone: IHostedZone): string;
@@ -1917,18 +1983,24 @@ declare class OpenHiRestApiService extends OpenHiService {
1917
1983
  * Override to customize.
1918
1984
  */
1919
1985
  protected createRootHttpApi(domainName: DomainName): RootHttpApi;
1986
+ /**
1987
+ * Builds the full `CorsPreflightOptions` from a merged origins array,
1988
+ * filling defaults for `allowMethods`/`allowHeaders`/`allowCredentials`/
1989
+ * `maxAge` from the caller-supplied block when present.
1990
+ */
1991
+ protected buildCorsPreflightOptions(allowOrigins: ReadonlyArray<string>, cors: CorsPreflightOptions | undefined): CorsPreflightOptions;
1920
1992
  /**
1921
1993
  * Builds the `OPENHI_RUNTIME_CONFIG_*` env-var map the REST API Lambda
1922
- * exposes through `GET /control/runtime-config`. Returns `undefined` when
1923
- * the `runtimeConfig` prop is omitted so no env vars are set.
1924
- *
1925
- * The three Cognito IDs are resolved via SSM lookups against the auth
1926
- * stack from a dedicated sub-scope (`runtime-config`) so they don't
1927
- * collide with the user-pool / user-pool-client constructs already
1928
- * created in {@link createRootHttpApi}. `apiBaseUrl` is derived from
1929
- * this stack's own custom domain so callers don't have to hardcode it.
1994
+ * exposes through `GET /control/runtime-config`. The four values are
1995
+ * always populated the three Cognito IDs are resolved via SSM lookups
1996
+ * against the auth stack from a dedicated sub-scope (`runtime-config`)
1997
+ * so they don't collide with the user-pool / user-pool-client constructs
1998
+ * already created in {@link createRootHttpApi}, and `apiBaseUrl` is
1999
+ * derived from this stack's own custom domain. The OAuth callback URL
2000
+ * is no longer plumbed through the API — the admin-console derives it
2001
+ * client-side from `window.location.origin`.
1930
2002
  */
1931
- protected resolveRuntimeConfigEnvVars(): Record<string, string> | undefined;
2003
+ protected resolveRuntimeConfigEnvVars(): Record<string, string>;
1932
2004
  }
1933
2005
 
1934
2006
  /**
@@ -2334,6 +2406,17 @@ interface OpenHiWebsiteServiceProps extends OpenHiServiceProps {
2334
2406
  * (e.g. www.example.com).
2335
2407
  */
2336
2408
  declare const SSM_PARAM_NAME_FULL_DOMAIN = "WEBSITE_FULL_DOMAIN";
2409
+ /**
2410
+ * Sub-domain prefix the openhi admin console is deployed under. The
2411
+ * website-service deploys at `admin.<zone>` (release branch) or
2412
+ * `admin-<childZonePrefix>.<zone>` (per-PR), so any stack that needs to
2413
+ * reference the admin console's hostname — most notably the REST API
2414
+ * stack composing its CORS `allowOrigins` — should import this constant
2415
+ * rather than redeclaring the literal.
2416
+ *
2417
+ * @public
2418
+ */
2419
+ declare const ADMIN_DOMAIN_PREFIX = "admin";
2337
2420
  /**
2338
2421
  * Website service stack. Release-branch deploys compose `StaticHosting`
2339
2422
  * (bucket + CloudFront distribution with a wildcard SAN for per-PR
@@ -2348,6 +2431,28 @@ declare const SSM_PARAM_NAME_FULL_DOMAIN = "WEBSITE_FULL_DOMAIN";
2348
2431
  */
2349
2432
  declare class OpenHiWebsiteService extends OpenHiService {
2350
2433
  static readonly SERVICE_TYPE: "website";
2434
+ /**
2435
+ * Default `domainPrefix` for this service when none is supplied.
2436
+ * Release-branch hostname is `www.<zone>`; per-PR preview hostname is
2437
+ * `www-<childZonePrefix>.<zone>`.
2438
+ */
2439
+ static readonly DEFAULT_DOMAIN_PREFIX = "www";
2440
+ /**
2441
+ * Compose the website's full per-deploy domain. Thin wrapper over
2442
+ * {@link OpenHiService.composeServiceDomain} that fills in
2443
+ * {@link DEFAULT_DOMAIN_PREFIX} when `domainPrefix` is omitted.
2444
+ *
2445
+ * Use from sibling stacks that need to predict the website's hostname
2446
+ * before the website stack is synthesised — e.g. the REST API stack
2447
+ * computing its CORS `allowOrigins` for the admin-console.
2448
+ */
2449
+ static composeFullDomain(opts: {
2450
+ domainPrefix?: string;
2451
+ branchName: string;
2452
+ defaultReleaseBranch: string;
2453
+ childZonePrefix: string;
2454
+ zoneName: string;
2455
+ }): string;
2351
2456
  /**
2352
2457
  * Looks up the static-hosting bucket ARN published by the release-branch
2353
2458
  * deploy of this service.
@@ -2431,13 +2536,16 @@ declare class OpenHiWebsiteService extends OpenHiService {
2431
2536
  * every other deploy serves a per-PR preview at
2432
2537
  * `\<domainPrefix\>-\<childZonePrefix\>.\<zone\>`
2433
2538
  * (e.g. `admin-feat-1093-patient-migration.dev.openhi.org`).
2539
+ *
2540
+ * Delegates to {@link OpenHiWebsiteService.composeFullDomain} so the
2541
+ * release-vs-feature composition stays in one place.
2434
2542
  */
2435
2543
  protected computeFullDomain(hostedZone: IHostedZone): string;
2436
2544
  /**
2437
2545
  * Returns the sub-domain label (left of the zone) for the current
2438
- * deploy. Used both for {@link fullDomain} and for the per-branch S3
2439
- * key prefix passed to {@link StaticContent} so the upload prefix
2440
- * always matches the served hostname.
2546
+ * deploy. Used for the per-branch S3 key prefix passed to
2547
+ * {@link StaticContent} so the upload prefix always matches the
2548
+ * served hostname.
2441
2549
  *
2442
2550
  * Non-release deploys compose the per-PR slug as
2443
2551
  * `\<domainPrefix\>-\<childZonePrefix\>`, mirroring the REST API's
@@ -2694,4 +2802,4 @@ declare class RenameCascadeWorkflow extends Construct {
2694
2802
  constructor(scope: Construct, props: RenameCascadeWorkflowProps);
2695
2803
  }
2696
2804
 
2697
- export { type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, type ComputeBranchHashOptions, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DataEventBus, type DataEventBusOptions, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, type DemoWorkspaceDataPlaneFixtures, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, type FhirCurrentResourceChangeDetail, type GrantConsumerOptions, HostingMode, 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, type OpenHiRestApiRuntimeConfig, OpenHiRestApiService, type OpenHiRestApiServiceProps, OpenHiService, type OpenHiServiceProps, type OpenHiServiceType, OpenHiStage, type OpenHiStageProps, OpenHiWebsiteService, type OpenHiWebsiteServiceProps, OpsEventBus, OwningDeleteCascadeLambdas, type OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflow, type OwningDeleteCascadeWorkflowProps, PER_BRANCH_PREVIEW_PREFIX, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PerBranchHostname, type PerBranchHostnameProps, PlatformDeployBridge, PlatformDeployBridgeLambda, type PlatformDeployBridgeLambdaProps, type PlatformDeployBridgeProps, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambda, type ProvisionDefaultWorkspaceLambdaProps, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, type RenameCascadeLambdasProps, RenameCascadeWorkflow, type RenameCascadeWorkflowProps, 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, SSM_PARAM_NAME_FULL_DOMAIN, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, type SeedDemoDataLambdaProps, SeedDemoDataWorkflow, type SeedDemoDataWorkflowProps, SeedSystemDataLambda, type SeedSystemDataLambdaProps, SeedSystemDataWorkflow, type SeedSystemDataWorkflowProps, StaticContent, type StaticContentProps, StaticHosting, type StaticHostingProps, UserOnboardingWorkflow, type UserOnboardingWorkflowProps, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, type WorkflowDedupTableProps, buildFhirCurrentResourceChangeDetail, computeBranchHash, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey };
2805
+ export { ADMIN_DOMAIN_PREFIX, type BuildParameterNameProps, ChildHostedZone, type ChildHostedZoneProps, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, type ComposeServiceDomainOptions, type ComputeBranchHashOptions, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DEV_CORS_ALLOW_ORIGINS, DataEventBus, type DataEventBusOptions, DataStoreHistoricalArchive, type DataStoreHistoricalArchiveProps, DataStorePostgresReplica, type DataStorePostgresReplicaProps, type DemoWorkspaceDataPlaneFixtures, DiscoverableStringParameter, type DiscoverableStringParameterProps, DynamoDbDataStore, type DynamoDbDataStoreProps, type FhirCurrentResourceChangeDetail, type GrantConsumerOptions, HostingMode, 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, OpenHiWebsiteService, type OpenHiWebsiteServiceProps, OpsEventBus, OwningDeleteCascadeLambdas, type OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflow, type OwningDeleteCascadeWorkflowProps, PER_BRANCH_PREVIEW_PREFIX, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PerBranchHostname, type PerBranchHostnameProps, PlatformDeployBridge, PlatformDeployBridgeLambda, type PlatformDeployBridgeLambdaProps, type PlatformDeployBridgeProps, PostAuthenticationLambda, PostConfirmationLambda, type PostConfirmationLambdaProps, PreTokenGenerationLambda, type PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambda, type ProvisionDefaultWorkspaceLambdaProps, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, type RenameCascadeLambdasProps, RenameCascadeWorkflow, type RenameCascadeWorkflowProps, 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, SSM_PARAM_NAME_FULL_DOMAIN, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, type SeedDemoDataLambdaProps, SeedDemoDataWorkflow, type SeedDemoDataWorkflowProps, SeedSystemDataLambda, type SeedSystemDataLambdaProps, SeedSystemDataWorkflow, type SeedSystemDataWorkflowProps, StaticContent, type StaticContentProps, StaticHosting, type StaticHostingProps, UserOnboardingWorkflow, type UserOnboardingWorkflowProps, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, type WorkflowDedupTableProps, buildFhirCurrentResourceChangeDetail, computeBranchHash, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey };
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Duration, RemovalPolicy, App, AppProps, Stage, StageProps, Stack, StackProps } from 'aws-cdk-lib';
2
2
  import { Construct, IConstruct } from 'constructs';
3
3
  import { ICertificate, Certificate, CertificateProps } from 'aws-cdk-lib/aws-certificatemanager';
4
- import { IHttpApi, HttpApiProps, HttpApi, DomainName } from 'aws-cdk-lib/aws-apigatewayv2';
4
+ import { IHttpApi, HttpApiProps, HttpApi, DomainName, CorsPreflightOptions } from 'aws-cdk-lib/aws-apigatewayv2';
5
5
  import { IGraphqlApi, GraphqlApi, GraphqlApiProps } from 'aws-cdk-lib/aws-appsync';
6
6
  import { UserPool, UserPoolProps, UserPoolClient, UserPoolClientProps, UserPoolDomain, UserPoolDomainProps, IUserPool, IUserPoolClient, IUserPoolDomain } from 'aws-cdk-lib/aws-cognito';
7
7
  import { Key, KeyProps, IKey } from 'aws-cdk-lib/aws-kms';
@@ -914,6 +914,24 @@ declare class OpenHiApp extends App {
914
914
  * @public
915
915
  */
916
916
  type OpenHiServiceType = "auth" | "rest-api" | "data" | "global" | "graphql-api" | "website";
917
+ /**
918
+ * Inputs to {@link OpenHiService.composeServiceDomain}. All fields are
919
+ * supplied by the caller — the helper itself reads no environment state.
920
+ *
921
+ * @public
922
+ */
923
+ interface ComposeServiceDomainOptions {
924
+ /** Sub-domain prefix (e.g. `"api"`, `"admin"`). */
925
+ readonly domainPrefix: string;
926
+ /** Branch name being deployed. */
927
+ readonly branchName: string;
928
+ /** Release branch name (e.g. `"main"`). */
929
+ readonly defaultReleaseBranch: string;
930
+ /** Per-branch child-zone prefix (typically `paramCase(branchName)` truncated). */
931
+ readonly childZonePrefix: string;
932
+ /** DNS zone name (e.g. `"dev.openhi.org"`). */
933
+ readonly zoneName: string;
934
+ }
917
935
  /**
918
936
  * Tag-key suffixes applied by every OpenHiService stack via Tags.of().
919
937
  * Full keys are composed `${appName}:${suffix}` — see {@link openHiTagKey}.
@@ -978,6 +996,46 @@ interface OpenHiServiceProps extends StackProps {
978
996
  declare abstract class OpenHiService extends Stack {
979
997
  ohEnv: OpenHiEnvironment;
980
998
  props: OpenHiServiceProps;
999
+ /**
1000
+ * Compose the full per-deploy domain for an OpenHI service.
1001
+ *
1002
+ * On the release branch (`branchName === defaultReleaseBranch`), the
1003
+ * full domain is `<domainPrefix>.<zoneName>`. On every other branch
1004
+ * the per-PR preview hostname is
1005
+ * `<domainPrefix>-<childZonePrefix>.<zoneName>`.
1006
+ *
1007
+ * Pure helper — reads no environment state. Subclasses expose thin
1008
+ * statics (`composeFullDomain`) that fill in `domainPrefix` from their
1009
+ * own service constant and delegate here.
1010
+ */
1011
+ static composeServiceDomain(opts: ComposeServiceDomainOptions): string;
1012
+ /**
1013
+ * Compute the `childZonePrefix` segment for a given branch — kebab-cased
1014
+ * and truncated to {@link CHILD_ZONE_PREFIX_MAX_LENGTH}. Matches the
1015
+ * per-instance {@link OpenHiService.childZonePrefix} getter so consumers
1016
+ * can compose hostnames identical to the service's own without
1017
+ * instantiating it.
1018
+ */
1019
+ static computeChildZonePrefix(branchName: string): string;
1020
+ /**
1021
+ * Resolve the branch context the service would compute internally given
1022
+ * an environment and optional overrides. Mirrors the same defaulting
1023
+ * (props override → JEST sentinel → `GIT_BRANCH_NAME` env → git
1024
+ * detection on DEV → release branch on stage/prod) the
1025
+ * {@link OpenHiService} constructor uses.
1026
+ *
1027
+ * Consumers (e.g. sibling stack entries) call this to predict the
1028
+ * branch values a service will see at synth time so they can compose
1029
+ * hostnames against the same inputs.
1030
+ */
1031
+ static resolveBranchContext(ohEnv: OpenHiEnvironment, overrides?: {
1032
+ branchName?: string;
1033
+ defaultReleaseBranch?: string;
1034
+ }): {
1035
+ branchName: string;
1036
+ defaultReleaseBranch: string;
1037
+ childZonePrefix: string;
1038
+ };
981
1039
  /**
982
1040
  * The service/stack ID that was passed to the constructor.
983
1041
  */
@@ -2431,35 +2489,12 @@ declare class OpenHiGlobalService extends OpenHiService {
2431
2489
  /**
2432
2490
  * @see sites/www-docs/content/packages/@openhi/constructs/services/open-hi-rest-api-service.md
2433
2491
  */
2434
- /**
2435
- * Caller-supplied portion of the runtime-config payload exposed through the
2436
- * public `GET /control/runtime-config` route. The three Cognito IDs are
2437
- * resolved inside the service via SSM lookups against the auth stack, and
2438
- * the API base URL is derived from this stack's own custom domain — so the
2439
- * caller only supplies the OAuth redirect URI (depends on the website's
2440
- * domain).
2441
- */
2442
- interface OpenHiRestApiRuntimeConfig {
2443
- /** OAuth redirect URI registered on the User Pool client (e.g. https://admin.example.com/oauth/callback). */
2444
- readonly cognitoRedirectUri: string;
2445
- }
2446
2492
  interface OpenHiRestApiServiceProps extends OpenHiServiceProps {
2447
2493
  /**
2448
2494
  * Optional props passed through to the RootHttpApi (API Gateway HTTP API) construct.
2449
2495
  * Use corsPreflight (CDK CorsPreflightOptions) for CORS; other HttpApiProps (e.g. description, disableExecuteApiEndpoint) apply as well.
2450
2496
  */
2451
2497
  readonly rootHttpApiProps?: RootHttpApiProps;
2452
- /**
2453
- * Values exposed through the public `GET /control/runtime-config` route.
2454
- * When supplied, the service plumbs five `OPENHI_RUNTIME_CONFIG_*`
2455
- * environment variables to the REST API Lambda — the three Cognito IDs
2456
- * are resolved internally from the auth stack via SSM, the API base URL
2457
- * is derived from this stack's own custom domain (e.g.
2458
- * `https://api.<zone>`), and the OAuth redirect URI is passed verbatim.
2459
- *
2460
- * Omit to leave the route returning 500 (missing-env-var diagnostic).
2461
- */
2462
- readonly runtimeConfig?: OpenHiRestApiRuntimeConfig;
2463
2498
  }
2464
2499
  /**
2465
2500
  * SSM parameter name suffix for the REST API base URL.
@@ -2472,12 +2507,40 @@ declare const REST_API_BASE_URL_SSM_NAME = "REST_API_BASE_URL";
2472
2507
  * the CloudFront `/api/*` origin host.
2473
2508
  */
2474
2509
  declare const REST_API_DOMAIN_NAME_SSM_NAME = "REST_API_DOMAIN_NAME";
2510
+ /**
2511
+ * Localhost / 127.0.0.1 dev origins auto-injected into CORS `allowOrigins`
2512
+ * on every non-prod (`stageType !== "prod"`) REST API deploy. Both schemes
2513
+ * (`http`, `https`) and both ports the local SPAs use (`3000`, `5173`) are
2514
+ * covered so admin-console / on-site previews running on `localhost` or
2515
+ * `127.0.0.1` can call the API direct cross-origin without per-consumer
2516
+ * boilerplate.
2517
+ */
2518
+ declare const DEV_CORS_ALLOW_ORIGINS: ReadonlyArray<string>;
2475
2519
  /**
2476
2520
  * REST API service stack: HTTP API, custom domain, and Lambda; exports base URL via SSM.
2477
2521
  * Resources are created in protected methods; subclasses may override to customize.
2478
2522
  */
2479
2523
  declare class OpenHiRestApiService extends OpenHiService {
2480
2524
  static readonly SERVICE_TYPE: "rest-api";
2525
+ /**
2526
+ * Sub-domain prefix used by the REST API. Release-branch hostname is
2527
+ * `api.<zone>`; per-PR preview hostname is `api-<childZonePrefix>.<zone>`.
2528
+ */
2529
+ static readonly API_DOMAIN_PREFIX = "api";
2530
+ /**
2531
+ * Compose the REST API's full per-deploy domain. Thin wrapper over
2532
+ * {@link OpenHiService.composeServiceDomain} that pins `domainPrefix`
2533
+ * to {@link API_DOMAIN_PREFIX}.
2534
+ *
2535
+ * Use from sibling stacks that need to predict the API's hostname
2536
+ * before the REST API stack is synthesised.
2537
+ */
2538
+ static composeFullDomain(opts: {
2539
+ branchName: string;
2540
+ defaultReleaseBranch: string;
2541
+ childZonePrefix: string;
2542
+ zoneName: string;
2543
+ }): string;
2481
2544
  /**
2482
2545
  * Returns an IHttpApi by looking up the REST API stack's HTTP API ID from SSM.
2483
2546
  */
@@ -2521,6 +2584,9 @@ declare class OpenHiRestApiService extends OpenHiService {
2521
2584
  protected createCertificate(): ICertificate;
2522
2585
  /**
2523
2586
  * Returns the API domain name string (e.g. api.example.com or api-\{prefix\}.example.com).
2587
+ * Delegates to {@link OpenHiRestApiService.composeFullDomain} so the
2588
+ * release-vs-feature composition stays in one place; picks up
2589
+ * `this.defaultReleaseBranch` (not a hard-coded `"main"`).
2524
2590
  * Override to customize.
2525
2591
  */
2526
2592
  protected createApiDomainNameString(hostedZone: IHostedZone): string;
@@ -2554,18 +2620,24 @@ declare class OpenHiRestApiService extends OpenHiService {
2554
2620
  * Override to customize.
2555
2621
  */
2556
2622
  protected createRootHttpApi(domainName: DomainName): RootHttpApi;
2623
+ /**
2624
+ * Builds the full `CorsPreflightOptions` from a merged origins array,
2625
+ * filling defaults for `allowMethods`/`allowHeaders`/`allowCredentials`/
2626
+ * `maxAge` from the caller-supplied block when present.
2627
+ */
2628
+ protected buildCorsPreflightOptions(allowOrigins: ReadonlyArray<string>, cors: CorsPreflightOptions | undefined): CorsPreflightOptions;
2557
2629
  /**
2558
2630
  * Builds the `OPENHI_RUNTIME_CONFIG_*` env-var map the REST API Lambda
2559
- * exposes through `GET /control/runtime-config`. Returns `undefined` when
2560
- * the `runtimeConfig` prop is omitted so no env vars are set.
2561
- *
2562
- * The three Cognito IDs are resolved via SSM lookups against the auth
2563
- * stack from a dedicated sub-scope (`runtime-config`) so they don't
2564
- * collide with the user-pool / user-pool-client constructs already
2565
- * created in {@link createRootHttpApi}. `apiBaseUrl` is derived from
2566
- * this stack's own custom domain so callers don't have to hardcode it.
2631
+ * exposes through `GET /control/runtime-config`. The four values are
2632
+ * always populated the three Cognito IDs are resolved via SSM lookups
2633
+ * against the auth stack from a dedicated sub-scope (`runtime-config`)
2634
+ * so they don't collide with the user-pool / user-pool-client constructs
2635
+ * already created in {@link createRootHttpApi}, and `apiBaseUrl` is
2636
+ * derived from this stack's own custom domain. The OAuth callback URL
2637
+ * is no longer plumbed through the API — the admin-console derives it
2638
+ * client-side from `window.location.origin`.
2567
2639
  */
2568
- protected resolveRuntimeConfigEnvVars(): Record<string, string> | undefined;
2640
+ protected resolveRuntimeConfigEnvVars(): Record<string, string>;
2569
2641
  }
2570
2642
 
2571
2643
  /**
@@ -2971,6 +3043,17 @@ interface OpenHiWebsiteServiceProps extends OpenHiServiceProps {
2971
3043
  * (e.g. www.example.com).
2972
3044
  */
2973
3045
  declare const SSM_PARAM_NAME_FULL_DOMAIN = "WEBSITE_FULL_DOMAIN";
3046
+ /**
3047
+ * Sub-domain prefix the openhi admin console is deployed under. The
3048
+ * website-service deploys at `admin.<zone>` (release branch) or
3049
+ * `admin-<childZonePrefix>.<zone>` (per-PR), so any stack that needs to
3050
+ * reference the admin console's hostname — most notably the REST API
3051
+ * stack composing its CORS `allowOrigins` — should import this constant
3052
+ * rather than redeclaring the literal.
3053
+ *
3054
+ * @public
3055
+ */
3056
+ declare const ADMIN_DOMAIN_PREFIX = "admin";
2974
3057
  /**
2975
3058
  * Website service stack. Release-branch deploys compose `StaticHosting`
2976
3059
  * (bucket + CloudFront distribution with a wildcard SAN for per-PR
@@ -2985,6 +3068,28 @@ declare const SSM_PARAM_NAME_FULL_DOMAIN = "WEBSITE_FULL_DOMAIN";
2985
3068
  */
2986
3069
  declare class OpenHiWebsiteService extends OpenHiService {
2987
3070
  static readonly SERVICE_TYPE: "website";
3071
+ /**
3072
+ * Default `domainPrefix` for this service when none is supplied.
3073
+ * Release-branch hostname is `www.<zone>`; per-PR preview hostname is
3074
+ * `www-<childZonePrefix>.<zone>`.
3075
+ */
3076
+ static readonly DEFAULT_DOMAIN_PREFIX = "www";
3077
+ /**
3078
+ * Compose the website's full per-deploy domain. Thin wrapper over
3079
+ * {@link OpenHiService.composeServiceDomain} that fills in
3080
+ * {@link DEFAULT_DOMAIN_PREFIX} when `domainPrefix` is omitted.
3081
+ *
3082
+ * Use from sibling stacks that need to predict the website's hostname
3083
+ * before the website stack is synthesised — e.g. the REST API stack
3084
+ * computing its CORS `allowOrigins` for the admin-console.
3085
+ */
3086
+ static composeFullDomain(opts: {
3087
+ domainPrefix?: string;
3088
+ branchName: string;
3089
+ defaultReleaseBranch: string;
3090
+ childZonePrefix: string;
3091
+ zoneName: string;
3092
+ }): string;
2988
3093
  /**
2989
3094
  * Looks up the static-hosting bucket ARN published by the release-branch
2990
3095
  * deploy of this service.
@@ -3068,13 +3173,16 @@ declare class OpenHiWebsiteService extends OpenHiService {
3068
3173
  * every other deploy serves a per-PR preview at
3069
3174
  * `\<domainPrefix\>-\<childZonePrefix\>.\<zone\>`
3070
3175
  * (e.g. `admin-feat-1093-patient-migration.dev.openhi.org`).
3176
+ *
3177
+ * Delegates to {@link OpenHiWebsiteService.composeFullDomain} so the
3178
+ * release-vs-feature composition stays in one place.
3071
3179
  */
3072
3180
  protected computeFullDomain(hostedZone: IHostedZone): string;
3073
3181
  /**
3074
3182
  * Returns the sub-domain label (left of the zone) for the current
3075
- * deploy. Used both for {@link fullDomain} and for the per-branch S3
3076
- * key prefix passed to {@link StaticContent} so the upload prefix
3077
- * always matches the served hostname.
3183
+ * deploy. Used for the per-branch S3 key prefix passed to
3184
+ * {@link StaticContent} so the upload prefix always matches the
3185
+ * served hostname.
3078
3186
  *
3079
3187
  * Non-release deploys compose the per-PR slug as
3080
3188
  * `\<domainPrefix\>-\<childZonePrefix\>`, mirroring the REST API's
@@ -3331,5 +3439,5 @@ declare class RenameCascadeWorkflow extends Construct {
3331
3439
  constructor(scope: Construct, props: RenameCascadeWorkflowProps);
3332
3440
  }
3333
3441
 
3334
- export { BRIDGED_STATUSES, CLOUDFORMATION_EVENT_SOURCE, CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, CONTROL_EVENT_BUS_NAME_ENV_VAR, ChildHostedZone, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DEMO_PERIOD, DEMO_TENANT_SPECS, DEMO_URN_SYSTEM, DEV_USERS, DataEventBus, DataStoreHistoricalArchive, DataStorePostgresReplica, DiscoverableStringParameter, DynamoDbDataStore, OPENHI_REPO_TAG_KEY_ENV_VAR, OPENHI_RESOURCE_URN_SYSTEM, OPENHI_TAG_KEY_PREFIX_ENV_VAR, OPENHI_TAG_SUFFIX_BRANCH_NAME, OPENHI_TAG_SUFFIX_REPO_NAME, OPENHI_TAG_SUFFIX_SERVICE_TYPE, OPENHI_TAG_SUFFIX_STAGE_TYPE, OWNING_DELETE_CASCADE_CONSUMER_NAME, OWNING_DELETE_CASCADE_DEFAULT_CONCURRENCY, OWNING_DELETE_CASCADE_STUCK_THRESHOLD_MINUTES, OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR, OpenHiApp, OpenHiAuthService, OpenHiDataService, OpenHiEnvironment, OpenHiGlobalService, OpenHiGraphqlService, OpenHiRestApiService, OpenHiService, OpenHiStage, OpenHiWebsiteService, OpsEventBus, OwningDeleteCascadeLambdas, OwningDeleteCascadeWorkflow, PER_BRANCH_PREVIEW_PREFIX, PLACEHOLDER_TENANT_ID, PLACEHOLDER_WORKSPACE_ID, PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM, PLATFORM_SCOPE_TENANT_ID, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PROVISION_DEFAULT_WORKSPACE_DETAIL_TYPE, PerBranchHostname, PlatformDeployBridge, PlatformDeployBridgeLambda, PostAuthenticationLambda, PostConfirmationLambda, PreTokenGenerationLambda, ProvisionDefaultWorkspaceLambda, RENAME_CASCADE_CONSUMER_NAME, RENAME_CASCADE_DEFAULT_CONCURRENCY, RENAME_CASCADE_FAILED_THRESHOLD, RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR, RENAME_CASCADE_SLOW_THRESHOLD_SECONDS, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, RenameCascadeWorkflow, RootGraphqlApi, RootHostedZone, RootHttpApi, RootWildcardCertificate, SEED_DEMO_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_ACTOR_SYSTEM, SEED_SYSTEM_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR, SSM_PARAM_NAME_FULL_DOMAIN, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, SeedDemoDataWorkflow, SeedSystemDataLambda, SeedSystemDataWorkflow, StaticContent, StaticHosting, USER_ONBOARDING_EVENT_SOURCE, UserOnboardingWorkflow, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, buildFhirCurrentResourceChangeDetail, buildProvisionDefaultWorkspaceRequestedDetail, computeBranchHash, demoMembershipId, demoRoleAssignmentId, demoRolesForUserInTenant, demoScenarioIdentifier, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey, openhiResourceIdentifier };
3335
- export type { BridgedStatus, BuildParameterNameProps, CascadeChunkInput, CascadeFinalizeInput, CascadeFinalizeOutput, CascadeListInput, CascadeListOutput, ChildHostedZoneProps, CloudFormationStackStatusChangeDetail, ComputeBranchHashOptions, DataEventBusOptions, DataStoreHistoricalArchiveProps, DataStorePostgresReplicaProps, DemoDevUser, DemoTenantSpec, DemoWorkspaceDataPlaneFixtures, DemoWorkspaceSpec, DiscoverableStringParameterProps, DynamoDbDataStoreProps, FhirCurrentResourceChangeDetail, GrantConsumerOptions, HostingMode, OpenHiAppProps, OpenHiAuthServiceProps, OpenHiDataServiceProps, OpenHiEnvironmentProps, OpenHiGlobalServiceProps, OpenHiGraphqlServiceProps, OpenHiRestApiRuntimeConfig, OpenHiRestApiServiceProps, OpenHiServiceProps, OpenHiServiceType, OpenHiStageProps, OpenHiWebsiteServiceProps, OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflowProps, PerBranchHostnameProps, PlatformDeployBridgeLambdaProps, PlatformDeployBridgeProps, PostConfirmationLambdaProps, PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambdaProps, ProvisionDefaultWorkspaceRequestedDetail, RenameCascadeChunkInput, RenameCascadeFinalizeInput, RenameCascadeFinalizeOutput, RenameCascadeLambdasProps, RenameCascadeListInput, RenameCascadeListOutput, RenameCascadeWorkflowProps, RootGraphqlApiProps, RootHttpApiProps, SeedDemoDataLambdaProps, SeedDemoDataWorkflowProps, SeedSystemDataLambdaProps, SeedSystemDataWorkflowProps, StaticContentProps, StaticHostingProps, UserOnboardingWorkflowProps, WorkflowDedupTableProps };
3442
+ export { ADMIN_DOMAIN_PREFIX, BRIDGED_STATUSES, CLOUDFORMATION_EVENT_SOURCE, CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, CONTROL_EVENT_BUS_NAME_ENV_VAR, ChildHostedZone, CognitoUserPool, CognitoUserPoolClient, CognitoUserPoolDomain, CognitoUserPoolKmsKey, ControlEventBus, DATA_STORE_CHANGE_DETAIL_MAX_UTF8_BYTES, DATA_STORE_CHANGE_DETAIL_TYPE, DATA_STORE_CHANGE_EVENT_SOURCE, DEFAULT_PREVIEW_EXPIRATION_DAYS, DEMO_DATA_PLANE_FIXTURES, DEMO_PERIOD, DEMO_TENANT_SPECS, DEMO_URN_SYSTEM, DEV_CORS_ALLOW_ORIGINS, DEV_USERS, DataEventBus, DataStoreHistoricalArchive, DataStorePostgresReplica, DiscoverableStringParameter, DynamoDbDataStore, OPENHI_REPO_TAG_KEY_ENV_VAR, OPENHI_RESOURCE_URN_SYSTEM, OPENHI_TAG_KEY_PREFIX_ENV_VAR, OPENHI_TAG_SUFFIX_BRANCH_NAME, OPENHI_TAG_SUFFIX_REPO_NAME, OPENHI_TAG_SUFFIX_SERVICE_TYPE, OPENHI_TAG_SUFFIX_STAGE_TYPE, OWNING_DELETE_CASCADE_CONSUMER_NAME, OWNING_DELETE_CASCADE_DEFAULT_CONCURRENCY, OWNING_DELETE_CASCADE_STUCK_THRESHOLD_MINUTES, OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR, OpenHiApp, OpenHiAuthService, OpenHiDataService, OpenHiEnvironment, OpenHiGlobalService, OpenHiGraphqlService, OpenHiRestApiService, OpenHiService, OpenHiStage, OpenHiWebsiteService, OpsEventBus, OwningDeleteCascadeLambdas, OwningDeleteCascadeWorkflow, PER_BRANCH_PREVIEW_PREFIX, PLACEHOLDER_TENANT_ID, PLACEHOLDER_WORKSPACE_ID, PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM, PLATFORM_SCOPE_TENANT_ID, POSTGRES_REPLICA_CLUSTER_ARN_SSM_NAME, POSTGRES_REPLICA_DATABASE_NAME_SSM_NAME, POSTGRES_REPLICA_SECRET_ARN_SSM_NAME, PROVISION_DEFAULT_WORKSPACE_DETAIL_TYPE, PerBranchHostname, PlatformDeployBridge, PlatformDeployBridgeLambda, PostAuthenticationLambda, PostConfirmationLambda, PreTokenGenerationLambda, ProvisionDefaultWorkspaceLambda, RENAME_CASCADE_CONSUMER_NAME, RENAME_CASCADE_DEFAULT_CONCURRENCY, RENAME_CASCADE_FAILED_THRESHOLD, RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR, RENAME_CASCADE_SLOW_THRESHOLD_SECONDS, REST_API_BASE_URL_SSM_NAME, REST_API_DOMAIN_NAME_SSM_NAME, RenameCascadeLambdas, RenameCascadeWorkflow, RootGraphqlApi, RootHostedZone, RootHttpApi, RootWildcardCertificate, SEED_DEMO_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_ACTOR_SYSTEM, SEED_SYSTEM_DATA_CONSUMER_NAME, SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR, SSM_PARAM_NAME_FULL_DOMAIN, STATIC_HOSTING_SERVICE_TYPE, SeedDemoDataLambda, SeedDemoDataWorkflow, SeedSystemDataLambda, SeedSystemDataWorkflow, StaticContent, StaticHosting, USER_ONBOARDING_EVENT_SOURCE, UserOnboardingWorkflow, WorkflowDedupConsumerNameInvalidError, WorkflowDedupTable, WorkflowDedupTableDuplicateError, buildFhirCurrentResourceChangeDetail, buildProvisionDefaultWorkspaceRequestedDetail, computeBranchHash, demoMembershipId, demoRoleAssignmentId, demoRolesForUserInTenant, demoScenarioIdentifier, getDynamoDbDataStoreTableName, getPostgresReplicaSchemaName, getWorkflowDedupTableName, openHiTagKey, openhiResourceIdentifier };
3443
+ export type { BridgedStatus, BuildParameterNameProps, CascadeChunkInput, CascadeFinalizeInput, CascadeFinalizeOutput, CascadeListInput, CascadeListOutput, ChildHostedZoneProps, CloudFormationStackStatusChangeDetail, ComposeServiceDomainOptions, ComputeBranchHashOptions, DataEventBusOptions, DataStoreHistoricalArchiveProps, DataStorePostgresReplicaProps, DemoDevUser, DemoTenantSpec, DemoWorkspaceDataPlaneFixtures, DemoWorkspaceSpec, DiscoverableStringParameterProps, DynamoDbDataStoreProps, FhirCurrentResourceChangeDetail, GrantConsumerOptions, HostingMode, OpenHiAppProps, OpenHiAuthServiceProps, OpenHiDataServiceProps, OpenHiEnvironmentProps, OpenHiGlobalServiceProps, OpenHiGraphqlServiceProps, OpenHiRestApiServiceProps, OpenHiServiceProps, OpenHiServiceType, OpenHiStageProps, OpenHiWebsiteServiceProps, OwningDeleteCascadeLambdasProps, OwningDeleteCascadeWorkflowProps, PerBranchHostnameProps, PlatformDeployBridgeLambdaProps, PlatformDeployBridgeProps, PostConfirmationLambdaProps, PreTokenGenerationLambdaProps, ProvisionDefaultWorkspaceLambdaProps, ProvisionDefaultWorkspaceRequestedDetail, RenameCascadeChunkInput, RenameCascadeFinalizeInput, RenameCascadeFinalizeOutput, RenameCascadeLambdasProps, RenameCascadeListInput, RenameCascadeListOutput, RenameCascadeWorkflowProps, RootGraphqlApiProps, RootHttpApiProps, SeedDemoDataLambdaProps, SeedDemoDataWorkflowProps, SeedSystemDataLambdaProps, SeedSystemDataWorkflowProps, StaticContentProps, StaticHostingProps, UserOnboardingWorkflowProps, WorkflowDedupTableProps };