@opencrvs/toolkit 1.8.0-rc.f988087 → 1.8.0-rc.fa72fdf

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.
@@ -96,7 +96,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
96
96
  draft?: boolean | undefined;
97
97
  } | {
98
98
  type: "REJECT";
99
- comment: string;
100
99
  conditionals: ({
101
100
  type: "SHOW";
102
101
  conditional: import("../commons").JSONSchema;
@@ -122,11 +121,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
122
121
  fields: import("../commons").Inferred[];
123
122
  };
124
123
  }[];
125
- isDuplicate: boolean;
126
124
  draft?: boolean | undefined;
127
125
  } | {
128
126
  type: "MARKED_AS_DUPLICATE";
129
- comment: string;
130
127
  conditionals: ({
131
128
  type: "SHOW";
132
129
  conditional: import("../commons").JSONSchema;
@@ -152,11 +149,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
152
149
  fields: import("../commons").Inferred[];
153
150
  };
154
151
  }[];
155
- duplicates: string[];
156
152
  draft?: boolean | undefined;
157
153
  } | {
158
- type: "ARCHIVED";
159
- comment: string;
154
+ type: "ARCHIVE";
160
155
  conditionals: ({
161
156
  type: "SHOW";
162
157
  conditional: import("../commons").JSONSchema;
@@ -182,7 +177,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
182
177
  fields: import("../commons").Inferred[];
183
178
  };
184
179
  }[];
185
- isDuplicate: boolean;
186
180
  draft?: boolean | undefined;
187
181
  } | {
188
182
  type: "REGISTER";
@@ -851,7 +845,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
851
845
  originalFilename: string;
852
846
  }[]> | undefined;
853
847
  } | {
854
- type: "ARCHIVED";
848
+ type: "ARCHIVE";
855
849
  id: string;
856
850
  data: Record<string, string | number | boolean | {
857
851
  type: string;
@@ -1739,7 +1733,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1739
1733
  originalFilename: string;
1740
1734
  }[]> | undefined;
1741
1735
  } | {
1742
- type: "ARCHIVED";
1736
+ type: "ARCHIVE";
1743
1737
  id: string;
1744
1738
  data: Record<string, string | number | boolean | {
1745
1739
  type: string;
@@ -2351,7 +2345,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2351
2345
  filename: string;
2352
2346
  originalFilename: string;
2353
2347
  }[]> | undefined;
2354
- incomplete?: boolean | undefined;
2355
2348
  };
2356
2349
  output: {
2357
2350
  id: string;
@@ -2459,7 +2452,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2459
2452
  filename: string;
2460
2453
  originalFilename: string;
2461
2454
  }[]>;
2462
- createdAtLocation: string;
2463
2455
  eventId: string;
2464
2456
  transactionId: string;
2465
2457
  type?: "NOTIFY" | undefined;
@@ -2489,7 +2481,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2489
2481
  filename: string;
2490
2482
  originalFilename: string;
2491
2483
  }[]> | undefined;
2492
- incomplete?: boolean | undefined;
2493
2484
  };
2494
2485
  output: {
2495
2486
  type: string;
@@ -2909,7 +2900,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2909
2900
  originalFilename: string;
2910
2901
  }[]> | undefined;
2911
2902
  } | {
2912
- type: "ARCHIVED";
2903
+ type: "ARCHIVE";
2913
2904
  id: string;
2914
2905
  data: Record<string, string | number | boolean | {
2915
2906
  type: string;
@@ -3434,7 +3425,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
3434
3425
  filename: string;
3435
3426
  originalFilename: string;
3436
3427
  }[]> | undefined;
3437
- incomplete?: boolean | undefined;
3438
3428
  };
3439
3429
  output: {
3440
3430
  type: string;
@@ -3854,7 +3844,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
3854
3844
  originalFilename: string;
3855
3845
  }[]> | undefined;
3856
3846
  } | {
3857
- type: "ARCHIVED";
3847
+ type: "ARCHIVE";
3858
3848
  id: string;
3859
3849
  data: Record<string, string | number | boolean | {
3860
3850
  type: string;
@@ -4350,9 +4340,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
4350
4340
  filename: string;
4351
4341
  originalFilename: string;
4352
4342
  }[]>;
4353
- duplicates: string[];
4354
4343
  eventId: string;
4355
4344
  transactionId: string;
4345
+ duplicates: string[];
4356
4346
  type?: "VALIDATE" | undefined;
4357
4347
  metadata?: Record<string, string | number | boolean | {
4358
4348
  type: string;
@@ -4380,7 +4370,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
4380
4370
  filename: string;
4381
4371
  originalFilename: string;
4382
4372
  }[]> | undefined;
4383
- incomplete?: boolean | undefined;
4384
4373
  };
4385
4374
  output: {
4386
4375
  type: string;
@@ -4800,7 +4789,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
4800
4789
  originalFilename: string;
4801
4790
  }[]> | undefined;
4802
4791
  } | {
4803
- type: "ARCHIVED";
4792
+ type: "ARCHIVE";
4804
4793
  id: string;
4805
4794
  data: Record<string, string | number | boolean | {
4806
4795
  type: string;
@@ -5325,7 +5314,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
5325
5314
  filename: string;
5326
5315
  originalFilename: string;
5327
5316
  }[]> | undefined;
5328
- incomplete?: boolean | undefined;
5329
5317
  };
5330
5318
  output: {
5331
5319
  type: string;
@@ -5745,7 +5733,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
5745
5733
  originalFilename: string;
5746
5734
  }[]> | undefined;
5747
5735
  } | {
5748
- type: "ARCHIVED";
5736
+ type: "ARCHIVE";
5749
5737
  id: string;
5750
5738
  data: Record<string, string | number | boolean | {
5751
5739
  type: string;
@@ -6243,7 +6231,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
6243
6231
  }[]>;
6244
6232
  eventId: string;
6245
6233
  transactionId: string;
6246
- type?: "ARCHIVED" | undefined;
6234
+ type?: "ARCHIVE" | undefined;
6247
6235
  metadata?: Record<string, string | number | boolean | {
6248
6236
  type: string;
6249
6237
  filename: string;
@@ -6270,7 +6258,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
6270
6258
  filename: string;
6271
6259
  originalFilename: string;
6272
6260
  }[]> | undefined;
6273
- incomplete?: boolean | undefined;
6274
6261
  };
6275
6262
  output: {
6276
6263
  type: string;
@@ -6690,7 +6677,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
6690
6677
  originalFilename: string;
6691
6678
  }[]> | undefined;
6692
6679
  } | {
6693
- type: "ARCHIVED";
6680
+ type: "ARCHIVE";
6694
6681
  id: string;
6695
6682
  data: Record<string, string | number | boolean | {
6696
6683
  type: string;
@@ -7215,7 +7202,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
7215
7202
  filename: string;
7216
7203
  originalFilename: string;
7217
7204
  }[]> | undefined;
7218
- incomplete?: boolean | undefined;
7219
7205
  };
7220
7206
  output: {
7221
7207
  type: string;
@@ -7635,7 +7621,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
7635
7621
  originalFilename: string;
7636
7622
  }[]> | undefined;
7637
7623
  } | {
7638
- type: "ARCHIVED";
7624
+ type: "ARCHIVE";
7639
7625
  id: string;
7640
7626
  data: Record<string, string | number | boolean | {
7641
7627
  type: string;
@@ -8160,7 +8146,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
8160
8146
  filename: string;
8161
8147
  originalFilename: string;
8162
8148
  }[]> | undefined;
8163
- incomplete?: boolean | undefined;
8164
8149
  };
8165
8150
  output: {
8166
8151
  type: string;
@@ -8580,7 +8565,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
8580
8565
  originalFilename: string;
8581
8566
  }[]> | undefined;
8582
8567
  } | {
8583
- type: "ARCHIVED";
8568
+ type: "ARCHIVE";
8584
8569
  id: string;
8585
8570
  data: Record<string, string | number | boolean | {
8586
8571
  type: string;
@@ -9117,7 +9102,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
9117
9102
  filename: string;
9118
9103
  originalFilename: string;
9119
9104
  }[]> | undefined;
9120
- incomplete?: boolean | undefined;
9121
9105
  };
9122
9106
  output: {
9123
9107
  type: string;
@@ -9537,7 +9521,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
9537
9521
  originalFilename: string;
9538
9522
  }[]> | undefined;
9539
9523
  } | {
9540
- type: "ARCHIVED";
9524
+ type: "ARCHIVE";
9541
9525
  id: string;
9542
9526
  data: Record<string, string | number | boolean | {
9543
9527
  type: string;
@@ -10063,7 +10047,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
10063
10047
  filename: string;
10064
10048
  originalFilename: string;
10065
10049
  }[]> | undefined;
10066
- incomplete?: boolean | undefined;
10067
10050
  };
10068
10051
  output: {
10069
10052
  type: string;
@@ -10483,7 +10466,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
10483
10466
  originalFilename: string;
10484
10467
  }[]> | undefined;
10485
10468
  } | {
10486
- type: "ARCHIVED";
10469
+ type: "ARCHIVE";
10487
10470
  id: string;
10488
10471
  data: Record<string, string | number | boolean | {
10489
10472
  type: string;
@@ -11009,7 +10992,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
11009
10992
  filename: string;
11010
10993
  originalFilename: string;
11011
10994
  }[]> | undefined;
11012
- incomplete?: boolean | undefined;
11013
10995
  };
11014
10996
  output: {
11015
10997
  type: string;
@@ -11429,7 +11411,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
11429
11411
  originalFilename: string;
11430
11412
  }[]> | undefined;
11431
11413
  } | {
11432
- type: "ARCHIVED";
11414
+ type: "ARCHIVE";
11433
11415
  id: string;
11434
11416
  data: Record<string, string | number | boolean | {
11435
11417
  type: string;
@@ -12375,7 +12357,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
12375
12357
  originalFilename: string;
12376
12358
  }[]> | undefined;
12377
12359
  } | {
12378
- type: "ARCHIVED";
12360
+ type: "ARCHIVE";
12379
12361
  id: string;
12380
12362
  data: Record<string, string | number | boolean | {
12381
12363
  type: string;
@@ -6,6 +6,33 @@ import { TranslationConfig } from '../events/TranslationConfig';
6
6
  export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
7
7
  export declare function isFieldVisible(field: FieldConfig, form: ActionUpdate | EventState): boolean;
8
8
  export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState): boolean;
9
+ export declare const errorMessages: {
10
+ hiddenField: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ description: string;
14
+ };
15
+ invalidDate: {
16
+ defaultMessage: string;
17
+ description: string;
18
+ id: string;
19
+ };
20
+ invalidEmail: {
21
+ defaultMessage: string;
22
+ description: string;
23
+ id: string;
24
+ };
25
+ requiredField: {
26
+ defaultMessage: string;
27
+ description: string;
28
+ id: string;
29
+ };
30
+ invalidInput: {
31
+ defaultMessage: string;
32
+ description: string;
33
+ id: string;
34
+ };
35
+ };
9
36
  /**
10
37
  * Custom error map for Zod to override the default error messages in intl-formik format.
11
38
  */
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validate.test.d.ts.map
@@ -791,11 +791,8 @@ declare const RejectDeclarationConfig: z.ZodObject<z.objectUtil.extendShape<{
791
791
  }>, "many">;
792
792
  }, {
793
793
  type: z.ZodLiteral<"REJECT">;
794
- comment: z.ZodString;
795
- isDuplicate: z.ZodBoolean;
796
794
  }>, "strip", z.ZodTypeAny, {
797
795
  type: "REJECT";
798
- comment: string;
799
796
  conditionals: ({
800
797
  type: "SHOW";
801
798
  conditional: import(".").JSONSchema;
@@ -821,11 +818,9 @@ declare const RejectDeclarationConfig: z.ZodObject<z.objectUtil.extendShape<{
821
818
  fields: import("./FieldConfig").Inferred[];
822
819
  };
823
820
  }[];
824
- isDuplicate: boolean;
825
821
  draft?: boolean | undefined;
826
822
  }, {
827
823
  type: "REJECT";
828
- comment: string;
829
824
  label: {
830
825
  id: string;
831
826
  description: string;
@@ -864,7 +859,6 @@ declare const RejectDeclarationConfig: z.ZodObject<z.objectUtil.extendShape<{
864
859
  };
865
860
  active?: boolean | undefined;
866
861
  }[];
867
- isDuplicate: boolean;
868
862
  draft?: boolean | undefined;
869
863
  conditionals?: ({
870
864
  type: "SHOW";
@@ -1015,11 +1009,8 @@ declare const MarkedAsDuplicateConfig: z.ZodObject<z.objectUtil.extendShape<{
1015
1009
  }>, "many">;
1016
1010
  }, {
1017
1011
  type: z.ZodLiteral<"MARKED_AS_DUPLICATE">;
1018
- comment: z.ZodString;
1019
- duplicates: z.ZodArray<z.ZodString, "many">;
1020
1012
  }>, "strip", z.ZodTypeAny, {
1021
1013
  type: "MARKED_AS_DUPLICATE";
1022
- comment: string;
1023
1014
  conditionals: ({
1024
1015
  type: "SHOW";
1025
1016
  conditional: import(".").JSONSchema;
@@ -1045,11 +1036,9 @@ declare const MarkedAsDuplicateConfig: z.ZodObject<z.objectUtil.extendShape<{
1045
1036
  fields: import("./FieldConfig").Inferred[];
1046
1037
  };
1047
1038
  }[];
1048
- duplicates: string[];
1049
1039
  draft?: boolean | undefined;
1050
1040
  }, {
1051
1041
  type: "MARKED_AS_DUPLICATE";
1052
- comment: string;
1053
1042
  label: {
1054
1043
  id: string;
1055
1044
  description: string;
@@ -1088,7 +1077,6 @@ declare const MarkedAsDuplicateConfig: z.ZodObject<z.objectUtil.extendShape<{
1088
1077
  };
1089
1078
  active?: boolean | undefined;
1090
1079
  }[];
1091
- duplicates: string[];
1092
1080
  draft?: boolean | undefined;
1093
1081
  conditionals?: ({
1094
1082
  type: "SHOW";
@@ -1098,7 +1086,7 @@ declare const MarkedAsDuplicateConfig: z.ZodObject<z.objectUtil.extendShape<{
1098
1086
  conditional: import(".").JSONSchema;
1099
1087
  })[] | undefined;
1100
1088
  }>;
1101
- declare const ArchivedConfig: z.ZodObject<z.objectUtil.extendShape<{
1089
+ declare const ArchiveConfig: z.ZodObject<z.objectUtil.extendShape<{
1102
1090
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
1103
1091
  id: string;
1104
1092
  description: string;
@@ -1238,12 +1226,9 @@ declare const ArchivedConfig: z.ZodObject<z.objectUtil.extendShape<{
1238
1226
  active?: boolean | undefined;
1239
1227
  }>, "many">;
1240
1228
  }, {
1241
- type: z.ZodLiteral<"ARCHIVED">;
1242
- comment: z.ZodString;
1243
- isDuplicate: z.ZodBoolean;
1229
+ type: z.ZodLiteral<"ARCHIVE">;
1244
1230
  }>, "strip", z.ZodTypeAny, {
1245
- type: "ARCHIVED";
1246
- comment: string;
1231
+ type: "ARCHIVE";
1247
1232
  conditionals: ({
1248
1233
  type: "SHOW";
1249
1234
  conditional: import(".").JSONSchema;
@@ -1269,11 +1254,9 @@ declare const ArchivedConfig: z.ZodObject<z.objectUtil.extendShape<{
1269
1254
  fields: import("./FieldConfig").Inferred[];
1270
1255
  };
1271
1256
  }[];
1272
- isDuplicate: boolean;
1273
1257
  draft?: boolean | undefined;
1274
1258
  }, {
1275
- type: "ARCHIVED";
1276
- comment: string;
1259
+ type: "ARCHIVE";
1277
1260
  label: {
1278
1261
  id: string;
1279
1262
  description: string;
@@ -1312,7 +1295,6 @@ declare const ArchivedConfig: z.ZodObject<z.objectUtil.extendShape<{
1312
1295
  };
1313
1296
  active?: boolean | undefined;
1314
1297
  }[];
1315
- isDuplicate: boolean;
1316
1298
  draft?: boolean | undefined;
1317
1299
  conditionals?: ({
1318
1300
  type: "SHOW";
@@ -2919,9 +2901,9 @@ declare const CustomConfig: z.ZodObject<z.objectUtil.extendShape<{
2919
2901
  })[] | undefined;
2920
2902
  }>;
2921
2903
  /** @knipignore */
2922
- export type AllActionConfigFields = typeof DeclareConfig | typeof ValidateConfig | typeof RejectDeclarationConfig | typeof MarkedAsDuplicateConfig | typeof ArchivedConfig | typeof RegisterConfig | typeof DeleteConfig | typeof PrintCertificateActionConfig | typeof RequestCorrectionConfig | typeof RejectCorrectionConfig | typeof ApproveCorrectionConfig | typeof CustomConfig;
2904
+ export type AllActionConfigFields = typeof DeclareConfig | typeof ValidateConfig | typeof RejectDeclarationConfig | typeof MarkedAsDuplicateConfig | typeof ArchiveConfig | typeof RegisterConfig | typeof DeleteConfig | typeof PrintCertificateActionConfig | typeof RequestCorrectionConfig | typeof RejectCorrectionConfig | typeof ApproveCorrectionConfig | typeof CustomConfig;
2923
2905
  /** @knipignore */
2924
- export type InferredActionConfig = z.infer<typeof DeclareConfig> | z.infer<typeof ValidateConfig> | z.infer<typeof RejectDeclarationConfig> | z.infer<typeof MarkedAsDuplicateConfig> | z.infer<typeof ArchivedConfig> | z.infer<typeof RegisterConfig> | z.infer<typeof DeleteConfig> | z.infer<typeof PrintCertificateActionConfig> | z.infer<typeof RequestCorrectionConfig> | z.infer<typeof RejectCorrectionConfig> | z.infer<typeof ApproveCorrectionConfig> | z.infer<typeof CustomConfig>;
2906
+ export type InferredActionConfig = z.infer<typeof DeclareConfig> | z.infer<typeof ValidateConfig> | z.infer<typeof RejectDeclarationConfig> | z.infer<typeof MarkedAsDuplicateConfig> | z.infer<typeof ArchiveConfig> | z.infer<typeof RegisterConfig> | z.infer<typeof DeleteConfig> | z.infer<typeof PrintCertificateActionConfig> | z.infer<typeof RequestCorrectionConfig> | z.infer<typeof RejectCorrectionConfig> | z.infer<typeof ApproveCorrectionConfig> | z.infer<typeof CustomConfig>;
2925
2907
  export declare const ActionConfig: z.ZodDiscriminatedUnion<"type", AllActionConfigFields[]>;
2926
2908
  export type ActionConfig = InferredActionConfig;
2927
2909
  export {};
@@ -1921,9 +1921,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
1921
1921
  }>]>>>;
1922
1922
  createdAtLocation: z.ZodString;
1923
1923
  }, {
1924
- type: z.ZodLiteral<"ARCHIVED">;
1924
+ type: z.ZodLiteral<"ARCHIVE">;
1925
1925
  }>, "strip", z.ZodTypeAny, {
1926
- type: "ARCHIVED";
1926
+ type: "ARCHIVE";
1927
1927
  id: string;
1928
1928
  data: Record<string, string | number | boolean | {
1929
1929
  type: string;
@@ -1981,7 +1981,7 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
1981
1981
  originalFilename: string;
1982
1982
  }[]> | undefined;
1983
1983
  }, {
1984
- type: "ARCHIVED";
1984
+ type: "ARCHIVE";
1985
1985
  id: string;
1986
1986
  data: Record<string, string | number | boolean | {
1987
1987
  type: string;