@openframe-org/criteria-set-protocol 2.5.0 → 3.0.0-alpha.3
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 +30 -36
- package/dist/v1/schemas/common.js +18 -26
- package/dist/v1/schemas/criteria-tree.d.ts +500 -528
- package/dist/v1/schemas/criteria-tree.js +1 -1
- package/dist/v1/schemas/criterion.d.ts +92 -100
- package/dist/v1/schemas/criterion.js +1 -1
- package/dist/v1/schemas/data-map.d.ts +40 -50
- package/dist/v1/schemas/data-map.js +1 -1
- package/dist/v1/schemas/metadata.d.ts +10 -10
- package/dist/v1/schemas/metadata.js +7 -7
- 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 +7 -7
- package/dist/v1/schemas/task-group.d.ts +69 -75
- package/dist/v1/schemas/task-group.js +2 -2
- package/dist/v1/schemas/task-item.d.ts +109 -113
- package/dist/v1/schemas/task-item.js +23 -23
- package/dist/v1/schemas/task.d.ts +58 -62
- package/dist/v1/schemas/task.js +2 -2
- package/dist/v1/schemas/theme.d.ts +110 -120
- package/dist/v1/schemas/theme.js +2 -2
- package/dist/v1/utils.js +4 -7
- package/package.json +1 -1
|
@@ -9,16 +9,16 @@ exports.taskItemValueMapSchema = zod_1.z
|
|
|
9
9
|
exports.pointOptionSchema = zod_1.z.object({
|
|
10
10
|
id: zod_1.z
|
|
11
11
|
.string()
|
|
12
|
-
.
|
|
12
|
+
.nullable()
|
|
13
13
|
.describe("Optional unique identifier for the point option"),
|
|
14
14
|
text: zod_1.z.string().describe("Display text for the point option"),
|
|
15
15
|
intro: zod_1.z
|
|
16
16
|
.string()
|
|
17
|
-
.
|
|
17
|
+
.nullable()
|
|
18
18
|
.describe("Optional introductory text for the point option"),
|
|
19
19
|
outro: zod_1.z
|
|
20
20
|
.string()
|
|
21
|
-
.
|
|
21
|
+
.nullable()
|
|
22
22
|
.describe("Optional concluding text for the point option"),
|
|
23
23
|
value: zod_1.z
|
|
24
24
|
.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null()])
|
|
@@ -28,10 +28,10 @@ const abstractDefinitionSchema = zod_1.z.object({
|
|
|
28
28
|
type: zod_1.z
|
|
29
29
|
.enum(["select-single", "select-multiple", "number", "boolean"])
|
|
30
30
|
.describe("The type of task item definition"),
|
|
31
|
-
label: zod_1.z.string().
|
|
31
|
+
label: zod_1.z.string().nullable().describe("Optional label for the task item"),
|
|
32
32
|
readOnly: zod_1.z
|
|
33
33
|
.boolean()
|
|
34
|
-
.
|
|
34
|
+
.nullable()
|
|
35
35
|
.describe("Whether the task item is read-only"),
|
|
36
36
|
});
|
|
37
37
|
exports.selectSingleTypeSchema = abstractDefinitionSchema.extend({
|
|
@@ -40,16 +40,16 @@ exports.selectSingleTypeSchema = abstractDefinitionSchema.extend({
|
|
|
40
40
|
.describe("Indicates a single-selection type task item"),
|
|
41
41
|
minimum: zod_1.z
|
|
42
42
|
.number()
|
|
43
|
-
.
|
|
43
|
+
.nullable()
|
|
44
44
|
.describe("Minimum value, used when treating this task item as an interpolation"),
|
|
45
45
|
maximum: zod_1.z
|
|
46
46
|
.number()
|
|
47
|
-
.
|
|
47
|
+
.nullable()
|
|
48
48
|
.describe("Maximum value, used when treating this task item as an interpolation"),
|
|
49
49
|
options: zod_1.z
|
|
50
50
|
.array(exports.pointOptionSchema)
|
|
51
51
|
.describe("Available options for selection"),
|
|
52
|
-
defaultValue: zod_1.z.string().
|
|
52
|
+
defaultValue: zod_1.z.string().nullable().describe("Default selected value"),
|
|
53
53
|
});
|
|
54
54
|
exports.selectMultipleTypeSchema = abstractDefinitionSchema.extend({
|
|
55
55
|
type: zod_1.z
|
|
@@ -57,29 +57,29 @@ exports.selectMultipleTypeSchema = abstractDefinitionSchema.extend({
|
|
|
57
57
|
.describe("Indicates a multiple-selection type task item"),
|
|
58
58
|
minimum: zod_1.z
|
|
59
59
|
.number()
|
|
60
|
-
.
|
|
60
|
+
.nullable()
|
|
61
61
|
.describe("Minimum value, used when treating this task item as an interpolation"),
|
|
62
62
|
maximum: zod_1.z
|
|
63
63
|
.number()
|
|
64
|
-
.
|
|
64
|
+
.nullable()
|
|
65
65
|
.describe("Maximum value, used when treating this task item as an interpolation"),
|
|
66
66
|
options: zod_1.z
|
|
67
67
|
.array(exports.pointOptionSchema)
|
|
68
68
|
.describe("Available options for selection"),
|
|
69
69
|
defaultValue: zod_1.z
|
|
70
70
|
.array(zod_1.z.string())
|
|
71
|
-
.
|
|
71
|
+
.nullable()
|
|
72
72
|
.describe("Default selected values"),
|
|
73
73
|
});
|
|
74
74
|
exports.numberTypeSchema = abstractDefinitionSchema.extend({
|
|
75
75
|
type: zod_1.z
|
|
76
76
|
.literal("number")
|
|
77
|
-
.
|
|
77
|
+
.nullable()
|
|
78
78
|
.describe("Indicates a numeric type task item"),
|
|
79
|
-
minimum: zod_1.z.number().
|
|
80
|
-
maximum: zod_1.z.number().
|
|
81
|
-
step: zod_1.z.number().
|
|
82
|
-
defaultValue: zod_1.z.number().
|
|
79
|
+
minimum: zod_1.z.number().nullable().describe("Minimum allowed value"),
|
|
80
|
+
maximum: zod_1.z.number().nullable().describe("Maximum allowed value"),
|
|
81
|
+
step: zod_1.z.number().nullable().describe("Step size for numeric input"),
|
|
82
|
+
defaultValue: zod_1.z.number().nullable().describe("Default numeric value"),
|
|
83
83
|
});
|
|
84
84
|
exports.booleanTypeSchema = abstractDefinitionSchema.extend({
|
|
85
85
|
type: zod_1.z.literal("boolean").describe("Indicates a boolean type task item"),
|
|
@@ -88,9 +88,9 @@ exports.booleanTypeSchema = abstractDefinitionSchema.extend({
|
|
|
88
88
|
true: zod_1.z.string().describe("Label for the true value"),
|
|
89
89
|
false: zod_1.z.string().describe("Label for the false value"),
|
|
90
90
|
})
|
|
91
|
-
.
|
|
91
|
+
.nullable()
|
|
92
92
|
.describe("Custom labels for boolean values"),
|
|
93
|
-
defaultValue: zod_1.z.boolean().
|
|
93
|
+
defaultValue: zod_1.z.boolean().nullable().describe("Default boolean value"),
|
|
94
94
|
});
|
|
95
95
|
exports.taskItemDefinitionSchema = zod_1.z
|
|
96
96
|
.discriminatedUnion("type", [
|
|
@@ -104,10 +104,10 @@ exports.taskItemDataSchema = common_1.elementDataSchema
|
|
|
104
104
|
.and(zod_1.z.object({
|
|
105
105
|
readOnly: zod_1.z
|
|
106
106
|
.boolean()
|
|
107
|
-
.
|
|
107
|
+
.nullable()
|
|
108
108
|
.describe("Whether the element value can be modified"),
|
|
109
109
|
valueReference: common_1.taskItemValueSchema
|
|
110
|
-
.
|
|
110
|
+
.nullable()
|
|
111
111
|
.describe("Reference to a task item value"),
|
|
112
112
|
}))
|
|
113
113
|
.describe("TaskItemData - The data associated with a task item");
|
|
@@ -115,7 +115,7 @@ exports.taskItemOptionsSchema = zod_1.z
|
|
|
115
115
|
.object({
|
|
116
116
|
excludeFromTargets: zod_1.z
|
|
117
117
|
.boolean()
|
|
118
|
-
.
|
|
118
|
+
.nullable()
|
|
119
119
|
.describe("Whether to exclude this task item from the targets page altogether"),
|
|
120
120
|
})
|
|
121
121
|
.describe("TaskItemOptions - Options for configuring the display and behavior of a task item");
|
|
@@ -126,12 +126,12 @@ exports.taskItemSchema = common_1.abstractElementSchema
|
|
|
126
126
|
.literal("task-item")
|
|
127
127
|
.describe("Identifies the schema type as a task item"),
|
|
128
128
|
data: exports.taskItemDataSchema
|
|
129
|
-
.
|
|
129
|
+
.nullable()
|
|
130
130
|
.describe("Additional data associated with the task item"),
|
|
131
131
|
definition: exports.taskItemDefinitionSchema.describe("The definition that specifies the type and behavior of the task item"),
|
|
132
132
|
description: zod_1.z
|
|
133
133
|
.string()
|
|
134
|
-
.
|
|
134
|
+
.nullable()
|
|
135
135
|
.describe("Additional detailed description of the task item"),
|
|
136
136
|
options: exports.taskItemOptionsSchema.describe("Configuration options for the task item display and behavior"),
|
|
137
137
|
});
|
|
@@ -2,18 +2,18 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const taskOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
3
3
|
breadcrumbTextFormat: z.ZodString;
|
|
4
4
|
documentTreeFolderTextFormat: z.ZodString;
|
|
5
|
-
showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.
|
|
5
|
+
showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
6
6
|
}, z.core.$strip>, z.ZodObject<{
|
|
7
7
|
criteriaTreeElementTextFormat: z.ZodString;
|
|
8
8
|
}, z.core.$strip>>, z.ZodObject<{
|
|
9
|
-
reportTitleTextFormat: z.
|
|
9
|
+
reportTitleTextFormat: z.ZodNullable<z.ZodString>;
|
|
10
10
|
}, z.core.$strip>>;
|
|
11
11
|
export declare const taskSchema: z.ZodObject<{
|
|
12
12
|
title: z.ZodString;
|
|
13
13
|
longFormTitle: z.ZodString;
|
|
14
14
|
code: z.ZodString;
|
|
15
|
-
tags: z.
|
|
16
|
-
documentation: z.
|
|
15
|
+
tags: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
16
|
+
documentation: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
17
|
label: z.ZodString;
|
|
18
18
|
text: z.ZodString;
|
|
19
19
|
type: z.ZodLiteral<"pdf">;
|
|
@@ -28,28 +28,26 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
28
28
|
type: z.ZodLiteral<"link">;
|
|
29
29
|
url: z.ZodString;
|
|
30
30
|
}, z.core.$strip>], "type">>>;
|
|
31
|
-
data: z.
|
|
32
|
-
type: z.
|
|
31
|
+
data: z.ZodNullable<z.ZodObject<{
|
|
32
|
+
type: z.ZodNullable<z.ZodEnum<{
|
|
33
33
|
number: "number";
|
|
34
34
|
boolean: "boolean";
|
|
35
35
|
percentage: "percentage";
|
|
36
36
|
}>>;
|
|
37
|
-
value: z.
|
|
38
|
-
text: z.
|
|
39
|
-
total: z.
|
|
40
|
-
maximumValue: z.
|
|
41
|
-
minimumValue: z.
|
|
42
|
-
|
|
43
|
-
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
44
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
value: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
|
|
38
|
+
text: z.ZodNullable<z.ZodString>;
|
|
39
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
41
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
42
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
45
43
|
}, z.core.$catchall<z.ZodAny>>>;
|
|
46
|
-
sortOrder: z.
|
|
44
|
+
sortOrder: z.ZodNullable<z.ZodNumber>;
|
|
47
45
|
type: z.ZodLiteral<"task">;
|
|
48
|
-
description: z.
|
|
46
|
+
description: z.ZodNullable<z.ZodString>;
|
|
49
47
|
items: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
50
48
|
code: z.ZodString;
|
|
51
|
-
tags: z.
|
|
52
|
-
documentation: z.
|
|
49
|
+
tags: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
50
|
+
documentation: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
51
|
label: z.ZodString;
|
|
54
52
|
text: z.ZodString;
|
|
55
53
|
type: z.ZodLiteral<"pdf">;
|
|
@@ -64,84 +62,82 @@ export declare const taskSchema: z.ZodObject<{
|
|
|
64
62
|
type: z.ZodLiteral<"link">;
|
|
65
63
|
url: z.ZodString;
|
|
66
64
|
}, z.core.$strip>], "type">>>;
|
|
67
|
-
sortOrder: z.
|
|
65
|
+
sortOrder: z.ZodNullable<z.ZodNumber>;
|
|
68
66
|
type: z.ZodLiteral<"task-item">;
|
|
69
|
-
data: z.
|
|
70
|
-
type: z.
|
|
67
|
+
data: z.ZodNullable<z.ZodIntersection<z.ZodObject<{
|
|
68
|
+
type: z.ZodNullable<z.ZodEnum<{
|
|
71
69
|
number: "number";
|
|
72
70
|
boolean: "boolean";
|
|
73
71
|
percentage: "percentage";
|
|
74
72
|
}>>;
|
|
75
|
-
value: z.
|
|
76
|
-
text: z.
|
|
77
|
-
total: z.
|
|
78
|
-
maximumValue: z.
|
|
79
|
-
minimumValue: z.
|
|
80
|
-
|
|
81
|
-
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
value: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
|
|
74
|
+
text: z.ZodNullable<z.ZodString>;
|
|
75
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
maximumValue: z.ZodNullable<z.ZodNumber>;
|
|
77
|
+
minimumValue: z.ZodNullable<z.ZodNumber>;
|
|
78
|
+
weight: z.ZodNullable<z.ZodNumber>;
|
|
83
79
|
}, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
|
|
84
|
-
readOnly: z.
|
|
85
|
-
valueReference: z.
|
|
80
|
+
readOnly: z.ZodNullable<z.ZodBoolean>;
|
|
81
|
+
valueReference: z.ZodNullable<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]>>]>>;
|
|
86
82
|
}, z.core.$strip>>>;
|
|
87
83
|
definition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
-
label: z.
|
|
89
|
-
readOnly: z.
|
|
84
|
+
label: z.ZodNullable<z.ZodString>;
|
|
85
|
+
readOnly: z.ZodNullable<z.ZodBoolean>;
|
|
90
86
|
type: z.ZodLiteral<"select-single">;
|
|
91
|
-
minimum: z.
|
|
92
|
-
maximum: z.
|
|
87
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
88
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
93
89
|
options: z.ZodArray<z.ZodObject<{
|
|
94
|
-
id: z.
|
|
90
|
+
id: z.ZodNullable<z.ZodString>;
|
|
95
91
|
text: z.ZodString;
|
|
96
|
-
intro: z.
|
|
97
|
-
outro: z.
|
|
92
|
+
intro: z.ZodNullable<z.ZodString>;
|
|
93
|
+
outro: z.ZodNullable<z.ZodString>;
|
|
98
94
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
99
95
|
}, z.core.$strip>>;
|
|
100
|
-
defaultValue: z.
|
|
96
|
+
defaultValue: z.ZodNullable<z.ZodString>;
|
|
101
97
|
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
-
label: z.
|
|
103
|
-
readOnly: z.
|
|
98
|
+
label: z.ZodNullable<z.ZodString>;
|
|
99
|
+
readOnly: z.ZodNullable<z.ZodBoolean>;
|
|
104
100
|
type: z.ZodLiteral<"select-multiple">;
|
|
105
|
-
minimum: z.
|
|
106
|
-
maximum: z.
|
|
101
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
107
103
|
options: z.ZodArray<z.ZodObject<{
|
|
108
|
-
id: z.
|
|
104
|
+
id: z.ZodNullable<z.ZodString>;
|
|
109
105
|
text: z.ZodString;
|
|
110
|
-
intro: z.
|
|
111
|
-
outro: z.
|
|
106
|
+
intro: z.ZodNullable<z.ZodString>;
|
|
107
|
+
outro: z.ZodNullable<z.ZodString>;
|
|
112
108
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
113
109
|
}, z.core.$strip>>;
|
|
114
|
-
defaultValue: z.
|
|
110
|
+
defaultValue: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
115
111
|
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
-
label: z.
|
|
117
|
-
readOnly: z.
|
|
118
|
-
type: z.
|
|
119
|
-
minimum: z.
|
|
120
|
-
maximum: z.
|
|
121
|
-
step: z.
|
|
122
|
-
defaultValue: z.
|
|
112
|
+
label: z.ZodNullable<z.ZodString>;
|
|
113
|
+
readOnly: z.ZodNullable<z.ZodBoolean>;
|
|
114
|
+
type: z.ZodNullable<z.ZodLiteral<"number">>;
|
|
115
|
+
minimum: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
maximum: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
step: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
defaultValue: z.ZodNullable<z.ZodNumber>;
|
|
123
119
|
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
-
label: z.
|
|
125
|
-
readOnly: z.
|
|
120
|
+
label: z.ZodNullable<z.ZodString>;
|
|
121
|
+
readOnly: z.ZodNullable<z.ZodBoolean>;
|
|
126
122
|
type: z.ZodLiteral<"boolean">;
|
|
127
|
-
labels: z.
|
|
123
|
+
labels: z.ZodNullable<z.ZodObject<{
|
|
128
124
|
true: z.ZodString;
|
|
129
125
|
false: z.ZodString;
|
|
130
126
|
}, z.core.$strip>>;
|
|
131
|
-
defaultValue: z.
|
|
127
|
+
defaultValue: z.ZodNullable<z.ZodBoolean>;
|
|
132
128
|
}, z.core.$strip>], "type">;
|
|
133
|
-
description: z.
|
|
129
|
+
description: z.ZodNullable<z.ZodString>;
|
|
134
130
|
options: z.ZodObject<{
|
|
135
|
-
excludeFromTargets: z.
|
|
131
|
+
excludeFromTargets: z.ZodNullable<z.ZodBoolean>;
|
|
136
132
|
}, z.core.$strip>;
|
|
137
133
|
}, z.core.$strip>>>;
|
|
138
134
|
options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
|
139
135
|
breadcrumbTextFormat: z.ZodString;
|
|
140
136
|
documentTreeFolderTextFormat: z.ZodString;
|
|
141
|
-
showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.
|
|
137
|
+
showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
142
138
|
}, z.core.$strip>, z.ZodObject<{
|
|
143
139
|
criteriaTreeElementTextFormat: z.ZodString;
|
|
144
140
|
}, z.core.$strip>>, z.ZodObject<{
|
|
145
|
-
reportTitleTextFormat: z.
|
|
141
|
+
reportTitleTextFormat: z.ZodNullable<z.ZodString>;
|
|
146
142
|
}, z.core.$strip>>;
|
|
147
143
|
}, z.core.$strip>;
|
package/dist/v1/schemas/task.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.taskOptionsSchema = zod_1.z
|
|
|
14
14
|
.describe("The format of the document tree folder text, use ':code:' and ':title:' to define where the code and/or title should be inserted"),
|
|
15
15
|
showCodeAsIndicatorTaskViewTitle: zod_1.z
|
|
16
16
|
.boolean()
|
|
17
|
-
.
|
|
17
|
+
.nullable()
|
|
18
18
|
.default(false)
|
|
19
19
|
.describe("Whether the title of the indicator task view should show the task code, or the hardcoded description text"),
|
|
20
20
|
})
|
|
@@ -25,7 +25,7 @@ exports.taskSchema = common_1.abstractElementSchema.extend({
|
|
|
25
25
|
type: zod_1.z.literal("task").describe("Identifies the schema type as a task"),
|
|
26
26
|
description: zod_1.z
|
|
27
27
|
.string()
|
|
28
|
-
.
|
|
28
|
+
.nullable()
|
|
29
29
|
.describe("Additional detailed description of the task"),
|
|
30
30
|
items: zod_1.z
|
|
31
31
|
.array(zod_1.z.lazy(() => task_item_1.taskItemSchema))
|