@openhi/constructs 0.0.104 → 0.0.106

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.
Files changed (83) hide show
  1. package/README.md +14 -0
  2. package/lib/chunk-2PM2NGXI.mjs +31 -0
  3. package/lib/chunk-2PM2NGXI.mjs.map +1 -0
  4. package/lib/chunk-AGF3RAAZ.mjs +20 -0
  5. package/lib/chunk-AGF3RAAZ.mjs.map +1 -0
  6. package/lib/chunk-AO3E22CS.mjs +108 -0
  7. package/lib/chunk-AO3E22CS.mjs.map +1 -0
  8. package/lib/chunk-CHPEQRXU.mjs +45 -0
  9. package/lib/chunk-CHPEQRXU.mjs.map +1 -0
  10. package/lib/chunk-JUNL76HF.mjs +428 -0
  11. package/lib/chunk-JUNL76HF.mjs.map +1 -0
  12. package/lib/chunk-L6UAP4KP.mjs +27 -0
  13. package/lib/chunk-L6UAP4KP.mjs.map +1 -0
  14. package/lib/{chunk-3QS3WKRC.mjs → chunk-LZOMFHX3.mjs} +9 -2
  15. package/lib/chunk-QMIOLLAS.mjs +531 -0
  16. package/lib/chunk-QMIOLLAS.mjs.map +1 -0
  17. package/lib/chunk-SYBADQXI.mjs +607 -0
  18. package/lib/chunk-SYBADQXI.mjs.map +1 -0
  19. package/lib/chunk-VXX4I3EF.mjs +19 -0
  20. package/lib/chunk-VXX4I3EF.mjs.map +1 -0
  21. package/lib/{chunk-MLTYFMSE.mjs → chunk-VYDIGFIX.mjs} +74 -29
  22. package/lib/chunk-VYDIGFIX.mjs.map +1 -0
  23. package/lib/chunk-YU2HRNUP.mjs +33 -0
  24. package/lib/chunk-YU2HRNUP.mjs.map +1 -0
  25. package/lib/chunk-YZZDUJHI.mjs +37 -0
  26. package/lib/chunk-YZZDUJHI.mjs.map +1 -0
  27. package/lib/cors-options-lambda.handler.mjs +1 -1
  28. package/lib/data-store-postgres-replication.handler.mjs +1 -1
  29. package/lib/events-BfrkMoBD.d.mts +44 -0
  30. package/lib/events-BfrkMoBD.d.ts +44 -0
  31. package/lib/events-CVA3_eEB.d.mts +23 -0
  32. package/lib/events-CVA3_eEB.d.ts +23 -0
  33. package/lib/events-DGep6C7w.d.mts +207 -0
  34. package/lib/events-DGep6C7w.d.ts +207 -0
  35. package/lib/firehose-archive-transform.handler.mjs +1 -1
  36. package/lib/index.d.mts +508 -29
  37. package/lib/index.d.ts +773 -30
  38. package/lib/index.js +2536 -105
  39. package/lib/index.js.map +1 -1
  40. package/lib/index.mjs +899 -106
  41. package/lib/index.mjs.map +1 -1
  42. package/lib/openhi-context-CaBH8SFo.d.mts +39 -0
  43. package/lib/openhi-context-CaBH8SFo.d.ts +39 -0
  44. package/lib/platform-deploy-bridge.handler.d.mts +14 -0
  45. package/lib/platform-deploy-bridge.handler.d.ts +14 -0
  46. package/lib/platform-deploy-bridge.handler.js +762 -0
  47. package/lib/platform-deploy-bridge.handler.js.map +1 -0
  48. package/lib/platform-deploy-bridge.handler.mjs +134 -0
  49. package/lib/platform-deploy-bridge.handler.mjs.map +1 -0
  50. package/lib/post-authentication.handler.mjs +1 -1
  51. package/lib/post-confirmation.handler.js +50 -904
  52. package/lib/post-confirmation.handler.js.map +1 -1
  53. package/lib/post-confirmation.handler.mjs +37 -112
  54. package/lib/post-confirmation.handler.mjs.map +1 -1
  55. package/lib/pre-token-generation.handler.js +135 -55
  56. package/lib/pre-token-generation.handler.js.map +1 -1
  57. package/lib/pre-token-generation.handler.mjs +25 -32
  58. package/lib/pre-token-generation.handler.mjs.map +1 -1
  59. package/lib/provision-default-workspace.handler.d.mts +13 -0
  60. package/lib/provision-default-workspace.handler.d.ts +13 -0
  61. package/lib/provision-default-workspace.handler.js +1172 -0
  62. package/lib/provision-default-workspace.handler.js.map +1 -0
  63. package/lib/provision-default-workspace.handler.mjs +175 -0
  64. package/lib/provision-default-workspace.handler.mjs.map +1 -0
  65. package/lib/rest-api-lambda.handler.js +114 -59
  66. package/lib/rest-api-lambda.handler.js.map +1 -1
  67. package/lib/rest-api-lambda.handler.mjs +60 -587
  68. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  69. package/lib/seed-demo-data.handler.d.mts +107 -0
  70. package/lib/seed-demo-data.handler.d.ts +107 -0
  71. package/lib/seed-demo-data.handler.js +2037 -0
  72. package/lib/seed-demo-data.handler.js.map +1 -0
  73. package/lib/seed-demo-data.handler.mjs +23 -0
  74. package/lib/seed-demo-data.handler.mjs.map +1 -0
  75. package/lib/seed-system-data.handler.d.mts +64 -0
  76. package/lib/seed-system-data.handler.d.ts +64 -0
  77. package/lib/seed-system-data.handler.js +1631 -0
  78. package/lib/seed-system-data.handler.js.map +1 -0
  79. package/lib/seed-system-data.handler.mjs +135 -0
  80. package/lib/seed-system-data.handler.mjs.map +1 -0
  81. package/package.json +4 -2
  82. package/lib/chunk-MLTYFMSE.mjs.map +0 -1
  83. /package/lib/{chunk-3QS3WKRC.mjs.map → chunk-LZOMFHX3.mjs.map} +0 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Kind of actor performing the operation (for audit trail and UI).
3
+ */
4
+ type OpenHiActorType = "human" | "internal-system" | "external-system";
5
+ /**
6
+ * Adapter or entry point that created the context (for audit and metrics).
7
+ */
8
+ type OpenHiContextSource = "rest" | "graphql" | "step-function";
9
+ /**
10
+ * OpenHI context: tenant/workspace scope and acting actor (human or system).
11
+ * Shared by REST, GraphQL, and Step Function adapters when calling the data operations layer.
12
+ * Used for tenant/workspace isolation, audit records, and merging into FHIR data on mutations.
13
+ *
14
+ * @see sites/www-docs/content/packages/@openhi/constructs/rest-api.md — Middleware (REST)
15
+ */
16
+ interface OpenHiContext {
17
+ /** Tenant (organization) scope; used for multi-tenant isolation and data partition. */
18
+ tenantId: string;
19
+ /** Workspace scope within the tenant; used for workspace-level isolation and data partition. */
20
+ workspaceId: string;
21
+ /** Timestamp of the request/operation (e.g. ISO 8601). */
22
+ date: string;
23
+ /** Stable identifier for the actor (human, internal system, or external integration). */
24
+ actorId: string;
25
+ /** Display name for the actor for audit and UI (e.g. "Jane Doe", "FHIR Sync Service"). */
26
+ actorName: string;
27
+ /** Kind of actor; optional, for audit and display. */
28
+ actorType?: OpenHiActorType;
29
+ /** Role scope for Configuration and other role-scoped resources; optional. */
30
+ roleId?: string;
31
+ /** Request or correlation ID for tracing across adapters and logs; optional. */
32
+ requestId?: string;
33
+ /** Adapter that created this context (rest, graphql, step-function); optional. */
34
+ source?: OpenHiContextSource;
35
+ /** OAuth or client identifier when the caller is an application; optional. */
36
+ clientId?: string;
37
+ }
38
+
39
+ export type { OpenHiContext as O };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Kind of actor performing the operation (for audit trail and UI).
3
+ */
4
+ type OpenHiActorType = "human" | "internal-system" | "external-system";
5
+ /**
6
+ * Adapter or entry point that created the context (for audit and metrics).
7
+ */
8
+ type OpenHiContextSource = "rest" | "graphql" | "step-function";
9
+ /**
10
+ * OpenHI context: tenant/workspace scope and acting actor (human or system).
11
+ * Shared by REST, GraphQL, and Step Function adapters when calling the data operations layer.
12
+ * Used for tenant/workspace isolation, audit records, and merging into FHIR data on mutations.
13
+ *
14
+ * @see sites/www-docs/content/packages/@openhi/constructs/rest-api.md — Middleware (REST)
15
+ */
16
+ interface OpenHiContext {
17
+ /** Tenant (organization) scope; used for multi-tenant isolation and data partition. */
18
+ tenantId: string;
19
+ /** Workspace scope within the tenant; used for workspace-level isolation and data partition. */
20
+ workspaceId: string;
21
+ /** Timestamp of the request/operation (e.g. ISO 8601). */
22
+ date: string;
23
+ /** Stable identifier for the actor (human, internal system, or external integration). */
24
+ actorId: string;
25
+ /** Display name for the actor for audit and UI (e.g. "Jane Doe", "FHIR Sync Service"). */
26
+ actorName: string;
27
+ /** Kind of actor; optional, for audit and display. */
28
+ actorType?: OpenHiActorType;
29
+ /** Role scope for Configuration and other role-scoped resources; optional. */
30
+ roleId?: string;
31
+ /** Request or correlation ID for tracing across adapters and logs; optional. */
32
+ requestId?: string;
33
+ /** Adapter that created this context (rest, graphql, step-function); optional. */
34
+ source?: OpenHiContextSource;
35
+ /** OAuth or client identifier when the caller is an application; optional. */
36
+ clientId?: string;
37
+ }
38
+
39
+ export type { OpenHiContext as O };
@@ -0,0 +1,14 @@
1
+ import { EventBridgeEvent } from 'aws-lambda';
2
+ import { b as CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, d as CloudFormationStackStatusChangeDetail } from './events-BfrkMoBD.mjs';
3
+
4
+ /**
5
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/platform-deploy-bridge/index.md
6
+ *
7
+ * Bridge handler: consume a CloudFormation Stack Status Change event from
8
+ * the default AWS bus, drop it if the stack is not OpenHi-tagged, and
9
+ * republish the projected envelope onto the OpenHI control event bus.
10
+ */
11
+ type CloudFormationStackStatusChangeEvent = EventBridgeEvent<typeof CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, CloudFormationStackStatusChangeDetail>;
12
+ declare const handler: (event: CloudFormationStackStatusChangeEvent) => Promise<void>;
13
+
14
+ export { handler };
@@ -0,0 +1,14 @@
1
+ import { EventBridgeEvent } from 'aws-lambda';
2
+ import { b as CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, d as CloudFormationStackStatusChangeDetail } from './events-BfrkMoBD.js';
3
+
4
+ /**
5
+ * @see sites/www-docs/content/packages/@openhi/constructs/workflows/control-plane/platform-deploy-bridge/index.md
6
+ *
7
+ * Bridge handler: consume a CloudFormation Stack Status Change event from
8
+ * the default AWS bus, drop it if the stack is not OpenHi-tagged, and
9
+ * republish the projected envelope onto the OpenHI control event bus.
10
+ */
11
+ type CloudFormationStackStatusChangeEvent = EventBridgeEvent<typeof CLOUDFORMATION_STACK_STATUS_CHANGE_DETAIL_TYPE, CloudFormationStackStatusChangeDetail>;
12
+ declare const handler: (event: CloudFormationStackStatusChangeEvent) => Promise<void>;
13
+
14
+ export { handler };