@openframe-org/criteria-set-protocol 2.5.0 → 3.0.0-alpha.10
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/v1/schemas/certification.d.ts +86 -44
- package/dist/v1/schemas/certification.js +29 -9
- package/dist/v1/schemas/common.d.ts +66 -51
- package/dist/v1/schemas/common.js +38 -35
- package/dist/v1/schemas/criteria-tree.d.ts +12413 -624
- package/dist/v1/schemas/criteria-tree.js +1 -1
- package/dist/v1/schemas/criterion.d.ts +2083 -116
- package/dist/v1/schemas/criterion.js +1 -1
- package/dist/v1/schemas/data-map.d.ts +3982 -75
- package/dist/v1/schemas/data-map.js +1 -1
- package/dist/v1/schemas/metadata.d.ts +6 -10
- package/dist/v1/schemas/metadata.js +4 -15
- package/dist/v1/schemas/request/matrix-request-body-schema.d.ts +5 -5
- package/dist/v1/schemas/request/matrix-request-body-schema.js +5 -5
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.d.ts +4 -4
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.js +4 -4
- package/dist/v1/schemas/response.d.ts +4 -7
- package/dist/v1/schemas/task-group.d.ts +2050 -90
- package/dist/v1/schemas/task-group.js +2 -2
- package/dist/v1/schemas/task-item.d.ts +4016 -124
- package/dist/v1/schemas/task-item.js +33 -35
- package/dist/v1/schemas/task.d.ts +2025 -72
- package/dist/v1/schemas/task.js +2 -2
- package/dist/v1/schemas/theme.d.ts +2113 -139
- package/dist/v1/schemas/theme.js +2 -2
- package/dist/v1/utils.js +4 -7
- package/package.json +1 -1
|
@@ -3,70 +3,112 @@ export declare const certificationDefinitionTypeSchema: z.ZodEnum<{
|
|
|
3
3
|
number: "number";
|
|
4
4
|
percentage: "percentage";
|
|
5
5
|
}>;
|
|
6
|
-
export declare const numberBasedCertificationDefinitionRulesSchema: z.ZodObject<{
|
|
7
|
-
minimum: z.
|
|
8
|
-
exclusiveMinimum: z.ZodOptional<z.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
export declare const numberBasedCertificationDefinitionRulesSchema: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
7
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
11
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
13
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
17
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>]>>;
|
|
19
|
+
export declare const percentageBasedCertificationDefinitionRulesSchema: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
24
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
26
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
30
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>]>>;
|
|
18
32
|
export declare const numberBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
19
33
|
code: z.ZodString;
|
|
20
|
-
icon: z.
|
|
34
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
21
35
|
name: z.ZodString;
|
|
22
|
-
description: z.
|
|
36
|
+
description: z.ZodNullable<z.ZodString>;
|
|
23
37
|
rulesText: z.ZodString;
|
|
24
38
|
type: z.ZodLiteral<"number">;
|
|
25
|
-
rules: z.ZodObject<{
|
|
26
|
-
minimum: z.
|
|
27
|
-
exclusiveMinimum: z.ZodOptional<z.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
rules: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
40
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
41
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
44
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
46
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
50
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
}, z.core.$strip>]>>;
|
|
31
52
|
}, z.core.$strip>;
|
|
32
53
|
export declare const percentageBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
33
54
|
code: z.ZodString;
|
|
34
|
-
icon: z.
|
|
55
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
35
56
|
name: z.ZodString;
|
|
36
|
-
description: z.
|
|
57
|
+
description: z.ZodNullable<z.ZodString>;
|
|
37
58
|
rulesText: z.ZodString;
|
|
38
59
|
type: z.ZodLiteral<"percentage">;
|
|
39
|
-
rules: z.ZodObject<{
|
|
40
|
-
minimum: z.
|
|
41
|
-
exclusiveMinimum: z.ZodOptional<z.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
60
|
+
rules: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
61
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
65
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
67
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
71
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
}, z.core.$strip>]>>;
|
|
45
73
|
}, z.core.$strip>;
|
|
46
74
|
export declare const certificationDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
75
|
code: z.ZodString;
|
|
48
|
-
icon: z.
|
|
76
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
49
77
|
name: z.ZodString;
|
|
50
|
-
description: z.
|
|
78
|
+
description: z.ZodNullable<z.ZodString>;
|
|
51
79
|
rulesText: z.ZodString;
|
|
52
80
|
type: z.ZodLiteral<"number">;
|
|
53
|
-
rules: z.ZodObject<{
|
|
54
|
-
minimum: z.
|
|
55
|
-
exclusiveMinimum: z.ZodOptional<z.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
81
|
+
rules: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
82
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
83
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
86
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
88
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
89
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
92
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
93
|
+
}, z.core.$strip>]>>;
|
|
59
94
|
}, z.core.$strip>, z.ZodObject<{
|
|
60
95
|
code: z.ZodString;
|
|
61
|
-
icon: z.
|
|
96
|
+
icon: z.ZodNullable<z.ZodString>;
|
|
62
97
|
name: z.ZodString;
|
|
63
|
-
description: z.
|
|
98
|
+
description: z.ZodNullable<z.ZodString>;
|
|
64
99
|
rulesText: z.ZodString;
|
|
65
100
|
type: z.ZodLiteral<"percentage">;
|
|
66
|
-
rules: z.ZodObject<{
|
|
67
|
-
minimum: z.
|
|
68
|
-
exclusiveMinimum: z.ZodOptional<z.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
101
|
+
rules: z.ZodIntersection<z.ZodUnion<readonly [z.ZodObject<{
|
|
102
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
exclusiveMinimum: z.ZodOptional<z.ZodNever>;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
minimum: z.ZodOptional<z.ZodNever>;
|
|
106
|
+
exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
108
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
109
|
+
exclusiveMaximum: z.ZodOptional<z.ZodNever>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
maximum: z.ZodOptional<z.ZodNever>;
|
|
112
|
+
exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strip>]>>;
|
|
72
114
|
}, z.core.$strip>], "type">;
|
|
@@ -5,13 +5,33 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.certificationDefinitionTypeSchema = zod_1.z
|
|
6
6
|
.enum(["number", "percentage"])
|
|
7
7
|
.describe("CertificationDefinitionType");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
8
|
+
const minimumOrExclusiveMinimum = zod_1.z.union([zod_1.z.object({
|
|
9
|
+
minimum: zod_1.z
|
|
10
|
+
.number()
|
|
11
|
+
.nullable()
|
|
12
|
+
.describe("Minimum value for the certification"),
|
|
13
|
+
exclusiveMinimum: zod_1.z.never().optional(),
|
|
14
|
+
}), zod_1.z.object({
|
|
15
|
+
minimum: zod_1.z.never().optional(),
|
|
16
|
+
exclusiveMinimum: zod_1.z
|
|
17
|
+
.number()
|
|
18
|
+
.nullable()
|
|
19
|
+
.describe("Exclusive minimum value for the certification"),
|
|
20
|
+
})]);
|
|
21
|
+
const maximumOrExclusiveMaximum = zod_1.z.union([zod_1.z.object({
|
|
22
|
+
maximum: zod_1.z
|
|
23
|
+
.number()
|
|
24
|
+
.nullable()
|
|
25
|
+
.describe("Maximum value for the certification"),
|
|
26
|
+
exclusiveMaximum: zod_1.z.never().optional(),
|
|
27
|
+
}), zod_1.z.object({
|
|
28
|
+
maximum: zod_1.z.never().optional(),
|
|
29
|
+
exclusiveMaximum: zod_1.z
|
|
30
|
+
.number()
|
|
31
|
+
.nullable()
|
|
32
|
+
.describe("Exclusive maximum value for the certification"),
|
|
33
|
+
})]);
|
|
34
|
+
exports.numberBasedCertificationDefinitionRulesSchema = zod_1.z.intersection(minimumOrExclusiveMinimum, maximumOrExclusiveMaximum)
|
|
15
35
|
.describe("NumberBasedCertificationDefinitionRules");
|
|
16
36
|
exports.percentageBasedCertificationDefinitionRulesSchema = exports.numberBasedCertificationDefinitionRulesSchema.describe("PercentageBasedCertificationDefinitionRules");
|
|
17
37
|
const abstractCertificationDefinitionSchema = zod_1.z
|
|
@@ -22,12 +42,12 @@ const abstractCertificationDefinitionSchema = zod_1.z
|
|
|
22
42
|
.describe("Unique identifier code for the certification, such as 'platinum' or 'ecolabel'"),
|
|
23
43
|
icon: zod_1.z
|
|
24
44
|
.string()
|
|
25
|
-
.
|
|
45
|
+
.nullable()
|
|
26
46
|
.describe("Optional icon URL for the certification"),
|
|
27
47
|
name: zod_1.z.string().describe("Display name of the certification"),
|
|
28
48
|
description: zod_1.z
|
|
29
49
|
.string()
|
|
30
|
-
.
|
|
50
|
+
.nullable()
|
|
31
51
|
.describe("Optional detailed description of the certification"),
|
|
32
52
|
rulesText: zod_1.z
|
|
33
53
|
.string()
|
|
@@ -6,21 +6,28 @@ export declare const colorSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<
|
|
|
6
6
|
}, z.core.$strip>]>;
|
|
7
7
|
export declare const taskItemScalarValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
8
8
|
export declare const taskItemValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
|
|
9
|
-
export declare const elementDataSchema: z.ZodObject<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
maximumValue: z.
|
|
19
|
-
minimumValue: z.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, z.core.$catchall<z.ZodAny
|
|
9
|
+
export declare const elementDataSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
10
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
type: z.ZodLiteral<"number">;
|
|
15
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
}, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
|
|
17
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
19
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
20
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
type: z.ZodLiteral<"percentage">;
|
|
22
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
23
|
+
}, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"boolean">;
|
|
25
|
+
value: z.ZodNullable<z.ZodBoolean>;
|
|
26
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
27
|
+
maximumValue: z.ZodOptional<z.ZodNever>;
|
|
28
|
+
minimumValue: z.ZodOptional<z.ZodNever>;
|
|
29
|
+
weight: z.ZodOptional<z.ZodNever>;
|
|
30
|
+
}, z.core.$catchall<z.ZodAny>>]>;
|
|
24
31
|
export declare const criteriaTreeElementTypeSchema: z.ZodEnum<{
|
|
25
32
|
theme: "theme";
|
|
26
33
|
criterion: "criterion";
|
|
@@ -39,8 +46,8 @@ export declare const abstractElementSchema: z.ZodObject<{
|
|
|
39
46
|
title: z.ZodString;
|
|
40
47
|
longFormTitle: z.ZodString;
|
|
41
48
|
code: z.ZodString;
|
|
42
|
-
tags: z.
|
|
43
|
-
documentation: z.
|
|
49
|
+
tags: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
50
|
+
documentation: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
51
|
label: z.ZodString;
|
|
45
52
|
text: z.ZodString;
|
|
46
53
|
type: z.ZodLiteral<"pdf">;
|
|
@@ -55,55 +62,63 @@ export declare const abstractElementSchema: z.ZodObject<{
|
|
|
55
62
|
type: z.ZodLiteral<"link">;
|
|
56
63
|
url: z.ZodString;
|
|
57
64
|
}, z.core.$strip>], "type">>>;
|
|
58
|
-
data: z.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
maximumValue: z.
|
|
68
|
-
minimumValue: z.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, z.core.$catchall<z.ZodAny
|
|
73
|
-
|
|
65
|
+
data: z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
66
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
type: z.ZodLiteral<"number">;
|
|
71
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
}, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
|
|
73
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
75
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
77
|
+
type: z.ZodLiteral<"percentage">;
|
|
78
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
79
|
+
}, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"boolean">;
|
|
81
|
+
value: z.ZodNullable<z.ZodBoolean>;
|
|
82
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
83
|
+
maximumValue: z.ZodOptional<z.ZodNever>;
|
|
84
|
+
minimumValue: z.ZodOptional<z.ZodNever>;
|
|
85
|
+
weight: z.ZodOptional<z.ZodNever>;
|
|
86
|
+
}, z.core.$catchall<z.ZodAny>>]>>;
|
|
87
|
+
sortOrder: z.ZodNullable<z.ZodNumber>;
|
|
74
88
|
}, z.core.$strip>;
|
|
75
89
|
export declare const breadcrumbOptionsSchema: z.ZodUnion<[z.ZodObject<{
|
|
76
90
|
hideFromBreadcrumbs: z.ZodLiteral<true>;
|
|
77
91
|
breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
|
|
78
92
|
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
-
hideFromBreadcrumbs: z.ZodDefault<z.
|
|
93
|
+
hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
|
|
80
94
|
breadcrumbTextFormat: z.ZodString;
|
|
81
95
|
}, z.core.$strip>]>;
|
|
82
96
|
export declare const documentTreeOptionsSchema: z.ZodUnion<[z.ZodObject<{
|
|
83
97
|
hideFromDocumentTree: z.ZodLiteral<true>;
|
|
84
98
|
documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
|
|
85
99
|
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
-
hideFromDocumentTree: z.
|
|
100
|
+
hideFromDocumentTree: z.ZodNullable<z.ZodLiteral<false>>;
|
|
87
101
|
documentTreeFolderTextFormat: z.ZodString;
|
|
88
102
|
}, z.core.$strip>]>;
|
|
89
103
|
export declare const criteriaTreeOptionsSchema: z.ZodObject<{
|
|
90
104
|
criteriaTreeElementTextFormat: z.ZodString;
|
|
91
105
|
}, z.core.$strip>;
|
|
92
106
|
export declare const reportOptionsSchema: z.ZodObject<{
|
|
93
|
-
reportTitleTextFormat: z.
|
|
107
|
+
reportTitleTextFormat: z.ZodString;
|
|
94
108
|
}, z.core.$strip>;
|
|
95
|
-
export declare const treeResultSchema: z.ZodObject<{
|
|
96
|
-
type: z.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
export declare const treeResultSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
110
|
+
type: z.ZodLiteral<"number">;
|
|
111
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
112
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
113
|
+
}, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"percentage">;
|
|
115
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
116
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
}, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
|
|
118
|
+
type: z.ZodLiteral<"boolean">;
|
|
119
|
+
value: z.ZodNullable<z.ZodBoolean>;
|
|
120
|
+
total: z.ZodOptional<z.ZodNever>;
|
|
121
|
+
maximumValue: z.ZodOptional<z.ZodNever>;
|
|
122
|
+
minimumValue: z.ZodOptional<z.ZodNever>;
|
|
123
|
+
weight: z.ZodOptional<z.ZodNever>;
|
|
124
|
+
}, z.core.$catchall<z.ZodAny>>]>;
|
|
@@ -20,37 +20,41 @@ exports.taskItemScalarValueSchema = zod_1.z
|
|
|
20
20
|
exports.taskItemValueSchema = zod_1.z
|
|
21
21
|
.union([exports.taskItemScalarValueSchema, zod_1.z.array(exports.taskItemScalarValueSchema)])
|
|
22
22
|
.describe("TaskItemValue - Can be either a scalar value or an array of scalar values");
|
|
23
|
-
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.describe("Type of data"),
|
|
29
|
-
value: zod_1.z.number().or(zod_1.z.boolean()).optional().describe("Value of the element"),
|
|
30
|
-
text: zod_1.z.string().optional().describe("Text representation of the value"),
|
|
31
|
-
total: zod_1.z
|
|
32
|
-
.number()
|
|
33
|
-
.optional()
|
|
34
|
-
.describe("Total value, understood as 'value'/'total'"),
|
|
23
|
+
const abstractElementDataSchema = zod_1.z.object({
|
|
24
|
+
type: zod_1.z.enum(["number", "percentage", "boolean"])
|
|
25
|
+
}).catchall(zod_1.z.any());
|
|
26
|
+
const abstractNumberElementDataSchema = abstractElementDataSchema.extend({
|
|
27
|
+
value: zod_1.z.number().nullable().describe("Value of the element"),
|
|
35
28
|
maximumValue: zod_1.z
|
|
36
29
|
.number()
|
|
37
|
-
.
|
|
38
|
-
.describe("Maximum allowed value
|
|
30
|
+
.nullable()
|
|
31
|
+
.describe("Maximum allowed value"),
|
|
39
32
|
minimumValue: zod_1.z
|
|
40
33
|
.number()
|
|
41
|
-
.
|
|
42
|
-
.describe("Minimum allowed value
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
.nullable()
|
|
35
|
+
.describe("Minimum allowed value"),
|
|
36
|
+
weight: zod_1.z.number().nullable().describe("Weight of the element")
|
|
37
|
+
});
|
|
38
|
+
const numberElementDataSchema = abstractNumberElementDataSchema.extend({
|
|
39
|
+
type: zod_1.z.literal("number").describe("Type of data"),
|
|
40
|
+
total: zod_1.z
|
|
48
41
|
.number()
|
|
49
|
-
.
|
|
50
|
-
.describe("
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
.nullable()
|
|
43
|
+
.describe("Total value, understood as 'value'/'total'"),
|
|
44
|
+
});
|
|
45
|
+
const percentageElementDataSchema = abstractNumberElementDataSchema.extend({
|
|
46
|
+
type: zod_1.z.literal("percentage").describe("Type of data"),
|
|
47
|
+
total: zod_1.z.never().optional()
|
|
48
|
+
});
|
|
49
|
+
const booleanElementDataSchema = abstractElementDataSchema.extend({
|
|
50
|
+
type: zod_1.z.literal("boolean").describe("Type of data"),
|
|
51
|
+
value: zod_1.z.boolean().nullable().describe("Value of the element"),
|
|
52
|
+
total: zod_1.z.never().optional(),
|
|
53
|
+
maximumValue: zod_1.z.never().optional(),
|
|
54
|
+
minimumValue: zod_1.z.never().optional(),
|
|
55
|
+
weight: zod_1.z.never().optional(),
|
|
56
|
+
});
|
|
57
|
+
exports.elementDataSchema = numberElementDataSchema.or(percentageElementDataSchema).or(booleanElementDataSchema)
|
|
54
58
|
.describe("ElementData - Element data containing value constraints and metadata");
|
|
55
59
|
exports.criteriaTreeElementTypeSchema = zod_1.z
|
|
56
60
|
.enum(["theme", "criterion", "task-group", "task", "task-item"])
|
|
@@ -63,16 +67,16 @@ exports.abstractElementSchema = zod_1.z
|
|
|
63
67
|
code: zod_1.z.string().describe("Unique identifier code"),
|
|
64
68
|
tags: zod_1.z
|
|
65
69
|
.array(zod_1.z.string())
|
|
66
|
-
.
|
|
70
|
+
.nullable()
|
|
67
71
|
.describe("List of classification tags"),
|
|
68
72
|
documentation: zod_1.z
|
|
69
73
|
.array(documentation_1.documentationItemSchema)
|
|
70
|
-
.
|
|
74
|
+
.nullable()
|
|
71
75
|
.describe("Associated documentation items"),
|
|
72
|
-
data: exports.elementDataSchema.
|
|
76
|
+
data: exports.elementDataSchema.nullable().describe("Element data"),
|
|
73
77
|
sortOrder: zod_1.z
|
|
74
78
|
.number()
|
|
75
|
-
.
|
|
79
|
+
.nullable()
|
|
76
80
|
.describe("Custom sorting position within parent")
|
|
77
81
|
})
|
|
78
82
|
.describe("AbstractElement - Base schema for all tree elements");
|
|
@@ -86,7 +90,7 @@ exports.breadcrumbOptionsSchema = zod_1.z
|
|
|
86
90
|
.or(zod_1.z.object({
|
|
87
91
|
hideFromBreadcrumbs: zod_1.z
|
|
88
92
|
.literal(false)
|
|
89
|
-
.
|
|
93
|
+
.nullable()
|
|
90
94
|
.default(false)
|
|
91
95
|
.describe("Whether to hide the element from the breadcrumbs"),
|
|
92
96
|
breadcrumbTextFormat: zod_1.z
|
|
@@ -103,7 +107,7 @@ exports.documentTreeOptionsSchema = zod_1.z
|
|
|
103
107
|
.or(zod_1.z.object({
|
|
104
108
|
hideFromDocumentTree: zod_1.z
|
|
105
109
|
.literal(false)
|
|
106
|
-
.
|
|
110
|
+
.nullable()
|
|
107
111
|
.describe("Whether to hide the element from the document tree folder structure"),
|
|
108
112
|
documentTreeFolderTextFormat: zod_1.z
|
|
109
113
|
.string()
|
|
@@ -119,7 +123,6 @@ exports.reportOptionsSchema = zod_1.z
|
|
|
119
123
|
.object({
|
|
120
124
|
reportTitleTextFormat: zod_1.z
|
|
121
125
|
.string()
|
|
122
|
-
.
|
|
123
|
-
.describe("The format of the report row text, use ':code:' and ':title:' to define where the code and/or title should be inserted, if not provided only the title will be rendered")
|
|
126
|
+
.describe("The format of the report row text, use ':code:' and ':title:' to define where the code and/or title should be inserted")
|
|
124
127
|
});
|
|
125
|
-
exports.treeResultSchema =
|
|
128
|
+
exports.treeResultSchema = numberElementDataSchema.omit({ weight: true, minimumValue: true, maximumValue: true }).or(percentageElementDataSchema.omit({ weight: true, minimumValue: true, maximumValue: true })).or(booleanElementDataSchema).describe("TreeResult - The result of the evaluation of a criteria set");
|