@openframe-org/criteria-set-protocol 3.0.0-alpha.11 → 3.0.0-alpha.12

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.
@@ -90,7 +90,7 @@ export declare const breadcrumbOptionsSchema: z.ZodUnion<[z.ZodObject<{
90
90
  hideFromBreadcrumbs: z.ZodLiteral<true>;
91
91
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
92
92
  }, z.core.$strip>, z.ZodObject<{
93
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
93
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
94
94
  breadcrumbTextFormat: z.ZodString;
95
95
  }, z.core.$strip>]>;
96
96
  export declare const documentTreeOptionsSchema: z.ZodUnion<[z.ZodObject<{
@@ -90,7 +90,7 @@ exports.breadcrumbOptionsSchema = zod_1.z
90
90
  .or(zod_1.z.object({
91
91
  hideFromBreadcrumbs: zod_1.z
92
92
  .literal(false)
93
- .nullable()
93
+ .optional()
94
94
  .default(false)
95
95
  .describe("Whether to hide the element from the breadcrumbs"),
96
96
  breadcrumbTextFormat: zod_1.z
@@ -286,7 +286,7 @@ export declare const criteriaTreeSchema: z.ZodObject<{
286
286
  }, z.core.$strip>, z.ZodObject<{
287
287
  label: z.ZodNullable<z.ZodString>;
288
288
  readOnly: z.ZodNullable<z.ZodBoolean>;
289
- type: z.ZodNullable<z.ZodLiteral<"number">>;
289
+ type: z.ZodLiteral<"number">;
290
290
  minimum: z.ZodNullable<z.ZodNumber>;
291
291
  maximum: z.ZodNullable<z.ZodNumber>;
292
292
  step: z.ZodNullable<z.ZodNumber>;
@@ -309,7 +309,7 @@ export declare const criteriaTreeSchema: z.ZodObject<{
309
309
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
310
310
  breadcrumbTextFormat: z.ZodString;
311
311
  documentTreeFolderTextFormat: z.ZodString;
312
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
312
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
313
313
  }, z.core.$strip>, z.ZodObject<{
314
314
  criteriaTreeElementTextFormat: z.ZodString;
315
315
  }, z.core.$strip>>, z.ZodObject<{
@@ -318,12 +318,12 @@ export declare const criteriaTreeSchema: z.ZodObject<{
318
318
  }, z.core.$strip>>>;
319
319
  }, z.core.$strip>>>;
320
320
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
321
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
321
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
322
322
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
323
323
  hideFromBreadcrumbs: z.ZodLiteral<true>;
324
324
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
325
325
  }, z.core.$strip>, z.ZodObject<{
326
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
326
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
327
327
  breadcrumbTextFormat: z.ZodString;
328
328
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
329
329
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -338,12 +338,12 @@ export declare const criteriaTreeSchema: z.ZodObject<{
338
338
  }, z.core.$strip>>;
339
339
  }, z.core.$strip>>;
340
340
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
341
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
341
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
342
342
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
343
343
  hideFromBreadcrumbs: z.ZodLiteral<true>;
344
344
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
345
345
  }, z.core.$strip>, z.ZodObject<{
346
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
346
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
347
347
  breadcrumbTextFormat: z.ZodString;
348
348
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
349
349
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -670,7 +670,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
670
670
  }, z.core.$strip>, z.ZodObject<{
671
671
  label: z.ZodNullable<z.ZodString>;
672
672
  readOnly: z.ZodNullable<z.ZodBoolean>;
673
- type: z.ZodNullable<z.ZodLiteral<"number">>;
673
+ type: z.ZodLiteral<"number">;
674
674
  minimum: z.ZodNullable<z.ZodNumber>;
675
675
  maximum: z.ZodNullable<z.ZodNumber>;
676
676
  step: z.ZodNullable<z.ZodNumber>;
@@ -693,7 +693,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
693
693
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
694
694
  breadcrumbTextFormat: z.ZodString;
695
695
  documentTreeFolderTextFormat: z.ZodString;
696
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
696
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
697
697
  }, z.core.$strip>, z.ZodObject<{
698
698
  criteriaTreeElementTextFormat: z.ZodString;
699
699
  }, z.core.$strip>>, z.ZodObject<{
@@ -702,12 +702,12 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
702
702
  }, z.core.$strip>>>;
703
703
  }, z.core.$strip>>>;
704
704
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
705
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
705
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
706
706
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
707
707
  hideFromBreadcrumbs: z.ZodLiteral<true>;
708
708
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
709
709
  }, z.core.$strip>, z.ZodObject<{
710
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
710
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
711
711
  breadcrumbTextFormat: z.ZodString;
712
712
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
713
713
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -722,12 +722,12 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
722
722
  }, z.core.$strip>>;
723
723
  }, z.core.$strip>>;
724
724
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
725
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
725
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
726
726
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
727
727
  hideFromBreadcrumbs: z.ZodLiteral<true>;
728
728
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
729
729
  }, z.core.$strip>, z.ZodObject<{
730
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
730
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
731
731
  breadcrumbTextFormat: z.ZodString;
732
732
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
733
733
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -949,7 +949,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
949
949
  }, z.core.$strip>, z.ZodObject<{
950
950
  label: z.ZodNullable<z.ZodString>;
951
951
  readOnly: z.ZodNullable<z.ZodBoolean>;
952
- type: z.ZodNullable<z.ZodLiteral<"number">>;
952
+ type: z.ZodLiteral<"number">;
953
953
  minimum: z.ZodNullable<z.ZodNumber>;
954
954
  maximum: z.ZodNullable<z.ZodNumber>;
955
955
  step: z.ZodNullable<z.ZodNumber>;
@@ -972,7 +972,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
972
972
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
973
973
  breadcrumbTextFormat: z.ZodString;
974
974
  documentTreeFolderTextFormat: z.ZodString;
975
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
975
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
976
976
  }, z.core.$strip>, z.ZodObject<{
977
977
  criteriaTreeElementTextFormat: z.ZodString;
978
978
  }, z.core.$strip>>, z.ZodObject<{
@@ -981,12 +981,12 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
981
981
  }, z.core.$strip>>>;
982
982
  }, z.core.$strip>>>;
983
983
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
984
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
984
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
985
985
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
986
986
  hideFromBreadcrumbs: z.ZodLiteral<true>;
987
987
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
988
988
  }, z.core.$strip>, z.ZodObject<{
989
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
989
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
990
990
  breadcrumbTextFormat: z.ZodString;
991
991
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
992
992
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -1166,7 +1166,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1166
1166
  }, z.core.$strip>, z.ZodObject<{
1167
1167
  label: z.ZodNullable<z.ZodString>;
1168
1168
  readOnly: z.ZodNullable<z.ZodBoolean>;
1169
- type: z.ZodNullable<z.ZodLiteral<"number">>;
1169
+ type: z.ZodLiteral<"number">;
1170
1170
  minimum: z.ZodNullable<z.ZodNumber>;
1171
1171
  maximum: z.ZodNullable<z.ZodNumber>;
1172
1172
  step: z.ZodNullable<z.ZodNumber>;
@@ -1189,7 +1189,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1189
1189
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1190
1190
  breadcrumbTextFormat: z.ZodString;
1191
1191
  documentTreeFolderTextFormat: z.ZodString;
1192
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1192
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1193
1193
  }, z.core.$strip>, z.ZodObject<{
1194
1194
  criteriaTreeElementTextFormat: z.ZodString;
1195
1195
  }, z.core.$strip>>, z.ZodObject<{
@@ -1317,7 +1317,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1317
1317
  }, z.core.$strip>, z.ZodObject<{
1318
1318
  label: z.ZodNullable<z.ZodString>;
1319
1319
  readOnly: z.ZodNullable<z.ZodBoolean>;
1320
- type: z.ZodNullable<z.ZodLiteral<"number">>;
1320
+ type: z.ZodLiteral<"number">;
1321
1321
  minimum: z.ZodNullable<z.ZodNumber>;
1322
1322
  maximum: z.ZodNullable<z.ZodNumber>;
1323
1323
  step: z.ZodNullable<z.ZodNumber>;
@@ -1340,7 +1340,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1340
1340
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1341
1341
  breadcrumbTextFormat: z.ZodString;
1342
1342
  documentTreeFolderTextFormat: z.ZodString;
1343
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
1343
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1344
1344
  }, z.core.$strip>, z.ZodObject<{
1345
1345
  criteriaTreeElementTextFormat: z.ZodString;
1346
1346
  }, z.core.$strip>>, z.ZodObject<{
@@ -1422,7 +1422,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1422
1422
  }, z.core.$strip>, z.ZodObject<{
1423
1423
  label: z.ZodNullable<z.ZodString>;
1424
1424
  readOnly: z.ZodNullable<z.ZodBoolean>;
1425
- type: z.ZodNullable<z.ZodLiteral<"number">>;
1425
+ type: z.ZodLiteral<"number">;
1426
1426
  minimum: z.ZodNullable<z.ZodNumber>;
1427
1427
  maximum: z.ZodNullable<z.ZodNumber>;
1428
1428
  step: z.ZodNullable<z.ZodNumber>;
@@ -1,11 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export declare const criterionOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
3
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
3
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4
4
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
5
5
  hideFromBreadcrumbs: z.ZodLiteral<true>;
6
6
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
7
7
  }, z.core.$strip>, z.ZodObject<{
8
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
8
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
9
9
  breadcrumbTextFormat: z.ZodString;
10
10
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
11
11
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -229,7 +229,7 @@ export declare const criterionSchema: z.ZodObject<{
229
229
  }, z.core.$strip>, z.ZodObject<{
230
230
  label: z.ZodNullable<z.ZodString>;
231
231
  readOnly: z.ZodNullable<z.ZodBoolean>;
232
- type: z.ZodNullable<z.ZodLiteral<"number">>;
232
+ type: z.ZodLiteral<"number">;
233
233
  minimum: z.ZodNullable<z.ZodNumber>;
234
234
  maximum: z.ZodNullable<z.ZodNumber>;
235
235
  step: z.ZodNullable<z.ZodNumber>;
@@ -252,7 +252,7 @@ export declare const criterionSchema: z.ZodObject<{
252
252
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
253
253
  breadcrumbTextFormat: z.ZodString;
254
254
  documentTreeFolderTextFormat: z.ZodString;
255
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
255
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
256
256
  }, z.core.$strip>, z.ZodObject<{
257
257
  criteriaTreeElementTextFormat: z.ZodString;
258
258
  }, z.core.$strip>>, z.ZodObject<{
@@ -261,12 +261,12 @@ export declare const criterionSchema: z.ZodObject<{
261
261
  }, z.core.$strip>>>;
262
262
  }, z.core.$strip>>>;
263
263
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
264
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
264
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
265
265
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
266
266
  hideFromBreadcrumbs: z.ZodLiteral<true>;
267
267
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
268
268
  }, z.core.$strip>, z.ZodObject<{
269
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
269
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
270
270
  breadcrumbTextFormat: z.ZodString;
271
271
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
272
272
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -8,7 +8,7 @@ exports.criterionOptionsSchema = zod_1.z
8
8
  .object({
9
9
  hideCodeInReport: zod_1.z
10
10
  .boolean()
11
- .nullable()
11
+ .optional()
12
12
  .default(false)
13
13
  .describe("Whether to hide the criterion code in the generated PDF report"),
14
14
  })
@@ -3,7 +3,6 @@ import { z } from "zod";
3
3
  * Validates the request body for the matrix endpoints
4
4
  */
5
5
  export declare const matrixRequestBodySchema: z.ZodNullable<z.ZodObject<{
6
- locale: z.ZodNullable<z.ZodString>;
7
6
  parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
8
7
  values: z.ZodNullable<z.ZodRecord<z.ZodString, 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
8
  additional: z.ZodNullable<z.ZodAny>;
@@ -8,10 +8,6 @@ const task_item_1 = require("../task-item");
8
8
  */
9
9
  exports.matrixRequestBodySchema = zod_1.z
10
10
  .object({
11
- locale: zod_1.z
12
- .string()
13
- .nullable()
14
- .describe("Locale to be passed when generating the matrix"),
15
11
  parameters: zod_1.z
16
12
  .record(zod_1.z.string(), zod_1.z.any())
17
13
  .nullable()
@@ -3,7 +3,6 @@ import { z } from "zod";
3
3
  * Validates the request body for the tree and data endpoints
4
4
  */
5
5
  export declare const treeAndDataRequestBodySchema: z.ZodNullable<z.ZodObject<{
6
- locale: z.ZodNullable<z.ZodString>;
7
6
  parameters: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
8
7
  values: z.ZodNullable<z.ZodRecord<z.ZodString, 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
8
  }, z.core.$strip>>;
@@ -8,17 +8,13 @@ const task_item_1 = require("../task-item");
8
8
  */
9
9
  exports.treeAndDataRequestBodySchema = zod_1.z
10
10
  .object({
11
- locale: zod_1.z
12
- .string()
13
- .nullable()
14
- .describe("Locale to be passed when generating the matrix"),
15
11
  parameters: zod_1.z
16
12
  .record(zod_1.z.string(), zod_1.z.any())
17
13
  .nullable()
18
- .describe("Parameters to be passed when generating the matrix"),
14
+ .describe("Parameters to be passed when processing the tree"),
19
15
  values: task_item_1.taskItemValueMapSchema
20
16
  .nullable()
21
- .describe("Values to be passed when generating the matrix"),
17
+ .describe("Values to be passed when processing the tree"),
22
18
  })
23
19
  .nullable()
24
20
  .describe("TreeAndDataRequestBody - The request body for tree and data endpoints");
@@ -166,7 +166,7 @@ export declare const taskGroupSchema: z.ZodObject<{
166
166
  }, z.core.$strip>, z.ZodObject<{
167
167
  label: z.ZodNullable<z.ZodString>;
168
168
  readOnly: z.ZodNullable<z.ZodBoolean>;
169
- type: z.ZodNullable<z.ZodLiteral<"number">>;
169
+ type: z.ZodLiteral<"number">;
170
170
  minimum: z.ZodNullable<z.ZodNumber>;
171
171
  maximum: z.ZodNullable<z.ZodNumber>;
172
172
  step: z.ZodNullable<z.ZodNumber>;
@@ -189,7 +189,7 @@ export declare const taskGroupSchema: z.ZodObject<{
189
189
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
190
190
  breadcrumbTextFormat: z.ZodString;
191
191
  documentTreeFolderTextFormat: z.ZodString;
192
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
192
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
193
193
  }, z.core.$strip>, z.ZodObject<{
194
194
  criteriaTreeElementTextFormat: z.ZodString;
195
195
  }, z.core.$strip>>, z.ZodObject<{
@@ -40,7 +40,7 @@ export declare const selectMultipleTypeSchema: z.ZodObject<{
40
40
  export declare const numberTypeSchema: z.ZodObject<{
41
41
  label: z.ZodNullable<z.ZodString>;
42
42
  readOnly: z.ZodNullable<z.ZodBoolean>;
43
- type: z.ZodNullable<z.ZodLiteral<"number">>;
43
+ type: z.ZodLiteral<"number">;
44
44
  minimum: z.ZodNullable<z.ZodNumber>;
45
45
  maximum: z.ZodNullable<z.ZodNumber>;
46
46
  step: z.ZodNullable<z.ZodNumber>;
@@ -87,7 +87,7 @@ export declare const taskItemDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObj
87
87
  }, z.core.$strip>, z.ZodObject<{
88
88
  label: z.ZodNullable<z.ZodString>;
89
89
  readOnly: z.ZodNullable<z.ZodBoolean>;
90
- type: z.ZodNullable<z.ZodLiteral<"number">>;
90
+ type: z.ZodLiteral<"number">;
91
91
  minimum: z.ZodNullable<z.ZodNumber>;
92
92
  maximum: z.ZodNullable<z.ZodNumber>;
93
93
  step: z.ZodNullable<z.ZodNumber>;
@@ -206,7 +206,7 @@ export declare const taskItemSchema: z.ZodObject<{
206
206
  }, z.core.$strip>, z.ZodObject<{
207
207
  label: z.ZodNullable<z.ZodString>;
208
208
  readOnly: z.ZodNullable<z.ZodBoolean>;
209
- type: z.ZodNullable<z.ZodLiteral<"number">>;
209
+ type: z.ZodLiteral<"number">;
210
210
  minimum: z.ZodNullable<z.ZodNumber>;
211
211
  maximum: z.ZodNullable<z.ZodNumber>;
212
212
  step: z.ZodNullable<z.ZodNumber>;
@@ -74,7 +74,6 @@ exports.selectMultipleTypeSchema = abstractDefinitionSchema.extend({
74
74
  exports.numberTypeSchema = abstractDefinitionSchema.extend({
75
75
  type: zod_1.z
76
76
  .literal("number")
77
- .nullable()
78
77
  .describe("Indicates a numeric type task item"),
79
78
  minimum: zod_1.z.number().nullable().describe("Minimum allowed value"),
80
79
  maximum: zod_1.z.number().nullable().describe("Maximum allowed value"),
@@ -2,7 +2,7 @@ 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.ZodNullable<z.ZodBoolean>>;
5
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6
6
  }, z.core.$strip>, z.ZodObject<{
7
7
  criteriaTreeElementTextFormat: z.ZodString;
8
8
  }, z.core.$strip>>, z.ZodObject<{
@@ -129,7 +129,7 @@ export declare const taskSchema: z.ZodObject<{
129
129
  }, z.core.$strip>, z.ZodObject<{
130
130
  label: z.ZodNullable<z.ZodString>;
131
131
  readOnly: z.ZodNullable<z.ZodBoolean>;
132
- type: z.ZodNullable<z.ZodLiteral<"number">>;
132
+ type: z.ZodLiteral<"number">;
133
133
  minimum: z.ZodNullable<z.ZodNumber>;
134
134
  maximum: z.ZodNullable<z.ZodNumber>;
135
135
  step: z.ZodNullable<z.ZodNumber>;
@@ -152,7 +152,7 @@ export declare const taskSchema: z.ZodObject<{
152
152
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
153
153
  breadcrumbTextFormat: z.ZodString;
154
154
  documentTreeFolderTextFormat: z.ZodString;
155
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
155
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
156
156
  }, z.core.$strip>, z.ZodObject<{
157
157
  criteriaTreeElementTextFormat: z.ZodString;
158
158
  }, z.core.$strip>>, z.ZodObject<{
@@ -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
- .nullable()
17
+ .optional()
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
  })
@@ -12,12 +12,12 @@ export declare const themeStyleSchema: z.ZodObject<{
12
12
  }, z.core.$strip>]>;
13
13
  }, z.core.$strip>;
14
14
  export declare const themeOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
15
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
15
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
16
16
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
17
17
  hideFromBreadcrumbs: z.ZodLiteral<true>;
18
18
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
19
19
  }, z.core.$strip>, z.ZodObject<{
20
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
20
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
21
21
  breadcrumbTextFormat: z.ZodString;
22
22
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
23
23
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -295,7 +295,7 @@ export declare const themeSchema: z.ZodObject<{
295
295
  }, z.core.$strip>, z.ZodObject<{
296
296
  label: z.ZodNullable<z.ZodString>;
297
297
  readOnly: z.ZodNullable<z.ZodBoolean>;
298
- type: z.ZodNullable<z.ZodLiteral<"number">>;
298
+ type: z.ZodLiteral<"number">;
299
299
  minimum: z.ZodNullable<z.ZodNumber>;
300
300
  maximum: z.ZodNullable<z.ZodNumber>;
301
301
  step: z.ZodNullable<z.ZodNumber>;
@@ -318,7 +318,7 @@ export declare const themeSchema: z.ZodObject<{
318
318
  options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
319
319
  breadcrumbTextFormat: z.ZodString;
320
320
  documentTreeFolderTextFormat: z.ZodString;
321
- showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
321
+ showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
322
322
  }, z.core.$strip>, z.ZodObject<{
323
323
  criteriaTreeElementTextFormat: z.ZodString;
324
324
  }, z.core.$strip>>, z.ZodObject<{
@@ -327,12 +327,12 @@ export declare const themeSchema: z.ZodObject<{
327
327
  }, z.core.$strip>>>;
328
328
  }, z.core.$strip>>>;
329
329
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
330
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
330
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
331
331
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
332
332
  hideFromBreadcrumbs: z.ZodLiteral<true>;
333
333
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
334
334
  }, z.core.$strip>, z.ZodObject<{
335
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
335
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
336
336
  breadcrumbTextFormat: z.ZodString;
337
337
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
338
338
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -347,12 +347,12 @@ export declare const themeSchema: z.ZodObject<{
347
347
  }, z.core.$strip>>;
348
348
  }, z.core.$strip>>;
349
349
  options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
350
- hideCodeInReport: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
350
+ hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
351
351
  }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
352
352
  hideFromBreadcrumbs: z.ZodLiteral<true>;
353
353
  breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
354
354
  }, z.core.$strip>, z.ZodObject<{
355
- hideFromBreadcrumbs: z.ZodDefault<z.ZodNullable<z.ZodLiteral<false>>>;
355
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
356
356
  breadcrumbTextFormat: z.ZodString;
357
357
  }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
358
358
  hideFromDocumentTree: z.ZodLiteral<true>;
@@ -14,7 +14,7 @@ exports.themeOptionsSchema = zod_1.z
14
14
  .object({
15
15
  hideCodeInReport: zod_1.z
16
16
  .boolean()
17
- .nullable()
17
+ .optional()
18
18
  .default(false)
19
19
  .describe("Whether to hide the theme code in the generated PDF report"),
20
20
  })
@@ -2,7 +2,6 @@ import { CriteriaTree, Metadata, DataMap, StreamMatrixResponse, TaskItemValueMap
2
2
  export type TreeAndMapParameters<ParametersType extends Record<string, any> | undefined = undefined> = {
3
3
  parameters: ParametersType extends undefined ? undefined : ParametersType;
4
4
  values?: TaskItemValueMap | null;
5
- locale?: string | null;
6
5
  };
7
6
  export type MatrixParameters<ParametersType extends Record<string, any> | undefined = undefined> = TreeAndMapParameters<ParametersType> & {
8
7
  additional?: any;
package/dist/v1/utils.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCertificationsByValue = exports.applyReportTitleTextFormatFormattingPlaceholders = exports.applyCriteriaTreeElementTextFormatFormattingPlaceholders = exports.applyDocumentTreeFolderTextFormattingPlaceholders = exports.applyBreadcrumbTextFormattingPlaceholders = exports.findInTree = exports.toColorHexString = exports.isTaskItem = exports.isTask = exports.isTaskGroup = exports.isCriterion = exports.isTheme = void 0;
4
+ // No need to import lodash just for this one function
4
5
  const isNil = (value) => value === null || value === undefined;
5
6
  const isTheme = (element) => element.type === "theme";
6
7
  exports.isTheme = isTheme;
@@ -79,10 +80,16 @@ const getCertificationsByValue = (certificationDefinitions, value) => {
79
80
  return undefined;
80
81
  }
81
82
  return certificationDefinitions.filter((definition) => {
82
- return ((isNil(definition.rules.minimum) ||
83
- value > definition.rules.minimum) &&
84
- (isNil(definition.rules.maximum) ||
85
- value < definition.rules.maximum));
83
+ const { rules } = definition;
84
+ const minimum = "minimum" in rules ? rules.minimum : undefined;
85
+ const exclusiveMinimum = "exclusiveMinimum" in rules ? rules.exclusiveMinimum : undefined;
86
+ const maximum = "maximum" in rules ? rules.maximum : undefined;
87
+ const exclusiveMaximum = "exclusiveMaximum" in rules ? rules.exclusiveMaximum : undefined;
88
+ const meetsLowerBound = (isNil(minimum) || value >= minimum) &&
89
+ (isNil(exclusiveMinimum) || value > exclusiveMinimum);
90
+ const meetsUpperBound = (isNil(maximum) || value <= maximum) &&
91
+ (isNil(exclusiveMaximum) || value < exclusiveMaximum);
92
+ return meetsLowerBound && meetsUpperBound;
86
93
  });
87
94
  };
88
95
  exports.getCertificationsByValue = getCertificationsByValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "3.0.0-alpha.11",
3
+ "version": "3.0.0-alpha.12",
4
4
  "description": "A protocol and tools for defining and working with criteria sets",
5
5
  "private": false,
6
6
  "author": "Andrés Angulo <aa@openframe.org>",