@opencrvs/toolkit 1.8.0-rc.f466707 → 1.8.0-rc.fc43738
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commons/api/router.d.ts +2498 -2498
- package/dist/commons/conditionals/conditionals.d.ts +2 -2
- package/dist/commons/conditionals/validate.d.ts +6 -6
- package/dist/commons/events/ActionDocument.d.ts +1110 -1117
- package/dist/commons/events/ActionInput.d.ts +1664 -1664
- package/dist/commons/events/Draft.d.ts +152 -152
- package/dist/commons/events/EventDocument.d.ts +1320 -1320
- package/dist/commons/events/EventIndex.d.ts +3 -3
- package/dist/commons/events/EventMetadata.d.ts +3 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +38 -122
- package/dist/commons/events/FieldValue.d.ts +65 -62
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/test.utils.d.ts +66 -72
- package/dist/commons/events/utils.d.ts +3 -3
- package/dist/events/index.js +409 -482
- package/package.json +1 -1
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -264
@@ -16,7 +16,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
|
|
16
16
|
createdBy: z.ZodString;
|
17
17
|
createdAtLocation: z.ZodString;
|
18
18
|
modifiedAt: z.ZodString;
|
19
|
-
assignedTo: z.
|
19
|
+
assignedTo: z.ZodNullable<z.ZodString>;
|
20
20
|
updatedBy: z.ZodString;
|
21
21
|
trackingId: z.ZodString;
|
22
22
|
}, {
|
@@ -29,10 +29,10 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
|
|
29
29
|
createdAt: string;
|
30
30
|
createdBy: string;
|
31
31
|
createdAtLocation: string;
|
32
|
+
assignedTo: string | null;
|
32
33
|
trackingId: string;
|
33
34
|
modifiedAt: string;
|
34
35
|
updatedBy: string;
|
35
|
-
assignedTo?: string | null | undefined;
|
36
36
|
}, {
|
37
37
|
type: string;
|
38
38
|
id: string;
|
@@ -41,10 +41,10 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
|
|
41
41
|
createdAt: string;
|
42
42
|
createdBy: string;
|
43
43
|
createdAtLocation: string;
|
44
|
+
assignedTo: string | null;
|
44
45
|
trackingId: string;
|
45
46
|
modifiedAt: string;
|
46
47
|
updatedBy: string;
|
47
|
-
assignedTo?: string | null | undefined;
|
48
48
|
}>;
|
49
49
|
export declare const EventSearchIndex: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{
|
50
50
|
type: z.ZodString;
|
@@ -47,7 +47,7 @@ export declare const EventMetadata: z.ZodObject<{
|
|
47
47
|
createdBy: z.ZodString;
|
48
48
|
createdAtLocation: z.ZodString;
|
49
49
|
modifiedAt: z.ZodString;
|
50
|
-
assignedTo: z.
|
50
|
+
assignedTo: z.ZodNullable<z.ZodString>;
|
51
51
|
updatedBy: z.ZodString;
|
52
52
|
trackingId: z.ZodString;
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
@@ -57,10 +57,10 @@ export declare const EventMetadata: z.ZodObject<{
|
|
57
57
|
createdAt: string;
|
58
58
|
createdBy: string;
|
59
59
|
createdAtLocation: string;
|
60
|
+
assignedTo: string | null;
|
60
61
|
trackingId: string;
|
61
62
|
modifiedAt: string;
|
62
63
|
updatedBy: string;
|
63
|
-
assignedTo?: string | null | undefined;
|
64
64
|
}, {
|
65
65
|
type: string;
|
66
66
|
id: string;
|
@@ -68,10 +68,10 @@ export declare const EventMetadata: z.ZodObject<{
|
|
68
68
|
createdAt: string;
|
69
69
|
createdBy: string;
|
70
70
|
createdAtLocation: string;
|
71
|
+
assignedTo: string | null;
|
71
72
|
trackingId: string;
|
72
73
|
modifiedAt: string;
|
73
74
|
updatedBy: string;
|
74
|
-
assignedTo?: string | null | undefined;
|
75
75
|
}>;
|
76
76
|
export type EventMetadata = z.infer<typeof EventMetadata>;
|
77
77
|
export type EventMetadataKeys = `event.${keyof EventMetadata}`;
|
@@ -1,24 +1,18 @@
|
|
1
1
|
import { z } from 'zod';
|
2
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';
|
3
3
|
import { FieldType } from './FieldType';
|
4
|
-
import { FieldValue,
|
5
|
-
import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
|
4
|
+
import { AddressFieldValue, FieldValue, FieldValueSchema, FileFieldValue, FileFieldWithOptionValue, OptionalFieldValueSchema } from './FieldValue';
|
6
5
|
/**
|
7
6
|
* FieldTypeMapping.ts should include functions that map field types to different formats dynamically.
|
8
7
|
* File is separated from FieldType and FieldConfig to avoid circular dependencies.
|
9
8
|
*
|
10
9
|
* We can move the specific mapFieldTypeTo* functions where they are used once the core fields are implemented.
|
11
10
|
*/
|
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>>;
|
17
11
|
/**
|
18
12
|
* Mapping of field types to Zod schema.
|
19
13
|
* Useful for building dynamic validations against FieldConfig
|
20
14
|
*/
|
21
|
-
export declare function mapFieldTypeToZod(type: FieldType, required?: boolean): z.ZodString | z.ZodOptional<z.
|
15
|
+
export declare function mapFieldTypeToZod(type: FieldType, required?: boolean): z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodObject<{
|
22
16
|
filename: z.ZodString;
|
23
17
|
originalFilename: z.ZodString;
|
24
18
|
type: z.ZodString;
|
@@ -30,69 +24,57 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
30
24
|
type: string;
|
31
25
|
filename: string;
|
32
26
|
originalFilename: string;
|
33
|
-
}
|
34
|
-
filename: z.ZodString;
|
35
|
-
originalFilename: z.ZodString;
|
36
|
-
type: z.ZodString;
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
38
|
-
type: string;
|
39
|
-
filename: string;
|
40
|
-
originalFilename: string;
|
41
|
-
}, {
|
42
|
-
type: string;
|
43
|
-
filename: string;
|
44
|
-
originalFilename: string;
|
45
|
-
}>>> | z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
27
|
+
}>> | z.ZodOptional<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
46
28
|
country: z.ZodString;
|
47
29
|
province: z.ZodString;
|
48
30
|
district: z.ZodString;
|
49
31
|
}, {
|
50
32
|
urbanOrRural: z.ZodLiteral<"URBAN">;
|
51
|
-
town: z.ZodOptional<z.
|
52
|
-
residentialArea: z.ZodOptional<z.
|
53
|
-
street: z.ZodOptional<z.
|
54
|
-
number: z.ZodOptional<z.
|
55
|
-
zipCode: z.ZodOptional<z.
|
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>;
|
56
38
|
}>, "strip", z.ZodTypeAny, {
|
57
39
|
country: string;
|
58
40
|
district: string;
|
59
41
|
province: string;
|
60
42
|
urbanOrRural: "URBAN";
|
61
|
-
number?: string |
|
62
|
-
town?: string |
|
63
|
-
residentialArea?: string |
|
64
|
-
street?: string |
|
65
|
-
zipCode?: string |
|
43
|
+
number?: string | undefined;
|
44
|
+
town?: string | undefined;
|
45
|
+
residentialArea?: string | undefined;
|
46
|
+
street?: string | undefined;
|
47
|
+
zipCode?: string | undefined;
|
66
48
|
}, {
|
67
49
|
country: string;
|
68
50
|
district: string;
|
69
51
|
province: string;
|
70
52
|
urbanOrRural: "URBAN";
|
71
|
-
number?: string |
|
72
|
-
town?: string |
|
73
|
-
residentialArea?: string |
|
74
|
-
street?: string |
|
75
|
-
zipCode?: string |
|
53
|
+
number?: string | undefined;
|
54
|
+
town?: string | undefined;
|
55
|
+
residentialArea?: string | undefined;
|
56
|
+
street?: string | undefined;
|
57
|
+
zipCode?: string | undefined;
|
76
58
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
77
59
|
country: z.ZodString;
|
78
60
|
province: z.ZodString;
|
79
61
|
district: z.ZodString;
|
80
62
|
}, {
|
81
63
|
urbanOrRural: z.ZodLiteral<"RURAL">;
|
82
|
-
village: z.ZodOptional<z.
|
64
|
+
village: z.ZodOptional<z.ZodString>;
|
83
65
|
}>, "strip", z.ZodTypeAny, {
|
84
66
|
country: string;
|
85
67
|
district: string;
|
86
68
|
province: string;
|
87
69
|
urbanOrRural: "RURAL";
|
88
|
-
village?: string |
|
70
|
+
village?: string | undefined;
|
89
71
|
}, {
|
90
72
|
country: string;
|
91
73
|
district: string;
|
92
74
|
province: string;
|
93
75
|
urbanOrRural: "RURAL";
|
94
|
-
village?: string |
|
95
|
-
}>]
|
76
|
+
village?: string | undefined;
|
77
|
+
}>]>> | z.ZodOptional<z.ZodArray<z.ZodObject<{
|
96
78
|
filename: z.ZodString;
|
97
79
|
originalFilename: z.ZodString;
|
98
80
|
type: z.ZodString;
|
@@ -107,73 +89,8 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
107
89
|
option: string;
|
108
90
|
filename: string;
|
109
91
|
originalFilename: string;
|
110
|
-
}>, "many"
|
111
|
-
|
112
|
-
originalFilename: z.ZodString;
|
113
|
-
type: z.ZodString;
|
114
|
-
option: z.ZodString;
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
116
|
-
type: string;
|
117
|
-
option: string;
|
118
|
-
filename: string;
|
119
|
-
originalFilename: string;
|
120
|
-
}, {
|
121
|
-
type: string;
|
122
|
-
option: string;
|
123
|
-
filename: string;
|
124
|
-
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<{
|
126
|
-
country: z.ZodString;
|
127
|
-
province: z.ZodString;
|
128
|
-
district: z.ZodString;
|
129
|
-
}, {
|
130
|
-
urbanOrRural: z.ZodLiteral<"URBAN">;
|
131
|
-
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
132
|
-
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
133
|
-
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
134
|
-
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
135
|
-
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
136
|
-
}>, "strip", z.ZodTypeAny, {
|
137
|
-
country: string;
|
138
|
-
district: string;
|
139
|
-
province: string;
|
140
|
-
urbanOrRural: "URBAN";
|
141
|
-
number?: string | null | undefined;
|
142
|
-
town?: string | null | undefined;
|
143
|
-
residentialArea?: string | null | undefined;
|
144
|
-
street?: string | null | undefined;
|
145
|
-
zipCode?: string | null | undefined;
|
146
|
-
}, {
|
147
|
-
country: string;
|
148
|
-
district: string;
|
149
|
-
province: string;
|
150
|
-
urbanOrRural: "URBAN";
|
151
|
-
number?: string | null | undefined;
|
152
|
-
town?: string | null | undefined;
|
153
|
-
residentialArea?: string | null | undefined;
|
154
|
-
street?: string | null | undefined;
|
155
|
-
zipCode?: string | null | undefined;
|
156
|
-
}>, z.ZodObject<z.objectUtil.extendShape<{
|
157
|
-
country: z.ZodString;
|
158
|
-
province: z.ZodString;
|
159
|
-
district: z.ZodString;
|
160
|
-
}, {
|
161
|
-
urbanOrRural: z.ZodLiteral<"RURAL">;
|
162
|
-
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
163
|
-
}>, "strip", z.ZodTypeAny, {
|
164
|
-
country: string;
|
165
|
-
district: string;
|
166
|
-
province: string;
|
167
|
-
urbanOrRural: "RURAL";
|
168
|
-
village?: string | null | undefined;
|
169
|
-
}, {
|
170
|
-
country: string;
|
171
|
-
district: string;
|
172
|
-
province: string;
|
173
|
-
urbanOrRural: "RURAL";
|
174
|
-
village?: string | null | undefined;
|
175
|
-
}>]>>>;
|
176
|
-
export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {
|
92
|
+
}>, "many">> | z.ZodOptional<z.ZodBoolean> | z.ZodOptional<z.ZodNumber> | FieldValueSchema;
|
93
|
+
export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldValueSchema | OptionalFieldValueSchema>, "strip", z.ZodTypeAny, {
|
177
94
|
[x: string]: string | number | boolean | {
|
178
95
|
type: string;
|
179
96
|
filename: string;
|
@@ -183,23 +100,23 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
183
100
|
district: string;
|
184
101
|
province: string;
|
185
102
|
urbanOrRural: "URBAN";
|
186
|
-
number?: string |
|
187
|
-
town?: string |
|
188
|
-
residentialArea?: string |
|
189
|
-
street?: string |
|
190
|
-
zipCode?: string |
|
103
|
+
number?: string | undefined;
|
104
|
+
town?: string | undefined;
|
105
|
+
residentialArea?: string | undefined;
|
106
|
+
street?: string | undefined;
|
107
|
+
zipCode?: string | undefined;
|
191
108
|
} | {
|
192
109
|
country: string;
|
193
110
|
district: string;
|
194
111
|
province: string;
|
195
112
|
urbanOrRural: "RURAL";
|
196
|
-
village?: string |
|
113
|
+
village?: string | undefined;
|
197
114
|
} | {
|
198
115
|
type: string;
|
199
116
|
option: string;
|
200
117
|
filename: string;
|
201
118
|
originalFilename: string;
|
202
|
-
}[] |
|
119
|
+
}[] | undefined;
|
203
120
|
}, {
|
204
121
|
[x: string]: string | number | boolean | {
|
205
122
|
type: string;
|
@@ -210,23 +127,23 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
210
127
|
district: string;
|
211
128
|
province: string;
|
212
129
|
urbanOrRural: "URBAN";
|
213
|
-
number?: string |
|
214
|
-
town?: string |
|
215
|
-
residentialArea?: string |
|
216
|
-
street?: string |
|
217
|
-
zipCode?: string |
|
130
|
+
number?: string | undefined;
|
131
|
+
town?: string | undefined;
|
132
|
+
residentialArea?: string | undefined;
|
133
|
+
street?: string | undefined;
|
134
|
+
zipCode?: string | undefined;
|
218
135
|
} | {
|
219
136
|
country: string;
|
220
137
|
district: string;
|
221
138
|
province: string;
|
222
139
|
urbanOrRural: "RURAL";
|
223
|
-
village?: string |
|
140
|
+
village?: string | undefined;
|
224
141
|
} | {
|
225
142
|
type: string;
|
226
143
|
option: string;
|
227
144
|
filename: string;
|
228
145
|
originalFilename: string;
|
229
|
-
}[] |
|
146
|
+
}[] | undefined;
|
230
147
|
}>;
|
231
148
|
/**
|
232
149
|
* Quick-and-dirty mock data generator for event actions.
|
@@ -405,5 +322,4 @@ export declare const isOfficeFieldType: (field: {
|
|
405
322
|
value: string;
|
406
323
|
config: Office;
|
407
324
|
};
|
408
|
-
export {};
|
409
325
|
//# sourceMappingURL=FieldTypeMapping.d.ts.map
|
@@ -1,26 +1,9 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
|
3
|
-
/**
|
4
|
-
* FieldValues defined in this file are primitive field values.
|
5
|
-
* FieldValues defined in CompositeFieldValue.ts are composed of multiple primitive field values (Address, File etc).
|
6
|
-
*
|
7
|
-
* FieldValue is a union of primitive and composite field values.
|
8
|
-
* FieldValue can never be null.
|
9
|
-
*
|
10
|
-
* FieldUpdateValue accepts null values for primitive field values when they are optional.
|
11
|
-
* API is build assuming partial (PATCH) updates. In order to edit and remove optional value, we need to accept null values.
|
12
|
-
* Omitting a field value in partial updates leaves it untouched.
|
13
|
-
*
|
14
|
-
*/
|
15
2
|
export declare const TextValue: z.ZodString;
|
16
3
|
export declare const RequiredTextValue: z.ZodString;
|
17
4
|
export declare const DateValue: z.ZodString;
|
18
5
|
export declare const EmailValue: z.ZodString;
|
19
|
-
export declare const
|
20
|
-
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
|
21
|
-
export declare const NumberFieldValue: z.ZodNumber;
|
22
|
-
export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
|
23
|
-
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
6
|
+
export declare const FileFieldValue: z.ZodObject<{
|
24
7
|
filename: z.ZodString;
|
25
8
|
originalFilename: z.ZodString;
|
26
9
|
type: z.ZodString;
|
@@ -32,22 +15,9 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
32
15
|
type: string;
|
33
16
|
filename: string;
|
34
17
|
originalFilename: string;
|
35
|
-
}
|
36
|
-
|
37
|
-
|
38
|
-
type: z.ZodString;
|
39
|
-
option: z.ZodString;
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
41
|
-
type: string;
|
42
|
-
option: string;
|
43
|
-
filename: string;
|
44
|
-
originalFilename: string;
|
45
|
-
}, {
|
46
|
-
type: string;
|
47
|
-
option: string;
|
48
|
-
filename: string;
|
49
|
-
originalFilename: string;
|
50
|
-
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
18
|
+
}>;
|
19
|
+
export type FileFieldValue = z.infer<typeof FileFieldValue>;
|
20
|
+
export declare const AddressFieldValue: z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
51
21
|
country: z.ZodString;
|
52
22
|
province: z.ZodString;
|
53
23
|
district: z.ZodString;
|
@@ -98,8 +68,46 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
98
68
|
urbanOrRural: "RURAL";
|
99
69
|
village?: string | undefined;
|
100
70
|
}>]>;
|
101
|
-
export type
|
102
|
-
export declare const
|
71
|
+
export type AddressFieldValue = z.infer<typeof AddressFieldValue>;
|
72
|
+
export declare const FileFieldValueWithOption: z.ZodObject<{
|
73
|
+
filename: z.ZodString;
|
74
|
+
originalFilename: z.ZodString;
|
75
|
+
type: z.ZodString;
|
76
|
+
option: z.ZodString;
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
78
|
+
type: string;
|
79
|
+
option: string;
|
80
|
+
filename: string;
|
81
|
+
originalFilename: string;
|
82
|
+
}, {
|
83
|
+
type: string;
|
84
|
+
option: string;
|
85
|
+
filename: string;
|
86
|
+
originalFilename: string;
|
87
|
+
}>;
|
88
|
+
export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
|
89
|
+
export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
|
90
|
+
filename: z.ZodString;
|
91
|
+
originalFilename: z.ZodString;
|
92
|
+
type: z.ZodString;
|
93
|
+
option: z.ZodString;
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
95
|
+
type: string;
|
96
|
+
option: string;
|
97
|
+
filename: string;
|
98
|
+
originalFilename: string;
|
99
|
+
}, {
|
100
|
+
type: string;
|
101
|
+
option: string;
|
102
|
+
filename: string;
|
103
|
+
originalFilename: string;
|
104
|
+
}>, "many">;
|
105
|
+
export type FileFieldWithOptionValue = z.infer<typeof FileFieldWithOptionValue>;
|
106
|
+
export declare const CheckboxFieldValue: z.ZodBoolean;
|
107
|
+
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
|
108
|
+
export declare const NumberFieldValue: z.ZodNumber;
|
109
|
+
export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
|
110
|
+
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodObject<{
|
103
111
|
filename: z.ZodString;
|
104
112
|
originalFilename: z.ZodString;
|
105
113
|
type: z.ZodString;
|
@@ -126,66 +134,61 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
|
|
126
134
|
option: string;
|
127
135
|
filename: string;
|
128
136
|
originalFilename: string;
|
129
|
-
}>, "many">, z.ZodObject<z.objectUtil.extendShape<{
|
137
|
+
}>, "many">, z.ZodBoolean, z.ZodNumber, z.ZodObject<z.objectUtil.extendShape<{
|
130
138
|
country: z.ZodString;
|
131
139
|
province: z.ZodString;
|
132
140
|
district: z.ZodString;
|
133
141
|
}, {
|
134
142
|
urbanOrRural: z.ZodLiteral<"URBAN">;
|
135
|
-
town: z.ZodOptional<z.
|
136
|
-
residentialArea: z.ZodOptional<z.
|
137
|
-
street: z.ZodOptional<z.
|
138
|
-
number: z.ZodOptional<z.
|
139
|
-
zipCode: z.ZodOptional<z.
|
143
|
+
town: z.ZodOptional<z.ZodString>;
|
144
|
+
residentialArea: z.ZodOptional<z.ZodString>;
|
145
|
+
street: z.ZodOptional<z.ZodString>;
|
146
|
+
number: z.ZodOptional<z.ZodString>;
|
147
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
140
148
|
}>, "strip", z.ZodTypeAny, {
|
141
149
|
country: string;
|
142
150
|
district: string;
|
143
151
|
province: string;
|
144
152
|
urbanOrRural: "URBAN";
|
145
|
-
number?: string |
|
146
|
-
town?: string |
|
147
|
-
residentialArea?: string |
|
148
|
-
street?: string |
|
149
|
-
zipCode?: string |
|
153
|
+
number?: string | undefined;
|
154
|
+
town?: string | undefined;
|
155
|
+
residentialArea?: string | undefined;
|
156
|
+
street?: string | undefined;
|
157
|
+
zipCode?: string | undefined;
|
150
158
|
}, {
|
151
159
|
country: string;
|
152
160
|
district: string;
|
153
161
|
province: string;
|
154
162
|
urbanOrRural: "URBAN";
|
155
|
-
number?: string |
|
156
|
-
town?: string |
|
157
|
-
residentialArea?: string |
|
158
|
-
street?: string |
|
159
|
-
zipCode?: string |
|
163
|
+
number?: string | undefined;
|
164
|
+
town?: string | undefined;
|
165
|
+
residentialArea?: string | undefined;
|
166
|
+
street?: string | undefined;
|
167
|
+
zipCode?: string | undefined;
|
160
168
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
161
169
|
country: z.ZodString;
|
162
170
|
province: z.ZodString;
|
163
171
|
district: z.ZodString;
|
164
172
|
}, {
|
165
173
|
urbanOrRural: z.ZodLiteral<"RURAL">;
|
166
|
-
village: z.ZodOptional<z.
|
174
|
+
village: z.ZodOptional<z.ZodString>;
|
167
175
|
}>, "strip", z.ZodTypeAny, {
|
168
176
|
country: string;
|
169
177
|
district: string;
|
170
178
|
province: string;
|
171
179
|
urbanOrRural: "RURAL";
|
172
|
-
village?: string |
|
180
|
+
village?: string | undefined;
|
173
181
|
}, {
|
174
182
|
country: string;
|
175
183
|
district: string;
|
176
184
|
province: string;
|
177
185
|
urbanOrRural: "RURAL";
|
178
|
-
village?: string |
|
186
|
+
village?: string | undefined;
|
179
187
|
}>]>;
|
180
|
-
export type
|
188
|
+
export type FieldValue = z.infer<typeof FieldValue>;
|
181
189
|
/**
|
182
190
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
183
191
|
* */
|
184
192
|
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
185
|
-
|
186
|
-
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
187
|
-
*
|
188
|
-
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
189
|
-
* */
|
190
|
-
export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
|
193
|
+
export type OptionalFieldValueSchema = z.ZodOptional<FieldValueSchema>;
|
191
194
|
//# sourceMappingURL=FieldValue.d.ts.map
|
@@ -15,7 +15,6 @@ export * from './ActionDocument';
|
|
15
15
|
export * from './EventIndex';
|
16
16
|
export * from './TranslationConfig';
|
17
17
|
export * from './FieldValue';
|
18
|
-
export * from './CompositeFieldValue';
|
19
18
|
export * from './state';
|
20
19
|
export * from './utils';
|
21
20
|
export * from './defineConfig';
|