@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.fd6feaa
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.
- package/dist/commons/api/router.d.ts +6267 -2532
- package/dist/commons/conditionals/conditionals.d.ts +2 -2
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +33 -6
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +6 -24
- package/dist/commons/events/ActionDocument.d.ts +2747 -1183
- package/dist/commons/events/ActionInput.d.ts +4120 -1864
- package/dist/commons/events/ActionType.d.ts +1 -1
- package/dist/commons/events/CompositeFieldValue.d.ts +374 -0
- package/dist/commons/events/Draft.d.ts +376 -163
- package/dist/commons/events/EventConfig.d.ts +4 -28
- package/dist/commons/events/EventDocument.d.ts +3275 -1385
- package/dist/commons/events/EventIndex.d.ts +3 -3
- package/dist/commons/events/EventMetadata.d.ts +3 -3
- package/dist/commons/events/FieldConfig.d.ts +51 -3
- package/dist/commons/events/FieldType.d.ts +4 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +226 -40
- package/dist/commons/events/FieldValue.d.ts +119 -68
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/defineConfig.d.ts +1 -7
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +183 -69
- package/dist/commons/events/utils.d.ts +114 -3
- package/dist/events/index.js +750 -489
- package/package.json +1 -1
@@ -18,7 +18,7 @@ export declare const ActionType: {
|
|
18
18
|
readonly CUSTOM: "CUSTOM";
|
19
19
|
readonly REJECT: "REJECT";
|
20
20
|
readonly MARKED_AS_DUPLICATE: "MARKED_AS_DUPLICATE";
|
21
|
-
readonly
|
21
|
+
readonly ARCHIVE: "ARCHIVE";
|
22
22
|
};
|
23
23
|
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
|
24
24
|
//# sourceMappingURL=ActionType.d.ts.map
|
@@ -0,0 +1,374 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
/**
|
3
|
+
* Composite field value consists of multiple field values.
|
4
|
+
*/
|
5
|
+
export declare const GeographicalArea: {
|
6
|
+
readonly URBAN: "URBAN";
|
7
|
+
readonly RURAL: "RURAL";
|
8
|
+
};
|
9
|
+
export declare const FileFieldValue: z.ZodObject<{
|
10
|
+
filename: z.ZodString;
|
11
|
+
originalFilename: z.ZodString;
|
12
|
+
type: z.ZodString;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
type: string;
|
15
|
+
filename: string;
|
16
|
+
originalFilename: string;
|
17
|
+
}, {
|
18
|
+
type: string;
|
19
|
+
filename: string;
|
20
|
+
originalFilename: string;
|
21
|
+
}>;
|
22
|
+
export type FileFieldValue = z.infer<typeof FileFieldValue>;
|
23
|
+
export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
24
|
+
country: z.ZodLiteral<string>;
|
25
|
+
province: z.ZodString;
|
26
|
+
district: z.ZodString;
|
27
|
+
}, {
|
28
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
29
|
+
town: z.ZodOptional<z.ZodString>;
|
30
|
+
residentialArea: z.ZodOptional<z.ZodString>;
|
31
|
+
street: z.ZodOptional<z.ZodString>;
|
32
|
+
number: z.ZodOptional<z.ZodString>;
|
33
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
34
|
+
}>, "strip", z.ZodTypeAny, {
|
35
|
+
country: string;
|
36
|
+
district: string;
|
37
|
+
province: string;
|
38
|
+
urbanOrRural: "URBAN";
|
39
|
+
number?: string | undefined;
|
40
|
+
town?: string | undefined;
|
41
|
+
residentialArea?: string | undefined;
|
42
|
+
street?: string | undefined;
|
43
|
+
zipCode?: string | undefined;
|
44
|
+
}, {
|
45
|
+
country: string;
|
46
|
+
district: string;
|
47
|
+
province: string;
|
48
|
+
urbanOrRural: "URBAN";
|
49
|
+
number?: string | undefined;
|
50
|
+
town?: string | undefined;
|
51
|
+
residentialArea?: string | undefined;
|
52
|
+
street?: string | undefined;
|
53
|
+
zipCode?: string | undefined;
|
54
|
+
}>;
|
55
|
+
export declare const RuralAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
56
|
+
country: z.ZodLiteral<string>;
|
57
|
+
province: z.ZodString;
|
58
|
+
district: z.ZodString;
|
59
|
+
}, {
|
60
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
61
|
+
village: z.ZodOptional<z.ZodString>;
|
62
|
+
}>, "strip", z.ZodTypeAny, {
|
63
|
+
country: string;
|
64
|
+
district: string;
|
65
|
+
province: string;
|
66
|
+
urbanOrRural: "RURAL";
|
67
|
+
village?: string | undefined;
|
68
|
+
}, {
|
69
|
+
country: string;
|
70
|
+
district: string;
|
71
|
+
province: string;
|
72
|
+
urbanOrRural: "RURAL";
|
73
|
+
village?: string | undefined;
|
74
|
+
}>;
|
75
|
+
export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
76
|
+
country: z.ZodLiteral<string>;
|
77
|
+
province: z.ZodString;
|
78
|
+
district: z.ZodString;
|
79
|
+
}, {
|
80
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
81
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
82
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
83
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
84
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
85
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
86
|
+
}>, "strip", z.ZodTypeAny, {
|
87
|
+
country: string;
|
88
|
+
district: string;
|
89
|
+
province: string;
|
90
|
+
urbanOrRural: "URBAN";
|
91
|
+
number?: string | null | undefined;
|
92
|
+
town?: string | null | undefined;
|
93
|
+
residentialArea?: string | null | undefined;
|
94
|
+
street?: string | null | undefined;
|
95
|
+
zipCode?: string | null | undefined;
|
96
|
+
}, {
|
97
|
+
country: string;
|
98
|
+
district: string;
|
99
|
+
province: string;
|
100
|
+
urbanOrRural: "URBAN";
|
101
|
+
number?: string | null | undefined;
|
102
|
+
town?: string | null | undefined;
|
103
|
+
residentialArea?: string | null | undefined;
|
104
|
+
street?: string | null | undefined;
|
105
|
+
zipCode?: string | null | undefined;
|
106
|
+
}>;
|
107
|
+
export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
108
|
+
country: z.ZodLiteral<string>;
|
109
|
+
province: z.ZodString;
|
110
|
+
district: z.ZodString;
|
111
|
+
}, {
|
112
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
113
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
114
|
+
}>, "strip", z.ZodTypeAny, {
|
115
|
+
country: string;
|
116
|
+
district: string;
|
117
|
+
province: string;
|
118
|
+
urbanOrRural: "RURAL";
|
119
|
+
village?: string | null | undefined;
|
120
|
+
}, {
|
121
|
+
country: string;
|
122
|
+
district: string;
|
123
|
+
province: string;
|
124
|
+
urbanOrRural: "RURAL";
|
125
|
+
village?: string | null | undefined;
|
126
|
+
}>;
|
127
|
+
export declare const GenericAddressValue: z.ZodObject<{
|
128
|
+
country: z.ZodEffects<z.ZodString, string, string>;
|
129
|
+
state: z.ZodString;
|
130
|
+
district2: z.ZodString;
|
131
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
132
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
133
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
134
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
135
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
137
|
+
country: string;
|
138
|
+
state: string;
|
139
|
+
district2: string;
|
140
|
+
cityOrTown?: string | undefined;
|
141
|
+
addressLine1?: string | undefined;
|
142
|
+
addressLine2?: string | undefined;
|
143
|
+
addressLine3?: string | undefined;
|
144
|
+
postcodeOrZip?: string | undefined;
|
145
|
+
}, {
|
146
|
+
country: string;
|
147
|
+
state: string;
|
148
|
+
district2: string;
|
149
|
+
cityOrTown?: string | undefined;
|
150
|
+
addressLine1?: string | undefined;
|
151
|
+
addressLine2?: string | undefined;
|
152
|
+
addressLine3?: string | undefined;
|
153
|
+
postcodeOrZip?: string | undefined;
|
154
|
+
}>;
|
155
|
+
export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
156
|
+
country: z.ZodLiteral<string>;
|
157
|
+
province: z.ZodString;
|
158
|
+
district: z.ZodString;
|
159
|
+
}, {
|
160
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
161
|
+
town: z.ZodOptional<z.ZodString>;
|
162
|
+
residentialArea: z.ZodOptional<z.ZodString>;
|
163
|
+
street: z.ZodOptional<z.ZodString>;
|
164
|
+
number: z.ZodOptional<z.ZodString>;
|
165
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
166
|
+
}>, "strip", z.ZodTypeAny, {
|
167
|
+
country: string;
|
168
|
+
district: string;
|
169
|
+
province: string;
|
170
|
+
urbanOrRural: "URBAN";
|
171
|
+
number?: string | undefined;
|
172
|
+
town?: string | undefined;
|
173
|
+
residentialArea?: string | undefined;
|
174
|
+
street?: string | undefined;
|
175
|
+
zipCode?: string | undefined;
|
176
|
+
}, {
|
177
|
+
country: string;
|
178
|
+
district: string;
|
179
|
+
province: string;
|
180
|
+
urbanOrRural: "URBAN";
|
181
|
+
number?: string | undefined;
|
182
|
+
town?: string | undefined;
|
183
|
+
residentialArea?: string | undefined;
|
184
|
+
street?: string | undefined;
|
185
|
+
zipCode?: string | undefined;
|
186
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
187
|
+
country: z.ZodLiteral<string>;
|
188
|
+
province: z.ZodString;
|
189
|
+
district: z.ZodString;
|
190
|
+
}, {
|
191
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
192
|
+
village: z.ZodOptional<z.ZodString>;
|
193
|
+
}>, "strip", z.ZodTypeAny, {
|
194
|
+
country: string;
|
195
|
+
district: string;
|
196
|
+
province: string;
|
197
|
+
urbanOrRural: "RURAL";
|
198
|
+
village?: string | undefined;
|
199
|
+
}, {
|
200
|
+
country: string;
|
201
|
+
district: string;
|
202
|
+
province: string;
|
203
|
+
urbanOrRural: "RURAL";
|
204
|
+
village?: string | undefined;
|
205
|
+
}>]>, z.ZodObject<{
|
206
|
+
country: z.ZodEffects<z.ZodString, string, string>;
|
207
|
+
state: z.ZodString;
|
208
|
+
district2: z.ZodString;
|
209
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
210
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
211
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
212
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
213
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
215
|
+
country: string;
|
216
|
+
state: string;
|
217
|
+
district2: string;
|
218
|
+
cityOrTown?: string | undefined;
|
219
|
+
addressLine1?: string | undefined;
|
220
|
+
addressLine2?: string | undefined;
|
221
|
+
addressLine3?: string | undefined;
|
222
|
+
postcodeOrZip?: string | undefined;
|
223
|
+
}, {
|
224
|
+
country: string;
|
225
|
+
state: string;
|
226
|
+
district2: string;
|
227
|
+
cityOrTown?: string | undefined;
|
228
|
+
addressLine1?: string | undefined;
|
229
|
+
addressLine2?: string | undefined;
|
230
|
+
addressLine3?: string | undefined;
|
231
|
+
postcodeOrZip?: string | undefined;
|
232
|
+
}>]>;
|
233
|
+
export declare const GenericAddressUpdateValue: z.ZodObject<{
|
234
|
+
country: z.ZodEffects<z.ZodString, string, string>;
|
235
|
+
state: z.ZodString;
|
236
|
+
district2: z.ZodString;
|
237
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
238
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
239
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
240
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
241
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
243
|
+
country: string;
|
244
|
+
state: string;
|
245
|
+
district2: string;
|
246
|
+
cityOrTown?: string | null | undefined;
|
247
|
+
addressLine1?: string | null | undefined;
|
248
|
+
addressLine2?: string | null | undefined;
|
249
|
+
addressLine3?: string | null | undefined;
|
250
|
+
postcodeOrZip?: string | null | undefined;
|
251
|
+
}, {
|
252
|
+
country: string;
|
253
|
+
state: string;
|
254
|
+
district2: string;
|
255
|
+
cityOrTown?: string | null | undefined;
|
256
|
+
addressLine1?: string | null | undefined;
|
257
|
+
addressLine2?: string | null | undefined;
|
258
|
+
addressLine3?: string | null | undefined;
|
259
|
+
postcodeOrZip?: string | null | undefined;
|
260
|
+
}>;
|
261
|
+
export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
262
|
+
country: z.ZodLiteral<string>;
|
263
|
+
province: z.ZodString;
|
264
|
+
district: z.ZodString;
|
265
|
+
}, {
|
266
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
267
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
268
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
269
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
270
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
271
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
272
|
+
}>, "strip", z.ZodTypeAny, {
|
273
|
+
country: string;
|
274
|
+
district: string;
|
275
|
+
province: string;
|
276
|
+
urbanOrRural: "URBAN";
|
277
|
+
number?: string | null | undefined;
|
278
|
+
town?: string | null | undefined;
|
279
|
+
residentialArea?: string | null | undefined;
|
280
|
+
street?: string | null | undefined;
|
281
|
+
zipCode?: string | null | undefined;
|
282
|
+
}, {
|
283
|
+
country: string;
|
284
|
+
district: string;
|
285
|
+
province: string;
|
286
|
+
urbanOrRural: "URBAN";
|
287
|
+
number?: string | null | undefined;
|
288
|
+
town?: string | null | undefined;
|
289
|
+
residentialArea?: string | null | undefined;
|
290
|
+
street?: string | null | undefined;
|
291
|
+
zipCode?: string | null | undefined;
|
292
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
293
|
+
country: z.ZodLiteral<string>;
|
294
|
+
province: z.ZodString;
|
295
|
+
district: z.ZodString;
|
296
|
+
}, {
|
297
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
298
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
299
|
+
}>, "strip", z.ZodTypeAny, {
|
300
|
+
country: string;
|
301
|
+
district: string;
|
302
|
+
province: string;
|
303
|
+
urbanOrRural: "RURAL";
|
304
|
+
village?: string | null | undefined;
|
305
|
+
}, {
|
306
|
+
country: string;
|
307
|
+
district: string;
|
308
|
+
province: string;
|
309
|
+
urbanOrRural: "RURAL";
|
310
|
+
village?: string | null | undefined;
|
311
|
+
}>]>, z.ZodObject<{
|
312
|
+
country: z.ZodEffects<z.ZodString, string, string>;
|
313
|
+
state: z.ZodString;
|
314
|
+
district2: z.ZodString;
|
315
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
316
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
317
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
318
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
319
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
321
|
+
country: string;
|
322
|
+
state: string;
|
323
|
+
district2: string;
|
324
|
+
cityOrTown?: string | null | undefined;
|
325
|
+
addressLine1?: string | null | undefined;
|
326
|
+
addressLine2?: string | null | undefined;
|
327
|
+
addressLine3?: string | null | undefined;
|
328
|
+
postcodeOrZip?: string | null | undefined;
|
329
|
+
}, {
|
330
|
+
country: string;
|
331
|
+
state: string;
|
332
|
+
district2: string;
|
333
|
+
cityOrTown?: string | null | undefined;
|
334
|
+
addressLine1?: string | null | undefined;
|
335
|
+
addressLine2?: string | null | undefined;
|
336
|
+
addressLine3?: string | null | undefined;
|
337
|
+
postcodeOrZip?: string | null | undefined;
|
338
|
+
}>]>;
|
339
|
+
export type AddressFieldValue = z.infer<typeof AddressFieldValue>;
|
340
|
+
export declare const FileFieldValueWithOption: z.ZodObject<{
|
341
|
+
filename: z.ZodString;
|
342
|
+
originalFilename: z.ZodString;
|
343
|
+
type: z.ZodString;
|
344
|
+
option: z.ZodString;
|
345
|
+
}, "strip", z.ZodTypeAny, {
|
346
|
+
type: string;
|
347
|
+
option: string;
|
348
|
+
filename: string;
|
349
|
+
originalFilename: string;
|
350
|
+
}, {
|
351
|
+
type: string;
|
352
|
+
option: string;
|
353
|
+
filename: string;
|
354
|
+
originalFilename: string;
|
355
|
+
}>;
|
356
|
+
export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
|
357
|
+
export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
|
358
|
+
filename: z.ZodString;
|
359
|
+
originalFilename: z.ZodString;
|
360
|
+
type: z.ZodString;
|
361
|
+
option: z.ZodString;
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
363
|
+
type: string;
|
364
|
+
option: string;
|
365
|
+
filename: string;
|
366
|
+
originalFilename: string;
|
367
|
+
}, {
|
368
|
+
type: string;
|
369
|
+
option: string;
|
370
|
+
filename: string;
|
371
|
+
originalFilename: string;
|
372
|
+
}>, "many">;
|
373
|
+
export type FileFieldWithOptionValue = z.infer<typeof FileFieldWithOptionValue>;
|
374
|
+
//# sourceMappingURL=CompositeFieldValue.d.ts.map
|