@opencrvs/toolkit 1.8.0-rc.f8e4107 → 1.8.0-rc.f97f8f2
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 +8418 -4827
- package/dist/commons/conditionals/conditionals.d.ts +9 -70
- package/dist/commons/conditionals/validate.d.ts +4 -6
- package/dist/commons/events/ActionConfig.d.ts +90025 -1680
- package/dist/commons/events/ActionDocument.d.ts +643 -417
- package/dist/commons/events/ActionInput.d.ts +248 -240
- package/dist/commons/events/AdvancedSearchConfig.d.ts +274 -23
- package/dist/commons/events/CompositeFieldValue.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +1506 -0
- package/dist/commons/events/Draft.d.ts +38 -30
- package/dist/commons/events/EventConfig.d.ts +42787 -1385
- package/dist/commons/events/EventDocument.d.ts +413 -312
- package/dist/commons/events/EventIndex.d.ts +948 -155
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +274 -11
- package/dist/commons/events/FieldConfig.d.ts +3778 -769
- package/dist/commons/events/FieldType.d.ts +3 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +11 -4
- package/dist/commons/events/FieldValue.d.ts +7 -4
- package/dist/commons/events/FormConfig.d.ts +40417 -439
- package/dist/commons/events/PageConfig.d.ts +10077 -203
- package/dist/commons/events/SummaryConfig.d.ts +95 -39
- package/dist/commons/events/User.d.ts +31 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +42 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +2834 -19
- package/dist/commons/events/defineConfig.d.ts +7008 -81
- package/dist/commons/events/event.d.ts +27 -0
- package/dist/commons/events/field.d.ts +68 -0
- package/dist/commons/events/index.d.ts +6 -0
- package/dist/commons/events/scopes.d.ts +26 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +7 -44
- package/dist/commons/events/utils.d.ts +3551 -65
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/conditionals/index.js +54 -83
- package/dist/events/index.js +2044 -1072
- package/dist/scopes/index.d.ts +105 -1
- package/dist/scopes/index.js +140 -0
- package/package.json +3 -2
@@ -1,13 +1,12 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
export declare const FieldConfigSchema: z.ZodObject<{
|
4
|
-
fieldId: z.ZodString;
|
3
|
+
export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
5
4
|
config: z.ZodObject<{
|
6
|
-
type: z.ZodEnum<["
|
5
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
7
6
|
}, "strip", z.ZodTypeAny, {
|
8
|
-
type: "
|
7
|
+
type: "exact" | "fuzzy" | "range";
|
9
8
|
}, {
|
10
|
-
type: "
|
9
|
+
type: "exact" | "fuzzy" | "range";
|
11
10
|
}>;
|
12
11
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
13
12
|
value: z.ZodString;
|
@@ -27,20 +26,81 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
27
26
|
defaultMessage: string;
|
28
27
|
};
|
29
28
|
}>, "many">>;
|
30
|
-
},
|
29
|
+
}, {
|
30
|
+
fieldId: z.ZodString;
|
31
|
+
fieldType: z.ZodLiteral<"field">;
|
32
|
+
}>, "strip", z.ZodTypeAny, {
|
31
33
|
config: {
|
32
|
-
type: "
|
34
|
+
type: "exact" | "fuzzy" | "range";
|
33
35
|
};
|
34
36
|
fieldId: string;
|
37
|
+
fieldType: "field";
|
35
38
|
options?: {
|
36
39
|
value: string;
|
37
40
|
label: TranslationConfig;
|
38
41
|
}[] | undefined;
|
39
42
|
}, {
|
40
43
|
config: {
|
41
|
-
type: "
|
44
|
+
type: "exact" | "fuzzy" | "range";
|
42
45
|
};
|
43
46
|
fieldId: string;
|
47
|
+
fieldType: "field";
|
48
|
+
options?: {
|
49
|
+
value: string;
|
50
|
+
label: {
|
51
|
+
id: string;
|
52
|
+
description: string;
|
53
|
+
defaultMessage: string;
|
54
|
+
};
|
55
|
+
}[] | undefined;
|
56
|
+
}>;
|
57
|
+
export declare const EventFieldId: z.ZodEnum<["trackingId", "status"]>;
|
58
|
+
export type EventFieldId = z.infer<typeof EventFieldId>;
|
59
|
+
export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
60
|
+
config: z.ZodObject<{
|
61
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
63
|
+
type: "exact" | "fuzzy" | "range";
|
64
|
+
}, {
|
65
|
+
type: "exact" | "fuzzy" | "range";
|
66
|
+
}>;
|
67
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
68
|
+
value: z.ZodString;
|
69
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
70
|
+
id: string;
|
71
|
+
description: string;
|
72
|
+
defaultMessage: string;
|
73
|
+
}>;
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
75
|
+
value: string;
|
76
|
+
label: TranslationConfig;
|
77
|
+
}, {
|
78
|
+
value: string;
|
79
|
+
label: {
|
80
|
+
id: string;
|
81
|
+
description: string;
|
82
|
+
defaultMessage: string;
|
83
|
+
};
|
84
|
+
}>, "many">>;
|
85
|
+
}, {
|
86
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
87
|
+
fieldType: z.ZodLiteral<"event">;
|
88
|
+
}>, "strip", z.ZodTypeAny, {
|
89
|
+
config: {
|
90
|
+
type: "exact" | "fuzzy" | "range";
|
91
|
+
};
|
92
|
+
fieldId: "status" | "trackingId";
|
93
|
+
fieldType: "event";
|
94
|
+
options?: {
|
95
|
+
value: string;
|
96
|
+
label: TranslationConfig;
|
97
|
+
}[] | undefined;
|
98
|
+
}, {
|
99
|
+
config: {
|
100
|
+
type: "exact" | "fuzzy" | "range";
|
101
|
+
};
|
102
|
+
fieldId: "status" | "trackingId";
|
103
|
+
fieldType: "event";
|
44
104
|
options?: {
|
45
105
|
value: string;
|
46
106
|
label: {
|
@@ -50,20 +110,127 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
50
110
|
};
|
51
111
|
}[] | undefined;
|
52
112
|
}>;
|
113
|
+
export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
|
114
|
+
config: z.ZodObject<{
|
115
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
117
|
+
type: "exact" | "fuzzy" | "range";
|
118
|
+
}, {
|
119
|
+
type: "exact" | "fuzzy" | "range";
|
120
|
+
}>;
|
121
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
122
|
+
value: z.ZodString;
|
123
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
124
|
+
id: string;
|
125
|
+
description: string;
|
126
|
+
defaultMessage: string;
|
127
|
+
}>;
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
129
|
+
value: string;
|
130
|
+
label: TranslationConfig;
|
131
|
+
}, {
|
132
|
+
value: string;
|
133
|
+
label: {
|
134
|
+
id: string;
|
135
|
+
description: string;
|
136
|
+
defaultMessage: string;
|
137
|
+
};
|
138
|
+
}>, "many">>;
|
139
|
+
}, {
|
140
|
+
fieldId: z.ZodString;
|
141
|
+
fieldType: z.ZodLiteral<"field">;
|
142
|
+
}>, "strip", z.ZodTypeAny, {
|
143
|
+
config: {
|
144
|
+
type: "exact" | "fuzzy" | "range";
|
145
|
+
};
|
146
|
+
fieldId: string;
|
147
|
+
fieldType: "field";
|
148
|
+
options?: {
|
149
|
+
value: string;
|
150
|
+
label: TranslationConfig;
|
151
|
+
}[] | undefined;
|
152
|
+
}, {
|
153
|
+
config: {
|
154
|
+
type: "exact" | "fuzzy" | "range";
|
155
|
+
};
|
156
|
+
fieldId: string;
|
157
|
+
fieldType: "field";
|
158
|
+
options?: {
|
159
|
+
value: string;
|
160
|
+
label: {
|
161
|
+
id: string;
|
162
|
+
description: string;
|
163
|
+
defaultMessage: string;
|
164
|
+
};
|
165
|
+
}[] | undefined;
|
166
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
167
|
+
config: z.ZodObject<{
|
168
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
170
|
+
type: "exact" | "fuzzy" | "range";
|
171
|
+
}, {
|
172
|
+
type: "exact" | "fuzzy" | "range";
|
173
|
+
}>;
|
174
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
175
|
+
value: z.ZodString;
|
176
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
177
|
+
id: string;
|
178
|
+
description: string;
|
179
|
+
defaultMessage: string;
|
180
|
+
}>;
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
182
|
+
value: string;
|
183
|
+
label: TranslationConfig;
|
184
|
+
}, {
|
185
|
+
value: string;
|
186
|
+
label: {
|
187
|
+
id: string;
|
188
|
+
description: string;
|
189
|
+
defaultMessage: string;
|
190
|
+
};
|
191
|
+
}>, "many">>;
|
192
|
+
}, {
|
193
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
194
|
+
fieldType: z.ZodLiteral<"event">;
|
195
|
+
}>, "strip", z.ZodTypeAny, {
|
196
|
+
config: {
|
197
|
+
type: "exact" | "fuzzy" | "range";
|
198
|
+
};
|
199
|
+
fieldId: "status" | "trackingId";
|
200
|
+
fieldType: "event";
|
201
|
+
options?: {
|
202
|
+
value: string;
|
203
|
+
label: TranslationConfig;
|
204
|
+
}[] | undefined;
|
205
|
+
}, {
|
206
|
+
config: {
|
207
|
+
type: "exact" | "fuzzy" | "range";
|
208
|
+
};
|
209
|
+
fieldId: "status" | "trackingId";
|
210
|
+
fieldType: "event";
|
211
|
+
options?: {
|
212
|
+
value: string;
|
213
|
+
label: {
|
214
|
+
id: string;
|
215
|
+
description: string;
|
216
|
+
defaultMessage: string;
|
217
|
+
};
|
218
|
+
}[] | undefined;
|
219
|
+
}>]>;
|
220
|
+
export type SearchField = z.infer<typeof SearchField>;
|
53
221
|
export declare const AdvancedSearchConfig: z.ZodObject<{
|
54
222
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
55
223
|
id: string;
|
56
224
|
description: string;
|
57
225
|
defaultMessage: string;
|
58
226
|
}>;
|
59
|
-
fields: z.
|
60
|
-
fieldId: z.ZodString;
|
227
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
|
61
228
|
config: z.ZodObject<{
|
62
|
-
type: z.ZodEnum<["
|
229
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
63
230
|
}, "strip", z.ZodTypeAny, {
|
64
|
-
type: "
|
231
|
+
type: "exact" | "fuzzy" | "range";
|
65
232
|
}, {
|
66
|
-
type: "
|
233
|
+
type: "exact" | "fuzzy" | "range";
|
67
234
|
}>;
|
68
235
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
69
236
|
value: z.ZodString;
|
@@ -83,20 +250,78 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
83
250
|
defaultMessage: string;
|
84
251
|
};
|
85
252
|
}>, "many">>;
|
86
|
-
},
|
253
|
+
}, {
|
254
|
+
fieldId: z.ZodString;
|
255
|
+
fieldType: z.ZodLiteral<"field">;
|
256
|
+
}>, "strip", z.ZodTypeAny, {
|
87
257
|
config: {
|
88
|
-
type: "
|
258
|
+
type: "exact" | "fuzzy" | "range";
|
89
259
|
};
|
90
260
|
fieldId: string;
|
261
|
+
fieldType: "field";
|
91
262
|
options?: {
|
92
263
|
value: string;
|
93
264
|
label: TranslationConfig;
|
94
265
|
}[] | undefined;
|
95
266
|
}, {
|
96
267
|
config: {
|
97
|
-
type: "
|
268
|
+
type: "exact" | "fuzzy" | "range";
|
98
269
|
};
|
99
270
|
fieldId: string;
|
271
|
+
fieldType: "field";
|
272
|
+
options?: {
|
273
|
+
value: string;
|
274
|
+
label: {
|
275
|
+
id: string;
|
276
|
+
description: string;
|
277
|
+
defaultMessage: string;
|
278
|
+
};
|
279
|
+
}[] | undefined;
|
280
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
281
|
+
config: z.ZodObject<{
|
282
|
+
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
283
|
+
}, "strip", z.ZodTypeAny, {
|
284
|
+
type: "exact" | "fuzzy" | "range";
|
285
|
+
}, {
|
286
|
+
type: "exact" | "fuzzy" | "range";
|
287
|
+
}>;
|
288
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
289
|
+
value: z.ZodString;
|
290
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
291
|
+
id: string;
|
292
|
+
description: string;
|
293
|
+
defaultMessage: string;
|
294
|
+
}>;
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
296
|
+
value: string;
|
297
|
+
label: TranslationConfig;
|
298
|
+
}, {
|
299
|
+
value: string;
|
300
|
+
label: {
|
301
|
+
id: string;
|
302
|
+
description: string;
|
303
|
+
defaultMessage: string;
|
304
|
+
};
|
305
|
+
}>, "many">>;
|
306
|
+
}, {
|
307
|
+
fieldId: z.ZodEnum<["trackingId", "status"]>;
|
308
|
+
fieldType: z.ZodLiteral<"event">;
|
309
|
+
}>, "strip", z.ZodTypeAny, {
|
310
|
+
config: {
|
311
|
+
type: "exact" | "fuzzy" | "range";
|
312
|
+
};
|
313
|
+
fieldId: "status" | "trackingId";
|
314
|
+
fieldType: "event";
|
315
|
+
options?: {
|
316
|
+
value: string;
|
317
|
+
label: TranslationConfig;
|
318
|
+
}[] | undefined;
|
319
|
+
}, {
|
320
|
+
config: {
|
321
|
+
type: "exact" | "fuzzy" | "range";
|
322
|
+
};
|
323
|
+
fieldId: "status" | "trackingId";
|
324
|
+
fieldType: "event";
|
100
325
|
options?: {
|
101
326
|
value: string;
|
102
327
|
label: {
|
@@ -105,30 +330,42 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
105
330
|
defaultMessage: string;
|
106
331
|
};
|
107
332
|
}[] | undefined;
|
108
|
-
}>, "many"
|
333
|
+
}>]>, "many">;
|
109
334
|
}, "strip", z.ZodTypeAny, {
|
110
335
|
title: TranslationConfig;
|
111
|
-
fields: {
|
336
|
+
fields: ({
|
112
337
|
config: {
|
113
|
-
type: "
|
338
|
+
type: "exact" | "fuzzy" | "range";
|
114
339
|
};
|
115
340
|
fieldId: string;
|
341
|
+
fieldType: "field";
|
342
|
+
options?: {
|
343
|
+
value: string;
|
344
|
+
label: TranslationConfig;
|
345
|
+
}[] | undefined;
|
346
|
+
} | {
|
347
|
+
config: {
|
348
|
+
type: "exact" | "fuzzy" | "range";
|
349
|
+
};
|
350
|
+
fieldId: "status" | "trackingId";
|
351
|
+
fieldType: "event";
|
116
352
|
options?: {
|
117
353
|
value: string;
|
118
354
|
label: TranslationConfig;
|
119
355
|
}[] | undefined;
|
120
|
-
}[];
|
356
|
+
})[];
|
121
357
|
}, {
|
122
358
|
title: {
|
123
359
|
id: string;
|
124
360
|
description: string;
|
125
361
|
defaultMessage: string;
|
126
362
|
};
|
127
|
-
fields
|
363
|
+
fields: ({
|
128
364
|
config: {
|
129
|
-
type: "
|
365
|
+
type: "exact" | "fuzzy" | "range";
|
130
366
|
};
|
131
367
|
fieldId: string;
|
368
|
+
fieldType: "field";
|
132
369
|
options?: {
|
133
370
|
value: string;
|
134
371
|
label: {
|
@@ -137,7 +374,21 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
137
374
|
defaultMessage: string;
|
138
375
|
};
|
139
376
|
}[] | undefined;
|
140
|
-
}
|
377
|
+
} | {
|
378
|
+
config: {
|
379
|
+
type: "exact" | "fuzzy" | "range";
|
380
|
+
};
|
381
|
+
fieldId: "status" | "trackingId";
|
382
|
+
fieldType: "event";
|
383
|
+
options?: {
|
384
|
+
value: string;
|
385
|
+
label: {
|
386
|
+
id: string;
|
387
|
+
description: string;
|
388
|
+
defaultMessage: string;
|
389
|
+
};
|
390
|
+
}[] | undefined;
|
391
|
+
})[];
|
141
392
|
}>;
|
142
393
|
export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
|
143
394
|
export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
|
@@ -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">;
|