@opencrvs/toolkit 1.8.1-rc.4f4b65a → 1.8.1-rc.5130256
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 +392 -409
- package/dist/commons/conditionals/conditionals.test.d.ts +2 -0
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +2 -11
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +5805 -3441
- package/dist/commons/events/ActionDocument.d.ts +716 -1252
- package/dist/commons/events/ActionInput.d.ts +600 -626
- package/dist/commons/events/AdvancedSearchConfig.d.ts +65 -83
- package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
- package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
- package/dist/commons/events/Draft.d.ts +48 -48
- package/dist/commons/events/EventConfig.d.ts +2663 -1401
- package/dist/commons/events/EventDocument.d.ts +432 -451
- package/dist/commons/events/EventIndex.d.ts +62 -184
- package/dist/commons/events/EventMetadata.d.ts +9 -9
- package/dist/commons/events/FieldConfig.d.ts +343 -254
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +25 -18
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/FormConfig.d.ts +2388 -1296
- package/dist/commons/events/PageConfig.d.ts +508 -264
- package/dist/commons/events/WorkqueueConfig.d.ts +164 -288
- package/dist/commons/events/defineConfig.d.ts +309 -129
- package/dist/commons/events/event.d.ts +6 -68
- package/dist/commons/events/field.d.ts +0 -14
- package/dist/commons/events/test.utils.d.ts +12 -12
- package/dist/commons/events/utils.d.ts +564 -244
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +2 -3
- package/dist/events/index.js +115 -259
- package/package.json +1 -1
- package/tsconfig.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ActionType } from './ActionType';
|
2
|
-
import {
|
2
|
+
import { EventFieldId } from './AdvancedSearchConfig';
|
3
3
|
import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
|
4
4
|
/**
|
5
5
|
* Creates a function that acts like a callable + static method container.
|
@@ -8,9 +8,9 @@ import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConf
|
|
8
8
|
* event('status') // → returns search config
|
9
9
|
* event.hasAction('CLICKED') // → returns conditional
|
10
10
|
*/
|
11
|
-
declare function eventFn(fieldId:
|
11
|
+
declare function eventFn(fieldId: EventFieldId): {
|
12
12
|
range: () => {
|
13
|
-
fieldId: "
|
13
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
14
14
|
fieldType: "event";
|
15
15
|
} & {
|
16
16
|
config: {
|
@@ -18,7 +18,7 @@ declare function eventFn(fieldId: EventFieldIdInput): {
|
|
18
18
|
};
|
19
19
|
};
|
20
20
|
exact: () => {
|
21
|
-
fieldId: "
|
21
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
22
22
|
fieldType: "event";
|
23
23
|
} & {
|
24
24
|
config: {
|
@@ -26,82 +26,20 @@ declare function eventFn(fieldId: EventFieldIdInput): {
|
|
26
26
|
};
|
27
27
|
};
|
28
28
|
fuzzy: () => {
|
29
|
-
fieldId: "
|
29
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
30
30
|
fieldType: "event";
|
31
31
|
} & {
|
32
32
|
config: {
|
33
33
|
type: "fuzzy";
|
34
34
|
};
|
35
35
|
};
|
36
|
-
within: () => {
|
37
|
-
fieldId: "event.status" | "event.updatedAt" | "event.trackingId" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
|
38
|
-
fieldType: "event";
|
39
|
-
} & {
|
40
|
-
config: {
|
41
|
-
type: "within";
|
42
|
-
};
|
43
|
-
};
|
44
36
|
};
|
45
37
|
declare const event: typeof eventFn & {
|
46
38
|
/**
|
47
39
|
* Checks if the event contains a specific action type.
|
48
|
-
* Can be used directly as a conditional or chained with additional methods.
|
49
40
|
* @param action - The action type to check for.
|
50
41
|
*/
|
51
|
-
hasAction: (action: ActionType) =>
|
52
|
-
/**
|
53
|
-
* Creates a conditional that checks if the event contains a specific action type
|
54
|
-
* with a minimum count of occurrences.
|
55
|
-
*
|
56
|
-
* @param minCount - The minimum number of actions required.
|
57
|
-
*/
|
58
|
-
minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
|
59
|
-
/**
|
60
|
-
* Builds a conditional that sets a maximum count for the number of actions.
|
61
|
-
* This is useful for limiting the number of actions of a specific type in a single event.
|
62
|
-
*/
|
63
|
-
maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
|
64
|
-
/**
|
65
|
-
* Adds additional field constraints to the action matching.
|
66
|
-
*
|
67
|
-
* @param fields - Object containing additional fields to match on the action.
|
68
|
-
*/
|
69
|
-
withFields: (fields: Record<string, unknown>) => {
|
70
|
-
/**
|
71
|
-
* Creates a conditional that checks if the event contains a specific action type
|
72
|
-
* with a minimum count of occurrences.
|
73
|
-
*
|
74
|
-
* @param minCount - The minimum number of actions required.
|
75
|
-
*/
|
76
|
-
minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
|
77
|
-
/**
|
78
|
-
* Builds a conditional that sets a maximum count for the number of actions.
|
79
|
-
* This is useful for limiting the number of actions of a specific type in a single event.
|
80
|
-
*/
|
81
|
-
maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
|
82
|
-
};
|
83
|
-
/**
|
84
|
-
* Adds template ID constraint to the action matching.
|
85
|
-
* This is a convenience method that adds content.templateId to the fields.
|
86
|
-
*
|
87
|
-
* @param id - The template ID to match against.
|
88
|
-
*/
|
89
|
-
withTemplate: (id: string) => {
|
90
|
-
/**
|
91
|
-
* Creates a conditional that checks if the event contains a specific action type
|
92
|
-
* with a minimum count of occurrences.
|
93
|
-
*
|
94
|
-
* @param minCount - The minimum number of actions required.
|
95
|
-
*/
|
96
|
-
minCount: (minCount: number) => import("../conditionals/conditionals").JSONSchema;
|
97
|
-
/**
|
98
|
-
* Builds a conditional that sets a maximum count for the number of actions.
|
99
|
-
* This is useful for limiting the number of actions of a specific type in a single event.
|
100
|
-
*/
|
101
|
-
maxCount: (maxCount: number) => import("../conditionals/conditionals").JSONSchema;
|
102
|
-
};
|
103
|
-
__nominal__type: "JSONSchema";
|
104
|
-
};
|
42
|
+
hasAction: (action: ActionType) => import("../conditionals/conditionals").JSONSchema;
|
105
43
|
field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
|
106
44
|
};
|
107
45
|
export { event };
|
@@ -56,20 +56,6 @@ export declare function field(fieldId: string, options?: {
|
|
56
56
|
type: "fuzzy";
|
57
57
|
};
|
58
58
|
};
|
59
|
-
within: () => {
|
60
|
-
options?: SelectOption[];
|
61
|
-
excludeInSearchQuery?: boolean;
|
62
|
-
alternateFieldIds?: string[];
|
63
|
-
conditionals?: FieldConditional[];
|
64
|
-
validations?: ValidationConfig[];
|
65
|
-
searchCriteriaLabelPrefix?: TranslationConfig;
|
66
|
-
fieldId: string;
|
67
|
-
fieldType: "field";
|
68
|
-
} & {
|
69
|
-
config: {
|
70
|
-
type: "within";
|
71
|
-
};
|
72
|
-
};
|
73
59
|
$$field: string;
|
74
60
|
isAfter: () => {
|
75
61
|
days: (days: number) => {
|
@@ -67,8 +67,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
67
67
|
street?: string | null | undefined;
|
68
68
|
zipCode?: string | null | undefined;
|
69
69
|
} | {
|
70
|
-
firstname
|
71
|
-
surname
|
70
|
+
firstname?: string | null | undefined;
|
71
|
+
surname?: string | null | undefined;
|
72
72
|
middlename?: string | null | undefined;
|
73
73
|
} | {
|
74
74
|
country: string;
|
@@ -123,8 +123,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
123
123
|
street?: string | null | undefined;
|
124
124
|
zipCode?: string | null | undefined;
|
125
125
|
} | {
|
126
|
-
firstname
|
127
|
-
surname
|
126
|
+
firstname?: string | null | undefined;
|
127
|
+
surname?: string | null | undefined;
|
128
128
|
middlename?: string | null | undefined;
|
129
129
|
} | {
|
130
130
|
country: string;
|
@@ -173,8 +173,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
173
173
|
street?: string | null | undefined;
|
174
174
|
zipCode?: string | null | undefined;
|
175
175
|
} | {
|
176
|
-
firstname
|
177
|
-
surname
|
176
|
+
firstname?: string | null | undefined;
|
177
|
+
surname?: string | null | undefined;
|
178
178
|
middlename?: string | null | undefined;
|
179
179
|
} | {
|
180
180
|
country: string;
|
@@ -240,8 +240,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
240
240
|
street?: string | null | undefined;
|
241
241
|
zipCode?: string | null | undefined;
|
242
242
|
} | {
|
243
|
-
firstname
|
244
|
-
surname
|
243
|
+
firstname?: string | null | undefined;
|
244
|
+
surname?: string | null | undefined;
|
245
245
|
middlename?: string | null | undefined;
|
246
246
|
} | {
|
247
247
|
country: string;
|
@@ -309,8 +309,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
309
309
|
street?: string | null | undefined;
|
310
310
|
zipCode?: string | null | undefined;
|
311
311
|
} | {
|
312
|
-
firstname
|
313
|
-
surname
|
312
|
+
firstname?: string | null | undefined;
|
313
|
+
surname?: string | null | undefined;
|
314
314
|
middlename?: string | null | undefined;
|
315
315
|
} | {
|
316
316
|
country: string;
|
@@ -372,8 +372,8 @@ export declare function eventPayloadGenerator(rng: () => number): {
|
|
372
372
|
street?: string | null | undefined;
|
373
373
|
zipCode?: string | null | undefined;
|
374
374
|
} | {
|
375
|
-
firstname
|
376
|
-
surname
|
375
|
+
firstname?: string | null | undefined;
|
376
|
+
surname?: string | null | undefined;
|
377
377
|
middlename?: string | null | undefined;
|
378
378
|
} | {
|
379
379
|
country: string;
|