@opencrvs/toolkit 1.8.0-rc.f876361 → 1.8.0-rc.f881988

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 (36) hide show
  1. package/dist/commons/api/router.d.ts +7334 -1430
  2. package/dist/commons/conditionals/conditionals.d.ts +23 -13
  3. package/dist/commons/conditionals/validate.d.ts +12 -17
  4. package/dist/commons/events/ActionConfig.d.ts +86380 -1682
  5. package/dist/commons/events/ActionDocument.d.ts +420 -103
  6. package/dist/commons/events/ActionInput.d.ts +1135 -232
  7. package/dist/commons/events/ActionType.d.ts +5 -3
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +371 -25
  9. package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
  10. package/dist/commons/events/Conditional.d.ts +21 -5
  11. package/dist/commons/events/Draft.d.ts +37 -15
  12. package/dist/commons/events/EventConfig.d.ts +41061 -1337
  13. package/dist/commons/events/EventDocument.d.ts +334 -77
  14. package/dist/commons/events/EventIndex.d.ts +915 -4
  15. package/dist/commons/events/EventInput.d.ts +13 -0
  16. package/dist/commons/events/EventMetadata.d.ts +13 -3
  17. package/dist/commons/events/FieldConfig.d.ts +3628 -745
  18. package/dist/commons/events/FieldType.d.ts +1 -2
  19. package/dist/commons/events/FieldValue.d.ts +1 -1
  20. package/dist/commons/events/FormConfig.d.ts +38845 -517
  21. package/dist/commons/events/PageConfig.d.ts +9655 -211
  22. package/dist/commons/events/SummaryConfig.d.ts +81 -42
  23. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  24. package/dist/commons/events/User.d.ts +5 -0
  25. package/dist/commons/events/WorkqueueConfig.d.ts +44 -20
  26. package/dist/commons/events/defineConfig.d.ts +6681 -31
  27. package/dist/commons/events/event.d.ts +25 -0
  28. package/dist/commons/events/field.d.ts +68 -0
  29. package/dist/commons/events/index.d.ts +3 -0
  30. package/dist/commons/events/scopes.d.ts +26 -0
  31. package/dist/commons/events/test.utils.d.ts +20 -149
  32. package/dist/commons/events/utils.d.ts +3417 -97
  33. package/dist/commons/events/utils.test.d.ts +2 -0
  34. package/dist/conditionals/index.js +164 -181
  35. package/dist/events/index.js +1336 -889
  36. package/package.json +3 -2
@@ -6,8 +6,10 @@ export declare const Draft: z.ZodObject<{
6
6
  createdAt: z.ZodString;
7
7
  action: z.ZodObject<Omit<z.objectUtil.extendShape<{
8
8
  id: z.ZodString;
9
+ transactionId: z.ZodString;
9
10
  createdAt: z.ZodString;
10
11
  createdBy: z.ZodString;
12
+ createdByRole: z.ZodString;
11
13
  declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
12
14
  filename: z.ZodString;
13
15
  originalFilename: z.ZodString;
@@ -236,15 +238,19 @@ export declare const Draft: z.ZodObject<{
236
238
  addressLine3?: string | null | undefined;
237
239
  postcodeOrZip?: string | null | undefined;
238
240
  }>]>>>;
239
- createdAtLocation: z.ZodString;
241
+ createdAtLocation: z.ZodOptional<z.ZodString>;
242
+ updatedAtLocation: z.ZodOptional<z.ZodString>;
240
243
  status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
241
244
  originalActionId: z.ZodOptional<z.ZodString>;
242
245
  }, {
243
246
  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"]>;
244
- }>, "id" | "status">, "strip", z.ZodTypeAny, {
247
+ }>, "id">, "strip", z.ZodTypeAny, {
245
248
  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";
249
+ status: "Rejected" | "Requested" | "Accepted";
250
+ transactionId: string;
246
251
  createdAt: string;
247
252
  createdBy: string;
253
+ createdByRole: string;
248
254
  declaration: Record<string, string | number | boolean | {
249
255
  type: string;
250
256
  filename: string;
@@ -283,7 +289,6 @@ export declare const Draft: z.ZodObject<{
283
289
  filename: string;
284
290
  originalFilename: string;
285
291
  }[] | undefined>;
286
- createdAtLocation: string;
287
292
  annotation?: Record<string, string | number | boolean | {
288
293
  type: string;
289
294
  filename: string;
@@ -322,11 +327,16 @@ export declare const Draft: z.ZodObject<{
322
327
  filename: string;
323
328
  originalFilename: string;
324
329
  }[] | undefined> | undefined;
330
+ createdAtLocation?: string | undefined;
331
+ updatedAtLocation?: string | undefined;
325
332
  originalActionId?: string | undefined;
326
333
  }, {
327
334
  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";
335
+ status: "Rejected" | "Requested" | "Accepted";
336
+ transactionId: string;
328
337
  createdAt: string;
329
338
  createdBy: string;
339
+ createdByRole: string;
330
340
  declaration: Record<string, string | number | boolean | {
331
341
  type: string;
332
342
  filename: string;
@@ -365,7 +375,6 @@ export declare const Draft: z.ZodObject<{
365
375
  filename: string;
366
376
  originalFilename: string;
367
377
  }[] | undefined>;
368
- createdAtLocation: string;
369
378
  annotation?: Record<string, string | number | boolean | {
370
379
  type: string;
371
380
  filename: string;
@@ -404,17 +413,22 @@ export declare const Draft: z.ZodObject<{
404
413
  filename: string;
405
414
  originalFilename: string;
406
415
  }[] | undefined> | undefined;
416
+ createdAtLocation?: string | undefined;
417
+ updatedAtLocation?: string | undefined;
407
418
  originalActionId?: string | undefined;
408
419
  }>;
409
420
  }, "strip", z.ZodTypeAny, {
410
421
  id: string;
422
+ transactionId: string;
411
423
  createdAt: string;
412
424
  eventId: string;
413
- transactionId: string;
414
425
  action: {
415
426
  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";
427
+ status: "Rejected" | "Requested" | "Accepted";
428
+ transactionId: string;
416
429
  createdAt: string;
417
430
  createdBy: string;
431
+ createdByRole: string;
418
432
  declaration: Record<string, string | number | boolean | {
419
433
  type: string;
420
434
  filename: string;
@@ -453,7 +467,6 @@ export declare const Draft: z.ZodObject<{
453
467
  filename: string;
454
468
  originalFilename: string;
455
469
  }[] | undefined>;
456
- createdAtLocation: string;
457
470
  annotation?: Record<string, string | number | boolean | {
458
471
  type: string;
459
472
  filename: string;
@@ -492,17 +505,22 @@ export declare const Draft: z.ZodObject<{
492
505
  filename: string;
493
506
  originalFilename: string;
494
507
  }[] | undefined> | undefined;
508
+ createdAtLocation?: string | undefined;
509
+ updatedAtLocation?: string | undefined;
495
510
  originalActionId?: string | undefined;
496
511
  };
497
512
  }, {
498
513
  id: string;
514
+ transactionId: string;
499
515
  createdAt: string;
500
516
  eventId: string;
501
- transactionId: string;
502
517
  action: {
503
518
  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";
519
+ status: "Rejected" | "Requested" | "Accepted";
520
+ transactionId: string;
504
521
  createdAt: string;
505
522
  createdBy: string;
523
+ createdByRole: string;
506
524
  declaration: Record<string, string | number | boolean | {
507
525
  type: string;
508
526
  filename: string;
@@ -541,7 +559,6 @@ export declare const Draft: z.ZodObject<{
541
559
  filename: string;
542
560
  originalFilename: string;
543
561
  }[] | undefined>;
544
- createdAtLocation: string;
545
562
  annotation?: Record<string, string | number | boolean | {
546
563
  type: string;
547
564
  filename: string;
@@ -580,13 +597,15 @@ export declare const Draft: z.ZodObject<{
580
597
  filename: string;
581
598
  originalFilename: string;
582
599
  }[] | undefined> | undefined;
600
+ createdAtLocation?: string | undefined;
601
+ updatedAtLocation?: string | undefined;
583
602
  originalActionId?: string | undefined;
584
603
  };
585
604
  }>;
586
605
  export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
587
606
  eventId: z.ZodString;
588
607
  transactionId: z.ZodString;
589
- declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
608
+ declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
590
609
  filename: z.ZodString;
591
610
  originalFilename: z.ZodString;
592
611
  type: z.ZodString;
@@ -699,7 +718,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
699
718
  addressLine2?: string | null | undefined;
700
719
  addressLine3?: string | null | undefined;
701
720
  postcodeOrZip?: string | null | undefined;
702
- }>]>>;
721
+ }>]>>>;
703
722
  annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
704
723
  filename: z.ZodString;
705
724
  originalFilename: z.ZodString;
@@ -815,10 +834,12 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
815
834
  postcodeOrZip?: string | null | undefined;
816
835
  }>]>>>;
817
836
  originalActionId: z.ZodOptional<z.ZodString>;
837
+ keepAssignment: z.ZodOptional<z.ZodBoolean>;
818
838
  }, {
819
839
  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"]>;
820
840
  }>, "strip", z.ZodTypeAny, {
821
841
  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";
842
+ transactionId: string;
822
843
  declaration: Record<string, string | number | boolean | {
823
844
  type: string;
824
845
  filename: string;
@@ -858,7 +879,6 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
858
879
  originalFilename: string;
859
880
  }[] | undefined>;
860
881
  eventId: string;
861
- transactionId: string;
862
882
  annotation?: Record<string, string | number | boolean | {
863
883
  type: string;
864
884
  filename: string;
@@ -898,9 +918,12 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
898
918
  originalFilename: string;
899
919
  }[] | undefined> | undefined;
900
920
  originalActionId?: string | undefined;
921
+ keepAssignment?: boolean | undefined;
901
922
  }, {
902
923
  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";
903
- declaration: Record<string, string | number | boolean | {
924
+ transactionId: string;
925
+ eventId: string;
926
+ declaration?: Record<string, string | number | boolean | {
904
927
  type: string;
905
928
  filename: string;
906
929
  originalFilename: string;
@@ -937,9 +960,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
937
960
  option: string;
938
961
  filename: string;
939
962
  originalFilename: string;
940
- }[] | undefined>;
941
- eventId: string;
942
- transactionId: string;
963
+ }[] | undefined> | undefined;
943
964
  annotation?: Record<string, string | number | boolean | {
944
965
  type: string;
945
966
  filename: string;
@@ -979,6 +1000,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
979
1000
  originalFilename: string;
980
1001
  }[] | undefined> | undefined;
981
1002
  originalActionId?: string | undefined;
1003
+ keepAssignment?: boolean | undefined;
982
1004
  }>;
983
1005
  export type Draft = z.infer<typeof Draft>;
984
1006
  export type DraftInput = z.infer<typeof DraftInput>;