@opencrvs/toolkit 1.8.0-rc.fea3888 → 1.8.0-rc.fec1d5d

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 (42) hide show
  1. package/dist/commons/api/router.d.ts +15788 -4866
  2. package/dist/commons/conditionals/conditionals.d.ts +8 -3
  3. package/dist/commons/conditionals/validate.d.ts +6 -0
  4. package/dist/commons/events/ActionConfig.d.ts +72517 -38926
  5. package/dist/commons/events/ActionDocument.d.ts +2095 -484
  6. package/dist/commons/events/ActionInput.d.ts +1515 -243
  7. package/dist/commons/events/ActionType.d.ts +4 -0
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +709 -48
  9. package/dist/commons/events/CompositeFieldValue.d.ts +28 -0
  10. package/dist/commons/events/Constants.d.ts +3 -0
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
  12. package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
  13. package/dist/commons/events/Draft.d.ts +129 -30
  14. package/dist/commons/events/EventConfig.d.ts +28812 -12195
  15. package/dist/commons/events/EventDocument.d.ts +1269 -357
  16. package/dist/commons/events/EventIndex.d.ts +980 -316
  17. package/dist/commons/events/EventInput.d.ts +0 -13
  18. package/dist/commons/events/EventMetadata.d.ts +290 -44
  19. package/dist/commons/events/FieldConfig.d.ts +2954 -1142
  20. package/dist/commons/events/FieldType.d.ts +6 -3
  21. package/dist/commons/events/FieldTypeMapping.d.ts +103 -54
  22. package/dist/commons/events/FieldValue.d.ts +48 -7
  23. package/dist/commons/events/FormConfig.d.ts +20532 -9126
  24. package/dist/commons/events/PageConfig.d.ts +4906 -2112
  25. package/dist/commons/events/SummaryConfig.d.ts +17 -5
  26. package/dist/commons/events/User.d.ts +31 -7
  27. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  28. package/dist/commons/events/WorkqueueConfig.d.ts +4784 -16
  29. package/dist/commons/events/defineConfig.d.ts +3197 -626
  30. package/dist/commons/events/event.d.ts +37 -8
  31. package/dist/commons/events/field.d.ts +29 -20
  32. package/dist/commons/events/index.d.ts +4 -0
  33. package/dist/commons/events/scopes.d.ts +20 -1
  34. package/dist/commons/events/serializer.d.ts +2 -0
  35. package/dist/commons/events/test.utils.d.ts +147 -41
  36. package/dist/commons/events/utils.d.ts +10707 -318
  37. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  38. package/dist/conditionals/index.js +45 -8
  39. package/dist/events/index.js +3408 -1469
  40. package/dist/scopes/index.d.ts +158 -1
  41. package/dist/scopes/index.js +152 -1
  42. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const CreatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3
+ //# sourceMappingURL=CreatedAtLocation.d.ts.map
@@ -10,7 +10,9 @@ export declare const Draft: z.ZodObject<{
10
10
  createdAt: z.ZodString;
11
11
  createdBy: z.ZodString;
12
12
  createdByRole: z.ZodString;
13
- declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
13
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ 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<{
14
16
  filename: z.ZodString;
15
17
  originalFilename: z.ZodString;
16
18
  type: z.ZodString;
@@ -123,8 +125,20 @@ export declare const Draft: z.ZodObject<{
123
125
  addressLine2?: string | null | undefined;
124
126
  addressLine3?: string | null | undefined;
125
127
  postcodeOrZip?: string | null | undefined;
126
- }>]>>;
127
- annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
128
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
129
+ firstname: z.ZodString;
130
+ surname: z.ZodString;
131
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ firstname: string;
134
+ surname: string;
135
+ middlename?: string | null | undefined;
136
+ }, {
137
+ firstname: string;
138
+ surname: string;
139
+ middlename?: string | null | undefined;
140
+ }>, z.ZodNull]>, z.ZodUndefined]>]>>;
141
+ annotation: z.ZodOptional<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<{
128
142
  filename: z.ZodString;
129
143
  originalFilename: z.ZodString;
130
144
  type: z.ZodString;
@@ -237,9 +251,19 @@ export declare const Draft: z.ZodObject<{
237
251
  addressLine2?: string | null | undefined;
238
252
  addressLine3?: string | null | undefined;
239
253
  postcodeOrZip?: string | null | undefined;
240
- }>]>>>;
241
- createdAtLocation: z.ZodOptional<z.ZodString>;
242
- updatedAtLocation: z.ZodOptional<z.ZodString>;
254
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
255
+ firstname: z.ZodString;
256
+ surname: z.ZodString;
257
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ firstname: string;
260
+ surname: string;
261
+ middlename?: string | null | undefined;
262
+ }, {
263
+ firstname: string;
264
+ surname: string;
265
+ middlename?: string | null | undefined;
266
+ }>, z.ZodNull]>, z.ZodUndefined]>]>>>;
243
267
  status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
244
268
  originalActionId: z.ZodOptional<z.ZodString>;
245
269
  }, {
@@ -266,6 +290,10 @@ export declare const Draft: z.ZodObject<{
266
290
  residentialArea?: string | null | undefined;
267
291
  street?: string | null | undefined;
268
292
  zipCode?: string | null | undefined;
293
+ } | {
294
+ firstname: string;
295
+ surname: string;
296
+ middlename?: string | null | undefined;
269
297
  } | {
270
298
  country: string;
271
299
  district: string;
@@ -288,7 +316,9 @@ export declare const Draft: z.ZodObject<{
288
316
  option: string;
289
317
  filename: string;
290
318
  originalFilename: string;
291
- }[] | undefined>;
319
+ }[] | [string, string] | null | undefined>;
320
+ createdBySignature?: string | null | undefined;
321
+ createdAtLocation?: string | null | undefined;
292
322
  annotation?: Record<string, string | number | boolean | {
293
323
  type: string;
294
324
  filename: string;
@@ -304,6 +334,10 @@ export declare const Draft: z.ZodObject<{
304
334
  residentialArea?: string | null | undefined;
305
335
  street?: string | null | undefined;
306
336
  zipCode?: string | null | undefined;
337
+ } | {
338
+ firstname: string;
339
+ surname: string;
340
+ middlename?: string | null | undefined;
307
341
  } | {
308
342
  country: string;
309
343
  district: string;
@@ -326,9 +360,7 @@ export declare const Draft: z.ZodObject<{
326
360
  option: string;
327
361
  filename: string;
328
362
  originalFilename: string;
329
- }[] | undefined> | undefined;
330
- createdAtLocation?: string | undefined;
331
- updatedAtLocation?: string | undefined;
363
+ }[] | [string, string] | null | undefined> | undefined;
332
364
  originalActionId?: string | undefined;
333
365
  }, {
334
366
  type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
@@ -352,6 +384,10 @@ export declare const Draft: z.ZodObject<{
352
384
  residentialArea?: string | null | undefined;
353
385
  street?: string | null | undefined;
354
386
  zipCode?: string | null | undefined;
387
+ } | {
388
+ firstname: string;
389
+ surname: string;
390
+ middlename?: string | null | undefined;
355
391
  } | {
356
392
  country: string;
357
393
  district: string;
@@ -374,7 +410,9 @@ export declare const Draft: z.ZodObject<{
374
410
  option: string;
375
411
  filename: string;
376
412
  originalFilename: string;
377
- }[] | undefined>;
413
+ }[] | [string, string] | null | undefined>;
414
+ createdBySignature?: string | null | undefined;
415
+ createdAtLocation?: string | null | undefined;
378
416
  annotation?: Record<string, string | number | boolean | {
379
417
  type: string;
380
418
  filename: string;
@@ -390,6 +428,10 @@ export declare const Draft: z.ZodObject<{
390
428
  residentialArea?: string | null | undefined;
391
429
  street?: string | null | undefined;
392
430
  zipCode?: string | null | undefined;
431
+ } | {
432
+ firstname: string;
433
+ surname: string;
434
+ middlename?: string | null | undefined;
393
435
  } | {
394
436
  country: string;
395
437
  district: string;
@@ -412,9 +454,7 @@ export declare const Draft: z.ZodObject<{
412
454
  option: string;
413
455
  filename: string;
414
456
  originalFilename: string;
415
- }[] | undefined> | undefined;
416
- createdAtLocation?: string | undefined;
417
- updatedAtLocation?: string | undefined;
457
+ }[] | [string, string] | null | undefined> | undefined;
418
458
  originalActionId?: string | undefined;
419
459
  }>;
420
460
  }, "strip", z.ZodTypeAny, {
@@ -444,6 +484,10 @@ export declare const Draft: z.ZodObject<{
444
484
  residentialArea?: string | null | undefined;
445
485
  street?: string | null | undefined;
446
486
  zipCode?: string | null | undefined;
487
+ } | {
488
+ firstname: string;
489
+ surname: string;
490
+ middlename?: string | null | undefined;
447
491
  } | {
448
492
  country: string;
449
493
  district: string;
@@ -466,7 +510,9 @@ export declare const Draft: z.ZodObject<{
466
510
  option: string;
467
511
  filename: string;
468
512
  originalFilename: string;
469
- }[] | undefined>;
513
+ }[] | [string, string] | null | undefined>;
514
+ createdBySignature?: string | null | undefined;
515
+ createdAtLocation?: string | null | undefined;
470
516
  annotation?: Record<string, string | number | boolean | {
471
517
  type: string;
472
518
  filename: string;
@@ -482,6 +528,10 @@ export declare const Draft: z.ZodObject<{
482
528
  residentialArea?: string | null | undefined;
483
529
  street?: string | null | undefined;
484
530
  zipCode?: string | null | undefined;
531
+ } | {
532
+ firstname: string;
533
+ surname: string;
534
+ middlename?: string | null | undefined;
485
535
  } | {
486
536
  country: string;
487
537
  district: string;
@@ -504,9 +554,7 @@ export declare const Draft: z.ZodObject<{
504
554
  option: string;
505
555
  filename: string;
506
556
  originalFilename: string;
507
- }[] | undefined> | undefined;
508
- createdAtLocation?: string | undefined;
509
- updatedAtLocation?: string | undefined;
557
+ }[] | [string, string] | null | undefined> | undefined;
510
558
  originalActionId?: string | undefined;
511
559
  };
512
560
  }, {
@@ -536,6 +584,10 @@ export declare const Draft: z.ZodObject<{
536
584
  residentialArea?: string | null | undefined;
537
585
  street?: string | null | undefined;
538
586
  zipCode?: string | null | undefined;
587
+ } | {
588
+ firstname: string;
589
+ surname: string;
590
+ middlename?: string | null | undefined;
539
591
  } | {
540
592
  country: string;
541
593
  district: string;
@@ -558,7 +610,9 @@ export declare const Draft: z.ZodObject<{
558
610
  option: string;
559
611
  filename: string;
560
612
  originalFilename: string;
561
- }[] | undefined>;
613
+ }[] | [string, string] | null | undefined>;
614
+ createdBySignature?: string | null | undefined;
615
+ createdAtLocation?: string | null | undefined;
562
616
  annotation?: Record<string, string | number | boolean | {
563
617
  type: string;
564
618
  filename: string;
@@ -574,6 +628,10 @@ export declare const Draft: z.ZodObject<{
574
628
  residentialArea?: string | null | undefined;
575
629
  street?: string | null | undefined;
576
630
  zipCode?: string | null | undefined;
631
+ } | {
632
+ firstname: string;
633
+ surname: string;
634
+ middlename?: string | null | undefined;
577
635
  } | {
578
636
  country: string;
579
637
  district: string;
@@ -596,16 +654,14 @@ export declare const Draft: z.ZodObject<{
596
654
  option: string;
597
655
  filename: string;
598
656
  originalFilename: string;
599
- }[] | undefined> | undefined;
600
- createdAtLocation?: string | undefined;
601
- updatedAtLocation?: string | undefined;
657
+ }[] | [string, string] | null | undefined> | undefined;
602
658
  originalActionId?: string | undefined;
603
659
  };
604
660
  }>;
605
661
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
606
662
  eventId: z.ZodString;
607
663
  transactionId: z.ZodString;
608
- declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
664
+ declaration: z.ZodDefault<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<{
609
665
  filename: z.ZodString;
610
666
  originalFilename: z.ZodString;
611
667
  type: z.ZodString;
@@ -718,8 +774,20 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
718
774
  addressLine2?: string | null | undefined;
719
775
  addressLine3?: string | null | undefined;
720
776
  postcodeOrZip?: string | null | undefined;
721
- }>]>>>;
722
- annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
777
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
778
+ firstname: z.ZodString;
779
+ surname: z.ZodString;
780
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ firstname: string;
783
+ surname: string;
784
+ middlename?: string | null | undefined;
785
+ }, {
786
+ firstname: string;
787
+ surname: string;
788
+ middlename?: string | null | undefined;
789
+ }>, z.ZodNull]>, z.ZodUndefined]>]>>>;
790
+ annotation: z.ZodOptional<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<{
723
791
  filename: z.ZodString;
724
792
  originalFilename: z.ZodString;
725
793
  type: z.ZodString;
@@ -832,13 +900,27 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
832
900
  addressLine2?: string | null | undefined;
833
901
  addressLine3?: string | null | undefined;
834
902
  postcodeOrZip?: string | null | undefined;
835
- }>]>>>;
903
+ }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
904
+ firstname: z.ZodString;
905
+ surname: z.ZodString;
906
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
907
+ }, "strip", z.ZodTypeAny, {
908
+ firstname: string;
909
+ surname: string;
910
+ middlename?: string | null | undefined;
911
+ }, {
912
+ firstname: string;
913
+ surname: string;
914
+ middlename?: string | null | undefined;
915
+ }>, z.ZodNull]>, z.ZodUndefined]>]>>>;
836
916
  originalActionId: z.ZodOptional<z.ZodString>;
837
917
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
838
918
  }, {
839
919
  type: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
920
+ status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
840
921
  }>, "strip", z.ZodTypeAny, {
841
922
  type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
923
+ status: "Rejected" | "Requested" | "Accepted";
842
924
  transactionId: string;
843
925
  declaration: Record<string, string | number | boolean | {
844
926
  type: string;
@@ -855,6 +937,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
855
937
  residentialArea?: string | null | undefined;
856
938
  street?: string | null | undefined;
857
939
  zipCode?: string | null | undefined;
940
+ } | {
941
+ firstname: string;
942
+ surname: string;
943
+ middlename?: string | null | undefined;
858
944
  } | {
859
945
  country: string;
860
946
  district: string;
@@ -877,7 +963,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
877
963
  option: string;
878
964
  filename: string;
879
965
  originalFilename: string;
880
- }[] | undefined>;
966
+ }[] | [string, string] | null | undefined>;
881
967
  eventId: string;
882
968
  annotation?: Record<string, string | number | boolean | {
883
969
  type: string;
@@ -894,6 +980,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
894
980
  residentialArea?: string | null | undefined;
895
981
  street?: string | null | undefined;
896
982
  zipCode?: string | null | undefined;
983
+ } | {
984
+ firstname: string;
985
+ surname: string;
986
+ middlename?: string | null | undefined;
897
987
  } | {
898
988
  country: string;
899
989
  district: string;
@@ -916,11 +1006,12 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
916
1006
  option: string;
917
1007
  filename: string;
918
1008
  originalFilename: string;
919
- }[] | undefined> | undefined;
1009
+ }[] | [string, string] | null | undefined> | undefined;
920
1010
  originalActionId?: string | undefined;
921
1011
  keepAssignment?: boolean | undefined;
922
1012
  }, {
923
1013
  type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1014
+ status: "Rejected" | "Requested" | "Accepted";
924
1015
  transactionId: string;
925
1016
  eventId: string;
926
1017
  declaration?: Record<string, string | number | boolean | {
@@ -938,6 +1029,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
938
1029
  residentialArea?: string | null | undefined;
939
1030
  street?: string | null | undefined;
940
1031
  zipCode?: string | null | undefined;
1032
+ } | {
1033
+ firstname: string;
1034
+ surname: string;
1035
+ middlename?: string | null | undefined;
941
1036
  } | {
942
1037
  country: string;
943
1038
  district: string;
@@ -960,7 +1055,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
960
1055
  option: string;
961
1056
  filename: string;
962
1057
  originalFilename: string;
963
- }[] | undefined> | undefined;
1058
+ }[] | [string, string] | null | undefined> | undefined;
964
1059
  annotation?: Record<string, string | number | boolean | {
965
1060
  type: string;
966
1061
  filename: string;
@@ -976,6 +1071,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
976
1071
  residentialArea?: string | null | undefined;
977
1072
  street?: string | null | undefined;
978
1073
  zipCode?: string | null | undefined;
1074
+ } | {
1075
+ firstname: string;
1076
+ surname: string;
1077
+ middlename?: string | null | undefined;
979
1078
  } | {
980
1079
  country: string;
981
1080
  district: string;
@@ -998,7 +1097,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
998
1097
  option: string;
999
1098
  filename: string;
1000
1099
  originalFilename: string;
1001
- }[] | undefined> | undefined;
1100
+ }[] | [string, string] | null | undefined> | undefined;
1002
1101
  originalActionId?: string | undefined;
1003
1102
  keepAssignment?: boolean | undefined;
1004
1103
  }>;