@opencrvs/toolkit 1.8.1-rc.6e305c5 → 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.
- package/dist/commons/events/ActionConfig.d.ts +560 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +21 -48
- package/dist/commons/events/EventConfig.d.ts +336 -49
- package/dist/commons/events/defineConfig.d.ts +60 -5
- package/dist/commons/events/utils.d.ts +60 -5
- package/dist/events/index.js +161 -173
- package/package.json +1 -1
@@ -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
|
174
|
-
export type ClauseOutput = AndOutput | OrOutput | z.output<typeof FuzzyMatcher> | z.output<typeof StrictMatcher> | z.output<typeof
|
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
|