@openframe-org/criteria-set-protocol 2.6.5 → 2.6.6-beta.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.
@@ -70,20 +70,18 @@ export declare const abstractElementSchema: z.ZodObject<{
70
70
  }, z.core.$strip>], "type">>>;
71
71
  sortOrder: z.ZodOptional<z.ZodNumber>;
72
72
  }, z.core.$strip>;
73
- export declare const breadcrumbOptionsSchema: z.ZodUnion<[z.ZodObject<{
73
+ export declare const breadcrumbOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
74
74
  hideFromBreadcrumbs: z.ZodLiteral<true>;
75
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
76
75
  }, z.core.$strip>, z.ZodObject<{
77
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
76
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
78
77
  breadcrumbTextFormat: z.ZodString;
79
- }, z.core.$strip>]>;
80
- export declare const documentTreeOptionsSchema: z.ZodUnion<[z.ZodObject<{
78
+ }, z.core.$strip>], "hideFromBreadcrumbs">;
79
+ export declare const documentTreeOptionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
80
  hideFromDocumentTree: z.ZodLiteral<true>;
82
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
83
81
  }, z.core.$strip>, z.ZodObject<{
84
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
82
+ hideFromDocumentTree: z.ZodLiteral<false>;
85
83
  documentTreeFolderTextFormat: z.ZodString;
86
- }, z.core.$strip>]>;
84
+ }, z.core.$strip>], "hideFromDocumentTree">;
87
85
  export declare const criteriaTreeOptionsSchema: z.ZodObject<{
88
86
  criteriaTreeElementTextFormat: z.ZodString;
89
87
  }, z.core.$strip>;
@@ -21,7 +21,8 @@ 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
23
  const abstractElementDataSchema = zod_1.z.object({}).catchall(zod_1.z.any());
24
- const numericElementDataValueSchema = abstractElementDataSchema.extend({
24
+ const numericElementDataValueSchema = abstractElementDataSchema
25
+ .extend({
25
26
  value: zod_1.z.number().describe("Value of the element"),
26
27
  maximumValue: zod_1.z
27
28
  .number()
@@ -49,19 +50,19 @@ const numberElementDataValueSchema = numericElementDataValueSchema.extend({
49
50
  .describe("Type of data - if omitted, defaults to 'number'"),
50
51
  total: zod_1.z
51
52
  .number()
52
- .describe("Total value, understood as 'value'/'total'"),
53
+ .describe("Total value, understood as 'value'/'total'")
53
54
  });
54
55
  const percentageElementDataValueSchema = numericElementDataValueSchema.extend({
55
56
  type: zod_1.z
56
57
  .literal("percentage")
57
58
  .describe("Type of data"),
58
- value: zod_1.z.number().describe("Value of the element"),
59
+ value: zod_1.z.number().describe("Value of the element")
59
60
  });
60
61
  const booleanElementDataValueSchema = abstractElementDataSchema.extend({
61
62
  type: zod_1.z
62
63
  .literal("boolean")
63
64
  .describe("Type of data"),
64
- value: zod_1.z.boolean().describe("Value of the element"),
65
+ value: zod_1.z.boolean().describe("Value of the element")
65
66
  });
66
67
  exports.elementDataValueSchema = zod_1.z.discriminatedUnion("type", [
67
68
  numberElementDataValueSchema,
@@ -69,7 +70,7 @@ exports.elementDataValueSchema = zod_1.z.discriminatedUnion("type", [
69
70
  booleanElementDataValueSchema
70
71
  ]);
71
72
  exports.elementDataTextSchema = zod_1.z.object({
72
- text: zod_1.z.string().describe("Text representation of the value"),
73
+ text: zod_1.z.string().describe("Text representation of the value")
73
74
  });
74
75
  exports.elementDataSchema = zod_1.z.intersection(exports.elementDataTextSchema, exports.elementDataValueSchema);
75
76
  exports.criteriaTreeElementTypeSchema = zod_1.z
@@ -95,39 +96,36 @@ exports.abstractElementSchema = zod_1.z
95
96
  .describe("Custom sorting position within parent")
96
97
  })
97
98
  .describe("AbstractElement - Base schema for all tree elements");
98
- exports.breadcrumbOptionsSchema = zod_1.z
99
- .object({
100
- hideFromBreadcrumbs: zod_1.z
101
- .literal(true)
102
- .describe("Whether to hide the element from the breadcrumbs"),
103
- breadcrumbTextFormat: zod_1.z.never().optional()
104
- })
105
- .or(zod_1.z.object({
106
- hideFromBreadcrumbs: zod_1.z
107
- .literal(false)
108
- .optional()
109
- .default(false)
110
- .describe("Whether to hide the element from the breadcrumbs"),
111
- breadcrumbTextFormat: zod_1.z
112
- .string()
113
- .describe("The format of the breadcrumb text, use ':code:' and ':title:' to define where the code and/or title should be inserted")
114
- }));
115
- exports.documentTreeOptionsSchema = zod_1.z
116
- .object({
117
- hideFromDocumentTree: zod_1.z
118
- .literal(true)
119
- .describe("Whether to hide the element from the document tree folder structure"),
120
- documentTreeFolderTextFormat: zod_1.z.never().optional()
121
- })
122
- .or(zod_1.z.object({
123
- hideFromDocumentTree: zod_1.z
124
- .literal(false)
125
- .optional()
126
- .describe("Whether to hide the element from the document tree folder structure"),
127
- documentTreeFolderTextFormat: zod_1.z
128
- .string()
129
- .describe("The format of the document tree folder text, use ':code:' and ':title:' to define where the code and/or title should be inserted")
130
- }));
99
+ exports.breadcrumbOptionsSchema = zod_1.z.discriminatedUnion("hideFromBreadcrumbs", [
100
+ zod_1.z.object({
101
+ hideFromBreadcrumbs: zod_1.z
102
+ .literal(true)
103
+ .describe("Whether to hide the element from the breadcrumbs"),
104
+ }),
105
+ zod_1.z.object({
106
+ hideFromBreadcrumbs: zod_1.z
107
+ .literal(false)
108
+ .describe("Whether to hide the element from the breadcrumbs"),
109
+ breadcrumbTextFormat: zod_1.z
110
+ .string()
111
+ .describe("The format of the breadcrumb text, use ':code:' and ':title:' to define where the code and/or title should be inserted")
112
+ })
113
+ ]);
114
+ exports.documentTreeOptionsSchema = zod_1.z.discriminatedUnion("hideFromDocumentTree", [
115
+ zod_1.z.object({
116
+ hideFromDocumentTree: zod_1.z
117
+ .literal(true)
118
+ .describe("Whether to hide the element from the document tree folder structure"),
119
+ }),
120
+ zod_1.z.object({
121
+ hideFromDocumentTree: zod_1.z
122
+ .literal(false)
123
+ .describe("Whether to hide the element from the document tree folder structure"),
124
+ documentTreeFolderTextFormat: zod_1.z
125
+ .string()
126
+ .describe("The format of the document tree folder text, use ':code:' and ':title:' to define where the code and/or title should be inserted")
127
+ })
128
+ ]);
131
129
  exports.criteriaTreeOptionsSchema = zod_1.z
132
130
  .object({
133
131
  criteriaTreeElementTextFormat: zod_1.z
@@ -333,15 +333,13 @@ export declare const criteriaTreeSchema: z.ZodObject<{
333
333
  type: "boolean";
334
334
  value: boolean;
335
335
  }), unknown>>;
336
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
336
+ options: z.ZodObject<{
337
337
  breadcrumbTextFormat: z.ZodString;
338
338
  documentTreeFolderTextFormat: z.ZodString;
339
339
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
340
- }, z.core.$strip>, z.ZodObject<{
341
340
  criteriaTreeElementTextFormat: z.ZodString;
342
- }, z.core.$strip>>, z.ZodObject<{
343
341
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
344
- }, z.core.$strip>>;
342
+ }, z.core.$strip>;
345
343
  }, z.core.$strip>>>;
346
344
  }, z.core.$strip>>>;
347
345
  data: z.ZodType<{
@@ -395,25 +393,21 @@ export declare const criteriaTreeSchema: z.ZodObject<{
395
393
  type: "boolean";
396
394
  value: boolean;
397
395
  }), unknown>>;
398
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
396
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
399
397
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
400
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
398
+ criteriaTreeElementTextFormat: z.ZodString;
399
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
400
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
401
401
  hideFromBreadcrumbs: z.ZodLiteral<true>;
402
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
403
402
  }, z.core.$strip>, z.ZodObject<{
404
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
403
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
405
404
  breadcrumbTextFormat: z.ZodString;
406
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
405
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
407
406
  hideFromDocumentTree: z.ZodLiteral<true>;
408
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
409
407
  }, z.core.$strip>, z.ZodObject<{
410
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
408
+ hideFromDocumentTree: z.ZodLiteral<false>;
411
409
  documentTreeFolderTextFormat: z.ZodString;
412
- }, z.core.$strip>]>>, z.ZodObject<{
413
- criteriaTreeElementTextFormat: z.ZodString;
414
- }, z.core.$strip>>, z.ZodObject<{
415
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
416
- }, z.core.$strip>>;
410
+ }, z.core.$strip>], "hideFromDocumentTree">>;
417
411
  }, z.core.$strip>>;
418
412
  data: z.ZodType<{
419
413
  text: string;
@@ -466,23 +460,20 @@ export declare const criteriaTreeSchema: z.ZodObject<{
466
460
  type: "boolean";
467
461
  value: boolean;
468
462
  }), unknown>>;
469
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
463
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
470
464
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
471
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
465
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
466
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
472
467
  hideFromBreadcrumbs: z.ZodLiteral<true>;
473
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
474
468
  }, z.core.$strip>, z.ZodObject<{
475
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
469
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
476
470
  breadcrumbTextFormat: z.ZodString;
477
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
471
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
478
472
  hideFromDocumentTree: z.ZodLiteral<true>;
479
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
480
473
  }, z.core.$strip>, z.ZodObject<{
481
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
474
+ hideFromDocumentTree: z.ZodLiteral<false>;
482
475
  documentTreeFolderTextFormat: z.ZodString;
483
- }, z.core.$strip>]>>, z.ZodObject<{
484
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
485
- }, z.core.$strip>>;
476
+ }, z.core.$strip>], "hideFromDocumentTree">>;
486
477
  }, z.core.$strip>>;
487
478
  certificationDefinitions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
488
479
  code: z.ZodString;
@@ -797,15 +788,13 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
797
788
  type: "boolean";
798
789
  value: boolean;
799
790
  }), unknown>>;
800
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
791
+ options: z.ZodObject<{
801
792
  breadcrumbTextFormat: z.ZodString;
802
793
  documentTreeFolderTextFormat: z.ZodString;
803
794
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
804
- }, z.core.$strip>, z.ZodObject<{
805
795
  criteriaTreeElementTextFormat: z.ZodString;
806
- }, z.core.$strip>>, z.ZodObject<{
807
796
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
808
- }, z.core.$strip>>;
797
+ }, z.core.$strip>;
809
798
  }, z.core.$strip>>>;
810
799
  }, z.core.$strip>>>;
811
800
  data: z.ZodType<{
@@ -859,25 +848,21 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
859
848
  type: "boolean";
860
849
  value: boolean;
861
850
  }), unknown>>;
862
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
851
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
863
852
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
864
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
853
+ criteriaTreeElementTextFormat: z.ZodString;
854
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
855
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
865
856
  hideFromBreadcrumbs: z.ZodLiteral<true>;
866
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
867
857
  }, z.core.$strip>, z.ZodObject<{
868
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
858
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
869
859
  breadcrumbTextFormat: z.ZodString;
870
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
860
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
871
861
  hideFromDocumentTree: z.ZodLiteral<true>;
872
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
873
862
  }, z.core.$strip>, z.ZodObject<{
874
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
863
+ hideFromDocumentTree: z.ZodLiteral<false>;
875
864
  documentTreeFolderTextFormat: z.ZodString;
876
- }, z.core.$strip>]>>, z.ZodObject<{
877
- criteriaTreeElementTextFormat: z.ZodString;
878
- }, z.core.$strip>>, z.ZodObject<{
879
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
880
- }, z.core.$strip>>;
865
+ }, z.core.$strip>], "hideFromDocumentTree">>;
881
866
  }, z.core.$strip>>;
882
867
  data: z.ZodType<{
883
868
  text: string;
@@ -930,23 +915,20 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
930
915
  type: "boolean";
931
916
  value: boolean;
932
917
  }), unknown>>;
933
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
918
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
934
919
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
935
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
920
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
921
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
936
922
  hideFromBreadcrumbs: z.ZodLiteral<true>;
937
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
938
923
  }, z.core.$strip>, z.ZodObject<{
939
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
924
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
940
925
  breadcrumbTextFormat: z.ZodString;
941
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
926
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
942
927
  hideFromDocumentTree: z.ZodLiteral<true>;
943
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
944
928
  }, z.core.$strip>, z.ZodObject<{
945
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
929
+ hideFromDocumentTree: z.ZodLiteral<false>;
946
930
  documentTreeFolderTextFormat: z.ZodString;
947
- }, z.core.$strip>]>>, z.ZodObject<{
948
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
949
- }, z.core.$strip>>;
931
+ }, z.core.$strip>], "hideFromDocumentTree">>;
950
932
  }, z.core.$strip>, z.ZodObject<{
951
933
  title: z.ZodString;
952
934
  longFormTitle: z.ZodString;
@@ -1192,15 +1174,13 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1192
1174
  type: "boolean";
1193
1175
  value: boolean;
1194
1176
  }), unknown>>;
1195
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1177
+ options: z.ZodObject<{
1196
1178
  breadcrumbTextFormat: z.ZodString;
1197
1179
  documentTreeFolderTextFormat: z.ZodString;
1198
1180
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1199
- }, z.core.$strip>, z.ZodObject<{
1200
1181
  criteriaTreeElementTextFormat: z.ZodString;
1201
- }, z.core.$strip>>, z.ZodObject<{
1202
1182
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
1203
- }, z.core.$strip>>;
1183
+ }, z.core.$strip>;
1204
1184
  }, z.core.$strip>>>;
1205
1185
  }, z.core.$strip>>>;
1206
1186
  data: z.ZodType<{
@@ -1254,25 +1234,21 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1254
1234
  type: "boolean";
1255
1235
  value: boolean;
1256
1236
  }), unknown>>;
1257
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1237
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1258
1238
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1259
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
1239
+ criteriaTreeElementTextFormat: z.ZodString;
1240
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
1241
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1260
1242
  hideFromBreadcrumbs: z.ZodLiteral<true>;
1261
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
1262
1243
  }, z.core.$strip>, z.ZodObject<{
1263
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
1244
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
1264
1245
  breadcrumbTextFormat: z.ZodString;
1265
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
1246
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1266
1247
  hideFromDocumentTree: z.ZodLiteral<true>;
1267
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
1268
1248
  }, z.core.$strip>, z.ZodObject<{
1269
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
1249
+ hideFromDocumentTree: z.ZodLiteral<false>;
1270
1250
  documentTreeFolderTextFormat: z.ZodString;
1271
- }, z.core.$strip>]>>, z.ZodObject<{
1272
- criteriaTreeElementTextFormat: z.ZodString;
1273
- }, z.core.$strip>>, z.ZodObject<{
1274
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
1275
- }, z.core.$strip>>;
1251
+ }, z.core.$strip>], "hideFromDocumentTree">>;
1276
1252
  }, z.core.$strip>, z.ZodObject<{
1277
1253
  title: z.ZodString;
1278
1254
  longFormTitle: z.ZodString;
@@ -1496,15 +1472,13 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1496
1472
  type: "boolean";
1497
1473
  value: boolean;
1498
1474
  }), unknown>>;
1499
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1475
+ options: z.ZodObject<{
1500
1476
  breadcrumbTextFormat: z.ZodString;
1501
1477
  documentTreeFolderTextFormat: z.ZodString;
1502
1478
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1503
- }, z.core.$strip>, z.ZodObject<{
1504
1479
  criteriaTreeElementTextFormat: z.ZodString;
1505
- }, z.core.$strip>>, z.ZodObject<{
1506
1480
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
1507
- }, z.core.$strip>>;
1481
+ }, z.core.$strip>;
1508
1482
  }, z.core.$strip>>>;
1509
1483
  }, z.core.$strip>, z.ZodObject<{
1510
1484
  title: z.ZodString;
@@ -1705,15 +1679,13 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1705
1679
  type: "boolean";
1706
1680
  value: boolean;
1707
1681
  }), unknown>>;
1708
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
1682
+ options: z.ZodObject<{
1709
1683
  breadcrumbTextFormat: z.ZodString;
1710
1684
  documentTreeFolderTextFormat: z.ZodString;
1711
1685
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1712
- }, z.core.$strip>, z.ZodObject<{
1713
1686
  criteriaTreeElementTextFormat: z.ZodString;
1714
- }, z.core.$strip>>, z.ZodObject<{
1715
1687
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
1716
- }, z.core.$strip>>;
1688
+ }, z.core.$strip>;
1717
1689
  }, z.core.$strip>, z.ZodObject<{
1718
1690
  code: z.ZodString;
1719
1691
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1,23 +1,19 @@
1
1
  import { z } from "zod";
2
- export declare const criterionOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
2
+ export declare const criterionOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
3
3
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
4
+ criteriaTreeElementTextFormat: z.ZodString;
5
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
5
7
  hideFromBreadcrumbs: z.ZodLiteral<true>;
6
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
7
8
  }, z.core.$strip>, z.ZodObject<{
8
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
9
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
9
10
  breadcrumbTextFormat: z.ZodString;
10
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
11
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
11
12
  hideFromDocumentTree: z.ZodLiteral<true>;
12
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
13
13
  }, z.core.$strip>, z.ZodObject<{
14
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
14
+ hideFromDocumentTree: z.ZodLiteral<false>;
15
15
  documentTreeFolderTextFormat: z.ZodString;
16
- }, z.core.$strip>]>>, z.ZodObject<{
17
- criteriaTreeElementTextFormat: z.ZodString;
18
- }, z.core.$strip>>, z.ZodObject<{
19
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
20
- }, z.core.$strip>>;
16
+ }, z.core.$strip>], "hideFromDocumentTree">>;
21
17
  export declare const criterionSchema: z.ZodObject<{
22
18
  title: z.ZodString;
23
19
  longFormTitle: z.ZodString;
@@ -263,15 +259,13 @@ export declare const criterionSchema: z.ZodObject<{
263
259
  type: "boolean";
264
260
  value: boolean;
265
261
  }), unknown>>;
266
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
262
+ options: z.ZodObject<{
267
263
  breadcrumbTextFormat: z.ZodString;
268
264
  documentTreeFolderTextFormat: z.ZodString;
269
265
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
270
- }, z.core.$strip>, z.ZodObject<{
271
266
  criteriaTreeElementTextFormat: z.ZodString;
272
- }, z.core.$strip>>, z.ZodObject<{
273
267
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
274
- }, z.core.$strip>>;
268
+ }, z.core.$strip>;
275
269
  }, z.core.$strip>>>;
276
270
  }, z.core.$strip>>>;
277
271
  data: z.ZodType<{
@@ -325,23 +319,19 @@ export declare const criterionSchema: z.ZodObject<{
325
319
  type: "boolean";
326
320
  value: boolean;
327
321
  }), unknown>>;
328
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
322
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
329
323
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
330
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
324
+ criteriaTreeElementTextFormat: z.ZodString;
325
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
331
327
  hideFromBreadcrumbs: z.ZodLiteral<true>;
332
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
333
328
  }, z.core.$strip>, z.ZodObject<{
334
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
329
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
335
330
  breadcrumbTextFormat: z.ZodString;
336
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
331
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
337
332
  hideFromDocumentTree: z.ZodLiteral<true>;
338
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
339
333
  }, z.core.$strip>, z.ZodObject<{
340
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
334
+ hideFromDocumentTree: z.ZodLiteral<false>;
341
335
  documentTreeFolderTextFormat: z.ZodString;
342
- }, z.core.$strip>]>>, z.ZodObject<{
343
- criteriaTreeElementTextFormat: z.ZodString;
344
- }, z.core.$strip>>, z.ZodObject<{
345
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
346
- }, z.core.$strip>>;
336
+ }, z.core.$strip>], "hideFromDocumentTree">>;
347
337
  }, z.core.$strip>;
@@ -12,10 +12,10 @@ exports.criterionOptionsSchema = zod_1.z
12
12
  .default(false)
13
13
  .describe("Whether to hide the criterion code in the generated PDF report"),
14
14
  })
15
+ .extend(common_1.criteriaTreeOptionsSchema.shape)
16
+ .extend(common_1.reportOptionsSchema.shape)
15
17
  .and(common_1.breadcrumbOptionsSchema)
16
18
  .and(common_1.documentTreeOptionsSchema)
17
- .and(common_1.criteriaTreeOptionsSchema)
18
- .and(common_1.reportOptionsSchema)
19
19
  .describe("CriterionOptions - Configuration options for criterion display and behavior");
20
20
  exports.criterionSchema = common_1.abstractElementSchema
21
21
  .extend({
@@ -222,14 +222,12 @@ export declare const taskGroupSchema: z.ZodObject<{
222
222
  type: "boolean";
223
223
  value: boolean;
224
224
  }), unknown>>;
225
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
225
+ options: z.ZodObject<{
226
226
  breadcrumbTextFormat: z.ZodString;
227
227
  documentTreeFolderTextFormat: z.ZodString;
228
228
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
229
- }, z.core.$strip>, z.ZodObject<{
230
229
  criteriaTreeElementTextFormat: z.ZodString;
231
- }, z.core.$strip>>, z.ZodObject<{
232
230
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
233
- }, z.core.$strip>>;
231
+ }, z.core.$strip>;
234
232
  }, z.core.$strip>>>;
235
233
  }, z.core.$strip>;
@@ -1,13 +1,11 @@
1
1
  import { z } from "zod";
2
- export declare const taskOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
2
+ export declare const taskOptionsSchema: z.ZodObject<{
3
3
  breadcrumbTextFormat: z.ZodString;
4
4
  documentTreeFolderTextFormat: z.ZodString;
5
5
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6
- }, z.core.$strip>, z.ZodObject<{
7
6
  criteriaTreeElementTextFormat: z.ZodString;
8
- }, z.core.$strip>>, z.ZodObject<{
9
7
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
10
- }, z.core.$strip>>;
8
+ }, z.core.$strip>;
11
9
  export declare const taskSchema: z.ZodObject<{
12
10
  title: z.ZodString;
13
11
  longFormTitle: z.ZodString;
@@ -207,13 +205,11 @@ export declare const taskSchema: z.ZodObject<{
207
205
  type: "boolean";
208
206
  value: boolean;
209
207
  }), unknown>>;
210
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
208
+ options: z.ZodObject<{
211
209
  breadcrumbTextFormat: z.ZodString;
212
210
  documentTreeFolderTextFormat: z.ZodString;
213
211
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
214
- }, z.core.$strip>, z.ZodObject<{
215
212
  criteriaTreeElementTextFormat: z.ZodString;
216
- }, z.core.$strip>>, z.ZodObject<{
217
213
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
218
- }, z.core.$strip>>;
214
+ }, z.core.$strip>;
219
215
  }, z.core.$strip>;
@@ -18,8 +18,8 @@ exports.taskOptionsSchema = zod_1.z
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
  })
21
- .and(common_1.criteriaTreeOptionsSchema)
22
- .and(common_1.reportOptionsSchema)
21
+ .extend(common_1.criteriaTreeOptionsSchema.shape)
22
+ .extend(common_1.reportOptionsSchema.shape)
23
23
  .describe("TaskOptions - Configuration options for task display and behavior");
24
24
  exports.taskSchema = common_1.abstractElementSchema.extend({
25
25
  type: zod_1.z.literal("task").describe("Identifies the schema type as a task"),
@@ -11,23 +11,20 @@ export declare const themeStyleSchema: z.ZodObject<{
11
11
  blue: z.ZodNumber;
12
12
  }, z.core.$strip>]>;
13
13
  }, z.core.$strip>;
14
- export declare const themeOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
14
+ export declare const themeOptionsSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
15
15
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
16
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
16
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
17
18
  hideFromBreadcrumbs: z.ZodLiteral<true>;
18
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
19
19
  }, z.core.$strip>, z.ZodObject<{
20
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
20
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
21
21
  breadcrumbTextFormat: z.ZodString;
22
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
22
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
23
23
  hideFromDocumentTree: z.ZodLiteral<true>;
24
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
25
24
  }, z.core.$strip>, z.ZodObject<{
26
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
25
+ hideFromDocumentTree: z.ZodLiteral<false>;
27
26
  documentTreeFolderTextFormat: z.ZodString;
28
- }, z.core.$strip>]>>, z.ZodObject<{
29
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
30
- }, z.core.$strip>>;
27
+ }, z.core.$strip>], "hideFromDocumentTree">>;
31
28
  export declare const themeSchema: z.ZodObject<{
32
29
  title: z.ZodString;
33
30
  longFormTitle: z.ZodString;
@@ -307,15 +304,13 @@ export declare const themeSchema: z.ZodObject<{
307
304
  type: "boolean";
308
305
  value: boolean;
309
306
  }), unknown>>;
310
- options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
307
+ options: z.ZodObject<{
311
308
  breadcrumbTextFormat: z.ZodString;
312
309
  documentTreeFolderTextFormat: z.ZodString;
313
310
  showCodeAsIndicatorTaskViewTitle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
314
- }, z.core.$strip>, z.ZodObject<{
315
311
  criteriaTreeElementTextFormat: z.ZodString;
316
- }, z.core.$strip>>, z.ZodObject<{
317
312
  reportTitleTextFormat: z.ZodOptional<z.ZodString>;
318
- }, z.core.$strip>>;
313
+ }, z.core.$strip>;
319
314
  }, z.core.$strip>>>;
320
315
  }, z.core.$strip>>>;
321
316
  data: z.ZodType<{
@@ -369,25 +364,21 @@ export declare const themeSchema: z.ZodObject<{
369
364
  type: "boolean";
370
365
  value: boolean;
371
366
  }), unknown>>;
372
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
367
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
373
368
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
374
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
369
+ criteriaTreeElementTextFormat: z.ZodString;
370
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
371
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
375
372
  hideFromBreadcrumbs: z.ZodLiteral<true>;
376
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
377
373
  }, z.core.$strip>, z.ZodObject<{
378
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
374
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
379
375
  breadcrumbTextFormat: z.ZodString;
380
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
376
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
381
377
  hideFromDocumentTree: z.ZodLiteral<true>;
382
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
383
378
  }, z.core.$strip>, z.ZodObject<{
384
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
379
+ hideFromDocumentTree: z.ZodLiteral<false>;
385
380
  documentTreeFolderTextFormat: z.ZodString;
386
- }, z.core.$strip>]>>, z.ZodObject<{
387
- criteriaTreeElementTextFormat: z.ZodString;
388
- }, z.core.$strip>>, z.ZodObject<{
389
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
390
- }, z.core.$strip>>;
381
+ }, z.core.$strip>], "hideFromDocumentTree">>;
391
382
  }, z.core.$strip>>;
392
383
  data: z.ZodType<{
393
384
  text: string;
@@ -440,21 +431,18 @@ export declare const themeSchema: z.ZodObject<{
440
431
  type: "boolean";
441
432
  value: boolean;
442
433
  }), unknown>>;
443
- options: z.ZodIntersection<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
434
+ options: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
444
435
  hideCodeInReport: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
445
- }, z.core.$strip>, z.ZodUnion<[z.ZodObject<{
436
+ reportTitleTextFormat: z.ZodOptional<z.ZodString>;
437
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
446
438
  hideFromBreadcrumbs: z.ZodLiteral<true>;
447
- breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
448
439
  }, z.core.$strip>, z.ZodObject<{
449
- hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
440
+ hideFromBreadcrumbs: z.ZodLiteral<false>;
450
441
  breadcrumbTextFormat: z.ZodString;
451
- }, z.core.$strip>]>>, z.ZodUnion<[z.ZodObject<{
442
+ }, z.core.$strip>], "hideFromBreadcrumbs">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
452
443
  hideFromDocumentTree: z.ZodLiteral<true>;
453
- documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
454
444
  }, z.core.$strip>, z.ZodObject<{
455
- hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
445
+ hideFromDocumentTree: z.ZodLiteral<false>;
456
446
  documentTreeFolderTextFormat: z.ZodString;
457
- }, z.core.$strip>]>>, z.ZodObject<{
458
- reportTitleTextFormat: z.ZodOptional<z.ZodString>;
459
- }, z.core.$strip>>;
447
+ }, z.core.$strip>], "hideFromDocumentTree">>;
460
448
  }, z.core.$strip>;
@@ -18,9 +18,9 @@ exports.themeOptionsSchema = zod_1.z
18
18
  .default(false)
19
19
  .describe("Whether to hide the theme code in the generated PDF report"),
20
20
  })
21
+ .extend(common_1.reportOptionsSchema.shape)
21
22
  .and(common_1.breadcrumbOptionsSchema)
22
23
  .and(common_1.documentTreeOptionsSchema)
23
- .and(common_1.reportOptionsSchema)
24
24
  .describe("ThemeOptions - Configuration options for theme display and behavior");
25
25
  exports.themeSchema = common_1.abstractElementSchema
26
26
  .extend({
package/dist/v1/utils.js CHANGED
@@ -45,14 +45,14 @@ exports.findInTree = findInTree;
45
45
  /**
46
46
  * Apply the text formatting used in document tree folder naming
47
47
  */
48
- const applyBreadcrumbTextFormattingPlaceholders = ({ breadcrumbTextFormat }, { title, code }) => (breadcrumbTextFormat !== null && breadcrumbTextFormat !== void 0 ? breadcrumbTextFormat : ":code:")
48
+ const applyBreadcrumbTextFormattingPlaceholders = (options, { title, code }) => ("breadcrumbTextFormat" in options ? options.breadcrumbTextFormat : ":code:")
49
49
  .replace(/:code:/g, code)
50
50
  .replace(/:title:/g, title);
51
51
  exports.applyBreadcrumbTextFormattingPlaceholders = applyBreadcrumbTextFormattingPlaceholders;
52
52
  /**
53
53
  * Apply the text formatting used in the document tree
54
54
  */
55
- const applyDocumentTreeFolderTextFormattingPlaceholders = ({ documentTreeFolderTextFormat }, { title, code }) => (documentTreeFolderTextFormat !== null && documentTreeFolderTextFormat !== void 0 ? documentTreeFolderTextFormat : ":code:")
55
+ const applyDocumentTreeFolderTextFormattingPlaceholders = (options, { title, code }) => ("documentTreeFolderTextFormat" in options ? options.documentTreeFolderTextFormat : ":code:")
56
56
  .replace(/:code:/g, code)
57
57
  .replace(/:title:/g, title);
58
58
  exports.applyDocumentTreeFolderTextFormattingPlaceholders = applyDocumentTreeFolderTextFormattingPlaceholders;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "2.6.5",
3
+ "version": "2.6.6-beta.1",
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>",