@opencrvs/toolkit 1.8.0-rc.fef85f2 → 1.8.0-rc.ff0b26c

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.
Files changed (32) hide show
  1. package/dist/commons/api/router.d.ts +10585 -4200
  2. package/dist/commons/conditionals/conditionals.d.ts +9 -6
  3. package/dist/commons/events/ActionConfig.d.ts +97080 -1720
  4. package/dist/commons/events/ActionDocument.d.ts +542 -211
  5. package/dist/commons/events/ActionInput.d.ts +248 -240
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +957 -22
  7. package/dist/commons/events/Draft.d.ts +33 -20
  8. package/dist/commons/events/EventConfig.d.ts +46237 -1398
  9. package/dist/commons/events/EventDocument.d.ts +337 -159
  10. package/dist/commons/events/EventIndex.d.ts +1735 -16
  11. package/dist/commons/events/EventInput.d.ts +13 -0
  12. package/dist/commons/events/EventMetadata.d.ts +274 -14
  13. package/dist/commons/events/FieldConfig.d.ts +4229 -744
  14. package/dist/commons/events/FieldType.d.ts +3 -3
  15. package/dist/commons/events/FieldTypeMapping.d.ts +11 -4
  16. package/dist/commons/events/FieldValue.d.ts +7 -4
  17. package/dist/commons/events/FormConfig.d.ts +43591 -439
  18. package/dist/commons/events/PageConfig.d.ts +10860 -204
  19. package/dist/commons/events/SummaryConfig.d.ts +17 -47
  20. package/dist/commons/events/WorkqueueConfig.d.ts +1549 -19
  21. package/dist/commons/events/defineConfig.d.ts +7199 -27
  22. package/dist/commons/events/event.d.ts +54 -0
  23. package/dist/commons/events/field.d.ts +82 -0
  24. package/dist/commons/events/index.d.ts +2 -0
  25. package/dist/commons/events/scopes.d.ts +21 -1
  26. package/dist/commons/events/test.utils.d.ts +10 -47
  27. package/dist/commons/events/utils.d.ts +3665 -67
  28. package/dist/conditionals/index.js +36 -33
  29. package/dist/events/index.js +1771 -966
  30. package/dist/scopes/index.d.ts +158 -1
  31. package/dist/scopes/index.js +152 -1
  32. package/package.json +3 -2
@@ -1,51 +1,986 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
+ export declare const SearchQueryParams: z.ZodObject<{
4
+ eventType: z.ZodOptional<z.ZodString>;
5
+ }, "strip", z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
6
+ filename: z.ZodString;
7
+ originalFilename: z.ZodString;
8
+ type: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: string;
11
+ filename: string;
12
+ originalFilename: string;
13
+ }, {
14
+ type: string;
15
+ filename: string;
16
+ originalFilename: string;
17
+ }>, z.ZodArray<z.ZodObject<{
18
+ filename: z.ZodString;
19
+ originalFilename: z.ZodString;
20
+ type: z.ZodString;
21
+ option: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: string;
24
+ option: string;
25
+ filename: string;
26
+ originalFilename: string;
27
+ }, {
28
+ type: string;
29
+ option: string;
30
+ filename: string;
31
+ originalFilename: string;
32
+ }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
33
+ country: z.ZodString;
34
+ addressType: z.ZodLiteral<"DOMESTIC">;
35
+ province: z.ZodString;
36
+ district: z.ZodString;
37
+ }, {
38
+ urbanOrRural: z.ZodLiteral<"URBAN">;
39
+ town: z.ZodOptional<z.ZodString>;
40
+ residentialArea: z.ZodOptional<z.ZodString>;
41
+ street: z.ZodOptional<z.ZodString>;
42
+ number: z.ZodOptional<z.ZodString>;
43
+ zipCode: z.ZodOptional<z.ZodString>;
44
+ }>, "strip", z.ZodTypeAny, {
45
+ country: string;
46
+ district: string;
47
+ addressType: "DOMESTIC";
48
+ province: string;
49
+ urbanOrRural: "URBAN";
50
+ number?: string | undefined;
51
+ town?: string | undefined;
52
+ residentialArea?: string | undefined;
53
+ street?: string | undefined;
54
+ zipCode?: string | undefined;
55
+ }, {
56
+ country: string;
57
+ district: string;
58
+ addressType: "DOMESTIC";
59
+ province: string;
60
+ urbanOrRural: "URBAN";
61
+ number?: string | undefined;
62
+ town?: string | undefined;
63
+ residentialArea?: string | undefined;
64
+ street?: string | undefined;
65
+ zipCode?: string | undefined;
66
+ }>, z.ZodObject<z.objectUtil.extendShape<{
67
+ country: z.ZodString;
68
+ addressType: z.ZodLiteral<"DOMESTIC">;
69
+ province: z.ZodString;
70
+ district: z.ZodString;
71
+ }, {
72
+ urbanOrRural: z.ZodLiteral<"RURAL">;
73
+ village: z.ZodOptional<z.ZodString>;
74
+ }>, "strip", z.ZodTypeAny, {
75
+ country: string;
76
+ district: string;
77
+ addressType: "DOMESTIC";
78
+ province: string;
79
+ urbanOrRural: "RURAL";
80
+ village?: string | undefined;
81
+ }, {
82
+ country: string;
83
+ district: string;
84
+ addressType: "DOMESTIC";
85
+ province: string;
86
+ urbanOrRural: "RURAL";
87
+ village?: string | undefined;
88
+ }>, z.ZodUndefined, z.ZodObject<{
89
+ country: z.ZodString;
90
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
91
+ state: z.ZodString;
92
+ district2: z.ZodString;
93
+ cityOrTown: z.ZodOptional<z.ZodString>;
94
+ addressLine1: z.ZodOptional<z.ZodString>;
95
+ addressLine2: z.ZodOptional<z.ZodString>;
96
+ addressLine3: z.ZodOptional<z.ZodString>;
97
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ country: string;
100
+ state: string;
101
+ addressType: "INTERNATIONAL";
102
+ district2: string;
103
+ cityOrTown?: string | undefined;
104
+ addressLine1?: string | undefined;
105
+ addressLine2?: string | undefined;
106
+ addressLine3?: string | undefined;
107
+ postcodeOrZip?: string | undefined;
108
+ }, {
109
+ country: string;
110
+ state: string;
111
+ addressType: "INTERNATIONAL";
112
+ district2: string;
113
+ cityOrTown?: string | undefined;
114
+ addressLine1?: string | undefined;
115
+ addressLine2?: string | undefined;
116
+ addressLine3?: string | undefined;
117
+ postcodeOrZip?: string | undefined;
118
+ }>]>, z.objectOutputType<{
119
+ eventType: z.ZodOptional<z.ZodString>;
120
+ }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
121
+ filename: z.ZodString;
122
+ originalFilename: z.ZodString;
123
+ type: z.ZodString;
124
+ }, "strip", z.ZodTypeAny, {
125
+ type: string;
126
+ filename: string;
127
+ originalFilename: string;
128
+ }, {
129
+ type: string;
130
+ filename: string;
131
+ originalFilename: string;
132
+ }>, z.ZodArray<z.ZodObject<{
133
+ filename: z.ZodString;
134
+ originalFilename: z.ZodString;
135
+ type: z.ZodString;
136
+ option: z.ZodString;
137
+ }, "strip", z.ZodTypeAny, {
138
+ type: string;
139
+ option: string;
140
+ filename: string;
141
+ originalFilename: string;
142
+ }, {
143
+ type: string;
144
+ option: string;
145
+ filename: string;
146
+ originalFilename: string;
147
+ }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
148
+ country: z.ZodString;
149
+ addressType: z.ZodLiteral<"DOMESTIC">;
150
+ province: z.ZodString;
151
+ district: z.ZodString;
152
+ }, {
153
+ urbanOrRural: z.ZodLiteral<"URBAN">;
154
+ town: z.ZodOptional<z.ZodString>;
155
+ residentialArea: z.ZodOptional<z.ZodString>;
156
+ street: z.ZodOptional<z.ZodString>;
157
+ number: z.ZodOptional<z.ZodString>;
158
+ zipCode: z.ZodOptional<z.ZodString>;
159
+ }>, "strip", z.ZodTypeAny, {
160
+ country: string;
161
+ district: string;
162
+ addressType: "DOMESTIC";
163
+ province: string;
164
+ urbanOrRural: "URBAN";
165
+ number?: string | undefined;
166
+ town?: string | undefined;
167
+ residentialArea?: string | undefined;
168
+ street?: string | undefined;
169
+ zipCode?: string | undefined;
170
+ }, {
171
+ country: string;
172
+ district: string;
173
+ addressType: "DOMESTIC";
174
+ province: string;
175
+ urbanOrRural: "URBAN";
176
+ number?: string | undefined;
177
+ town?: string | undefined;
178
+ residentialArea?: string | undefined;
179
+ street?: string | undefined;
180
+ zipCode?: string | undefined;
181
+ }>, z.ZodObject<z.objectUtil.extendShape<{
182
+ country: z.ZodString;
183
+ addressType: z.ZodLiteral<"DOMESTIC">;
184
+ province: z.ZodString;
185
+ district: z.ZodString;
186
+ }, {
187
+ urbanOrRural: z.ZodLiteral<"RURAL">;
188
+ village: z.ZodOptional<z.ZodString>;
189
+ }>, "strip", z.ZodTypeAny, {
190
+ country: string;
191
+ district: string;
192
+ addressType: "DOMESTIC";
193
+ province: string;
194
+ urbanOrRural: "RURAL";
195
+ village?: string | undefined;
196
+ }, {
197
+ country: string;
198
+ district: string;
199
+ addressType: "DOMESTIC";
200
+ province: string;
201
+ urbanOrRural: "RURAL";
202
+ village?: string | undefined;
203
+ }>, z.ZodUndefined, z.ZodObject<{
204
+ country: z.ZodString;
205
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
206
+ state: z.ZodString;
207
+ district2: z.ZodString;
208
+ cityOrTown: z.ZodOptional<z.ZodString>;
209
+ addressLine1: z.ZodOptional<z.ZodString>;
210
+ addressLine2: z.ZodOptional<z.ZodString>;
211
+ addressLine3: z.ZodOptional<z.ZodString>;
212
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ country: string;
215
+ state: string;
216
+ addressType: "INTERNATIONAL";
217
+ district2: string;
218
+ cityOrTown?: string | undefined;
219
+ addressLine1?: string | undefined;
220
+ addressLine2?: string | undefined;
221
+ addressLine3?: string | undefined;
222
+ postcodeOrZip?: string | undefined;
223
+ }, {
224
+ country: string;
225
+ state: string;
226
+ addressType: "INTERNATIONAL";
227
+ district2: string;
228
+ cityOrTown?: string | undefined;
229
+ addressLine1?: string | undefined;
230
+ addressLine2?: string | undefined;
231
+ addressLine3?: string | undefined;
232
+ postcodeOrZip?: string | undefined;
233
+ }>]>, "strip">, z.objectInputType<{
234
+ eventType: z.ZodOptional<z.ZodString>;
235
+ }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
236
+ filename: z.ZodString;
237
+ originalFilename: z.ZodString;
238
+ type: z.ZodString;
239
+ }, "strip", z.ZodTypeAny, {
240
+ type: string;
241
+ filename: string;
242
+ originalFilename: string;
243
+ }, {
244
+ type: string;
245
+ filename: string;
246
+ originalFilename: string;
247
+ }>, z.ZodArray<z.ZodObject<{
248
+ filename: z.ZodString;
249
+ originalFilename: z.ZodString;
250
+ type: z.ZodString;
251
+ option: z.ZodString;
252
+ }, "strip", z.ZodTypeAny, {
253
+ type: string;
254
+ option: string;
255
+ filename: string;
256
+ originalFilename: string;
257
+ }, {
258
+ type: string;
259
+ option: string;
260
+ filename: string;
261
+ originalFilename: string;
262
+ }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
263
+ country: z.ZodString;
264
+ addressType: z.ZodLiteral<"DOMESTIC">;
265
+ province: z.ZodString;
266
+ district: z.ZodString;
267
+ }, {
268
+ urbanOrRural: z.ZodLiteral<"URBAN">;
269
+ town: z.ZodOptional<z.ZodString>;
270
+ residentialArea: z.ZodOptional<z.ZodString>;
271
+ street: z.ZodOptional<z.ZodString>;
272
+ number: z.ZodOptional<z.ZodString>;
273
+ zipCode: z.ZodOptional<z.ZodString>;
274
+ }>, "strip", z.ZodTypeAny, {
275
+ country: string;
276
+ district: string;
277
+ addressType: "DOMESTIC";
278
+ province: string;
279
+ urbanOrRural: "URBAN";
280
+ number?: string | undefined;
281
+ town?: string | undefined;
282
+ residentialArea?: string | undefined;
283
+ street?: string | undefined;
284
+ zipCode?: string | undefined;
285
+ }, {
286
+ country: string;
287
+ district: string;
288
+ addressType: "DOMESTIC";
289
+ province: string;
290
+ urbanOrRural: "URBAN";
291
+ number?: string | undefined;
292
+ town?: string | undefined;
293
+ residentialArea?: string | undefined;
294
+ street?: string | undefined;
295
+ zipCode?: string | undefined;
296
+ }>, z.ZodObject<z.objectUtil.extendShape<{
297
+ country: z.ZodString;
298
+ addressType: z.ZodLiteral<"DOMESTIC">;
299
+ province: z.ZodString;
300
+ district: z.ZodString;
301
+ }, {
302
+ urbanOrRural: z.ZodLiteral<"RURAL">;
303
+ village: z.ZodOptional<z.ZodString>;
304
+ }>, "strip", z.ZodTypeAny, {
305
+ country: string;
306
+ district: string;
307
+ addressType: "DOMESTIC";
308
+ province: string;
309
+ urbanOrRural: "RURAL";
310
+ village?: string | undefined;
311
+ }, {
312
+ country: string;
313
+ district: string;
314
+ addressType: "DOMESTIC";
315
+ province: string;
316
+ urbanOrRural: "RURAL";
317
+ village?: string | undefined;
318
+ }>, z.ZodUndefined, z.ZodObject<{
319
+ country: z.ZodString;
320
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
321
+ state: z.ZodString;
322
+ district2: z.ZodString;
323
+ cityOrTown: z.ZodOptional<z.ZodString>;
324
+ addressLine1: z.ZodOptional<z.ZodString>;
325
+ addressLine2: z.ZodOptional<z.ZodString>;
326
+ addressLine3: z.ZodOptional<z.ZodString>;
327
+ postcodeOrZip: z.ZodOptional<z.ZodString>;
328
+ }, "strip", z.ZodTypeAny, {
329
+ country: string;
330
+ state: string;
331
+ addressType: "INTERNATIONAL";
332
+ district2: string;
333
+ cityOrTown?: string | undefined;
334
+ addressLine1?: string | undefined;
335
+ addressLine2?: string | undefined;
336
+ addressLine3?: string | undefined;
337
+ postcodeOrZip?: string | undefined;
338
+ }, {
339
+ country: string;
340
+ state: string;
341
+ addressType: "INTERNATIONAL";
342
+ district2: string;
343
+ cityOrTown?: string | undefined;
344
+ addressLine1?: string | undefined;
345
+ addressLine2?: string | undefined;
346
+ addressLine3?: string | undefined;
347
+ postcodeOrZip?: string | undefined;
348
+ }>]>, "strip">>;
349
+ export type SearchQueryParams = z.infer<typeof SearchQueryParams>;
350
+ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
351
+ config: z.ZodObject<{
352
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ type: "exact" | "fuzzy" | "range";
355
+ }, {
356
+ type: "exact" | "fuzzy" | "range";
357
+ }>;
358
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
359
+ value: z.ZodString;
360
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
361
+ id: string;
362
+ description: string;
363
+ defaultMessage: string;
364
+ }>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ value: string;
367
+ label: TranslationConfig;
368
+ }, {
369
+ value: string;
370
+ label: {
371
+ id: string;
372
+ description: string;
373
+ defaultMessage: string;
374
+ };
375
+ }>, "many">>;
376
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
377
+ id: string;
378
+ description: string;
379
+ defaultMessage: string;
380
+ }>>;
381
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
382
+ }, {
383
+ fieldId: z.ZodString;
384
+ fieldType: z.ZodLiteral<"field">;
385
+ }>, "strip", z.ZodTypeAny, {
386
+ config: {
387
+ type: "exact" | "fuzzy" | "range";
388
+ };
389
+ fieldId: string;
390
+ fieldType: "field";
391
+ options?: {
392
+ value: string;
393
+ label: TranslationConfig;
394
+ }[] | undefined;
395
+ conditionals?: ({
396
+ type: "SHOW";
397
+ conditional: import(".").JSONSchema;
398
+ } | {
399
+ type: "ENABLE";
400
+ conditional: import(".").JSONSchema;
401
+ } | {
402
+ type: "DISPLAY_ON_REVIEW";
403
+ conditional: import(".").JSONSchema;
404
+ })[] | undefined;
405
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
406
+ }, {
407
+ config: {
408
+ type: "exact" | "fuzzy" | "range";
409
+ };
410
+ fieldId: string;
411
+ fieldType: "field";
412
+ options?: {
413
+ value: string;
414
+ label: {
415
+ id: string;
416
+ description: string;
417
+ defaultMessage: string;
418
+ };
419
+ }[] | undefined;
420
+ conditionals?: ({
421
+ type: "SHOW";
422
+ conditional: import(".").JSONSchema;
423
+ } | {
424
+ type: "ENABLE";
425
+ conditional: import(".").JSONSchema;
426
+ } | {
427
+ type: "DISPLAY_ON_REVIEW";
428
+ conditional: import(".").JSONSchema;
429
+ })[] | undefined;
430
+ searchCriteriaLabelPrefix?: {
431
+ id: string;
432
+ description: string;
433
+ defaultMessage: string;
434
+ } | undefined;
435
+ }>;
436
+ export declare const EventFieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
437
+ export type EventFieldId = z.infer<typeof EventFieldId>;
438
+ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
439
+ config: z.ZodObject<{
440
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ type: "exact" | "fuzzy" | "range";
443
+ }, {
444
+ type: "exact" | "fuzzy" | "range";
445
+ }>;
446
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
447
+ value: z.ZodString;
448
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
449
+ id: string;
450
+ description: string;
451
+ defaultMessage: string;
452
+ }>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ value: string;
455
+ label: TranslationConfig;
456
+ }, {
457
+ value: string;
458
+ label: {
459
+ id: string;
460
+ description: string;
461
+ defaultMessage: string;
462
+ };
463
+ }>, "many">>;
464
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
465
+ id: string;
466
+ description: string;
467
+ defaultMessage: string;
468
+ }>>;
469
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
470
+ }, {
471
+ fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
472
+ fieldType: z.ZodLiteral<"event">;
473
+ }>, "strip", z.ZodTypeAny, {
474
+ config: {
475
+ type: "exact" | "fuzzy" | "range";
476
+ };
477
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
478
+ fieldType: "event";
479
+ options?: {
480
+ value: string;
481
+ label: TranslationConfig;
482
+ }[] | undefined;
483
+ conditionals?: ({
484
+ type: "SHOW";
485
+ conditional: import(".").JSONSchema;
486
+ } | {
487
+ type: "ENABLE";
488
+ conditional: import(".").JSONSchema;
489
+ } | {
490
+ type: "DISPLAY_ON_REVIEW";
491
+ conditional: import(".").JSONSchema;
492
+ })[] | undefined;
493
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
494
+ }, {
495
+ config: {
496
+ type: "exact" | "fuzzy" | "range";
497
+ };
498
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
499
+ fieldType: "event";
500
+ options?: {
501
+ value: string;
502
+ label: {
503
+ id: string;
504
+ description: string;
505
+ defaultMessage: string;
506
+ };
507
+ }[] | undefined;
508
+ conditionals?: ({
509
+ type: "SHOW";
510
+ conditional: import(".").JSONSchema;
511
+ } | {
512
+ type: "ENABLE";
513
+ conditional: import(".").JSONSchema;
514
+ } | {
515
+ type: "DISPLAY_ON_REVIEW";
516
+ conditional: import(".").JSONSchema;
517
+ })[] | undefined;
518
+ searchCriteriaLabelPrefix?: {
519
+ id: string;
520
+ description: string;
521
+ defaultMessage: string;
522
+ } | undefined;
523
+ }>;
524
+ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
525
+ config: z.ZodObject<{
526
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
527
+ }, "strip", z.ZodTypeAny, {
528
+ type: "exact" | "fuzzy" | "range";
529
+ }, {
530
+ type: "exact" | "fuzzy" | "range";
531
+ }>;
532
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
533
+ value: z.ZodString;
534
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
535
+ id: string;
536
+ description: string;
537
+ defaultMessage: string;
538
+ }>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ value: string;
541
+ label: TranslationConfig;
542
+ }, {
543
+ value: string;
544
+ label: {
545
+ id: string;
546
+ description: string;
547
+ defaultMessage: string;
548
+ };
549
+ }>, "many">>;
550
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
551
+ id: string;
552
+ description: string;
553
+ defaultMessage: string;
554
+ }>>;
555
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
556
+ }, {
557
+ fieldId: z.ZodString;
558
+ fieldType: z.ZodLiteral<"field">;
559
+ }>, "strip", z.ZodTypeAny, {
560
+ config: {
561
+ type: "exact" | "fuzzy" | "range";
562
+ };
563
+ fieldId: string;
564
+ fieldType: "field";
565
+ options?: {
566
+ value: string;
567
+ label: TranslationConfig;
568
+ }[] | undefined;
569
+ conditionals?: ({
570
+ type: "SHOW";
571
+ conditional: import(".").JSONSchema;
572
+ } | {
573
+ type: "ENABLE";
574
+ conditional: import(".").JSONSchema;
575
+ } | {
576
+ type: "DISPLAY_ON_REVIEW";
577
+ conditional: import(".").JSONSchema;
578
+ })[] | undefined;
579
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
580
+ }, {
581
+ config: {
582
+ type: "exact" | "fuzzy" | "range";
583
+ };
584
+ fieldId: string;
585
+ fieldType: "field";
586
+ options?: {
587
+ value: string;
588
+ label: {
589
+ id: string;
590
+ description: string;
591
+ defaultMessage: string;
592
+ };
593
+ }[] | undefined;
594
+ conditionals?: ({
595
+ type: "SHOW";
596
+ conditional: import(".").JSONSchema;
597
+ } | {
598
+ type: "ENABLE";
599
+ conditional: import(".").JSONSchema;
600
+ } | {
601
+ type: "DISPLAY_ON_REVIEW";
602
+ conditional: import(".").JSONSchema;
603
+ })[] | undefined;
604
+ searchCriteriaLabelPrefix?: {
605
+ id: string;
606
+ description: string;
607
+ defaultMessage: string;
608
+ } | undefined;
609
+ }>, z.ZodObject<z.objectUtil.extendShape<{
610
+ config: z.ZodObject<{
611
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
612
+ }, "strip", z.ZodTypeAny, {
613
+ type: "exact" | "fuzzy" | "range";
614
+ }, {
615
+ type: "exact" | "fuzzy" | "range";
616
+ }>;
617
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
618
+ value: z.ZodString;
619
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
620
+ id: string;
621
+ description: string;
622
+ defaultMessage: string;
623
+ }>;
624
+ }, "strip", z.ZodTypeAny, {
625
+ value: string;
626
+ label: TranslationConfig;
627
+ }, {
628
+ value: string;
629
+ label: {
630
+ id: string;
631
+ description: string;
632
+ defaultMessage: string;
633
+ };
634
+ }>, "many">>;
635
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
636
+ id: string;
637
+ description: string;
638
+ defaultMessage: string;
639
+ }>>;
640
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
641
+ }, {
642
+ fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
643
+ fieldType: z.ZodLiteral<"event">;
644
+ }>, "strip", z.ZodTypeAny, {
645
+ config: {
646
+ type: "exact" | "fuzzy" | "range";
647
+ };
648
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
649
+ fieldType: "event";
650
+ options?: {
651
+ value: string;
652
+ label: TranslationConfig;
653
+ }[] | undefined;
654
+ conditionals?: ({
655
+ type: "SHOW";
656
+ conditional: import(".").JSONSchema;
657
+ } | {
658
+ type: "ENABLE";
659
+ conditional: import(".").JSONSchema;
660
+ } | {
661
+ type: "DISPLAY_ON_REVIEW";
662
+ conditional: import(".").JSONSchema;
663
+ })[] | undefined;
664
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
665
+ }, {
666
+ config: {
667
+ type: "exact" | "fuzzy" | "range";
668
+ };
669
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
670
+ fieldType: "event";
671
+ options?: {
672
+ value: string;
673
+ label: {
674
+ id: string;
675
+ description: string;
676
+ defaultMessage: string;
677
+ };
678
+ }[] | undefined;
679
+ conditionals?: ({
680
+ type: "SHOW";
681
+ conditional: import(".").JSONSchema;
682
+ } | {
683
+ type: "ENABLE";
684
+ conditional: import(".").JSONSchema;
685
+ } | {
686
+ type: "DISPLAY_ON_REVIEW";
687
+ conditional: import(".").JSONSchema;
688
+ })[] | undefined;
689
+ searchCriteriaLabelPrefix?: {
690
+ id: string;
691
+ description: string;
692
+ defaultMessage: string;
693
+ } | undefined;
694
+ }>]>;
695
+ export type SearchField = z.infer<typeof SearchField>;
3
696
  export declare const AdvancedSearchConfig: z.ZodObject<{
4
697
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
5
698
  id: string;
6
699
  description: string;
7
700
  defaultMessage: string;
8
701
  }>;
9
- fields: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
10
- fieldId: z.ZodString;
11
- config: z.ZodOptional<z.ZodObject<{
12
- type: z.ZodEnum<["FUZZY", "EXACT", "RANGE"]>;
702
+ fields: z.ZodArray<z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
703
+ config: z.ZodObject<{
704
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
13
705
  }, "strip", z.ZodTypeAny, {
14
- type: "FUZZY" | "EXACT" | "RANGE";
706
+ type: "exact" | "fuzzy" | "range";
15
707
  }, {
16
- type: "FUZZY" | "EXACT" | "RANGE";
708
+ type: "exact" | "fuzzy" | "range";
709
+ }>;
710
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
711
+ value: z.ZodString;
712
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
713
+ id: string;
714
+ description: string;
715
+ defaultMessage: string;
716
+ }>;
717
+ }, "strip", z.ZodTypeAny, {
718
+ value: string;
719
+ label: TranslationConfig;
720
+ }, {
721
+ value: string;
722
+ label: {
723
+ id: string;
724
+ description: string;
725
+ defaultMessage: string;
726
+ };
727
+ }>, "many">>;
728
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
729
+ id: string;
730
+ description: string;
731
+ defaultMessage: string;
17
732
  }>>;
18
- }, "strip", z.ZodTypeAny, {
733
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
734
+ }, {
735
+ fieldId: z.ZodString;
736
+ fieldType: z.ZodLiteral<"field">;
737
+ }>, "strip", z.ZodTypeAny, {
738
+ config: {
739
+ type: "exact" | "fuzzy" | "range";
740
+ };
19
741
  fieldId: string;
20
- config?: {
21
- type: "FUZZY" | "EXACT" | "RANGE";
22
- } | undefined;
742
+ fieldType: "field";
743
+ options?: {
744
+ value: string;
745
+ label: TranslationConfig;
746
+ }[] | undefined;
747
+ conditionals?: ({
748
+ type: "SHOW";
749
+ conditional: import(".").JSONSchema;
750
+ } | {
751
+ type: "ENABLE";
752
+ conditional: import(".").JSONSchema;
753
+ } | {
754
+ type: "DISPLAY_ON_REVIEW";
755
+ conditional: import(".").JSONSchema;
756
+ })[] | undefined;
757
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
23
758
  }, {
759
+ config: {
760
+ type: "exact" | "fuzzy" | "range";
761
+ };
24
762
  fieldId: string;
25
- config?: {
26
- type: "FUZZY" | "EXACT" | "RANGE";
763
+ fieldType: "field";
764
+ options?: {
765
+ value: string;
766
+ label: {
767
+ id: string;
768
+ description: string;
769
+ defaultMessage: string;
770
+ };
771
+ }[] | undefined;
772
+ conditionals?: ({
773
+ type: "SHOW";
774
+ conditional: import(".").JSONSchema;
775
+ } | {
776
+ type: "ENABLE";
777
+ conditional: import(".").JSONSchema;
778
+ } | {
779
+ type: "DISPLAY_ON_REVIEW";
780
+ conditional: import(".").JSONSchema;
781
+ })[] | undefined;
782
+ searchCriteriaLabelPrefix?: {
783
+ id: string;
784
+ description: string;
785
+ defaultMessage: string;
786
+ } | undefined;
787
+ }>, z.ZodObject<z.objectUtil.extendShape<{
788
+ config: z.ZodObject<{
789
+ type: z.ZodEnum<["fuzzy", "exact", "range"]>;
790
+ }, "strip", z.ZodTypeAny, {
791
+ type: "exact" | "fuzzy" | "range";
792
+ }, {
793
+ type: "exact" | "fuzzy" | "range";
794
+ }>;
795
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
796
+ value: z.ZodString;
797
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
798
+ id: string;
799
+ description: string;
800
+ defaultMessage: string;
801
+ }>;
802
+ }, "strip", z.ZodTypeAny, {
803
+ value: string;
804
+ label: TranslationConfig;
805
+ }, {
806
+ value: string;
807
+ label: {
808
+ id: string;
809
+ description: string;
810
+ defaultMessage: string;
811
+ };
812
+ }>, "many">>;
813
+ searchCriteriaLabelPrefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
814
+ id: string;
815
+ description: string;
816
+ defaultMessage: string;
817
+ }>>;
818
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
819
+ }, {
820
+ fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
821
+ fieldType: z.ZodLiteral<"event">;
822
+ }>, "strip", z.ZodTypeAny, {
823
+ config: {
824
+ type: "exact" | "fuzzy" | "range";
825
+ };
826
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
827
+ fieldType: "event";
828
+ options?: {
829
+ value: string;
830
+ label: TranslationConfig;
831
+ }[] | undefined;
832
+ conditionals?: ({
833
+ type: "SHOW";
834
+ conditional: import(".").JSONSchema;
835
+ } | {
836
+ type: "ENABLE";
837
+ conditional: import(".").JSONSchema;
838
+ } | {
839
+ type: "DISPLAY_ON_REVIEW";
840
+ conditional: import(".").JSONSchema;
841
+ })[] | undefined;
842
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
843
+ }, {
844
+ config: {
845
+ type: "exact" | "fuzzy" | "range";
846
+ };
847
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
848
+ fieldType: "event";
849
+ options?: {
850
+ value: string;
851
+ label: {
852
+ id: string;
853
+ description: string;
854
+ defaultMessage: string;
855
+ };
856
+ }[] | undefined;
857
+ conditionals?: ({
858
+ type: "SHOW";
859
+ conditional: import(".").JSONSchema;
860
+ } | {
861
+ type: "ENABLE";
862
+ conditional: import(".").JSONSchema;
863
+ } | {
864
+ type: "DISPLAY_ON_REVIEW";
865
+ conditional: import(".").JSONSchema;
866
+ })[] | undefined;
867
+ searchCriteriaLabelPrefix?: {
868
+ id: string;
869
+ description: string;
870
+ defaultMessage: string;
27
871
  } | undefined;
28
- }>, "many">>>;
872
+ }>]>, "many">;
29
873
  }, "strip", z.ZodTypeAny, {
30
874
  title: TranslationConfig;
31
- fields: {
875
+ fields: ({
876
+ config: {
877
+ type: "exact" | "fuzzy" | "range";
878
+ };
32
879
  fieldId: string;
33
- config?: {
34
- type: "FUZZY" | "EXACT" | "RANGE";
35
- } | undefined;
36
- }[];
880
+ fieldType: "field";
881
+ options?: {
882
+ value: string;
883
+ label: TranslationConfig;
884
+ }[] | undefined;
885
+ conditionals?: ({
886
+ type: "SHOW";
887
+ conditional: import(".").JSONSchema;
888
+ } | {
889
+ type: "ENABLE";
890
+ conditional: import(".").JSONSchema;
891
+ } | {
892
+ type: "DISPLAY_ON_REVIEW";
893
+ conditional: import(".").JSONSchema;
894
+ })[] | undefined;
895
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
896
+ } | {
897
+ config: {
898
+ type: "exact" | "fuzzy" | "range";
899
+ };
900
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
901
+ fieldType: "event";
902
+ options?: {
903
+ value: string;
904
+ label: TranslationConfig;
905
+ }[] | undefined;
906
+ conditionals?: ({
907
+ type: "SHOW";
908
+ conditional: import(".").JSONSchema;
909
+ } | {
910
+ type: "ENABLE";
911
+ conditional: import(".").JSONSchema;
912
+ } | {
913
+ type: "DISPLAY_ON_REVIEW";
914
+ conditional: import(".").JSONSchema;
915
+ })[] | undefined;
916
+ searchCriteriaLabelPrefix?: TranslationConfig | undefined;
917
+ })[];
37
918
  }, {
38
919
  title: {
39
920
  id: string;
40
921
  description: string;
41
922
  defaultMessage: string;
42
923
  };
43
- fields?: {
924
+ fields: ({
925
+ config: {
926
+ type: "exact" | "fuzzy" | "range";
927
+ };
44
928
  fieldId: string;
45
- config?: {
46
- type: "FUZZY" | "EXACT" | "RANGE";
929
+ fieldType: "field";
930
+ options?: {
931
+ value: string;
932
+ label: {
933
+ id: string;
934
+ description: string;
935
+ defaultMessage: string;
936
+ };
937
+ }[] | undefined;
938
+ conditionals?: ({
939
+ type: "SHOW";
940
+ conditional: import(".").JSONSchema;
941
+ } | {
942
+ type: "ENABLE";
943
+ conditional: import(".").JSONSchema;
944
+ } | {
945
+ type: "DISPLAY_ON_REVIEW";
946
+ conditional: import(".").JSONSchema;
947
+ })[] | undefined;
948
+ searchCriteriaLabelPrefix?: {
949
+ id: string;
950
+ description: string;
951
+ defaultMessage: string;
47
952
  } | undefined;
48
- }[] | undefined;
953
+ } | {
954
+ config: {
955
+ type: "exact" | "fuzzy" | "range";
956
+ };
957
+ fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
958
+ fieldType: "event";
959
+ options?: {
960
+ value: string;
961
+ label: {
962
+ id: string;
963
+ description: string;
964
+ defaultMessage: string;
965
+ };
966
+ }[] | undefined;
967
+ conditionals?: ({
968
+ type: "SHOW";
969
+ conditional: import(".").JSONSchema;
970
+ } | {
971
+ type: "ENABLE";
972
+ conditional: import(".").JSONSchema;
973
+ } | {
974
+ type: "DISPLAY_ON_REVIEW";
975
+ conditional: import(".").JSONSchema;
976
+ })[] | undefined;
977
+ searchCriteriaLabelPrefix?: {
978
+ id: string;
979
+ description: string;
980
+ defaultMessage: string;
981
+ } | undefined;
982
+ })[];
49
983
  }>;
984
+ export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
50
985
  export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
51
986
  //# sourceMappingURL=AdvancedSearchConfig.d.ts.map