@openhi/constructs 0.0.127 → 0.0.129
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/{chunk-ZHMHLK3S.mjs → chunk-7BQHLC7U.mjs} +3 -3
- package/lib/{chunk-7WDX6GPO.mjs → chunk-AWYZJFPL.mjs} +3 -3
- package/lib/{chunk-AHYQFT4N.mjs → chunk-E6MCKJVS.mjs} +3 -3
- package/lib/{chunk-W4KR4CSL.mjs → chunk-M7Y3BOQW.mjs} +2 -2
- package/lib/chunk-M7Y3BOQW.mjs.map +1 -0
- package/lib/{chunk-U7L7T4XU.mjs → chunk-MVQWAIMC.mjs} +2 -2
- package/lib/{chunk-U7L7T4XU.mjs.map → chunk-MVQWAIMC.mjs.map} +1 -1
- package/lib/{chunk-VXX4I3EF.mjs → chunk-SVXLZCF7.mjs} +1 -1
- package/lib/{chunk-VXX4I3EF.mjs.map → chunk-SVXLZCF7.mjs.map} +1 -1
- package/lib/{chunk-YYRWDEG4.mjs → chunk-UT7ADSEJ.mjs} +3 -3
- package/lib/{chunk-YYRWDEG4.mjs.map → chunk-UT7ADSEJ.mjs.map} +1 -1
- package/lib/{chunk-6NBGYGFL.mjs → chunk-VZCPGQXA.mjs} +13 -12
- package/lib/chunk-VZCPGQXA.mjs.map +1 -0
- package/lib/{chunk-WXS3PUHR.mjs → chunk-WGA43MMY.mjs} +4 -4
- package/lib/{chunk-WQWFVEVX.mjs → chunk-X5E4YJGZ.mjs} +2 -2
- package/lib/{chunk-KO64HPWQ.mjs → chunk-ZWSGM6PZ.mjs} +2 -2
- package/lib/delete-chunk.handler.d.mts +1 -1
- package/lib/delete-chunk.handler.d.ts +1 -1
- package/lib/delete-chunk.handler.js +12 -11
- package/lib/delete-chunk.handler.js.map +1 -1
- package/lib/delete-chunk.handler.mjs +2 -2
- package/lib/delete-chunk.handler.mjs.map +1 -1
- package/lib/{events-BfrkMoBD.d.mts → events-COI0BuMM.d.mts} +1 -1
- package/lib/{events-BfrkMoBD.d.ts → events-COI0BuMM.d.ts} +1 -1
- package/lib/index.d.mts +21 -10
- package/lib/index.d.ts +21 -10
- package/lib/index.js +36 -16
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +30 -11
- package/lib/index.mjs.map +1 -1
- package/lib/list-chunks.handler.d.mts +1 -1
- package/lib/list-chunks.handler.d.ts +1 -1
- package/lib/list-chunks.handler.js +12 -11
- package/lib/list-chunks.handler.js.map +1 -1
- package/lib/list-chunks.handler.mjs +2 -2
- package/lib/list-chunks.handler.mjs.map +1 -1
- package/lib/platform-deploy-bridge.handler.d.mts +1 -1
- package/lib/platform-deploy-bridge.handler.d.ts +1 -1
- package/lib/platform-deploy-bridge.handler.js.map +1 -1
- package/lib/platform-deploy-bridge.handler.mjs +1 -1
- package/lib/pre-token-generation.handler.js +12 -11
- package/lib/pre-token-generation.handler.js.map +1 -1
- package/lib/pre-token-generation.handler.mjs +4 -4
- package/lib/provision-default-workspace.handler.js +12 -11
- package/lib/provision-default-workspace.handler.js.map +1 -1
- package/lib/provision-default-workspace.handler.mjs +4 -4
- package/lib/rename-list-targets.handler.d.mts +1 -1
- package/lib/rename-list-targets.handler.d.ts +1 -1
- package/lib/rename-list-targets.handler.js +12 -11
- package/lib/rename-list-targets.handler.js.map +1 -1
- package/lib/rename-list-targets.handler.mjs +2 -2
- package/lib/rename-list-targets.handler.mjs.map +1 -1
- package/lib/rename-rewrite-chunk.handler.d.mts +1 -1
- package/lib/rename-rewrite-chunk.handler.d.ts +1 -1
- package/lib/rename-rewrite-chunk.handler.js +12 -11
- package/lib/rename-rewrite-chunk.handler.js.map +1 -1
- package/lib/rename-rewrite-chunk.handler.mjs +2 -2
- package/lib/rename-rewrite-chunk.handler.mjs.map +1 -1
- package/lib/rest-api-lambda.handler.js +14 -13
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +9 -9
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.js +12 -11
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +5 -5
- package/lib/seed-system-data.handler.js +12 -11
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +2 -2
- package/lib/static-hosting.viewer-request-handler.d.mts +1 -1
- package/lib/static-hosting.viewer-request-handler.d.ts +1 -1
- package/lib/static-hosting.viewer-request-handler.js.map +1 -1
- package/lib/static-hosting.viewer-request-handler.mjs.map +1 -1
- package/package.json +5 -5
- package/lib/chunk-6NBGYGFL.mjs.map +0 -1
- package/lib/chunk-W4KR4CSL.mjs.map +0 -1
- /package/lib/{chunk-ZHMHLK3S.mjs.map → chunk-7BQHLC7U.mjs.map} +0 -0
- /package/lib/{chunk-7WDX6GPO.mjs.map → chunk-AWYZJFPL.mjs.map} +0 -0
- /package/lib/{chunk-AHYQFT4N.mjs.map → chunk-E6MCKJVS.mjs.map} +0 -0
- /package/lib/{chunk-WXS3PUHR.mjs.map → chunk-WGA43MMY.mjs.map} +0 -0
- /package/lib/{chunk-WQWFVEVX.mjs.map → chunk-X5E4YJGZ.mjs.map} +0 -0
- /package/lib/{chunk-KO64HPWQ.mjs.map → chunk-ZWSGM6PZ.mjs.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OWNING_DELETE_PROJECTION_ENTITY,
|
|
3
3
|
deleteOwningChildChunkOperation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M7Y3BOQW.mjs";
|
|
5
5
|
import "./chunk-ZM4GDHHC.mjs";
|
|
6
6
|
import "./chunk-QJDHVMKT.mjs";
|
|
7
7
|
import "./chunk-FYHBHHWK.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-VZCPGQXA.mjs";
|
|
9
9
|
import "./chunk-TRY7JGWO.mjs";
|
|
10
10
|
import "./chunk-LZOMFHX3.mjs";
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/workflows/control-plane/owning-delete-cascade/delete-chunk.handler.ts"],"sourcesContent":["/**\n * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/owning-delete-cascade/delete-chunk-handler.md\n *\n * Cascade Step Functions Map-iteration handler. Receives one chunk of\n *
|
|
1
|
+
{"version":3,"sources":["../src/workflows/control-plane/owning-delete-cascade/delete-chunk.handler.ts"],"sourcesContent":["/**\n * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/owning-delete-cascade/delete-chunk-handler.md\n *\n * Cascade Step Functions Map-iteration handler. Receives one chunk of\n * \\<=100 projection rows from the list-and-chunk step and issues a\n * single `TransactWriteItems` via `executeMultiWrite` (#1010).\n *\n * Idempotency: ElectroDB / DynamoDB SDK forwards the `chunkToken` as\n * the `ClientRequestToken` for the transaction, so a Map iteration\n * replayed by Step Functions retry lands on the same transaction id.\n * The state machine's `Catch` block also absorbs\n * `TransactionCanceledException` as a no-op success — common when a\n * prior replay already removed the rows.\n *\n * The handler never touches the canonical owning record; the finalize\n * step owns the canonical delete.\n */\n\nimport type { CascadeChunkInput } from \"./events\";\nimport { deleteOwningChildChunkOperation } from \"../../../data/operations/control/owning-delete/owning-delete-batch-delete-operation\";\nimport {\n type OwningDeleteProjectionEntity,\n OWNING_DELETE_PROJECTION_ENTITY,\n} from \"../../../data/operations/control/owning-delete/owning-delete-list-child-projections-operation\";\n\nexport interface DeleteChunkOutput {\n readonly ownerType: string;\n readonly ownerId: string;\n readonly tenantId?: string;\n readonly rowsDeleted: number;\n}\n\nfunction isKnownEntity(value: string): value is OwningDeleteProjectionEntity {\n for (const known of Object.values(OWNING_DELETE_PROJECTION_ENTITY)) {\n if (known === value) {\n return true;\n }\n }\n return false;\n}\n\nexport const handler = async (\n input: CascadeChunkInput,\n): Promise<DeleteChunkOutput> => {\n const rows = input.rows.map((row) => {\n if (!isKnownEntity(row.entity)) {\n throw new Error(\n `owning-delete cascade delete-chunk: unknown projection entity '${row.entity}'`,\n );\n }\n return {\n entity: row.entity,\n key: { ...row.key },\n };\n });\n\n const result = await deleteOwningChildChunkOperation({\n rows,\n token: input.chunkToken,\n });\n\n return {\n ownerType: input.ownerType,\n ownerId: input.ownerId,\n tenantId: input.tenantId,\n rowsDeleted: result.rowsDeleted,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAS,cAAc,OAAsD;AAC3E,aAAW,SAAS,OAAO,OAAO,+BAA+B,GAAG;AAClE,QAAI,UAAU,OAAO;AACnB,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEO,IAAM,UAAU,OACrB,UAC+B;AAC/B,QAAM,OAAO,MAAM,KAAK,IAAI,CAAC,QAAQ;AACnC,QAAI,CAAC,cAAc,IAAI,MAAM,GAAG;AAC9B,YAAM,IAAI;AAAA,QACR,kEAAkE,IAAI,MAAM;AAAA,MAC9E;AAAA,IACF;AACA,WAAO;AAAA,MACL,QAAQ,IAAI;AAAA,MACZ,KAAK,EAAE,GAAG,IAAI,IAAI;AAAA,IACpB;AAAA,EACF,CAAC;AAED,QAAM,SAAS,MAAM,gCAAgC;AAAA,IACnD;AAAA,IACA,OAAO,MAAM;AAAA,EACf,CAAC;AAED,SAAO;AAAA,IACL,WAAW,MAAM;AAAA,IACjB,SAAS,MAAM;AAAA,IACf,UAAU,MAAM;AAAA,IAChB,aAAa,OAAO;AAAA,EACtB;AACF;","names":[]}
|
|
@@ -27,7 +27,7 @@ declare const PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM = "platform-deploy-bridge";
|
|
|
27
27
|
/**
|
|
28
28
|
* Subset of the CloudFormation Stack Status Change `detail` field the
|
|
29
29
|
* bridge handler reads. AWS-side schema lives at
|
|
30
|
-
*
|
|
30
|
+
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/monitoring-cloudformation.html .
|
|
31
31
|
*/
|
|
32
32
|
interface CloudFormationStackStatusChangeDetail {
|
|
33
33
|
readonly "stack-id": string;
|
|
@@ -27,7 +27,7 @@ declare const PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM = "platform-deploy-bridge";
|
|
|
27
27
|
/**
|
|
28
28
|
* Subset of the CloudFormation Stack Status Change `detail` field the
|
|
29
29
|
* bridge handler reads. AWS-side schema lives at
|
|
30
|
-
*
|
|
30
|
+
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/monitoring-cloudformation.html .
|
|
31
31
|
*/
|
|
32
32
|
interface CloudFormationStackStatusChangeDetail {
|
|
33
33
|
readonly "stack-id": string;
|
package/lib/index.d.mts
CHANGED
|
@@ -24,7 +24,7 @@ import { Distribution, DistributionProps, CachePolicyProps, BehaviorOptions } fr
|
|
|
24
24
|
import { HostingMode } from './static-hosting.viewer-request-handler.mjs';
|
|
25
25
|
export { C as CascadeChunkInput, a as CascadeFinalizeInput, b as CascadeFinalizeOutput, c as CascadeListInput, d as CascadeListOutput, O as OWNING_DELETE_CASCADE_CONSUMER_NAME, e as OWNING_DELETE_CASCADE_DEFAULT_CONCURRENCY, f as OWNING_DELETE_CASCADE_STUCK_THRESHOLD_MINUTES, g as OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR } from './events-CjS-sm0W.mjs';
|
|
26
26
|
import { StateMachine } from 'aws-cdk-lib/aws-stepfunctions';
|
|
27
|
-
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-
|
|
27
|
+
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-COI0BuMM.mjs';
|
|
28
28
|
export { R as RENAME_CASCADE_CONSUMER_NAME, a as RENAME_CASCADE_DEFAULT_CONCURRENCY, b as RENAME_CASCADE_FAILED_THRESHOLD, c as RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR, d as RENAME_CASCADE_SLOW_THRESHOLD_SECONDS, e as RenameCascadeChunkInput, f as RenameCascadeFinalizeInput, g as RenameCascadeFinalizeOutput, h as RenameCascadeListInput, i as RenameCascadeListOutput } from './events-Da_cFgtc.mjs';
|
|
29
29
|
import { Patient, Practitioner, Observation, Encounter, Account } from '@openhi/types';
|
|
30
30
|
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 demoMembershipId, j as demoRoleAssignmentId, k as demoRolesForUserInTenant, l as demoScenarioIdentifier, o as openhiResourceIdentifier } from './events-CMG8xanm.mjs';
|
|
@@ -159,7 +159,6 @@ declare class OpenHiEnvironment extends Stage {
|
|
|
159
159
|
props: OpenHiEnvironmentProps;
|
|
160
160
|
/**
|
|
161
161
|
* Finds the OpenHiEnvironment that contains the given construct.
|
|
162
|
-
* ```
|
|
163
162
|
*/
|
|
164
163
|
static of(construct: IConstruct): OpenHiEnvironment | undefined;
|
|
165
164
|
/**
|
|
@@ -194,7 +193,6 @@ declare class OpenHiEnvironment extends Stage {
|
|
|
194
193
|
interface OpenHiAppProps extends AppProps {
|
|
195
194
|
/**
|
|
196
195
|
* Optional name for the application.
|
|
197
|
-
* ```
|
|
198
196
|
*/
|
|
199
197
|
readonly appName?: string;
|
|
200
198
|
/**
|
|
@@ -409,7 +407,7 @@ declare abstract class OpenHiService extends Stack {
|
|
|
409
407
|
* @param id - Unique identifier for this service stack (e.g., "user-service")
|
|
410
408
|
* @param props - Optional properties for configuring the service
|
|
411
409
|
*
|
|
412
|
-
* @throws {Error} If account and region are not defined in props or environment
|
|
410
|
+
* @throws \{Error\} If account and region are not defined in props or environment
|
|
413
411
|
*
|
|
414
412
|
*/
|
|
415
413
|
constructor(ohEnv: OpenHiEnvironment, id: string, props?: OpenHiServiceProps);
|
|
@@ -1084,9 +1082,9 @@ declare class PerBranchHostname extends Construct {
|
|
|
1084
1082
|
* A bucket used to store content for stage.openhi.org might have the
|
|
1085
1083
|
* following directory structure (all in the same bucket):
|
|
1086
1084
|
*
|
|
1087
|
-
* /www.stage.openhi.org/*
|
|
1088
|
-
* /feature-7.stage.openhi.org/*
|
|
1089
|
-
* /pr-123.stage.openhi.org/*
|
|
1085
|
+
* /www.stage.openhi.org/* -\> serves content to www.stage.openhi.org
|
|
1086
|
+
* /feature-7.stage.openhi.org/* -\> serves content to feature-7.stage.openhi.org
|
|
1087
|
+
* /pr-123.stage.openhi.org/* -\> serves content to pr-123.stage.openhi.org
|
|
1090
1088
|
*
|
|
1091
1089
|
******************************************************************************/
|
|
1092
1090
|
/**
|
|
@@ -1367,6 +1365,19 @@ declare class OpenHiAuthService extends OpenHiService {
|
|
|
1367
1365
|
* Returns an IUserPoolDomain by looking up the Auth stack's User Pool Domain from SSM.
|
|
1368
1366
|
*/
|
|
1369
1367
|
static userPoolDomainFromConstruct(scope: Construct): IUserPoolDomain;
|
|
1368
|
+
/**
|
|
1369
|
+
* Returns the full Cognito Hosted UI base URL (e.g.
|
|
1370
|
+
* `https://auth-abc.auth.us-east-2.amazoncognito.com`) by looking up
|
|
1371
|
+
* the Auth stack's User Pool Domain from SSM and composing it with the
|
|
1372
|
+
* calling stack's region.
|
|
1373
|
+
*
|
|
1374
|
+
* Equivalent to `UserPoolDomain.baseUrl()` on the concrete construct,
|
|
1375
|
+
* but works across stacks where the looked-up `IUserPoolDomain` is an
|
|
1376
|
+
* `Import` and does not carry the `baseUrl()` method. Assumes the
|
|
1377
|
+
* domain was created as a Cognito-managed prefix domain (the only
|
|
1378
|
+
* variant `OpenHiAuthService.createUserPoolDomain` produces).
|
|
1379
|
+
*/
|
|
1380
|
+
static userPoolDomainBaseUrlFromConstruct(scope: Construct): string;
|
|
1370
1381
|
/**
|
|
1371
1382
|
* Returns an IKey (KMS) by looking up the Auth stack's User Pool KMS Key ARN from SSM.
|
|
1372
1383
|
*/
|
|
@@ -1736,7 +1747,7 @@ declare class OpenHiRestApiService extends OpenHiService {
|
|
|
1736
1747
|
*/
|
|
1737
1748
|
protected createCertificate(): ICertificate;
|
|
1738
1749
|
/**
|
|
1739
|
-
* Returns the API domain name string (e.g. api.example.com or api
|
|
1750
|
+
* Returns the API domain name string (e.g. api.example.com or api-\{prefix\}.example.com).
|
|
1740
1751
|
* Override to customize.
|
|
1741
1752
|
*/
|
|
1742
1753
|
protected createApiDomainNameString(hostedZone: IHostedZone): string;
|
|
@@ -2119,7 +2130,7 @@ declare class OpenHiGraphqlService extends OpenHiService {
|
|
|
2119
2130
|
*/
|
|
2120
2131
|
interface OpenHiWebsiteServiceProps extends OpenHiServiceProps {
|
|
2121
2132
|
/**
|
|
2122
|
-
* Sub-domain prefix attached to the child zone (e.g. "www"
|
|
2133
|
+
* Sub-domain prefix attached to the child zone (e.g. "www" -\> "www.\<zone\>").
|
|
2123
2134
|
*
|
|
2124
2135
|
* @default "www"
|
|
2125
2136
|
*/
|
|
@@ -2320,7 +2331,7 @@ interface OwningDeleteCascadeLambdasProps {
|
|
|
2320
2331
|
* grant pattern.
|
|
2321
2332
|
*
|
|
2322
2333
|
* - `listChunks` — pages through the owner's adjacency-list partition
|
|
2323
|
-
* via ElectroDB Query, splits the page into
|
|
2334
|
+
* via ElectroDB Query, splits the page into \<=100-item chunks for
|
|
2324
2335
|
* the inline Map state.
|
|
2325
2336
|
* - `deleteChunk` — Map-iteration handler; submits one chunk as a
|
|
2326
2337
|
* single `TransactWriteItems` via `executeMultiWrite`. The state
|
package/lib/index.d.ts
CHANGED
|
@@ -273,7 +273,7 @@ declare const PLATFORM_DEPLOY_BRIDGE_ACTOR_SYSTEM = "platform-deploy-bridge";
|
|
|
273
273
|
/**
|
|
274
274
|
* Subset of the CloudFormation Stack Status Change `detail` field the
|
|
275
275
|
* bridge handler reads. AWS-side schema lives at
|
|
276
|
-
*
|
|
276
|
+
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/monitoring-cloudformation.html .
|
|
277
277
|
*/
|
|
278
278
|
interface CloudFormationStackStatusChangeDetail {
|
|
279
279
|
readonly "stack-id": string;
|
|
@@ -796,7 +796,6 @@ declare class OpenHiEnvironment extends Stage {
|
|
|
796
796
|
props: OpenHiEnvironmentProps;
|
|
797
797
|
/**
|
|
798
798
|
* Finds the OpenHiEnvironment that contains the given construct.
|
|
799
|
-
* ```
|
|
800
799
|
*/
|
|
801
800
|
static of(construct: IConstruct): OpenHiEnvironment | undefined;
|
|
802
801
|
/**
|
|
@@ -831,7 +830,6 @@ declare class OpenHiEnvironment extends Stage {
|
|
|
831
830
|
interface OpenHiAppProps extends AppProps {
|
|
832
831
|
/**
|
|
833
832
|
* Optional name for the application.
|
|
834
|
-
* ```
|
|
835
833
|
*/
|
|
836
834
|
readonly appName?: string;
|
|
837
835
|
/**
|
|
@@ -1046,7 +1044,7 @@ declare abstract class OpenHiService extends Stack {
|
|
|
1046
1044
|
* @param id - Unique identifier for this service stack (e.g., "user-service")
|
|
1047
1045
|
* @param props - Optional properties for configuring the service
|
|
1048
1046
|
*
|
|
1049
|
-
* @throws {Error} If account and region are not defined in props or environment
|
|
1047
|
+
* @throws \{Error\} If account and region are not defined in props or environment
|
|
1050
1048
|
*
|
|
1051
1049
|
*/
|
|
1052
1050
|
constructor(ohEnv: OpenHiEnvironment, id: string, props?: OpenHiServiceProps);
|
|
@@ -1721,9 +1719,9 @@ declare class PerBranchHostname extends Construct {
|
|
|
1721
1719
|
* A bucket used to store content for stage.openhi.org might have the
|
|
1722
1720
|
* following directory structure (all in the same bucket):
|
|
1723
1721
|
*
|
|
1724
|
-
* /www.stage.openhi.org/*
|
|
1725
|
-
* /feature-7.stage.openhi.org/*
|
|
1726
|
-
* /pr-123.stage.openhi.org/*
|
|
1722
|
+
* /www.stage.openhi.org/* -\> serves content to www.stage.openhi.org
|
|
1723
|
+
* /feature-7.stage.openhi.org/* -\> serves content to feature-7.stage.openhi.org
|
|
1724
|
+
* /pr-123.stage.openhi.org/* -\> serves content to pr-123.stage.openhi.org
|
|
1727
1725
|
*
|
|
1728
1726
|
******************************************************************************/
|
|
1729
1727
|
/**
|
|
@@ -2004,6 +2002,19 @@ declare class OpenHiAuthService extends OpenHiService {
|
|
|
2004
2002
|
* Returns an IUserPoolDomain by looking up the Auth stack's User Pool Domain from SSM.
|
|
2005
2003
|
*/
|
|
2006
2004
|
static userPoolDomainFromConstruct(scope: Construct): IUserPoolDomain;
|
|
2005
|
+
/**
|
|
2006
|
+
* Returns the full Cognito Hosted UI base URL (e.g.
|
|
2007
|
+
* `https://auth-abc.auth.us-east-2.amazoncognito.com`) by looking up
|
|
2008
|
+
* the Auth stack's User Pool Domain from SSM and composing it with the
|
|
2009
|
+
* calling stack's region.
|
|
2010
|
+
*
|
|
2011
|
+
* Equivalent to `UserPoolDomain.baseUrl()` on the concrete construct,
|
|
2012
|
+
* but works across stacks where the looked-up `IUserPoolDomain` is an
|
|
2013
|
+
* `Import` and does not carry the `baseUrl()` method. Assumes the
|
|
2014
|
+
* domain was created as a Cognito-managed prefix domain (the only
|
|
2015
|
+
* variant `OpenHiAuthService.createUserPoolDomain` produces).
|
|
2016
|
+
*/
|
|
2017
|
+
static userPoolDomainBaseUrlFromConstruct(scope: Construct): string;
|
|
2007
2018
|
/**
|
|
2008
2019
|
* Returns an IKey (KMS) by looking up the Auth stack's User Pool KMS Key ARN from SSM.
|
|
2009
2020
|
*/
|
|
@@ -2373,7 +2384,7 @@ declare class OpenHiRestApiService extends OpenHiService {
|
|
|
2373
2384
|
*/
|
|
2374
2385
|
protected createCertificate(): ICertificate;
|
|
2375
2386
|
/**
|
|
2376
|
-
* Returns the API domain name string (e.g. api.example.com or api
|
|
2387
|
+
* Returns the API domain name string (e.g. api.example.com or api-\{prefix\}.example.com).
|
|
2377
2388
|
* Override to customize.
|
|
2378
2389
|
*/
|
|
2379
2390
|
protected createApiDomainNameString(hostedZone: IHostedZone): string;
|
|
@@ -2756,7 +2767,7 @@ declare class OpenHiGraphqlService extends OpenHiService {
|
|
|
2756
2767
|
*/
|
|
2757
2768
|
interface OpenHiWebsiteServiceProps extends OpenHiServiceProps {
|
|
2758
2769
|
/**
|
|
2759
|
-
* Sub-domain prefix attached to the child zone (e.g. "www"
|
|
2770
|
+
* Sub-domain prefix attached to the child zone (e.g. "www" -\> "www.\<zone\>").
|
|
2760
2771
|
*
|
|
2761
2772
|
* @default "www"
|
|
2762
2773
|
*/
|
|
@@ -2957,7 +2968,7 @@ interface OwningDeleteCascadeLambdasProps {
|
|
|
2957
2968
|
* grant pattern.
|
|
2958
2969
|
*
|
|
2959
2970
|
* - `listChunks` — pages through the owner's adjacency-list partition
|
|
2960
|
-
* via ElectroDB Query, splits the page into
|
|
2971
|
+
* via ElectroDB Query, splits the page into \<=100-item chunks for
|
|
2961
2972
|
* the inline Map state.
|
|
2962
2973
|
* - `deleteChunk` — Map-iteration handler; submits one chunk as a
|
|
2963
2974
|
* single `TransactWriteItems` via `executeMultiWrite`. The state
|
package/lib/index.js
CHANGED
|
@@ -929,7 +929,6 @@ var OpenHiEnvironment = class _OpenHiEnvironment extends import_aws_cdk_lib.Stag
|
|
|
929
929
|
}
|
|
930
930
|
/**
|
|
931
931
|
* Finds the OpenHiEnvironment that contains the given construct.
|
|
932
|
-
* ```
|
|
933
932
|
*/
|
|
934
933
|
static of(construct) {
|
|
935
934
|
return construct.node.scopes.reverse().find(_OpenHiEnvironment.isOpenHiEnvironment);
|
|
@@ -1116,7 +1115,7 @@ var OpenHiService = class extends import_aws_cdk_lib4.Stack {
|
|
|
1116
1115
|
* @param id - Unique identifier for this service stack (e.g., "user-service")
|
|
1117
1116
|
* @param props - Optional properties for configuring the service
|
|
1118
1117
|
*
|
|
1119
|
-
* @throws {Error} If account and region are not defined in props or environment
|
|
1118
|
+
* @throws \{Error\} If account and region are not defined in props or environment
|
|
1120
1119
|
*
|
|
1121
1120
|
*/
|
|
1122
1121
|
constructor(ohEnv, id, props = {}) {
|
|
@@ -3775,11 +3774,11 @@ var ConfigurationUserProjectionEntity = new import_electrodb2.Entity({
|
|
|
3775
3774
|
},
|
|
3776
3775
|
indexes: {
|
|
3777
3776
|
/**
|
|
3778
|
-
* Base table: PK = USER#ID
|
|
3779
|
-
* single `Query(PK = USER#ID#<userId>, SK begins_with
|
|
3780
|
-
*
|
|
3781
|
-
*
|
|
3782
|
-
*
|
|
3777
|
+
* Base table: PK = USER#ID#\<userId\>, SK = operation-supplied. A
|
|
3778
|
+
* single `Query(PK = USER#ID#<userId>, SK begins_with 'CONFIGURATION#')`
|
|
3779
|
+
* returns the user's user-scoped Configurations sorted by
|
|
3780
|
+
* `<normalizedConfigName>` (then `<configurationId>` as the
|
|
3781
|
+
* tiebreaker).
|
|
3783
3782
|
*/
|
|
3784
3783
|
record: {
|
|
3785
3784
|
pk: {
|
|
@@ -4167,11 +4166,12 @@ var MembershipUserProjectionEntity = new import_electrodb5.Entity({
|
|
|
4167
4166
|
},
|
|
4168
4167
|
indexes: {
|
|
4169
4168
|
/**
|
|
4170
|
-
* Base table: PK = USER#ID
|
|
4169
|
+
* Base table: PK = USER#ID#\<userId\>, SK = operation-supplied.
|
|
4171
4170
|
* Both pattern #3 and pattern #4 use this same index — the SK string
|
|
4172
4171
|
* encodes the lane discriminator (`MEMBERSHIP#TENANT#…` vs
|
|
4173
|
-
* `MEMBERSHIP#WORKSPACE#…`) so a single
|
|
4174
|
-
* SK begins_with 'MEMBERSHIP#')`
|
|
4172
|
+
* `MEMBERSHIP#WORKSPACE#…`) so a single
|
|
4173
|
+
* `Query(PK = USER#ID#<userId>, SK begins_with 'MEMBERSHIP#')`
|
|
4174
|
+
* returns both lanes interleaved.
|
|
4175
4175
|
*/
|
|
4176
4176
|
record: {
|
|
4177
4177
|
pk: {
|
|
@@ -4674,12 +4674,12 @@ var RoleAssignmentUserProjectionEntity = new import_electrodb9.Entity({
|
|
|
4674
4674
|
},
|
|
4675
4675
|
indexes: {
|
|
4676
4676
|
/**
|
|
4677
|
-
* Base table: PK = USER#ID
|
|
4677
|
+
* Base table: PK = USER#ID#\<userId\>, SK = operation-supplied. Both
|
|
4678
4678
|
* sub-lanes (tenant-level and workspace-level) use this same index —
|
|
4679
4679
|
* the SK string encodes the lane discriminator
|
|
4680
4680
|
* (`ROLEASSIGNMENT#TENANT#…` vs `ROLEASSIGNMENT#WORKSPACE#…`) so a
|
|
4681
|
-
* single `Query(PK = USER#ID#<userId>, SK begins_with
|
|
4682
|
-
*
|
|
4681
|
+
* single `Query(PK = USER#ID#<userId>, SK begins_with 'ROLEASSIGNMENT#')`
|
|
4682
|
+
* returns both lanes interleaved.
|
|
4683
4683
|
*/
|
|
4684
4684
|
record: {
|
|
4685
4685
|
pk: {
|
|
@@ -6747,6 +6747,26 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
6747
6747
|
});
|
|
6748
6748
|
return import_aws_cognito4.UserPoolDomain.fromDomainName(scope, "user-pool-domain", domainName);
|
|
6749
6749
|
}
|
|
6750
|
+
/**
|
|
6751
|
+
* Returns the full Cognito Hosted UI base URL (e.g.
|
|
6752
|
+
* `https://auth-abc.auth.us-east-2.amazoncognito.com`) by looking up
|
|
6753
|
+
* the Auth stack's User Pool Domain from SSM and composing it with the
|
|
6754
|
+
* calling stack's region.
|
|
6755
|
+
*
|
|
6756
|
+
* Equivalent to `UserPoolDomain.baseUrl()` on the concrete construct,
|
|
6757
|
+
* but works across stacks where the looked-up `IUserPoolDomain` is an
|
|
6758
|
+
* `Import` and does not carry the `baseUrl()` method. Assumes the
|
|
6759
|
+
* domain was created as a Cognito-managed prefix domain (the only
|
|
6760
|
+
* variant `OpenHiAuthService.createUserPoolDomain` produces).
|
|
6761
|
+
*/
|
|
6762
|
+
static userPoolDomainBaseUrlFromConstruct(scope) {
|
|
6763
|
+
const domainName = DiscoverableStringParameter.valueForLookupName(scope, {
|
|
6764
|
+
ssmParamName: CognitoUserPoolDomain.SSM_PARAM_NAME,
|
|
6765
|
+
serviceType: _OpenHiAuthService.SERVICE_TYPE
|
|
6766
|
+
});
|
|
6767
|
+
const region = import_core.Stack.of(scope).region;
|
|
6768
|
+
return `https://${domainName}.auth.${region}.amazoncognito.com`;
|
|
6769
|
+
}
|
|
6750
6770
|
/**
|
|
6751
6771
|
* Returns an IKey (KMS) by looking up the Auth stack's User Pool KMS Key ARN from SSM.
|
|
6752
6772
|
*/
|
|
@@ -7110,7 +7130,7 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
|
|
|
7110
7130
|
return OpenHiGlobalService.rootWildcardCertificateFromConstruct(this);
|
|
7111
7131
|
}
|
|
7112
7132
|
/**
|
|
7113
|
-
* Returns the API domain name string (e.g. api.example.com or api
|
|
7133
|
+
* Returns the API domain name string (e.g. api.example.com or api-\{prefix\}.example.com).
|
|
7114
7134
|
* Override to customize.
|
|
7115
7135
|
*/
|
|
7116
7136
|
createApiDomainNameString(hostedZone) {
|
|
@@ -7344,11 +7364,11 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
|
|
|
7344
7364
|
const cognitoScope = new import_constructs21.Construct(this, "runtime-config");
|
|
7345
7365
|
const userPool = OpenHiAuthService.userPoolFromConstruct(cognitoScope);
|
|
7346
7366
|
const userPoolClient = OpenHiAuthService.userPoolClientFromConstruct(cognitoScope);
|
|
7347
|
-
const
|
|
7367
|
+
const cognitoDomainUrl = OpenHiAuthService.userPoolDomainBaseUrlFromConstruct(cognitoScope);
|
|
7348
7368
|
return {
|
|
7349
7369
|
OPENHI_RUNTIME_CONFIG_COGNITO_USER_POOL_ID: userPool.userPoolId,
|
|
7350
7370
|
OPENHI_RUNTIME_CONFIG_COGNITO_USER_POOL_CLIENT_ID: userPoolClient.userPoolClientId,
|
|
7351
|
-
|
|
7371
|
+
OPENHI_RUNTIME_CONFIG_COGNITO_DOMAIN_URL: cognitoDomainUrl,
|
|
7352
7372
|
OPENHI_RUNTIME_CONFIG_COGNITO_REDIRECT_URI: this.props.runtimeConfig.cognitoRedirectUri,
|
|
7353
7373
|
OPENHI_RUNTIME_CONFIG_API_BASE_URL: this.props.runtimeConfig.apiBaseUrl
|
|
7354
7374
|
};
|