@opencrvs/toolkit 1.8.0-rc.ff2e7b6 → 1.8.0-rc.ff5b3f3
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 +14000 -10258
- package/dist/commons/conditionals/conditionals.d.ts +31 -5
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +39 -17
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +96433 -2024
- package/dist/commons/events/ActionDocument.d.ts +9819 -312
- package/dist/commons/events/ActionInput.d.ts +5362 -497
- package/dist/commons/events/ActionType.d.ts +26 -11
- package/dist/commons/events/AdvancedSearchConfig.d.ts +957 -22
- package/dist/commons/events/CompositeFieldValue.d.ts +155 -2
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +367 -51
- package/dist/commons/events/EventConfig.d.ts +46117 -1819
- package/dist/commons/events/EventConfigInput.d.ts +6 -3
- package/dist/commons/events/EventDocument.d.ts +3521 -424
- package/dist/commons/events/EventIndex.d.ts +1735 -10
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +274 -8
- package/dist/commons/events/FieldConfig.d.ts +4765 -787
- package/dist/commons/events/FieldType.d.ts +4 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +164 -6
- package/dist/commons/events/FieldValue.d.ts +82 -5
- package/dist/commons/events/FormConfig.d.ts +43810 -73
- package/dist/commons/events/PageConfig.d.ts +10991 -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 +1549 -19
- package/dist/commons/events/defineConfig.d.ts +7282 -230
- package/dist/commons/events/event.d.ts +54 -0
- package/dist/commons/events/field.d.ts +82 -0
- package/dist/commons/events/index.d.ts +5 -1
- package/dist/commons/events/scopes.d.ts +45 -0
- package/dist/commons/events/test.utils.d.ts +129 -239
- package/dist/commons/events/utils.d.ts +3793 -73
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +196 -108
- package/dist/events/index.js +3033 -1382
- package/dist/scopes/index.d.ts +158 -1
- package/dist/scopes/index.js +152 -1
- 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';
|
@@ -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.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<{
|
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,15 +264,26 @@ 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;
|
200
284
|
filename: string;
|
201
285
|
originalFilename: string;
|
202
|
-
}[] | null | undefined;
|
286
|
+
}[] | [string, string] | null | undefined;
|
203
287
|
}, {
|
204
288
|
[x: string]: string | number | boolean | {
|
205
289
|
type: 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,21 +303,33 @@ 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;
|
227
323
|
filename: string;
|
228
324
|
originalFilename: string;
|
229
|
-
}[] | null | undefined;
|
325
|
+
}[] | [string, string] | null | undefined;
|
230
326
|
}>;
|
231
327
|
/**
|
232
328
|
* Quick-and-dirty mock data generator for event actions.
|
233
329
|
*/
|
234
|
-
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
|
330
|
+
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | string[] | 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;
|
@@ -272,6 +416,13 @@ export declare const isDateFieldType: (field: {
|
|
272
416
|
value: string;
|
273
417
|
config: DateField;
|
274
418
|
};
|
419
|
+
export declare const isDateRangeFieldType: (field: {
|
420
|
+
config: FieldConfig;
|
421
|
+
value: FieldValue;
|
422
|
+
}) => field is {
|
423
|
+
value: string;
|
424
|
+
config: DateField;
|
425
|
+
};
|
275
426
|
export declare const isPageHeaderFieldType: (field: {
|
276
427
|
config: FieldConfig;
|
277
428
|
value: FieldValue;
|
@@ -405,5 +556,12 @@ export declare const isOfficeFieldType: (field: {
|
|
405
556
|
value: string;
|
406
557
|
config: Office;
|
407
558
|
};
|
559
|
+
export declare const isDataFieldType: (field: {
|
560
|
+
config: FieldConfig;
|
561
|
+
value: FieldValue;
|
562
|
+
}) => field is {
|
563
|
+
value: undefined;
|
564
|
+
config: DataField;
|
565
|
+
};
|
408
566
|
export {};
|
409
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;
|
@@ -49,6 +54,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
49
54
|
originalFilename: string;
|
50
55
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
51
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;
|
@@ -80,6 +88,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
80
88
|
zipCode?: string | undefined;
|
81
89
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
82
90
|
country: z.ZodString;
|
91
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
83
92
|
province: z.ZodString;
|
84
93
|
district: z.ZodString;
|
85
94
|
}, {
|
@@ -88,18 +97,50 @@ 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;
|
111
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
112
|
+
country: z.ZodString;
|
113
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
114
|
+
state: z.ZodString;
|
115
|
+
district2: z.ZodString;
|
116
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
117
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
118
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
119
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
120
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
122
|
+
country: string;
|
123
|
+
state: string;
|
124
|
+
addressType: "INTERNATIONAL";
|
125
|
+
district2: string;
|
126
|
+
cityOrTown?: string | undefined;
|
127
|
+
addressLine1?: string | undefined;
|
128
|
+
addressLine2?: string | undefined;
|
129
|
+
addressLine3?: string | undefined;
|
130
|
+
postcodeOrZip?: string | undefined;
|
131
|
+
}, {
|
132
|
+
country: string;
|
133
|
+
state: string;
|
134
|
+
addressType: "INTERNATIONAL";
|
135
|
+
district2: string;
|
136
|
+
cityOrTown?: string | undefined;
|
137
|
+
addressLine1?: string | undefined;
|
138
|
+
addressLine2?: string | undefined;
|
139
|
+
addressLine3?: string | undefined;
|
140
|
+
postcodeOrZip?: string | undefined;
|
100
141
|
}>]>;
|
101
142
|
export type FieldValue = z.infer<typeof FieldValue>;
|
102
|
-
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<{
|
103
144
|
filename: z.ZodString;
|
104
145
|
originalFilename: z.ZodString;
|
105
146
|
type: z.ZodString;
|
@@ -128,6 +169,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
128
169
|
originalFilename: string;
|
129
170
|
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
130
171
|
country: z.ZodString;
|
172
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
131
173
|
province: z.ZodString;
|
132
174
|
district: z.ZodString;
|
133
175
|
}, {
|
@@ -140,6 +182,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
140
182
|
}>, "strip", z.ZodTypeAny, {
|
141
183
|
country: string;
|
142
184
|
district: string;
|
185
|
+
addressType: "DOMESTIC";
|
143
186
|
province: string;
|
144
187
|
urbanOrRural: "URBAN";
|
145
188
|
number?: string | null | undefined;
|
@@ -150,6 +193,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
150
193
|
}, {
|
151
194
|
country: string;
|
152
195
|
district: string;
|
196
|
+
addressType: "DOMESTIC";
|
153
197
|
province: string;
|
154
198
|
urbanOrRural: "URBAN";
|
155
199
|
number?: string | null | undefined;
|
@@ -159,6 +203,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
159
203
|
zipCode?: string | null | undefined;
|
160
204
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
161
205
|
country: z.ZodString;
|
206
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
162
207
|
province: z.ZodString;
|
163
208
|
district: z.ZodString;
|
164
209
|
}, {
|
@@ -167,25 +212,57 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
167
212
|
}>, "strip", z.ZodTypeAny, {
|
168
213
|
country: string;
|
169
214
|
district: string;
|
215
|
+
addressType: "DOMESTIC";
|
170
216
|
province: string;
|
171
217
|
urbanOrRural: "RURAL";
|
172
218
|
village?: string | null | undefined;
|
173
219
|
}, {
|
174
220
|
country: string;
|
175
221
|
district: string;
|
222
|
+
addressType: "DOMESTIC";
|
176
223
|
province: string;
|
177
224
|
urbanOrRural: "RURAL";
|
178
225
|
village?: string | null | undefined;
|
226
|
+
}>, z.ZodUndefined, z.ZodObject<{
|
227
|
+
country: z.ZodString;
|
228
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
229
|
+
state: z.ZodString;
|
230
|
+
district2: z.ZodString;
|
231
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
232
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
233
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
234
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
235
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
237
|
+
country: string;
|
238
|
+
state: string;
|
239
|
+
addressType: "INTERNATIONAL";
|
240
|
+
district2: string;
|
241
|
+
cityOrTown?: string | null | undefined;
|
242
|
+
addressLine1?: string | null | undefined;
|
243
|
+
addressLine2?: string | null | undefined;
|
244
|
+
addressLine3?: string | null | undefined;
|
245
|
+
postcodeOrZip?: string | null | undefined;
|
246
|
+
}, {
|
247
|
+
country: string;
|
248
|
+
state: string;
|
249
|
+
addressType: "INTERNATIONAL";
|
250
|
+
district2: string;
|
251
|
+
cityOrTown?: string | null | undefined;
|
252
|
+
addressLine1?: string | null | undefined;
|
253
|
+
addressLine2?: string | null | undefined;
|
254
|
+
addressLine3?: string | null | undefined;
|
255
|
+
postcodeOrZip?: string | null | undefined;
|
179
256
|
}>]>;
|
180
257
|
export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
|
181
258
|
/**
|
182
259
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
183
260
|
* */
|
184
|
-
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;
|
185
262
|
/**
|
186
263
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
187
264
|
*
|
188
265
|
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
189
266
|
* */
|
190
|
-
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;
|
191
268
|
//# sourceMappingURL=FieldValue.d.ts.map
|