@openhi/constructs 0.0.178 → 0.0.180

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 (54) hide show
  1. package/lib/{chunk-Z4PZSLYY.mjs → chunk-3M4QTQH6.mjs} +2 -2
  2. package/lib/{chunk-JUSVETWK.mjs → chunk-4LQR32D2.mjs} +38 -40
  3. package/lib/{chunk-JUSVETWK.mjs.map → chunk-4LQR32D2.mjs.map} +1 -1
  4. package/lib/{chunk-XNUCKVSE.mjs → chunk-7GMTHOYF.mjs} +2 -2
  5. package/lib/{chunk-E2OWEBBH.mjs → chunk-DIVYB6GD.mjs} +18 -4
  6. package/lib/chunk-DIVYB6GD.mjs.map +1 -0
  7. package/lib/chunk-F2LY4TEI.mjs +272 -0
  8. package/lib/chunk-F2LY4TEI.mjs.map +1 -0
  9. package/lib/{chunk-GG2WD6TA.mjs → chunk-JJ3AQ6G5.mjs} +9 -3
  10. package/lib/{chunk-GG2WD6TA.mjs.map → chunk-JJ3AQ6G5.mjs.map} +1 -1
  11. package/lib/{chunk-EBB4RNUG.mjs → chunk-PIQISEGW.mjs} +2 -2
  12. package/lib/{chunk-FDBBTNCI.mjs → chunk-Q4KQD2NB.mjs} +117 -5
  13. package/lib/chunk-Q4KQD2NB.mjs.map +1 -0
  14. package/lib/{chunk-Y4RGUAM2.mjs → chunk-V6KLFEHC.mjs} +105 -34
  15. package/lib/chunk-V6KLFEHC.mjs.map +1 -0
  16. package/lib/chunk-VQY57NOV.mjs +60 -0
  17. package/lib/chunk-VQY57NOV.mjs.map +1 -0
  18. package/lib/counter-maintenance.handler.mjs +4 -4
  19. package/lib/counter-reconciliation.handler.js +2 -2
  20. package/lib/counter-reconciliation.handler.js.map +1 -1
  21. package/lib/counter-reconciliation.handler.mjs +9 -267
  22. package/lib/counter-reconciliation.handler.mjs.map +1 -1
  23. package/lib/index.d.mts +117 -2
  24. package/lib/index.d.ts +117 -2
  25. package/lib/index.js +6454 -6243
  26. package/lib/index.js.map +1 -1
  27. package/lib/index.mjs +106 -4
  28. package/lib/index.mjs.map +1 -1
  29. package/lib/pre-token-generation.handler.js +28 -19
  30. package/lib/pre-token-generation.handler.js.map +1 -1
  31. package/lib/pre-token-generation.handler.mjs +4 -5
  32. package/lib/pre-token-generation.handler.mjs.map +1 -1
  33. package/lib/provision-default-workspace.handler.js +22 -19
  34. package/lib/provision-default-workspace.handler.js.map +1 -1
  35. package/lib/provision-default-workspace.handler.mjs +3 -4
  36. package/lib/provision-default-workspace.handler.mjs.map +1 -1
  37. package/lib/rest-api-lambda.handler.js +367 -208
  38. package/lib/rest-api-lambda.handler.js.map +1 -1
  39. package/lib/rest-api-lambda.handler.mjs +210 -165
  40. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  41. package/lib/seed-demo-data.handler.d.mts +19 -0
  42. package/lib/seed-demo-data.handler.d.ts +19 -0
  43. package/lib/seed-demo-data.handler.js +805 -159
  44. package/lib/seed-demo-data.handler.js.map +1 -1
  45. package/lib/seed-demo-data.handler.mjs +8 -4
  46. package/package.json +1 -1
  47. package/lib/chunk-6HGSR3TG.mjs +0 -123
  48. package/lib/chunk-6HGSR3TG.mjs.map +0 -1
  49. package/lib/chunk-E2OWEBBH.mjs.map +0 -1
  50. package/lib/chunk-FDBBTNCI.mjs.map +0 -1
  51. package/lib/chunk-Y4RGUAM2.mjs.map +0 -1
  52. /package/lib/{chunk-Z4PZSLYY.mjs.map → chunk-3M4QTQH6.mjs.map} +0 -0
  53. /package/lib/{chunk-XNUCKVSE.mjs.map → chunk-7GMTHOYF.mjs.map} +0 -0
  54. /package/lib/{chunk-EBB4RNUG.mjs.map → chunk-PIQISEGW.mjs.map} +0 -0
@@ -91,6 +91,25 @@ declare const seedDemoGraph: (params: {
91
91
  devUsers: ReadonlyArray<DemoDevUser>;
92
92
  cognito: CognitoProvisioner;
93
93
  onSiteTesters?: ReadonlyArray<OnSiteTester>;
94
+ /**
95
+ * ADR-028 counter-reconciliation seam (#1345). The seed writes
96
+ * canonical Tenant / Workspace / Membership / RoleAssignment rows via
97
+ * the create operations, which only *publish* counter-change events.
98
+ * In the seed Lambda the control event bus is unset (so the publisher
99
+ * is a no-op) and no consumer applies the deltas synchronously, so the
100
+ * denormalized counters (`usersInTenant`, `workspacesInTenant`,
101
+ * `tenantsForUser`, `workspacesForUser`, `usersInWorkspace`, …) would
102
+ * stay `0`. After the control-plane phases land, this recomputes every
103
+ * counter from canonical data with an absolute `SET`, so seeded counts
104
+ * are correct without relying on the async event path. Idempotent on
105
+ * re-seed (recompute-from-canonical, never increment), so a re-fire
106
+ * never double-counts.
107
+ *
108
+ * Injected for tests; defaults to the real
109
+ * {@link reconcileAllCountersOperation} the on-demand reconciliation
110
+ * job uses.
111
+ */
112
+ reconcileCounters?: () => Promise<unknown>;
94
113
  }) => Promise<void>;
95
114
  /**
96
115
  * Test-visible orchestrator. The production `handler` calls this with
@@ -91,6 +91,25 @@ declare const seedDemoGraph: (params: {
91
91
  devUsers: ReadonlyArray<DemoDevUser>;
92
92
  cognito: CognitoProvisioner;
93
93
  onSiteTesters?: ReadonlyArray<OnSiteTester>;
94
+ /**
95
+ * ADR-028 counter-reconciliation seam (#1345). The seed writes
96
+ * canonical Tenant / Workspace / Membership / RoleAssignment rows via
97
+ * the create operations, which only *publish* counter-change events.
98
+ * In the seed Lambda the control event bus is unset (so the publisher
99
+ * is a no-op) and no consumer applies the deltas synchronously, so the
100
+ * denormalized counters (`usersInTenant`, `workspacesInTenant`,
101
+ * `tenantsForUser`, `workspacesForUser`, `usersInWorkspace`, …) would
102
+ * stay `0`. After the control-plane phases land, this recomputes every
103
+ * counter from canonical data with an absolute `SET`, so seeded counts
104
+ * are correct without relying on the async event path. Idempotent on
105
+ * re-seed (recompute-from-canonical, never increment), so a re-fire
106
+ * never double-counts.
107
+ *
108
+ * Injected for tests; defaults to the real
109
+ * {@link reconcileAllCountersOperation} the on-demand reconciliation
110
+ * job uses.
111
+ */
112
+ reconcileCounters?: () => Promise<unknown>;
94
113
  }) => Promise<void>;
95
114
  /**
96
115
  * Test-visible orchestrator. The production `handler` calls this with