@opencrvs/toolkit 1.9.2-rc.f1d7235 → 1.9.2-rc.f5e3efd

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 (32) hide show
  1. package/dist/commons/api/router.d.ts +220 -482
  2. package/dist/commons/events/ActionConfig.d.ts +13 -390
  3. package/dist/commons/events/ActionDocument.d.ts +44 -0
  4. package/dist/commons/events/ActionInput.d.ts +20 -0
  5. package/dist/commons/events/ActionType.d.ts +7 -1
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -6
  7. package/dist/commons/events/CountryConfigQueryInput.d.ts +12 -0
  8. package/dist/commons/events/Draft.d.ts +2 -0
  9. package/dist/commons/events/EventConfig.d.ts +8 -318
  10. package/dist/commons/events/EventDocument.d.ts +22 -0
  11. package/dist/commons/events/EventIndex.d.ts +5 -1
  12. package/dist/commons/events/EventMetadata.d.ts +2 -3
  13. package/dist/commons/events/FieldConfig.d.ts +0 -80
  14. package/dist/commons/events/FieldType.d.ts +1 -2
  15. package/dist/commons/events/FieldTypeMapping.d.ts +1 -8
  16. package/dist/commons/events/FieldValue.d.ts +1 -2
  17. package/dist/commons/events/Flag.d.ts +3 -0
  18. package/dist/commons/events/FormConfig.d.ts +0 -234
  19. package/dist/commons/events/PageConfig.d.ts +0 -156
  20. package/dist/commons/events/WorkqueueColumnConfig.d.ts +2 -5
  21. package/dist/commons/events/WorkqueueConfig.d.ts +19 -7
  22. package/dist/commons/events/defineConfig.d.ts +2 -446
  23. package/dist/commons/events/scopes.d.ts +1 -0
  24. package/dist/commons/events/state/index.d.ts +0 -6
  25. package/dist/commons/events/state/utils.d.ts +15 -1
  26. package/dist/commons/events/test.utils.d.ts +9 -1
  27. package/dist/commons/events/utils.d.ts +17 -887
  28. package/dist/events/index.js +73 -115
  29. package/dist/notification/index.js +27 -35
  30. package/dist/scopes/index.d.ts +6 -2
  31. package/dist/scopes/index.js +1 -0
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod/v4';
2
- export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "placeOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
2
+ export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
3
3
  export declare const WorkqueueColumnKeys: z.ZodEnum<{
4
4
  type: "type";
5
5
  id: "id";
@@ -11,7 +11,6 @@ export declare const WorkqueueColumnKeys: z.ZodEnum<{
11
11
  createdAtLocation: "createdAtLocation";
12
12
  assignedTo: "assignedTo";
13
13
  trackingId: "trackingId";
14
- placeOfEvent: "placeOfEvent";
15
14
  legalStatuses: "legalStatuses";
16
15
  dateOfEvent: "dateOfEvent";
17
16
  updatedByUserRole: "updatedByUserRole";
@@ -34,7 +33,6 @@ export declare const WorkqueueColumnValue: z.ZodObject<{
34
33
  createdAtLocation: "createdAtLocation";
35
34
  assignedTo: "assignedTo";
36
35
  trackingId: "trackingId";
37
- placeOfEvent: "placeOfEvent";
38
36
  legalStatuses: "legalStatuses";
39
37
  dateOfEvent: "dateOfEvent";
40
38
  updatedByUserRole: "updatedByUserRole";
@@ -63,7 +61,6 @@ export declare const WorkqueueColumn: z.ZodObject<{
63
61
  createdAtLocation: "createdAtLocation";
64
62
  assignedTo: "assignedTo";
65
63
  trackingId: "trackingId";
66
- placeOfEvent: "placeOfEvent";
67
64
  legalStatuses: "legalStatuses";
68
65
  dateOfEvent: "dateOfEvent";
69
66
  updatedByUserRole: "updatedByUserRole";
@@ -84,7 +81,7 @@ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColum
84
81
  description: string;
85
82
  };
86
83
  value: {
87
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
84
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
88
85
  };
89
86
  }[];
90
87
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
@@ -6,7 +6,7 @@ export declare const mandatoryColumns: {
6
6
  description: string;
7
7
  };
8
8
  value: {
9
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
9
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
10
10
  };
11
11
  }[];
12
12
  export declare const WorkqueueActionsWithDefault: z.ZodEnum<{
@@ -14,6 +14,7 @@ export declare const WorkqueueActionsWithDefault: z.ZodEnum<{
14
14
  DECLARE: "DECLARE";
15
15
  VALIDATE: "VALIDATE";
16
16
  REGISTER: "REGISTER";
17
+ EDIT: "EDIT";
17
18
  REJECT: "REJECT";
18
19
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
19
20
  ARCHIVE: "ARCHIVE";
@@ -227,6 +228,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
227
228
  readonly REJECTED: "rejected";
228
229
  readonly CORRECTION_REQUESTED: "correction-requested";
229
230
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
231
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
230
232
  }>]>, z.ZodString]>>>;
231
233
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
232
234
  readonly PENDING_CERTIFICATION: "pending-certification";
@@ -234,6 +236,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
234
236
  readonly REJECTED: "rejected";
235
237
  readonly CORRECTION_REQUESTED: "correction-requested";
236
238
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
239
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
237
240
  }>]>, z.ZodString]>>>;
238
241
  }, z.core.$strip>>>;
239
242
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -434,6 +437,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
434
437
  readonly REJECTED: "rejected";
435
438
  readonly CORRECTION_REQUESTED: "correction-requested";
436
439
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
440
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
437
441
  }>]>, z.ZodString]>>>;
438
442
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
439
443
  readonly PENDING_CERTIFICATION: "pending-certification";
@@ -441,6 +445,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
441
445
  readonly REJECTED: "rejected";
442
446
  readonly CORRECTION_REQUESTED: "correction-requested";
443
447
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
448
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
444
449
  }>]>, z.ZodString]>>>;
445
450
  }, z.core.$strip>>>;
446
451
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -452,6 +457,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
452
457
  DECLARE: "DECLARE";
453
458
  VALIDATE: "VALIDATE";
454
459
  REGISTER: "REGISTER";
460
+ EDIT: "EDIT";
455
461
  REJECT: "REJECT";
456
462
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
457
463
  ARCHIVE: "ARCHIVE";
@@ -478,7 +484,6 @@ export declare const WorkqueueConfig: z.ZodObject<{
478
484
  createdAtLocation: "createdAtLocation";
479
485
  assignedTo: "assignedTo";
480
486
  trackingId: "trackingId";
481
- placeOfEvent: "placeOfEvent";
482
487
  legalStatuses: "legalStatuses";
483
488
  dateOfEvent: "dateOfEvent";
484
489
  updatedByUserRole: "updatedByUserRole";
@@ -704,6 +709,7 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
704
709
  DECLARE: "DECLARE";
705
710
  VALIDATE: "VALIDATE";
706
711
  REGISTER: "REGISTER";
712
+ EDIT: "EDIT";
707
713
  REJECT: "REJECT";
708
714
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
709
715
  ARCHIVE: "ARCHIVE";
@@ -916,6 +922,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
916
922
  readonly REJECTED: "rejected";
917
923
  readonly CORRECTION_REQUESTED: "correction-requested";
918
924
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
925
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
919
926
  }>]>, z.ZodString]>>>;
920
927
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
921
928
  readonly PENDING_CERTIFICATION: "pending-certification";
@@ -923,6 +930,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
923
930
  readonly REJECTED: "rejected";
924
931
  readonly CORRECTION_REQUESTED: "correction-requested";
925
932
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
933
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
926
934
  }>]>, z.ZodString]>>>;
927
935
  }, z.core.$strip>>>;
928
936
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1122,6 +1130,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1122
1130
  readonly REJECTED: "rejected";
1123
1131
  readonly CORRECTION_REQUESTED: "correction-requested";
1124
1132
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1133
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1125
1134
  }>]>, z.ZodString]>>>;
1126
1135
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1127
1136
  readonly PENDING_CERTIFICATION: "pending-certification";
@@ -1129,6 +1138,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1129
1138
  readonly REJECTED: "rejected";
1130
1139
  readonly CORRECTION_REQUESTED: "correction-requested";
1131
1140
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1141
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1132
1142
  }>]>, z.ZodString]>>>;
1133
1143
  }, z.core.$strip>>>;
1134
1144
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1329,6 +1339,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1329
1339
  readonly REJECTED: "rejected";
1330
1340
  readonly CORRECTION_REQUESTED: "correction-requested";
1331
1341
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1342
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1332
1343
  }>]>, z.ZodString]>>>;
1333
1344
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1334
1345
  readonly PENDING_CERTIFICATION: "pending-certification";
@@ -1336,6 +1347,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1336
1347
  readonly REJECTED: "rejected";
1337
1348
  readonly CORRECTION_REQUESTED: "correction-requested";
1338
1349
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1350
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1339
1351
  }>]>, z.ZodString]>>>;
1340
1352
  }, z.core.$strip>>>;
1341
1353
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1347,6 +1359,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1347
1359
  DECLARE: "DECLARE";
1348
1360
  VALIDATE: "VALIDATE";
1349
1361
  REGISTER: "REGISTER";
1362
+ EDIT: "EDIT";
1350
1363
  REJECT: "REJECT";
1351
1364
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
1352
1365
  ARCHIVE: "ARCHIVE";
@@ -1373,7 +1386,6 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1373
1386
  createdAtLocation: "createdAtLocation";
1374
1387
  assignedTo: "assignedTo";
1375
1388
  trackingId: "trackingId";
1376
- placeOfEvent: "placeOfEvent";
1377
1389
  legalStatuses: "legalStatuses";
1378
1390
  dateOfEvent: "dateOfEvent";
1379
1391
  updatedByUserRole: "updatedByUserRole";
@@ -1733,7 +1745,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
1733
1745
  }[];
1734
1746
  };
1735
1747
  actions: {
1736
- type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1748
+ type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1737
1749
  conditionals?: any[] | undefined;
1738
1750
  }[];
1739
1751
  columns: {
@@ -1743,7 +1755,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
1743
1755
  description: string;
1744
1756
  };
1745
1757
  value: {
1746
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
1758
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
1747
1759
  };
1748
1760
  }[];
1749
1761
  icon: "Validated" | "Registered" | "Certified" | "Archived" | "List" | "Assigned" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "RequiresUpdates" | "Sent" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "File" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
@@ -1994,7 +2006,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInput[]): {
1994
2006
  }[];
1995
2007
  };
1996
2008
  actions: {
1997
- type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
2009
+ type: "DELETE" | "DECLARE" | "VALIDATE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1998
2010
  conditionals?: any[] | undefined;
1999
2011
  }[];
2000
2012
  columns: {
@@ -2004,7 +2016,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInput[]): {
2004
2016
  description: string;
2005
2017
  };
2006
2018
  value: {
2007
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
2019
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
2008
2020
  };
2009
2021
  }[];
2010
2022
  icon: "Validated" | "Registered" | "Certified" | "Archived" | "List" | "Assigned" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "RequiresUpdates" | "Sent" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "File" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";