@opencrvs/toolkit 1.8.0-rc.fd6feaa → 1.8.0-rc.fd754eb
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/README.md +1 -1
- package/dist/commons/api/router.d.ts +10768 -13690
- package/dist/commons/conditionals/conditionals.d.ts +31 -5
- package/dist/commons/conditionals/validate.d.ts +12 -17
- package/dist/commons/events/ActionConfig.d.ts +89454 -2042
- package/dist/commons/events/ActionDocument.d.ts +8396 -446
- package/dist/commons/events/ActionInput.d.ts +3229 -704
- package/dist/commons/events/ActionType.d.ts +26 -11
- package/dist/commons/events/AdvancedSearchConfig.d.ts +369 -25
- package/dist/commons/events/CompositeFieldValue.d.ts +55 -12
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +167 -67
- package/dist/commons/events/EventConfig.d.ts +42579 -1766
- package/dist/commons/events/EventConfigInput.d.ts +6 -3
- package/dist/commons/events/EventDocument.d.ts +1751 -544
- package/dist/commons/events/EventIndex.d.ts +1346 -10
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +273 -8
- package/dist/commons/events/FieldConfig.d.ts +4218 -802
- package/dist/commons/events/FieldType.d.ts +4 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +67 -11
- package/dist/commons/events/FieldValue.d.ts +36 -13
- package/dist/commons/events/FormConfig.d.ts +40636 -73
- package/dist/commons/events/PageConfig.d.ts +10209 -0
- package/dist/commons/events/SummaryConfig.d.ts +95 -39
- package/dist/commons/events/TemplateConfig.d.ts +5 -5
- package/dist/commons/events/User.d.ts +5 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +1135 -19
- package/dist/commons/events/defineConfig.d.ts +7030 -224
- package/dist/commons/events/event.d.ts +27 -0
- package/dist/commons/events/field.d.ts +68 -0
- package/dist/commons/events/index.d.ts +5 -1
- package/dist/commons/events/scopes.d.ts +26 -0
- package/dist/commons/events/test.utils.d.ts +84 -302
- package/dist/commons/events/utils.d.ts +3593 -95
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +196 -108
- package/dist/events/index.js +2530 -1320
- package/dist/scopes/index.d.ts +70 -1
- package/dist/scopes/index.js +130 -0
- package/package.json +3 -2
@@ -5,12 +5,12 @@ export declare const FieldType: {
|
|
5
5
|
readonly TEXTAREA: "TEXTAREA";
|
6
6
|
readonly EMAIL: "EMAIL";
|
7
7
|
readonly DATE: "DATE";
|
8
|
+
readonly DATE_RANGE: "DATE_RANGE";
|
8
9
|
readonly PARAGRAPH: "PARAGRAPH";
|
9
10
|
readonly PAGE_HEADER: "PAGE_HEADER";
|
10
11
|
readonly RADIO_GROUP: "RADIO_GROUP";
|
11
12
|
readonly FILE: "FILE";
|
12
13
|
readonly FILE_WITH_OPTIONS: "FILE_WITH_OPTIONS";
|
13
|
-
readonly HIDDEN: "HIDDEN";
|
14
14
|
readonly BULLET_LIST: "BULLET_LIST";
|
15
15
|
readonly CHECKBOX: "CHECKBOX";
|
16
16
|
readonly SELECT: "SELECT";
|
@@ -21,11 +21,12 @@ export declare const FieldType: {
|
|
21
21
|
readonly FACILITY: "FACILITY";
|
22
22
|
readonly OFFICE: "OFFICE";
|
23
23
|
readonly SIGNATURE: "SIGNATURE";
|
24
|
+
readonly DATA: "DATA";
|
24
25
|
};
|
25
|
-
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "
|
26
|
+
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "DATE_RANGE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA")[];
|
26
27
|
export type FieldType = (typeof fieldTypes)[number];
|
27
28
|
/**
|
28
29
|
* Composite field types are field types that consist of multiple field values.
|
29
30
|
*/
|
30
|
-
export declare const compositeFieldTypes: ("ADDRESS" | "FILE" | "FILE_WITH_OPTIONS")[];
|
31
|
+
export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS")[];
|
31
32
|
//# sourceMappingURL=FieldType.d.ts.map
|
@@ -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';
|
@@ -43,7 +43,8 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
43
43
|
filename: string;
|
44
44
|
originalFilename: string;
|
45
45
|
}>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
46
|
-
country: z.
|
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;
|
@@ -74,7 +77,8 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
74
77
|
street?: string | null | undefined;
|
75
78
|
zipCode?: string | null | undefined;
|
76
79
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
77
|
-
country: z.
|
80
|
+
country: z.ZodString;
|
81
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
78
82
|
province: z.ZodString;
|
79
83
|
district: z.ZodString;
|
80
84
|
}, {
|
@@ -83,17 +87,20 @@ 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;
|
95
101
|
}>]>, z.ZodObject<{
|
96
|
-
country: z.
|
102
|
+
country: z.ZodString;
|
103
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
97
104
|
state: z.ZodString;
|
98
105
|
district2: z.ZodString;
|
99
106
|
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -104,6 +111,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
104
111
|
}, "strip", z.ZodTypeAny, {
|
105
112
|
country: string;
|
106
113
|
state: string;
|
114
|
+
addressType: "INTERNATIONAL";
|
107
115
|
district2: string;
|
108
116
|
cityOrTown?: string | null | undefined;
|
109
117
|
addressLine1?: string | null | undefined;
|
@@ -113,6 +121,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
113
121
|
}, {
|
114
122
|
country: string;
|
115
123
|
state: string;
|
124
|
+
addressType: "INTERNATIONAL";
|
116
125
|
district2: string;
|
117
126
|
cityOrTown?: string | null | undefined;
|
118
127
|
addressLine1?: string | null | undefined;
|
@@ -149,8 +158,9 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
149
158
|
option: string;
|
150
159
|
filename: string;
|
151
160
|
originalFilename: string;
|
152
|
-
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
153
|
-
country: z.
|
161
|
+
}>, "many">>> | z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>> | 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<{
|
162
|
+
country: z.ZodString;
|
163
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
154
164
|
province: z.ZodString;
|
155
165
|
district: z.ZodString;
|
156
166
|
}, {
|
@@ -163,6 +173,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
163
173
|
}>, "strip", z.ZodTypeAny, {
|
164
174
|
country: string;
|
165
175
|
district: string;
|
176
|
+
addressType: "DOMESTIC";
|
166
177
|
province: string;
|
167
178
|
urbanOrRural: "URBAN";
|
168
179
|
number?: string | null | undefined;
|
@@ -173,6 +184,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
173
184
|
}, {
|
174
185
|
country: string;
|
175
186
|
district: string;
|
187
|
+
addressType: "DOMESTIC";
|
176
188
|
province: string;
|
177
189
|
urbanOrRural: "URBAN";
|
178
190
|
number?: string | null | undefined;
|
@@ -181,7 +193,8 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
181
193
|
street?: string | null | undefined;
|
182
194
|
zipCode?: string | null | undefined;
|
183
195
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
184
|
-
country: z.
|
196
|
+
country: z.ZodString;
|
197
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
185
198
|
province: z.ZodString;
|
186
199
|
district: z.ZodString;
|
187
200
|
}, {
|
@@ -190,17 +203,20 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
190
203
|
}>, "strip", z.ZodTypeAny, {
|
191
204
|
country: string;
|
192
205
|
district: string;
|
206
|
+
addressType: "DOMESTIC";
|
193
207
|
province: string;
|
194
208
|
urbanOrRural: "RURAL";
|
195
209
|
village?: string | null | undefined;
|
196
210
|
}, {
|
197
211
|
country: string;
|
198
212
|
district: string;
|
213
|
+
addressType: "DOMESTIC";
|
199
214
|
province: string;
|
200
215
|
urbanOrRural: "RURAL";
|
201
216
|
village?: string | null | undefined;
|
202
217
|
}>]>, z.ZodObject<{
|
203
|
-
country: z.
|
218
|
+
country: z.ZodString;
|
219
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
204
220
|
state: z.ZodString;
|
205
221
|
district2: z.ZodString;
|
206
222
|
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -211,6 +227,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
211
227
|
}, "strip", z.ZodTypeAny, {
|
212
228
|
country: string;
|
213
229
|
state: string;
|
230
|
+
addressType: "INTERNATIONAL";
|
214
231
|
district2: string;
|
215
232
|
cityOrTown?: string | null | undefined;
|
216
233
|
addressLine1?: string | null | undefined;
|
@@ -220,6 +237,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
220
237
|
}, {
|
221
238
|
country: string;
|
222
239
|
state: string;
|
240
|
+
addressType: "INTERNATIONAL";
|
223
241
|
district2: string;
|
224
242
|
cityOrTown?: string | null | undefined;
|
225
243
|
addressLine1?: string | null | undefined;
|
@@ -235,6 +253,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
235
253
|
} | {
|
236
254
|
country: string;
|
237
255
|
district: string;
|
256
|
+
addressType: "DOMESTIC";
|
238
257
|
province: string;
|
239
258
|
urbanOrRural: "URBAN";
|
240
259
|
number?: string | null | undefined;
|
@@ -245,12 +264,14 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
245
264
|
} | {
|
246
265
|
country: string;
|
247
266
|
district: string;
|
267
|
+
addressType: "DOMESTIC";
|
248
268
|
province: string;
|
249
269
|
urbanOrRural: "RURAL";
|
250
270
|
village?: string | null | undefined;
|
251
271
|
} | {
|
252
272
|
country: string;
|
253
273
|
state: string;
|
274
|
+
addressType: "INTERNATIONAL";
|
254
275
|
district2: string;
|
255
276
|
cityOrTown?: string | null | undefined;
|
256
277
|
addressLine1?: string | null | undefined;
|
@@ -262,7 +283,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
262
283
|
option: string;
|
263
284
|
filename: string;
|
264
285
|
originalFilename: string;
|
265
|
-
}[] | null | undefined;
|
286
|
+
}[] | [string, string] | null | undefined;
|
266
287
|
}, {
|
267
288
|
[x: string]: string | number | boolean | {
|
268
289
|
type: string;
|
@@ -271,6 +292,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
271
292
|
} | {
|
272
293
|
country: string;
|
273
294
|
district: string;
|
295
|
+
addressType: "DOMESTIC";
|
274
296
|
province: string;
|
275
297
|
urbanOrRural: "URBAN";
|
276
298
|
number?: string | null | undefined;
|
@@ -281,12 +303,14 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
281
303
|
} | {
|
282
304
|
country: string;
|
283
305
|
district: string;
|
306
|
+
addressType: "DOMESTIC";
|
284
307
|
province: string;
|
285
308
|
urbanOrRural: "RURAL";
|
286
309
|
village?: string | null | undefined;
|
287
310
|
} | {
|
288
311
|
country: string;
|
289
312
|
state: string;
|
313
|
+
addressType: "INTERNATIONAL";
|
290
314
|
district2: string;
|
291
315
|
cityOrTown?: string | null | undefined;
|
292
316
|
addressLine1?: string | null | undefined;
|
@@ -298,13 +322,14 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
298
322
|
option: string;
|
299
323
|
filename: string;
|
300
324
|
originalFilename: string;
|
301
|
-
}[] | null | undefined;
|
325
|
+
}[] | [string, string] | null | undefined;
|
302
326
|
}>;
|
303
327
|
/**
|
304
328
|
* Quick-and-dirty mock data generator for event actions.
|
305
329
|
*/
|
306
|
-
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
|
330
|
+
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | string[] | 19 | {
|
307
331
|
country: string;
|
332
|
+
addressType: "DOMESTIC";
|
308
333
|
province: string;
|
309
334
|
district: string;
|
310
335
|
urbanOrRural: string;
|
@@ -321,6 +346,7 @@ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number):
|
|
321
346
|
originalFilename: string;
|
322
347
|
type: string;
|
323
348
|
country?: undefined;
|
349
|
+
addressType?: undefined;
|
324
350
|
province?: undefined;
|
325
351
|
district?: undefined;
|
326
352
|
urbanOrRural?: undefined;
|
@@ -329,12 +355,27 @@ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number):
|
|
329
355
|
street?: undefined;
|
330
356
|
number?: undefined;
|
331
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;
|
332
372
|
} | null;
|
333
373
|
/**
|
334
374
|
* Maps complex or nested field types, such as Address fields, to their corresponding empty values.
|
335
375
|
*/
|
336
376
|
export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
|
337
377
|
country: null;
|
378
|
+
addressType: "DOMESTIC";
|
338
379
|
province: null;
|
339
380
|
district: null;
|
340
381
|
urbanOrRural: string;
|
@@ -351,6 +392,7 @@ export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] |
|
|
351
392
|
originalFilename: string;
|
352
393
|
type: string;
|
353
394
|
country?: undefined;
|
395
|
+
addressType?: undefined;
|
354
396
|
province?: undefined;
|
355
397
|
district?: undefined;
|
356
398
|
urbanOrRural?: undefined;
|
@@ -374,6 +416,13 @@ export declare const isDateFieldType: (field: {
|
|
374
416
|
value: string;
|
375
417
|
config: DateField;
|
376
418
|
};
|
419
|
+
export declare const isDateRangeFieldType: (field: {
|
420
|
+
config: FieldConfig;
|
421
|
+
value: FieldValue;
|
422
|
+
}) => field is {
|
423
|
+
value: string;
|
424
|
+
config: DateField;
|
425
|
+
};
|
377
426
|
export declare const isPageHeaderFieldType: (field: {
|
378
427
|
config: FieldConfig;
|
379
428
|
value: FieldValue;
|
@@ -507,5 +556,12 @@ export declare const isOfficeFieldType: (field: {
|
|
507
556
|
value: string;
|
508
557
|
config: Office;
|
509
558
|
};
|
559
|
+
export declare const isDataFieldType: (field: {
|
560
|
+
config: FieldConfig;
|
561
|
+
value: FieldValue;
|
562
|
+
}) => field is {
|
563
|
+
value: undefined;
|
564
|
+
config: DataField;
|
565
|
+
};
|
510
566
|
export {};
|
511
567
|
//# sourceMappingURL=FieldTypeMapping.d.ts.map
|
@@ -13,14 +13,19 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
|
|
13
13
|
*
|
14
14
|
*/
|
15
15
|
export declare const TextValue: z.ZodString;
|
16
|
-
export declare const
|
16
|
+
export declare const NonEmptyTextValue: z.ZodString;
|
17
17
|
export declare const DateValue: z.ZodString;
|
18
|
+
export declare const DatetimeValue: z.ZodString;
|
19
|
+
export declare const DateRangeFieldValue: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
|
20
|
+
export type DateRangeFieldValue = z.infer<typeof DateRangeFieldValue>;
|
18
21
|
export declare const EmailValue: z.ZodString;
|
19
22
|
export declare const CheckboxFieldValue: z.ZodBoolean;
|
20
23
|
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
|
21
24
|
export declare const NumberFieldValue: z.ZodNumber;
|
22
25
|
export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
|
23
|
-
export declare const
|
26
|
+
export declare const DataFieldValue: z.ZodUndefined;
|
27
|
+
export type DataFieldValue = z.infer<typeof DataFieldValue>;
|
28
|
+
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
24
29
|
filename: z.ZodString;
|
25
30
|
originalFilename: z.ZodString;
|
26
31
|
type: z.ZodString;
|
@@ -48,7 +53,8 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
48
53
|
filename: string;
|
49
54
|
originalFilename: string;
|
50
55
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
51
|
-
country: z.
|
56
|
+
country: z.ZodString;
|
57
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
52
58
|
province: z.ZodString;
|
53
59
|
district: z.ZodString;
|
54
60
|
}, {
|
@@ -61,6 +67,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
61
67
|
}>, "strip", z.ZodTypeAny, {
|
62
68
|
country: string;
|
63
69
|
district: string;
|
70
|
+
addressType: "DOMESTIC";
|
64
71
|
province: string;
|
65
72
|
urbanOrRural: "URBAN";
|
66
73
|
number?: string | undefined;
|
@@ -71,6 +78,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
71
78
|
}, {
|
72
79
|
country: string;
|
73
80
|
district: string;
|
81
|
+
addressType: "DOMESTIC";
|
74
82
|
province: string;
|
75
83
|
urbanOrRural: "URBAN";
|
76
84
|
number?: string | undefined;
|
@@ -79,7 +87,8 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
79
87
|
street?: string | undefined;
|
80
88
|
zipCode?: string | undefined;
|
81
89
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
82
|
-
country: z.
|
90
|
+
country: z.ZodString;
|
91
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
83
92
|
province: z.ZodString;
|
84
93
|
district: z.ZodString;
|
85
94
|
}, {
|
@@ -88,17 +97,20 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
88
97
|
}>, "strip", z.ZodTypeAny, {
|
89
98
|
country: string;
|
90
99
|
district: string;
|
100
|
+
addressType: "DOMESTIC";
|
91
101
|
province: string;
|
92
102
|
urbanOrRural: "RURAL";
|
93
103
|
village?: string | undefined;
|
94
104
|
}, {
|
95
105
|
country: string;
|
96
106
|
district: string;
|
107
|
+
addressType: "DOMESTIC";
|
97
108
|
province: string;
|
98
109
|
urbanOrRural: "RURAL";
|
99
110
|
village?: string | undefined;
|
100
|
-
}>, z.ZodObject<{
|
101
|
-
country: z.
|
111
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
112
|
+
country: z.ZodString;
|
113
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
102
114
|
state: z.ZodString;
|
103
115
|
district2: z.ZodString;
|
104
116
|
cityOrTown: z.ZodOptional<z.ZodString>;
|
@@ -109,6 +121,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
109
121
|
}, "strip", z.ZodTypeAny, {
|
110
122
|
country: string;
|
111
123
|
state: string;
|
124
|
+
addressType: "INTERNATIONAL";
|
112
125
|
district2: string;
|
113
126
|
cityOrTown?: string | undefined;
|
114
127
|
addressLine1?: string | undefined;
|
@@ -118,6 +131,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
118
131
|
}, {
|
119
132
|
country: string;
|
120
133
|
state: string;
|
134
|
+
addressType: "INTERNATIONAL";
|
121
135
|
district2: string;
|
122
136
|
cityOrTown?: string | undefined;
|
123
137
|
addressLine1?: string | undefined;
|
@@ -126,7 +140,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
126
140
|
postcodeOrZip?: string | undefined;
|
127
141
|
}>]>;
|
128
142
|
export type FieldValue = z.infer<typeof FieldValue>;
|
129
|
-
export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
143
|
+
export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
130
144
|
filename: z.ZodString;
|
131
145
|
originalFilename: z.ZodString;
|
132
146
|
type: z.ZodString;
|
@@ -154,7 +168,8 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
154
168
|
filename: string;
|
155
169
|
originalFilename: string;
|
156
170
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
157
|
-
country: z.
|
171
|
+
country: z.ZodString;
|
172
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
158
173
|
province: z.ZodString;
|
159
174
|
district: z.ZodString;
|
160
175
|
}, {
|
@@ -167,6 +182,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
167
182
|
}>, "strip", z.ZodTypeAny, {
|
168
183
|
country: string;
|
169
184
|
district: string;
|
185
|
+
addressType: "DOMESTIC";
|
170
186
|
province: string;
|
171
187
|
urbanOrRural: "URBAN";
|
172
188
|
number?: string | null | undefined;
|
@@ -177,6 +193,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
177
193
|
}, {
|
178
194
|
country: string;
|
179
195
|
district: string;
|
196
|
+
addressType: "DOMESTIC";
|
180
197
|
province: string;
|
181
198
|
urbanOrRural: "URBAN";
|
182
199
|
number?: string | null | undefined;
|
@@ -185,7 +202,8 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
185
202
|
street?: string | null | undefined;
|
186
203
|
zipCode?: string | null | undefined;
|
187
204
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
188
|
-
country: z.
|
205
|
+
country: z.ZodString;
|
206
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
189
207
|
province: z.ZodString;
|
190
208
|
district: z.ZodString;
|
191
209
|
}, {
|
@@ -194,17 +212,20 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
194
212
|
}>, "strip", z.ZodTypeAny, {
|
195
213
|
country: string;
|
196
214
|
district: string;
|
215
|
+
addressType: "DOMESTIC";
|
197
216
|
province: string;
|
198
217
|
urbanOrRural: "RURAL";
|
199
218
|
village?: string | null | undefined;
|
200
219
|
}, {
|
201
220
|
country: string;
|
202
221
|
district: string;
|
222
|
+
addressType: "DOMESTIC";
|
203
223
|
province: string;
|
204
224
|
urbanOrRural: "RURAL";
|
205
225
|
village?: string | null | undefined;
|
206
|
-
}>, z.ZodObject<{
|
207
|
-
country: z.
|
226
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
227
|
+
country: z.ZodString;
|
228
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
208
229
|
state: z.ZodString;
|
209
230
|
district2: z.ZodString;
|
210
231
|
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -215,6 +236,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
215
236
|
}, "strip", z.ZodTypeAny, {
|
216
237
|
country: string;
|
217
238
|
state: string;
|
239
|
+
addressType: "INTERNATIONAL";
|
218
240
|
district2: string;
|
219
241
|
cityOrTown?: string | null | undefined;
|
220
242
|
addressLine1?: string | null | undefined;
|
@@ -224,6 +246,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
224
246
|
}, {
|
225
247
|
country: string;
|
226
248
|
state: string;
|
249
|
+
addressType: "INTERNATIONAL";
|
227
250
|
district2: string;
|
228
251
|
cityOrTown?: string | null | undefined;
|
229
252
|
addressLine1?: string | null | undefined;
|
@@ -235,11 +258,11 @@ export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
|
|
235
258
|
/**
|
236
259
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
237
260
|
* */
|
238
|
-
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
261
|
+
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
239
262
|
/**
|
240
263
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
241
264
|
*
|
242
265
|
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
243
266
|
* */
|
244
|
-
export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
267
|
+
export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
245
268
|
//# sourceMappingURL=FieldValue.d.ts.map
|