@opencrvs/toolkit 1.8.0-rc.f9911ed → 1.8.0-rc.f9d33b7
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 +10101 -14872
- package/dist/commons/conditionals/conditionals.d.ts +30 -5
- package/dist/commons/conditionals/validate.d.ts +12 -17
- package/dist/commons/events/ActionConfig.d.ts +85214 -5717
- package/dist/commons/events/ActionDocument.d.ts +7706 -295
- package/dist/commons/events/ActionInput.d.ts +2164 -419
- package/dist/commons/events/ActionType.d.ts +26 -16
- package/dist/commons/events/AdvancedSearchConfig.d.ts +371 -25
- package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +75 -45
- package/dist/commons/events/EventConfig.d.ts +40486 -2985
- package/dist/commons/events/EventConfigInput.d.ts +5 -2
- package/dist/commons/events/EventDocument.d.ts +1027 -379
- package/dist/commons/events/EventIndex.d.ts +921 -7
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +16 -3
- package/dist/commons/events/FieldConfig.d.ts +3702 -757
- package/dist/commons/events/FieldType.d.ts +1 -2
- package/dist/commons/events/FieldValue.d.ts +1 -1
- package/dist/commons/events/FormConfig.d.ts +38914 -339
- package/dist/commons/events/PageConfig.d.ts +9803 -0
- package/dist/commons/events/SummaryConfig.d.ts +81 -42
- package/dist/commons/events/TemplateConfig.d.ts +5 -5
- package/dist/commons/events/User.d.ts +5 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +44 -20
- package/dist/commons/events/defineConfig.d.ts +6758 -485
- package/dist/commons/events/event.d.ts +25 -0
- package/dist/commons/events/field.d.ts +68 -0
- package/dist/commons/events/index.d.ts +5 -1
- package/dist/commons/events/scopes.d.ts +26 -0
- package/dist/commons/events/test.utils.d.ts +63 -321
- package/dist/commons/events/utils.d.ts +3423 -179
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +191 -120
- package/dist/events/index.js +1855 -1187
- package/package.json +3 -2
@@ -1,29 +1,39 @@
|
|
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
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
|
-
* Actions that can be attached to an event document
|
25
|
-
* even if they are not in event configuration
|
26
|
-
*/
|
27
|
-
export declare const LatentActions: ("REJECT" | "ARCHIVE")[];
|
28
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>;
|
37
|
+
/** Actions which requires the user to be assigned */
|
38
|
+
export declare const writeActions: z.ZodEnum<["DELETE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION"]>;
|
29
39
|
//# sourceMappingURL=ActionType.d.ts.map
|
@@ -1,51 +1,397 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { TranslationConfig } from './TranslationConfig';
|
3
|
+
export declare const MatchType: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
4
|
+
export type MatchType = z.infer<typeof MatchType>;
|
5
|
+
export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
6
|
+
config: z.ZodObject<{
|
7
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
10
|
+
}, {
|
11
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
12
|
+
}>;
|
13
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
14
|
+
value: z.ZodString;
|
15
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
16
|
+
id: string;
|
17
|
+
description: string;
|
18
|
+
defaultMessage: string;
|
19
|
+
}>;
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
21
|
+
value: string;
|
22
|
+
label: TranslationConfig;
|
23
|
+
}, {
|
24
|
+
value: string;
|
25
|
+
label: {
|
26
|
+
id: string;
|
27
|
+
description: string;
|
28
|
+
defaultMessage: string;
|
29
|
+
};
|
30
|
+
}>, "many">>;
|
31
|
+
}, {
|
32
|
+
fieldId: z.ZodString;
|
33
|
+
fieldType: z.ZodLiteral<"field">;
|
34
|
+
}>, "strip", z.ZodTypeAny, {
|
35
|
+
config: {
|
36
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
37
|
+
};
|
38
|
+
fieldId: string;
|
39
|
+
fieldType: "field";
|
40
|
+
options?: {
|
41
|
+
value: string;
|
42
|
+
label: TranslationConfig;
|
43
|
+
}[] | undefined;
|
44
|
+
}, {
|
45
|
+
config: {
|
46
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
47
|
+
};
|
48
|
+
fieldId: string;
|
49
|
+
fieldType: "field";
|
50
|
+
options?: {
|
51
|
+
value: string;
|
52
|
+
label: {
|
53
|
+
id: string;
|
54
|
+
description: string;
|
55
|
+
defaultMessage: string;
|
56
|
+
};
|
57
|
+
}[] | undefined;
|
58
|
+
}>;
|
59
|
+
export declare const EventFieldId: z.ZodEnum<["trackingId", "status"]>;
|
60
|
+
export type EventFieldId = z.infer<typeof EventFieldId>;
|
61
|
+
export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
62
|
+
config: z.ZodObject<{
|
63
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
65
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
66
|
+
}, {
|
67
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
68
|
+
}>;
|
69
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
70
|
+
value: z.ZodString;
|
71
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
72
|
+
id: string;
|
73
|
+
description: string;
|
74
|
+
defaultMessage: string;
|
75
|
+
}>;
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
77
|
+
value: string;
|
78
|
+
label: TranslationConfig;
|
79
|
+
}, {
|
80
|
+
value: string;
|
81
|
+
label: {
|
82
|
+
id: string;
|
83
|
+
description: string;
|
84
|
+
defaultMessage: string;
|
85
|
+
};
|
86
|
+
}>, "many">>;
|
87
|
+
}, {
|
88
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
89
|
+
fieldType: z.ZodLiteral<"event">;
|
90
|
+
}>, "strip", z.ZodTypeAny, {
|
91
|
+
config: {
|
92
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
93
|
+
};
|
94
|
+
fieldId: "status" | "trackingId";
|
95
|
+
fieldType: "event";
|
96
|
+
options?: {
|
97
|
+
value: string;
|
98
|
+
label: TranslationConfig;
|
99
|
+
}[] | undefined;
|
100
|
+
}, {
|
101
|
+
config: {
|
102
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
103
|
+
};
|
104
|
+
fieldId: "status" | "trackingId";
|
105
|
+
fieldType: "event";
|
106
|
+
options?: {
|
107
|
+
value: string;
|
108
|
+
label: {
|
109
|
+
id: string;
|
110
|
+
description: string;
|
111
|
+
defaultMessage: string;
|
112
|
+
};
|
113
|
+
}[] | undefined;
|
114
|
+
}>;
|
115
|
+
export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
|
116
|
+
config: z.ZodObject<{
|
117
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
119
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
120
|
+
}, {
|
121
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
122
|
+
}>;
|
123
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
124
|
+
value: z.ZodString;
|
125
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
126
|
+
id: string;
|
127
|
+
description: string;
|
128
|
+
defaultMessage: string;
|
129
|
+
}>;
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
131
|
+
value: string;
|
132
|
+
label: TranslationConfig;
|
133
|
+
}, {
|
134
|
+
value: string;
|
135
|
+
label: {
|
136
|
+
id: string;
|
137
|
+
description: string;
|
138
|
+
defaultMessage: string;
|
139
|
+
};
|
140
|
+
}>, "many">>;
|
141
|
+
}, {
|
142
|
+
fieldId: z.ZodString;
|
143
|
+
fieldType: z.ZodLiteral<"field">;
|
144
|
+
}>, "strip", z.ZodTypeAny, {
|
145
|
+
config: {
|
146
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
147
|
+
};
|
148
|
+
fieldId: string;
|
149
|
+
fieldType: "field";
|
150
|
+
options?: {
|
151
|
+
value: string;
|
152
|
+
label: TranslationConfig;
|
153
|
+
}[] | undefined;
|
154
|
+
}, {
|
155
|
+
config: {
|
156
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
157
|
+
};
|
158
|
+
fieldId: string;
|
159
|
+
fieldType: "field";
|
160
|
+
options?: {
|
161
|
+
value: string;
|
162
|
+
label: {
|
163
|
+
id: string;
|
164
|
+
description: string;
|
165
|
+
defaultMessage: string;
|
166
|
+
};
|
167
|
+
}[] | undefined;
|
168
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
169
|
+
config: z.ZodObject<{
|
170
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
172
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
173
|
+
}, {
|
174
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
175
|
+
}>;
|
176
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
177
|
+
value: z.ZodString;
|
178
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
179
|
+
id: string;
|
180
|
+
description: string;
|
181
|
+
defaultMessage: string;
|
182
|
+
}>;
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
184
|
+
value: string;
|
185
|
+
label: TranslationConfig;
|
186
|
+
}, {
|
187
|
+
value: string;
|
188
|
+
label: {
|
189
|
+
id: string;
|
190
|
+
description: string;
|
191
|
+
defaultMessage: string;
|
192
|
+
};
|
193
|
+
}>, "many">>;
|
194
|
+
}, {
|
195
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
196
|
+
fieldType: z.ZodLiteral<"event">;
|
197
|
+
}>, "strip", z.ZodTypeAny, {
|
198
|
+
config: {
|
199
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
200
|
+
};
|
201
|
+
fieldId: "status" | "trackingId";
|
202
|
+
fieldType: "event";
|
203
|
+
options?: {
|
204
|
+
value: string;
|
205
|
+
label: TranslationConfig;
|
206
|
+
}[] | undefined;
|
207
|
+
}, {
|
208
|
+
config: {
|
209
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
210
|
+
};
|
211
|
+
fieldId: "status" | "trackingId";
|
212
|
+
fieldType: "event";
|
213
|
+
options?: {
|
214
|
+
value: string;
|
215
|
+
label: {
|
216
|
+
id: string;
|
217
|
+
description: string;
|
218
|
+
defaultMessage: string;
|
219
|
+
};
|
220
|
+
}[] | undefined;
|
221
|
+
}>]>;
|
222
|
+
export type SearchField = z.infer<typeof SearchField>;
|
3
223
|
export declare const AdvancedSearchConfig: z.ZodObject<{
|
4
224
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
5
225
|
id: string;
|
6
226
|
description: string;
|
7
227
|
defaultMessage: string;
|
8
228
|
}>;
|
9
|
-
fields: z.
|
10
|
-
|
11
|
-
|
12
|
-
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE"]>;
|
229
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
|
230
|
+
config: z.ZodObject<{
|
231
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
13
232
|
}, "strip", z.ZodTypeAny, {
|
14
|
-
type: "FUZZY" | "EXACT" | "RANGE";
|
233
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
15
234
|
}, {
|
16
|
-
type: "FUZZY" | "EXACT" | "RANGE";
|
17
|
-
}
|
18
|
-
|
235
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
236
|
+
}>;
|
237
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
238
|
+
value: z.ZodString;
|
239
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
240
|
+
id: string;
|
241
|
+
description: string;
|
242
|
+
defaultMessage: string;
|
243
|
+
}>;
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
245
|
+
value: string;
|
246
|
+
label: TranslationConfig;
|
247
|
+
}, {
|
248
|
+
value: string;
|
249
|
+
label: {
|
250
|
+
id: string;
|
251
|
+
description: string;
|
252
|
+
defaultMessage: string;
|
253
|
+
};
|
254
|
+
}>, "many">>;
|
255
|
+
}, {
|
256
|
+
fieldId: z.ZodString;
|
257
|
+
fieldType: z.ZodLiteral<"field">;
|
258
|
+
}>, "strip", z.ZodTypeAny, {
|
259
|
+
config: {
|
260
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
261
|
+
};
|
19
262
|
fieldId: string;
|
20
|
-
|
21
|
-
|
22
|
-
|
263
|
+
fieldType: "field";
|
264
|
+
options?: {
|
265
|
+
value: string;
|
266
|
+
label: TranslationConfig;
|
267
|
+
}[] | undefined;
|
23
268
|
}, {
|
269
|
+
config: {
|
270
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
271
|
+
};
|
24
272
|
fieldId: string;
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
273
|
+
fieldType: "field";
|
274
|
+
options?: {
|
275
|
+
value: string;
|
276
|
+
label: {
|
277
|
+
id: string;
|
278
|
+
description: string;
|
279
|
+
defaultMessage: string;
|
280
|
+
};
|
281
|
+
}[] | undefined;
|
282
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
283
|
+
config: z.ZodObject<{
|
284
|
+
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE", "ANY_OF"]>;
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
286
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
287
|
+
}, {
|
288
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
289
|
+
}>;
|
290
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
291
|
+
value: z.ZodString;
|
292
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
293
|
+
id: string;
|
294
|
+
description: string;
|
295
|
+
defaultMessage: string;
|
296
|
+
}>;
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
298
|
+
value: string;
|
299
|
+
label: TranslationConfig;
|
300
|
+
}, {
|
301
|
+
value: string;
|
302
|
+
label: {
|
303
|
+
id: string;
|
304
|
+
description: string;
|
305
|
+
defaultMessage: string;
|
306
|
+
};
|
307
|
+
}>, "many">>;
|
308
|
+
}, {
|
309
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
310
|
+
fieldType: z.ZodLiteral<"event">;
|
311
|
+
}>, "strip", z.ZodTypeAny, {
|
312
|
+
config: {
|
313
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
314
|
+
};
|
315
|
+
fieldId: "status" | "trackingId";
|
316
|
+
fieldType: "event";
|
317
|
+
options?: {
|
318
|
+
value: string;
|
319
|
+
label: TranslationConfig;
|
320
|
+
}[] | undefined;
|
321
|
+
}, {
|
322
|
+
config: {
|
323
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
324
|
+
};
|
325
|
+
fieldId: "status" | "trackingId";
|
326
|
+
fieldType: "event";
|
327
|
+
options?: {
|
328
|
+
value: string;
|
329
|
+
label: {
|
330
|
+
id: string;
|
331
|
+
description: string;
|
332
|
+
defaultMessage: string;
|
333
|
+
};
|
334
|
+
}[] | undefined;
|
335
|
+
}>]>, "many">;
|
29
336
|
}, "strip", z.ZodTypeAny, {
|
30
337
|
title: TranslationConfig;
|
31
|
-
fields: {
|
338
|
+
fields: ({
|
339
|
+
config: {
|
340
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
341
|
+
};
|
32
342
|
fieldId: string;
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
343
|
+
fieldType: "field";
|
344
|
+
options?: {
|
345
|
+
value: string;
|
346
|
+
label: TranslationConfig;
|
347
|
+
}[] | undefined;
|
348
|
+
} | {
|
349
|
+
config: {
|
350
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
351
|
+
};
|
352
|
+
fieldId: "status" | "trackingId";
|
353
|
+
fieldType: "event";
|
354
|
+
options?: {
|
355
|
+
value: string;
|
356
|
+
label: TranslationConfig;
|
357
|
+
}[] | undefined;
|
358
|
+
})[];
|
37
359
|
}, {
|
38
360
|
title: {
|
39
361
|
id: string;
|
40
362
|
description: string;
|
41
363
|
defaultMessage: string;
|
42
364
|
};
|
43
|
-
fields
|
365
|
+
fields: ({
|
366
|
+
config: {
|
367
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
368
|
+
};
|
44
369
|
fieldId: string;
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
370
|
+
fieldType: "field";
|
371
|
+
options?: {
|
372
|
+
value: string;
|
373
|
+
label: {
|
374
|
+
id: string;
|
375
|
+
description: string;
|
376
|
+
defaultMessage: string;
|
377
|
+
};
|
378
|
+
}[] | undefined;
|
379
|
+
} | {
|
380
|
+
config: {
|
381
|
+
type: "FUZZY" | "EXACT" | "RANGE" | "ANY_OF";
|
382
|
+
};
|
383
|
+
fieldId: "status" | "trackingId";
|
384
|
+
fieldType: "event";
|
385
|
+
options?: {
|
386
|
+
value: string;
|
387
|
+
label: {
|
388
|
+
id: string;
|
389
|
+
description: string;
|
390
|
+
defaultMessage: string;
|
391
|
+
};
|
392
|
+
}[] | undefined;
|
393
|
+
})[];
|
49
394
|
}>;
|
395
|
+
export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
|
50
396
|
export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
|
51
397
|
//# sourceMappingURL=AdvancedSearchConfig.d.ts.map
|
@@ -117,6 +117,7 @@ export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
117
117
|
street?: string | null | undefined;
|
118
118
|
zipCode?: string | null | undefined;
|
119
119
|
}>;
|
120
|
+
export type UrbanAddressUpdateValue = z.infer<typeof UrbanAddressUpdateValue>;
|
120
121
|
export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
121
122
|
country: z.ZodString;
|
122
123
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
@@ -140,6 +141,7 @@ export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
140
141
|
urbanOrRural: "RURAL";
|
141
142
|
village?: string | null | undefined;
|
142
143
|
}>;
|
144
|
+
export type RuralAddressUpdateValue = z.infer<typeof RuralAddressUpdateValue>;
|
143
145
|
export declare const GenericAddressValue: z.ZodObject<{
|
144
146
|
country: z.ZodString;
|
145
147
|
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
@@ -289,6 +291,7 @@ export declare const GenericAddressUpdateValue: z.ZodObject<{
|
|
289
291
|
addressLine3?: string | null | undefined;
|
290
292
|
postcodeOrZip?: string | null | undefined;
|
291
293
|
}>;
|
294
|
+
export type GenericAddressUpdateValue = z.infer<typeof GenericAddressUpdateValue>;
|
292
295
|
export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
293
296
|
country: z.ZodString;
|
294
297
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
@@ -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
|