@opencrvs/toolkit 1.8.0-rc.ff2e7b6 → 1.8.0-rc.ff62f9e
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 +6823 -479
- package/dist/commons/conditionals/conditionals.d.ts +1 -0
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +27 -0
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +4708 -256
- package/dist/commons/events/ActionDocument.d.ts +2546 -71
- package/dist/commons/events/ActionInput.d.ts +4096 -188
- package/dist/commons/events/ActionType.d.ts +6 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +152 -2
- package/dist/commons/events/Draft.d.ts +300 -12
- package/dist/commons/events/EventConfig.d.ts +1844 -188
- package/dist/commons/events/EventConfigInput.d.ts +2 -2
- package/dist/commons/events/EventDocument.d.ts +3239 -156
- package/dist/commons/events/FieldConfig.d.ts +292 -40
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +154 -3
- package/dist/commons/events/FieldValue.d.ts +76 -2
- package/dist/commons/events/FormConfig.d.ts +377 -29
- package/dist/commons/events/defineConfig.d.ts +308 -34
- package/dist/commons/events/test.utils.d.ts +161 -13
- package/dist/commons/events/utils.d.ts +229 -12
- package/dist/conditionals/index.js +17 -0
- package/dist/events/index.js +456 -95
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField } from './FieldConfig';
|
2
|
+
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField, DataField } from './FieldConfig';
|
3
3
|
import { FieldType } from './FieldType';
|
4
4
|
import { FieldValue, FieldUpdateValueSchema } from './FieldValue';
|
5
5
|
import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
|
@@ -42,8 +42,9 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
42
42
|
type: string;
|
43
43
|
filename: string;
|
44
44
|
originalFilename: string;
|
45
|
-
}>>> | z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
45
|
+
}>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
46
46
|
country: z.ZodString;
|
47
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
47
48
|
province: z.ZodString;
|
48
49
|
district: z.ZodString;
|
49
50
|
}, {
|
@@ -56,6 +57,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
56
57
|
}>, "strip", z.ZodTypeAny, {
|
57
58
|
country: string;
|
58
59
|
district: string;
|
60
|
+
addressType: "DOMESTIC";
|
59
61
|
province: string;
|
60
62
|
urbanOrRural: "URBAN";
|
61
63
|
number?: string | null | undefined;
|
@@ -66,6 +68,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
66
68
|
}, {
|
67
69
|
country: string;
|
68
70
|
district: string;
|
71
|
+
addressType: "DOMESTIC";
|
69
72
|
province: string;
|
70
73
|
urbanOrRural: "URBAN";
|
71
74
|
number?: string | null | undefined;
|
@@ -75,6 +78,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
75
78
|
zipCode?: string | null | undefined;
|
76
79
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
77
80
|
country: z.ZodString;
|
81
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
78
82
|
province: z.ZodString;
|
79
83
|
district: z.ZodString;
|
80
84
|
}, {
|
@@ -83,15 +87,47 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
83
87
|
}>, "strip", z.ZodTypeAny, {
|
84
88
|
country: string;
|
85
89
|
district: string;
|
90
|
+
addressType: "DOMESTIC";
|
86
91
|
province: string;
|
87
92
|
urbanOrRural: "RURAL";
|
88
93
|
village?: string | null | undefined;
|
89
94
|
}, {
|
90
95
|
country: string;
|
91
96
|
district: string;
|
97
|
+
addressType: "DOMESTIC";
|
92
98
|
province: string;
|
93
99
|
urbanOrRural: "RURAL";
|
94
100
|
village?: string | null | undefined;
|
101
|
+
}>]>, z.ZodObject<{
|
102
|
+
country: z.ZodString;
|
103
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
104
|
+
state: z.ZodString;
|
105
|
+
district2: z.ZodString;
|
106
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
107
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
108
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
109
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
110
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
112
|
+
country: string;
|
113
|
+
state: string;
|
114
|
+
addressType: "INTERNATIONAL";
|
115
|
+
district2: string;
|
116
|
+
cityOrTown?: string | null | undefined;
|
117
|
+
addressLine1?: string | null | undefined;
|
118
|
+
addressLine2?: string | null | undefined;
|
119
|
+
addressLine3?: string | null | undefined;
|
120
|
+
postcodeOrZip?: string | null | undefined;
|
121
|
+
}, {
|
122
|
+
country: string;
|
123
|
+
state: string;
|
124
|
+
addressType: "INTERNATIONAL";
|
125
|
+
district2: string;
|
126
|
+
cityOrTown?: string | null | undefined;
|
127
|
+
addressLine1?: string | null | undefined;
|
128
|
+
addressLine2?: string | null | undefined;
|
129
|
+
addressLine3?: string | null | undefined;
|
130
|
+
postcodeOrZip?: string | null | undefined;
|
95
131
|
}>]> | z.ZodArray<z.ZodObject<{
|
96
132
|
filename: z.ZodString;
|
97
133
|
originalFilename: z.ZodString;
|
@@ -122,8 +158,9 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
122
158
|
option: string;
|
123
159
|
filename: string;
|
124
160
|
originalFilename: string;
|
125
|
-
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
161
|
+
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodUndefined | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
126
162
|
country: z.ZodString;
|
163
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
127
164
|
province: z.ZodString;
|
128
165
|
district: z.ZodString;
|
129
166
|
}, {
|
@@ -136,6 +173,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
136
173
|
}>, "strip", z.ZodTypeAny, {
|
137
174
|
country: string;
|
138
175
|
district: string;
|
176
|
+
addressType: "DOMESTIC";
|
139
177
|
province: string;
|
140
178
|
urbanOrRural: "URBAN";
|
141
179
|
number?: string | null | undefined;
|
@@ -146,6 +184,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
146
184
|
}, {
|
147
185
|
country: string;
|
148
186
|
district: string;
|
187
|
+
addressType: "DOMESTIC";
|
149
188
|
province: string;
|
150
189
|
urbanOrRural: "URBAN";
|
151
190
|
number?: string | null | undefined;
|
@@ -155,6 +194,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
155
194
|
zipCode?: string | null | undefined;
|
156
195
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
157
196
|
country: z.ZodString;
|
197
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
158
198
|
province: z.ZodString;
|
159
199
|
district: z.ZodString;
|
160
200
|
}, {
|
@@ -163,15 +203,47 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
163
203
|
}>, "strip", z.ZodTypeAny, {
|
164
204
|
country: string;
|
165
205
|
district: string;
|
206
|
+
addressType: "DOMESTIC";
|
166
207
|
province: string;
|
167
208
|
urbanOrRural: "RURAL";
|
168
209
|
village?: string | null | undefined;
|
169
210
|
}, {
|
170
211
|
country: string;
|
171
212
|
district: string;
|
213
|
+
addressType: "DOMESTIC";
|
172
214
|
province: string;
|
173
215
|
urbanOrRural: "RURAL";
|
174
216
|
village?: string | null | undefined;
|
217
|
+
}>]>, z.ZodObject<{
|
218
|
+
country: z.ZodString;
|
219
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
220
|
+
state: z.ZodString;
|
221
|
+
district2: z.ZodString;
|
222
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
223
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
224
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
225
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
226
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
228
|
+
country: string;
|
229
|
+
state: string;
|
230
|
+
addressType: "INTERNATIONAL";
|
231
|
+
district2: string;
|
232
|
+
cityOrTown?: string | null | undefined;
|
233
|
+
addressLine1?: string | null | undefined;
|
234
|
+
addressLine2?: string | null | undefined;
|
235
|
+
addressLine3?: string | null | undefined;
|
236
|
+
postcodeOrZip?: string | null | undefined;
|
237
|
+
}, {
|
238
|
+
country: string;
|
239
|
+
state: string;
|
240
|
+
addressType: "INTERNATIONAL";
|
241
|
+
district2: string;
|
242
|
+
cityOrTown?: string | null | undefined;
|
243
|
+
addressLine1?: string | null | undefined;
|
244
|
+
addressLine2?: string | null | undefined;
|
245
|
+
addressLine3?: string | null | undefined;
|
246
|
+
postcodeOrZip?: string | null | undefined;
|
175
247
|
}>]>>>;
|
176
248
|
export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {
|
177
249
|
[x: string]: string | number | boolean | {
|
@@ -181,6 +253,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
181
253
|
} | {
|
182
254
|
country: string;
|
183
255
|
district: string;
|
256
|
+
addressType: "DOMESTIC";
|
184
257
|
province: string;
|
185
258
|
urbanOrRural: "URBAN";
|
186
259
|
number?: string | null | undefined;
|
@@ -191,9 +264,20 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
191
264
|
} | {
|
192
265
|
country: string;
|
193
266
|
district: string;
|
267
|
+
addressType: "DOMESTIC";
|
194
268
|
province: string;
|
195
269
|
urbanOrRural: "RURAL";
|
196
270
|
village?: string | null | undefined;
|
271
|
+
} | {
|
272
|
+
country: string;
|
273
|
+
state: string;
|
274
|
+
addressType: "INTERNATIONAL";
|
275
|
+
district2: string;
|
276
|
+
cityOrTown?: string | null | undefined;
|
277
|
+
addressLine1?: string | null | undefined;
|
278
|
+
addressLine2?: string | null | undefined;
|
279
|
+
addressLine3?: string | null | undefined;
|
280
|
+
postcodeOrZip?: string | null | undefined;
|
197
281
|
} | {
|
198
282
|
type: string;
|
199
283
|
option: string;
|
@@ -208,6 +292,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
208
292
|
} | {
|
209
293
|
country: string;
|
210
294
|
district: string;
|
295
|
+
addressType: "DOMESTIC";
|
211
296
|
province: string;
|
212
297
|
urbanOrRural: "URBAN";
|
213
298
|
number?: string | null | undefined;
|
@@ -218,9 +303,20 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
218
303
|
} | {
|
219
304
|
country: string;
|
220
305
|
district: string;
|
306
|
+
addressType: "DOMESTIC";
|
221
307
|
province: string;
|
222
308
|
urbanOrRural: "RURAL";
|
223
309
|
village?: string | null | undefined;
|
310
|
+
} | {
|
311
|
+
country: string;
|
312
|
+
state: string;
|
313
|
+
addressType: "INTERNATIONAL";
|
314
|
+
district2: string;
|
315
|
+
cityOrTown?: string | null | undefined;
|
316
|
+
addressLine1?: string | null | undefined;
|
317
|
+
addressLine2?: string | null | undefined;
|
318
|
+
addressLine3?: string | null | undefined;
|
319
|
+
postcodeOrZip?: string | null | undefined;
|
224
320
|
} | {
|
225
321
|
type: string;
|
226
322
|
option: string;
|
@@ -233,6 +329,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
233
329
|
*/
|
234
330
|
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
|
235
331
|
country: string;
|
332
|
+
addressType: "DOMESTIC";
|
236
333
|
province: string;
|
237
334
|
district: string;
|
238
335
|
urbanOrRural: string;
|
@@ -249,6 +346,53 @@ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number):
|
|
249
346
|
originalFilename: string;
|
250
347
|
type: string;
|
251
348
|
country?: undefined;
|
349
|
+
addressType?: undefined;
|
350
|
+
province?: undefined;
|
351
|
+
district?: undefined;
|
352
|
+
urbanOrRural?: undefined;
|
353
|
+
town?: undefined;
|
354
|
+
residentialArea?: undefined;
|
355
|
+
street?: undefined;
|
356
|
+
number?: undefined;
|
357
|
+
zipCode?: undefined;
|
358
|
+
} | {
|
359
|
+
country?: undefined;
|
360
|
+
addressType?: undefined;
|
361
|
+
province?: undefined;
|
362
|
+
district?: undefined;
|
363
|
+
urbanOrRural?: undefined;
|
364
|
+
town?: undefined;
|
365
|
+
residentialArea?: undefined;
|
366
|
+
street?: undefined;
|
367
|
+
number?: undefined;
|
368
|
+
zipCode?: undefined;
|
369
|
+
filename?: undefined;
|
370
|
+
originalFilename?: undefined;
|
371
|
+
type?: undefined;
|
372
|
+
} | null;
|
373
|
+
/**
|
374
|
+
* Maps complex or nested field types, such as Address fields, to their corresponding empty values.
|
375
|
+
*/
|
376
|
+
export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
|
377
|
+
country: null;
|
378
|
+
addressType: "DOMESTIC";
|
379
|
+
province: null;
|
380
|
+
district: null;
|
381
|
+
urbanOrRural: string;
|
382
|
+
town: null;
|
383
|
+
residentialArea: null;
|
384
|
+
street: null;
|
385
|
+
number: null;
|
386
|
+
zipCode: null;
|
387
|
+
filename?: undefined;
|
388
|
+
originalFilename?: undefined;
|
389
|
+
type?: undefined;
|
390
|
+
} | {
|
391
|
+
filename: string;
|
392
|
+
originalFilename: string;
|
393
|
+
type: string;
|
394
|
+
country?: undefined;
|
395
|
+
addressType?: undefined;
|
252
396
|
province?: undefined;
|
253
397
|
district?: undefined;
|
254
398
|
urbanOrRural?: undefined;
|
@@ -405,5 +549,12 @@ export declare const isOfficeFieldType: (field: {
|
|
405
549
|
value: string;
|
406
550
|
config: Office;
|
407
551
|
};
|
552
|
+
export declare const isDataFieldType: (field: {
|
553
|
+
config: FieldConfig;
|
554
|
+
value: FieldValue;
|
555
|
+
}) => field is {
|
556
|
+
value: undefined;
|
557
|
+
config: DataField;
|
558
|
+
};
|
408
559
|
export {};
|
409
560
|
//# sourceMappingURL=FieldTypeMapping.d.ts.map
|
@@ -20,6 +20,8 @@ export declare const CheckboxFieldValue: z.ZodBoolean;
|
|
20
20
|
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
|
21
21
|
export declare const NumberFieldValue: z.ZodNumber;
|
22
22
|
export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
|
23
|
+
export declare const DataFieldValue: z.ZodUndefined;
|
24
|
+
export type DataFieldValue = z.infer<typeof DataFieldValue>;
|
23
25
|
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
24
26
|
filename: z.ZodString;
|
25
27
|
originalFilename: z.ZodString;
|
@@ -49,6 +51,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
49
51
|
originalFilename: string;
|
50
52
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
51
53
|
country: z.ZodString;
|
54
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
52
55
|
province: z.ZodString;
|
53
56
|
district: z.ZodString;
|
54
57
|
}, {
|
@@ -61,6 +64,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
61
64
|
}>, "strip", z.ZodTypeAny, {
|
62
65
|
country: string;
|
63
66
|
district: string;
|
67
|
+
addressType: "DOMESTIC";
|
64
68
|
province: string;
|
65
69
|
urbanOrRural: "URBAN";
|
66
70
|
number?: string | undefined;
|
@@ -71,6 +75,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
71
75
|
}, {
|
72
76
|
country: string;
|
73
77
|
district: string;
|
78
|
+
addressType: "DOMESTIC";
|
74
79
|
province: string;
|
75
80
|
urbanOrRural: "URBAN";
|
76
81
|
number?: string | undefined;
|
@@ -80,6 +85,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
80
85
|
zipCode?: string | undefined;
|
81
86
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
82
87
|
country: z.ZodString;
|
88
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
83
89
|
province: z.ZodString;
|
84
90
|
district: z.ZodString;
|
85
91
|
}, {
|
@@ -88,15 +94,47 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
88
94
|
}>, "strip", z.ZodTypeAny, {
|
89
95
|
country: string;
|
90
96
|
district: string;
|
97
|
+
addressType: "DOMESTIC";
|
91
98
|
province: string;
|
92
99
|
urbanOrRural: "RURAL";
|
93
100
|
village?: string | undefined;
|
94
101
|
}, {
|
95
102
|
country: string;
|
96
103
|
district: string;
|
104
|
+
addressType: "DOMESTIC";
|
97
105
|
province: string;
|
98
106
|
urbanOrRural: "RURAL";
|
99
107
|
village?: string | undefined;
|
108
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
109
|
+
country: z.ZodString;
|
110
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
111
|
+
state: z.ZodString;
|
112
|
+
district2: z.ZodString;
|
113
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
114
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
115
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
116
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
117
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
119
|
+
country: string;
|
120
|
+
state: string;
|
121
|
+
addressType: "INTERNATIONAL";
|
122
|
+
district2: string;
|
123
|
+
cityOrTown?: string | undefined;
|
124
|
+
addressLine1?: string | undefined;
|
125
|
+
addressLine2?: string | undefined;
|
126
|
+
addressLine3?: string | undefined;
|
127
|
+
postcodeOrZip?: string | undefined;
|
128
|
+
}, {
|
129
|
+
country: string;
|
130
|
+
state: string;
|
131
|
+
addressType: "INTERNATIONAL";
|
132
|
+
district2: string;
|
133
|
+
cityOrTown?: string | undefined;
|
134
|
+
addressLine1?: string | undefined;
|
135
|
+
addressLine2?: string | undefined;
|
136
|
+
addressLine3?: string | undefined;
|
137
|
+
postcodeOrZip?: string | undefined;
|
100
138
|
}>]>;
|
101
139
|
export type FieldValue = z.infer<typeof FieldValue>;
|
102
140
|
export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
@@ -128,6 +166,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
128
166
|
originalFilename: string;
|
129
167
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
130
168
|
country: z.ZodString;
|
169
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
131
170
|
province: z.ZodString;
|
132
171
|
district: z.ZodString;
|
133
172
|
}, {
|
@@ -140,6 +179,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
140
179
|
}>, "strip", z.ZodTypeAny, {
|
141
180
|
country: string;
|
142
181
|
district: string;
|
182
|
+
addressType: "DOMESTIC";
|
143
183
|
province: string;
|
144
184
|
urbanOrRural: "URBAN";
|
145
185
|
number?: string | null | undefined;
|
@@ -150,6 +190,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
150
190
|
}, {
|
151
191
|
country: string;
|
152
192
|
district: string;
|
193
|
+
addressType: "DOMESTIC";
|
153
194
|
province: string;
|
154
195
|
urbanOrRural: "URBAN";
|
155
196
|
number?: string | null | undefined;
|
@@ -159,6 +200,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
159
200
|
zipCode?: string | null | undefined;
|
160
201
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
161
202
|
country: z.ZodString;
|
203
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
162
204
|
province: z.ZodString;
|
163
205
|
district: z.ZodString;
|
164
206
|
}, {
|
@@ -167,25 +209,57 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
167
209
|
}>, "strip", z.ZodTypeAny, {
|
168
210
|
country: string;
|
169
211
|
district: string;
|
212
|
+
addressType: "DOMESTIC";
|
170
213
|
province: string;
|
171
214
|
urbanOrRural: "RURAL";
|
172
215
|
village?: string | null | undefined;
|
173
216
|
}, {
|
174
217
|
country: string;
|
175
218
|
district: string;
|
219
|
+
addressType: "DOMESTIC";
|
176
220
|
province: string;
|
177
221
|
urbanOrRural: "RURAL";
|
178
222
|
village?: string | null | undefined;
|
223
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
224
|
+
country: z.ZodString;
|
225
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
226
|
+
state: z.ZodString;
|
227
|
+
district2: z.ZodString;
|
228
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
229
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
230
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
231
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
232
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
234
|
+
country: string;
|
235
|
+
state: string;
|
236
|
+
addressType: "INTERNATIONAL";
|
237
|
+
district2: string;
|
238
|
+
cityOrTown?: string | null | undefined;
|
239
|
+
addressLine1?: string | null | undefined;
|
240
|
+
addressLine2?: string | null | undefined;
|
241
|
+
addressLine3?: string | null | undefined;
|
242
|
+
postcodeOrZip?: string | null | undefined;
|
243
|
+
}, {
|
244
|
+
country: string;
|
245
|
+
state: string;
|
246
|
+
addressType: "INTERNATIONAL";
|
247
|
+
district2: string;
|
248
|
+
cityOrTown?: string | null | undefined;
|
249
|
+
addressLine1?: string | null | undefined;
|
250
|
+
addressLine2?: string | null | undefined;
|
251
|
+
addressLine3?: string | null | undefined;
|
252
|
+
postcodeOrZip?: string | null | undefined;
|
179
253
|
}>]>;
|
180
254
|
export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
|
181
255
|
/**
|
182
256
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
183
257
|
* */
|
184
|
-
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
258
|
+
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
185
259
|
/**
|
186
260
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
187
261
|
*
|
188
262
|
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
189
263
|
* */
|
190
|
-
export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
264
|
+
export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
191
265
|
//# sourceMappingURL=FieldValue.d.ts.map
|