@opencrvs/toolkit 1.8.0-rc.fe799b0 → 1.8.0-rc.fe87a15

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.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +15282 -10293
  3. package/dist/commons/conditionals/conditionals.d.ts +33 -6
  4. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  5. package/dist/commons/conditionals/validate.d.ts +39 -17
  6. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  7. package/dist/commons/events/ActionConfig.d.ts +104405 -2019
  8. package/dist/commons/events/ActionDocument.d.ts +10075 -381
  9. package/dist/commons/events/ActionInput.d.ts +5486 -633
  10. package/dist/commons/events/ActionType.d.ts +27 -12
  11. package/dist/commons/events/AdvancedSearchConfig.d.ts +957 -22
  12. package/dist/commons/events/CompositeFieldValue.d.ts +155 -2
  13. package/dist/commons/events/Conditional.d.ts +21 -5
  14. package/dist/commons/events/Constants.d.ts +2 -0
  15. package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
  16. package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
  17. package/dist/commons/events/Draft.d.ts +384 -66
  18. package/dist/commons/events/EventConfig.d.ts +50285 -1826
  19. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  20. package/dist/commons/events/EventDocument.d.ts +3738 -522
  21. package/dist/commons/events/EventIndex.d.ts +1344 -15
  22. package/dist/commons/events/EventMetadata.d.ts +302 -13
  23. package/dist/commons/events/FieldConfig.d.ts +4831 -806
  24. package/dist/commons/events/FieldType.d.ts +7 -2
  25. package/dist/commons/events/FieldTypeMapping.d.ts +169 -8
  26. package/dist/commons/events/FieldValue.d.ts +84 -5
  27. package/dist/commons/events/FormConfig.d.ts +44104 -73
  28. package/dist/commons/events/PageConfig.d.ts +11061 -0
  29. package/dist/commons/events/SummaryConfig.d.ts +95 -39
  30. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  31. package/dist/commons/events/User.d.ts +31 -2
  32. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  33. package/dist/commons/events/WorkqueueConfig.d.ts +4525 -20
  34. package/dist/commons/events/defineConfig.d.ts +8087 -229
  35. package/dist/commons/events/event.d.ts +54 -0
  36. package/dist/commons/events/field.d.ts +73 -0
  37. package/dist/commons/events/index.d.ts +10 -1
  38. package/dist/commons/events/scopes.d.ts +45 -0
  39. package/dist/commons/events/serializer.d.ts +2 -0
  40. package/dist/commons/events/test.utils.d.ts +154 -243
  41. package/dist/commons/events/transactions.d.ts +1 -1
  42. package/dist/commons/events/utils.d.ts +3831 -69
  43. package/dist/commons/events/utils.test.d.ts +2 -0
  44. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  45. package/dist/conditionals/index.js +217 -109
  46. package/dist/events/index.js +4558 -1865
  47. package/dist/scopes/index.d.ts +158 -1
  48. package/dist/scopes/index.js +152 -1
  49. 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,7 +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" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE")[];
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];
28
+ /**
29
+ * Composite field types are field types that consist of multiple field values.
30
+ */
31
+ export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS")[];
27
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;
@@ -302,9 +453,9 @@ export declare const isTextAreaFieldType: (field: {
302
453
  };
303
454
  export declare const isSignatureFieldType: (field: {
304
455
  config: FieldConfig;
305
- value: FieldValue;
456
+ value: FieldValue | undefined;
306
457
  }) => field is {
307
- value: string;
458
+ value: FileFieldValue | undefined;
308
459
  config: SignatureField;
309
460
  };
310
461
  export declare const isEmailFieldType: (field: {
@@ -405,5 +556,15 @@ 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
+ };
566
+ export type NonInteractiveFieldType = Divider | PageHeader | Paragraph | BulletList | DataField;
567
+ export type InteractiveFieldType = Exclude<FieldConfig, NonInteractiveFieldType>;
568
+ export declare const isNonInteractiveFieldType: (field: FieldConfig) => field is NonInteractiveFieldType;
408
569
  export {};
409
570
  //# sourceMappingURL=FieldTypeMapping.d.ts.map
@@ -13,14 +13,21 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
13
13
  *
14
14
  */
15
15
  export declare const TextValue: z.ZodString;
16
- export declare const RequiredTextValue: z.ZodString;
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 FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
26
+ export declare const DataFieldValue: z.ZodUndefined;
27
+ export type DataFieldValue = z.infer<typeof DataFieldValue>;
28
+ export declare const SignatureFieldValue: z.ZodString;
29
+ export type SignatureFieldValue = z.infer<typeof SignatureFieldValue>;
30
+ 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
31
  filename: z.ZodString;
25
32
  originalFilename: z.ZodString;
26
33
  type: z.ZodString;
@@ -49,6 +56,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
49
56
  originalFilename: string;
50
57
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
51
58
  country: z.ZodString;
59
+ addressType: z.ZodLiteral<"DOMESTIC">;
52
60
  province: z.ZodString;
53
61
  district: z.ZodString;
54
62
  }, {
@@ -61,6 +69,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
61
69
  }>, "strip", z.ZodTypeAny, {
62
70
  country: string;
63
71
  district: string;
72
+ addressType: "DOMESTIC";
64
73
  province: string;
65
74
  urbanOrRural: "URBAN";
66
75
  number?: string | undefined;
@@ -71,6 +80,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
71
80
  }, {
72
81
  country: string;
73
82
  district: string;
83
+ addressType: "DOMESTIC";
74
84
  province: string;
75
85
  urbanOrRural: "URBAN";
76
86
  number?: string | undefined;
@@ -80,6 +90,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
80
90
  zipCode?: string | undefined;
81
91
  }>, z.ZodObject<z.objectUtil.extendShape<{
82
92
  country: z.ZodString;
93
+ addressType: z.ZodLiteral<"DOMESTIC">;
83
94
  province: z.ZodString;
84
95
  district: z.ZodString;
85
96
  }, {
@@ -88,18 +99,50 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
88
99
  }>, "strip", z.ZodTypeAny, {
89
100
  country: string;
90
101
  district: string;
102
+ addressType: "DOMESTIC";
91
103
  province: string;
92
104
  urbanOrRural: "RURAL";
93
105
  village?: string | undefined;
94
106
  }, {
95
107
  country: string;
96
108
  district: string;
109
+ addressType: "DOMESTIC";
97
110
  province: string;
98
111
  urbanOrRural: "RURAL";
99
112
  village?: string | undefined;
113
+ }>, z.ZodUndefined, z.ZodObject<{
114
+ country: z.ZodString;
115
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
116
+ state: z.ZodString;
117
+ district2: z.ZodString;
118
+ cityOrTown: z.ZodOptional<z.ZodString>;
119
+ addressLine1: z.ZodOptional<z.ZodString>;
120
+ addressLine2: z.ZodOptional<z.ZodString>;
121
+ addressLine3: z.ZodOptional<z.ZodString>;
122
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ country: string;
125
+ state: string;
126
+ addressType: "INTERNATIONAL";
127
+ district2: string;
128
+ cityOrTown?: string | undefined;
129
+ addressLine1?: string | undefined;
130
+ addressLine2?: string | undefined;
131
+ addressLine3?: string | undefined;
132
+ postcodeOrZip?: string | undefined;
133
+ }, {
134
+ country: string;
135
+ state: string;
136
+ addressType: "INTERNATIONAL";
137
+ district2: string;
138
+ cityOrTown?: string | undefined;
139
+ addressLine1?: string | undefined;
140
+ addressLine2?: string | undefined;
141
+ addressLine3?: string | undefined;
142
+ postcodeOrZip?: string | undefined;
100
143
  }>]>;
101
144
  export type FieldValue = z.infer<typeof FieldValue>;
102
- export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
145
+ 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
146
  filename: z.ZodString;
104
147
  originalFilename: z.ZodString;
105
148
  type: z.ZodString;
@@ -128,6 +171,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
128
171
  originalFilename: string;
129
172
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
130
173
  country: z.ZodString;
174
+ addressType: z.ZodLiteral<"DOMESTIC">;
131
175
  province: z.ZodString;
132
176
  district: z.ZodString;
133
177
  }, {
@@ -140,6 +184,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
140
184
  }>, "strip", z.ZodTypeAny, {
141
185
  country: string;
142
186
  district: string;
187
+ addressType: "DOMESTIC";
143
188
  province: string;
144
189
  urbanOrRural: "URBAN";
145
190
  number?: string | null | undefined;
@@ -150,6 +195,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
150
195
  }, {
151
196
  country: string;
152
197
  district: string;
198
+ addressType: "DOMESTIC";
153
199
  province: string;
154
200
  urbanOrRural: "URBAN";
155
201
  number?: string | null | undefined;
@@ -159,6 +205,7 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
159
205
  zipCode?: string | null | undefined;
160
206
  }>, z.ZodObject<z.objectUtil.extendShape<{
161
207
  country: z.ZodString;
208
+ addressType: z.ZodLiteral<"DOMESTIC">;
162
209
  province: z.ZodString;
163
210
  district: z.ZodString;
164
211
  }, {
@@ -167,25 +214,57 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
167
214
  }>, "strip", z.ZodTypeAny, {
168
215
  country: string;
169
216
  district: string;
217
+ addressType: "DOMESTIC";
170
218
  province: string;
171
219
  urbanOrRural: "RURAL";
172
220
  village?: string | null | undefined;
173
221
  }, {
174
222
  country: string;
175
223
  district: string;
224
+ addressType: "DOMESTIC";
176
225
  province: string;
177
226
  urbanOrRural: "RURAL";
178
227
  village?: string | null | undefined;
228
+ }>, z.ZodUndefined, z.ZodObject<{
229
+ country: z.ZodString;
230
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
231
+ state: z.ZodString;
232
+ district2: z.ZodString;
233
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ country: string;
240
+ state: string;
241
+ addressType: "INTERNATIONAL";
242
+ district2: string;
243
+ cityOrTown?: string | null | undefined;
244
+ addressLine1?: string | null | undefined;
245
+ addressLine2?: string | null | undefined;
246
+ addressLine3?: string | null | undefined;
247
+ postcodeOrZip?: string | null | undefined;
248
+ }, {
249
+ country: string;
250
+ state: string;
251
+ addressType: "INTERNATIONAL";
252
+ district2: string;
253
+ cityOrTown?: string | null | undefined;
254
+ addressLine1?: string | null | undefined;
255
+ addressLine2?: string | null | undefined;
256
+ addressLine3?: string | null | undefined;
257
+ postcodeOrZip?: string | null | undefined;
179
258
  }>]>;
180
259
  export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
181
260
  /**
182
261
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
183
262
  * */
184
- export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
263
+ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
185
264
  /**
186
265
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
187
266
  *
188
267
  * FieldValueInputSchema uses Input types which have set optional values as nullish
189
268
  * */
190
- export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
269
+ export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
191
270
  //# sourceMappingURL=FieldValue.d.ts.map