@opencrvs/toolkit 1.9.4-rc.793f834 → 1.9.4-rc.f09603b
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 +28204 -2149
- package/dist/commons/conditionals/conditionals.d.ts +10 -1
- package/dist/commons/conditionals/validate.d.ts +11 -4
- package/dist/commons/events/ActionConfig.d.ts +23416 -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 +27 -176
- 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 +931 -4169
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
- 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 +18663 -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 +197 -967
- package/dist/commons/events/EventInput.d.ts +2 -8
- package/dist/commons/events/EventMetadata.d.ts +106 -346
- package/dist/commons/events/FieldConfig.d.ts +4267 -11782
- package/dist/commons/events/FieldType.d.ts +20 -4
- package/dist/commons/events/FieldTypeMapping.d.ts +181 -813
- package/dist/commons/events/FieldValue.d.ts +83 -356
- package/dist/commons/events/Flag.d.ts +70 -0
- package/dist/commons/events/FormConfig.d.ts +13140 -721
- package/dist/commons/events/PageConfig.d.ts +8780 -319
- package/dist/commons/events/SummaryConfig.d.ts +14 -161
- package/dist/commons/events/TemplateConfig.d.ts +3 -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 +1691 -7156
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +25626 -150
- package/dist/commons/events/event.d.ts +4 -4
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locations.d.ts +15 -19
- package/dist/commons/events/scopes.d.ts +5 -4
- package/dist/commons/events/state/availableActions.d.ts +2 -1
- package/dist/commons/events/state/flags.d.ts +21 -3
- package/dist/commons/events/state/index.d.ts +23 -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 +51339 -362
- package/dist/commons/notification/UserNotifications.d.ts +55 -636
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +38 -5
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1810 -1550
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1430 -1412
- 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
|
@@ -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,24 @@ __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,
|
|
41
42
|
or: () => or,
|
|
43
|
+
status: () => status,
|
|
42
44
|
user: () => user
|
|
43
45
|
});
|
|
44
46
|
module.exports = __toCommonJS(conditionals_exports);
|
|
47
|
+
var z3 = __toESM(require("zod/v4"));
|
|
45
48
|
|
|
46
49
|
// ../commons/src/conditionals/conditionals.ts
|
|
47
50
|
var objectHash = __toESM(require("object-hash"));
|
|
48
51
|
|
|
49
52
|
// ../commons/src/events/serializers/user/serializer.ts
|
|
50
|
-
var
|
|
51
|
-
var SerializedUserField =
|
|
52
|
-
$userField:
|
|
53
|
+
var z = __toESM(require("zod/v4"));
|
|
54
|
+
var SerializedUserField = z.object({
|
|
55
|
+
$userField: z.enum([
|
|
53
56
|
"id",
|
|
54
57
|
"name",
|
|
55
58
|
"role",
|
|
@@ -57,7 +60,7 @@ var SerializedUserField = import_zod.z.object({
|
|
|
57
60
|
"avatar",
|
|
58
61
|
"primaryOfficeId"
|
|
59
62
|
]),
|
|
60
|
-
$location:
|
|
63
|
+
$location: z.string().optional()
|
|
61
64
|
});
|
|
62
65
|
function userSerializer(userField) {
|
|
63
66
|
return {
|
|
@@ -77,7 +80,7 @@ function userSerializer(userField) {
|
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
// ../commons/src/utils.ts
|
|
80
|
-
var z2 = __toESM(require("zod"));
|
|
83
|
+
var z2 = __toESM(require("zod/v4"));
|
|
81
84
|
var FullNameV1 = z2.array(
|
|
82
85
|
z2.object({
|
|
83
86
|
use: z2.string(),
|
|
@@ -313,6 +316,33 @@ function defineComparison(field, value, keyword) {
|
|
|
313
316
|
required: [field.$$field]
|
|
314
317
|
});
|
|
315
318
|
}
|
|
319
|
+
function flag(flagvalue) {
|
|
320
|
+
return defineConditional({
|
|
321
|
+
type: "object",
|
|
322
|
+
properties: {
|
|
323
|
+
$flags: {
|
|
324
|
+
type: "array",
|
|
325
|
+
contains: {
|
|
326
|
+
type: "string",
|
|
327
|
+
const: flagvalue
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
required: ["$flags"]
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function status(statusValue) {
|
|
335
|
+
return defineConditional({
|
|
336
|
+
type: "object",
|
|
337
|
+
properties: {
|
|
338
|
+
$status: {
|
|
339
|
+
type: "string",
|
|
340
|
+
const: statusValue
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
required: ["$status"]
|
|
344
|
+
});
|
|
345
|
+
}
|
|
316
346
|
function createFieldConditionals(fieldId) {
|
|
317
347
|
const getDayRange = (field, days, clause, referenceDate) => ({
|
|
318
348
|
type: "object",
|
|
@@ -666,3 +696,6 @@ function createFieldConditionals(fieldId) {
|
|
|
666
696
|
})
|
|
667
697
|
};
|
|
668
698
|
}
|
|
699
|
+
|
|
700
|
+
// src/conditionals/index.ts
|
|
701
|
+
z3.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
|
};
|