@openframe-org/criteria-set-protocol 2.1.4 → 2.1.6

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.
@@ -52,7 +52,7 @@ export declare const criteriaTreeElementTypeSchema: z.ZodEnum<["theme", "criteri
52
52
  export declare const abstractElementSchema: z.ZodObject<{
53
53
  type: z.ZodEnum<["theme", "criterion", "task-group", "task", "task-item"]>;
54
54
  title: z.ZodString;
55
- longFormTitle: z.ZodOptional<z.ZodString>;
55
+ longFormTitle: z.ZodString;
56
56
  code: z.ZodString;
57
57
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
58
58
  documentation: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -140,6 +140,7 @@ export declare const abstractElementSchema: z.ZodObject<{
140
140
  code: string;
141
141
  type: "theme" | "criterion" | "task-group" | "task" | "task-item";
142
142
  title: string;
143
+ longFormTitle: string;
143
144
  data?: {
144
145
  type?: "number" | "percentage" | undefined;
145
146
  total?: number | undefined;
@@ -152,7 +153,6 @@ export declare const abstractElementSchema: z.ZodObject<{
152
153
  step?: number | undefined;
153
154
  readOnly?: boolean | undefined;
154
155
  } | undefined;
155
- longFormTitle?: string | undefined;
156
156
  tags?: string[] | undefined;
157
157
  documentation?: ({
158
158
  type: "pdf";
@@ -174,6 +174,7 @@ export declare const abstractElementSchema: z.ZodObject<{
174
174
  code: string;
175
175
  type: "theme" | "criterion" | "task-group" | "task" | "task-item";
176
176
  title: string;
177
+ longFormTitle: string;
177
178
  data?: {
178
179
  type?: "number" | "percentage" | undefined;
179
180
  total?: number | undefined;
@@ -186,7 +187,6 @@ export declare const abstractElementSchema: z.ZodObject<{
186
187
  step?: number | undefined;
187
188
  readOnly?: boolean | undefined;
188
189
  } | undefined;
189
- longFormTitle?: string | undefined;
190
190
  tags?: string[] | undefined;
191
191
  documentation?: ({
192
192
  type: "pdf";
@@ -205,3 +205,41 @@ export declare const abstractElementSchema: z.ZodObject<{
205
205
  })[] | undefined;
206
206
  sortOrder?: number | undefined;
207
207
  }>;
208
+ export declare const breadcrumbOptionsSchema: z.ZodUnion<[z.ZodObject<{
209
+ hideFromBreadcrumbs: z.ZodLiteral<true>;
210
+ breadcrumbTextFormat: z.ZodOptional<z.ZodNever>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ hideFromBreadcrumbs: true;
213
+ breadcrumbTextFormat?: undefined;
214
+ }, {
215
+ hideFromBreadcrumbs: true;
216
+ breadcrumbTextFormat?: undefined;
217
+ }>, z.ZodObject<{
218
+ hideFromBreadcrumbs: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
219
+ breadcrumbTextFormat: z.ZodString;
220
+ }, "strip", z.ZodTypeAny, {
221
+ hideFromBreadcrumbs: false;
222
+ breadcrumbTextFormat: string;
223
+ }, {
224
+ breadcrumbTextFormat: string;
225
+ hideFromBreadcrumbs?: false | undefined;
226
+ }>]>;
227
+ export declare const documentTreeOptionsSchema: z.ZodUnion<[z.ZodObject<{
228
+ hideFromDocumentTree: z.ZodLiteral<true>;
229
+ documentTreeFolderTextFormat: z.ZodOptional<z.ZodNever>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ hideFromDocumentTree: true;
232
+ documentTreeFolderTextFormat?: undefined;
233
+ }, {
234
+ hideFromDocumentTree: true;
235
+ documentTreeFolderTextFormat?: undefined;
236
+ }>, z.ZodObject<{
237
+ hideFromDocumentTree: z.ZodOptional<z.ZodLiteral<false>>;
238
+ documentTreeFolderTextFormat: z.ZodString;
239
+ }, "strip", z.ZodTypeAny, {
240
+ documentTreeFolderTextFormat: string;
241
+ hideFromDocumentTree?: false | undefined;
242
+ }, {
243
+ documentTreeFolderTextFormat: string;
244
+ hideFromDocumentTree?: false | undefined;
245
+ }>]>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.abstractElementSchema = exports.criteriaTreeElementTypeSchema = exports.elementDataSchema = exports.taskItemValueSchema = exports.taskItemScalarValueSchema = exports.colorSchema = void 0;
3
+ exports.documentTreeOptionsSchema = exports.breadcrumbOptionsSchema = exports.abstractElementSchema = exports.criteriaTreeElementTypeSchema = exports.elementDataSchema = exports.taskItemValueSchema = exports.taskItemScalarValueSchema = exports.colorSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const documentation_1 = require("./documentation");
6
6
  exports.colorSchema = zod_1.z
@@ -67,7 +67,6 @@ exports.abstractElementSchema = zod_1.z
67
67
  title: zod_1.z.string().describe("Display title of the element"),
68
68
  longFormTitle: zod_1.z
69
69
  .string()
70
- .optional()
71
70
  .describe("Extended or full-length title"),
72
71
  code: zod_1.z.string().describe("Unique identifier code"),
73
72
  tags: zod_1.z
@@ -85,3 +84,36 @@ exports.abstractElementSchema = zod_1.z
85
84
  .describe("Custom sorting position within parent"),
86
85
  })
87
86
  .describe("AbstractElement - Base schema for all tree elements");
87
+ exports.breadcrumbOptionsSchema = zod_1.z
88
+ .object({
89
+ hideFromBreadcrumbs: zod_1.z
90
+ .literal(true)
91
+ .describe("Whether to hide the element from the breadcrumbs"),
92
+ breadcrumbTextFormat: zod_1.z.never().optional(),
93
+ })
94
+ .or(zod_1.z.object({
95
+ hideFromBreadcrumbs: zod_1.z
96
+ .literal(false)
97
+ .optional()
98
+ .default(false)
99
+ .describe("Whether to hide the element from the breadcrumbs"),
100
+ breadcrumbTextFormat: zod_1.z
101
+ .string()
102
+ .describe("The format of the breadcrumb text, use ':code:' and ':title:' to define where the code and/or title should be inserted"),
103
+ }));
104
+ exports.documentTreeOptionsSchema = zod_1.z
105
+ .object({
106
+ hideFromDocumentTree: zod_1.z
107
+ .literal(true)
108
+ .describe("Whether to hide the element from the document tree folder structure"),
109
+ documentTreeFolderTextFormat: zod_1.z.never().optional(),
110
+ })
111
+ .or(zod_1.z.object({
112
+ hideFromDocumentTree: zod_1.z
113
+ .literal(false)
114
+ .optional()
115
+ .describe("Whether to hide the element from the document tree folder structure"),
116
+ documentTreeFolderTextFormat: zod_1.z
117
+ .string()
118
+ .describe("The format of the document tree folder text, use ':code:' and ':title:' to define where the code and/or title should be inserted"),
119
+ }));
@@ -2,9 +2,9 @@ import { z } from "zod";
2
2
  export declare const DASHBOARD_CATEGORY_LISTING_TYPES: readonly ["per-criteria", "per-task"];
3
3
  export declare const dashboardCategoryListingTypeSchema: z.ZodEnum<["per-criteria", "per-task"]>;
4
4
  export declare const criteriaSetOptionsSchema: z.ZodObject<{
5
- dashboardRenderingType: z.ZodOptional<z.ZodString>;
5
+ dashboardRenderingType: z.ZodEnum<["per-criteria", "per-task"]>;
6
6
  }, "strip", z.ZodTypeAny, {
7
- dashboardRenderingType?: string | undefined;
7
+ dashboardRenderingType: "per-criteria" | "per-task";
8
8
  }, {
9
- dashboardRenderingType?: string | undefined;
9
+ dashboardRenderingType: "per-criteria" | "per-task";
10
10
  }>;
@@ -9,9 +9,7 @@ exports.DASHBOARD_CATEGORY_LISTING_TYPES = [
9
9
  exports.dashboardCategoryListingTypeSchema = zod_1.z.enum(exports.DASHBOARD_CATEGORY_LISTING_TYPES);
10
10
  exports.criteriaSetOptionsSchema = zod_1.z
11
11
  .object({
12
- dashboardRenderingType: zod_1.z
13
- .string()
14
- .optional()
12
+ dashboardRenderingType: exports.dashboardCategoryListingTypeSchema
15
13
  .describe("Whether to render the criteria set in a dashboard as a list of criteria or as a list of tasks"),
16
14
  })
17
15
  .describe("CriteriaSetOptions - options for a criteria set");