@opencrvs/toolkit 2.1.0 → 2.2.0-rc.90ed9cd

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 (59) hide show
  1. package/build.sh +2 -2
  2. package/create-countryconfig/package.json +1 -1
  3. package/dist/application-config/index.js +36 -3
  4. package/dist/authentication/index.js +14 -1
  5. package/dist/cli.js +294 -1967
  6. package/dist/commons/api/router.d.ts +1374 -71
  7. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  8. package/dist/commons/events/ActionConfig.d.ts +133 -0
  9. package/dist/commons/events/ActionDocument.d.ts +88 -0
  10. package/dist/commons/events/ActionInput.d.ts +52 -0
  11. package/dist/commons/events/ActionType.d.ts +11 -1
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  13. package/dist/commons/events/AuditLog.d.ts +4 -0
  14. package/dist/commons/events/CountryConfigQueryInput.d.ts +192 -0
  15. package/dist/commons/events/Draft.d.ts +2 -0
  16. package/dist/commons/events/EventConfig.d.ts +26 -6
  17. package/dist/commons/events/EventDocument.d.ts +88 -0
  18. package/dist/commons/events/EventIndex.d.ts +41 -0
  19. package/dist/commons/events/EventMetadata.d.ts +23 -0
  20. package/dist/commons/events/EventStatus.d.ts +1 -0
  21. package/dist/commons/events/FieldConfig.d.ts +10 -0
  22. package/dist/commons/events/WorkqueueConfig.d.ts +216 -10
  23. package/dist/commons/events/eventConfigValidation.d.ts +17 -1
  24. package/dist/commons/events/scopes.d.ts +2 -0
  25. package/dist/commons/events/state/index.d.ts +10 -2
  26. package/dist/commons/events/state/utils.d.ts +11 -1
  27. package/dist/commons/events/test.utils.d.ts +28 -1
  28. package/dist/commons/events/utils.d.ts +43 -15
  29. package/dist/conditionals/index.js +14 -1
  30. package/dist/environment/derived-variables.d.ts +18 -0
  31. package/dist/environment/derived-variables.d.ts.map +1 -1
  32. package/dist/environment/derived-variables.js +22 -1
  33. package/dist/environment/setup-environment.d.ts.map +1 -1
  34. package/dist/environment/setup-environment.js +29 -10
  35. package/dist/events/index.js +302 -68
  36. package/dist/migrations/add-translations.d.ts +15 -0
  37. package/dist/migrations/add-translations.d.ts.map +1 -0
  38. package/dist/migrations/{v2.1/add-translations.js → add-translations.js} +16 -14
  39. package/dist/migrations/v2.1/index.js +35 -2155
  40. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +3 -0
  41. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -1
  42. package/dist/migrations/v2.1/upgrade-tilt.d.ts +3 -0
  43. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -1
  44. package/dist/migrations/v2.2/index.d.ts +6 -0
  45. package/dist/migrations/v2.2/index.d.ts.map +1 -0
  46. package/dist/migrations/v2.2/index.js +456 -0
  47. package/dist/migrations/v2.2/read-declaration-through-helper.d.ts +39 -0
  48. package/dist/migrations/v2.2/read-declaration-through-helper.d.ts.map +1 -0
  49. package/dist/migrations/v2.2/read-declaration-through-helper.js +257 -0
  50. package/dist/notification/index.js +279 -88
  51. package/dist/scopes/index.d.ts +29 -6
  52. package/dist/scopes/index.js +14 -1
  53. package/dist/templates/charts-values/traefik/values.yaml +2 -3
  54. package/opencrvs-toolkit-2.2.0-rc.90ed9cd.tgz +0 -0
  55. package/package.json +1 -1
  56. package/tsconfig.build.tsbuildinfo +1 -1
  57. package/dist/migrations/v2.1/add-translations.d.ts +0 -9
  58. package/dist/migrations/v2.1/add-translations.d.ts.map +0 -1
  59. package/opencrvs-toolkit-2.1.0.tgz +0 -0
@@ -1904,9 +1904,11 @@ declare const AdministrativeAreaField: z.ZodObject<{
1904
1904
  "record.read": "record.read";
1905
1905
  "record.register": "record.register";
1906
1906
  "record.reindex": "record.reindex";
1907
+ "record.reinstate-registration": "record.reinstate-registration";
1907
1908
  "record.reject": "record.reject";
1908
1909
  "record.request-correction": "record.request-correction";
1909
1910
  "record.review-duplicates": "record.review-duplicates";
1911
+ "record.revoke-registration": "record.revoke-registration";
1910
1912
  "record.search": "record.search";
1911
1913
  "record.unarchive": "record.unarchive";
1912
1914
  "record.unassign-others": "record.unassign-others";
@@ -2041,9 +2043,11 @@ declare const LocationInput: z.ZodObject<{
2041
2043
  "record.read": "record.read";
2042
2044
  "record.register": "record.register";
2043
2045
  "record.reindex": "record.reindex";
2046
+ "record.reinstate-registration": "record.reinstate-registration";
2044
2047
  "record.reject": "record.reject";
2045
2048
  "record.request-correction": "record.request-correction";
2046
2049
  "record.review-duplicates": "record.review-duplicates";
2050
+ "record.revoke-registration": "record.revoke-registration";
2047
2051
  "record.search": "record.search";
2048
2052
  "record.unarchive": "record.unarchive";
2049
2053
  "record.unassign-others": "record.unassign-others";
@@ -2249,9 +2253,11 @@ declare const Facility: z.ZodObject<{
2249
2253
  "record.read": "record.read";
2250
2254
  "record.register": "record.register";
2251
2255
  "record.reindex": "record.reindex";
2256
+ "record.reinstate-registration": "record.reinstate-registration";
2252
2257
  "record.reject": "record.reject";
2253
2258
  "record.request-correction": "record.request-correction";
2254
2259
  "record.review-duplicates": "record.review-duplicates";
2260
+ "record.revoke-registration": "record.revoke-registration";
2255
2261
  "record.search": "record.search";
2256
2262
  "record.unarchive": "record.unarchive";
2257
2263
  "record.unassign-others": "record.unassign-others";
@@ -2372,9 +2378,11 @@ declare const Office: z.ZodObject<{
2372
2378
  "record.read": "record.read";
2373
2379
  "record.register": "record.register";
2374
2380
  "record.reindex": "record.reindex";
2381
+ "record.reinstate-registration": "record.reinstate-registration";
2375
2382
  "record.reject": "record.reject";
2376
2383
  "record.request-correction": "record.request-correction";
2377
2384
  "record.review-duplicates": "record.review-duplicates";
2385
+ "record.revoke-registration": "record.revoke-registration";
2378
2386
  "record.search": "record.search";
2379
2387
  "record.unarchive": "record.unarchive";
2380
2388
  "record.unassign-others": "record.unassign-others";
@@ -2581,9 +2589,11 @@ declare const Address: z.ZodObject<{
2581
2589
  "record.read": "record.read";
2582
2590
  "record.register": "record.register";
2583
2591
  "record.reindex": "record.reindex";
2592
+ "record.reinstate-registration": "record.reinstate-registration";
2584
2593
  "record.reject": "record.reject";
2585
2594
  "record.request-correction": "record.request-correction";
2586
2595
  "record.review-duplicates": "record.review-duplicates";
2596
+ "record.revoke-registration": "record.revoke-registration";
2587
2597
  "record.search": "record.search";
2588
2598
  "record.unarchive": "record.unarchive";
2589
2599
  "record.unassign-others": "record.unassign-others";
@@ -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<{
@@ -344,6 +376,17 @@ export declare const WorkqueueConfig: z.ZodObject<{
344
376
  DECLARED: "DECLARED";
345
377
  NOTIFIED: "NOTIFIED";
346
378
  REGISTERED: "REGISTERED";
379
+ REVOKED: "REVOKED";
380
+ }>>;
381
+ }, z.core.$strip>, z.ZodObject<{
382
+ type: z.ZodLiteral<"noneOf">;
383
+ terms: z.ZodArray<z.ZodEnum<{
384
+ ARCHIVED: "ARCHIVED";
385
+ CREATED: "CREATED";
386
+ DECLARED: "DECLARED";
387
+ NOTIFIED: "NOTIFIED";
388
+ REGISTERED: "REGISTERED";
389
+ REVOKED: "REVOKED";
347
390
  }>>;
348
391
  }, z.core.$strip>, z.ZodObject<{
349
392
  type: z.ZodLiteral<"exact">;
@@ -353,6 +396,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
353
396
  DECLARED: "DECLARED";
354
397
  NOTIFIED: "NOTIFIED";
355
398
  REGISTERED: "REGISTERED";
399
+ REVOKED: "REVOKED";
356
400
  }>;
357
401
  }, z.core.$strip>]>>>;
358
402
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -455,6 +499,26 @@ export declare const WorkqueueConfig: z.ZodObject<{
455
499
  type: z.ZodLiteral<"exact">;
456
500
  term: z.ZodString;
457
501
  }, z.core.$strip>>>;
502
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
503
+ type: z.ZodLiteral<"within">;
504
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
505
+ $userField: z.ZodEnum<{
506
+ administrativeAreaId: "administrativeAreaId";
507
+ avatar: "avatar";
508
+ device: "device";
509
+ firstname: "firstname";
510
+ fullHonorificName: "fullHonorificName";
511
+ id: "id";
512
+ middlename: "middlename";
513
+ name: "name";
514
+ primaryOfficeId: "primaryOfficeId";
515
+ role: "role";
516
+ signature: "signature";
517
+ surname: "surname";
518
+ }>;
519
+ $location: z.ZodOptional<z.ZodString>;
520
+ }, z.core.$strip>]>;
521
+ }, z.core.$strip>>>;
458
522
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
459
523
  type: z.ZodLiteral<"within">;
460
524
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -660,8 +724,10 @@ export declare const WorkqueueConfig: z.ZodObject<{
660
724
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
661
725
  READ: "READ";
662
726
  REGISTER: "REGISTER";
727
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
663
728
  REJECT: "REJECT";
664
729
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
730
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
665
731
  UNARCHIVE: "UNARCHIVE";
666
732
  }>;
667
733
  }, z.core.$strip>>;
@@ -812,8 +878,10 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
812
878
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
813
879
  READ: "READ";
814
880
  REGISTER: "REGISTER";
881
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
815
882
  REJECT: "REJECT";
816
883
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
884
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
817
885
  UNARCHIVE: "UNARCHIVE";
818
886
  }>;
819
887
  }, z.core.$strip>>;
@@ -938,8 +1006,10 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
938
1006
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
939
1007
  READ: "READ";
940
1008
  REGISTER: "REGISTER";
1009
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
941
1010
  REJECT: "REJECT";
942
1011
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
1012
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
943
1013
  UNARCHIVE: "UNARCHIVE";
944
1014
  }>;
945
1015
  }, z.core.$strip>>;
@@ -1086,6 +1156,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1086
1156
  DECLARED: "DECLARED";
1087
1157
  NOTIFIED: "NOTIFIED";
1088
1158
  REGISTERED: "REGISTERED";
1159
+ REVOKED: "REVOKED";
1160
+ }>>;
1161
+ }, z.core.$strip>, z.ZodObject<{
1162
+ type: z.ZodLiteral<"noneOf">;
1163
+ terms: z.ZodArray<z.ZodEnum<{
1164
+ ARCHIVED: "ARCHIVED";
1165
+ CREATED: "CREATED";
1166
+ DECLARED: "DECLARED";
1167
+ NOTIFIED: "NOTIFIED";
1168
+ REGISTERED: "REGISTERED";
1169
+ REVOKED: "REVOKED";
1089
1170
  }>>;
1090
1171
  }, z.core.$strip>, z.ZodObject<{
1091
1172
  type: z.ZodLiteral<"exact">;
@@ -1095,6 +1176,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1095
1176
  DECLARED: "DECLARED";
1096
1177
  NOTIFIED: "NOTIFIED";
1097
1178
  REGISTERED: "REGISTERED";
1179
+ REVOKED: "REVOKED";
1098
1180
  }>;
1099
1181
  }, z.core.$strip>]>>>;
1100
1182
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1197,6 +1279,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1197
1279
  type: z.ZodLiteral<"exact">;
1198
1280
  term: z.ZodString;
1199
1281
  }, z.core.$strip>>>;
1282
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1283
+ type: z.ZodLiteral<"within">;
1284
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1285
+ $userField: z.ZodEnum<{
1286
+ administrativeAreaId: "administrativeAreaId";
1287
+ avatar: "avatar";
1288
+ device: "device";
1289
+ firstname: "firstname";
1290
+ fullHonorificName: "fullHonorificName";
1291
+ id: "id";
1292
+ middlename: "middlename";
1293
+ name: "name";
1294
+ primaryOfficeId: "primaryOfficeId";
1295
+ role: "role";
1296
+ signature: "signature";
1297
+ surname: "surname";
1298
+ }>;
1299
+ $location: z.ZodOptional<z.ZodString>;
1300
+ }, z.core.$strip>]>;
1301
+ }, z.core.$strip>>>;
1200
1302
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1201
1303
  type: z.ZodLiteral<"within">;
1202
1304
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -1402,6 +1504,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1402
1504
  DECLARED: "DECLARED";
1403
1505
  NOTIFIED: "NOTIFIED";
1404
1506
  REGISTERED: "REGISTERED";
1507
+ REVOKED: "REVOKED";
1508
+ }>>;
1509
+ }, z.core.$strip>, z.ZodObject<{
1510
+ type: z.ZodLiteral<"noneOf">;
1511
+ terms: z.ZodArray<z.ZodEnum<{
1512
+ ARCHIVED: "ARCHIVED";
1513
+ CREATED: "CREATED";
1514
+ DECLARED: "DECLARED";
1515
+ NOTIFIED: "NOTIFIED";
1516
+ REGISTERED: "REGISTERED";
1517
+ REVOKED: "REVOKED";
1405
1518
  }>>;
1406
1519
  }, z.core.$strip>, z.ZodObject<{
1407
1520
  type: z.ZodLiteral<"exact">;
@@ -1411,6 +1524,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1411
1524
  DECLARED: "DECLARED";
1412
1525
  NOTIFIED: "NOTIFIED";
1413
1526
  REGISTERED: "REGISTERED";
1527
+ REVOKED: "REVOKED";
1414
1528
  }>;
1415
1529
  }, z.core.$strip>]>>>;
1416
1530
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1513,6 +1627,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1513
1627
  type: z.ZodLiteral<"exact">;
1514
1628
  term: z.ZodString;
1515
1629
  }, z.core.$strip>>>;
1630
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1631
+ type: z.ZodLiteral<"within">;
1632
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1633
+ $userField: z.ZodEnum<{
1634
+ administrativeAreaId: "administrativeAreaId";
1635
+ avatar: "avatar";
1636
+ device: "device";
1637
+ firstname: "firstname";
1638
+ fullHonorificName: "fullHonorificName";
1639
+ id: "id";
1640
+ middlename: "middlename";
1641
+ name: "name";
1642
+ primaryOfficeId: "primaryOfficeId";
1643
+ role: "role";
1644
+ signature: "signature";
1645
+ surname: "surname";
1646
+ }>;
1647
+ $location: z.ZodOptional<z.ZodString>;
1648
+ }, z.core.$strip>]>;
1649
+ }, z.core.$strip>>>;
1516
1650
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1517
1651
  type: z.ZodLiteral<"within">;
1518
1652
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -1719,6 +1853,17 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1719
1853
  DECLARED: "DECLARED";
1720
1854
  NOTIFIED: "NOTIFIED";
1721
1855
  REGISTERED: "REGISTERED";
1856
+ REVOKED: "REVOKED";
1857
+ }>>;
1858
+ }, z.core.$strip>, z.ZodObject<{
1859
+ type: z.ZodLiteral<"noneOf">;
1860
+ terms: z.ZodArray<z.ZodEnum<{
1861
+ ARCHIVED: "ARCHIVED";
1862
+ CREATED: "CREATED";
1863
+ DECLARED: "DECLARED";
1864
+ NOTIFIED: "NOTIFIED";
1865
+ REGISTERED: "REGISTERED";
1866
+ REVOKED: "REVOKED";
1722
1867
  }>>;
1723
1868
  }, z.core.$strip>, z.ZodObject<{
1724
1869
  type: z.ZodLiteral<"exact">;
@@ -1728,6 +1873,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1728
1873
  DECLARED: "DECLARED";
1729
1874
  NOTIFIED: "NOTIFIED";
1730
1875
  REGISTERED: "REGISTERED";
1876
+ REVOKED: "REVOKED";
1731
1877
  }>;
1732
1878
  }, z.core.$strip>]>>>;
1733
1879
  createdAt: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1830,6 +1976,26 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1830
1976
  type: z.ZodLiteral<"exact">;
1831
1977
  term: z.ZodString;
1832
1978
  }, z.core.$strip>>>;
1979
+ 'legalStatuses.REVOKED.createdAtLocation': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1980
+ type: z.ZodLiteral<"within">;
1981
+ location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1982
+ $userField: z.ZodEnum<{
1983
+ administrativeAreaId: "administrativeAreaId";
1984
+ avatar: "avatar";
1985
+ device: "device";
1986
+ firstname: "firstname";
1987
+ fullHonorificName: "fullHonorificName";
1988
+ id: "id";
1989
+ middlename: "middlename";
1990
+ name: "name";
1991
+ primaryOfficeId: "primaryOfficeId";
1992
+ role: "role";
1993
+ signature: "signature";
1994
+ surname: "surname";
1995
+ }>;
1996
+ $location: z.ZodOptional<z.ZodString>;
1997
+ }, z.core.$strip>]>;
1998
+ }, z.core.$strip>>>;
1833
1999
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1834
2000
  type: z.ZodLiteral<"within">;
1835
2001
  location: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
@@ -2042,10 +2208,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2042
2208
  eventType?: string | undefined;
2043
2209
  status?: {
2044
2210
  type: "exact";
2045
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2211
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2046
2212
  } | {
2047
2213
  type: "anyOf";
2048
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2214
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2215
+ } | {
2216
+ type: "noneOf";
2217
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2049
2218
  } | undefined;
2050
2219
  createdAt?: {
2051
2220
  type: "range";
@@ -2106,6 +2275,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2106
2275
  type: "exact";
2107
2276
  term: string;
2108
2277
  } | undefined;
2278
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2279
+ type: "within";
2280
+ location: string | {
2281
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2282
+ $location?: string | undefined;
2283
+ };
2284
+ } | undefined;
2109
2285
  createdAtLocation?: {
2110
2286
  type: "within";
2111
2287
  location: string | {
@@ -2181,10 +2357,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2181
2357
  eventType?: string | undefined;
2182
2358
  status?: {
2183
2359
  type: "exact";
2184
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2360
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2185
2361
  } | {
2186
2362
  type: "anyOf";
2187
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2363
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2364
+ } | {
2365
+ type: "noneOf";
2366
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2188
2367
  } | undefined;
2189
2368
  createdAt?: {
2190
2369
  type: "range";
@@ -2245,6 +2424,13 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2245
2424
  type: "exact";
2246
2425
  term: string;
2247
2426
  } | undefined;
2427
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2428
+ type: "within";
2429
+ location: string | {
2430
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2431
+ $location?: string | undefined;
2432
+ };
2433
+ } | undefined;
2248
2434
  createdAtLocation?: {
2249
2435
  type: "within";
2250
2436
  location: string | {
@@ -2316,7 +2502,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2316
2502
  }[];
2317
2503
  };
2318
2504
  action?: {
2319
- type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REJECT" | "REQUEST_CORRECTION" | "UNARCHIVE";
2505
+ type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REINSTATE_REGISTRATION" | "REJECT" | "REQUEST_CORRECTION" | "REVOKE_REGISTRATION" | "UNARCHIVE";
2320
2506
  } | undefined;
2321
2507
  columns: {
2322
2508
  label: {
@@ -2353,10 +2539,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2353
2539
  eventType?: string | undefined;
2354
2540
  status?: {
2355
2541
  type: "exact";
2356
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2542
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2357
2543
  } | {
2358
2544
  type: "anyOf";
2359
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2545
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2546
+ } | {
2547
+ type: "noneOf";
2548
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2360
2549
  } | undefined;
2361
2550
  createdAt?: {
2362
2551
  type: "range";
@@ -2417,6 +2606,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2417
2606
  type: "exact";
2418
2607
  term: string;
2419
2608
  } | undefined;
2609
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2610
+ type: "within";
2611
+ location: string | {
2612
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2613
+ $location?: string | undefined;
2614
+ };
2615
+ } | undefined;
2420
2616
  createdAtLocation?: {
2421
2617
  type: "within";
2422
2618
  location: string | {
@@ -2492,10 +2688,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2492
2688
  eventType?: string | undefined;
2493
2689
  status?: {
2494
2690
  type: "exact";
2495
- term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
2691
+ term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED";
2496
2692
  } | {
2497
2693
  type: "anyOf";
2498
- terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
2694
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2695
+ } | {
2696
+ type: "noneOf";
2697
+ terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED" | "REVOKED")[];
2499
2698
  } | undefined;
2500
2699
  createdAt?: {
2501
2700
  type: "range";
@@ -2556,6 +2755,13 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2556
2755
  type: "exact";
2557
2756
  term: string;
2558
2757
  } | undefined;
2758
+ 'legalStatuses.REVOKED.createdAtLocation'?: {
2759
+ type: "within";
2760
+ location: string | {
2761
+ $userField: "administrativeAreaId" | "avatar" | "device" | "firstname" | "fullHonorificName" | "id" | "middlename" | "name" | "primaryOfficeId" | "role" | "signature" | "surname";
2762
+ $location?: string | undefined;
2763
+ };
2764
+ } | undefined;
2559
2765
  createdAtLocation?: {
2560
2766
  type: "within";
2561
2767
  location: string | {
@@ -2627,7 +2833,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2627
2833
  }[];
2628
2834
  };
2629
2835
  action?: {
2630
- type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REJECT" | "REQUEST_CORRECTION" | "UNARCHIVE";
2836
+ type: "ARCHIVE" | "DECLARE" | "DELETE" | "EDIT" | "MARK_AS_DUPLICATE" | "PRINT_CERTIFICATE" | "READ" | "REGISTER" | "REINSTATE_REGISTRATION" | "REJECT" | "REQUEST_CORRECTION" | "REVOKE_REGISTRATION" | "UNARCHIVE";
2631
2837
  } | undefined;
2632
2838
  columns: {
2633
2839
  label: {
@@ -1,8 +1,24 @@
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;
8
24
  //# sourceMappingURL=eventConfigValidation.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"[];
@@ -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;
@@ -1,4 +1,5 @@
1
1
  import { Action } from '../ActionDocument';
2
+ import { EventStatus } from '../EventMetadata';
2
3
  /**
3
4
  * Returns the creation metadata of the last update action (Requested or Accepted).
4
5
  * Requested actions are included so that async flows (202) correctly reflect the
@@ -29,7 +30,7 @@ export declare function getActionUpdateMetadata(actions: Action[]): Pick<{
29
30
  * @returns the legal statuses of the event. Event is considered legal if it has been accepted.
30
31
  * @see EventIndex for the description of the returned object.
31
32
  */
32
- export declare function getLegalStatuses(actions: Action[]): {
33
+ export declare function getLegalStatuses(actions: Action[], status: EventStatus): {
33
34
  NOTIFIED: {
34
35
  createdAt: string;
35
36
  createdBy: string;
@@ -57,5 +58,14 @@ export declare function getLegalStatuses(actions: Action[]): {
57
58
  createdByRole: string | undefined;
58
59
  registrationNumber: string | null | undefined;
59
60
  } | null;
61
+ REVOKED: {
62
+ createdAt: string;
63
+ createdBy: string;
64
+ createdByUserType: "system" | "user";
65
+ createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
66
+ acceptedAt: string;
67
+ createdByRole: string | undefined;
68
+ registrationNumber: string | null | undefined;
69
+ } | null;
60
70
  };
61
71
  //# sourceMappingURL=utils.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { UUID } from '../uuid';
2
2
  import { ActionDocument, ActionUpdate } from './ActionDocument';
3
3
  import { ValidatorContext } from '../conditionals/validate';
4
- import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput } from './ActionInput';
4
+ import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput, RevokeRegistrationActionInput, ReinstateRegistrationActionInput } from './ActionInput';
5
5
  import { ActionType } from './ActionType';
6
6
  import { Draft } from './Draft';
7
7
  import { EventConfig, EventConfigInput } from './EventConfig';
@@ -10,6 +10,7 @@ import { EventIndex } from './EventIndex';
10
10
  import { EventInput } from './EventInput';
11
11
  import { TranslationConfig } from './TranslationConfig';
12
12
  import { FieldConfig } from './FieldConfig';
13
+ import { DeclarationFormConfig } from './FormConfig';
13
14
  import { LocationVersion, SetLocationPayload, SetAdministrativeAreaPayload, ClientAdministrativeArea } from './locations';
14
15
  import { WorkqueueConfig } from './WorkqueueConfig';
15
16
  import * as z from 'zod/v4';
@@ -158,6 +159,28 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
158
159
  annotation: {};
159
160
  eventId: string;
160
161
  };
162
+ revokeRegistration: (eventId: string, input?: Partial<Pick<RevokeRegistrationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
163
+ keepAssignment?: boolean | undefined;
164
+ keepAssignmentIfAccepted?: boolean | undefined;
165
+ keepAssignmentIfRejected?: boolean | undefined;
166
+ waitFor?: boolean | undefined;
167
+ type: "REVOKE_REGISTRATION";
168
+ transactionId: string;
169
+ declaration: {};
170
+ annotation: {};
171
+ eventId: string;
172
+ };
173
+ reinstateRegistration: (eventId: string, input?: Partial<Pick<ReinstateRegistrationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
174
+ keepAssignment?: boolean | undefined;
175
+ keepAssignmentIfAccepted?: boolean | undefined;
176
+ keepAssignmentIfRejected?: boolean | undefined;
177
+ waitFor?: boolean | undefined;
178
+ type: "REINSTATE_REGISTRATION";
179
+ transactionId: string;
180
+ declaration: {};
181
+ annotation: {};
182
+ eventId: string;
183
+ };
161
184
  reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
162
185
  keepAssignment?: boolean | undefined;
163
186
  keepAssignmentIfAccepted?: boolean | undefined;
@@ -328,6 +351,10 @@ export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfE
328
351
  /** Extra actions appended to the default READ + DECLARE pair, e.g. a REQUEST_CORRECTION action with its own correctionForm. */
329
352
  actions?: EventConfigInput['actions'];
330
353
  }) => EventConfig;
354
+ /**
355
+ * @returns a copy of the configuration with the DECLARE action's declaration replaced.
356
+ */
357
+ export declare function withDeclaration(configuration: EventConfig, declaration: DeclarationFormConfig): EventConfig;
331
358
  /**
332
359
  * Get the leaf administrative area IDs from a list of administrative areas.
333
360
  *