@opencrvs/toolkit 1.8.0-rc.f9d33b7 → 1.8.0-rc.f9fb039
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 +920 -287
- package/dist/commons/events/ActionConfig.d.ts +12137 -1475
- package/dist/commons/events/ActionDocument.d.ts +433 -413
- package/dist/commons/events/ActionInput.d.ts +180 -180
- package/dist/commons/events/AdvancedSearchConfig.d.ts +212 -48
- package/dist/commons/events/Draft.d.ts +24 -26
- package/dist/commons/events/EventConfig.d.ts +6173 -1007
- package/dist/commons/events/EventDocument.d.ts +247 -312
- package/dist/commons/events/EventIndex.d.ts +710 -45
- package/dist/commons/events/EventMetadata.d.ts +263 -11
- package/dist/commons/events/FieldConfig.d.ts +850 -69
- package/dist/commons/events/FieldType.d.ts +3 -2
- package/dist/commons/events/FieldTypeMapping.d.ts +11 -4
- package/dist/commons/events/FieldValue.d.ts +6 -3
- package/dist/commons/events/FormConfig.d.ts +5749 -925
- package/dist/commons/events/PageConfig.d.ts +1191 -3
- package/dist/commons/events/WorkqueueConfig.d.ts +1362 -8
- package/dist/commons/events/defineConfig.d.ts +533 -3
- package/dist/commons/events/event.d.ts +37 -8
- package/dist/commons/events/field.d.ts +19 -10
- package/dist/commons/events/test.utils.d.ts +7 -7
- package/dist/commons/events/utils.d.ts +308 -21
- package/dist/events/index.js +1016 -724
- package/package.json +1 -1
@@ -1,4 +1,5 @@
|
|
1
1
|
import { EventFieldId } from './AdvancedSearchConfig';
|
2
|
+
import { EventMetadataKeys, EventMetadataParameter } from './EventMetadata';
|
2
3
|
import { SelectOption } from './FieldConfig';
|
3
4
|
/**
|
4
5
|
* Creates a function that acts like a callable + static method container.
|
@@ -8,17 +9,45 @@ import { SelectOption } from './FieldConfig';
|
|
8
9
|
* event.hasAction('CLICKED') // → returns conditional
|
9
10
|
*/
|
10
11
|
declare function eventFn(fieldId: EventFieldId, options?: SelectOption[]): {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
range: () => {
|
13
|
+
fieldId: "status" | "updatedAt" | "registeredAt" | "registeredAtLocation" | "trackingId";
|
14
|
+
options: {
|
15
|
+
value: string;
|
16
|
+
label: import("./TranslationConfig").TranslationConfig;
|
17
|
+
}[] | undefined;
|
18
|
+
fieldType: "event";
|
19
|
+
} & {
|
20
|
+
config: {
|
21
|
+
type: "range";
|
22
|
+
};
|
23
|
+
};
|
24
|
+
exact: () => {
|
25
|
+
fieldId: "status" | "updatedAt" | "registeredAt" | "registeredAtLocation" | "trackingId";
|
26
|
+
options: {
|
27
|
+
value: string;
|
28
|
+
label: import("./TranslationConfig").TranslationConfig;
|
29
|
+
}[] | undefined;
|
30
|
+
fieldType: "event";
|
31
|
+
} & {
|
32
|
+
config: {
|
33
|
+
type: "exact";
|
34
|
+
};
|
35
|
+
};
|
36
|
+
fuzzy: () => {
|
37
|
+
fieldId: "status" | "updatedAt" | "registeredAt" | "registeredAtLocation" | "trackingId";
|
38
|
+
options: {
|
39
|
+
value: string;
|
40
|
+
label: import("./TranslationConfig").TranslationConfig;
|
41
|
+
}[] | undefined;
|
42
|
+
fieldType: "event";
|
43
|
+
} & {
|
44
|
+
config: {
|
45
|
+
type: "fuzzy";
|
46
|
+
};
|
18
47
|
};
|
19
|
-
fieldType: "event";
|
20
48
|
};
|
21
49
|
declare const event: typeof eventFn & {
|
50
|
+
field(field: EventMetadataKeys): EventMetadataParameter;
|
22
51
|
hasAction: (action: import("./ActionType").ActionType) => import("../conditionals/conditionals").JSONSchema;
|
23
52
|
};
|
24
53
|
export { event };
|
@@ -1,29 +1,38 @@
|
|
1
|
+
import { FieldConditional } from './Conditional';
|
1
2
|
/**
|
2
3
|
* Entry point for defining conditional logic or configuration for a form field.
|
3
4
|
* @param fieldId - The ID of the field to define rules or config for.
|
4
5
|
* @returns An object combining conditional methods and configuration builders.
|
5
6
|
*/
|
6
|
-
export declare function field(fieldId: string
|
7
|
+
export declare function field(fieldId: string, options?: {
|
8
|
+
conditionals?: FieldConditional[];
|
9
|
+
}): {
|
7
10
|
range: () => {
|
8
|
-
|
9
|
-
type: "RANGE";
|
10
|
-
};
|
11
|
+
conditionals?: FieldConditional[];
|
11
12
|
fieldId: string;
|
12
13
|
fieldType: "field";
|
13
|
-
}
|
14
|
-
exact: () => {
|
14
|
+
} & {
|
15
15
|
config: {
|
16
|
-
type: "
|
16
|
+
type: "range";
|
17
17
|
};
|
18
|
+
};
|
19
|
+
exact: () => {
|
20
|
+
conditionals?: FieldConditional[];
|
18
21
|
fieldId: string;
|
19
22
|
fieldType: "field";
|
20
|
-
}
|
21
|
-
fuzzy: () => {
|
23
|
+
} & {
|
22
24
|
config: {
|
23
|
-
type: "
|
25
|
+
type: "exact";
|
24
26
|
};
|
27
|
+
};
|
28
|
+
fuzzy: () => {
|
29
|
+
conditionals?: FieldConditional[];
|
25
30
|
fieldId: string;
|
26
31
|
fieldType: "field";
|
32
|
+
} & {
|
33
|
+
config: {
|
34
|
+
type: "fuzzy";
|
35
|
+
};
|
27
36
|
};
|
28
37
|
isAfter: () => {
|
29
38
|
days: (days: number) => {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
1
|
+
import { ActionDocument, ActionUpdate, EventState } from './ActionDocument';
|
2
2
|
import { ArchiveActionInput, AssignActionInput, DeclareActionInput, RegisterActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput, ValidateActionInput } from './ActionInput';
|
3
3
|
import { ActionType } from './ActionType';
|
4
4
|
import { Draft } from './Draft';
|
@@ -8,7 +8,7 @@ import { EventIndex } from './EventIndex';
|
|
8
8
|
import { EventInput } from './EventInput';
|
9
9
|
import { FieldValue } from './FieldValue';
|
10
10
|
import { TranslationConfig } from './TranslationConfig';
|
11
|
-
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType):
|
11
|
+
export declare function generateActionDeclarationInput(configuration: EventConfig, action: ActionType): EventState;
|
12
12
|
export declare function generateActionAnnotationInput(configuration: EventConfig, action: ActionType): {};
|
13
13
|
export declare const eventPayloadGenerator: {
|
14
14
|
create: (input?: Partial<EventInput>) => {
|
@@ -65,7 +65,7 @@ export declare const eventPayloadGenerator: {
|
|
65
65
|
option: string;
|
66
66
|
filename: string;
|
67
67
|
originalFilename: string;
|
68
|
-
}[] | undefined>;
|
68
|
+
}[] | [string, string] | undefined>;
|
69
69
|
annotation: {};
|
70
70
|
eventId: string;
|
71
71
|
};
|
@@ -115,7 +115,7 @@ export declare const eventPayloadGenerator: {
|
|
115
115
|
option: string;
|
116
116
|
filename: string;
|
117
117
|
originalFilename: string;
|
118
|
-
}[] | undefined>>;
|
118
|
+
}[] | [string, string] | undefined>>;
|
119
119
|
eventId: string;
|
120
120
|
};
|
121
121
|
validate: (eventId: string, input?: Partial<Pick<ValidateActionInput, "transactionId" | "declaration" | "annotation">>) => {
|
@@ -158,7 +158,7 @@ export declare const eventPayloadGenerator: {
|
|
158
158
|
option: string;
|
159
159
|
filename: string;
|
160
160
|
originalFilename: string;
|
161
|
-
}[] | undefined>;
|
161
|
+
}[] | [string, string] | undefined>;
|
162
162
|
annotation: {};
|
163
163
|
duplicates: never[];
|
164
164
|
eventId: string;
|
@@ -235,7 +235,7 @@ export declare const eventPayloadGenerator: {
|
|
235
235
|
option: string;
|
236
236
|
filename: string;
|
237
237
|
originalFilename: string;
|
238
|
-
}[] | undefined>;
|
238
|
+
}[] | [string, string] | undefined>;
|
239
239
|
annotation: {};
|
240
240
|
eventId: string;
|
241
241
|
};
|
@@ -287,7 +287,7 @@ export declare const eventPayloadGenerator: {
|
|
287
287
|
option: string;
|
288
288
|
filename: string;
|
289
289
|
originalFilename: string;
|
290
|
-
}[] | undefined>;
|
290
|
+
}[] | [string, string] | undefined>;
|
291
291
|
annotation: {};
|
292
292
|
eventId: string;
|
293
293
|
};
|