@opencrvs/toolkit 1.8.0-rc.fd754eb → 1.8.0-rc.fd8a78f
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 +15318 -5028
- package/dist/commons/conditionals/conditionals.d.ts +8 -3
- package/dist/commons/conditionals/validate.d.ts +6 -0
- package/dist/commons/events/ActionConfig.d.ts +56387 -29043
- package/dist/commons/events/ActionDocument.d.ts +1900 -309
- package/dist/commons/events/ActionInput.d.ts +1455 -183
- package/dist/commons/events/ActionType.d.ts +4 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +675 -12
- package/dist/commons/events/CompositeFieldValue.d.ts +28 -0
- package/dist/commons/events/Constants.d.ts +3 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +2982 -0
- package/dist/commons/events/CreatedAtLocation.d.ts +3 -0
- package/dist/commons/events/Draft.d.ts +122 -21
- package/dist/commons/events/EventConfig.d.ts +27593 -14046
- package/dist/commons/events/EventDocument.d.ts +1228 -245
- package/dist/commons/events/EventIndex.d.ts +585 -353
- package/dist/commons/events/EventInput.d.ts +0 -13
- package/dist/commons/events/EventMetadata.d.ts +70 -76
- package/dist/commons/events/FieldConfig.d.ts +2500 -1111
- package/dist/commons/events/FieldType.d.ts +4 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +94 -52
- package/dist/commons/events/FieldValue.d.ts +43 -5
- package/dist/commons/events/FormConfig.d.ts +18485 -9821
- package/dist/commons/events/PageConfig.d.ts +3600 -1472
- package/dist/commons/events/SummaryConfig.d.ts +0 -5
- package/dist/commons/events/User.d.ts +31 -7
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +4205 -538
- package/dist/commons/events/defineConfig.d.ts +2639 -635
- package/dist/commons/events/event.d.ts +37 -10
- package/dist/commons/events/field.d.ts +26 -17
- package/dist/commons/events/index.d.ts +5 -0
- package/dist/commons/events/scopes.d.ts +20 -1
- package/dist/commons/events/serializer.d.ts +2 -0
- package/dist/commons/events/test.utils.d.ts +147 -41
- package/dist/commons/events/utils.d.ts +10110 -309
- package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
- package/dist/conditionals/index.js +45 -8
- package/dist/events/index.js +2708 -1100
- package/dist/scopes/index.d.ts +94 -6
- package/dist/scopes/index.js +42 -21
- package/package.json +1 -1
@@ -3,6 +3,7 @@ import { EventState } from '../events/ActionDocument';
|
|
3
3
|
import { ITokenPayload as TokenPayload, Scope } from '../authentication';
|
4
4
|
import { ActionType } from '../events/ActionType';
|
5
5
|
import { PartialSchema as AjvJSONSchemaType } from 'ajv/dist/types/json-schema';
|
6
|
+
import { userSerializer } from '../events/serializers/user/serializer';
|
6
7
|
/** @knipignore */
|
7
8
|
export type JSONSchema = {
|
8
9
|
readonly __nominal__type: 'JSONSchema';
|
@@ -58,7 +59,7 @@ export declare function never(): JSONSchema;
|
|
58
59
|
*
|
59
60
|
* Generate conditional rules for user.
|
60
61
|
*/
|
61
|
-
export declare const user: {
|
62
|
+
export declare const user: typeof userSerializer & {
|
62
63
|
hasScope: (scope: Scope) => JSONSchema;
|
63
64
|
};
|
64
65
|
/**
|
@@ -73,8 +74,7 @@ export declare function createEventConditionals(): {
|
|
73
74
|
hasAction: (action: ActionType) => JSONSchema;
|
74
75
|
};
|
75
76
|
type FieldReference = {
|
76
|
-
|
77
|
-
[key: string]: unknown;
|
77
|
+
$$field: string;
|
78
78
|
};
|
79
79
|
/**
|
80
80
|
* Generate conditional rules for a form field.
|
@@ -85,6 +85,10 @@ type FieldReference = {
|
|
85
85
|
*
|
86
86
|
*/
|
87
87
|
export declare function createFieldConditionals(fieldId: string): {
|
88
|
+
/**
|
89
|
+
* @private Internal property used for field reference tracking.
|
90
|
+
*/
|
91
|
+
$$field: string;
|
88
92
|
isAfter: () => {
|
89
93
|
days: (days: number) => {
|
90
94
|
inPast: () => JSONSchema;
|
@@ -124,6 +128,7 @@ export declare function createFieldConditionals(fieldId: string): {
|
|
124
128
|
getId: () => {
|
125
129
|
fieldId: string;
|
126
130
|
};
|
131
|
+
object: (options: Record<string, any>) => JSONSchema;
|
127
132
|
};
|
128
133
|
export {};
|
129
134
|
//# sourceMappingURL=conditionals.d.ts.map
|
@@ -36,6 +36,11 @@ export declare const errorMessages: {
|
|
36
36
|
description: string;
|
37
37
|
id: string;
|
38
38
|
};
|
39
|
+
unexpectedField: {
|
40
|
+
defaultMessage: string;
|
41
|
+
description: string;
|
42
|
+
id: string;
|
43
|
+
};
|
39
44
|
};
|
40
45
|
/**
|
41
46
|
* Custom error map for Zod to override the default error messages in intl-formik format.
|
@@ -66,4 +71,5 @@ export declare function runFieldValidations({ field, values }: {
|
|
66
71
|
message: TranslationConfig;
|
67
72
|
}[];
|
68
73
|
};
|
74
|
+
export declare function getValidatorsForField(fieldId: FieldConfig['id'], validations: NonNullable<FieldConfig['validation']>): NonNullable<FieldConfig['validation']>;
|
69
75
|
//# sourceMappingURL=validate.d.ts.map
|