@opencrvs/toolkit 2.1.1 → 2.2.0-rc.045257f

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 (144) hide show
  1. package/build.sh +2 -12
  2. package/create-countryconfig/package.json +1 -1
  3. package/dist/application-config/index.js +41 -9
  4. package/dist/authentication/index.d.ts +1 -0
  5. package/dist/authentication/index.js +30 -6
  6. package/dist/cli.js +944 -2044
  7. package/dist/commons/api/router.d.ts +1546 -243
  8. package/dist/commons/application-config/index.d.ts +2 -2
  9. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  10. package/dist/commons/conditionals/index.d.ts +1 -0
  11. package/dist/commons/conditionals/validate.d.ts +5 -0
  12. package/dist/commons/events/ActionConfig.d.ts +146 -20
  13. package/dist/commons/events/ActionDocument.d.ts +89 -0
  14. package/dist/commons/events/ActionInput.d.ts +56 -4
  15. package/dist/commons/events/ActionType.d.ts +11 -1
  16. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  17. package/dist/commons/events/AuditLog.d.ts +4 -0
  18. package/dist/commons/events/CompositeFieldValue.d.ts +5 -1
  19. package/dist/commons/events/CountryConfigQueryInput.d.ts +192 -18
  20. package/dist/commons/events/Draft.d.ts +2 -0
  21. package/dist/commons/events/EventConfig.d.ts +27 -6
  22. package/dist/commons/events/EventDocument.d.ts +88 -0
  23. package/dist/commons/events/EventIndex.d.ts +43 -6
  24. package/dist/commons/events/EventMetadata.d.ts +23 -1
  25. package/dist/commons/events/EventStatus.d.ts +1 -0
  26. package/dist/commons/events/FieldConfig.d.ts +11 -1
  27. package/dist/commons/events/FieldTypeMapping.d.ts +6 -6
  28. package/dist/commons/events/Flag.d.ts +1 -7
  29. package/dist/commons/events/PlainDate.d.ts +1 -0
  30. package/dist/commons/events/WorkqueueConfig.d.ts +224 -33
  31. package/dist/commons/events/eventConfigValidation.d.ts +26 -1
  32. package/dist/commons/events/index.d.ts +3 -0
  33. package/dist/commons/events/scopes.d.ts +2 -0
  34. package/dist/commons/events/state/flags.d.ts +1 -1
  35. package/dist/commons/events/state/index.d.ts +10 -2
  36. package/dist/commons/events/state/utils.d.ts +11 -1
  37. package/dist/commons/events/test.utils.d.ts +30 -1
  38. package/dist/commons/events/toNotificationForm.d.ts +17 -0
  39. package/dist/commons/events/utils.d.ts +62 -8
  40. package/dist/conditionals/index.js +16 -4
  41. package/dist/environment/derived-variables.d.ts +16 -4
  42. package/dist/environment/derived-variables.d.ts.map +1 -1
  43. package/dist/environment/derived-variables.js +18 -4
  44. package/dist/environment/dockerhub.d.ts +15 -0
  45. package/dist/environment/dockerhub.d.ts.map +1 -0
  46. package/dist/environment/dockerhub.js +104 -0
  47. package/dist/environment/questions.js +1 -1
  48. package/dist/environment/setup-environment.d.ts.map +1 -1
  49. package/dist/environment/setup-environment.js +67 -18
  50. package/dist/environment/templates.d.ts.map +1 -1
  51. package/dist/events/index.js +496 -129
  52. package/dist/migrations/index.d.ts +9 -0
  53. package/dist/migrations/index.d.ts.map +1 -0
  54. package/dist/migrations/index.js +847 -0
  55. package/dist/migrations/move-declaration-to-declare-action.d.ts +38 -0
  56. package/dist/migrations/move-declaration-to-declare-action.d.ts.map +1 -0
  57. package/dist/migrations/move-declaration-to-declare-action.js +377 -0
  58. package/dist/migrations/{v2.1 → persistent}/add-translations.d.ts +7 -1
  59. package/dist/migrations/persistent/add-translations.d.ts.map +1 -0
  60. package/dist/migrations/{v2.1 → persistent}/add-translations.js +14 -12
  61. package/dist/migrations/persistent/check-upgrade-path.d.ts +36 -0
  62. package/dist/migrations/persistent/check-upgrade-path.d.ts.map +1 -0
  63. package/dist/migrations/persistent/check-upgrade-path.js +105 -0
  64. package/dist/migrations/persistent/update-toolkit-dependency.d.ts +7 -0
  65. package/dist/migrations/persistent/update-toolkit-dependency.d.ts.map +1 -0
  66. package/dist/migrations/persistent/update-toolkit-dependency.js +77 -0
  67. package/dist/migrations/read-declaration-through-helper.d.ts +39 -0
  68. package/dist/migrations/read-declaration-through-helper.d.ts.map +1 -0
  69. package/dist/migrations/read-declaration-through-helper.js +257 -0
  70. package/dist/migrations/replace-incomplete-flag.d.ts +26 -0
  71. package/dist/migrations/replace-incomplete-flag.d.ts.map +1 -0
  72. package/dist/migrations/replace-incomplete-flag.js +126 -0
  73. package/dist/notification/index.js +390 -106
  74. package/dist/scopes/index.d.ts +83 -90
  75. package/dist/scopes/index.js +26 -6
  76. package/dist/templates/charts-values/dependencies/values.yaml +1 -1
  77. package/dist/templates/charts-values/opencrvs-services/values.yaml +3 -5
  78. package/dist/templates/charts-values/traefik/values.yaml +4 -3
  79. package/opencrvs-toolkit-2.2.0-rc.045257f.tgz +0 -0
  80. package/package.json +2 -2
  81. package/tsconfig.build.tsbuildinfo +1 -1
  82. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +0 -3
  83. package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +0 -1
  84. package/dist/migrations/v2.1/add-explicit-correction-flags.js +0 -234
  85. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +0 -3
  86. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +0 -1
  87. package/dist/migrations/v2.1/add-recovery-link-notifications.js +0 -511
  88. package/dist/migrations/v2.1/add-translations.d.ts.map +0 -1
  89. package/dist/migrations/v2.1/enable-telemetry.d.ts +0 -3
  90. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +0 -1
  91. package/dist/migrations/v2.1/enable-telemetry.js +0 -455
  92. package/dist/migrations/v2.1/index.d.ts +0 -6
  93. package/dist/migrations/v2.1/index.d.ts.map +0 -1
  94. package/dist/migrations/v2.1/index.js +0 -2170
  95. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +0 -14
  96. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +0 -1
  97. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +0 -348
  98. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +0 -2
  99. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +0 -1
  100. package/dist/migrations/v2.1/remove-metabase-package-installs.js +0 -161
  101. package/dist/migrations/v2.1/remove-sentry.d.ts +0 -3
  102. package/dist/migrations/v2.1/remove-sentry.d.ts.map +0 -1
  103. package/dist/migrations/v2.1/remove-sentry.js +0 -354
  104. package/dist/migrations/v2.1/rename-trigger-paths.d.ts +0 -3
  105. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +0 -1
  106. package/dist/migrations/v2.1/rename-trigger-paths.js +0 -216
  107. package/dist/migrations/v2.1/template-files.d.ts +0 -8
  108. package/dist/migrations/v2.1/template-files.d.ts.map +0 -1
  109. package/dist/migrations/v2.1/template-files.js +0 -49
  110. package/dist/migrations/v2.1/upgrade-tilt.d.ts +0 -8
  111. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +0 -1
  112. package/dist/migrations/v2.1/upgrade-tilt.js +0 -139
  113. package/dist/templates/countryconfig-template/.tiltignore +0 -1
  114. package/dist/templates/countryconfig-template/Dockerfile.assets +0 -7
  115. package/dist/templates/countryconfig-template/Tiltfile +0 -112
  116. package/dist/templates/countryconfig-template/assets/README.md +0 -1
  117. package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +0 -61
  118. package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +0 -455
  119. package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +0 -168
  120. package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +0 -67
  121. package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +0 -168
  122. package/dist/templates/countryconfig-template/assets/metabase/README.md +0 -34
  123. package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +0 -36
  124. package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +0 -46
  125. package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +0 -27737
  126. package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +0 -21
  127. package/dist/templates/countryconfig-template/assets/metabase/package.json +0 -13
  128. package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +0 -108
  129. package/dist/templates/countryconfig-template/assets/metabase/run.sh +0 -120
  130. package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +0 -40
  131. package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +0 -135
  132. package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +0 -108
  133. package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +0 -50
  134. package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +0 -35
  135. package/dist/templates/countryconfig-template/tilt/common.tilt +0 -145
  136. package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +0 -15
  137. package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +0 -56
  138. package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +0 -21
  139. package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +0 -38
  140. package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +0 -17
  141. package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +0 -16
  142. package/dist/templates/countryconfig-template/tilt/lib.tilt +0 -95
  143. package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +0 -136
  144. package/opencrvs-toolkit-2.1.1.tgz +0 -0
@@ -27,6 +27,17 @@ export declare const WorkqueueConfig: z.ZodObject<{
27
27
  DECLARED: "DECLARED";
28
28
  NOTIFIED: "NOTIFIED";
29
29
  REGISTERED: "REGISTERED";
30
+ REVOKED: "REVOKED";
31
+ }>>;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ type: z.ZodLiteral<"noneOf">;
34
+ terms: z.ZodArray<z.ZodEnum<{
35
+ ARCHIVED: "ARCHIVED";
36
+ CREATED: "CREATED";
37
+ DECLARED: "DECLARED";
38
+ NOTIFIED: "NOTIFIED";
39
+ REGISTERED: "REGISTERED";
40
+ REVOKED: "REVOKED";
30
41
  }>>;
31
42
  }, z.core.$strip>, z.ZodObject<{
32
43
  type: z.ZodLiteral<"exact">;
@@ -36,6 +47,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
36
47
  DECLARED: "DECLARED";
37
48
  NOTIFIED: "NOTIFIED";
38
49
  REGISTERED: "REGISTERED";
50
+ REVOKED: "REVOKED";
39
51
  }>;
40
52
  }, z.core.$strip>]>>>;
41
53
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -138,6 +150,26 @@ export declare const WorkqueueConfig: z.ZodObject<{
138
150
  type: z.ZodLiteral<"exact">;
139
151
  term: z.ZodString;
140
152
  }, z.core.$strip>>>;
153
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
154
+ type: z.ZodLiteral<"within">;
155
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
156
+ $userField: z.ZodEnum<{
157
+ administrativeAreaId: "administrativeAreaId";
158
+ avatar: "avatar";
159
+ device: "device";
160
+ firstname: "firstname";
161
+ fullHonorificName: "fullHonorificName";
162
+ id: "id";
163
+ middlename: "middlename";
164
+ name: "name";
165
+ primaryOfficeId: "primaryOfficeId";
166
+ role: "role";
167
+ signature: "signature";
168
+ surname: "surname";
169
+ }>;
170
+ $location: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>]>;
172
+ }, z.core.$strip>>>;
141
173
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
142
174
  type: z.ZodLiteral<"within">;
143
175
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -309,21 +341,18 @@ export declare const WorkqueueConfig: z.ZodObject<{
309
341
  }, z.core.$strip>>>;
310
342
  flags: z.ZodOptional<z.ZodOptional<z.ZodObject<{
311
343
  anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
312
- readonly INCOMPLETE: 'incomplete';
313
344
  readonly REJECTED: 'rejected';
314
345
  readonly CORRECTION_REQUESTED: 'correction-requested';
315
346
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
316
347
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
317
348
  }>]>, z.ZodString]>>>;
318
349
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
319
- readonly INCOMPLETE: 'incomplete';
320
350
  readonly REJECTED: 'rejected';
321
351
  readonly CORRECTION_REQUESTED: 'correction-requested';
322
352
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
323
353
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
324
354
  }>]>, z.ZodString]>>>;
325
355
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
326
- readonly INCOMPLETE: 'incomplete';
327
356
  readonly REJECTED: 'rejected';
328
357
  readonly CORRECTION_REQUESTED: 'correction-requested';
329
358
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
@@ -344,6 +373,17 @@ export declare const WorkqueueConfig: z.ZodObject<{
344
373
  DECLARED: "DECLARED";
345
374
  NOTIFIED: "NOTIFIED";
346
375
  REGISTERED: "REGISTERED";
376
+ REVOKED: "REVOKED";
377
+ }>>;
378
+ }, z.core.$strip>, z.ZodObject<{
379
+ type: z.ZodLiteral<"noneOf">;
380
+ terms: z.ZodArray<z.ZodEnum<{
381
+ ARCHIVED: "ARCHIVED";
382
+ CREATED: "CREATED";
383
+ DECLARED: "DECLARED";
384
+ NOTIFIED: "NOTIFIED";
385
+ REGISTERED: "REGISTERED";
386
+ REVOKED: "REVOKED";
347
387
  }>>;
348
388
  }, z.core.$strip>, z.ZodObject<{
349
389
  type: z.ZodLiteral<"exact">;
@@ -353,6 +393,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
353
393
  DECLARED: "DECLARED";
354
394
  NOTIFIED: "NOTIFIED";
355
395
  REGISTERED: "REGISTERED";
396
+ REVOKED: "REVOKED";
356
397
  }>;
357
398
  }, z.core.$strip>]>>>;
358
399
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -455,6 +496,26 @@ export declare const WorkqueueConfig: z.ZodObject<{
455
496
  type: z.ZodLiteral<"exact">;
456
497
  term: z.ZodString;
457
498
  }, z.core.$strip>>>;
499
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
500
+ type: z.ZodLiteral<"within">;
501
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
502
+ $userField: z.ZodEnum<{
503
+ administrativeAreaId: "administrativeAreaId";
504
+ avatar: "avatar";
505
+ device: "device";
506
+ firstname: "firstname";
507
+ fullHonorificName: "fullHonorificName";
508
+ id: "id";
509
+ middlename: "middlename";
510
+ name: "name";
511
+ primaryOfficeId: "primaryOfficeId";
512
+ role: "role";
513
+ signature: "signature";
514
+ surname: "surname";
515
+ }>;
516
+ $location: z.ZodOptional<z.ZodString>;
517
+ }, z.core.$strip>]>;
518
+ }, z.core.$strip>>>;
458
519
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
459
520
  type: z.ZodLiteral<"within">;
460
521
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -626,21 +687,18 @@ export declare const WorkqueueConfig: z.ZodObject<{
626
687
  }, z.core.$strip>>>;
627
688
  flags: z.ZodOptional<z.ZodOptional<z.ZodObject<{
628
689
  anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
629
- readonly INCOMPLETE: 'incomplete';
630
690
  readonly REJECTED: 'rejected';
631
691
  readonly CORRECTION_REQUESTED: 'correction-requested';
632
692
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
633
693
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
634
694
  }>]>, z.ZodString]>>>;
635
695
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
636
- readonly INCOMPLETE: 'incomplete';
637
696
  readonly REJECTED: 'rejected';
638
697
  readonly CORRECTION_REQUESTED: 'correction-requested';
639
698
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
640
699
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
641
700
  }>]>, z.ZodString]>>>;
642
701
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
643
- readonly INCOMPLETE: 'incomplete';
644
702
  readonly REJECTED: 'rejected';
645
703
  readonly CORRECTION_REQUESTED: 'correction-requested';
646
704
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
@@ -660,8 +718,10 @@ export declare const WorkqueueConfig: z.ZodObject<{
660
718
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
661
719
  READ: "READ";
662
720
  REGISTER: "REGISTER";
721
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
663
722
  REJECT: "REJECT";
664
723
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
724
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
665
725
  UNARCHIVE: "UNARCHIVE";
666
726
  }>;
667
727
  }, z.core.$strip>>;
@@ -812,8 +872,10 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
812
872
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
813
873
  READ: "READ";
814
874
  REGISTER: "REGISTER";
875
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
815
876
  REJECT: "REJECT";
816
877
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
878
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
817
879
  UNARCHIVE: "UNARCHIVE";
818
880
  }>;
819
881
  }, z.core.$strip>>;
@@ -938,8 +1000,10 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
938
1000
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
939
1001
  READ: "READ";
940
1002
  REGISTER: "REGISTER";
1003
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
941
1004
  REJECT: "REJECT";
942
1005
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
1006
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
943
1007
  UNARCHIVE: "UNARCHIVE";
944
1008
  }>;
945
1009
  }, z.core.$strip>>;
@@ -1086,6 +1150,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1086
1150
  DECLARED: "DECLARED";
1087
1151
  NOTIFIED: "NOTIFIED";
1088
1152
  REGISTERED: "REGISTERED";
1153
+ REVOKED: "REVOKED";
1154
+ }>>;
1155
+ }, z.core.$strip>, z.ZodObject<{
1156
+ type: z.ZodLiteral<"noneOf">;
1157
+ terms: z.ZodArray<z.ZodEnum<{
1158
+ ARCHIVED: "ARCHIVED";
1159
+ CREATED: "CREATED";
1160
+ DECLARED: "DECLARED";
1161
+ NOTIFIED: "NOTIFIED";
1162
+ REGISTERED: "REGISTERED";
1163
+ REVOKED: "REVOKED";
1089
1164
  }>>;
1090
1165
  }, z.core.$strip>, z.ZodObject<{
1091
1166
  type: z.ZodLiteral<"exact">;
@@ -1095,6 +1170,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1095
1170
  DECLARED: "DECLARED";
1096
1171
  NOTIFIED: "NOTIFIED";
1097
1172
  REGISTERED: "REGISTERED";
1173
+ REVOKED: "REVOKED";
1098
1174
  }>;
1099
1175
  }, z.core.$strip>]>>>;
1100
1176
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1197,6 +1273,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1197
1273
  type: z.ZodLiteral<"exact">;
1198
1274
  term: z.ZodString;
1199
1275
  }, z.core.$strip>>>;
1276
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1277
+ type: z.ZodLiteral<"within">;
1278
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1279
+ $userField: z.ZodEnum<{
1280
+ administrativeAreaId: "administrativeAreaId";
1281
+ avatar: "avatar";
1282
+ device: "device";
1283
+ firstname: "firstname";
1284
+ fullHonorificName: "fullHonorificName";
1285
+ id: "id";
1286
+ middlename: "middlename";
1287
+ name: "name";
1288
+ primaryOfficeId: "primaryOfficeId";
1289
+ role: "role";
1290
+ signature: "signature";
1291
+ surname: "surname";
1292
+ }>;
1293
+ $location: z.ZodOptional<z.ZodString>;
1294
+ }, z.core.$strip>]>;
1295
+ }, z.core.$strip>>>;
1200
1296
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1201
1297
  type: z.ZodLiteral<"within">;
1202
1298
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -1368,21 +1464,18 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1368
1464
  }, z.core.$strip>>>;
1369
1465
  flags: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1370
1466
  anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1371
- readonly INCOMPLETE: 'incomplete';
1372
1467
  readonly REJECTED: 'rejected';
1373
1468
  readonly CORRECTION_REQUESTED: 'correction-requested';
1374
1469
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
1375
1470
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
1376
1471
  }>]>, z.ZodString]>>>;
1377
1472
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1378
- readonly INCOMPLETE: 'incomplete';
1379
1473
  readonly REJECTED: 'rejected';
1380
1474
  readonly CORRECTION_REQUESTED: 'correction-requested';
1381
1475
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
1382
1476
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
1383
1477
  }>]>, z.ZodString]>>>;
1384
1478
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1385
- readonly INCOMPLETE: 'incomplete';
1386
1479
  readonly REJECTED: 'rejected';
1387
1480
  readonly CORRECTION_REQUESTED: 'correction-requested';
1388
1481
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
@@ -1402,6 +1495,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1402
1495
  DECLARED: "DECLARED";
1403
1496
  NOTIFIED: "NOTIFIED";
1404
1497
  REGISTERED: "REGISTERED";
1498
+ REVOKED: "REVOKED";
1499
+ }>>;
1500
+ }, z.core.$strip>, z.ZodObject<{
1501
+ type: z.ZodLiteral<"noneOf">;
1502
+ terms: z.ZodArray<z.ZodEnum<{
1503
+ ARCHIVED: "ARCHIVED";
1504
+ CREATED: "CREATED";
1505
+ DECLARED: "DECLARED";
1506
+ NOTIFIED: "NOTIFIED";
1507
+ REGISTERED: "REGISTERED";
1508
+ REVOKED: "REVOKED";
1405
1509
  }>>;
1406
1510
  }, z.core.$strip>, z.ZodObject<{
1407
1511
  type: z.ZodLiteral<"exact">;
@@ -1411,6 +1515,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1411
1515
  DECLARED: "DECLARED";
1412
1516
  NOTIFIED: "NOTIFIED";
1413
1517
  REGISTERED: "REGISTERED";
1518
+ REVOKED: "REVOKED";
1414
1519
  }>;
1415
1520
  }, z.core.$strip>]>>>;
1416
1521
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1513,6 +1618,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1513
1618
  type: z.ZodLiteral<"exact">;
1514
1619
  term: z.ZodString;
1515
1620
  }, z.core.$strip>>>;
1621
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1622
+ type: z.ZodLiteral<"within">;
1623
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1624
+ $userField: z.ZodEnum<{
1625
+ administrativeAreaId: "administrativeAreaId";
1626
+ avatar: "avatar";
1627
+ device: "device";
1628
+ firstname: "firstname";
1629
+ fullHonorificName: "fullHonorificName";
1630
+ id: "id";
1631
+ middlename: "middlename";
1632
+ name: "name";
1633
+ primaryOfficeId: "primaryOfficeId";
1634
+ role: "role";
1635
+ signature: "signature";
1636
+ surname: "surname";
1637
+ }>;
1638
+ $location: z.ZodOptional<z.ZodString>;
1639
+ }, z.core.$strip>]>;
1640
+ }, z.core.$strip>>>;
1516
1641
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1517
1642
  type: z.ZodLiteral<"within">;
1518
1643
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -1684,21 +1809,18 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1684
1809
  }, z.core.$strip>>>;
1685
1810
  flags: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1686
1811
  anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1687
- readonly INCOMPLETE: 'incomplete';
1688
1812
  readonly REJECTED: 'rejected';
1689
1813
  readonly CORRECTION_REQUESTED: 'correction-requested';
1690
1814
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
1691
1815
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
1692
1816
  }>]>, z.ZodString]>>>;
1693
1817
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1694
- readonly INCOMPLETE: 'incomplete';
1695
1818
  readonly REJECTED: 'rejected';
1696
1819
  readonly CORRECTION_REQUESTED: 'correction-requested';
1697
1820
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
1698
1821
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
1699
1822
  }>]>, z.ZodString]>>>;
1700
1823
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1701
- readonly INCOMPLETE: 'incomplete';
1702
1824
  readonly REJECTED: 'rejected';
1703
1825
  readonly CORRECTION_REQUESTED: 'correction-requested';
1704
1826
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
@@ -1719,6 +1841,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1719
1841
  DECLARED: "DECLARED";
1720
1842
  NOTIFIED: "NOTIFIED";
1721
1843
  REGISTERED: "REGISTERED";
1844
+ REVOKED: "REVOKED";
1845
+ }>>;
1846
+ }, z.core.$strip>, z.ZodObject<{
1847
+ type: z.ZodLiteral<"noneOf">;
1848
+ terms: z.ZodArray<z.ZodEnum<{
1849
+ ARCHIVED: "ARCHIVED";
1850
+ CREATED: "CREATED";
1851
+ DECLARED: "DECLARED";
1852
+ NOTIFIED: "NOTIFIED";
1853
+ REGISTERED: "REGISTERED";
1854
+ REVOKED: "REVOKED";
1722
1855
  }>>;
1723
1856
  }, z.core.$strip>, z.ZodObject<{
1724
1857
  type: z.ZodLiteral<"exact">;
@@ -1728,6 +1861,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1728
1861
  DECLARED: "DECLARED";
1729
1862
  NOTIFIED: "NOTIFIED";
1730
1863
  REGISTERED: "REGISTERED";
1864
+ REVOKED: "REVOKED";
1731
1865
  }>;
1732
1866
  }, z.core.$strip>]>>>;
1733
1867
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1830,6 +1964,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1830
1964
  type: z.ZodLiteral<"exact">;
1831
1965
  term: z.ZodString;
1832
1966
  }, z.core.$strip>>>;
1967
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1968
+ type: z.ZodLiteral<"within">;
1969
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1970
+ $userField: z.ZodEnum<{
1971
+ administrativeAreaId: "administrativeAreaId";
1972
+ avatar: "avatar";
1973
+ device: "device";
1974
+ firstname: "firstname";
1975
+ fullHonorificName: "fullHonorificName";
1976
+ id: "id";
1977
+ middlename: "middlename";
1978
+ name: "name";
1979
+ primaryOfficeId: "primaryOfficeId";
1980
+ role: "role";
1981
+ signature: "signature";
1982
+ surname: "surname";
1983
+ }>;
1984
+ $location: z.ZodOptional<z.ZodString>;
1985
+ }, z.core.$strip>]>;
1986
+ }, z.core.$strip>>>;
1833
1987
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1834
1988
  type: z.ZodLiteral<"within">;
1835
1989
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -2001,21 +2155,18 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
2001
2155
  }, z.core.$strip>>>;
2002
2156
  flags: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2003
2157
  anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
2004
- readonly INCOMPLETE: 'incomplete';
2005
2158
  readonly REJECTED: 'rejected';
2006
2159
  readonly CORRECTION_REQUESTED: 'correction-requested';
2007
2160
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
2008
2161
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
2009
2162
  }>]>, z.ZodString]>>>;
2010
2163
  noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
2011
- readonly INCOMPLETE: 'incomplete';
2012
2164
  readonly REJECTED: 'rejected';
2013
2165
  readonly CORRECTION_REQUESTED: 'correction-requested';
2014
2166
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
2015
2167
  readonly EDIT_IN_PROGRESS: 'edit-in-progress';
2016
2168
  }>]>, z.ZodString]>>>;
2017
2169
  allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
2018
- readonly INCOMPLETE: 'incomplete';
2019
2170
  readonly REJECTED: 'rejected';
2020
2171
  readonly CORRECTION_REQUESTED: 'correction-requested';
2021
2172
  readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
@@ -2041,11 +2192,14 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2041
2192
  clauses: {
2042
2193
  eventType?: string | undefined;
2043
2194
  status?: {
2044
- type: "exact";
2045
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2046
- } | {
2047
2195
  type: "anyOf";
2048
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2196
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2197
+ } | {
2198
+ type: "noneOf";
2199
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2200
+ } | {
2201
+ type: "exact";
2202
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2049
2203
  } | undefined;
2050
2204
  createdAt?: {
2051
2205
  type: "range";
@@ -2106,6 +2260,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2106
2260
  type: "exact";
2107
2261
  term: string;
2108
2262
  } | undefined;
2263
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2264
+ type: "within";
2265
+ location: string | {
2266
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2267
+ $location?: string | undefined;
2268
+ };
2269
+ } | undefined;
2109
2270
  createdAtLocation?: {
2110
2271
  type: "within";
2111
2272
  location: string | {
@@ -2180,11 +2341,14 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2180
2341
  clauses: {
2181
2342
  eventType?: string | undefined;
2182
2343
  status?: {
2183
- type: "exact";
2184
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2185
- } | {
2186
2344
  type: "anyOf";
2187
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2345
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2346
+ } | {
2347
+ type: "noneOf";
2348
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2349
+ } | {
2350
+ type: "exact";
2351
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2188
2352
  } | undefined;
2189
2353
  createdAt?: {
2190
2354
  type: "range";
@@ -2245,6 +2409,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2245
2409
  type: "exact";
2246
2410
  term: string;
2247
2411
  } | undefined;
2412
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2413
+ type: "within";
2414
+ location: string | {
2415
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2416
+ $location?: string | undefined;
2417
+ };
2418
+ } | undefined;
2248
2419
  createdAtLocation?: {
2249
2420
  type: "within";
2250
2421
  location: string | {
@@ -2316,7 +2487,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2316
2487
  }[];
2317
2488
  };
2318
2489
  action?: {
2319
- type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REJECT" | "REQUEST_CORRECTION" | "UNARCHIVE";
2490
+ type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REINSTATE_REGISTRATION" | "REJECT" | "REQUEST_CORRECTION" | "REVOKE_REGISTRATION" | "UNARCHIVE";
2320
2491
  } | undefined;
2321
2492
  columns: {
2322
2493
  label: {
@@ -2352,11 +2523,14 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2352
2523
  clauses: {
2353
2524
  eventType?: string | undefined;
2354
2525
  status?: {
2355
- type: "exact";
2356
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2357
- } | {
2358
2526
  type: "anyOf";
2359
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2527
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2528
+ } | {
2529
+ type: "noneOf";
2530
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2531
+ } | {
2532
+ type: "exact";
2533
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2360
2534
  } | undefined;
2361
2535
  createdAt?: {
2362
2536
  type: "range";
@@ -2417,6 +2591,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2417
2591
  type: "exact";
2418
2592
  term: string;
2419
2593
  } | undefined;
2594
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2595
+ type: "within";
2596
+ location: string | {
2597
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2598
+ $location?: string | undefined;
2599
+ };
2600
+ } | undefined;
2420
2601
  createdAtLocation?: {
2421
2602
  type: "within";
2422
2603
  location: string | {
@@ -2491,11 +2672,14 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2491
2672
  clauses: {
2492
2673
  eventType?: string | undefined;
2493
2674
  status?: {
2494
- type: "exact";
2495
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2496
- } | {
2497
2675
  type: "anyOf";
2498
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2676
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2677
+ } | {
2678
+ type: "noneOf";
2679
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2680
+ } | {
2681
+ type: "exact";
2682
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2499
2683
  } | undefined;
2500
2684
  createdAt?: {
2501
2685
  type: "range";
@@ -2556,6 +2740,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2556
2740
  type: "exact";
2557
2741
  term: string;
2558
2742
  } | undefined;
2743
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2744
+ type: "within";
2745
+ location: string | {
2746
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2747
+ $location?: string | undefined;
2748
+ };
2749
+ } | undefined;
2559
2750
  createdAtLocation?: {
2560
2751
  type: "within";
2561
2752
  location: string | {
@@ -2627,7 +2818,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2627
2818
  }[];
2628
2819
  };
2629
2820
  action?: {
2630
- type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REJECT" | "REQUEST_CORRECTION" | "UNARCHIVE";
2821
+ type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REINSTATE_REGISTRATION" | "REJECT" | "REQUEST_CORRECTION" | "REVOKE_REGISTRATION" | "UNARCHIVE";
2631
2822
  } | undefined;
2632
2823
  columns: {
2633
2824
  label: {
@@ -1,8 +1,33 @@
1
1
  import * as z from 'zod/v4';
2
- import { EventConfig } from './EventConfig';
2
+ import { EventConfig, EventConfigInput } from './EventConfig';
3
3
  export declare function validateAdvancedSearchConfig(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
4
4
  export declare function validateDateOfEvent(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
5
5
  export declare function validatePlaceOfEvent(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
6
6
  export declare function validateActionFlags(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
7
7
  export declare function validateActionOrder(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
8
+ /**
9
+ * Runs on both the `defineConfig` input and the parsed `EventConfig`.
10
+ *
11
+ * @returns whether the event has exactly one DECLARE action.
12
+ */
13
+ export declare function validateExactlyOneDeclareAction<T extends {
14
+ id: string;
15
+ actions: Array<{
16
+ type: string;
17
+ }>;
18
+ }>(event: T, ctx: z.RefinementCtx<T>): boolean;
19
+ /**
20
+ * `declaration` must be given exactly once: at the top level (kept for backwards
21
+ * compatibility) or on the DECLARE action.
22
+ */
23
+ export declare function validateDeclarationGivenExactlyOnce(config: EventConfigInput, ctx: z.RefinementCtx<EventConfigInput>): void;
24
+ /**
25
+ * Validation which ensures that a NOTIFY notificationForm:
26
+ * - only includes fields with ids that are also in the declaration form
27
+ * - the field types match the ones on the declaration form
28
+ *
29
+ * This is because the notification form is used as pre-filled values during declaration.
30
+ * For now we have made the design decision to not allow fields that are not present in the declaration form.
31
+ */
32
+ export declare function validateNotificationForm(event: EventConfig, ctx: z.RefinementCtx<EventConfig>): void;
8
33
  //# sourceMappingURL=eventConfigValidation.d.ts.map
@@ -1,3 +1,4 @@
1
+ import 'zod/compile';
1
2
  export * from './AuditLog';
2
3
  export * from './Constants';
3
4
  export * from './ActionConfig';
@@ -25,6 +26,7 @@ export * from './state';
25
26
  export * from './state/flags';
26
27
  export * from './utils';
27
28
  export * from './defineConfig';
29
+ export * from './toNotificationForm';
28
30
  export * from './DeduplicationConfig';
29
31
  export * from './transactions';
30
32
  export * from './FieldType';
@@ -46,6 +48,7 @@ export * from './Flag';
46
48
  export * from './event';
47
49
  export * from './locations';
48
50
  export * from './locationPayloads';
51
+ export * from './PlainDate';
49
52
  export { UUID } from '../uuid';
50
53
  export { DocumentPath } from '../documents';
51
54
  //# sourceMappingURL=index.d.ts.map
@@ -17,6 +17,8 @@ export declare const ACTION_SCOPE_MAP: {
17
17
  REVIEW_CORRECTION_REQUEST: "record.correct"[];
18
18
  REJECT_CORRECTION: "record.correct"[];
19
19
  APPROVE_CORRECTION: "record.correct"[];
20
+ REVOKE_REGISTRATION: "record.revoke-registration"[];
21
+ REINSTATE_REGISTRATION: "record.reinstate-registration"[];
20
22
  MARK_AS_DUPLICATE: "record.review-duplicates"[];
21
23
  MARK_AS_NOT_DUPLICATE: "record.review-duplicates"[];
22
24
  ARCHIVE: "record.archive"[];
@@ -27,7 +27,7 @@ export declare function resolveEventCustomFlags(event: EventDocument, eventConfi
27
27
  *
28
28
  * Flags are determined by combining:
29
29
  * - Action status flags (format 'ActionType:ActionStatus')
30
- * - Inherent flags (e.g. incomplete, rejected, correction requested, potential duplicate, edit in progress)
30
+ * - Inherent flags (e.g. rejected, correction requested, potential duplicate, edit in progress)
31
31
  * - Event type-specific custom flags defined in the event configuration
32
32
  *
33
33
  * @param event - The EventDocument containing the action history and payload
@@ -7,7 +7,7 @@ import { Draft } from '../Draft';
7
7
  import { EventConfig } from '../EventConfig';
8
8
  import { UUID } from '../../uuid';
9
9
  import { DocumentPath } from '../../documents';
10
- export declare function getStatusFromActions(actions: Array<Action>): "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
10
+ export declare function getStatusFromActions(actions: Array<Action>): "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
11
11
  export declare function getAssignedUserFromActions(actions: Array<ActionDocument>): string | null;
12
12
  type NonNullableDeep<T> = T extends [unknown, ...unknown[]] ? {
13
13
  [K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
@@ -63,7 +63,7 @@ export declare function applyDeclarationToEventIndex(eventIndex: EventIndex, dec
63
63
  export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Draft, eventConfiguration: EventConfig): {
64
64
  id: string & import("zod").$brand<"UUID">;
65
65
  type: string;
66
- status: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
66
+ status: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
67
67
  legalStatuses: {
68
68
  NOTIFIED?: {
69
69
  createdAt: string;
@@ -90,6 +90,14 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
90
90
  createdByRole?: string | undefined;
91
91
  registrationNumber: string;
92
92
  } | null | undefined;
93
+ REVOKED?: {
94
+ createdAt: string;
95
+ createdBy: string;
96
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
97
+ createdByUserType?: "system" | "user" | null | undefined;
98
+ acceptedAt: string;
99
+ createdByRole?: string | undefined;
100
+ } | null | undefined;
93
101
  };
94
102
  createdAt: string;
95
103
  dateOfEvent?: string | null | undefined;