@opencrvs/toolkit 1.8.0-rc.f8a9481 → 1.8.0-rc.f8b1f33
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/api/router.d.ts +4013 -322
- package/dist/commons/conditionals/validate.d.ts +6 -4
- package/dist/commons/events/ActionDocument.d.ts +6 -212
- package/dist/commons/events/ActionInput.d.ts +60 -68
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -3
- package/dist/commons/events/Draft.d.ts +4 -14
- package/dist/commons/events/EventConfig.d.ts +68 -153
- package/dist/commons/events/EventDocument.d.ts +4 -163
- package/dist/commons/events/EventIndex.d.ts +0 -6
- package/dist/commons/events/EventMetadata.d.ts +0 -6
- package/dist/commons/events/FieldConfig.d.ts +10 -51
- package/dist/commons/events/SummaryConfig.d.ts +7 -93
- package/dist/commons/events/User.d.ts +0 -5
- package/dist/commons/events/WorkqueueConfig.d.ts +20 -44
- package/dist/commons/events/defineConfig.d.ts +8 -13
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/utils.d.ts +3 -3
- package/dist/events/index.js +514 -652
- package/dist/scopes/index.d.ts +70 -1
- package/dist/scopes/index.js +130 -0
- package/package.json +1 -1
- package/dist/commons/events/scopes.d.ts +0 -25
@@ -3,10 +3,7 @@ import { EventState, ActionUpdate } from '../events/ActionDocument';
|
|
3
3
|
import { FieldConfig } from '../events/FieldConfig';
|
4
4
|
import { FieldUpdateValue } from '../events/FieldValue';
|
5
5
|
import { TranslationConfig } from '../events/TranslationConfig';
|
6
|
-
import { FieldConditional } from '../events/Conditional';
|
7
6
|
export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
|
8
|
-
export declare function isConditionMet(conditional: JSONSchema, values: Record<string, unknown>): boolean;
|
9
|
-
export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, unknown>): boolean;
|
10
7
|
export declare function isFieldVisible(field: FieldConfig, form: ActionUpdate | EventState): boolean;
|
11
8
|
export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState): boolean;
|
12
9
|
export declare function isFieldDisplayedOnReview(field: FieldConfig, form: ActionUpdate | EventState): boolean;
|
@@ -58,7 +55,12 @@ export declare function validateFieldInput({ field, value }: {
|
|
58
55
|
}): {
|
59
56
|
message: TranslationConfig;
|
60
57
|
}[];
|
61
|
-
|
58
|
+
/**
|
59
|
+
* Gets applicable validation errors based on its type and custom validators.
|
60
|
+
*
|
61
|
+
* @returns an array of error messages for the field
|
62
|
+
*/
|
63
|
+
export declare function getFieldValidationErrors({ field, values }: {
|
62
64
|
field: FieldConfig;
|
63
65
|
values: ActionUpdate;
|
64
66
|
}): {
|