@ecrvs/opencrvs-toolkit 1.8.1-rc.a7ee8fb
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/README.md +70 -0
- package/build.sh +56 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +52 -0
- package/dist/commons/api/router.d.ts +14568 -0
- package/dist/commons/conditionals/conditionals.d.ts +194 -0
- package/dist/commons/conditionals/index.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +129 -0
- package/dist/commons/events/ActionConfig.d.ts +2034 -0
- package/dist/commons/events/ActionDocument.d.ts +14400 -0
- package/dist/commons/events/ActionInput.d.ts +11157 -0
- package/dist/commons/events/ActionType.d.ts +52 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1175 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +181 -0
- package/dist/commons/events/Conditional.d.ts +55 -0
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4494 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
- package/dist/commons/events/DeduplicationConfig.d.ts +209 -0
- package/dist/commons/events/Draft.d.ts +814 -0
- package/dist/commons/events/EventConfig.d.ts +2237 -0
- package/dist/commons/events/EventConfigInput.d.ts +10 -0
- package/dist/commons/events/EventDocument.d.ts +8505 -0
- package/dist/commons/events/EventIndex.d.ts +3858 -0
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +408 -0
- package/dist/commons/events/FieldConfig.d.ts +7125 -0
- package/dist/commons/events/FieldType.d.ts +46 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +537 -0
- package/dist/commons/events/FieldValue.d.ts +250 -0
- package/dist/commons/events/FileUtils.d.ts +4 -0
- package/dist/commons/events/FormConfig.d.ts +725 -0
- package/dist/commons/events/PageConfig.d.ts +336 -0
- package/dist/commons/events/SummaryConfig.d.ts +170 -0
- package/dist/commons/events/TemplateConfig.d.ts +38 -0
- package/dist/commons/events/TranslationConfig.d.ts +15 -0
- package/dist/commons/events/User.d.ts +45 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +8997 -0
- package/dist/commons/events/deduplication.d.ts +32 -0
- package/dist/commons/events/defineConfig.d.ts +309 -0
- package/dist/commons/events/event.d.ts +109 -0
- package/dist/commons/events/field.d.ts +151 -0
- package/dist/commons/events/index.d.ts +46 -0
- package/dist/commons/events/locations.d.ts +24 -0
- package/dist/commons/events/scopes.d.ts +55 -0
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/state/availableActions.d.ts +6 -0
- package/dist/commons/events/state/flags.d.ts +4 -0
- package/dist/commons/events/state/index.d.ts +146 -0
- package/dist/commons/events/state/utils.d.ts +1263 -0
- package/dist/commons/events/test.utils.d.ts +473 -0
- package/dist/commons/events/transactions.d.ts +2 -0
- package/dist/commons/events/utils.d.ts +501 -0
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/commons/notification/UserNotifications.d.ts +632 -0
- package/dist/commons/notification/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts +2 -0
- package/dist/conditionals/index.d.ts.map +1 -0
- package/dist/conditionals/index.js +491 -0
- package/dist/events/deduplication.d.ts +32 -0
- package/dist/events/deduplication.d.ts.map +1 -0
- package/dist/events/deduplication.js +67 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +8383 -0
- package/dist/notification/index.d.ts +2 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +5928 -0
- package/dist/scopes/index.d.ts +335 -0
- package/dist/scopes/index.d.ts.map +1 -0
- package/dist/scopes/index.js +379 -0
- package/package.json +40 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TranslationConfig } from './TranslationConfig';
|
|
3
|
+
declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
4
|
+
/**
|
|
5
|
+
* Reference to the field used in matching.
|
|
6
|
+
*
|
|
7
|
+
* For `dateRange` type matcher the value of this field will also
|
|
8
|
+
* be used as the origin date to calculate the distance from.
|
|
9
|
+
*/
|
|
10
|
+
fieldId: z.ZodString;
|
|
11
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
12
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
boost?: number | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
boost?: number | undefined;
|
|
17
|
+
}>>>;
|
|
18
|
+
}, {
|
|
19
|
+
type: z.ZodLiteral<"fuzzy">;
|
|
20
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
21
|
+
/**
|
|
22
|
+
* Names of length 3 or less characters = 0 edits allowed
|
|
23
|
+
* Names of length 4 - 6 characters = 1 edit allowed
|
|
24
|
+
* Names of length >7 characters = 2 edits allowed
|
|
25
|
+
*/
|
|
26
|
+
fuzziness: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
27
|
+
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
boost: number;
|
|
30
|
+
fuzziness: string | number;
|
|
31
|
+
}, {
|
|
32
|
+
boost?: number | undefined;
|
|
33
|
+
fuzziness?: string | number | undefined;
|
|
34
|
+
}>>>;
|
|
35
|
+
}>, "strip", z.ZodTypeAny, {
|
|
36
|
+
type: "fuzzy";
|
|
37
|
+
options: {
|
|
38
|
+
boost: number;
|
|
39
|
+
fuzziness: string | number;
|
|
40
|
+
};
|
|
41
|
+
fieldId: string;
|
|
42
|
+
}, {
|
|
43
|
+
type: "fuzzy";
|
|
44
|
+
fieldId: string;
|
|
45
|
+
options?: {
|
|
46
|
+
boost?: number | undefined;
|
|
47
|
+
fuzziness?: string | number | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export type FuzzyMatcherOptions = z.input<typeof FuzzyMatcher>['options'];
|
|
51
|
+
declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
52
|
+
/**
|
|
53
|
+
* Reference to the field used in matching.
|
|
54
|
+
*
|
|
55
|
+
* For `dateRange` type matcher the value of this field will also
|
|
56
|
+
* be used as the origin date to calculate the distance from.
|
|
57
|
+
*/
|
|
58
|
+
fieldId: z.ZodString;
|
|
59
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
60
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
boost?: number | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
boost?: number | undefined;
|
|
65
|
+
}>>>;
|
|
66
|
+
}, {
|
|
67
|
+
type: z.ZodLiteral<"strict">;
|
|
68
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
69
|
+
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
70
|
+
/**
|
|
71
|
+
* The constant value to be present in the field for both records
|
|
72
|
+
*/
|
|
73
|
+
value: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
boost: number;
|
|
76
|
+
value?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
value?: string | undefined;
|
|
79
|
+
boost?: number | undefined;
|
|
80
|
+
}>>>;
|
|
81
|
+
}>, "strip", z.ZodTypeAny, {
|
|
82
|
+
type: "strict";
|
|
83
|
+
options: {
|
|
84
|
+
boost: number;
|
|
85
|
+
value?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
fieldId: string;
|
|
88
|
+
}, {
|
|
89
|
+
type: "strict";
|
|
90
|
+
fieldId: string;
|
|
91
|
+
options?: {
|
|
92
|
+
value?: string | undefined;
|
|
93
|
+
boost?: number | undefined;
|
|
94
|
+
} | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export type StrictMatcherOptions = z.input<typeof StrictMatcher>['options'];
|
|
97
|
+
declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
98
|
+
/**
|
|
99
|
+
* Reference to the field used in matching.
|
|
100
|
+
*
|
|
101
|
+
* For `dateRange` type matcher the value of this field will also
|
|
102
|
+
* be used as the origin date to calculate the distance from.
|
|
103
|
+
*/
|
|
104
|
+
fieldId: z.ZodString;
|
|
105
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
106
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
boost?: number | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
boost?: number | undefined;
|
|
111
|
+
}>>>;
|
|
112
|
+
}, {
|
|
113
|
+
type: z.ZodLiteral<"dateRange">;
|
|
114
|
+
options: z.ZodObject<{
|
|
115
|
+
/**
|
|
116
|
+
* The distance pivot in days. Distance from the origin (the value of
|
|
117
|
+
* fieldId) at which relevance scores receive half of the boost value
|
|
118
|
+
*/
|
|
119
|
+
pivot: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
days: z.ZodNumber;
|
|
121
|
+
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
boost: number;
|
|
124
|
+
days: number;
|
|
125
|
+
pivot?: number | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
days: number;
|
|
128
|
+
boost?: number | undefined;
|
|
129
|
+
pivot?: number | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
}>, "strip", z.ZodTypeAny, {
|
|
132
|
+
type: "dateRange";
|
|
133
|
+
options: {
|
|
134
|
+
boost: number;
|
|
135
|
+
days: number;
|
|
136
|
+
pivot?: number | undefined;
|
|
137
|
+
};
|
|
138
|
+
fieldId: string;
|
|
139
|
+
}, {
|
|
140
|
+
type: "dateRange";
|
|
141
|
+
options: {
|
|
142
|
+
days: number;
|
|
143
|
+
boost?: number | undefined;
|
|
144
|
+
pivot?: number | undefined;
|
|
145
|
+
};
|
|
146
|
+
fieldId: string;
|
|
147
|
+
}>;
|
|
148
|
+
export type DateRangeMatcherOptions = z.input<typeof DateRangeMatcher>['options'];
|
|
149
|
+
export type NotInput = {
|
|
150
|
+
type: 'not';
|
|
151
|
+
clause: ClauseInput;
|
|
152
|
+
};
|
|
153
|
+
export type NotOutput = {
|
|
154
|
+
type: 'not';
|
|
155
|
+
clause: ClauseOutput;
|
|
156
|
+
};
|
|
157
|
+
export type AndInput = {
|
|
158
|
+
type: 'and';
|
|
159
|
+
clauses: ClauseInput[];
|
|
160
|
+
};
|
|
161
|
+
export type AndOutput = {
|
|
162
|
+
type: 'and';
|
|
163
|
+
clauses: ClauseOutput[];
|
|
164
|
+
};
|
|
165
|
+
export type OrInput = {
|
|
166
|
+
type: 'or';
|
|
167
|
+
clauses: ClauseInput[];
|
|
168
|
+
};
|
|
169
|
+
export type OrOutput = {
|
|
170
|
+
type: 'or';
|
|
171
|
+
clauses: ClauseOutput[];
|
|
172
|
+
};
|
|
173
|
+
export type ClauseInput = NotInput | AndInput | OrInput | z.input<typeof FuzzyMatcher> | z.input<typeof StrictMatcher> | z.input<typeof DateRangeMatcher>;
|
|
174
|
+
export type ClauseOutput = NotOutput | AndOutput | OrOutput | z.output<typeof FuzzyMatcher> | z.output<typeof StrictMatcher> | z.output<typeof DateRangeMatcher>;
|
|
175
|
+
/**
|
|
176
|
+
* Defines a deduplication clause. Clauses are either matcher clauses or logical clauses. Logical clauses (and, or) are used to combine multiple clauses.
|
|
177
|
+
* Since the definiton is recursive, we use z.lazy to define the schema.
|
|
178
|
+
* Zod supports recursive schemas, but needs help with Input and Output types.
|
|
179
|
+
*
|
|
180
|
+
* Default assumption is that the ZodType is the input. Markers use default values, so we need to explicitly define output type, too.
|
|
181
|
+
*
|
|
182
|
+
*/
|
|
183
|
+
export declare const Clause: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
|
|
184
|
+
export type Clause = z.infer<typeof Clause>;
|
|
185
|
+
export declare const DeduplicationConfig: z.ZodObject<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
188
|
+
id: string;
|
|
189
|
+
description: string;
|
|
190
|
+
defaultMessage: string;
|
|
191
|
+
}>;
|
|
192
|
+
query: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
id: string;
|
|
195
|
+
label: TranslationConfig;
|
|
196
|
+
query: ClauseOutput;
|
|
197
|
+
}, {
|
|
198
|
+
id: string;
|
|
199
|
+
label: {
|
|
200
|
+
id: string;
|
|
201
|
+
description: string;
|
|
202
|
+
defaultMessage: string;
|
|
203
|
+
};
|
|
204
|
+
query: ClauseInput;
|
|
205
|
+
}>;
|
|
206
|
+
export type DeduplicationConfigInput = z.input<typeof DeduplicationConfig>;
|
|
207
|
+
export type DeduplicationConfig = z.infer<typeof DeduplicationConfig>;
|
|
208
|
+
export {};
|
|
209
|
+
//# sourceMappingURL=DeduplicationConfig.d.ts.map
|