@opencrvs/toolkit 1.8.0-rc.f8be155 → 1.8.0-rc.f8e0ee5

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 (33) hide show
  1. package/dist/commons/api/router.d.ts +2029 -5136
  2. package/dist/commons/conditionals/conditionals.d.ts +0 -4
  3. package/dist/commons/conditionals/validate.d.ts +0 -6
  4. package/dist/commons/events/ActionConfig.d.ts +20914 -44038
  5. package/dist/commons/events/ActionDocument.d.ts +484 -1888
  6. package/dist/commons/events/ActionInput.d.ts +304 -1504
  7. package/dist/commons/events/ActionType.d.ts +0 -4
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -75
  9. package/dist/commons/events/CompositeFieldValue.d.ts +0 -28
  10. package/dist/commons/events/Constants.d.ts +0 -1
  11. package/dist/commons/events/CreatedAtLocation.d.ts +2 -1
  12. package/dist/commons/events/Draft.d.ts +34 -130
  13. package/dist/commons/events/EventConfig.d.ts +16720 -30190
  14. package/dist/commons/events/EventDocument.d.ts +346 -1210
  15. package/dist/commons/events/EventIndex.d.ts +32 -270
  16. package/dist/commons/events/EventMetadata.d.ts +60 -27
  17. package/dist/commons/events/FieldConfig.d.ts +893 -1682
  18. package/dist/commons/events/FieldType.d.ts +1 -4
  19. package/dist/commons/events/FieldTypeMapping.d.ts +50 -89
  20. package/dist/commons/events/FieldValue.d.ts +5 -41
  21. package/dist/commons/events/FormConfig.d.ts +2510 -7640
  22. package/dist/commons/events/PageConfig.d.ts +1638 -2896
  23. package/dist/commons/events/SummaryConfig.d.ts +5 -0
  24. package/dist/commons/events/WorkqueueConfig.d.ts +19 -297
  25. package/dist/commons/events/defineConfig.d.ts +1440 -3841
  26. package/dist/commons/events/field.d.ts +0 -4
  27. package/dist/commons/events/scopes.d.ts +1 -1
  28. package/dist/commons/events/test.utils.d.ts +39 -126
  29. package/dist/commons/events/transactions.d.ts +1 -1
  30. package/dist/commons/events/utils.d.ts +18 -9664
  31. package/dist/conditionals/index.js +1 -18
  32. package/dist/events/index.js +1103 -1370
  33. package/package.json +1 -1
@@ -1,13 +1,22 @@
1
1
  import { z, ZodType } from 'zod';
2
2
  export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
3
- id: z.ZodBranded<z.ZodString, "UUID">;
3
+ id: z.ZodString;
4
4
  type: z.ZodString;
5
- status: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
5
+ status: z.ZodNativeEnum<{
6
+ readonly CREATED: "CREATED";
7
+ readonly NOTIFIED: "NOTIFIED";
8
+ readonly DECLARED: "DECLARED";
9
+ readonly VALIDATED: "VALIDATED";
10
+ readonly REGISTERED: "REGISTERED";
11
+ readonly CERTIFIED: "CERTIFIED";
12
+ readonly REJECTED: "REJECTED";
13
+ readonly ARCHIVED: "ARCHIVED";
14
+ }>;
6
15
  legalStatuses: z.ZodObject<{
7
16
  DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
8
17
  createdAt: z.ZodString;
9
18
  createdBy: z.ZodString;
10
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
19
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
20
  acceptedAt: z.ZodString;
12
21
  createdByRole: z.ZodString;
13
22
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -17,7 +26,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
17
26
  createdByRole: string;
18
27
  acceptedAt: string;
19
28
  createdBySignature?: string | null | undefined;
20
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
29
+ createdAtLocation?: string | null | undefined;
21
30
  }, {
22
31
  createdAt: string;
23
32
  createdBy: string;
@@ -29,7 +38,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
29
38
  REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
30
39
  createdAt: z.ZodString;
31
40
  createdBy: z.ZodString;
32
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
41
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
42
  acceptedAt: z.ZodString;
34
43
  createdByRole: z.ZodString;
35
44
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -42,7 +51,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
42
51
  registrationNumber: string;
43
52
  acceptedAt: string;
44
53
  createdBySignature?: string | null | undefined;
45
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
54
+ createdAtLocation?: string | null | undefined;
46
55
  }, {
47
56
  createdAt: string;
48
57
  createdBy: string;
@@ -59,7 +68,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
59
68
  createdByRole: string;
60
69
  acceptedAt: string;
61
70
  createdBySignature?: string | null | undefined;
62
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
71
+ createdAtLocation?: string | null | undefined;
63
72
  } | null | undefined;
64
73
  REGISTERED?: {
65
74
  createdAt: string;
@@ -68,7 +77,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
68
77
  registrationNumber: string;
69
78
  acceptedAt: string;
70
79
  createdBySignature?: string | null | undefined;
71
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
80
+ createdAtLocation?: string | null | undefined;
72
81
  } | null | undefined;
73
82
  }, {
74
83
  DECLARED?: {
@@ -93,15 +102,16 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
93
102
  dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
103
  createdBy: z.ZodString;
95
104
  updatedByUserRole: z.ZodString;
96
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
105
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
106
  createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
- updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
107
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
108
  updatedAt: z.ZodString;
100
109
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
110
  updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
111
  trackingId: z.ZodString;
103
112
  flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
104
113
  readonly CERTIFICATE_PRINTED: "certificate-printed";
114
+ readonly CORRECTION_REQUESTED: "correction-requested";
105
115
  }>]>, "many">;
106
116
  }, {
107
117
  declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
@@ -217,34 +227,10 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
217
227
  addressLine2?: string | undefined;
218
228
  addressLine3?: string | undefined;
219
229
  postcodeOrZip?: string | undefined;
220
- }>, z.ZodObject<{
221
- firstname: z.ZodString;
222
- surname: z.ZodString;
223
- middlename: z.ZodOptional<z.ZodString>;
224
- }, "strip", z.ZodTypeAny, {
225
- firstname: string;
226
- surname: string;
227
- middlename?: string | undefined;
228
- }, {
229
- firstname: string;
230
- surname: string;
231
- middlename?: string | undefined;
232
- }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
233
- firstname: z.ZodString;
234
- surname: z.ZodString;
235
- middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
- }, "strip", z.ZodTypeAny, {
237
- firstname: string;
238
- surname: string;
239
- middlename?: string | null | undefined;
240
- }, {
241
- firstname: string;
242
- surname: string;
243
- middlename?: string | null | undefined;
244
- }>, z.ZodNull]>, z.ZodUndefined]>]>>;
230
+ }>]>>;
245
231
  }>, "strip", z.ZodTypeAny, {
246
232
  type: string;
247
- id: string & z.BRAND<"UUID">;
233
+ id: string;
248
234
  status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
249
235
  createdAt: string;
250
236
  createdBy: string;
@@ -270,14 +256,6 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
270
256
  province: string;
271
257
  urbanOrRural: "RURAL";
272
258
  village?: string | undefined;
273
- } | {
274
- firstname: string;
275
- surname: string;
276
- middlename?: string | undefined;
277
- } | {
278
- firstname: string;
279
- surname: string;
280
- middlename?: string | null | undefined;
281
259
  } | {
282
260
  country: string;
283
261
  state: string;
@@ -293,7 +271,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
293
271
  option: string;
294
272
  filename: string;
295
273
  originalFilename: string;
296
- }[] | [string, string] | null | undefined>;
274
+ }[] | [string, string] | undefined>;
297
275
  updatedAt: string;
298
276
  trackingId: string;
299
277
  legalStatuses: {
@@ -303,7 +281,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
303
281
  createdByRole: string;
304
282
  acceptedAt: string;
305
283
  createdBySignature?: string | null | undefined;
306
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
284
+ createdAtLocation?: string | null | undefined;
307
285
  } | null | undefined;
308
286
  REGISTERED?: {
309
287
  createdAt: string;
@@ -312,16 +290,16 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
312
290
  registrationNumber: string;
313
291
  acceptedAt: string;
314
292
  createdBySignature?: string | null | undefined;
315
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
293
+ createdAtLocation?: string | null | undefined;
316
294
  } | null | undefined;
317
295
  };
318
296
  updatedByUserRole: string;
319
297
  flags: string[];
320
298
  createdBySignature?: string | null | undefined;
321
- createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
299
+ createdAtLocation?: string | null | undefined;
322
300
  assignedTo?: string | null | undefined;
323
301
  dateOfEvent?: string | null | undefined;
324
- updatedAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
302
+ updatedAtLocation?: string | null | undefined;
325
303
  updatedBy?: string | null | undefined;
326
304
  }, {
327
305
  type: string;
@@ -351,14 +329,6 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
351
329
  province: string;
352
330
  urbanOrRural: "RURAL";
353
331
  village?: string | undefined;
354
- } | {
355
- firstname: string;
356
- surname: string;
357
- middlename?: string | undefined;
358
- } | {
359
- firstname: string;
360
- surname: string;
361
- middlename?: string | null | undefined;
362
332
  } | {
363
333
  country: string;
364
334
  state: string;
@@ -374,7 +344,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
374
344
  option: string;
375
345
  filename: string;
376
346
  originalFilename: string;
377
- }[] | [string, string] | null | undefined>;
347
+ }[] | [string, string] | undefined>;
378
348
  updatedAt: string;
379
349
  trackingId: string;
380
350
  legalStatuses: {
@@ -631,16 +601,6 @@ export declare const QueryExpression: z.ZodObject<{
631
601
  type: "exact";
632
602
  term: string;
633
603
  }>]>>>;
634
- 'legalStatus.REGISTERED.registrationNumber': z.ZodOptional<z.ZodOptional<z.ZodObject<{
635
- type: z.ZodLiteral<"exact">;
636
- term: z.ZodString;
637
- }, "strip", z.ZodTypeAny, {
638
- type: "exact";
639
- term: string;
640
- }, {
641
- type: "exact";
642
- term: string;
643
- }>>>;
644
604
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
645
605
  type: z.ZodLiteral<"within">;
646
606
  location: z.ZodString;
@@ -817,10 +777,6 @@ export declare const QueryExpression: z.ZodObject<{
817
777
  type: "within";
818
778
  location: string;
819
779
  } | undefined;
820
- 'legalStatus.REGISTERED.registrationNumber'?: {
821
- type: "exact";
822
- term: string;
823
- } | undefined;
824
780
  }, {
825
781
  status?: {
826
782
  type: "exact";
@@ -899,10 +855,6 @@ export declare const QueryExpression: z.ZodObject<{
899
855
  type: "within";
900
856
  location: string;
901
857
  } | undefined;
902
- 'legalStatus.REGISTERED.registrationNumber'?: {
903
- type: "exact";
904
- term: string;
905
- } | undefined;
906
858
  }>;
907
859
  export declare const QueryType: z.ZodObject<{
908
860
  type: z.ZodUnion<[z.ZodLiteral<"and">, z.ZodLiteral<"or">]>;
@@ -1012,16 +964,6 @@ export declare const QueryType: z.ZodObject<{
1012
964
  type: "exact";
1013
965
  term: string;
1014
966
  }>]>>>;
1015
- 'legalStatus.REGISTERED.registrationNumber': z.ZodOptional<z.ZodOptional<z.ZodObject<{
1016
- type: z.ZodLiteral<"exact">;
1017
- term: z.ZodString;
1018
- }, "strip", z.ZodTypeAny, {
1019
- type: "exact";
1020
- term: string;
1021
- }, {
1022
- type: "exact";
1023
- term: string;
1024
- }>>>;
1025
967
  createdAtLocation: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodObject<{
1026
968
  type: z.ZodLiteral<"within">;
1027
969
  location: z.ZodString;
@@ -1198,10 +1140,6 @@ export declare const QueryType: z.ZodObject<{
1198
1140
  type: "within";
1199
1141
  location: string;
1200
1142
  } | undefined;
1201
- 'legalStatus.REGISTERED.registrationNumber'?: {
1202
- type: "exact";
1203
- term: string;
1204
- } | undefined;
1205
1143
  }, {
1206
1144
  status?: {
1207
1145
  type: "exact";
@@ -1280,11 +1218,7 @@ export declare const QueryType: z.ZodObject<{
1280
1218
  type: "within";
1281
1219
  location: string;
1282
1220
  } | undefined;
1283
- 'legalStatus.REGISTERED.registrationNumber'?: {
1284
- type: "exact";
1285
- term: string;
1286
- } | undefined;
1287
- }>, "atleastone">, [{
1221
+ }>, "many">, {
1288
1222
  status?: {
1289
1223
  type: "exact";
1290
1224
  term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
@@ -1362,96 +1296,10 @@ export declare const QueryType: z.ZodObject<{
1362
1296
  type: "within";
1363
1297
  location: string;
1364
1298
  } | undefined;
1365
- 'legalStatus.REGISTERED.registrationNumber'?: {
1366
- type: "exact";
1367
- term: string;
1368
- } | undefined;
1369
- }, ...{
1370
- status?: {
1371
- type: "exact";
1372
- term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
1373
- } | {
1374
- type: "anyOf";
1375
- terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
1376
- } | undefined;
1377
- data?: any;
1378
- createdAt?: {
1379
- type: "exact";
1380
- term: string;
1381
- } | {
1382
- type: "range";
1383
- gte: string;
1384
- lte: string;
1385
- } | undefined;
1386
- createdBy?: {
1387
- type: "exact";
1388
- term: string;
1389
- } | undefined;
1390
- createdAtLocation?: {
1391
- type: "exact";
1392
- term: string;
1393
- } | {
1394
- type: "within";
1395
- location: string;
1396
- } | undefined;
1397
- assignedTo?: {
1398
- type: "exact";
1399
- term: string;
1400
- } | undefined;
1401
- updatedAt?: {
1402
- type: "exact";
1403
- term: string;
1404
- } | {
1405
- type: "range";
1406
- gte: string;
1407
- lte: string;
1408
- } | undefined;
1409
- trackingId?: {
1410
- type: "exact";
1411
- term: string;
1412
- } | undefined;
1413
- updatedAtLocation?: {
1414
- type: "exact";
1415
- term: string;
1416
- } | {
1417
- type: "within";
1418
- location: string;
1419
- } | undefined;
1420
- updatedBy?: {
1421
- type: "exact";
1422
- term: string;
1423
- } | undefined;
1424
- flags?: ({
1425
- type: "anyOf";
1426
- terms: string[];
1427
- } | {
1428
- type: "not";
1429
- term: string;
1430
- })[] | undefined;
1431
- eventType?: string | undefined;
1432
- 'legalStatus.REGISTERED.createdAt'?: {
1433
- type: "exact";
1434
- term: string;
1435
- } | {
1436
- type: "range";
1437
- gte: string;
1438
- lte: string;
1439
- } | undefined;
1440
- 'legalStatus.REGISTERED.createdAtLocation'?: {
1441
- type: "exact";
1442
- term: string;
1443
- } | {
1444
- type: "within";
1445
- location: string;
1446
- } | undefined;
1447
- 'legalStatus.REGISTERED.registrationNumber'?: {
1448
- type: "exact";
1449
- term: string;
1450
- } | undefined;
1451
- }[]], unknown>;
1299
+ }[], unknown>;
1452
1300
  }, "strip", z.ZodTypeAny, {
1453
1301
  type: "and" | "or";
1454
- clauses: [{
1302
+ clauses: {
1455
1303
  status?: {
1456
1304
  type: "exact";
1457
1305
  term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
@@ -1529,93 +1377,7 @@ export declare const QueryType: z.ZodObject<{
1529
1377
  type: "within";
1530
1378
  location: string;
1531
1379
  } | undefined;
1532
- 'legalStatus.REGISTERED.registrationNumber'?: {
1533
- type: "exact";
1534
- term: string;
1535
- } | undefined;
1536
- }, ...{
1537
- status?: {
1538
- type: "exact";
1539
- term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED";
1540
- } | {
1541
- type: "anyOf";
1542
- terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
1543
- } | undefined;
1544
- data?: any;
1545
- createdAt?: {
1546
- type: "exact";
1547
- term: string;
1548
- } | {
1549
- type: "range";
1550
- gte: string;
1551
- lte: string;
1552
- } | undefined;
1553
- createdBy?: {
1554
- type: "exact";
1555
- term: string;
1556
- } | undefined;
1557
- createdAtLocation?: {
1558
- type: "exact";
1559
- term: string;
1560
- } | {
1561
- type: "within";
1562
- location: string;
1563
- } | undefined;
1564
- assignedTo?: {
1565
- type: "exact";
1566
- term: string;
1567
- } | undefined;
1568
- updatedAt?: {
1569
- type: "exact";
1570
- term: string;
1571
- } | {
1572
- type: "range";
1573
- gte: string;
1574
- lte: string;
1575
- } | undefined;
1576
- trackingId?: {
1577
- type: "exact";
1578
- term: string;
1579
- } | undefined;
1580
- updatedAtLocation?: {
1581
- type: "exact";
1582
- term: string;
1583
- } | {
1584
- type: "within";
1585
- location: string;
1586
- } | undefined;
1587
- updatedBy?: {
1588
- type: "exact";
1589
- term: string;
1590
- } | undefined;
1591
- flags?: ({
1592
- type: "anyOf";
1593
- terms: string[];
1594
- } | {
1595
- type: "not";
1596
- term: string;
1597
- })[] | undefined;
1598
- eventType?: string | undefined;
1599
- 'legalStatus.REGISTERED.createdAt'?: {
1600
- type: "exact";
1601
- term: string;
1602
- } | {
1603
- type: "range";
1604
- gte: string;
1605
- lte: string;
1606
- } | undefined;
1607
- 'legalStatus.REGISTERED.createdAtLocation'?: {
1608
- type: "exact";
1609
- term: string;
1610
- } | {
1611
- type: "within";
1612
- location: string;
1613
- } | undefined;
1614
- 'legalStatus.REGISTERED.registrationNumber'?: {
1615
- type: "exact";
1616
- term: string;
1617
- } | undefined;
1618
- }[]];
1380
+ }[];
1619
1381
  }, {
1620
1382
  type: "and" | "or";
1621
1383
  clauses?: unknown;