@opencrvs/toolkit 2.1.0-rc.b5d11bf → 2.1.0-rc.b632d41
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/application-config/index.js +1 -2
- package/dist/commons/api/router.d.ts +1640 -1604
- package/dist/commons/application-config/index.d.ts +6 -6
- package/dist/commons/conditionals/conditionals.d.ts +323 -32
- package/dist/commons/events/ActionConfig.d.ts +105 -105
- package/dist/commons/events/ActionDocument.d.ts +119 -119
- package/dist/commons/events/ActionInput.d.ts +6 -0
- package/dist/commons/events/ActionType.d.ts +62 -62
- package/dist/commons/events/AdvancedSearchConfig.d.ts +507 -507
- package/dist/commons/events/AuditLog.d.ts +43 -43
- package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
- package/dist/commons/events/Conditional.d.ts +3 -3
- package/dist/commons/events/CountryConfigQueryInput.d.ts +590 -590
- package/dist/commons/events/Draft.d.ts +37 -37
- package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
- package/dist/commons/events/EventConfig.d.ts +5 -5
- package/dist/commons/events/EventDocument.d.ts +48 -48
- package/dist/commons/events/EventIndex.d.ts +62 -62
- package/dist/commons/events/EventMetadata.d.ts +40 -40
- package/dist/commons/events/FieldConfig.d.ts +337 -337
- package/dist/commons/events/FieldType.d.ts +51 -51
- package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/Flag.d.ts +15 -15
- package/dist/commons/events/TemplateConfig.d.ts +1 -1
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
- package/dist/commons/events/WorkqueueConfig.d.ts +820 -820
- package/dist/commons/events/deduplication.d.ts +1 -1
- package/dist/commons/events/event.d.ts +2 -2
- package/dist/commons/events/field.d.ts +198 -69
- package/dist/commons/events/locations.d.ts +4 -4
- package/dist/commons/events/mocks.test.utils.d.ts +2 -2
- package/dist/commons/events/scopes.d.ts +4 -4
- package/dist/commons/events/state/index.d.ts +17 -17
- package/dist/commons/events/state/utils.d.ts +7 -7
- package/dist/commons/events/test.utils.d.ts +38 -35
- package/dist/commons/events/utils.d.ts +114 -114
- package/dist/commons/notification/UserNotifications.d.ts +10 -10
- package/dist/environment/derived-variables.d.ts +119 -119
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/logger.d.ts +12 -3
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/manage-users.js +7 -17
- package/dist/environment/questions.d.ts +74 -75
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +14 -8
- package/dist/environment/swarm-to-k8s.js +7 -17
- package/dist/environment/update-workflows.js +7 -17
- package/dist/environment/users.js +7 -17
- package/dist/environment/utils.d.ts +1 -1
- package/dist/environment/utils.js +7 -17
- package/dist/events/deduplication.d.ts +1 -1
- package/dist/events/index.js +6 -3
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +7 -17
- package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
- package/dist/migrations/v2.0/remove-hearth-migrations.js +7 -17
- package/dist/notification/index.js +5 -3
- package/dist/scopes/index.d.ts +146 -146
- package/opencrvs-toolkit-2.1.0-rc.b632d41.tgz +0 -0
- package/package.json +4 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.b5d11bf.tgz +0 -0
|
@@ -59,8 +59,8 @@ export declare function field(fieldId: string): {
|
|
|
59
59
|
fieldId: string;
|
|
60
60
|
type: "dateRange";
|
|
61
61
|
options: {
|
|
62
|
-
pivot?: number | undefined;
|
|
63
62
|
days: number;
|
|
63
|
+
pivot?: number | undefined;
|
|
64
64
|
boost?: number | undefined;
|
|
65
65
|
matchAgainst?: string | undefined;
|
|
66
66
|
};
|
|
@@ -20,8 +20,6 @@ declare const event: typeof eventFn & {
|
|
|
20
20
|
* @param action - The action type to check for.
|
|
21
21
|
*/
|
|
22
22
|
hasAction: (action: ActionType) => {
|
|
23
|
-
$id: string;
|
|
24
|
-
__nominal__type: 'JSONSchema';
|
|
25
23
|
/**
|
|
26
24
|
* Creates a conditional that checks if the event contains a specific action type
|
|
27
25
|
* with a minimum count of occurrences.
|
|
@@ -73,6 +71,8 @@ declare const event: typeof eventFn & {
|
|
|
73
71
|
*/
|
|
74
72
|
maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
|
|
75
73
|
};
|
|
74
|
+
$id: string;
|
|
75
|
+
__nominal__type: "JSONSchema";
|
|
76
76
|
};
|
|
77
77
|
field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
|
|
78
78
|
};
|
|
@@ -38,19 +38,71 @@ export declare function field(fieldId: string, options?: {
|
|
|
38
38
|
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
39
39
|
allowedLocations?: JurisdictionReference;
|
|
40
40
|
}): {
|
|
41
|
+
range: () => {
|
|
42
|
+
options?: SelectOption[];
|
|
43
|
+
conditionals?: FieldConditional[];
|
|
44
|
+
validations?: ValidationConfig[];
|
|
45
|
+
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
46
|
+
allowedLocations?: JurisdictionReference;
|
|
47
|
+
fieldId: string;
|
|
48
|
+
fieldType: "field";
|
|
49
|
+
} & {
|
|
50
|
+
config: {
|
|
51
|
+
type: "range";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
exact: () => {
|
|
55
|
+
options?: SelectOption[];
|
|
56
|
+
conditionals?: FieldConditional[];
|
|
57
|
+
validations?: ValidationConfig[];
|
|
58
|
+
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
59
|
+
allowedLocations?: JurisdictionReference;
|
|
60
|
+
fieldId: string;
|
|
61
|
+
fieldType: "field";
|
|
62
|
+
} & {
|
|
63
|
+
config: {
|
|
64
|
+
type: "exact";
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
fuzzy: () => {
|
|
68
|
+
options?: SelectOption[];
|
|
69
|
+
conditionals?: FieldConditional[];
|
|
70
|
+
validations?: ValidationConfig[];
|
|
71
|
+
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
72
|
+
allowedLocations?: JurisdictionReference;
|
|
73
|
+
fieldId: string;
|
|
74
|
+
fieldType: "field";
|
|
75
|
+
} & {
|
|
76
|
+
config: {
|
|
77
|
+
type: "fuzzy";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
within: () => {
|
|
81
|
+
options?: SelectOption[];
|
|
82
|
+
conditionals?: FieldConditional[];
|
|
83
|
+
validations?: ValidationConfig[];
|
|
84
|
+
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
85
|
+
allowedLocations?: JurisdictionReference;
|
|
86
|
+
fieldId: string;
|
|
87
|
+
fieldType: "field";
|
|
88
|
+
} & {
|
|
89
|
+
config: {
|
|
90
|
+
type: "within";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
41
93
|
$$field: string;
|
|
42
94
|
$$subfield: string[];
|
|
43
95
|
get(fieldPath: string): {
|
|
44
|
-
$$field: string;
|
|
45
|
-
get(fieldPath: string): /*elided*/ any;
|
|
46
96
|
$$subfield: string[];
|
|
97
|
+
$$field: string;
|
|
98
|
+
get(fieldPath: string): any;
|
|
47
99
|
getByPath(fieldPath: string[]): {
|
|
48
|
-
$$field: string;
|
|
49
|
-
get(fieldPath: string): /*elided*/ any;
|
|
50
|
-
getByPath(fieldPath: string[]): /*elided*/ any;
|
|
51
100
|
$$subfield: string[];
|
|
52
|
-
|
|
53
|
-
|
|
101
|
+
$$field: string;
|
|
102
|
+
get(fieldPath: string): any;
|
|
103
|
+
getByPath(fieldPath: string[]): any;
|
|
104
|
+
asDob(): any;
|
|
105
|
+
asAge(): any;
|
|
54
106
|
isAfter(): {
|
|
55
107
|
days: (days: number) => {
|
|
56
108
|
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
@@ -88,8 +140,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
88
140
|
customClientValidator(validationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
89
141
|
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
90
142
|
};
|
|
91
|
-
asDob():
|
|
92
|
-
asAge():
|
|
143
|
+
asDob(): any;
|
|
144
|
+
asAge(): any;
|
|
93
145
|
isAfter(): {
|
|
94
146
|
days: (days: number) => {
|
|
95
147
|
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
@@ -128,12 +180,141 @@ export declare function field(fieldId: string, options?: {
|
|
|
128
180
|
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
129
181
|
};
|
|
130
182
|
getByPath(fieldPath: string[]): {
|
|
183
|
+
$$subfield: string[];
|
|
131
184
|
$$field: string;
|
|
132
|
-
get(fieldPath: string):
|
|
185
|
+
get(fieldPath: string): {
|
|
186
|
+
$$subfield: string[];
|
|
187
|
+
$$field: string;
|
|
188
|
+
get(fieldPath: string): any;
|
|
189
|
+
getByPath(fieldPath: string[]): any;
|
|
190
|
+
asDob(): any;
|
|
191
|
+
asAge(): any;
|
|
192
|
+
isAfter(): {
|
|
193
|
+
days: (days: number) => {
|
|
194
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
195
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
196
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
197
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
198
|
+
};
|
|
199
|
+
date: (date: string | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
200
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
201
|
+
};
|
|
202
|
+
isBefore(): {
|
|
203
|
+
days: (days: number) => {
|
|
204
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
205
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
206
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
207
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
208
|
+
};
|
|
209
|
+
date: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
210
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
211
|
+
};
|
|
212
|
+
isGreaterThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
213
|
+
isLessThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
214
|
+
isEqualTo(value: string | boolean | number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
215
|
+
isFalsy(): import("../conditionals/conditionals").JSONSchema;
|
|
216
|
+
isUndefined(): import("../conditionals/conditionals").JSONSchema;
|
|
217
|
+
inArray(values: string[]): import("../conditionals/conditionals").JSONSchema;
|
|
218
|
+
isValidEnglishName(): import("../conditionals/conditionals").JSONSchema;
|
|
219
|
+
isValidAdministrativeLeafLevel(): import("../conditionals/conditionals").JSONSchema;
|
|
220
|
+
matches(pattern: string): import("../conditionals/conditionals").JSONSchema;
|
|
221
|
+
isBetween(min: number, max: number): import("../conditionals/conditionals").JSONSchema;
|
|
222
|
+
getId: () => {
|
|
223
|
+
fieldId: string;
|
|
224
|
+
};
|
|
225
|
+
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
226
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
227
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
228
|
+
};
|
|
133
229
|
getByPath(fieldPath: string[]): any;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
230
|
+
asDob(): {
|
|
231
|
+
$$subfield: string[];
|
|
232
|
+
$$field: string;
|
|
233
|
+
get(fieldPath: string): any;
|
|
234
|
+
getByPath(fieldPath: string[]): any;
|
|
235
|
+
asDob(): any;
|
|
236
|
+
asAge(): any;
|
|
237
|
+
isAfter(): {
|
|
238
|
+
days: (days: number) => {
|
|
239
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
240
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
241
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
242
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
243
|
+
};
|
|
244
|
+
date: (date: string | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
245
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
246
|
+
};
|
|
247
|
+
isBefore(): {
|
|
248
|
+
days: (days: number) => {
|
|
249
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
250
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
251
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
252
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
253
|
+
};
|
|
254
|
+
date: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
255
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
256
|
+
};
|
|
257
|
+
isGreaterThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
258
|
+
isLessThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
259
|
+
isEqualTo(value: string | boolean | number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
260
|
+
isFalsy(): import("../conditionals/conditionals").JSONSchema;
|
|
261
|
+
isUndefined(): import("../conditionals/conditionals").JSONSchema;
|
|
262
|
+
inArray(values: string[]): import("../conditionals/conditionals").JSONSchema;
|
|
263
|
+
isValidEnglishName(): import("../conditionals/conditionals").JSONSchema;
|
|
264
|
+
isValidAdministrativeLeafLevel(): import("../conditionals/conditionals").JSONSchema;
|
|
265
|
+
matches(pattern: string): import("../conditionals/conditionals").JSONSchema;
|
|
266
|
+
isBetween(min: number, max: number): import("../conditionals/conditionals").JSONSchema;
|
|
267
|
+
getId: () => {
|
|
268
|
+
fieldId: string;
|
|
269
|
+
};
|
|
270
|
+
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
271
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
272
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
273
|
+
};
|
|
274
|
+
asAge(): {
|
|
275
|
+
$$subfield: string[];
|
|
276
|
+
$$field: string;
|
|
277
|
+
get(fieldPath: string): any;
|
|
278
|
+
getByPath(fieldPath: string[]): any;
|
|
279
|
+
asDob(): any;
|
|
280
|
+
asAge(): any;
|
|
281
|
+
isAfter(): {
|
|
282
|
+
days: (days: number) => {
|
|
283
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
284
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
285
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
286
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
287
|
+
};
|
|
288
|
+
date: (date: string | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
289
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
290
|
+
};
|
|
291
|
+
isBefore(): {
|
|
292
|
+
days: (days: number) => {
|
|
293
|
+
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
294
|
+
inFuture: () => import("../conditionals/conditionals").JSONSchema;
|
|
295
|
+
fromDate: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
296
|
+
fromNow: () => import("../conditionals/conditionals").JSONSchema;
|
|
297
|
+
};
|
|
298
|
+
date: (date: `${string}-${string}-${string}` | import("./FieldConfig").FieldReference) => import("../conditionals/conditionals").JSONSchema;
|
|
299
|
+
now: () => import("../conditionals/conditionals").JSONSchema;
|
|
300
|
+
};
|
|
301
|
+
isGreaterThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
302
|
+
isLessThan(value: number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
303
|
+
isEqualTo(value: string | boolean | number | import("./FieldConfig").FieldReference): import("../conditionals/conditionals").JSONSchema;
|
|
304
|
+
isFalsy(): import("../conditionals/conditionals").JSONSchema;
|
|
305
|
+
isUndefined(): import("../conditionals/conditionals").JSONSchema;
|
|
306
|
+
inArray(values: string[]): import("../conditionals/conditionals").JSONSchema;
|
|
307
|
+
isValidEnglishName(): import("../conditionals/conditionals").JSONSchema;
|
|
308
|
+
isValidAdministrativeLeafLevel(): import("../conditionals/conditionals").JSONSchema;
|
|
309
|
+
matches(pattern: string): import("../conditionals/conditionals").JSONSchema;
|
|
310
|
+
isBetween(min: number, max: number): import("../conditionals/conditionals").JSONSchema;
|
|
311
|
+
getId: () => {
|
|
312
|
+
fieldId: string;
|
|
313
|
+
};
|
|
314
|
+
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
315
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
316
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
317
|
+
};
|
|
137
318
|
isAfter(): {
|
|
138
319
|
days: (days: number) => {
|
|
139
320
|
inPast: () => import("../conditionals/conditionals").JSONSchema;
|
|
@@ -172,14 +353,14 @@ export declare function field(fieldId: string, options?: {
|
|
|
172
353
|
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
173
354
|
};
|
|
174
355
|
asDob(): {
|
|
356
|
+
$$subfield: string[];
|
|
175
357
|
$$field: string;
|
|
176
358
|
get(fieldPath: string): any;
|
|
177
|
-
$$subfield: string[];
|
|
178
359
|
getByPath(fieldPath: string[]): {
|
|
360
|
+
$$subfield: string[];
|
|
179
361
|
$$field: string;
|
|
180
362
|
get(fieldPath: string): any;
|
|
181
363
|
getByPath(fieldPath: string[]): any;
|
|
182
|
-
$$subfield: string[];
|
|
183
364
|
asDob(): any;
|
|
184
365
|
asAge(): any;
|
|
185
366
|
isAfter(): {
|
|
@@ -259,14 +440,14 @@ export declare function field(fieldId: string, options?: {
|
|
|
259
440
|
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
260
441
|
};
|
|
261
442
|
asAge(): {
|
|
443
|
+
$$subfield: string[];
|
|
262
444
|
$$field: string;
|
|
263
445
|
get(fieldPath: string): any;
|
|
264
|
-
$$subfield: string[];
|
|
265
446
|
getByPath(fieldPath: string[]): {
|
|
447
|
+
$$subfield: string[];
|
|
266
448
|
$$field: string;
|
|
267
449
|
get(fieldPath: string): any;
|
|
268
450
|
getByPath(fieldPath: string[]): any;
|
|
269
|
-
$$subfield: string[];
|
|
270
451
|
asDob(): any;
|
|
271
452
|
asAge(): any;
|
|
272
453
|
isAfter(): {
|
|
@@ -381,57 +562,5 @@ export declare function field(fieldId: string, options?: {
|
|
|
381
562
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
382
563
|
customClientValidator(validationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
383
564
|
customClientEvaluation(computationFn: (fieldValue: unknown, context: import(".").ClientFunctionContext) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
384
|
-
range: () => {
|
|
385
|
-
options?: SelectOption[];
|
|
386
|
-
conditionals?: FieldConditional[];
|
|
387
|
-
validations?: ValidationConfig[];
|
|
388
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
389
|
-
allowedLocations?: JurisdictionReference;
|
|
390
|
-
fieldId: string;
|
|
391
|
-
fieldType: 'field';
|
|
392
|
-
} & {
|
|
393
|
-
config: {
|
|
394
|
-
type: 'range';
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
exact: () => {
|
|
398
|
-
options?: SelectOption[];
|
|
399
|
-
conditionals?: FieldConditional[];
|
|
400
|
-
validations?: ValidationConfig[];
|
|
401
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
402
|
-
allowedLocations?: JurisdictionReference;
|
|
403
|
-
fieldId: string;
|
|
404
|
-
fieldType: 'field';
|
|
405
|
-
} & {
|
|
406
|
-
config: {
|
|
407
|
-
type: 'exact';
|
|
408
|
-
};
|
|
409
|
-
};
|
|
410
|
-
fuzzy: () => {
|
|
411
|
-
options?: SelectOption[];
|
|
412
|
-
conditionals?: FieldConditional[];
|
|
413
|
-
validations?: ValidationConfig[];
|
|
414
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
415
|
-
allowedLocations?: JurisdictionReference;
|
|
416
|
-
fieldId: string;
|
|
417
|
-
fieldType: 'field';
|
|
418
|
-
} & {
|
|
419
|
-
config: {
|
|
420
|
-
type: 'fuzzy';
|
|
421
|
-
};
|
|
422
|
-
};
|
|
423
|
-
within: () => {
|
|
424
|
-
options?: SelectOption[];
|
|
425
|
-
conditionals?: FieldConditional[];
|
|
426
|
-
validations?: ValidationConfig[];
|
|
427
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
|
428
|
-
allowedLocations?: JurisdictionReference;
|
|
429
|
-
fieldId: string;
|
|
430
|
-
fieldType: 'field';
|
|
431
|
-
} & {
|
|
432
|
-
config: {
|
|
433
|
-
type: 'within';
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
565
|
};
|
|
437
566
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -7,8 +7,8 @@ import { SystemContext, UserContext } from '../users/User';
|
|
|
7
7
|
/** @deprecated Moving on, location types are arbitrary and defined by the country config. */
|
|
8
8
|
export declare const LocationTypeV1: z.ZodEnum<{
|
|
9
9
|
ADMIN_STRUCTURE: "ADMIN_STRUCTURE";
|
|
10
|
-
CRVS_OFFICE: "CRVS_OFFICE";
|
|
11
10
|
HEALTH_FACILITY: "HEALTH_FACILITY";
|
|
11
|
+
CRVS_OFFICE: "CRVS_OFFICE";
|
|
12
12
|
}>;
|
|
13
13
|
export type LocationTypeV1 = z.infer<typeof LocationTypeV1>;
|
|
14
14
|
export declare const AdministrativeArea: z.ZodObject<{
|
|
@@ -75,11 +75,11 @@ export declare function canAccessOtherUserWithScopes({ scopes, userToAccess, use
|
|
|
75
75
|
*/
|
|
76
76
|
export declare function userCanAccessEventWithScopes(event: Partial<EventIndexWithAdministrativeHierarchy>, scopes: RecordScopeV2[], user: UserContext | SystemContext, customActionType?: string): boolean;
|
|
77
77
|
export declare function getAdministrativeAreaHierarchy(administrativeAreaId: string | undefined | null, administrativeAreas: Map<UUID, AdministrativeArea>): {
|
|
78
|
-
id: string & z.$brand<"UUID">;
|
|
78
|
+
id: string & z.core.$brand<"UUID">;
|
|
79
79
|
name: string;
|
|
80
|
-
|
|
81
|
-
parentId: (string & z.$brand<"UUID">) | null;
|
|
80
|
+
parentId: (string & z.core.$brand<"UUID">) | null;
|
|
82
81
|
validUntil: string | null;
|
|
82
|
+
externalId?: string | null | undefined;
|
|
83
83
|
}[];
|
|
84
84
|
/**
|
|
85
85
|
* Resolves a location or administrative area UUID into a root-first hierarchy of UUIDs.
|
|
@@ -4,16 +4,16 @@ export declare const V2_DEFAULT_MOCK_LOCATIONS: Location[];
|
|
|
4
4
|
export declare const V2_DEFAULT_MOCK_LOCATIONS_MAP: Map<string & import("zod").$brand<"UUID">, {
|
|
5
5
|
id: string & import("zod").$brand<"UUID">;
|
|
6
6
|
name: string;
|
|
7
|
-
externalId?: string | null | undefined;
|
|
8
7
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
9
8
|
validUntil: string | null;
|
|
10
9
|
locationType: string | null;
|
|
10
|
+
externalId?: string | null | undefined;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: Map<string & import("zod").$brand<"UUID">, {
|
|
13
13
|
id: string & import("zod").$brand<"UUID">;
|
|
14
14
|
name: string;
|
|
15
|
-
externalId?: string | null | undefined;
|
|
16
15
|
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
17
16
|
validUntil: string | null;
|
|
17
|
+
externalId?: string | null | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
//# sourceMappingURL=mocks.test.utils.d.ts.map
|
|
@@ -13,7 +13,7 @@ export declare const ACTION_SCOPE_MAP: {
|
|
|
13
13
|
DELETE: ("record.declare" | "record.notify")[];
|
|
14
14
|
REGISTER: "record.register"[];
|
|
15
15
|
PRINT_CERTIFICATE: "record.print-certified-copies"[];
|
|
16
|
-
REQUEST_CORRECTION: ("record.
|
|
16
|
+
REQUEST_CORRECTION: ("record.request-correction" | "record.correct")[];
|
|
17
17
|
REVIEW_CORRECTION_REQUEST: "record.correct"[];
|
|
18
18
|
REJECT_CORRECTION: "record.correct"[];
|
|
19
19
|
APPROVE_CORRECTION: "record.correct"[];
|
|
@@ -29,9 +29,9 @@ export declare const ACTION_SCOPE_MAP: {
|
|
|
29
29
|
};
|
|
30
30
|
export declare function hasAnyOfScopes(a: string[], b: string[]): boolean;
|
|
31
31
|
export declare const AssignmentStatus: {
|
|
32
|
-
readonly ASSIGNED_TO_SELF:
|
|
33
|
-
readonly ASSIGNED_TO_OTHERS:
|
|
34
|
-
readonly UNASSIGNED:
|
|
32
|
+
readonly ASSIGNED_TO_SELF: "ASSIGNED_TO_SELF";
|
|
33
|
+
readonly ASSIGNED_TO_OTHERS: "ASSIGNED_TO_OTHERS";
|
|
34
|
+
readonly UNASSIGNED: "UNASSIGNED";
|
|
35
35
|
};
|
|
36
36
|
export type AssignmentStatus = (typeof AssignmentStatus)[keyof typeof AssignmentStatus];
|
|
37
37
|
export declare function getAssignmentStatus(eventState: EventIndex | EventIndexWithAdministrativeHierarchy, userId: string): AssignmentStatus;
|
|
@@ -7,7 +7,7 @@ import { Draft } from '../Draft';
|
|
|
7
7
|
import { EventConfig } from '../EventConfig';
|
|
8
8
|
import { UUID } from '../../uuid';
|
|
9
9
|
import { DocumentPath } from '../../documents';
|
|
10
|
-
export declare function getStatusFromActions(actions: Array<Action>): "
|
|
10
|
+
export declare function getStatusFromActions(actions: Array<Action>): "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
11
11
|
export declare function getAssignedUserFromActions(actions: Array<ActionDocument>): string | null;
|
|
12
12
|
type NonNullableDeep<T> = T extends [unknown, ...unknown[]] ? {
|
|
13
13
|
[K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
|
|
@@ -63,45 +63,37 @@ export declare function applyDeclarationToEventIndex(eventIndex: EventIndex, dec
|
|
|
63
63
|
export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Draft, eventConfiguration: EventConfig): {
|
|
64
64
|
id: string & import("zod").$brand<"UUID">;
|
|
65
65
|
type: string;
|
|
66
|
-
status: "
|
|
66
|
+
status: "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
67
67
|
legalStatuses: {
|
|
68
68
|
NOTIFIED?: {
|
|
69
69
|
createdAt: string;
|
|
70
70
|
createdBy: string;
|
|
71
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
72
|
-
createdByUserType?: "system" | "user" | null | undefined;
|
|
73
71
|
acceptedAt: string;
|
|
72
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
73
|
+
createdByUserType?: "user" | "system" | null | undefined;
|
|
74
74
|
createdByRole?: string | undefined;
|
|
75
75
|
} | null | undefined;
|
|
76
76
|
DECLARED?: {
|
|
77
77
|
createdAt: string;
|
|
78
78
|
createdBy: string;
|
|
79
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
80
|
-
createdByUserType?: "system" | "user" | null | undefined;
|
|
81
79
|
acceptedAt: string;
|
|
80
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
81
|
+
createdByUserType?: "user" | "system" | null | undefined;
|
|
82
82
|
createdByRole?: string | undefined;
|
|
83
83
|
} | null | undefined;
|
|
84
84
|
REGISTERED?: {
|
|
85
85
|
createdAt: string;
|
|
86
86
|
createdBy: string;
|
|
87
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
88
|
-
createdByUserType?: "system" | "user" | null | undefined;
|
|
89
87
|
acceptedAt: string;
|
|
90
|
-
createdByRole?: string | undefined;
|
|
91
88
|
registrationNumber: string;
|
|
89
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
90
|
+
createdByUserType?: "user" | "system" | null | undefined;
|
|
91
|
+
createdByRole?: string | undefined;
|
|
92
92
|
} | null | undefined;
|
|
93
93
|
};
|
|
94
94
|
createdAt: string;
|
|
95
|
-
dateOfEvent?: string | null | undefined;
|
|
96
|
-
placeOfEvent?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
97
95
|
createdBy: string;
|
|
98
|
-
createdByUserType?: "system" | "user" | null | undefined;
|
|
99
|
-
updatedByUserRole?: string | null | undefined;
|
|
100
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
101
|
-
updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
102
96
|
updatedAt: string;
|
|
103
|
-
assignedTo?: string | null | undefined;
|
|
104
|
-
updatedBy?: string | null | undefined;
|
|
105
97
|
trackingId: string;
|
|
106
98
|
potentialDuplicates: {
|
|
107
99
|
id: string & import("zod").$brand<"UUID">;
|
|
@@ -109,6 +101,14 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
|
|
|
109
101
|
}[];
|
|
110
102
|
flags: string[];
|
|
111
103
|
declaration: Record<string, import("..").FieldValue>;
|
|
104
|
+
dateOfEvent?: string | null | undefined;
|
|
105
|
+
placeOfEvent?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
106
|
+
createdByUserType?: "user" | "system" | null | undefined;
|
|
107
|
+
updatedByUserRole?: string | null | undefined;
|
|
108
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
109
|
+
updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
110
|
+
assignedTo?: string | null | undefined;
|
|
111
|
+
updatedBy?: string | null | undefined;
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
114
|
* Annotation is always specific to the action. when action with annotation is triggered multiple times,
|
|
@@ -14,17 +14,17 @@ import { Action } from '../ActionDocument';
|
|
|
14
14
|
export declare function getActionUpdateMetadata(actions: Action[]): Pick<{
|
|
15
15
|
id: string & import("zod").$brand<"UUID">;
|
|
16
16
|
transactionId: string;
|
|
17
|
-
createdByUserType: "
|
|
17
|
+
createdByUserType: "user" | "system";
|
|
18
18
|
createdAt: string;
|
|
19
19
|
createdBy: string;
|
|
20
|
+
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
21
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
20
22
|
createdByRole?: string | undefined;
|
|
21
23
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
22
24
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
23
|
-
declaration: Record<string, import("..").FieldUpdateValue>;
|
|
24
25
|
annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
|
|
25
|
-
status: "Accepted" | "Rejected" | "Requested";
|
|
26
26
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
27
|
-
}, "
|
|
27
|
+
}, "createdByUserType" | "createdAt" | "createdBy" | "createdByRole" | "createdAtLocation">;
|
|
28
28
|
/**
|
|
29
29
|
* @returns the legal statuses of the event. Event is considered legal if it has been accepted.
|
|
30
30
|
* @see EventIndex for the description of the returned object.
|
|
@@ -33,7 +33,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
33
33
|
NOTIFIED: {
|
|
34
34
|
createdAt: string;
|
|
35
35
|
createdBy: string;
|
|
36
|
-
createdByUserType: "
|
|
36
|
+
createdByUserType: "user" | "system";
|
|
37
37
|
createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
38
38
|
acceptedAt: string;
|
|
39
39
|
createdByRole: string | undefined;
|
|
@@ -42,7 +42,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
42
42
|
DECLARED: {
|
|
43
43
|
createdAt: string;
|
|
44
44
|
createdBy: string;
|
|
45
|
-
createdByUserType: "
|
|
45
|
+
createdByUserType: "user" | "system";
|
|
46
46
|
createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
47
47
|
acceptedAt: string;
|
|
48
48
|
createdByRole: string | undefined;
|
|
@@ -51,7 +51,7 @@ export declare function getLegalStatuses(actions: Action[]): {
|
|
|
51
51
|
REGISTERED: {
|
|
52
52
|
createdAt: string;
|
|
53
53
|
createdBy: string;
|
|
54
|
-
createdByUserType: "
|
|
54
|
+
createdByUserType: "user" | "system";
|
|
55
55
|
createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
56
56
|
acceptedAt: string;
|
|
57
57
|
createdByRole: string | undefined;
|