@opencrvs/toolkit 1.8.0-rc.fc4c805 → 1.8.0-rc.fc76588

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 (43) hide show
  1. package/dist/commons/api/router.d.ts +10346 -4518
  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 +56387 -29043
  5. package/dist/commons/events/ActionDocument.d.ts +2110 -519
  6. package/dist/commons/events/ActionInput.d.ts +1577 -305
  7. package/dist/commons/events/ActionType.d.ts +4 -0
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +675 -12
  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 +2 -0
  13. package/dist/commons/events/Draft.d.ts +137 -36
  14. package/dist/commons/events/EventConfig.d.ts +27593 -14046
  15. package/dist/commons/events/EventDocument.d.ts +1374 -391
  16. package/dist/commons/events/EventIndex.d.ts +589 -357
  17. package/dist/commons/events/EventInput.d.ts +0 -13
  18. package/dist/commons/events/EventMetadata.d.ts +74 -80
  19. package/dist/commons/events/FieldConfig.d.ts +2500 -1111
  20. package/dist/commons/events/FieldType.d.ts +4 -1
  21. package/dist/commons/events/FieldTypeMapping.d.ts +94 -52
  22. package/dist/commons/events/FieldValue.d.ts +43 -5
  23. package/dist/commons/events/FormConfig.d.ts +18485 -9821
  24. package/dist/commons/events/PageConfig.d.ts +3600 -1472
  25. package/dist/commons/events/SummaryConfig.d.ts +0 -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 +4205 -538
  29. package/dist/commons/events/defineConfig.d.ts +2639 -635
  30. package/dist/commons/events/event.d.ts +37 -10
  31. package/dist/commons/events/field.d.ts +26 -17
  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 +149 -42
  36. package/dist/commons/events/transactions.d.ts +1 -1
  37. package/dist/commons/events/utils.d.ts +10115 -313
  38. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  39. package/dist/conditionals/index.js +45 -8
  40. package/dist/events/index.js +2682 -1019
  41. package/dist/scopes/index.d.ts +158 -1
  42. package/dist/scopes/index.js +152 -1
  43. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ export declare const CreatedAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
2
+ //# sourceMappingURL=CreatedAtLocation.d.ts.map
@@ -1,15 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  export declare const Draft: z.ZodObject<{
3
- id: z.ZodString;
4
- eventId: z.ZodString;
3
+ id: z.ZodBranded<z.ZodString, "UUID">;
4
+ eventId: z.ZodBranded<z.ZodString, "UUID">;
5
5
  transactionId: z.ZodString;
6
6
  createdAt: z.ZodString;
7
7
  action: z.ZodObject<Omit<z.objectUtil.extendShape<{
8
- id: z.ZodString;
8
+ id: z.ZodBranded<z.ZodString, "UUID">;
9
9
  transactionId: z.ZodString;
10
10
  createdAt: z.ZodString;
11
11
  createdBy: z.ZodString;
12
12
  createdByRole: z.ZodString;
13
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
13
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;
@@ -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.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, 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.ZodNullable<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,10 +251,21 @@ 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.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]>]>>>>;
242
267
  status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
243
- originalActionId: z.ZodOptional<z.ZodString>;
268
+ originalActionId: z.ZodNullable<z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>>;
244
269
  }, {
245
270
  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"]>;
246
271
  }>, "id">, "strip", z.ZodTypeAny, {
@@ -265,6 +290,10 @@ export declare const Draft: z.ZodObject<{
265
290
  residentialArea?: string | null | undefined;
266
291
  street?: string | null | undefined;
267
292
  zipCode?: string | null | undefined;
293
+ } | {
294
+ firstname: string;
295
+ surname: string;
296
+ middlename?: string | null | undefined;
268
297
  } | {
269
298
  country: string;
270
299
  district: string;
@@ -287,8 +316,9 @@ export declare const Draft: z.ZodObject<{
287
316
  option: string;
288
317
  filename: string;
289
318
  originalFilename: string;
290
- }[] | [string, string] | undefined>;
291
- createdAtLocation: string;
319
+ }[] | [string, string] | null | undefined>;
320
+ createdBySignature?: string | null | undefined;
321
+ createdAtLocation?: (string & z.BRAND<"UUID">) | 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,8 +360,8 @@ export declare const Draft: z.ZodObject<{
326
360
  option: string;
327
361
  filename: string;
328
362
  originalFilename: string;
329
- }[] | [string, string] | undefined> | undefined;
330
- originalActionId?: string | undefined;
363
+ }[] | [string, string] | null | undefined> | null | undefined;
364
+ originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
331
365
  }, {
332
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";
333
367
  status: "Rejected" | "Requested" | "Accepted";
@@ -350,6 +384,10 @@ export declare const Draft: z.ZodObject<{
350
384
  residentialArea?: string | null | undefined;
351
385
  street?: string | null | undefined;
352
386
  zipCode?: string | null | undefined;
387
+ } | {
388
+ firstname: string;
389
+ surname: string;
390
+ middlename?: string | null | undefined;
353
391
  } | {
354
392
  country: string;
355
393
  district: string;
@@ -372,8 +410,9 @@ export declare const Draft: z.ZodObject<{
372
410
  option: string;
373
411
  filename: string;
374
412
  originalFilename: string;
375
- }[] | [string, string] | undefined>;
376
- createdAtLocation: string;
413
+ }[] | [string, string] | null | undefined>;
414
+ createdBySignature?: string | null | undefined;
415
+ createdAtLocation?: string | null | undefined;
377
416
  annotation?: Record<string, string | number | boolean | {
378
417
  type: string;
379
418
  filename: string;
@@ -389,6 +428,10 @@ export declare const Draft: z.ZodObject<{
389
428
  residentialArea?: string | null | undefined;
390
429
  street?: string | null | undefined;
391
430
  zipCode?: string | null | undefined;
431
+ } | {
432
+ firstname: string;
433
+ surname: string;
434
+ middlename?: string | null | undefined;
392
435
  } | {
393
436
  country: string;
394
437
  district: string;
@@ -411,14 +454,14 @@ export declare const Draft: z.ZodObject<{
411
454
  option: string;
412
455
  filename: string;
413
456
  originalFilename: string;
414
- }[] | [string, string] | undefined> | undefined;
415
- originalActionId?: string | undefined;
457
+ }[] | [string, string] | null | undefined> | null | undefined;
458
+ originalActionId?: string | null | undefined;
416
459
  }>;
417
460
  }, "strip", z.ZodTypeAny, {
418
- id: string;
461
+ id: string & z.BRAND<"UUID">;
419
462
  transactionId: string;
420
463
  createdAt: string;
421
- eventId: string;
464
+ eventId: string & z.BRAND<"UUID">;
422
465
  action: {
423
466
  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";
424
467
  status: "Rejected" | "Requested" | "Accepted";
@@ -441,6 +484,10 @@ export declare const Draft: z.ZodObject<{
441
484
  residentialArea?: string | null | undefined;
442
485
  street?: string | null | undefined;
443
486
  zipCode?: string | null | undefined;
487
+ } | {
488
+ firstname: string;
489
+ surname: string;
490
+ middlename?: string | null | undefined;
444
491
  } | {
445
492
  country: string;
446
493
  district: string;
@@ -463,8 +510,9 @@ export declare const Draft: z.ZodObject<{
463
510
  option: string;
464
511
  filename: string;
465
512
  originalFilename: string;
466
- }[] | [string, string] | undefined>;
467
- createdAtLocation: string;
513
+ }[] | [string, string] | null | undefined>;
514
+ createdBySignature?: string | null | undefined;
515
+ createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
468
516
  annotation?: Record<string, string | number | boolean | {
469
517
  type: string;
470
518
  filename: string;
@@ -480,6 +528,10 @@ export declare const Draft: z.ZodObject<{
480
528
  residentialArea?: string | null | undefined;
481
529
  street?: string | null | undefined;
482
530
  zipCode?: string | null | undefined;
531
+ } | {
532
+ firstname: string;
533
+ surname: string;
534
+ middlename?: string | null | undefined;
483
535
  } | {
484
536
  country: string;
485
537
  district: string;
@@ -502,8 +554,8 @@ export declare const Draft: z.ZodObject<{
502
554
  option: string;
503
555
  filename: string;
504
556
  originalFilename: string;
505
- }[] | [string, string] | undefined> | undefined;
506
- originalActionId?: string | undefined;
557
+ }[] | [string, string] | null | undefined> | null | undefined;
558
+ originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
507
559
  };
508
560
  }, {
509
561
  id: string;
@@ -532,6 +584,10 @@ export declare const Draft: z.ZodObject<{
532
584
  residentialArea?: string | null | undefined;
533
585
  street?: string | null | undefined;
534
586
  zipCode?: string | null | undefined;
587
+ } | {
588
+ firstname: string;
589
+ surname: string;
590
+ middlename?: string | null | undefined;
535
591
  } | {
536
592
  country: string;
537
593
  district: string;
@@ -554,8 +610,9 @@ export declare const Draft: z.ZodObject<{
554
610
  option: string;
555
611
  filename: string;
556
612
  originalFilename: string;
557
- }[] | [string, string] | undefined>;
558
- createdAtLocation: string;
613
+ }[] | [string, string] | null | undefined>;
614
+ createdBySignature?: string | null | undefined;
615
+ createdAtLocation?: string | null | undefined;
559
616
  annotation?: Record<string, string | number | boolean | {
560
617
  type: string;
561
618
  filename: string;
@@ -571,6 +628,10 @@ export declare const Draft: z.ZodObject<{
571
628
  residentialArea?: string | null | undefined;
572
629
  street?: string | null | undefined;
573
630
  zipCode?: string | null | undefined;
631
+ } | {
632
+ firstname: string;
633
+ surname: string;
634
+ middlename?: string | null | undefined;
574
635
  } | {
575
636
  country: string;
576
637
  district: string;
@@ -593,12 +654,12 @@ export declare const Draft: z.ZodObject<{
593
654
  option: string;
594
655
  filename: string;
595
656
  originalFilename: string;
596
- }[] | [string, string] | undefined> | undefined;
597
- originalActionId?: string | undefined;
657
+ }[] | [string, string] | null | undefined> | null | undefined;
658
+ originalActionId?: string | null | undefined;
598
659
  };
599
660
  }>;
600
661
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
601
- eventId: z.ZodString;
662
+ eventId: z.ZodBranded<z.ZodString, "UUID">;
602
663
  transactionId: z.ZodString;
603
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<{
604
665
  filename: z.ZodString;
@@ -713,7 +774,19 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
713
774
  addressLine2?: string | null | undefined;
714
775
  addressLine3?: string | null | undefined;
715
776
  postcodeOrZip?: string | null | undefined;
716
- }>]>>>;
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]>]>>>;
717
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<{
718
791
  filename: z.ZodString;
719
792
  originalFilename: z.ZodString;
@@ -827,8 +900,20 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
827
900
  addressLine2?: string | null | undefined;
828
901
  addressLine3?: string | null | undefined;
829
902
  postcodeOrZip?: string | null | undefined;
830
- }>]>>>;
831
- originalActionId: z.ZodOptional<z.ZodString>;
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]>]>>>;
916
+ originalActionId: z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>;
832
917
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
833
918
  }, {
834
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"]>;
@@ -852,6 +937,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
852
937
  residentialArea?: string | null | undefined;
853
938
  street?: string | null | undefined;
854
939
  zipCode?: string | null | undefined;
940
+ } | {
941
+ firstname: string;
942
+ surname: string;
943
+ middlename?: string | null | undefined;
855
944
  } | {
856
945
  country: string;
857
946
  district: string;
@@ -874,8 +963,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
874
963
  option: string;
875
964
  filename: string;
876
965
  originalFilename: string;
877
- }[] | [string, string] | undefined>;
878
- eventId: string;
966
+ }[] | [string, string] | null | undefined>;
967
+ eventId: string & z.BRAND<"UUID">;
879
968
  annotation?: Record<string, string | number | boolean | {
880
969
  type: string;
881
970
  filename: string;
@@ -891,6 +980,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
891
980
  residentialArea?: string | null | undefined;
892
981
  street?: string | null | undefined;
893
982
  zipCode?: string | null | undefined;
983
+ } | {
984
+ firstname: string;
985
+ surname: string;
986
+ middlename?: string | null | undefined;
894
987
  } | {
895
988
  country: string;
896
989
  district: string;
@@ -913,8 +1006,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
913
1006
  option: string;
914
1007
  filename: string;
915
1008
  originalFilename: string;
916
- }[] | [string, string] | undefined> | undefined;
917
- originalActionId?: string | undefined;
1009
+ }[] | [string, string] | null | undefined> | undefined;
1010
+ originalActionId?: (string & z.BRAND<"UUID">) | undefined;
918
1011
  keepAssignment?: boolean | undefined;
919
1012
  }, {
920
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";
@@ -936,6 +1029,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
936
1029
  residentialArea?: string | null | undefined;
937
1030
  street?: string | null | undefined;
938
1031
  zipCode?: string | null | undefined;
1032
+ } | {
1033
+ firstname: string;
1034
+ surname: string;
1035
+ middlename?: string | null | undefined;
939
1036
  } | {
940
1037
  country: string;
941
1038
  district: string;
@@ -958,7 +1055,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
958
1055
  option: string;
959
1056
  filename: string;
960
1057
  originalFilename: string;
961
- }[] | [string, string] | undefined> | undefined;
1058
+ }[] | [string, string] | null | undefined> | undefined;
962
1059
  annotation?: Record<string, string | number | boolean | {
963
1060
  type: string;
964
1061
  filename: string;
@@ -974,6 +1071,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
974
1071
  residentialArea?: string | null | undefined;
975
1072
  street?: string | null | undefined;
976
1073
  zipCode?: string | null | undefined;
1074
+ } | {
1075
+ firstname: string;
1076
+ surname: string;
1077
+ middlename?: string | null | undefined;
977
1078
  } | {
978
1079
  country: string;
979
1080
  district: string;
@@ -996,7 +1097,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
996
1097
  option: string;
997
1098
  filename: string;
998
1099
  originalFilename: string;
999
- }[] | [string, string] | undefined> | undefined;
1100
+ }[] | [string, string] | null | undefined> | undefined;
1000
1101
  originalActionId?: string | undefined;
1001
1102
  keepAssignment?: boolean | undefined;
1002
1103
  }>;