@openhi/constructs 0.0.189 → 0.0.191

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 (37) hide show
  1. package/lib/{chunk-7GMTHOYF.mjs → chunk-2TLJKOJL.mjs} +2 -2
  2. package/lib/{chunk-VQY57NOV.mjs → chunk-3PS5R367.mjs} +2 -2
  3. package/lib/{chunk-DIVYB6GD.mjs → chunk-4WFHISV3.mjs} +4 -4
  4. package/lib/{chunk-3M4QTQH6.mjs → chunk-4YQD4PFR.mjs} +2 -2
  5. package/lib/{chunk-JJ3AQ6G5.mjs → chunk-63POQTMP.mjs} +2 -2
  6. package/lib/{chunk-F2LY4TEI.mjs → chunk-7WBLBIQJ.mjs} +4 -4
  7. package/lib/{chunk-4LQR32D2.mjs → chunk-AYHBFK3Y.mjs} +2 -2
  8. package/lib/{chunk-PIQISEGW.mjs → chunk-RGE4WDND.mjs} +2 -2
  9. package/lib/{chunk-V6KLFEHC.mjs → chunk-UWVPF6GB.mjs} +2 -2
  10. package/lib/{chunk-Q4KQD2NB.mjs → chunk-V6AO5T57.mjs} +9 -2
  11. package/lib/chunk-V6AO5T57.mjs.map +1 -0
  12. package/lib/counter-reconciliation.handler.js.map +1 -1
  13. package/lib/counter-reconciliation.handler.mjs +4 -4
  14. package/lib/index.js.map +1 -1
  15. package/lib/index.mjs +8 -8
  16. package/lib/pre-token-generation.handler.js.map +1 -1
  17. package/lib/pre-token-generation.handler.mjs +4 -4
  18. package/lib/provision-default-workspace.handler.js +4 -1
  19. package/lib/provision-default-workspace.handler.js.map +1 -1
  20. package/lib/provision-default-workspace.handler.mjs +3 -3
  21. package/lib/rest-api-lambda.handler.js +8 -1
  22. package/lib/rest-api-lambda.handler.js.map +1 -1
  23. package/lib/rest-api-lambda.handler.mjs +8 -8
  24. package/lib/seed-demo-data.handler.js +4 -1
  25. package/lib/seed-demo-data.handler.js.map +1 -1
  26. package/lib/seed-demo-data.handler.mjs +7 -7
  27. package/package.json +11 -11
  28. package/lib/chunk-Q4KQD2NB.mjs.map +0 -1
  29. /package/lib/{chunk-7GMTHOYF.mjs.map → chunk-2TLJKOJL.mjs.map} +0 -0
  30. /package/lib/{chunk-VQY57NOV.mjs.map → chunk-3PS5R367.mjs.map} +0 -0
  31. /package/lib/{chunk-DIVYB6GD.mjs.map → chunk-4WFHISV3.mjs.map} +0 -0
  32. /package/lib/{chunk-3M4QTQH6.mjs.map → chunk-4YQD4PFR.mjs.map} +0 -0
  33. /package/lib/{chunk-JJ3AQ6G5.mjs.map → chunk-63POQTMP.mjs.map} +0 -0
  34. /package/lib/{chunk-F2LY4TEI.mjs.map → chunk-7WBLBIQJ.mjs.map} +0 -0
  35. /package/lib/{chunk-4LQR32D2.mjs.map → chunk-AYHBFK3Y.mjs.map} +0 -0
  36. /package/lib/{chunk-PIQISEGW.mjs.map → chunk-RGE4WDND.mjs.map} +0 -0
  37. /package/lib/{chunk-V6KLFEHC.mjs.map → chunk-UWVPF6GB.mjs.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  deleteOrganizationOperation,
9
9
  deleteTenantOperation,
10
10
  deleteWorkspaceOperation
11
- } from "./chunk-VQY57NOV.mjs";
11
+ } from "./chunk-3PS5R367.mjs";
12
12
  import {
13
13
  createAccountOperation,
14
14
  createAppointmentOperation,
@@ -24,28 +24,28 @@ import {
24
24
  createPractitionerOperation,
25
25
  createProcedureOperation,
26
26
  getRoleByIdOperation
27
- } from "./chunk-7GMTHOYF.mjs";
27
+ } from "./chunk-2TLJKOJL.mjs";
28
28
  import {
29
29
  countMembershipsByUserOperation,
30
30
  listTenantsOperation,
31
31
  listWorkspacesOperation,
32
32
  membershipListByWorkspaceOperation,
33
33
  roleAssignmentListByWorkspaceOperation
34
- } from "./chunk-4LQR32D2.mjs";
34
+ } from "./chunk-AYHBFK3Y.mjs";
35
35
  import {
36
36
  listPractitionerRolesOperation,
37
37
  listRoleAssignmentsOperation
38
- } from "./chunk-JJ3AQ6G5.mjs";
38
+ } from "./chunk-63POQTMP.mjs";
39
39
  import {
40
40
  listMembershipsOperation
41
- } from "./chunk-PIQISEGW.mjs";
41
+ } from "./chunk-RGE4WDND.mjs";
42
42
  import {
43
43
  createMembershipOperation,
44
44
  createRoleAssignmentOperation,
45
45
  createTenantOperation,
46
46
  createWorkspaceOperation,
47
47
  extractDenormalizedReferenceDisplay
48
- } from "./chunk-3M4QTQH6.mjs";
48
+ } from "./chunk-4YQD4PFR.mjs";
49
49
  import {
50
50
  extractRoleLevel,
51
51
  publishMembershipDeleted,
@@ -72,7 +72,7 @@ import {
72
72
  getUserByIdOperation,
73
73
  switchUserTenantWorkspaceOperation,
74
74
  updateUserOperation
75
- } from "./chunk-V6KLFEHC.mjs";
75
+ } from "./chunk-UWVPF6GB.mjs";
76
76
  import {
77
77
  getDynamoDataService
78
78
  } from "./chunk-6BB4CRSS.mjs";
@@ -88,7 +88,7 @@ import {
88
88
  membershipListByUserOperation,
89
89
  mergeAuditIntoMeta,
90
90
  updateDataEntityById
91
- } from "./chunk-Q4KQD2NB.mjs";
91
+ } from "./chunk-V6AO5T57.mjs";
92
92
  import {
93
93
  compressResource,
94
94
  decompressResource
@@ -6844,6 +6844,9 @@ function mergeAuditIntoMeta(meta, audit) {
6844
6844
 
6845
6845
  // src/data/operations/data-operations-common.ts
6846
6846
  var DATA_ENTITY_SK = "CURRENT";
6847
+ function deriveVid(lastUpdated) {
6848
+ return lastUpdated.replace(/\D/g, "") || Date.now().toString(36);
6849
+ }
6847
6850
  var BATCH_GET_MAX_ATTEMPTS = 3;
6848
6851
  var BATCH_GET_BASE_BACKOFF_MS = 50;
6849
6852
  async function batchGetWithRetry(entity, keys, options) {
@@ -6914,7 +6917,7 @@ async function dispatchListMode(mode, shardResults, hooks) {
6914
6917
  }
6915
6918
  async function createDataEntityRecord(entity, tenantId, workspaceId, id, resourceWithAudit, fallbackDate) {
6916
6919
  const lastUpdated = resourceWithAudit.meta?.lastUpdated ?? fallbackDate ?? (/* @__PURE__ */ new Date()).toISOString();
6917
- const vid = lastUpdated.replace(/[-:T.Z]/g, "").slice(0, 12) || Date.now().toString(36);
6920
+ const vid = deriveVid(lastUpdated);
6918
6921
  const resourceLike = resourceWithAudit;
6919
6922
  const summary = JSON.stringify((0, import_types3.extractSummary)(resourceLike));
6920
6923
  const gsi1sk = (0, import_types3.extractSortKey)(resourceLike);