@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.fcf46fc
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 +6956 -9633
- package/dist/commons/conditionals/conditionals.d.ts +28 -5
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +46 -22
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +1116 -2067
- package/dist/commons/events/ActionDocument.d.ts +10571 -1388
- package/dist/commons/events/ActionInput.d.ts +6943 -2170
- package/dist/commons/events/ActionType.d.ts +27 -12
- package/dist/commons/events/CompositeFieldValue.d.ts +414 -0
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +499 -199
- package/dist/commons/events/EventConfig.d.ts +559 -1238
- package/dist/commons/events/EventConfigInput.d.ts +6 -3
- package/dist/commons/events/EventDocument.d.ts +4635 -1719
- package/dist/commons/events/EventIndex.d.ts +9 -6
- package/dist/commons/events/EventMetadata.d.ts +6 -3
- package/dist/commons/events/FieldConfig.d.ts +529 -74
- package/dist/commons/events/FieldType.d.ts +6 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +274 -39
- package/dist/commons/events/FieldValue.d.ts +136 -65
- package/dist/commons/events/FormConfig.d.ts +633 -48
- package/dist/commons/events/PageConfig.d.ts +335 -0
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/defineConfig.d.ts +91 -222
- package/dist/commons/events/index.d.ts +4 -1
- package/dist/commons/events/test.utils.d.ts +176 -243
- package/dist/commons/events/utils.d.ts +196 -70
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +166 -81
- package/dist/events/index.js +1679 -903
- package/package.json +1 -1
@@ -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" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "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" | "FILE" | "FILE_WITH_OPTIONS")[];
|
27
32
|
//# sourceMappingURL=FieldType.d.ts.map
|
@@ -1,18 +1,36 @@
|
|
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
|
-
import {
|
4
|
+
import { FieldValue, FieldUpdateValueSchema } from './FieldValue';
|
5
|
+
import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
|
5
6
|
/**
|
6
7
|
* FieldTypeMapping.ts should include functions that map field types to different formats dynamically.
|
7
8
|
* File is separated from FieldType and FieldConfig to avoid circular dependencies.
|
8
9
|
*
|
9
10
|
* We can move the specific mapFieldTypeTo* functions where they are used once the core fields are implemented.
|
10
11
|
*/
|
12
|
+
/**
|
13
|
+
* Optionality of a field is defined in FieldConfig, not in FieldValue.
|
14
|
+
* Allows for nullishness of a field value during validations based on FieldConfig.
|
15
|
+
*/
|
16
|
+
type NullishFieldValueSchema = z.ZodOptional<z.ZodNullable<FieldUpdateValueSchema>>;
|
11
17
|
/**
|
12
18
|
* Mapping of field types to Zod schema.
|
13
19
|
* Useful for building dynamic validations against FieldConfig
|
14
20
|
*/
|
15
|
-
export declare function mapFieldTypeToZod(type: FieldType, required?: boolean): z.ZodOptional<z.ZodString
|
21
|
+
export declare function mapFieldTypeToZod(type: FieldType, required?: boolean): z.ZodString | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodObject<{
|
22
|
+
filename: z.ZodString;
|
23
|
+
originalFilename: z.ZodString;
|
24
|
+
type: z.ZodString;
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
26
|
+
type: string;
|
27
|
+
filename: string;
|
28
|
+
originalFilename: string;
|
29
|
+
}, {
|
30
|
+
type: string;
|
31
|
+
filename: string;
|
32
|
+
originalFilename: string;
|
33
|
+
}> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
16
34
|
filename: z.ZodString;
|
17
35
|
originalFilename: z.ZodString;
|
18
36
|
type: z.ZodString;
|
@@ -24,57 +42,93 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
24
42
|
type: string;
|
25
43
|
filename: string;
|
26
44
|
originalFilename: string;
|
27
|
-
}
|
45
|
+
}>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
28
46
|
country: z.ZodString;
|
47
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
29
48
|
province: z.ZodString;
|
30
49
|
district: z.ZodString;
|
31
50
|
}, {
|
32
51
|
urbanOrRural: z.ZodLiteral<"URBAN">;
|
33
|
-
town: z.ZodOptional<z.ZodString
|
34
|
-
residentialArea: z.ZodOptional<z.ZodString
|
35
|
-
street: z.ZodOptional<z.ZodString
|
36
|
-
number: z.ZodOptional<z.ZodString
|
37
|
-
zipCode: z.ZodOptional<z.ZodString
|
52
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
53
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
54
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
55
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
56
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
38
57
|
}>, "strip", z.ZodTypeAny, {
|
39
58
|
country: string;
|
40
59
|
district: string;
|
60
|
+
addressType: "DOMESTIC";
|
41
61
|
province: string;
|
42
62
|
urbanOrRural: "URBAN";
|
43
|
-
number?: string | undefined;
|
44
|
-
town?: string | undefined;
|
45
|
-
residentialArea?: string | undefined;
|
46
|
-
street?: string | undefined;
|
47
|
-
zipCode?: string | undefined;
|
63
|
+
number?: string | null | undefined;
|
64
|
+
town?: string | null | undefined;
|
65
|
+
residentialArea?: string | null | undefined;
|
66
|
+
street?: string | null | undefined;
|
67
|
+
zipCode?: string | null | undefined;
|
48
68
|
}, {
|
49
69
|
country: string;
|
50
70
|
district: string;
|
71
|
+
addressType: "DOMESTIC";
|
51
72
|
province: string;
|
52
73
|
urbanOrRural: "URBAN";
|
53
|
-
number?: string | undefined;
|
54
|
-
town?: string | undefined;
|
55
|
-
residentialArea?: string | undefined;
|
56
|
-
street?: string | undefined;
|
57
|
-
zipCode?: string | undefined;
|
74
|
+
number?: string | null | undefined;
|
75
|
+
town?: string | null | undefined;
|
76
|
+
residentialArea?: string | null | undefined;
|
77
|
+
street?: string | null | undefined;
|
78
|
+
zipCode?: string | null | undefined;
|
58
79
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
59
80
|
country: z.ZodString;
|
81
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
60
82
|
province: z.ZodString;
|
61
83
|
district: z.ZodString;
|
62
84
|
}, {
|
63
85
|
urbanOrRural: z.ZodLiteral<"RURAL">;
|
64
|
-
village: z.ZodOptional<z.ZodString
|
86
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
65
87
|
}>, "strip", z.ZodTypeAny, {
|
66
88
|
country: string;
|
67
89
|
district: string;
|
90
|
+
addressType: "DOMESTIC";
|
68
91
|
province: string;
|
69
92
|
urbanOrRural: "RURAL";
|
70
|
-
village?: string | undefined;
|
93
|
+
village?: string | null | undefined;
|
71
94
|
}, {
|
72
95
|
country: string;
|
73
96
|
district: string;
|
97
|
+
addressType: "DOMESTIC";
|
74
98
|
province: string;
|
75
99
|
urbanOrRural: "RURAL";
|
76
|
-
village?: string | undefined;
|
77
|
-
}>]
|
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;
|
131
|
+
}>]> | z.ZodArray<z.ZodObject<{
|
78
132
|
filename: z.ZodString;
|
79
133
|
originalFilename: z.ZodString;
|
80
134
|
type: z.ZodString;
|
@@ -89,8 +143,109 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
89
143
|
option: string;
|
90
144
|
filename: string;
|
91
145
|
originalFilename: string;
|
92
|
-
}>, "many"
|
93
|
-
|
146
|
+
}>, "many"> | z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
147
|
+
filename: z.ZodString;
|
148
|
+
originalFilename: z.ZodString;
|
149
|
+
type: z.ZodString;
|
150
|
+
option: z.ZodString;
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
152
|
+
type: string;
|
153
|
+
option: string;
|
154
|
+
filename: string;
|
155
|
+
originalFilename: string;
|
156
|
+
}, {
|
157
|
+
type: string;
|
158
|
+
option: string;
|
159
|
+
filename: string;
|
160
|
+
originalFilename: string;
|
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<{
|
162
|
+
country: z.ZodString;
|
163
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
164
|
+
province: z.ZodString;
|
165
|
+
district: z.ZodString;
|
166
|
+
}, {
|
167
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
168
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
169
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
170
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
171
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
172
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
173
|
+
}>, "strip", z.ZodTypeAny, {
|
174
|
+
country: string;
|
175
|
+
district: string;
|
176
|
+
addressType: "DOMESTIC";
|
177
|
+
province: string;
|
178
|
+
urbanOrRural: "URBAN";
|
179
|
+
number?: string | null | undefined;
|
180
|
+
town?: string | null | undefined;
|
181
|
+
residentialArea?: string | null | undefined;
|
182
|
+
street?: string | null | undefined;
|
183
|
+
zipCode?: string | null | undefined;
|
184
|
+
}, {
|
185
|
+
country: string;
|
186
|
+
district: string;
|
187
|
+
addressType: "DOMESTIC";
|
188
|
+
province: string;
|
189
|
+
urbanOrRural: "URBAN";
|
190
|
+
number?: string | null | undefined;
|
191
|
+
town?: string | null | undefined;
|
192
|
+
residentialArea?: string | null | undefined;
|
193
|
+
street?: string | null | undefined;
|
194
|
+
zipCode?: string | null | undefined;
|
195
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
196
|
+
country: z.ZodString;
|
197
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
198
|
+
province: z.ZodString;
|
199
|
+
district: z.ZodString;
|
200
|
+
}, {
|
201
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
202
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
203
|
+
}>, "strip", z.ZodTypeAny, {
|
204
|
+
country: string;
|
205
|
+
district: string;
|
206
|
+
addressType: "DOMESTIC";
|
207
|
+
province: string;
|
208
|
+
urbanOrRural: "RURAL";
|
209
|
+
village?: string | null | undefined;
|
210
|
+
}, {
|
211
|
+
country: string;
|
212
|
+
district: string;
|
213
|
+
addressType: "DOMESTIC";
|
214
|
+
province: string;
|
215
|
+
urbanOrRural: "RURAL";
|
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;
|
247
|
+
}>]>>>;
|
248
|
+
export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {
|
94
249
|
[x: string]: string | number | boolean | {
|
95
250
|
type: string;
|
96
251
|
filename: string;
|
@@ -98,25 +253,37 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
98
253
|
} | {
|
99
254
|
country: string;
|
100
255
|
district: string;
|
256
|
+
addressType: "DOMESTIC";
|
101
257
|
province: string;
|
102
258
|
urbanOrRural: "URBAN";
|
103
|
-
number?: string | undefined;
|
104
|
-
town?: string | undefined;
|
105
|
-
residentialArea?: string | undefined;
|
106
|
-
street?: string | undefined;
|
107
|
-
zipCode?: string | undefined;
|
259
|
+
number?: string | null | undefined;
|
260
|
+
town?: string | null | undefined;
|
261
|
+
residentialArea?: string | null | undefined;
|
262
|
+
street?: string | null | undefined;
|
263
|
+
zipCode?: string | null | undefined;
|
108
264
|
} | {
|
109
265
|
country: string;
|
110
266
|
district: string;
|
267
|
+
addressType: "DOMESTIC";
|
111
268
|
province: string;
|
112
269
|
urbanOrRural: "RURAL";
|
113
|
-
village?: string | undefined;
|
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;
|
114
281
|
} | {
|
115
282
|
type: string;
|
116
283
|
option: string;
|
117
284
|
filename: string;
|
118
285
|
originalFilename: string;
|
119
|
-
}[] | undefined;
|
286
|
+
}[] | null | undefined;
|
120
287
|
}, {
|
121
288
|
[x: string]: string | number | boolean | {
|
122
289
|
type: string;
|
@@ -125,31 +292,44 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
125
292
|
} | {
|
126
293
|
country: string;
|
127
294
|
district: string;
|
295
|
+
addressType: "DOMESTIC";
|
128
296
|
province: string;
|
129
297
|
urbanOrRural: "URBAN";
|
130
|
-
number?: string | undefined;
|
131
|
-
town?: string | undefined;
|
132
|
-
residentialArea?: string | undefined;
|
133
|
-
street?: string | undefined;
|
134
|
-
zipCode?: string | undefined;
|
298
|
+
number?: string | null | undefined;
|
299
|
+
town?: string | null | undefined;
|
300
|
+
residentialArea?: string | null | undefined;
|
301
|
+
street?: string | null | undefined;
|
302
|
+
zipCode?: string | null | undefined;
|
135
303
|
} | {
|
136
304
|
country: string;
|
137
305
|
district: string;
|
306
|
+
addressType: "DOMESTIC";
|
138
307
|
province: string;
|
139
308
|
urbanOrRural: "RURAL";
|
140
|
-
village?: string | undefined;
|
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;
|
141
320
|
} | {
|
142
321
|
type: string;
|
143
322
|
option: string;
|
144
323
|
filename: string;
|
145
324
|
originalFilename: string;
|
146
|
-
}[] | undefined;
|
325
|
+
}[] | null | undefined;
|
147
326
|
}>;
|
148
327
|
/**
|
149
328
|
* Quick-and-dirty mock data generator for event actions.
|
150
329
|
*/
|
151
330
|
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
|
152
331
|
country: string;
|
332
|
+
addressType: "DOMESTIC";
|
153
333
|
province: string;
|
154
334
|
district: string;
|
155
335
|
urbanOrRural: string;
|
@@ -166,6 +346,53 @@ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number):
|
|
166
346
|
originalFilename: string;
|
167
347
|
type: string;
|
168
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;
|
169
396
|
province?: undefined;
|
170
397
|
district?: undefined;
|
171
398
|
urbanOrRural?: undefined;
|
@@ -322,4 +549,12 @@ export declare const isOfficeFieldType: (field: {
|
|
322
549
|
value: string;
|
323
550
|
config: Office;
|
324
551
|
};
|
552
|
+
export declare const isDataFieldType: (field: {
|
553
|
+
config: FieldConfig;
|
554
|
+
value: FieldValue;
|
555
|
+
}) => field is {
|
556
|
+
value: undefined;
|
557
|
+
config: DataField;
|
558
|
+
};
|
559
|
+
export {};
|
325
560
|
//# sourceMappingURL=FieldTypeMapping.d.ts.map
|