@openframe-org/criteria-set-protocol 2.7.5 → 2.7.7

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.
@@ -13,8 +13,8 @@ export declare const metadataSchema: z.ZodObject<{
13
13
  shortName: z.ZodString;
14
14
  group: z.ZodString;
15
15
  description: z.ZodString;
16
- documentation: z.ZodOptional<z.ZodString>;
17
- schemas: z.ZodOptional<z.ZodObject<{
16
+ documentation: z.ZodNullable<z.ZodString>;
17
+ schemas: z.ZodNullable<z.ZodObject<{
18
18
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
19
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
20
20
  }, z.core.$strip>>;
@@ -29,10 +29,10 @@ exports.metadataSchema = zod_1.z
29
29
  .describe("A detailed description of the criteria set"),
30
30
  documentation: zod_1.z
31
31
  .string()
32
- .optional()
32
+ .nullable()
33
33
  .describe("Additional documentation or usage guidelines for the criteria set"),
34
34
  schemas: exports.schemaDefinitionsSchema
35
- .optional()
35
+ .nullable()
36
36
  .describe("Definitions of property, parameter and result schemas for the criteria set"),
37
37
  })
38
38
  .describe("Metadata - The metadata for a criteria set");
@@ -8,8 +8,8 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
8
8
  shortName: z.ZodString;
9
9
  group: z.ZodString;
10
10
  description: z.ZodString;
11
- documentation: z.ZodOptional<z.ZodString>;
12
- schemas: z.ZodOptional<z.ZodObject<{
11
+ documentation: z.ZodNullable<z.ZodString>;
12
+ schemas: z.ZodNullable<z.ZodObject<{
13
13
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
14
14
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
15
15
  }, z.core.$strip>>;
@@ -85,5 +85,5 @@ export declare const getCertificationsByValue: (certificationDefinitions: Certif
85
85
  */
86
86
  export declare function validateData(data: TaskItemData | ElementData | TreeResult, dataType: Exclude<CriteriaTreeElementType, "task-group" | "task-item">): data is ElementData;
87
87
  export declare function validateData(data: TaskItemData | ElementData | TreeResult, dataType: Extract<CriteriaTreeElementType, "task-item">): data is TaskItemData;
88
- export declare function validateData(data: TaskItemData | ElementData | TreeResult, dataType: "tree"): data is TreeResult;
88
+ export declare function validateData(data: TaskItemData | ElementData | TreeResult, dataType: "tree-result"): data is TreeResult;
89
89
  export {};
package/dist/v1/utils.js CHANGED
@@ -93,7 +93,7 @@ const getCertificationsByValue = (certificationDefinitions, value) => {
93
93
  };
94
94
  exports.getCertificationsByValue = getCertificationsByValue;
95
95
  function validateData(data, dataType) {
96
- if (!["theme", "criterion", "task", "task-item", "tree"].includes(dataType)) {
96
+ if (!["theme", "criterion", "task", "task-item", "tree-result"].includes(dataType)) {
97
97
  throw new Error(`Invalid element type: '${dataType}'`);
98
98
  }
99
99
  ["value", "text"].forEach((property) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "2.7.5",
3
+ "version": "2.7.7",
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>",