@opencrvs/toolkit 1.9.6-rc.f83683e → 1.9.6-rc.fc3b4c3
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 +29393 -2317
- package/dist/commons/conditionals/conditionals.d.ts +15 -1
- package/dist/commons/conditionals/validate.d.ts +11 -4
- package/dist/commons/events/ActionConfig.d.ts +25043 -1552
- package/dist/commons/events/ActionDocument.d.ts +803 -1856
- package/dist/commons/events/ActionInput.d.ts +277 -1073
- package/dist/commons/events/ActionType.d.ts +86 -9
- package/dist/commons/events/AdvancedSearchConfig.d.ts +228 -1238
- package/dist/commons/events/CompositeFieldValue.d.ts +29 -190
- package/dist/commons/events/Conditional.d.ts +26 -38
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +1195 -4223
- package/dist/commons/events/DeduplicationConfig.d.ts +15 -150
- package/dist/commons/events/Draft.d.ts +70 -105
- package/dist/commons/events/DynamicFieldValue.d.ts +7 -91
- package/dist/commons/events/EventConfig.d.ts +19988 -2120
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +320 -1332
- package/dist/commons/events/EventIndex.d.ts +193 -980
- package/dist/commons/events/EventInput.d.ts +3 -8
- package/dist/commons/events/EventMetadata.d.ts +106 -347
- package/dist/commons/events/FieldConfig.d.ts +4545 -12283
- package/dist/commons/events/FieldType.d.ts +20 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +195 -881
- package/dist/commons/events/FieldValue.d.ts +88 -396
- package/dist/commons/events/Flag.d.ts +67 -0
- package/dist/commons/events/FormConfig.d.ts +14022 -721
- package/dist/commons/events/PageConfig.d.ts +9368 -319
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +2 -3
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +74 -37
- package/dist/commons/events/WorkqueueConfig.d.ts +1865 -7177
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +26571 -147
- package/dist/commons/events/eventConfigValidation.d.ts +8 -0
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locations.d.ts +26 -19
- package/dist/commons/events/scopes.d.ts +5 -4
- package/dist/commons/events/state/availableActions.d.ts +0 -2
- package/dist/commons/events/state/flags.d.ts +21 -3
- package/dist/commons/events/state/index.d.ts +22 -19
- package/dist/commons/events/state/utils.d.ts +130 -112
- package/dist/commons/events/test.utils.d.ts +17 -8
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +53180 -367
- package/dist/commons/notification/UserNotifications.d.ts +55 -636
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +53 -8
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +2011 -1717
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1669 -1571
- package/dist/scopes/index.d.ts +167 -132
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +133 -94
- package/package.json +5 -5
- package/dist/commons/events/CreatedAtLocation.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conditionals/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conditionals/index.ts"],"names":[],"mappings":"AAaA,cAAc,gCAAgC,CAAA"}
|
|
@@ -35,21 +35,25 @@ __export(conditionals_exports, {
|
|
|
35
35
|
createFieldConditionals: () => createFieldConditionals,
|
|
36
36
|
defineConditional: () => defineConditional,
|
|
37
37
|
defineFormConditional: () => defineFormConditional,
|
|
38
|
+
flag: () => flag,
|
|
38
39
|
isFieldReference: () => isFieldReference,
|
|
39
40
|
never: () => never,
|
|
40
41
|
not: () => not,
|
|
42
|
+
now: () => now,
|
|
41
43
|
or: () => or,
|
|
44
|
+
status: () => status,
|
|
42
45
|
user: () => user
|
|
43
46
|
});
|
|
44
47
|
module.exports = __toCommonJS(conditionals_exports);
|
|
48
|
+
var z4 = __toESM(require("zod/v4"));
|
|
45
49
|
|
|
46
50
|
// ../commons/src/conditionals/conditionals.ts
|
|
47
51
|
var objectHash = __toESM(require("object-hash"));
|
|
48
52
|
|
|
49
53
|
// ../commons/src/events/serializers/user/serializer.ts
|
|
50
|
-
var
|
|
51
|
-
var SerializedUserField =
|
|
52
|
-
$userField:
|
|
54
|
+
var z = __toESM(require("zod/v4"));
|
|
55
|
+
var SerializedUserField = z.object({
|
|
56
|
+
$userField: z.enum([
|
|
53
57
|
"id",
|
|
54
58
|
"name",
|
|
55
59
|
"role",
|
|
@@ -58,11 +62,12 @@ var SerializedUserField = import_zod.z.object({
|
|
|
58
62
|
"firstname",
|
|
59
63
|
"middlename",
|
|
60
64
|
"surname",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"primaryOfficeId"
|
|
65
|
+
"signature",
|
|
66
|
+
"avatar",
|
|
67
|
+
"primaryOfficeId",
|
|
68
|
+
"administrativeAreaId"
|
|
64
69
|
]),
|
|
65
|
-
$location:
|
|
70
|
+
$location: z.string().optional()
|
|
66
71
|
});
|
|
67
72
|
function userSerializer(userField) {
|
|
68
73
|
return {
|
|
@@ -82,7 +87,7 @@ function userSerializer(userField) {
|
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
// ../commons/src/utils.ts
|
|
85
|
-
var z2 = __toESM(require("zod"));
|
|
90
|
+
var z2 = __toESM(require("zod/v4"));
|
|
86
91
|
var FullNameV1 = z2.array(
|
|
87
92
|
z2.object({
|
|
88
93
|
use: z2.string(),
|
|
@@ -106,6 +111,15 @@ function omitKeyDeep(obj, keyToRemove) {
|
|
|
106
111
|
return newObj;
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
// ../commons/src/events/serializers/date/serializer.ts
|
|
115
|
+
var import_zod = require("zod");
|
|
116
|
+
var SerializedNowDateTime = import_zod.z.object({
|
|
117
|
+
$$now: import_zod.z.literal(true)
|
|
118
|
+
});
|
|
119
|
+
function todayDateTimeValueSerializer() {
|
|
120
|
+
return { $$now: true };
|
|
121
|
+
}
|
|
122
|
+
|
|
109
123
|
// ../commons/src/conditionals/conditionals.ts
|
|
110
124
|
function defineConditional(schema) {
|
|
111
125
|
const schemaWithooutIDRef = omitKeyDeep(schema, "$id");
|
|
@@ -179,6 +193,7 @@ function wrapToPathOptional(condition, path) {
|
|
|
179
193
|
};
|
|
180
194
|
}, condition);
|
|
181
195
|
}
|
|
196
|
+
var now = Object.assign(todayDateTimeValueSerializer, {});
|
|
182
197
|
var user = Object.assign(userSerializer, {
|
|
183
198
|
hasScope: (scope) => defineConditional({
|
|
184
199
|
type: "object",
|
|
@@ -318,6 +333,33 @@ function defineComparison(field, value, keyword) {
|
|
|
318
333
|
required: [field.$$field]
|
|
319
334
|
});
|
|
320
335
|
}
|
|
336
|
+
function flag(flagvalue) {
|
|
337
|
+
return defineConditional({
|
|
338
|
+
type: "object",
|
|
339
|
+
properties: {
|
|
340
|
+
$flags: {
|
|
341
|
+
type: "array",
|
|
342
|
+
contains: {
|
|
343
|
+
type: "string",
|
|
344
|
+
const: flagvalue
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
required: ["$flags"]
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function status(statusValue) {
|
|
352
|
+
return defineConditional({
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {
|
|
355
|
+
$status: {
|
|
356
|
+
type: "string",
|
|
357
|
+
const: statusValue
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
required: ["$status"]
|
|
361
|
+
});
|
|
362
|
+
}
|
|
321
363
|
function createFieldConditionals(fieldId) {
|
|
322
364
|
const getDayRange = (field, days, clause, referenceDate) => ({
|
|
323
365
|
type: "object",
|
|
@@ -671,3 +713,6 @@ function createFieldConditionals(fieldId) {
|
|
|
671
713
|
})
|
|
672
714
|
};
|
|
673
715
|
}
|
|
716
|
+
|
|
717
|
+
// src/conditionals/index.ts
|
|
718
|
+
z4.globalRegistry.clear();
|
|
@@ -7,16 +7,16 @@ export declare function field(fieldId: string): {
|
|
|
7
7
|
fieldId: string;
|
|
8
8
|
type: "fuzzy";
|
|
9
9
|
options: {
|
|
10
|
-
boost?: number | undefined;
|
|
11
10
|
fuzziness?: string | number | undefined;
|
|
11
|
+
boost?: number | undefined;
|
|
12
12
|
} | undefined;
|
|
13
13
|
};
|
|
14
14
|
strictMatches: (options?: StrictMatcherOptions) => {
|
|
15
15
|
fieldId: string;
|
|
16
16
|
type: "strict";
|
|
17
17
|
options: {
|
|
18
|
-
value?: string | undefined;
|
|
19
18
|
boost?: number | undefined;
|
|
19
|
+
value?: string | undefined;
|
|
20
20
|
} | undefined;
|
|
21
21
|
};
|
|
22
22
|
dateRangeMatches: (options: DateRangeMatcherOptions) => {
|
|
@@ -24,8 +24,8 @@ export declare function field(fieldId: string): {
|
|
|
24
24
|
type: "dateRange";
|
|
25
25
|
options: {
|
|
26
26
|
days: number;
|
|
27
|
-
boost?: number | undefined;
|
|
28
27
|
pivot?: number | undefined;
|
|
28
|
+
boost?: number | undefined;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|