@openhi/constructs 0.0.106 → 0.0.107
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-QMIOLLAS.mjs → chunk-36UPY7YQ.mjs} +12 -14
- package/lib/chunk-36UPY7YQ.mjs.map +1 -0
- package/lib/{events-DGep6C7w.d.mts → events-DPodvl07.d.mts} +3 -3
- package/lib/{events-DGep6C7w.d.ts → events-DPodvl07.d.ts} +3 -3
- package/lib/index.d.mts +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +4 -6
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +5 -7
- package/lib/index.mjs.map +1 -1
- package/lib/seed-demo-data.handler.d.mts +2 -2
- package/lib/seed-demo-data.handler.d.ts +2 -2
- package/lib/seed-demo-data.handler.js +6 -6
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +1 -1
- package/lib/seed-system-data.handler.js +5 -5
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +7 -7
- package/lib/seed-system-data.handler.mjs.map +1 -1
- package/package.json +2 -2
- package/lib/chunk-QMIOLLAS.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorkflowDedupClient } from '@openhi/workflows';
|
|
2
2
|
import { EventBridgeEvent } from 'aws-lambda';
|
|
3
|
-
import { d as DemoDevUser } from './events-
|
|
3
|
+
import { d as DemoDevUser } from './events-DPodvl07.mjs';
|
|
4
4
|
import { O as OpenHiContext } from './openhi-context-CaBH8SFo.mjs';
|
|
5
5
|
import '@openhi/types';
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ interface CognitoProvisioner {
|
|
|
38
38
|
interface SeedDemoDataDependencies {
|
|
39
39
|
readonly dedupClient: WorkflowDedupClient;
|
|
40
40
|
/**
|
|
41
|
-
* Reads every id in `
|
|
41
|
+
* Reads every id in `PLATFORM_ROLE_IDS`. Throws when any Role
|
|
42
42
|
* record is missing — that means `seed-system-data` has not yet
|
|
43
43
|
* run on this environment, and emitting demo RoleAssignments that
|
|
44
44
|
* reference non-existent Roles would produce orphaned records.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorkflowDedupClient } from '@openhi/workflows';
|
|
2
2
|
import { EventBridgeEvent } from 'aws-lambda';
|
|
3
|
-
import { d as DemoDevUser } from './events-
|
|
3
|
+
import { d as DemoDevUser } from './events-DPodvl07.js';
|
|
4
4
|
import { O as OpenHiContext } from './openhi-context-CaBH8SFo.js';
|
|
5
5
|
import '@openhi/types';
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ interface CognitoProvisioner {
|
|
|
38
38
|
interface SeedDemoDataDependencies {
|
|
39
39
|
readonly dedupClient: WorkflowDedupClient;
|
|
40
40
|
/**
|
|
41
|
-
* Reads every id in `
|
|
41
|
+
* Reads every id in `PLATFORM_ROLE_IDS`. Throws when any Role
|
|
42
42
|
* record is missing — that means `seed-system-data` has not yet
|
|
43
43
|
* run on this environment, and emitting demo RoleAssignments that
|
|
44
44
|
* reference non-existent Roles would produce orphaned records.
|
|
@@ -735,7 +735,7 @@ var openhiResourceIdentifier = (params) => ({
|
|
|
735
735
|
var demoRolesForUserInTenant = (_user, _tenantId) => {
|
|
736
736
|
void _user;
|
|
737
737
|
void _tenantId;
|
|
738
|
-
return [import_types.
|
|
738
|
+
return [import_types.PLATFORM_ROLE_CODE.TENANT_ADMIN];
|
|
739
739
|
};
|
|
740
740
|
|
|
741
741
|
// src/data/dynamo/dynamo-control-service.ts
|
|
@@ -1720,9 +1720,9 @@ var errorMessage = (err) => {
|
|
|
1720
1720
|
return String(err);
|
|
1721
1721
|
};
|
|
1722
1722
|
var idForRoleCode = (code) => {
|
|
1723
|
-
for (const key of Object.keys(import_types7.
|
|
1724
|
-
if (import_types7.
|
|
1725
|
-
return import_types7.
|
|
1723
|
+
for (const key of Object.keys(import_types7.PLATFORM_ROLE_IDS)) {
|
|
1724
|
+
if (import_types7.PLATFORM_ROLE_CONCEPTS[key].code === code) {
|
|
1725
|
+
return import_types7.PLATFORM_ROLE_IDS[key];
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
throw new Error(`No id mapping for role code "${code}".`);
|
|
@@ -1737,7 +1737,7 @@ var verifySystemRolesExist = async () => {
|
|
|
1737
1737
|
actorType: "internal-system",
|
|
1738
1738
|
source: "step-function"
|
|
1739
1739
|
};
|
|
1740
|
-
for (const id of Object.values(import_types7.
|
|
1740
|
+
for (const id of Object.values(import_types7.PLATFORM_ROLE_IDS)) {
|
|
1741
1741
|
try {
|
|
1742
1742
|
await getRoleByIdOperation({ context: probeContext, id });
|
|
1743
1743
|
} catch (err) {
|
|
@@ -1886,7 +1886,7 @@ var seedDemoGraph = async (params) => {
|
|
|
1886
1886
|
...baseContext,
|
|
1887
1887
|
tenantId: PLATFORM_SCOPE_TENANT_ID
|
|
1888
1888
|
};
|
|
1889
|
-
const platformRoleCode = import_types7.
|
|
1889
|
+
const platformRoleCode = import_types7.PLATFORM_ROLE_CODE.SYSTEM_ADMIN;
|
|
1890
1890
|
const platformRaId = demoRoleAssignmentId(
|
|
1891
1891
|
user.id,
|
|
1892
1892
|
PLATFORM_SCOPE_TENANT_ID,
|