@opencrvs/toolkit 2.1.0-rc.b0003b1 → 2.1.0-rc.b061691

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 (57) hide show
  1. package/build.sh +2 -2
  2. package/dist/application-config/index.js +212 -188
  3. package/dist/cli.js +165 -5154
  4. package/dist/commons/api/router.d.ts +758 -201
  5. package/dist/commons/conditionals/conditionals.d.ts +1592 -40
  6. package/dist/commons/conditionals/validate.d.ts +2 -1
  7. package/dist/commons/events/ActionConfig.d.ts +230 -0
  8. package/dist/commons/events/ActionDocument.d.ts +51 -13
  9. package/dist/commons/events/ActionInput.d.ts +26 -6
  10. package/dist/commons/events/ActionStatus.d.ts +14 -0
  11. package/dist/commons/events/ActionType.d.ts +6 -1
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  13. package/dist/commons/events/AuditLog.d.ts +2 -0
  14. package/dist/commons/events/CountryConfigQueryInput.d.ts +18 -0
  15. package/dist/commons/events/Draft.d.ts +2 -0
  16. package/dist/commons/events/EventDocument.d.ts +24 -2
  17. package/dist/commons/events/EventIndex.d.ts +5 -24
  18. package/dist/commons/events/EventMetadata.d.ts +2 -1
  19. package/dist/commons/events/FieldConfig.d.ts +10 -0
  20. package/dist/commons/events/Flag.d.ts +48 -0
  21. package/dist/commons/events/WorkqueueColumnConfig.d.ts +4 -4
  22. package/dist/commons/events/WorkqueueConfig.d.ts +25 -7
  23. package/dist/commons/events/field.d.ts +722 -34
  24. package/dist/commons/events/scopes.d.ts +1 -0
  25. package/dist/commons/events/test.utils.d.ts +9 -4
  26. package/dist/commons/events/utils.d.ts +26 -4
  27. package/dist/conditionals/index.js +305 -55
  28. package/dist/environment/derived-variables.d.ts +0 -12
  29. package/dist/environment/derived-variables.d.ts.map +1 -1
  30. package/dist/environment/derived-variables.js +0 -14
  31. package/dist/environment/logger.d.ts +3 -12
  32. package/dist/environment/logger.d.ts.map +1 -1
  33. package/dist/environment/manage-users.js +17 -7
  34. package/dist/environment/setup-environment.js +0 -14
  35. package/dist/environment/swarm-to-k8s.js +17 -7
  36. package/dist/environment/update-workflows.js +17 -7
  37. package/dist/environment/users.js +17 -7
  38. package/dist/environment/utils.js +17 -7
  39. package/dist/events/index.js +3330 -3128
  40. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  41. package/dist/migrations/v2.0/index.js +88 -5144
  42. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  43. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +3 -0
  44. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +1 -0
  45. package/dist/migrations/v2.1/add-explicit-correction-flags.js +234 -0
  46. package/dist/migrations/v2.1/index.d.ts +6 -0
  47. package/dist/migrations/v2.1/index.d.ts.map +1 -0
  48. package/dist/migrations/v2.1/index.js +218 -0
  49. package/dist/notification/index.js +1557 -872
  50. package/dist/scopes/index.d.ts +257 -1
  51. package/dist/scopes/index.js +306 -55
  52. package/dist/templates/charts-values/dependencies/values.yaml +0 -3
  53. package/dist/templates/charts-values/opencrvs-services/values.yaml +0 -4
  54. package/opencrvs-toolkit-2.1.0-rc.b061691.tgz +0 -0
  55. package/package.json +3 -3
  56. package/tsconfig.tsbuildinfo +1 -1
  57. package/opencrvs-toolkit-2.1.0-rc.b0003b1.tgz +0 -0
@@ -106,6 +106,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
106
106
  "record.edit": "record.edit";
107
107
  "record.reject": "record.reject";
108
108
  "record.archive": "record.archive";
109
+ "record.unarchive": "record.unarchive";
109
110
  "record.review-duplicates": "record.review-duplicates";
110
111
  "record.register": "record.register";
111
112
  "record.print-certified-copies": "record.print-certified-copies";
@@ -145,6 +146,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
145
146
  declaredBy: "declaredBy";
146
147
  registeredIn: "registeredIn";
147
148
  registeredBy: "registeredBy";
149
+ flags: "flags";
148
150
  accessLevel: "accessLevel";
149
151
  ids: "ids";
150
152
  }>;
@@ -285,6 +287,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
285
287
  "record.edit": "record.edit";
286
288
  "record.reject": "record.reject";
287
289
  "record.archive": "record.archive";
290
+ "record.unarchive": "record.unarchive";
288
291
  "record.review-duplicates": "record.review-duplicates";
289
292
  "record.register": "record.register";
290
293
  "record.print-certified-copies": "record.print-certified-copies";
@@ -324,6 +327,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
324
327
  declaredBy: "declaredBy";
325
328
  registeredIn: "registeredIn";
326
329
  registeredBy: "registeredBy";
330
+ flags: "flags";
327
331
  accessLevel: "accessLevel";
328
332
  ids: "ids";
329
333
  }>;
@@ -440,6 +444,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
440
444
  "record.edit": "record.edit";
441
445
  "record.reject": "record.reject";
442
446
  "record.archive": "record.archive";
447
+ "record.unarchive": "record.unarchive";
443
448
  "record.review-duplicates": "record.review-duplicates";
444
449
  "record.register": "record.register";
445
450
  "record.print-certified-copies": "record.print-certified-copies";
@@ -479,6 +484,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
479
484
  declaredBy: "declaredBy";
480
485
  registeredIn: "registeredIn";
481
486
  registeredBy: "registeredBy";
487
+ flags: "flags";
482
488
  accessLevel: "accessLevel";
483
489
  ids: "ids";
484
490
  }>;
@@ -587,6 +593,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
587
593
  "record.edit": "record.edit";
588
594
  "record.reject": "record.reject";
589
595
  "record.archive": "record.archive";
596
+ "record.unarchive": "record.unarchive";
590
597
  "record.review-duplicates": "record.review-duplicates";
591
598
  "record.register": "record.register";
592
599
  "record.print-certified-copies": "record.print-certified-copies";
@@ -626,6 +633,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
626
633
  declaredBy: "declaredBy";
627
634
  registeredIn: "registeredIn";
628
635
  registeredBy: "registeredBy";
636
+ flags: "flags";
629
637
  accessLevel: "accessLevel";
630
638
  ids: "ids";
631
639
  }>;
@@ -745,6 +753,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
745
753
  "record.edit": "record.edit";
746
754
  "record.reject": "record.reject";
747
755
  "record.archive": "record.archive";
756
+ "record.unarchive": "record.unarchive";
748
757
  "record.review-duplicates": "record.review-duplicates";
749
758
  "record.register": "record.register";
750
759
  "record.print-certified-copies": "record.print-certified-copies";
@@ -784,6 +793,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
784
793
  declaredBy: "declaredBy";
785
794
  registeredIn: "registeredIn";
786
795
  registeredBy: "registeredBy";
796
+ flags: "flags";
787
797
  accessLevel: "accessLevel";
788
798
  ids: "ids";
789
799
  }>;
@@ -892,6 +902,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
892
902
  "record.edit": "record.edit";
893
903
  "record.reject": "record.reject";
894
904
  "record.archive": "record.archive";
905
+ "record.unarchive": "record.unarchive";
895
906
  "record.review-duplicates": "record.review-duplicates";
896
907
  "record.register": "record.register";
897
908
  "record.print-certified-copies": "record.print-certified-copies";
@@ -931,6 +942,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
931
942
  declaredBy: "declaredBy";
932
943
  registeredIn: "registeredIn";
933
944
  registeredBy: "registeredBy";
945
+ flags: "flags";
934
946
  accessLevel: "accessLevel";
935
947
  ids: "ids";
936
948
  }>;
@@ -18,6 +18,7 @@ declare const EventActionEntrySchema: z.ZodObject<{
18
18
  "event.actions.unassign.request": "event.actions.unassign.request";
19
19
  "event.actions.read.request": "event.actions.read.request";
20
20
  "event.actions.archive.request": "event.actions.archive.request";
21
+ "event.actions.unarchive.request": "event.actions.unarchive.request";
21
22
  "event.actions.reinstate.request": "event.actions.reinstate.request";
22
23
  "event.actions.print_certificate.request": "event.actions.print_certificate.request";
23
24
  "event.actions.correction.request.request": "event.actions.correction.request.request";
@@ -153,6 +154,7 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
153
154
  "event.actions.unassign.request": "event.actions.unassign.request";
154
155
  "event.actions.read.request": "event.actions.read.request";
155
156
  "event.actions.archive.request": "event.actions.archive.request";
157
+ "event.actions.unarchive.request": "event.actions.unarchive.request";
156
158
  "event.actions.reinstate.request": "event.actions.reinstate.request";
157
159
  "event.actions.print_certificate.request": "event.actions.print_certificate.request";
158
160
  "event.actions.correction.request.request": "event.actions.correction.request.request";
@@ -338,6 +338,7 @@ export declare const SerializedQueryExpression: z.ZodObject<{
338
338
  readonly CORRECTION_REQUESTED: "correction-requested";
339
339
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
340
340
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
341
+ readonly SEALED: "sealed";
341
342
  }>]>, z.ZodString]>>>;
342
343
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
343
344
  readonly INCOMPLETE: "incomplete";
@@ -345,6 +346,7 @@ export declare const SerializedQueryExpression: z.ZodObject<{
345
346
  readonly CORRECTION_REQUESTED: "correction-requested";
346
347
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
347
348
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
349
+ readonly SEALED: "sealed";
348
350
  }>]>, z.ZodString]>>>;
349
351
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
350
352
  readonly INCOMPLETE: "incomplete";
@@ -352,6 +354,7 @@ export declare const SerializedQueryExpression: z.ZodObject<{
352
354
  readonly CORRECTION_REQUESTED: "correction-requested";
353
355
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
354
356
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
357
+ readonly SEALED: "sealed";
355
358
  }>]>, z.ZodString]>>>;
356
359
  }, z.core.$strip>>>;
357
360
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -656,6 +659,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
656
659
  readonly CORRECTION_REQUESTED: "correction-requested";
657
660
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
658
661
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
662
+ readonly SEALED: "sealed";
659
663
  }>]>, z.ZodString]>>>;
660
664
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
661
665
  readonly INCOMPLETE: "incomplete";
@@ -663,6 +667,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
663
667
  readonly CORRECTION_REQUESTED: "correction-requested";
664
668
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
665
669
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
670
+ readonly SEALED: "sealed";
666
671
  }>]>, z.ZodString]>>>;
667
672
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
668
673
  readonly INCOMPLETE: "incomplete";
@@ -670,6 +675,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
670
675
  readonly CORRECTION_REQUESTED: "correction-requested";
671
676
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
672
677
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
678
+ readonly SEALED: "sealed";
673
679
  }>]>, z.ZodString]>>>;
674
680
  }, z.core.$strip>>>;
675
681
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -973,6 +979,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
973
979
  readonly CORRECTION_REQUESTED: "correction-requested";
974
980
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
975
981
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
982
+ readonly SEALED: "sealed";
976
983
  }>]>, z.ZodString]>>>;
977
984
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
978
985
  readonly INCOMPLETE: "incomplete";
@@ -980,6 +987,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
980
987
  readonly CORRECTION_REQUESTED: "correction-requested";
981
988
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
982
989
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
990
+ readonly SEALED: "sealed";
983
991
  }>]>, z.ZodString]>>>;
984
992
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
985
993
  readonly INCOMPLETE: "incomplete";
@@ -987,6 +995,7 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
987
995
  readonly CORRECTION_REQUESTED: "correction-requested";
988
996
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
989
997
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
998
+ readonly SEALED: "sealed";
990
999
  }>]>, z.ZodString]>>>;
991
1000
  }, z.core.$strip>>>;
992
1001
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1290,6 +1299,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1290
1299
  readonly CORRECTION_REQUESTED: "correction-requested";
1291
1300
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1292
1301
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1302
+ readonly SEALED: "sealed";
1293
1303
  }>]>, z.ZodString]>>>;
1294
1304
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1295
1305
  readonly INCOMPLETE: "incomplete";
@@ -1297,6 +1307,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1297
1307
  readonly CORRECTION_REQUESTED: "correction-requested";
1298
1308
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1299
1309
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1310
+ readonly SEALED: "sealed";
1300
1311
  }>]>, z.ZodString]>>>;
1301
1312
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1302
1313
  readonly INCOMPLETE: "incomplete";
@@ -1304,6 +1315,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1304
1315
  readonly CORRECTION_REQUESTED: "correction-requested";
1305
1316
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1306
1317
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1318
+ readonly SEALED: "sealed";
1307
1319
  }>]>, z.ZodString]>>>;
1308
1320
  }, z.core.$strip>>>;
1309
1321
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1606,6 +1618,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1606
1618
  readonly CORRECTION_REQUESTED: "correction-requested";
1607
1619
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1608
1620
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1621
+ readonly SEALED: "sealed";
1609
1622
  }>]>, z.ZodString]>>>;
1610
1623
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1611
1624
  readonly INCOMPLETE: "incomplete";
@@ -1613,6 +1626,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1613
1626
  readonly CORRECTION_REQUESTED: "correction-requested";
1614
1627
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1615
1628
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1629
+ readonly SEALED: "sealed";
1616
1630
  }>]>, z.ZodString]>>>;
1617
1631
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1618
1632
  readonly INCOMPLETE: "incomplete";
@@ -1620,6 +1634,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1620
1634
  readonly CORRECTION_REQUESTED: "correction-requested";
1621
1635
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1622
1636
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1637
+ readonly SEALED: "sealed";
1623
1638
  }>]>, z.ZodString]>>>;
1624
1639
  }, z.core.$strip>>>;
1625
1640
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -1923,6 +1938,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1923
1938
  readonly CORRECTION_REQUESTED: "correction-requested";
1924
1939
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1925
1940
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1941
+ readonly SEALED: "sealed";
1926
1942
  }>]>, z.ZodString]>>>;
1927
1943
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1928
1944
  readonly INCOMPLETE: "incomplete";
@@ -1930,6 +1946,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1930
1946
  readonly CORRECTION_REQUESTED: "correction-requested";
1931
1947
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1932
1948
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1949
+ readonly SEALED: "sealed";
1933
1950
  }>]>, z.ZodString]>>>;
1934
1951
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1935
1952
  readonly INCOMPLETE: "incomplete";
@@ -1937,6 +1954,7 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1937
1954
  readonly CORRECTION_REQUESTED: "correction-requested";
1938
1955
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1939
1956
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1957
+ readonly SEALED: "sealed";
1940
1958
  }>]>, z.ZodString]>>>;
1941
1959
  }, z.core.$strip>>>;
1942
1960
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -17,6 +17,7 @@ export declare const Draft: z.ZodObject<{
17
17
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
18
18
  MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE";
19
19
  ARCHIVE: "ARCHIVE";
20
+ UNARCHIVE: "UNARCHIVE";
20
21
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
21
22
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
22
23
  REJECT_CORRECTION: "REJECT_CORRECTION";
@@ -66,6 +67,7 @@ export declare const DraftInput: z.ZodObject<{
66
67
  MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
67
68
  MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE";
68
69
  ARCHIVE: "ARCHIVE";
70
+ UNARCHIVE: "UNARCHIVE";
69
71
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
70
72
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
71
73
  REJECT_CORRECTION: "REJECT_CORRECTION";
@@ -145,6 +145,27 @@ export declare const EventDocument: z.ZodObject<{
145
145
  content: z.ZodObject<{
146
146
  reason: z.ZodString;
147
147
  }, z.core.$strip>;
148
+ }, z.core.$strip>, z.ZodObject<{
149
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
150
+ transactionId: z.ZodString;
151
+ createdByUserType: z.ZodEnum<{
152
+ user: "user";
153
+ system: "system";
154
+ }>;
155
+ createdAt: z.ZodString;
156
+ createdBy: z.ZodString;
157
+ createdByRole: z.ZodOptional<z.ZodString>;
158
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
159
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
160
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>;
161
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>>;
162
+ status: z.ZodEnum<{
163
+ Requested: "Requested";
164
+ Accepted: "Accepted";
165
+ Rejected: "Rejected";
166
+ }>;
167
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
168
+ type: z.ZodLiteral<"UNARCHIVE">;
148
169
  }, z.core.$strip>, z.ZodObject<{
149
170
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
150
171
  transactionId: z.ZodString;
@@ -389,9 +410,9 @@ export declare const EventDocument: z.ZodObject<{
389
410
  }>;
390
411
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
391
412
  type: z.ZodLiteral<"EDIT">;
392
- content: z.ZodObject<{
413
+ content: z.ZodOptional<z.ZodObject<{
393
414
  comment: z.ZodOptional<z.ZodString>;
394
- }, z.core.$strip>;
415
+ }, z.core.$strip>>;
395
416
  }, z.core.$strip>, z.ZodObject<{
396
417
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
397
418
  transactionId: z.ZodString;
@@ -435,6 +456,7 @@ export declare const EventDocument: z.ZodObject<{
435
456
  EDIT: "EDIT";
436
457
  REJECT: "REJECT";
437
458
  ARCHIVE: "ARCHIVE";
459
+ UNARCHIVE: "UNARCHIVE";
438
460
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
439
461
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
440
462
  REJECT_CORRECTION: "REJECT_CORRECTION";
@@ -1,4 +1,5 @@
1
1
  import { z, ZodType } from 'zod/v4';
2
+ export { ContainsFlags } from './Flag';
2
3
  export declare const EventIndex: z.ZodObject<{
3
4
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
4
5
  type: z.ZodString;
@@ -70,6 +71,7 @@ export declare const EventIndex: z.ZodObject<{
70
71
  readonly CORRECTION_REQUESTED: "correction-requested";
71
72
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
72
73
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
74
+ readonly SEALED: "sealed";
73
75
  }>]>, z.ZodString]>>;
74
76
  declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldValue, unknown>>>;
75
77
  }, z.core.$strip>;
@@ -123,29 +125,6 @@ export declare const Range: z.ZodObject<{
123
125
  gte: z.ZodString;
124
126
  lte: z.ZodString;
125
127
  }, z.core.$strip>;
126
- export declare const ContainsFlags: z.ZodObject<{
127
- anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
128
- readonly INCOMPLETE: "incomplete";
129
- readonly REJECTED: "rejected";
130
- readonly CORRECTION_REQUESTED: "correction-requested";
131
- readonly POTENTIAL_DUPLICATE: "potential-duplicate";
132
- readonly EDIT_IN_PROGRESS: "edit-in-progress";
133
- }>]>, z.ZodString]>>>;
134
- noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
135
- readonly INCOMPLETE: "incomplete";
136
- readonly REJECTED: "rejected";
137
- readonly CORRECTION_REQUESTED: "correction-requested";
138
- readonly POTENTIAL_DUPLICATE: "potential-duplicate";
139
- readonly EDIT_IN_PROGRESS: "edit-in-progress";
140
- }>]>, z.ZodString]>>>;
141
- allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
142
- readonly INCOMPLETE: "incomplete";
143
- readonly REJECTED: "rejected";
144
- readonly CORRECTION_REQUESTED: "correction-requested";
145
- readonly POTENTIAL_DUPLICATE: "potential-duplicate";
146
- readonly EDIT_IN_PROGRESS: "edit-in-progress";
147
- }>]>, z.ZodString]>>>;
148
- }, z.core.$strip>;
149
128
  export declare const Within: z.ZodObject<{
150
129
  type: z.ZodLiteral<"within">;
151
130
  location: z.ZodString;
@@ -316,6 +295,7 @@ export declare const QueryExpression: z.ZodObject<{
316
295
  readonly CORRECTION_REQUESTED: "correction-requested";
317
296
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
318
297
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
298
+ readonly SEALED: "sealed";
319
299
  }>]>, z.ZodString]>>>;
320
300
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
321
301
  readonly INCOMPLETE: "incomplete";
@@ -323,6 +303,7 @@ export declare const QueryExpression: z.ZodObject<{
323
303
  readonly CORRECTION_REQUESTED: "correction-requested";
324
304
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
325
305
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
306
+ readonly SEALED: "sealed";
326
307
  }>]>, z.ZodString]>>>;
327
308
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
328
309
  readonly INCOMPLETE: "incomplete";
@@ -330,6 +311,7 @@ export declare const QueryExpression: z.ZodObject<{
330
311
  readonly CORRECTION_REQUESTED: "correction-requested";
331
312
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
332
313
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
314
+ readonly SEALED: "sealed";
333
315
  }>]>, z.ZodString]>>>;
334
316
  }, z.core.$strip>>>;
335
317
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
@@ -354,5 +336,4 @@ export declare const SearchQuery: z.ZodObject<{
354
336
  export type SearchQuery = z.infer<typeof SearchQuery>;
355
337
  export type QueryType = z.infer<typeof QueryType>;
356
338
  export type QueryExpression = z.infer<typeof QueryExpression>;
357
- export {};
358
339
  //# sourceMappingURL=EventIndex.d.ts.map
@@ -150,6 +150,7 @@ export declare const EventMetadata: z.ZodObject<{
150
150
  readonly CORRECTION_REQUESTED: "correction-requested";
151
151
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
152
152
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
153
+ readonly SEALED: "sealed";
153
154
  }>]>, z.ZodString]>>;
154
155
  }, z.core.$strip>;
155
156
  export type EventMetadata = z.infer<typeof EventMetadata>;
@@ -159,6 +160,7 @@ export declare const EventMetadataKeys: z.ZodEnum<{
159
160
  type: "type";
160
161
  updatedAt: "updatedAt";
161
162
  placeOfEvent: "placeOfEvent";
163
+ flags: "flags";
162
164
  createdByUserType: "createdByUserType";
163
165
  createdAt: "createdAt";
164
166
  createdBy: "createdBy";
@@ -171,7 +173,6 @@ export declare const EventMetadataKeys: z.ZodEnum<{
171
173
  updatedByUserRole: "updatedByUserRole";
172
174
  updatedAtLocation: "updatedAtLocation";
173
175
  updatedBy: "updatedBy";
174
- flags: "flags";
175
176
  }>;
176
177
  export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
177
178
  /**
@@ -1886,6 +1886,7 @@ declare const AdministrativeAreaField: z.ZodObject<{
1886
1886
  "record.edit": "record.edit";
1887
1887
  "record.reject": "record.reject";
1888
1888
  "record.archive": "record.archive";
1889
+ "record.unarchive": "record.unarchive";
1889
1890
  "record.review-duplicates": "record.review-duplicates";
1890
1891
  "record.register": "record.register";
1891
1892
  "record.print-certified-copies": "record.print-certified-copies";
@@ -1925,6 +1926,7 @@ declare const AdministrativeAreaField: z.ZodObject<{
1925
1926
  declaredBy: "declaredBy";
1926
1927
  registeredIn: "registeredIn";
1927
1928
  registeredBy: "registeredBy";
1929
+ flags: "flags";
1928
1930
  accessLevel: "accessLevel";
1929
1931
  ids: "ids";
1930
1932
  }>;
@@ -2014,6 +2016,7 @@ declare const LocationInput: z.ZodObject<{
2014
2016
  "record.edit": "record.edit";
2015
2017
  "record.reject": "record.reject";
2016
2018
  "record.archive": "record.archive";
2019
+ "record.unarchive": "record.unarchive";
2017
2020
  "record.review-duplicates": "record.review-duplicates";
2018
2021
  "record.register": "record.register";
2019
2022
  "record.print-certified-copies": "record.print-certified-copies";
@@ -2053,6 +2056,7 @@ declare const LocationInput: z.ZodObject<{
2053
2056
  declaredBy: "declaredBy";
2054
2057
  registeredIn: "registeredIn";
2055
2058
  registeredBy: "registeredBy";
2059
+ flags: "flags";
2056
2060
  accessLevel: "accessLevel";
2057
2061
  ids: "ids";
2058
2062
  }>;
@@ -2213,6 +2217,7 @@ declare const Facility: z.ZodObject<{
2213
2217
  "record.edit": "record.edit";
2214
2218
  "record.reject": "record.reject";
2215
2219
  "record.archive": "record.archive";
2220
+ "record.unarchive": "record.unarchive";
2216
2221
  "record.review-duplicates": "record.review-duplicates";
2217
2222
  "record.register": "record.register";
2218
2223
  "record.print-certified-copies": "record.print-certified-copies";
@@ -2252,6 +2257,7 @@ declare const Facility: z.ZodObject<{
2252
2257
  declaredBy: "declaredBy";
2253
2258
  registeredIn: "registeredIn";
2254
2259
  registeredBy: "registeredBy";
2260
+ flags: "flags";
2255
2261
  accessLevel: "accessLevel";
2256
2262
  ids: "ids";
2257
2263
  }>;
@@ -2327,6 +2333,7 @@ declare const Office: z.ZodObject<{
2327
2333
  "record.edit": "record.edit";
2328
2334
  "record.reject": "record.reject";
2329
2335
  "record.archive": "record.archive";
2336
+ "record.unarchive": "record.unarchive";
2330
2337
  "record.review-duplicates": "record.review-duplicates";
2331
2338
  "record.register": "record.register";
2332
2339
  "record.print-certified-copies": "record.print-certified-copies";
@@ -2366,6 +2373,7 @@ declare const Office: z.ZodObject<{
2366
2373
  declaredBy: "declaredBy";
2367
2374
  registeredIn: "registeredIn";
2368
2375
  registeredBy: "registeredBy";
2376
+ flags: "flags";
2369
2377
  accessLevel: "accessLevel";
2370
2378
  ids: "ids";
2371
2379
  }>;
@@ -2527,6 +2535,7 @@ declare const Address: z.ZodObject<{
2527
2535
  "record.edit": "record.edit";
2528
2536
  "record.reject": "record.reject";
2529
2537
  "record.archive": "record.archive";
2538
+ "record.unarchive": "record.unarchive";
2530
2539
  "record.review-duplicates": "record.review-duplicates";
2531
2540
  "record.register": "record.register";
2532
2541
  "record.print-certified-copies": "record.print-certified-copies";
@@ -2566,6 +2575,7 @@ declare const Address: z.ZodObject<{
2566
2575
  declaredBy: "declaredBy";
2567
2576
  registeredIn: "registeredIn";
2568
2577
  registeredBy: "registeredBy";
2578
+ flags: "flags";
2569
2579
  accessLevel: "accessLevel";
2570
2580
  ids: "ids";
2571
2581
  }>;
@@ -11,6 +11,7 @@ export declare const InherentFlags: {
11
11
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
12
12
  */
13
13
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
14
+ readonly SEALED: "sealed";
14
15
  };
15
16
  export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
16
17
  export declare const ActionFlag: z.ZodString;
@@ -30,8 +31,54 @@ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
30
31
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
31
32
  */
32
33
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
34
+ readonly SEALED: "sealed";
33
35
  }>]>, z.ZodString]>;
34
36
  export type Flag = z.infer<typeof Flag>;
37
+ export declare const ContainsFlags: z.ZodObject<{
38
+ anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
39
+ readonly INCOMPLETE: "incomplete";
40
+ readonly REJECTED: "rejected";
41
+ readonly CORRECTION_REQUESTED: "correction-requested";
42
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
43
+ /**
44
+ * This flag is set by the Edit-action and removed after the declaration or registration.
45
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
46
+ *
47
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
48
+ */
49
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
50
+ readonly SEALED: "sealed";
51
+ }>]>, z.ZodString]>>>;
52
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
53
+ readonly INCOMPLETE: "incomplete";
54
+ readonly REJECTED: "rejected";
55
+ readonly CORRECTION_REQUESTED: "correction-requested";
56
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
57
+ /**
58
+ * This flag is set by the Edit-action and removed after the declaration or registration.
59
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
60
+ *
61
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
62
+ */
63
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
64
+ readonly SEALED: "sealed";
65
+ }>]>, z.ZodString]>>>;
66
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
67
+ readonly INCOMPLETE: "incomplete";
68
+ readonly REJECTED: "rejected";
69
+ readonly CORRECTION_REQUESTED: "correction-requested";
70
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
71
+ /**
72
+ * This flag is set by the Edit-action and removed after the declaration or registration.
73
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
74
+ *
75
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
76
+ */
77
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
78
+ readonly SEALED: "sealed";
79
+ }>]>, z.ZodString]>>>;
80
+ }, z.core.$strip>;
81
+ export type ContainsFlags = z.infer<typeof ContainsFlags>;
35
82
  /**
36
83
  * Configuration of a custom flag that can be associated with a certain event type.
37
84
  */
@@ -57,6 +104,7 @@ export declare const ActionFlagConfig: z.ZodObject<{
57
104
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
58
105
  */
59
106
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
107
+ readonly SEALED: "sealed";
60
108
  }>]>, z.ZodString]>;
61
109
  operation: z.ZodEnum<{
62
110
  add: "add";
@@ -6,6 +6,7 @@ export declare const WorkqueueColumnKeys: z.ZodEnum<{
6
6
  type: "type";
7
7
  updatedAt: "updatedAt";
8
8
  placeOfEvent: "placeOfEvent";
9
+ flags: "flags";
9
10
  createdByUserType: "createdByUserType";
10
11
  createdAt: "createdAt";
11
12
  createdBy: "createdBy";
@@ -18,7 +19,6 @@ export declare const WorkqueueColumnKeys: z.ZodEnum<{
18
19
  updatedByUserRole: "updatedByUserRole";
19
20
  updatedAtLocation: "updatedAtLocation";
20
21
  updatedBy: "updatedBy";
21
- flags: "flags";
22
22
  outbox: "outbox";
23
23
  }>;
24
24
  export type WorkqueueColumnKeys = z.infer<typeof WorkqueueColumnKeys>;
@@ -29,6 +29,7 @@ export declare const WorkqueueColumnValue: z.ZodObject<{
29
29
  type: "type";
30
30
  updatedAt: "updatedAt";
31
31
  placeOfEvent: "placeOfEvent";
32
+ flags: "flags";
32
33
  createdByUserType: "createdByUserType";
33
34
  createdAt: "createdAt";
34
35
  createdBy: "createdBy";
@@ -41,7 +42,6 @@ export declare const WorkqueueColumnValue: z.ZodObject<{
41
42
  updatedByUserRole: "updatedByUserRole";
42
43
  updatedAtLocation: "updatedAtLocation";
43
44
  updatedBy: "updatedBy";
44
- flags: "flags";
45
45
  outbox: "outbox";
46
46
  }>;
47
47
  }, z.core.$strip>;
@@ -58,6 +58,7 @@ export declare const WorkqueueColumn: z.ZodObject<{
58
58
  type: "type";
59
59
  updatedAt: "updatedAt";
60
60
  placeOfEvent: "placeOfEvent";
61
+ flags: "flags";
61
62
  createdByUserType: "createdByUserType";
62
63
  createdAt: "createdAt";
63
64
  createdBy: "createdBy";
@@ -70,7 +71,6 @@ export declare const WorkqueueColumn: z.ZodObject<{
70
71
  updatedByUserRole: "updatedByUserRole";
71
72
  updatedAtLocation: "updatedAtLocation";
72
73
  updatedBy: "updatedBy";
73
- flags: "flags";
74
74
  outbox: "outbox";
75
75
  }>;
76
76
  }, z.core.$strip>;
@@ -84,7 +84,7 @@ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColum
84
84
  description: string;
85
85
  };
86
86
  value: {
87
- $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
87
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "flags" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "outbox";
88
88
  };
89
89
  }[];
90
90
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map