@openframe-org/criteria-set-protocol 2.5.0 → 3.0.0-alpha.1

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.
@@ -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
- .optional()
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
- .optional()
17
+ .nullable()
18
18
  .describe("Optional introductory text for the point option"),
19
19
  outro: zod_1.z
20
20
  .string()
21
- .optional()
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().optional().describe("Optional label for the task item"),
31
+ label: zod_1.z.string().nullable().describe("Optional label for the task item"),
32
32
  readOnly: zod_1.z
33
33
  .boolean()
34
- .optional()
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
- .optional()
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
- .optional()
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().optional().describe("Default selected value"),
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
- .optional()
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
- .optional()
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
- .optional()
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
- .optional()
77
+ .nullable()
78
78
  .describe("Indicates a numeric type task item"),
79
- minimum: zod_1.z.number().optional().describe("Minimum allowed value"),
80
- maximum: zod_1.z.number().optional().describe("Maximum allowed value"),
81
- step: zod_1.z.number().optional().describe("Step size for numeric input"),
82
- defaultValue: zod_1.z.number().optional().describe("Default numeric value"),
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
- .optional()
91
+ .nullable()
92
92
  .describe("Custom labels for boolean values"),
93
- defaultValue: zod_1.z.boolean().optional().describe("Default boolean value"),
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
- .optional()
107
+ .nullable()
108
108
  .describe("Whether the element value can be modified"),
109
109
  valueReference: common_1.taskItemValueSchema
110
- .optional()
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
- .optional()
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
- .optional()
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
- .optional()
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.ZodOptional<z.ZodBoolean>>;
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.ZodOptional<z.ZodString>;
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.ZodOptional<z.ZodArray<z.ZodString>>;
16
- documentation: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
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,28 @@ 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.ZodOptional<z.ZodObject<{
32
- type: z.ZodOptional<z.ZodEnum<{
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.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
38
- text: z.ZodOptional<z.ZodString>;
39
- total: z.ZodOptional<z.ZodNumber>;
40
- maximumValue: z.ZodOptional<z.ZodNumber>;
41
- minimumValue: z.ZodOptional<z.ZodNumber>;
42
- exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
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
+ exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
43
+ exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
44
+ weight: z.ZodNullable<z.ZodNumber>;
45
45
  }, z.core.$catchall<z.ZodAny>>>;
46
- sortOrder: z.ZodOptional<z.ZodNumber>;
46
+ sortOrder: z.ZodNullable<z.ZodNumber>;
47
47
  type: z.ZodLiteral<"task">;
48
- description: z.ZodOptional<z.ZodString>;
48
+ description: z.ZodNullable<z.ZodString>;
49
49
  items: z.ZodArray<z.ZodLazy<z.ZodObject<{
50
50
  code: z.ZodString;
51
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
- documentation: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
51
+ tags: z.ZodNullable<z.ZodArray<z.ZodString>>;
52
+ documentation: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
53
53
  label: z.ZodString;
54
54
  text: z.ZodString;
55
55
  type: z.ZodLiteral<"pdf">;
@@ -64,84 +64,84 @@ export declare const taskSchema: z.ZodObject<{
64
64
  type: z.ZodLiteral<"link">;
65
65
  url: z.ZodString;
66
66
  }, z.core.$strip>], "type">>>;
67
- sortOrder: z.ZodOptional<z.ZodNumber>;
67
+ sortOrder: z.ZodNullable<z.ZodNumber>;
68
68
  type: z.ZodLiteral<"task-item">;
69
- data: z.ZodOptional<z.ZodIntersection<z.ZodObject<{
70
- type: z.ZodOptional<z.ZodEnum<{
69
+ data: z.ZodNullable<z.ZodIntersection<z.ZodObject<{
70
+ type: z.ZodNullable<z.ZodEnum<{
71
71
  number: "number";
72
72
  boolean: "boolean";
73
73
  percentage: "percentage";
74
74
  }>>;
75
- value: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
76
- text: z.ZodOptional<z.ZodString>;
77
- total: z.ZodOptional<z.ZodNumber>;
78
- maximumValue: z.ZodOptional<z.ZodNumber>;
79
- minimumValue: z.ZodOptional<z.ZodNumber>;
80
- exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
81
- exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
82
- weight: z.ZodOptional<z.ZodNumber>;
75
+ value: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodBoolean]>>;
76
+ text: z.ZodNullable<z.ZodString>;
77
+ total: z.ZodNullable<z.ZodNumber>;
78
+ maximumValue: z.ZodNullable<z.ZodNumber>;
79
+ minimumValue: z.ZodNullable<z.ZodNumber>;
80
+ exclusiveMaximum: z.ZodNullable<z.ZodNumber>;
81
+ exclusiveMinimum: z.ZodNullable<z.ZodNumber>;
82
+ weight: z.ZodNullable<z.ZodNumber>;
83
83
  }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
84
- readOnly: z.ZodOptional<z.ZodBoolean>;
85
- valueReference: z.ZodOptional<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]>>]>>;
84
+ readOnly: z.ZodNullable<z.ZodBoolean>;
85
+ 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
86
  }, z.core.$strip>>>;
87
87
  definition: z.ZodDiscriminatedUnion<[z.ZodObject<{
88
- label: z.ZodOptional<z.ZodString>;
89
- readOnly: z.ZodOptional<z.ZodBoolean>;
88
+ label: z.ZodNullable<z.ZodString>;
89
+ readOnly: z.ZodNullable<z.ZodBoolean>;
90
90
  type: z.ZodLiteral<"select-single">;
91
- minimum: z.ZodOptional<z.ZodNumber>;
92
- maximum: z.ZodOptional<z.ZodNumber>;
91
+ minimum: z.ZodNullable<z.ZodNumber>;
92
+ maximum: z.ZodNullable<z.ZodNumber>;
93
93
  options: z.ZodArray<z.ZodObject<{
94
- id: z.ZodOptional<z.ZodString>;
94
+ id: z.ZodNullable<z.ZodString>;
95
95
  text: z.ZodString;
96
- intro: z.ZodOptional<z.ZodString>;
97
- outro: z.ZodOptional<z.ZodString>;
96
+ intro: z.ZodNullable<z.ZodString>;
97
+ outro: z.ZodNullable<z.ZodString>;
98
98
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
99
99
  }, z.core.$strip>>;
100
- defaultValue: z.ZodOptional<z.ZodString>;
100
+ defaultValue: z.ZodNullable<z.ZodString>;
101
101
  }, z.core.$strip>, z.ZodObject<{
102
- label: z.ZodOptional<z.ZodString>;
103
- readOnly: z.ZodOptional<z.ZodBoolean>;
102
+ label: z.ZodNullable<z.ZodString>;
103
+ readOnly: z.ZodNullable<z.ZodBoolean>;
104
104
  type: z.ZodLiteral<"select-multiple">;
105
- minimum: z.ZodOptional<z.ZodNumber>;
106
- maximum: z.ZodOptional<z.ZodNumber>;
105
+ minimum: z.ZodNullable<z.ZodNumber>;
106
+ maximum: z.ZodNullable<z.ZodNumber>;
107
107
  options: z.ZodArray<z.ZodObject<{
108
- id: z.ZodOptional<z.ZodString>;
108
+ id: z.ZodNullable<z.ZodString>;
109
109
  text: z.ZodString;
110
- intro: z.ZodOptional<z.ZodString>;
111
- outro: z.ZodOptional<z.ZodString>;
110
+ intro: z.ZodNullable<z.ZodString>;
111
+ outro: z.ZodNullable<z.ZodString>;
112
112
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
113
113
  }, z.core.$strip>>;
114
- defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ defaultValue: z.ZodNullable<z.ZodArray<z.ZodString>>;
115
115
  }, z.core.$strip>, z.ZodObject<{
116
- label: z.ZodOptional<z.ZodString>;
117
- readOnly: z.ZodOptional<z.ZodBoolean>;
118
- type: z.ZodOptional<z.ZodLiteral<"number">>;
119
- minimum: z.ZodOptional<z.ZodNumber>;
120
- maximum: z.ZodOptional<z.ZodNumber>;
121
- step: z.ZodOptional<z.ZodNumber>;
122
- defaultValue: z.ZodOptional<z.ZodNumber>;
116
+ label: z.ZodNullable<z.ZodString>;
117
+ readOnly: z.ZodNullable<z.ZodBoolean>;
118
+ type: z.ZodNullable<z.ZodLiteral<"number">>;
119
+ minimum: z.ZodNullable<z.ZodNumber>;
120
+ maximum: z.ZodNullable<z.ZodNumber>;
121
+ step: z.ZodNullable<z.ZodNumber>;
122
+ defaultValue: z.ZodNullable<z.ZodNumber>;
123
123
  }, z.core.$strip>, z.ZodObject<{
124
- label: z.ZodOptional<z.ZodString>;
125
- readOnly: z.ZodOptional<z.ZodBoolean>;
124
+ label: z.ZodNullable<z.ZodString>;
125
+ readOnly: z.ZodNullable<z.ZodBoolean>;
126
126
  type: z.ZodLiteral<"boolean">;
127
- labels: z.ZodOptional<z.ZodObject<{
127
+ labels: z.ZodNullable<z.ZodObject<{
128
128
  true: z.ZodString;
129
129
  false: z.ZodString;
130
130
  }, z.core.$strip>>;
131
- defaultValue: z.ZodOptional<z.ZodBoolean>;
131
+ defaultValue: z.ZodNullable<z.ZodBoolean>;
132
132
  }, z.core.$strip>], "type">;
133
- description: z.ZodOptional<z.ZodString>;
133
+ description: z.ZodNullable<z.ZodString>;
134
134
  options: z.ZodObject<{
135
- excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
135
+ excludeFromTargets: z.ZodNullable<z.ZodBoolean>;
136
136
  }, z.core.$strip>;
137
137
  }, z.core.$strip>>>;
138
138
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
139
139
  breadcrumbTextFormat: z.ZodString;
140
140
  documentTreeFolderTextFormat: z.ZodString;
141
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
141
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
142
142
  }, z.core.$strip>, z.ZodObject<{
143
143
  criteriaTreeElementTextFormat: z.ZodString;
144
144
  }, z.core.$strip>>, z.ZodObject<{
145
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
145
+ reportTitleTextFormat: z.ZodNullable<z.ZodString>;
146
146
  }, z.core.$strip>>;
147
147
  }, z.core.$strip>;
@@ -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
- .optional()
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
- .optional()
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))