@openframe-org/criteria-set-protocol 3.0.0-alpha.5 → 3.0.0-alpha.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.
@@ -107,19 +107,13 @@ export declare const reportOptionsSchema: z.ZodObject<{
107
107
  reportTitleTextFormat: z.ZodNullable<z.ZodString>;
108
108
  }, z.core.$strip>;
109
109
  export declare const treeResultSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
110
- value: z.ZodNullable<z.ZodNumber>;
111
- maximumValue: z.ZodNullable<z.ZodNumber>;
112
- minimumValue: z.ZodNullable<z.ZodNumber>;
113
- weight: z.ZodNullable<z.ZodNumber>;
114
110
  type: z.ZodLiteral<"number">;
115
111
  total: z.ZodNullable<z.ZodNumber>;
116
- }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
117
112
  value: z.ZodNullable<z.ZodNumber>;
118
- maximumValue: z.ZodNullable<z.ZodNumber>;
119
- minimumValue: z.ZodNullable<z.ZodNumber>;
120
- weight: z.ZodNullable<z.ZodNumber>;
113
+ }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
121
114
  type: z.ZodLiteral<"percentage">;
122
115
  total: z.ZodOptional<z.ZodNever>;
116
+ value: z.ZodNullable<z.ZodNumber>;
123
117
  }, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
124
118
  type: z.ZodLiteral<"boolean">;
125
119
  value: z.ZodNullable<z.ZodBoolean>;
@@ -126,4 +126,4 @@ exports.reportOptionsSchema = zod_1.z
126
126
  .nullable()
127
127
  .describe("The format of the report row text, use ':code:' and ':title:' to define where the code and/or title should be inserted, if not provided only the title will be rendered")
128
128
  });
129
- exports.treeResultSchema = exports.elementDataSchema.describe("TreeResult - The result of the evaluation of a criteria set");
129
+ exports.treeResultSchema = numberElementDataSchema.omit({ weight: true, minimumValue: true, maximumValue: true }).or(percentageElementDataSchema.omit({ weight: true, minimumValue: true, maximumValue: true })).or(booleanElementDataSchema).describe("TreeResult - The result of the evaluation of a criteria set");
@@ -3,19 +3,13 @@ export declare const criteriaTreeSchema: z.ZodObject<{
3
3
  version: z.ZodString;
4
4
  revision: z.ZodString;
5
5
  result: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
6
- value: z.ZodNullable<z.ZodNumber>;
7
- maximumValue: z.ZodNullable<z.ZodNumber>;
8
- minimumValue: z.ZodNullable<z.ZodNumber>;
9
- weight: z.ZodNullable<z.ZodNumber>;
10
6
  type: z.ZodLiteral<"number">;
11
7
  total: z.ZodNullable<z.ZodNumber>;
12
- }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
13
8
  value: z.ZodNullable<z.ZodNumber>;
14
- maximumValue: z.ZodNullable<z.ZodNumber>;
15
- minimumValue: z.ZodNullable<z.ZodNumber>;
16
- weight: z.ZodNullable<z.ZodNumber>;
9
+ }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
17
10
  type: z.ZodLiteral<"percentage">;
18
11
  total: z.ZodOptional<z.ZodNever>;
12
+ value: z.ZodNullable<z.ZodNumber>;
19
13
  }, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
20
14
  type: z.ZodLiteral<"boolean">;
21
15
  value: z.ZodNullable<z.ZodBoolean>;
@@ -95,19 +95,13 @@ export declare const dataMapSchema: z.ZodObject<{
95
95
  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]>>]>>;
96
96
  }, z.core.$strip>>]>>;
97
97
  result: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
98
- value: z.ZodNullable<z.ZodNumber>;
99
- maximumValue: z.ZodNullable<z.ZodNumber>;
100
- minimumValue: z.ZodNullable<z.ZodNumber>;
101
- weight: z.ZodNullable<z.ZodNumber>;
102
98
  type: z.ZodLiteral<"number">;
103
99
  total: z.ZodNullable<z.ZodNumber>;
104
- }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
105
100
  value: z.ZodNullable<z.ZodNumber>;
106
- maximumValue: z.ZodNullable<z.ZodNumber>;
107
- minimumValue: z.ZodNullable<z.ZodNumber>;
108
- weight: z.ZodNullable<z.ZodNumber>;
101
+ }, z.core.$catchall<z.ZodAny>>, z.ZodObject<{
109
102
  type: z.ZodLiteral<"percentage">;
110
103
  total: z.ZodOptional<z.ZodNever>;
104
+ value: z.ZodNullable<z.ZodNumber>;
111
105
  }, z.core.$catchall<z.ZodAny>>]>, z.ZodObject<{
112
106
  type: z.ZodLiteral<"boolean">;
113
107
  value: z.ZodNullable<z.ZodBoolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "3.0.0-alpha.5",
3
+ "version": "3.0.0-alpha.6",
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>",