@opencrvs/toolkit 1.8.0-rc.ffe24c3 → 1.8.1-rc.008155b

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 (35) hide show
  1. package/dist/commons/api/router.d.ts +1791 -14926
  2. package/dist/commons/conditionals/conditionals.d.ts +0 -12
  3. package/dist/commons/conditionals/validate.d.ts +5 -0
  4. package/dist/commons/events/ActionConfig.d.ts +37041 -35133
  5. package/dist/commons/events/ActionDocument.d.ts +3742 -1637
  6. package/dist/commons/events/ActionInput.d.ts +2342 -1380
  7. package/dist/commons/events/ActionType.d.ts +7 -4
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +153 -86
  9. package/dist/commons/events/CompositeFieldValue.d.ts +15 -15
  10. package/dist/commons/events/CountryConfigQueryInput.d.ts +1174 -772
  11. package/dist/commons/events/Draft.d.ts +190 -118
  12. package/dist/commons/events/EventConfig.d.ts +20268 -22409
  13. package/dist/commons/events/EventDocument.d.ts +1714 -1021
  14. package/dist/commons/events/EventIndex.d.ts +523 -182
  15. package/dist/commons/events/EventMetadata.d.ts +9 -7
  16. package/dist/commons/events/FieldConfig.d.ts +1527 -455
  17. package/dist/commons/events/FieldType.d.ts +3 -1
  18. package/dist/commons/events/FieldTypeMapping.d.ts +80 -41
  19. package/dist/commons/events/FieldValue.d.ts +58 -28
  20. package/dist/commons/events/FormConfig.d.ts +9263 -2657
  21. package/dist/commons/events/PageConfig.d.ts +3642 -2028
  22. package/dist/commons/events/SummaryConfig.d.ts +10 -10
  23. package/dist/commons/events/User.d.ts +6 -3
  24. package/dist/commons/events/WorkqueueConfig.d.ts +2290 -1350
  25. package/dist/commons/events/defineConfig.d.ts +2761 -3252
  26. package/dist/commons/events/event.d.ts +19 -19
  27. package/dist/commons/events/field.d.ts +27 -1
  28. package/dist/commons/events/scopes.d.ts +2 -1
  29. package/dist/commons/events/test.utils.d.ts +62 -34
  30. package/dist/commons/events/utils.d.ts +8851 -6797
  31. package/dist/conditionals/index.js +25 -55
  32. package/dist/events/index.js +1657 -1377
  33. package/dist/scopes/index.d.ts +92 -6
  34. package/dist/scopes/index.js +38 -9
  35. package/package.json +3 -3
@@ -22,9 +22,13 @@ export declare const ActionType: {
22
22
  readonly UNASSIGN: "UNASSIGN";
23
23
  };
24
24
  export type ActionType = (typeof ActionType)[keyof typeof ActionType];
25
- export declare const ConfirmableActions: readonly ["NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE"];
25
+ export declare const ConfirmableActions: readonly ["NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "APPROVE_CORRECTION", "REJECT_CORRECTION"];
26
26
  /** Testing building types from enums as an alternative */
27
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
+ export declare const ExclusiveActions: {
29
+ readonly REVIEW_CORRECTION_REQUEST: "REVIEW_CORRECTION_REQUEST";
30
+ };
31
+ export type ExclusiveActionTypes = (typeof ExclusiveActions)[keyof typeof ExclusiveActions];
28
32
  /** Actions which change event data (declaration) before registration / during declaration. */
29
33
  export declare const DeclarationActions: z.ZodEnum<["DECLARE", "VALIDATE", "REGISTER"]>;
30
34
  export type DeclarationActionType = z.infer<typeof DeclarationActions>;
@@ -36,10 +40,9 @@ export declare const annotationActions: z.ZodEnum<["DELETE", "CREATE", "NOTIFY",
36
40
  export type AnnotationActionType = z.infer<typeof annotationActions>;
37
41
  /** Actions which requires the user to be assigned */
38
42
  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"]>;
39
- /** Actions which change the status of the event */
40
- export declare const StatusChangingActions: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE"]>;
41
43
  /** Actions which are visible in action menu and workqueue */
42
- export declare const workqueueActions: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "READ", "ASSIGN", "UNASSIGN"]>;
44
+ export declare const workqueueActions: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
43
45
  export type WorkqueueActionType = z.infer<typeof workqueueActions>;
46
+ export type DisplayableAction = ActionType | ExclusiveActionTypes;
44
47
  export declare function isMetaAction(actionType: ActionType): boolean;
45
48
  //# sourceMappingURL=ActionType.d.ts.map
@@ -1,33 +1,43 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
+ import { FieldConfig } from './FieldConfig';
3
4
  export declare const SearchQueryParams: z.ZodObject<{
4
5
  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;
6
+ }, "strip", z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
7
+ start: z.ZodString;
8
+ end: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ start: string;
11
+ end: string;
12
+ }, {
13
+ start: string;
14
+ end: string;
15
+ }>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
16
+ path: z.ZodEffects<z.ZodString, string, string>;
7
17
  originalFilename: z.ZodString;
8
18
  type: z.ZodString;
9
19
  }, "strip", z.ZodTypeAny, {
10
20
  type: string;
11
- filename: string;
21
+ path: string;
12
22
  originalFilename: string;
13
23
  }, {
14
24
  type: string;
15
- filename: string;
25
+ path: string;
16
26
  originalFilename: string;
17
27
  }>, z.ZodArray<z.ZodObject<{
18
- filename: z.ZodString;
28
+ path: z.ZodEffects<z.ZodString, string, string>;
19
29
  originalFilename: z.ZodString;
20
30
  type: z.ZodString;
21
31
  option: z.ZodString;
22
32
  }, "strip", z.ZodTypeAny, {
23
33
  type: string;
24
34
  option: string;
25
- filename: string;
35
+ path: string;
26
36
  originalFilename: string;
27
37
  }, {
28
38
  type: string;
29
39
  option: string;
30
- filename: string;
40
+ path: string;
31
41
  originalFilename: string;
32
42
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
33
43
  country: z.ZodString;
@@ -128,45 +138,54 @@ export declare const SearchQueryParams: z.ZodObject<{
128
138
  surname: string;
129
139
  middlename?: string | undefined;
130
140
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
131
- firstname: z.ZodString;
132
- surname: z.ZodString;
141
+ firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
143
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
144
  }, "strip", z.ZodTypeAny, {
135
- firstname: string;
136
- surname: string;
145
+ firstname?: string | null | undefined;
146
+ surname?: string | null | undefined;
137
147
  middlename?: string | null | undefined;
138
148
  }, {
139
- firstname: string;
140
- surname: string;
149
+ firstname?: string | null | undefined;
150
+ surname?: string | null | undefined;
141
151
  middlename?: string | null | undefined;
142
152
  }>, z.ZodNull]>, z.ZodUndefined]>]>, z.objectOutputType<{
143
153
  eventType: z.ZodOptional<z.ZodString>;
144
- }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
145
- filename: z.ZodString;
154
+ }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
155
+ start: z.ZodString;
156
+ end: z.ZodString;
157
+ }, "strip", z.ZodTypeAny, {
158
+ start: string;
159
+ end: string;
160
+ }, {
161
+ start: string;
162
+ end: string;
163
+ }>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
164
+ path: z.ZodEffects<z.ZodString, string, string>;
146
165
  originalFilename: z.ZodString;
147
166
  type: z.ZodString;
148
167
  }, "strip", z.ZodTypeAny, {
149
168
  type: string;
150
- filename: string;
169
+ path: string;
151
170
  originalFilename: string;
152
171
  }, {
153
172
  type: string;
154
- filename: string;
173
+ path: string;
155
174
  originalFilename: string;
156
175
  }>, z.ZodArray<z.ZodObject<{
157
- filename: z.ZodString;
176
+ path: z.ZodEffects<z.ZodString, string, string>;
158
177
  originalFilename: z.ZodString;
159
178
  type: z.ZodString;
160
179
  option: z.ZodString;
161
180
  }, "strip", z.ZodTypeAny, {
162
181
  type: string;
163
182
  option: string;
164
- filename: string;
183
+ path: string;
165
184
  originalFilename: string;
166
185
  }, {
167
186
  type: string;
168
187
  option: string;
169
- filename: string;
188
+ path: string;
170
189
  originalFilename: string;
171
190
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
172
191
  country: z.ZodString;
@@ -267,45 +286,54 @@ export declare const SearchQueryParams: z.ZodObject<{
267
286
  surname: string;
268
287
  middlename?: string | undefined;
269
288
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
270
- firstname: z.ZodString;
271
- surname: z.ZodString;
289
+ firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
+ surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
272
291
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
292
  }, "strip", z.ZodTypeAny, {
274
- firstname: string;
275
- surname: string;
293
+ firstname?: string | null | undefined;
294
+ surname?: string | null | undefined;
276
295
  middlename?: string | null | undefined;
277
296
  }, {
278
- firstname: string;
279
- surname: string;
297
+ firstname?: string | null | undefined;
298
+ surname?: string | null | undefined;
280
299
  middlename?: string | null | undefined;
281
300
  }>, z.ZodNull]>, z.ZodUndefined]>]>, "strip">, z.objectInputType<{
282
301
  eventType: z.ZodOptional<z.ZodString>;
283
- }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
284
- filename: z.ZodString;
302
+ }, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
303
+ start: z.ZodString;
304
+ end: z.ZodString;
305
+ }, "strip", z.ZodTypeAny, {
306
+ start: string;
307
+ end: string;
308
+ }, {
309
+ start: string;
310
+ end: string;
311
+ }>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
312
+ path: z.ZodEffects<z.ZodString, string, string>;
285
313
  originalFilename: z.ZodString;
286
314
  type: z.ZodString;
287
315
  }, "strip", z.ZodTypeAny, {
288
316
  type: string;
289
- filename: string;
317
+ path: string;
290
318
  originalFilename: string;
291
319
  }, {
292
320
  type: string;
293
- filename: string;
321
+ path: string;
294
322
  originalFilename: string;
295
323
  }>, z.ZodArray<z.ZodObject<{
296
- filename: z.ZodString;
324
+ path: z.ZodEffects<z.ZodString, string, string>;
297
325
  originalFilename: z.ZodString;
298
326
  type: z.ZodString;
299
327
  option: z.ZodString;
300
328
  }, "strip", z.ZodTypeAny, {
301
329
  type: string;
302
330
  option: string;
303
- filename: string;
331
+ path: string;
304
332
  originalFilename: string;
305
333
  }, {
306
334
  type: string;
307
335
  option: string;
308
- filename: string;
336
+ path: string;
309
337
  originalFilename: string;
310
338
  }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
311
339
  country: z.ZodString;
@@ -406,26 +434,26 @@ export declare const SearchQueryParams: z.ZodObject<{
406
434
  surname: string;
407
435
  middlename?: string | undefined;
408
436
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
409
- firstname: z.ZodString;
410
- surname: z.ZodString;
437
+ firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
+ surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
439
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
440
  }, "strip", z.ZodTypeAny, {
413
- firstname: string;
414
- surname: string;
441
+ firstname?: string | null | undefined;
442
+ surname?: string | null | undefined;
415
443
  middlename?: string | null | undefined;
416
444
  }, {
417
- firstname: string;
418
- surname: string;
445
+ firstname?: string | null | undefined;
446
+ surname?: string | null | undefined;
419
447
  middlename?: string | null | undefined;
420
448
  }>, z.ZodNull]>, z.ZodUndefined]>]>, "strip">>;
421
449
  export type SearchQueryParams = z.infer<typeof SearchQueryParams>;
422
450
  export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
423
451
  config: z.ZodObject<{
424
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
452
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
425
453
  }, "strip", z.ZodTypeAny, {
426
- type: "exact" | "fuzzy" | "range";
454
+ type: "exact" | "fuzzy" | "range" | "within";
427
455
  }, {
428
- type: "exact" | "fuzzy" | "range";
456
+ type: "exact" | "fuzzy" | "range" | "within";
429
457
  }>;
430
458
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
431
459
  value: z.ZodString;
@@ -472,9 +500,11 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
472
500
  }, {
473
501
  fieldId: z.ZodString;
474
502
  fieldType: z.ZodLiteral<"field">;
503
+ alternateFieldIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
504
+ excludeInSearchQuery: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
475
505
  }>, "strip", z.ZodTypeAny, {
476
506
  config: {
477
- type: "exact" | "fuzzy" | "range";
507
+ type: "exact" | "fuzzy" | "range" | "within";
478
508
  };
479
509
  fieldId: string;
480
510
  fieldType: "field";
@@ -497,9 +527,11 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
497
527
  message: TranslationConfig;
498
528
  validator: import(".").JSONSchema;
499
529
  }[] | undefined;
530
+ alternateFieldIds?: string[] | undefined;
531
+ excludeInSearchQuery?: boolean | undefined;
500
532
  }, {
501
533
  config: {
502
- type: "exact" | "fuzzy" | "range";
534
+ type: "exact" | "fuzzy" | "range" | "within";
503
535
  };
504
536
  fieldId: string;
505
537
  fieldType: "field";
@@ -534,16 +566,33 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
534
566
  };
535
567
  validator: import(".").JSONSchema;
536
568
  }[] | undefined;
569
+ alternateFieldIds?: string[] | undefined;
570
+ excludeInSearchQuery?: boolean | undefined;
537
571
  }>;
538
- export declare const EventFieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
572
+ /**
573
+ * The event fields that are available for advanced search. These are the values
574
+ * that can be passed to the `event` function to create a field config.
575
+ */
576
+ export declare const EventFieldIdInput: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
577
+ /**
578
+ * Represent the prefix used to differentiate event metadata fields from
579
+ * the declaration ones in advanced search form.
580
+ */
581
+ export declare const METADATA_FIELD_PREFIX = "event.";
582
+ /**
583
+ * The field IDs that are actually used in the advanced search. The `event`
584
+ * function prefixes the `EventFieldIdInput` values with METADATA_FIELD_PREFIX.
585
+ */
586
+ export declare const EventFieldId: z.ZodEnum<["event.trackingId", "event.status", "event.legalStatuses.REGISTERED.acceptedAt", "event.legalStatuses.REGISTERED.createdAtLocation", "event.updatedAt"]>;
587
+ export type EventFieldIdInput = z.infer<typeof EventFieldIdInput>;
539
588
  export type EventFieldId = z.infer<typeof EventFieldId>;
540
589
  export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
541
590
  config: z.ZodObject<{
542
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
591
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
543
592
  }, "strip", z.ZodTypeAny, {
544
- type: "exact" | "fuzzy" | "range";
593
+ type: "exact" | "fuzzy" | "range" | "within";
545
594
  }, {
546
- type: "exact" | "fuzzy" | "range";
595
+ type: "exact" | "fuzzy" | "range" | "within";
547
596
  }>;
548
597
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
549
598
  value: z.ZodString;
@@ -588,13 +637,13 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
588
637
  validator: import(".").JSONSchema;
589
638
  }>, "many">>>;
590
639
  }, {
591
- fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
640
+ fieldId: z.ZodEnum<["event.trackingId", "event.status", "event.legalStatuses.REGISTERED.acceptedAt", "event.legalStatuses.REGISTERED.createdAtLocation", "event.updatedAt"]>;
592
641
  fieldType: z.ZodLiteral<"event">;
593
642
  }>, "strip", z.ZodTypeAny, {
594
643
  config: {
595
- type: "exact" | "fuzzy" | "range";
644
+ type: "exact" | "fuzzy" | "range" | "within";
596
645
  };
597
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
646
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
598
647
  fieldType: "event";
599
648
  options?: {
600
649
  value: string;
@@ -617,9 +666,9 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
617
666
  }[] | undefined;
618
667
  }, {
619
668
  config: {
620
- type: "exact" | "fuzzy" | "range";
669
+ type: "exact" | "fuzzy" | "range" | "within";
621
670
  };
622
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
671
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
623
672
  fieldType: "event";
624
673
  options?: {
625
674
  value: string;
@@ -655,11 +704,11 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
655
704
  }>;
656
705
  export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
657
706
  config: z.ZodObject<{
658
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
707
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
659
708
  }, "strip", z.ZodTypeAny, {
660
- type: "exact" | "fuzzy" | "range";
709
+ type: "exact" | "fuzzy" | "range" | "within";
661
710
  }, {
662
- type: "exact" | "fuzzy" | "range";
711
+ type: "exact" | "fuzzy" | "range" | "within";
663
712
  }>;
664
713
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
665
714
  value: z.ZodString;
@@ -706,9 +755,11 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
706
755
  }, {
707
756
  fieldId: z.ZodString;
708
757
  fieldType: z.ZodLiteral<"field">;
758
+ alternateFieldIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
759
+ excludeInSearchQuery: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
709
760
  }>, "strip", z.ZodTypeAny, {
710
761
  config: {
711
- type: "exact" | "fuzzy" | "range";
762
+ type: "exact" | "fuzzy" | "range" | "within";
712
763
  };
713
764
  fieldId: string;
714
765
  fieldType: "field";
@@ -731,9 +782,11 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
731
782
  message: TranslationConfig;
732
783
  validator: import(".").JSONSchema;
733
784
  }[] | undefined;
785
+ alternateFieldIds?: string[] | undefined;
786
+ excludeInSearchQuery?: boolean | undefined;
734
787
  }, {
735
788
  config: {
736
- type: "exact" | "fuzzy" | "range";
789
+ type: "exact" | "fuzzy" | "range" | "within";
737
790
  };
738
791
  fieldId: string;
739
792
  fieldType: "field";
@@ -768,13 +821,15 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
768
821
  };
769
822
  validator: import(".").JSONSchema;
770
823
  }[] | undefined;
824
+ alternateFieldIds?: string[] | undefined;
825
+ excludeInSearchQuery?: boolean | undefined;
771
826
  }>, z.ZodObject<z.objectUtil.extendShape<{
772
827
  config: z.ZodObject<{
773
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
828
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
774
829
  }, "strip", z.ZodTypeAny, {
775
- type: "exact" | "fuzzy" | "range";
830
+ type: "exact" | "fuzzy" | "range" | "within";
776
831
  }, {
777
- type: "exact" | "fuzzy" | "range";
832
+ type: "exact" | "fuzzy" | "range" | "within";
778
833
  }>;
779
834
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
780
835
  value: z.ZodString;
@@ -819,13 +874,13 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
819
874
  validator: import(".").JSONSchema;
820
875
  }>, "many">>>;
821
876
  }, {
822
- fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
877
+ fieldId: z.ZodEnum<["event.trackingId", "event.status", "event.legalStatuses.REGISTERED.acceptedAt", "event.legalStatuses.REGISTERED.createdAtLocation", "event.updatedAt"]>;
823
878
  fieldType: z.ZodLiteral<"event">;
824
879
  }>, "strip", z.ZodTypeAny, {
825
880
  config: {
826
- type: "exact" | "fuzzy" | "range";
881
+ type: "exact" | "fuzzy" | "range" | "within";
827
882
  };
828
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
883
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
829
884
  fieldType: "event";
830
885
  options?: {
831
886
  value: string;
@@ -848,9 +903,9 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
848
903
  }[] | undefined;
849
904
  }, {
850
905
  config: {
851
- type: "exact" | "fuzzy" | "range";
906
+ type: "exact" | "fuzzy" | "range" | "within";
852
907
  };
853
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
908
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
854
909
  fieldType: "event";
855
910
  options?: {
856
911
  value: string;
@@ -893,11 +948,11 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
893
948
  }>;
894
949
  fields: z.ZodArray<z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
895
950
  config: z.ZodObject<{
896
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
951
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
897
952
  }, "strip", z.ZodTypeAny, {
898
- type: "exact" | "fuzzy" | "range";
953
+ type: "exact" | "fuzzy" | "range" | "within";
899
954
  }, {
900
- type: "exact" | "fuzzy" | "range";
955
+ type: "exact" | "fuzzy" | "range" | "within";
901
956
  }>;
902
957
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
903
958
  value: z.ZodString;
@@ -944,9 +999,11 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
944
999
  }, {
945
1000
  fieldId: z.ZodString;
946
1001
  fieldType: z.ZodLiteral<"field">;
1002
+ alternateFieldIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1003
+ excludeInSearchQuery: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
947
1004
  }>, "strip", z.ZodTypeAny, {
948
1005
  config: {
949
- type: "exact" | "fuzzy" | "range";
1006
+ type: "exact" | "fuzzy" | "range" | "within";
950
1007
  };
951
1008
  fieldId: string;
952
1009
  fieldType: "field";
@@ -969,9 +1026,11 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
969
1026
  message: TranslationConfig;
970
1027
  validator: import(".").JSONSchema;
971
1028
  }[] | undefined;
1029
+ alternateFieldIds?: string[] | undefined;
1030
+ excludeInSearchQuery?: boolean | undefined;
972
1031
  }, {
973
1032
  config: {
974
- type: "exact" | "fuzzy" | "range";
1033
+ type: "exact" | "fuzzy" | "range" | "within";
975
1034
  };
976
1035
  fieldId: string;
977
1036
  fieldType: "field";
@@ -1006,13 +1065,15 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1006
1065
  };
1007
1066
  validator: import(".").JSONSchema;
1008
1067
  }[] | undefined;
1068
+ alternateFieldIds?: string[] | undefined;
1069
+ excludeInSearchQuery?: boolean | undefined;
1009
1070
  }>, z.ZodObject<z.objectUtil.extendShape<{
1010
1071
  config: z.ZodObject<{
1011
- type: z.ZodEnum<["fuzzy", "exact", "range"]>;
1072
+ type: z.ZodEnum<["fuzzy", "exact", "range", "within"]>;
1012
1073
  }, "strip", z.ZodTypeAny, {
1013
- type: "exact" | "fuzzy" | "range";
1074
+ type: "exact" | "fuzzy" | "range" | "within";
1014
1075
  }, {
1015
- type: "exact" | "fuzzy" | "range";
1076
+ type: "exact" | "fuzzy" | "range" | "within";
1016
1077
  }>;
1017
1078
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1018
1079
  value: z.ZodString;
@@ -1057,13 +1118,13 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1057
1118
  validator: import(".").JSONSchema;
1058
1119
  }>, "many">>>;
1059
1120
  }, {
1060
- fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
1121
+ fieldId: z.ZodEnum<["event.trackingId", "event.status", "event.legalStatuses.REGISTERED.acceptedAt", "event.legalStatuses.REGISTERED.createdAtLocation", "event.updatedAt"]>;
1061
1122
  fieldType: z.ZodLiteral<"event">;
1062
1123
  }>, "strip", z.ZodTypeAny, {
1063
1124
  config: {
1064
- type: "exact" | "fuzzy" | "range";
1125
+ type: "exact" | "fuzzy" | "range" | "within";
1065
1126
  };
1066
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
1127
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
1067
1128
  fieldType: "event";
1068
1129
  options?: {
1069
1130
  value: string;
@@ -1086,9 +1147,9 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1086
1147
  }[] | undefined;
1087
1148
  }, {
1088
1149
  config: {
1089
- type: "exact" | "fuzzy" | "range";
1150
+ type: "exact" | "fuzzy" | "range" | "within";
1090
1151
  };
1091
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
1152
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
1092
1153
  fieldType: "event";
1093
1154
  options?: {
1094
1155
  value: string;
@@ -1126,7 +1187,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1126
1187
  title: TranslationConfig;
1127
1188
  fields: ({
1128
1189
  config: {
1129
- type: "exact" | "fuzzy" | "range";
1190
+ type: "exact" | "fuzzy" | "range" | "within";
1130
1191
  };
1131
1192
  fieldId: string;
1132
1193
  fieldType: "field";
@@ -1149,11 +1210,13 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1149
1210
  message: TranslationConfig;
1150
1211
  validator: import(".").JSONSchema;
1151
1212
  }[] | undefined;
1213
+ alternateFieldIds?: string[] | undefined;
1214
+ excludeInSearchQuery?: boolean | undefined;
1152
1215
  } | {
1153
1216
  config: {
1154
- type: "exact" | "fuzzy" | "range";
1217
+ type: "exact" | "fuzzy" | "range" | "within";
1155
1218
  };
1156
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
1219
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
1157
1220
  fieldType: "event";
1158
1221
  options?: {
1159
1222
  value: string;
@@ -1183,7 +1246,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1183
1246
  };
1184
1247
  fields: ({
1185
1248
  config: {
1186
- type: "exact" | "fuzzy" | "range";
1249
+ type: "exact" | "fuzzy" | "range" | "within";
1187
1250
  };
1188
1251
  fieldId: string;
1189
1252
  fieldType: "field";
@@ -1218,11 +1281,13 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1218
1281
  };
1219
1282
  validator: import(".").JSONSchema;
1220
1283
  }[] | undefined;
1284
+ alternateFieldIds?: string[] | undefined;
1285
+ excludeInSearchQuery?: boolean | undefined;
1221
1286
  } | {
1222
1287
  config: {
1223
- type: "exact" | "fuzzy" | "range";
1288
+ type: "exact" | "fuzzy" | "range" | "within";
1224
1289
  };
1225
- fieldId: "status" | "updatedAt" | "trackingId" | "legalStatus.REGISTERED.createdAt" | "legalStatus.REGISTERED.createdAtLocation";
1290
+ fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
1226
1291
  fieldType: "event";
1227
1292
  options?: {
1228
1293
  value: string;
@@ -1257,6 +1322,8 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
1257
1322
  }[] | undefined;
1258
1323
  })[];
1259
1324
  }>;
1260
- export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
1261
1325
  export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
1326
+ export type AdvancedSearchConfigWithFieldsResolved = Omit<AdvancedSearchConfig, 'fields'> & {
1327
+ fields: FieldConfig[];
1328
+ };
1262
1329
  //# sourceMappingURL=AdvancedSearchConfig.d.ts.map