@opencrvs/toolkit 1.8.1-rc.6c27961 → 1.8.1-rc.6eacccb

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.
@@ -1,6 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
3
  declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
4
+ /**
5
+ * The reference to the field to match against.
6
+ *
7
+ * For `dateDistance` type matcher the value of this field will
8
+ * be used as the origin date to calculate the distance from.
9
+ */
4
10
  fieldId: z.ZodString;
5
11
  options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6
12
  boost: z.ZodOptional<z.ZodNumber>;
@@ -42,6 +48,12 @@ declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
42
48
  } | undefined;
43
49
  }>;
44
50
  declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
51
+ /**
52
+ * The reference to the field to match against.
53
+ *
54
+ * For `dateDistance` type matcher the value of this field will
55
+ * be used as the origin date to calculate the distance from.
56
+ */
45
57
  fieldId: z.ZodString;
46
58
  options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
47
59
  boost: z.ZodOptional<z.ZodNumber>;
@@ -72,48 +84,13 @@ declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
72
84
  boost?: number | undefined;
73
85
  } | undefined;
74
86
  }>;
75
- declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
76
- fieldId: z.ZodString;
77
- options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
78
- boost: z.ZodOptional<z.ZodNumber>;
79
- }, "strip", z.ZodTypeAny, {
80
- boost?: number | undefined;
81
- }, {
82
- boost?: number | undefined;
83
- }>>>;
84
- }, {
85
- type: z.ZodLiteral<"dateRange">;
86
- options: z.ZodObject<{
87
- days: z.ZodNumber;
88
- origin: z.ZodString;
89
- boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
90
- }, "strip", z.ZodTypeAny, {
91
- boost: number;
92
- days: number;
93
- origin: string;
94
- }, {
95
- days: number;
96
- origin: string;
97
- boost?: number | undefined;
98
- }>;
99
- }>, "strip", z.ZodTypeAny, {
100
- type: "dateRange";
101
- options: {
102
- boost: number;
103
- days: number;
104
- origin: string;
105
- };
106
- fieldId: string;
107
- }, {
108
- type: "dateRange";
109
- options: {
110
- days: number;
111
- origin: string;
112
- boost?: number | undefined;
113
- };
114
- fieldId: string;
115
- }>;
116
87
  declare const DateDistanceMatcher: z.ZodObject<z.objectUtil.extendShape<{
88
+ /**
89
+ * The reference to the field to match against.
90
+ *
91
+ * For `dateDistance` type matcher the value of this field will
92
+ * be used as the origin date to calculate the distance from.
93
+ */
117
94
  fieldId: z.ZodString;
118
95
  options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
119
96
  boost: z.ZodOptional<z.ZodNumber>;
@@ -126,15 +103,12 @@ declare const DateDistanceMatcher: z.ZodObject<z.objectUtil.extendShape<{
126
103
  type: z.ZodLiteral<"dateDistance">;
127
104
  options: z.ZodObject<{
128
105
  days: z.ZodNumber;
129
- origin: z.ZodString;
130
106
  boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
131
107
  }, "strip", z.ZodTypeAny, {
132
108
  boost: number;
133
109
  days: number;
134
- origin: string;
135
110
  }, {
136
111
  days: number;
137
- origin: string;
138
112
  boost?: number | undefined;
139
113
  }>;
140
114
  }>, "strip", z.ZodTypeAny, {
@@ -142,14 +116,12 @@ declare const DateDistanceMatcher: z.ZodObject<z.objectUtil.extendShape<{
142
116
  options: {
143
117
  boost: number;
144
118
  days: number;
145
- origin: string;
146
119
  };
147
120
  fieldId: string;
148
121
  }, {
149
122
  type: "dateDistance";
150
123
  options: {
151
124
  days: number;
152
- origin: string;
153
125
  boost?: number | undefined;
154
126
  };
155
127
  fieldId: string;
@@ -170,8 +142,8 @@ export type OrOutput = {
170
142
  type: 'or';
171
143
  clauses: ClauseOutput[];
172
144
  };
173
- export type ClauseInput = AndInput | OrInput | z.input<typeof FuzzyMatcher> | z.input<typeof StrictMatcher> | z.input<typeof DateRangeMatcher> | z.input<typeof DateDistanceMatcher>;
174
- export type ClauseOutput = AndOutput | OrOutput | z.output<typeof FuzzyMatcher> | z.output<typeof StrictMatcher> | z.output<typeof DateRangeMatcher> | z.output<typeof DateDistanceMatcher>;
145
+ export type ClauseInput = AndInput | OrInput | z.input<typeof FuzzyMatcher> | z.input<typeof StrictMatcher> | z.input<typeof DateDistanceMatcher>;
146
+ export type ClauseOutput = AndOutput | OrOutput | z.output<typeof FuzzyMatcher> | z.output<typeof StrictMatcher> | z.output<typeof DateDistanceMatcher>;
175
147
  /**
176
148
  * Defines a deduplication clause. Clauses are either matcher clauses or logical clauses. Logical clauses (and, or) are used to combine multiple clauses.
177
149
  * Since the definiton is recursive, we use z.lazy to define the schema.
@@ -203,6 +175,7 @@ export declare const DeduplicationConfig: z.ZodObject<{
203
175
  };
204
176
  query: ClauseInput;
205
177
  }>;
178
+ export type DeduplicationConfigInput = z.input<typeof DeduplicationConfig>;
206
179
  export type DeduplicationConfig = z.infer<typeof DeduplicationConfig>;
207
180
  export {};
208
181
  //# sourceMappingURL=DeduplicationConfig.d.ts.map
@@ -136,16 +136,16 @@ export declare const Draft: z.ZodObject<{
136
136
  addressLine3?: string | null | undefined;
137
137
  postcodeOrZip?: string | null | undefined;
138
138
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
139
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
+ firstname: z.ZodString;
140
+ surname: z.ZodString;
141
141
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
142
  }, "strip", z.ZodTypeAny, {
143
- firstname?: string | null | undefined;
144
- surname?: string | null | undefined;
143
+ firstname: string;
144
+ surname: string;
145
145
  middlename?: string | null | undefined;
146
146
  }, {
147
- firstname?: string | null | undefined;
148
- surname?: string | null | undefined;
147
+ firstname: string;
148
+ surname: string;
149
149
  middlename?: string | null | undefined;
150
150
  }>, z.ZodNull]>, z.ZodUndefined]>]>>;
151
151
  annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -271,16 +271,16 @@ export declare const Draft: z.ZodObject<{
271
271
  addressLine3?: string | null | undefined;
272
272
  postcodeOrZip?: string | null | undefined;
273
273
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
274
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
+ firstname: z.ZodString;
275
+ surname: z.ZodString;
276
276
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
277
277
  }, "strip", z.ZodTypeAny, {
278
- firstname?: string | null | undefined;
279
- surname?: string | null | undefined;
278
+ firstname: string;
279
+ surname: string;
280
280
  middlename?: string | null | undefined;
281
281
  }, {
282
- firstname?: string | null | undefined;
283
- surname?: string | null | undefined;
282
+ firstname: string;
283
+ surname: string;
284
284
  middlename?: string | null | undefined;
285
285
  }>, z.ZodNull]>, z.ZodUndefined]>]>>>>;
286
286
  status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
@@ -311,8 +311,8 @@ export declare const Draft: z.ZodObject<{
311
311
  street?: string | null | undefined;
312
312
  zipCode?: string | null | undefined;
313
313
  } | {
314
- firstname?: string | null | undefined;
315
- surname?: string | null | undefined;
314
+ firstname: string;
315
+ surname: string;
316
316
  middlename?: string | null | undefined;
317
317
  } | {
318
318
  country: string;
@@ -358,8 +358,8 @@ export declare const Draft: z.ZodObject<{
358
358
  street?: string | null | undefined;
359
359
  zipCode?: string | null | undefined;
360
360
  } | {
361
- firstname?: string | null | undefined;
362
- surname?: string | null | undefined;
361
+ firstname: string;
362
+ surname: string;
363
363
  middlename?: string | null | undefined;
364
364
  } | {
365
365
  country: string;
@@ -412,8 +412,8 @@ export declare const Draft: z.ZodObject<{
412
412
  street?: string | null | undefined;
413
413
  zipCode?: string | null | undefined;
414
414
  } | {
415
- firstname?: string | null | undefined;
416
- surname?: string | null | undefined;
415
+ firstname: string;
416
+ surname: string;
417
417
  middlename?: string | null | undefined;
418
418
  } | {
419
419
  country: string;
@@ -459,8 +459,8 @@ export declare const Draft: z.ZodObject<{
459
459
  street?: string | null | undefined;
460
460
  zipCode?: string | null | undefined;
461
461
  } | {
462
- firstname?: string | null | undefined;
463
- surname?: string | null | undefined;
462
+ firstname: string;
463
+ surname: string;
464
464
  middlename?: string | null | undefined;
465
465
  } | {
466
466
  country: string;
@@ -519,8 +519,8 @@ export declare const Draft: z.ZodObject<{
519
519
  street?: string | null | undefined;
520
520
  zipCode?: string | null | undefined;
521
521
  } | {
522
- firstname?: string | null | undefined;
523
- surname?: string | null | undefined;
522
+ firstname: string;
523
+ surname: string;
524
524
  middlename?: string | null | undefined;
525
525
  } | {
526
526
  country: string;
@@ -566,8 +566,8 @@ export declare const Draft: z.ZodObject<{
566
566
  street?: string | null | undefined;
567
567
  zipCode?: string | null | undefined;
568
568
  } | {
569
- firstname?: string | null | undefined;
570
- surname?: string | null | undefined;
569
+ firstname: string;
570
+ surname: string;
571
571
  middlename?: string | null | undefined;
572
572
  } | {
573
573
  country: string;
@@ -626,8 +626,8 @@ export declare const Draft: z.ZodObject<{
626
626
  street?: string | null | undefined;
627
627
  zipCode?: string | null | undefined;
628
628
  } | {
629
- firstname?: string | null | undefined;
630
- surname?: string | null | undefined;
629
+ firstname: string;
630
+ surname: string;
631
631
  middlename?: string | null | undefined;
632
632
  } | {
633
633
  country: string;
@@ -673,8 +673,8 @@ export declare const Draft: z.ZodObject<{
673
673
  street?: string | null | undefined;
674
674
  zipCode?: string | null | undefined;
675
675
  } | {
676
- firstname?: string | null | undefined;
677
- surname?: string | null | undefined;
676
+ firstname: string;
677
+ surname: string;
678
678
  middlename?: string | null | undefined;
679
679
  } | {
680
680
  country: string;
@@ -831,16 +831,16 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
831
831
  addressLine3?: string | null | undefined;
832
832
  postcodeOrZip?: string | null | undefined;
833
833
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
834
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
835
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
834
+ firstname: z.ZodString;
835
+ surname: z.ZodString;
836
836
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
837
837
  }, "strip", z.ZodTypeAny, {
838
- firstname?: string | null | undefined;
839
- surname?: string | null | undefined;
838
+ firstname: string;
839
+ surname: string;
840
840
  middlename?: string | null | undefined;
841
841
  }, {
842
- firstname?: string | null | undefined;
843
- surname?: string | null | undefined;
842
+ firstname: string;
843
+ surname: string;
844
844
  middlename?: string | null | undefined;
845
845
  }>, z.ZodNull]>, z.ZodUndefined]>]>>>;
846
846
  annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -966,16 +966,16 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
966
966
  addressLine3?: string | null | undefined;
967
967
  postcodeOrZip?: string | null | undefined;
968
968
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
969
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
970
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
969
+ firstname: z.ZodString;
970
+ surname: z.ZodString;
971
971
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
972
972
  }, "strip", z.ZodTypeAny, {
973
- firstname?: string | null | undefined;
974
- surname?: string | null | undefined;
973
+ firstname: string;
974
+ surname: string;
975
975
  middlename?: string | null | undefined;
976
976
  }, {
977
- firstname?: string | null | undefined;
978
- surname?: string | null | undefined;
977
+ firstname: string;
978
+ surname: string;
979
979
  middlename?: string | null | undefined;
980
980
  }>, z.ZodNull]>, z.ZodUndefined]>]>>>;
981
981
  originalActionId: z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>;
@@ -1003,8 +1003,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
1003
1003
  street?: string | null | undefined;
1004
1004
  zipCode?: string | null | undefined;
1005
1005
  } | {
1006
- firstname?: string | null | undefined;
1007
- surname?: string | null | undefined;
1006
+ firstname: string;
1007
+ surname: string;
1008
1008
  middlename?: string | null | undefined;
1009
1009
  } | {
1010
1010
  country: string;
@@ -1049,8 +1049,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
1049
1049
  street?: string | null | undefined;
1050
1050
  zipCode?: string | null | undefined;
1051
1051
  } | {
1052
- firstname?: string | null | undefined;
1053
- surname?: string | null | undefined;
1052
+ firstname: string;
1053
+ surname: string;
1054
1054
  middlename?: string | null | undefined;
1055
1055
  } | {
1056
1056
  country: string;
@@ -1101,8 +1101,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
1101
1101
  street?: string | null | undefined;
1102
1102
  zipCode?: string | null | undefined;
1103
1103
  } | {
1104
- firstname?: string | null | undefined;
1105
- surname?: string | null | undefined;
1104
+ firstname: string;
1105
+ surname: string;
1106
1106
  middlename?: string | null | undefined;
1107
1107
  } | {
1108
1108
  country: string;
@@ -1146,8 +1146,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
1146
1146
  street?: string | null | undefined;
1147
1147
  zipCode?: string | null | undefined;
1148
1148
  } | {
1149
- firstname?: string | null | undefined;
1150
- surname?: string | null | undefined;
1149
+ firstname: string;
1150
+ surname: string;
1151
1151
  middlename?: string | null | undefined;
1152
1152
  } | {
1153
1153
  country: string;