@opencrvs/toolkit 1.9.13-rc.581231b → 1.9.13-rc.59bb028
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/conditionals/conditionals.d.ts +292 -1
- package/dist/commons/conditionals/validate.d.ts +8 -1
- package/dist/commons/events/FieldConfig.d.ts +3387 -289
- package/dist/commons/events/field.d.ts +22 -0
- package/dist/commons/events/utils.d.ts +170 -1
- package/dist/conditionals/index.js +2028 -1
- package/dist/events/index.js +105 -18
- package/dist/notification/index.js +82 -7
- package/package.json +1 -1
|
@@ -107,6 +107,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
107
107
|
fieldId: string;
|
|
108
108
|
};
|
|
109
109
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
110
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
111
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
110
112
|
};
|
|
111
113
|
asDob(): any;
|
|
112
114
|
asAge(): any;
|
|
@@ -144,6 +146,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
144
146
|
fieldId: string;
|
|
145
147
|
};
|
|
146
148
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
149
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
150
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
147
151
|
};
|
|
148
152
|
getByPath(fieldPath: string[]): {
|
|
149
153
|
$$subfield: string[];
|
|
@@ -189,6 +193,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
189
193
|
fieldId: string;
|
|
190
194
|
};
|
|
191
195
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
196
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
197
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
192
198
|
};
|
|
193
199
|
getByPath(fieldPath: string[]): any;
|
|
194
200
|
asDob(): {
|
|
@@ -232,6 +238,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
232
238
|
fieldId: string;
|
|
233
239
|
};
|
|
234
240
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
241
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
242
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
235
243
|
};
|
|
236
244
|
asAge(): {
|
|
237
245
|
$$subfield: string[];
|
|
@@ -274,6 +282,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
274
282
|
fieldId: string;
|
|
275
283
|
};
|
|
276
284
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
285
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
286
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
277
287
|
};
|
|
278
288
|
isAfter(): {
|
|
279
289
|
days: (days: number) => {
|
|
@@ -309,6 +319,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
309
319
|
fieldId: string;
|
|
310
320
|
};
|
|
311
321
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
322
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
323
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
312
324
|
};
|
|
313
325
|
asDob(): {
|
|
314
326
|
$$subfield: string[];
|
|
@@ -355,6 +367,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
355
367
|
fieldId: string;
|
|
356
368
|
};
|
|
357
369
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
370
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
371
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
358
372
|
};
|
|
359
373
|
asDob(): any;
|
|
360
374
|
asAge(): any;
|
|
@@ -392,6 +406,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
392
406
|
fieldId: string;
|
|
393
407
|
};
|
|
394
408
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
409
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
410
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
395
411
|
};
|
|
396
412
|
asAge(): {
|
|
397
413
|
$$subfield: string[];
|
|
@@ -438,6 +454,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
438
454
|
fieldId: string;
|
|
439
455
|
};
|
|
440
456
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
457
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
458
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
441
459
|
};
|
|
442
460
|
asDob(): any;
|
|
443
461
|
asAge(): any;
|
|
@@ -475,6 +493,8 @@ export declare function field(fieldId: string, options?: {
|
|
|
475
493
|
fieldId: string;
|
|
476
494
|
};
|
|
477
495
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
496
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
497
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
478
498
|
};
|
|
479
499
|
isAfter(): {
|
|
480
500
|
days: (days: number) => {
|
|
@@ -510,5 +530,7 @@ export declare function field(fieldId: string, options?: {
|
|
|
510
530
|
fieldId: string;
|
|
511
531
|
};
|
|
512
532
|
object: (options: Record<string, any>) => import("../conditionals/conditionals").JSONSchema;
|
|
533
|
+
customClientValidator(validationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => boolean): import("../conditionals/conditionals").JSONSchema;
|
|
534
|
+
customClientEvaluation(computationFn: (fieldValue: unknown, context: import("../conditionals/conditionals").FormConditionalParameters) => unknown): import("./FieldConfig").CodeToEvaluate;
|
|
513
535
|
};
|
|
514
536
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -94,7 +94,176 @@ export declare function findActiveDraftForEvent(event: EventDocument, draft: Dra
|
|
|
94
94
|
export declare function createEmptyDraft(eventId: UUID, draftId: UUID, actionType: Exclude<ActionType, 'DELETE'>): Draft;
|
|
95
95
|
export declare function isVerificationPage(page: PageConfig): page is VerificationPageConfig;
|
|
96
96
|
export declare function getVisibleVerificationPageIds(pages: PageConfig[], annotation: ActionUpdate, context: ValidatorContext): string[];
|
|
97
|
-
export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, declaration: EventState, annotation: ActionUpdate, context: ValidatorContext): Partial<
|
|
97
|
+
export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, declaration: EventState, annotation: ActionUpdate, context: ValidatorContext): Partial<{
|
|
98
|
+
[x: string]: string | number | boolean | {
|
|
99
|
+
type: string;
|
|
100
|
+
path: string;
|
|
101
|
+
originalFilename: string;
|
|
102
|
+
} | {
|
|
103
|
+
firstname: string;
|
|
104
|
+
surname: string;
|
|
105
|
+
middlename?: string | undefined;
|
|
106
|
+
} | {
|
|
107
|
+
firstname?: string | null | undefined;
|
|
108
|
+
surname?: string | null | undefined;
|
|
109
|
+
middlename?: string | null | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
country: string;
|
|
112
|
+
addressType: "DOMESTIC";
|
|
113
|
+
administrativeArea: string;
|
|
114
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
115
|
+
} | {
|
|
116
|
+
country: string;
|
|
117
|
+
addressType: "INTERNATIONAL";
|
|
118
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
119
|
+
} | {
|
|
120
|
+
addressType: "DOMESTIC";
|
|
121
|
+
country?: string | null | undefined;
|
|
122
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
123
|
+
administrativeArea?: string | null | undefined;
|
|
124
|
+
} | {
|
|
125
|
+
addressType: "INTERNATIONAL";
|
|
126
|
+
country?: string | null | undefined;
|
|
127
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
type: string;
|
|
130
|
+
option: string;
|
|
131
|
+
path: string;
|
|
132
|
+
originalFilename: string;
|
|
133
|
+
}[] | {
|
|
134
|
+
loading: boolean;
|
|
135
|
+
data?: any;
|
|
136
|
+
error?: {
|
|
137
|
+
message: string;
|
|
138
|
+
statusCode: number;
|
|
139
|
+
} | null | undefined;
|
|
140
|
+
} | {
|
|
141
|
+
data?: any;
|
|
142
|
+
error?: {
|
|
143
|
+
message: string;
|
|
144
|
+
statusCode: number;
|
|
145
|
+
} | null | undefined;
|
|
146
|
+
loading?: boolean | null | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
data: Record<string, string>;
|
|
149
|
+
} | {
|
|
150
|
+
data: Record<string, string>;
|
|
151
|
+
} | {
|
|
152
|
+
data?: any;
|
|
153
|
+
} | {
|
|
154
|
+
numericValue: number;
|
|
155
|
+
unit: string;
|
|
156
|
+
} | {
|
|
157
|
+
numericValue?: number | undefined;
|
|
158
|
+
unit?: string | undefined;
|
|
159
|
+
} | (string & import("zod").BRAND<"PlainDate">) | {
|
|
160
|
+
age: number;
|
|
161
|
+
asOfDateRef: string;
|
|
162
|
+
} | {
|
|
163
|
+
start: string & import("zod").BRAND<"PlainDate">;
|
|
164
|
+
end: string & import("zod").BRAND<"PlainDate">;
|
|
165
|
+
} | Record<string, string | number | boolean | {
|
|
166
|
+
type: string;
|
|
167
|
+
path: string;
|
|
168
|
+
originalFilename: string;
|
|
169
|
+
} | {
|
|
170
|
+
firstname: string;
|
|
171
|
+
surname: string;
|
|
172
|
+
middlename?: string | undefined;
|
|
173
|
+
} | {
|
|
174
|
+
firstname?: string | null | undefined;
|
|
175
|
+
surname?: string | null | undefined;
|
|
176
|
+
middlename?: string | null | undefined;
|
|
177
|
+
} | {
|
|
178
|
+
country: string;
|
|
179
|
+
addressType: "DOMESTIC";
|
|
180
|
+
administrativeArea: string;
|
|
181
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
182
|
+
} | {
|
|
183
|
+
country: string;
|
|
184
|
+
addressType: "INTERNATIONAL";
|
|
185
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
186
|
+
} | {
|
|
187
|
+
type: string;
|
|
188
|
+
option: string;
|
|
189
|
+
path: string;
|
|
190
|
+
originalFilename: string;
|
|
191
|
+
}[] | {
|
|
192
|
+
loading: boolean;
|
|
193
|
+
data?: any;
|
|
194
|
+
error?: {
|
|
195
|
+
message: string;
|
|
196
|
+
statusCode: number;
|
|
197
|
+
} | null | undefined;
|
|
198
|
+
} | {
|
|
199
|
+
data: Record<string, string>;
|
|
200
|
+
} | {
|
|
201
|
+
data?: any;
|
|
202
|
+
} | {
|
|
203
|
+
numericValue: number;
|
|
204
|
+
unit: string;
|
|
205
|
+
} | {
|
|
206
|
+
numericValue?: number | undefined;
|
|
207
|
+
unit?: string | undefined;
|
|
208
|
+
} | (string & import("zod").BRAND<"PlainDate">) | {
|
|
209
|
+
age: number;
|
|
210
|
+
asOfDateRef: string;
|
|
211
|
+
} | {
|
|
212
|
+
start: string & import("zod").BRAND<"PlainDate">;
|
|
213
|
+
end: string & import("zod").BRAND<"PlainDate">;
|
|
214
|
+
} | null | undefined> | {
|
|
215
|
+
data: Record<string, string | number | boolean | {
|
|
216
|
+
type: string;
|
|
217
|
+
path: string;
|
|
218
|
+
originalFilename: string;
|
|
219
|
+
} | {
|
|
220
|
+
firstname: string;
|
|
221
|
+
surname: string;
|
|
222
|
+
middlename?: string | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
firstname?: string | null | undefined;
|
|
225
|
+
surname?: string | null | undefined;
|
|
226
|
+
middlename?: string | null | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
country: string;
|
|
229
|
+
addressType: "DOMESTIC";
|
|
230
|
+
administrativeArea: string;
|
|
231
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
232
|
+
} | {
|
|
233
|
+
country: string;
|
|
234
|
+
addressType: "INTERNATIONAL";
|
|
235
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
236
|
+
} | {
|
|
237
|
+
type: string;
|
|
238
|
+
option: string;
|
|
239
|
+
path: string;
|
|
240
|
+
originalFilename: string;
|
|
241
|
+
}[] | {
|
|
242
|
+
loading: boolean;
|
|
243
|
+
data?: any;
|
|
244
|
+
error?: {
|
|
245
|
+
message: string;
|
|
246
|
+
statusCode: number;
|
|
247
|
+
} | null | undefined;
|
|
248
|
+
} | {
|
|
249
|
+
data: Record<string, string>;
|
|
250
|
+
} | {
|
|
251
|
+
data?: any;
|
|
252
|
+
} | {
|
|
253
|
+
numericValue: number;
|
|
254
|
+
unit: string;
|
|
255
|
+
} | {
|
|
256
|
+
numericValue?: number | undefined;
|
|
257
|
+
unit?: string | undefined;
|
|
258
|
+
} | (string & import("zod").BRAND<"PlainDate">) | {
|
|
259
|
+
age: number;
|
|
260
|
+
asOfDateRef: string;
|
|
261
|
+
} | {
|
|
262
|
+
start: string & import("zod").BRAND<"PlainDate">;
|
|
263
|
+
end: string & import("zod").BRAND<"PlainDate">;
|
|
264
|
+
} | null | undefined>;
|
|
265
|
+
} | null | undefined;
|
|
266
|
+
}>;
|
|
98
267
|
/**
|
|
99
268
|
* Merges two documents together.
|
|
100
269
|
*
|