@opencrvs/toolkit 1.8.0-rc.fc43738 → 1.8.0-rc.fd071dc
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 +6945 -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 +44 -16
- 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 +10565 -1388
- package/dist/commons/events/ActionInput.d.ts +6853 -2170
- package/dist/commons/events/ActionType.d.ts +25 -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 +496 -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 +4630 -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/User.d.ts +1 -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 +175 -242
- package/dist/commons/events/utils.d.ts +188 -70
- package/dist/conditionals/index.js +166 -81
- package/dist/events/index.js +1589 -883
- package/package.json +1 -1
@@ -1,24 +1,37 @@
|
|
1
|
+
import { z } from 'zod';
|
1
2
|
/**
|
2
3
|
* Actions recognized by the system
|
3
4
|
*/
|
4
5
|
export declare const ActionType: {
|
6
|
+
readonly DELETE: "DELETE";
|
5
7
|
readonly CREATE: "CREATE";
|
6
|
-
readonly ASSIGN: "ASSIGN";
|
7
|
-
readonly UNASSIGN: "UNASSIGN";
|
8
|
-
readonly REGISTER: "REGISTER";
|
9
|
-
readonly VALIDATE: "VALIDATE";
|
10
|
-
readonly REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
11
|
-
readonly REJECT_CORRECTION: "REJECT_CORRECTION";
|
12
|
-
readonly APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
13
|
-
readonly DETECT_DUPLICATE: "DETECT_DUPLICATE";
|
14
8
|
readonly NOTIFY: "NOTIFY";
|
15
9
|
readonly DECLARE: "DECLARE";
|
16
|
-
readonly
|
17
|
-
readonly
|
18
|
-
readonly
|
10
|
+
readonly VALIDATE: "VALIDATE";
|
11
|
+
readonly REGISTER: "REGISTER";
|
12
|
+
readonly DETECT_DUPLICATE: "DETECT_DUPLICATE";
|
19
13
|
readonly REJECT: "REJECT";
|
20
14
|
readonly MARKED_AS_DUPLICATE: "MARKED_AS_DUPLICATE";
|
21
|
-
readonly
|
15
|
+
readonly ARCHIVE: "ARCHIVE";
|
16
|
+
readonly PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
17
|
+
readonly REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
18
|
+
readonly REJECT_CORRECTION: "REJECT_CORRECTION";
|
19
|
+
readonly APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
20
|
+
readonly READ: "READ";
|
21
|
+
readonly ASSIGN: "ASSIGN";
|
22
|
+
readonly UNASSIGN: "UNASSIGN";
|
22
23
|
};
|
23
24
|
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
|
25
|
+
export declare const ConfirmableActions: readonly ["NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE"];
|
26
|
+
/** Testing building types from enums as an alternative */
|
27
|
+
export declare const ActionTypes: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
28
|
+
/** Actions which change event data (declaration) before registration / during declaration. */
|
29
|
+
export declare const DeclarationActions: z.ZodEnum<["DECLARE", "VALIDATE", "REGISTER"]>;
|
30
|
+
export type DeclarationActionType = z.infer<typeof DeclarationActions>;
|
31
|
+
/** Actions that can modify declaration data. Request can be corrected after declaring it. */
|
32
|
+
export declare const DeclarationUpdateActions: z.ZodEnum<["DECLARE", "VALIDATE", "REGISTER", "REQUEST_CORRECTION"]>;
|
33
|
+
export type DeclarationUpdateActionType = z.infer<typeof DeclarationUpdateActions>;
|
34
|
+
/** Actions which update annotation or status of an event. */
|
35
|
+
export declare const annotationActions: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
36
|
+
export type AnnotationActionType = z.infer<typeof annotationActions>;
|
24
37
|
//# sourceMappingURL=ActionType.d.ts.map
|
@@ -0,0 +1,414 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
/**
|
3
|
+
* Composite field value consists of multiple field values.
|
4
|
+
*/
|
5
|
+
export declare const GeographicalArea: {
|
6
|
+
readonly URBAN: "URBAN";
|
7
|
+
readonly RURAL: "RURAL";
|
8
|
+
};
|
9
|
+
export declare const AddressType: {
|
10
|
+
readonly DOMESTIC: "DOMESTIC";
|
11
|
+
readonly INTERNATIONAL: "INTERNATIONAL";
|
12
|
+
};
|
13
|
+
export declare const FileFieldValue: z.ZodObject<{
|
14
|
+
filename: z.ZodString;
|
15
|
+
originalFilename: z.ZodString;
|
16
|
+
type: z.ZodString;
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
18
|
+
type: string;
|
19
|
+
filename: string;
|
20
|
+
originalFilename: string;
|
21
|
+
}, {
|
22
|
+
type: string;
|
23
|
+
filename: string;
|
24
|
+
originalFilename: string;
|
25
|
+
}>;
|
26
|
+
export type FileFieldValue = z.infer<typeof FileFieldValue>;
|
27
|
+
export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
28
|
+
country: z.ZodString;
|
29
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
30
|
+
province: z.ZodString;
|
31
|
+
district: z.ZodString;
|
32
|
+
}, {
|
33
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
34
|
+
town: z.ZodOptional<z.ZodString>;
|
35
|
+
residentialArea: z.ZodOptional<z.ZodString>;
|
36
|
+
street: z.ZodOptional<z.ZodString>;
|
37
|
+
number: z.ZodOptional<z.ZodString>;
|
38
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
39
|
+
}>, "strip", z.ZodTypeAny, {
|
40
|
+
country: string;
|
41
|
+
district: string;
|
42
|
+
addressType: "DOMESTIC";
|
43
|
+
province: string;
|
44
|
+
urbanOrRural: "URBAN";
|
45
|
+
number?: string | undefined;
|
46
|
+
town?: string | undefined;
|
47
|
+
residentialArea?: string | undefined;
|
48
|
+
street?: string | undefined;
|
49
|
+
zipCode?: string | undefined;
|
50
|
+
}, {
|
51
|
+
country: string;
|
52
|
+
district: string;
|
53
|
+
addressType: "DOMESTIC";
|
54
|
+
province: string;
|
55
|
+
urbanOrRural: "URBAN";
|
56
|
+
number?: string | undefined;
|
57
|
+
town?: string | undefined;
|
58
|
+
residentialArea?: string | undefined;
|
59
|
+
street?: string | undefined;
|
60
|
+
zipCode?: string | undefined;
|
61
|
+
}>;
|
62
|
+
export declare const RuralAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
63
|
+
country: z.ZodString;
|
64
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
65
|
+
province: z.ZodString;
|
66
|
+
district: z.ZodString;
|
67
|
+
}, {
|
68
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
69
|
+
village: z.ZodOptional<z.ZodString>;
|
70
|
+
}>, "strip", z.ZodTypeAny, {
|
71
|
+
country: string;
|
72
|
+
district: string;
|
73
|
+
addressType: "DOMESTIC";
|
74
|
+
province: string;
|
75
|
+
urbanOrRural: "RURAL";
|
76
|
+
village?: string | undefined;
|
77
|
+
}, {
|
78
|
+
country: string;
|
79
|
+
district: string;
|
80
|
+
addressType: "DOMESTIC";
|
81
|
+
province: string;
|
82
|
+
urbanOrRural: "RURAL";
|
83
|
+
village?: string | undefined;
|
84
|
+
}>;
|
85
|
+
export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
86
|
+
country: z.ZodString;
|
87
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
88
|
+
province: z.ZodString;
|
89
|
+
district: z.ZodString;
|
90
|
+
}, {
|
91
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
92
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
93
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
94
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
95
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
96
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
97
|
+
}>, "strip", z.ZodTypeAny, {
|
98
|
+
country: string;
|
99
|
+
district: string;
|
100
|
+
addressType: "DOMESTIC";
|
101
|
+
province: string;
|
102
|
+
urbanOrRural: "URBAN";
|
103
|
+
number?: string | null | undefined;
|
104
|
+
town?: string | null | undefined;
|
105
|
+
residentialArea?: string | null | undefined;
|
106
|
+
street?: string | null | undefined;
|
107
|
+
zipCode?: string | null | undefined;
|
108
|
+
}, {
|
109
|
+
country: string;
|
110
|
+
district: string;
|
111
|
+
addressType: "DOMESTIC";
|
112
|
+
province: string;
|
113
|
+
urbanOrRural: "URBAN";
|
114
|
+
number?: string | null | undefined;
|
115
|
+
town?: string | null | undefined;
|
116
|
+
residentialArea?: string | null | undefined;
|
117
|
+
street?: string | null | undefined;
|
118
|
+
zipCode?: string | null | undefined;
|
119
|
+
}>;
|
120
|
+
export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
121
|
+
country: z.ZodString;
|
122
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
123
|
+
province: z.ZodString;
|
124
|
+
district: z.ZodString;
|
125
|
+
}, {
|
126
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
127
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
128
|
+
}>, "strip", z.ZodTypeAny, {
|
129
|
+
country: string;
|
130
|
+
district: string;
|
131
|
+
addressType: "DOMESTIC";
|
132
|
+
province: string;
|
133
|
+
urbanOrRural: "RURAL";
|
134
|
+
village?: string | null | undefined;
|
135
|
+
}, {
|
136
|
+
country: string;
|
137
|
+
district: string;
|
138
|
+
addressType: "DOMESTIC";
|
139
|
+
province: string;
|
140
|
+
urbanOrRural: "RURAL";
|
141
|
+
village?: string | null | undefined;
|
142
|
+
}>;
|
143
|
+
export declare const GenericAddressValue: z.ZodObject<{
|
144
|
+
country: z.ZodString;
|
145
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
146
|
+
state: z.ZodString;
|
147
|
+
district2: z.ZodString;
|
148
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
149
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
150
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
151
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
152
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
154
|
+
country: string;
|
155
|
+
state: string;
|
156
|
+
addressType: "INTERNATIONAL";
|
157
|
+
district2: string;
|
158
|
+
cityOrTown?: string | undefined;
|
159
|
+
addressLine1?: string | undefined;
|
160
|
+
addressLine2?: string | undefined;
|
161
|
+
addressLine3?: string | undefined;
|
162
|
+
postcodeOrZip?: string | undefined;
|
163
|
+
}, {
|
164
|
+
country: string;
|
165
|
+
state: string;
|
166
|
+
addressType: "INTERNATIONAL";
|
167
|
+
district2: string;
|
168
|
+
cityOrTown?: string | undefined;
|
169
|
+
addressLine1?: string | undefined;
|
170
|
+
addressLine2?: string | undefined;
|
171
|
+
addressLine3?: string | undefined;
|
172
|
+
postcodeOrZip?: string | undefined;
|
173
|
+
}>;
|
174
|
+
export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
175
|
+
country: z.ZodString;
|
176
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
177
|
+
province: z.ZodString;
|
178
|
+
district: z.ZodString;
|
179
|
+
}, {
|
180
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
181
|
+
town: z.ZodOptional<z.ZodString>;
|
182
|
+
residentialArea: z.ZodOptional<z.ZodString>;
|
183
|
+
street: z.ZodOptional<z.ZodString>;
|
184
|
+
number: z.ZodOptional<z.ZodString>;
|
185
|
+
zipCode: z.ZodOptional<z.ZodString>;
|
186
|
+
}>, "strip", z.ZodTypeAny, {
|
187
|
+
country: string;
|
188
|
+
district: string;
|
189
|
+
addressType: "DOMESTIC";
|
190
|
+
province: string;
|
191
|
+
urbanOrRural: "URBAN";
|
192
|
+
number?: string | undefined;
|
193
|
+
town?: string | undefined;
|
194
|
+
residentialArea?: string | undefined;
|
195
|
+
street?: string | undefined;
|
196
|
+
zipCode?: string | undefined;
|
197
|
+
}, {
|
198
|
+
country: string;
|
199
|
+
district: string;
|
200
|
+
addressType: "DOMESTIC";
|
201
|
+
province: string;
|
202
|
+
urbanOrRural: "URBAN";
|
203
|
+
number?: string | undefined;
|
204
|
+
town?: string | undefined;
|
205
|
+
residentialArea?: string | undefined;
|
206
|
+
street?: string | undefined;
|
207
|
+
zipCode?: string | undefined;
|
208
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
209
|
+
country: z.ZodString;
|
210
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
211
|
+
province: z.ZodString;
|
212
|
+
district: z.ZodString;
|
213
|
+
}, {
|
214
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
215
|
+
village: z.ZodOptional<z.ZodString>;
|
216
|
+
}>, "strip", z.ZodTypeAny, {
|
217
|
+
country: string;
|
218
|
+
district: string;
|
219
|
+
addressType: "DOMESTIC";
|
220
|
+
province: string;
|
221
|
+
urbanOrRural: "RURAL";
|
222
|
+
village?: string | undefined;
|
223
|
+
}, {
|
224
|
+
country: string;
|
225
|
+
district: string;
|
226
|
+
addressType: "DOMESTIC";
|
227
|
+
province: string;
|
228
|
+
urbanOrRural: "RURAL";
|
229
|
+
village?: string | undefined;
|
230
|
+
}>]>, z.ZodObject<{
|
231
|
+
country: z.ZodString;
|
232
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
233
|
+
state: z.ZodString;
|
234
|
+
district2: z.ZodString;
|
235
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
236
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
237
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
238
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
239
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
241
|
+
country: string;
|
242
|
+
state: string;
|
243
|
+
addressType: "INTERNATIONAL";
|
244
|
+
district2: string;
|
245
|
+
cityOrTown?: string | undefined;
|
246
|
+
addressLine1?: string | undefined;
|
247
|
+
addressLine2?: string | undefined;
|
248
|
+
addressLine3?: string | undefined;
|
249
|
+
postcodeOrZip?: string | undefined;
|
250
|
+
}, {
|
251
|
+
country: string;
|
252
|
+
state: string;
|
253
|
+
addressType: "INTERNATIONAL";
|
254
|
+
district2: string;
|
255
|
+
cityOrTown?: string | undefined;
|
256
|
+
addressLine1?: string | undefined;
|
257
|
+
addressLine2?: string | undefined;
|
258
|
+
addressLine3?: string | undefined;
|
259
|
+
postcodeOrZip?: string | undefined;
|
260
|
+
}>]>;
|
261
|
+
export declare const GenericAddressUpdateValue: z.ZodObject<{
|
262
|
+
country: z.ZodString;
|
263
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
264
|
+
state: z.ZodString;
|
265
|
+
district2: z.ZodString;
|
266
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
267
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
268
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
269
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
270
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
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;
|
281
|
+
}, {
|
282
|
+
country: string;
|
283
|
+
state: string;
|
284
|
+
addressType: "INTERNATIONAL";
|
285
|
+
district2: string;
|
286
|
+
cityOrTown?: string | null | undefined;
|
287
|
+
addressLine1?: string | null | undefined;
|
288
|
+
addressLine2?: string | null | undefined;
|
289
|
+
addressLine3?: string | null | undefined;
|
290
|
+
postcodeOrZip?: string | null | undefined;
|
291
|
+
}>;
|
292
|
+
export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
293
|
+
country: z.ZodString;
|
294
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
295
|
+
province: z.ZodString;
|
296
|
+
district: z.ZodString;
|
297
|
+
}, {
|
298
|
+
urbanOrRural: z.ZodLiteral<"URBAN">;
|
299
|
+
town: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
300
|
+
residentialArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
301
|
+
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
302
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
303
|
+
zipCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
304
|
+
}>, "strip", z.ZodTypeAny, {
|
305
|
+
country: string;
|
306
|
+
district: string;
|
307
|
+
addressType: "DOMESTIC";
|
308
|
+
province: string;
|
309
|
+
urbanOrRural: "URBAN";
|
310
|
+
number?: string | null | undefined;
|
311
|
+
town?: string | null | undefined;
|
312
|
+
residentialArea?: string | null | undefined;
|
313
|
+
street?: string | null | undefined;
|
314
|
+
zipCode?: string | null | undefined;
|
315
|
+
}, {
|
316
|
+
country: string;
|
317
|
+
district: string;
|
318
|
+
addressType: "DOMESTIC";
|
319
|
+
province: string;
|
320
|
+
urbanOrRural: "URBAN";
|
321
|
+
number?: string | null | undefined;
|
322
|
+
town?: string | null | undefined;
|
323
|
+
residentialArea?: string | null | undefined;
|
324
|
+
street?: string | null | undefined;
|
325
|
+
zipCode?: string | null | undefined;
|
326
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
327
|
+
country: z.ZodString;
|
328
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
329
|
+
province: z.ZodString;
|
330
|
+
district: z.ZodString;
|
331
|
+
}, {
|
332
|
+
urbanOrRural: z.ZodLiteral<"RURAL">;
|
333
|
+
village: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
334
|
+
}>, "strip", z.ZodTypeAny, {
|
335
|
+
country: string;
|
336
|
+
district: string;
|
337
|
+
addressType: "DOMESTIC";
|
338
|
+
province: string;
|
339
|
+
urbanOrRural: "RURAL";
|
340
|
+
village?: string | null | undefined;
|
341
|
+
}, {
|
342
|
+
country: string;
|
343
|
+
district: string;
|
344
|
+
addressType: "DOMESTIC";
|
345
|
+
province: string;
|
346
|
+
urbanOrRural: "RURAL";
|
347
|
+
village?: string | null | undefined;
|
348
|
+
}>]>, z.ZodObject<{
|
349
|
+
country: z.ZodString;
|
350
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
351
|
+
state: z.ZodString;
|
352
|
+
district2: z.ZodString;
|
353
|
+
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
354
|
+
addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
355
|
+
addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
356
|
+
addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
357
|
+
postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
359
|
+
country: string;
|
360
|
+
state: string;
|
361
|
+
addressType: "INTERNATIONAL";
|
362
|
+
district2: string;
|
363
|
+
cityOrTown?: string | null | undefined;
|
364
|
+
addressLine1?: string | null | undefined;
|
365
|
+
addressLine2?: string | null | undefined;
|
366
|
+
addressLine3?: string | null | undefined;
|
367
|
+
postcodeOrZip?: string | null | undefined;
|
368
|
+
}, {
|
369
|
+
country: string;
|
370
|
+
state: string;
|
371
|
+
addressType: "INTERNATIONAL";
|
372
|
+
district2: string;
|
373
|
+
cityOrTown?: string | null | undefined;
|
374
|
+
addressLine1?: string | null | undefined;
|
375
|
+
addressLine2?: string | null | undefined;
|
376
|
+
addressLine3?: string | null | undefined;
|
377
|
+
postcodeOrZip?: string | null | undefined;
|
378
|
+
}>]>;
|
379
|
+
export type AddressFieldValue = z.infer<typeof AddressFieldValue>;
|
380
|
+
export declare const FileFieldValueWithOption: z.ZodObject<{
|
381
|
+
filename: z.ZodString;
|
382
|
+
originalFilename: z.ZodString;
|
383
|
+
type: z.ZodString;
|
384
|
+
option: z.ZodString;
|
385
|
+
}, "strip", z.ZodTypeAny, {
|
386
|
+
type: string;
|
387
|
+
option: string;
|
388
|
+
filename: string;
|
389
|
+
originalFilename: string;
|
390
|
+
}, {
|
391
|
+
type: string;
|
392
|
+
option: string;
|
393
|
+
filename: string;
|
394
|
+
originalFilename: string;
|
395
|
+
}>;
|
396
|
+
export type FileFieldValueWithOption = z.infer<typeof FileFieldValueWithOption>;
|
397
|
+
export declare const FileFieldWithOptionValue: z.ZodArray<z.ZodObject<{
|
398
|
+
filename: z.ZodString;
|
399
|
+
originalFilename: z.ZodString;
|
400
|
+
type: z.ZodString;
|
401
|
+
option: z.ZodString;
|
402
|
+
}, "strip", z.ZodTypeAny, {
|
403
|
+
type: string;
|
404
|
+
option: string;
|
405
|
+
filename: string;
|
406
|
+
originalFilename: string;
|
407
|
+
}, {
|
408
|
+
type: string;
|
409
|
+
option: string;
|
410
|
+
filename: string;
|
411
|
+
originalFilename: string;
|
412
|
+
}>, "many">;
|
413
|
+
export type FileFieldWithOptionValue = z.infer<typeof FileFieldWithOptionValue>;
|
414
|
+
//# sourceMappingURL=CompositeFieldValue.d.ts.map
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { JSONSchema } from '../conditionals/conditionals';
|
2
2
|
import { z } from 'zod';
|
3
|
-
export declare
|
3
|
+
export declare const Conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
4
4
|
/**
|
5
5
|
* By default, when conditionals are undefined, action is visible and enabled to everyone.
|
6
6
|
*/
|
7
7
|
export declare const ConditionalType: {
|
8
|
-
/** When 'SHOW' conditional is defined, the action is shown to the user only if the condition is met */
|
9
8
|
readonly SHOW: "SHOW";
|
10
|
-
/** If 'ENABLE' conditional is defined, the action is enabled only if the condition is met */
|
11
9
|
readonly ENABLE: "ENABLE";
|
10
|
+
readonly DISPLAY_ON_REVIEW: "DISPLAY_ON_REVIEW";
|
12
11
|
};
|
12
|
+
export type ConditionalType = (typeof ConditionalType)[keyof typeof ConditionalType];
|
13
13
|
export declare const ShowConditional: z.ZodObject<{
|
14
14
|
type: z.ZodLiteral<"SHOW">;
|
15
15
|
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
@@ -31,9 +31,25 @@ export declare const EnableConditional: z.ZodObject<{
|
|
31
31
|
conditional: JSONSchema;
|
32
32
|
}>;
|
33
33
|
/** @knipignore */
|
34
|
-
export type
|
34
|
+
export type ActionConditionalType = typeof ShowConditional | typeof EnableConditional;
|
35
35
|
/** @knipignore */
|
36
36
|
export type InferredActionConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional>;
|
37
|
-
export declare const ActionConditional: z.ZodDiscriminatedUnion<"type",
|
37
|
+
export declare const ActionConditional: z.ZodDiscriminatedUnion<"type", ActionConditionalType[]>;
|
38
38
|
export type ActionConditional = InferredActionConditional;
|
39
|
+
export declare const DisplayOnReviewConditional: z.ZodObject<{
|
40
|
+
type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
|
41
|
+
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
43
|
+
type: "DISPLAY_ON_REVIEW";
|
44
|
+
conditional: JSONSchema;
|
45
|
+
}, {
|
46
|
+
type: "DISPLAY_ON_REVIEW";
|
47
|
+
conditional: JSONSchema;
|
48
|
+
}>;
|
49
|
+
/** @knipignore */
|
50
|
+
export type FieldConditionalType = typeof ShowConditional | typeof EnableConditional | typeof DisplayOnReviewConditional;
|
51
|
+
/** @knipignore */
|
52
|
+
export type InferredFieldConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional> | z.infer<typeof DisplayOnReviewConditional>;
|
53
|
+
export declare const FieldConditional: z.ZodDiscriminatedUnion<"type", FieldConditionalType[]>;
|
54
|
+
export type FieldConditional = z.infer<typeof FieldConditional>;
|
39
55
|
//# sourceMappingURL=Conditional.d.ts.map
|