@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.
Files changed (76) hide show
  1. package/README.md +70 -0
  2. package/build.sh +56 -0
  3. package/dist/api/index.d.ts +11 -0
  4. package/dist/api/index.d.ts.map +1 -0
  5. package/dist/api/index.js +52 -0
  6. package/dist/commons/api/router.d.ts +14568 -0
  7. package/dist/commons/conditionals/conditionals.d.ts +194 -0
  8. package/dist/commons/conditionals/index.d.ts +2 -0
  9. package/dist/commons/conditionals/validate.d.ts +129 -0
  10. package/dist/commons/events/ActionConfig.d.ts +2034 -0
  11. package/dist/commons/events/ActionDocument.d.ts +14400 -0
  12. package/dist/commons/events/ActionInput.d.ts +11157 -0
  13. package/dist/commons/events/ActionType.d.ts +52 -0
  14. package/dist/commons/events/AdvancedSearchConfig.d.ts +1175 -0
  15. package/dist/commons/events/CompositeFieldValue.d.ts +181 -0
  16. package/dist/commons/events/Conditional.d.ts +55 -0
  17. package/dist/commons/events/Constants.d.ts +3 -0
  18. package/dist/commons/events/CountryConfigQueryInput.d.ts +4494 -0
  19. package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
  20. package/dist/commons/events/DeduplicationConfig.d.ts +209 -0
  21. package/dist/commons/events/Draft.d.ts +814 -0
  22. package/dist/commons/events/EventConfig.d.ts +2237 -0
  23. package/dist/commons/events/EventConfigInput.d.ts +10 -0
  24. package/dist/commons/events/EventDocument.d.ts +8505 -0
  25. package/dist/commons/events/EventIndex.d.ts +3858 -0
  26. package/dist/commons/events/EventInput.d.ts +13 -0
  27. package/dist/commons/events/EventMetadata.d.ts +408 -0
  28. package/dist/commons/events/FieldConfig.d.ts +7125 -0
  29. package/dist/commons/events/FieldType.d.ts +46 -0
  30. package/dist/commons/events/FieldTypeMapping.d.ts +537 -0
  31. package/dist/commons/events/FieldValue.d.ts +250 -0
  32. package/dist/commons/events/FileUtils.d.ts +4 -0
  33. package/dist/commons/events/FormConfig.d.ts +725 -0
  34. package/dist/commons/events/PageConfig.d.ts +336 -0
  35. package/dist/commons/events/SummaryConfig.d.ts +170 -0
  36. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  37. package/dist/commons/events/TranslationConfig.d.ts +15 -0
  38. package/dist/commons/events/User.d.ts +45 -0
  39. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  40. package/dist/commons/events/WorkqueueConfig.d.ts +8997 -0
  41. package/dist/commons/events/deduplication.d.ts +32 -0
  42. package/dist/commons/events/defineConfig.d.ts +309 -0
  43. package/dist/commons/events/event.d.ts +109 -0
  44. package/dist/commons/events/field.d.ts +151 -0
  45. package/dist/commons/events/index.d.ts +46 -0
  46. package/dist/commons/events/locations.d.ts +24 -0
  47. package/dist/commons/events/scopes.d.ts +55 -0
  48. package/dist/commons/events/serializer.d.ts +2 -0
  49. package/dist/commons/events/state/availableActions.d.ts +6 -0
  50. package/dist/commons/events/state/flags.d.ts +4 -0
  51. package/dist/commons/events/state/index.d.ts +146 -0
  52. package/dist/commons/events/state/utils.d.ts +1263 -0
  53. package/dist/commons/events/test.utils.d.ts +473 -0
  54. package/dist/commons/events/transactions.d.ts +2 -0
  55. package/dist/commons/events/utils.d.ts +501 -0
  56. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  57. package/dist/commons/notification/UserNotifications.d.ts +632 -0
  58. package/dist/commons/notification/index.d.ts +2 -0
  59. package/dist/conditionals/index.d.ts +2 -0
  60. package/dist/conditionals/index.d.ts.map +1 -0
  61. package/dist/conditionals/index.js +491 -0
  62. package/dist/events/deduplication.d.ts +32 -0
  63. package/dist/events/deduplication.d.ts.map +1 -0
  64. package/dist/events/deduplication.js +67 -0
  65. package/dist/events/index.d.ts +2 -0
  66. package/dist/events/index.d.ts.map +1 -0
  67. package/dist/events/index.js +8383 -0
  68. package/dist/notification/index.d.ts +2 -0
  69. package/dist/notification/index.d.ts.map +1 -0
  70. package/dist/notification/index.js +5928 -0
  71. package/dist/scopes/index.d.ts +335 -0
  72. package/dist/scopes/index.d.ts.map +1 -0
  73. package/dist/scopes/index.js +379 -0
  74. package/package.json +40 -0
  75. package/tsconfig.json +27 -0
  76. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,2 @@
1
+ export declare const CreatedAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
2
+ //# sourceMappingURL=CreatedAtLocation.d.ts.map
@@ -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