@openframe-org/criteria-set-protocol 2.7.8-alpha.3 → 2.7.8

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.
@@ -1,6 +1,5 @@
1
1
  export * from "./schemas";
2
2
  export * from "./services";
3
3
  export * from "./types";
4
- export * from "./functions";
5
4
  export * from "./utils";
6
5
  export * from "./errors";
package/dist/v1/index.js CHANGED
@@ -17,6 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./schemas"), exports);
18
18
  __exportStar(require("./services"), exports);
19
19
  __exportStar(require("./types"), exports);
20
- __exportStar(require("./functions"), exports);
21
20
  __exportStar(require("./utils"), exports);
22
21
  __exportStar(require("./errors"), exports);
@@ -4,7 +4,7 @@ export declare const colorSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<
4
4
  green: z.ZodNumber;
5
5
  blue: z.ZodNumber;
6
6
  }, z.core.$strip>]>;
7
- export declare const taskItemValueReferenceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>;
7
+ export declare const taskItemValueReferenceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>;
8
8
  export declare const elementDataValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
9
9
  value: z.ZodNumber;
10
10
  maximumValue: z.ZodOptional<z.ZodNumber>;
@@ -19,6 +19,7 @@ exports.taskItemValueReferenceSchema = zod_1.z
19
19
  zod_1.z.number().describe("Numeric value"),
20
20
  zod_1.z.boolean().describe("Boolean value"),
21
21
  zod_1.z.null().describe("Null value"),
22
+ zod_1.z.undefined().describe("Undefined value"),
22
23
  zod_1.z.array(zod_1.z.string()).describe("Multiple select array of option IDs")
23
24
  ])
24
25
  .describe("TaskItemValueReference - Represents the value of a task item based on its definition");
@@ -2,110 +2,6 @@ import { z } from "zod";
2
2
  export declare const criteriaTreeSchema: z.ZodObject<{
3
3
  version: z.ZodString;
4
4
  revision: z.ZodString;
5
- dataMap: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<{
6
- text: string;
7
- } & ({
8
- [x: string]: any;
9
- value: number;
10
- total: number;
11
- maximumValue?: number | undefined;
12
- minimumValue?: number | undefined;
13
- exclusiveMaximum?: number | undefined;
14
- exclusiveMinimum?: number | undefined;
15
- weight?: number | undefined;
16
- type?: "number" | undefined;
17
- } | {
18
- [x: string]: any;
19
- type: "percentage";
20
- value: number;
21
- maximumValue?: number | undefined;
22
- minimumValue?: number | undefined;
23
- exclusiveMaximum?: number | undefined;
24
- exclusiveMinimum?: number | undefined;
25
- weight?: number | undefined;
26
- } | {
27
- [x: string]: any;
28
- type: "boolean";
29
- value: boolean;
30
- }), unknown, z.core.$ZodTypeInternals<{
31
- text: string;
32
- } & ({
33
- [x: string]: any;
34
- value: number;
35
- total: number;
36
- maximumValue?: number | undefined;
37
- minimumValue?: number | undefined;
38
- exclusiveMaximum?: number | undefined;
39
- exclusiveMinimum?: number | undefined;
40
- weight?: number | undefined;
41
- type?: "number" | undefined;
42
- } | {
43
- [x: string]: any;
44
- type: "percentage";
45
- value: number;
46
- maximumValue?: number | undefined;
47
- minimumValue?: number | undefined;
48
- exclusiveMaximum?: number | undefined;
49
- exclusiveMinimum?: number | undefined;
50
- weight?: number | undefined;
51
- } | {
52
- [x: string]: any;
53
- type: "boolean";
54
- value: boolean;
55
- }), unknown>>, z.ZodIntersection<z.ZodType<{
56
- text: string;
57
- } & ({
58
- [x: string]: any;
59
- value: number;
60
- total: number;
61
- maximumValue?: number | undefined;
62
- minimumValue?: number | undefined;
63
- exclusiveMaximum?: number | undefined;
64
- exclusiveMinimum?: number | undefined;
65
- weight?: number | undefined;
66
- type?: "number" | undefined;
67
- } | {
68
- [x: string]: any;
69
- type: "percentage";
70
- value: number;
71
- maximumValue?: number | undefined;
72
- minimumValue?: number | undefined;
73
- exclusiveMaximum?: number | undefined;
74
- exclusiveMinimum?: number | undefined;
75
- weight?: number | undefined;
76
- } | {
77
- [x: string]: any;
78
- type: "boolean";
79
- value: boolean;
80
- }), unknown, z.core.$ZodTypeInternals<{
81
- text: string;
82
- } & ({
83
- [x: string]: any;
84
- value: number;
85
- total: number;
86
- maximumValue?: number | undefined;
87
- minimumValue?: number | undefined;
88
- exclusiveMaximum?: number | undefined;
89
- exclusiveMinimum?: number | undefined;
90
- weight?: number | undefined;
91
- type?: "number" | undefined;
92
- } | {
93
- [x: string]: any;
94
- type: "percentage";
95
- value: number;
96
- maximumValue?: number | undefined;
97
- minimumValue?: number | undefined;
98
- exclusiveMaximum?: number | undefined;
99
- exclusiveMinimum?: number | undefined;
100
- weight?: number | undefined;
101
- } | {
102
- [x: string]: any;
103
- type: "boolean";
104
- value: boolean;
105
- }), unknown>>, z.ZodObject<{
106
- readOnly: z.ZodBoolean;
107
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
108
- }, z.core.$strip>>]>>;
109
5
  result: z.ZodType<{
110
6
  text: string;
111
7
  } & ({
@@ -158,7 +54,6 @@ export declare const criteriaTreeSchema: z.ZodObject<{
158
54
  value: boolean;
159
55
  }), unknown>>;
160
56
  certifications: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
- parameterHash: z.ZodOptional<z.ZodString>;
162
57
  themes: z.ZodArray<z.ZodObject<{
163
58
  code: z.ZodString;
164
59
  title: z.ZodString;
@@ -350,7 +245,7 @@ export declare const criteriaTreeSchema: z.ZodObject<{
350
245
  value: boolean;
351
246
  }), unknown>>, z.ZodObject<{
352
247
  readOnly: z.ZodBoolean;
353
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
248
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
354
249
  }, z.core.$strip>>;
355
250
  options: z.ZodObject<{
356
251
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -774,7 +669,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
774
669
  value: boolean;
775
670
  }), unknown>>, z.ZodObject<{
776
671
  readOnly: z.ZodBoolean;
777
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
672
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
778
673
  }, z.core.$strip>>;
779
674
  options: z.ZodObject<{
780
675
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -1145,7 +1040,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1145
1040
  value: boolean;
1146
1041
  }), unknown>>, z.ZodObject<{
1147
1042
  readOnly: z.ZodBoolean;
1148
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
1043
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
1149
1044
  }, z.core.$strip>>;
1150
1045
  options: z.ZodObject<{
1151
1046
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -1443,7 +1338,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1443
1338
  value: boolean;
1444
1339
  }), unknown>>, z.ZodObject<{
1445
1340
  readOnly: z.ZodBoolean;
1446
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
1341
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
1447
1342
  }, z.core.$strip>>;
1448
1343
  options: z.ZodObject<{
1449
1344
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -1650,7 +1545,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1650
1545
  value: boolean;
1651
1546
  }), unknown>>, z.ZodObject<{
1652
1547
  readOnly: z.ZodBoolean;
1653
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
1548
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
1654
1549
  }, z.core.$strip>>;
1655
1550
  options: z.ZodObject<{
1656
1551
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -1833,7 +1728,7 @@ export declare const criteriaTreeElementSchema: z.ZodDiscriminatedUnion<[z.ZodOb
1833
1728
  value: boolean;
1834
1729
  }), unknown>>, z.ZodObject<{
1835
1730
  readOnly: z.ZodBoolean;
1836
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
1731
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
1837
1732
  }, z.core.$strip>>;
1838
1733
  options: z.ZodObject<{
1839
1734
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -14,10 +14,8 @@ exports.criteriaTreeSchema = data_map_1.dataMapSchema
14
14
  .pick({
15
15
  version: true,
16
16
  revision: true,
17
- dataMap: true,
18
17
  result: true,
19
18
  certifications: true,
20
- parameterHash: true,
21
19
  })
22
20
  .extend({
23
21
  themes: zod_1.z
@@ -187,7 +187,7 @@ export declare const criterionSchema: z.ZodObject<{
187
187
  value: boolean;
188
188
  }), unknown>>, z.ZodObject<{
189
189
  readOnly: z.ZodBoolean;
190
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
190
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
191
191
  }, z.core.$strip>>;
192
192
  options: z.ZodObject<{
193
193
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -101,12 +101,12 @@ export declare const elementDataMapSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[
101
101
  value: boolean;
102
102
  }), unknown>>, z.ZodObject<{
103
103
  readOnly: z.ZodBoolean;
104
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
104
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
105
105
  }, z.core.$strip>>]>>;
106
106
  export declare const dataMapSchema: z.ZodObject<{
107
107
  version: z.ZodString;
108
108
  revision: z.ZodString;
109
- dataMap: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<{
109
+ elements: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<{
110
110
  text: string;
111
111
  } & ({
112
112
  [x: string]: any;
@@ -208,7 +208,7 @@ export declare const dataMapSchema: z.ZodObject<{
208
208
  value: boolean;
209
209
  }), unknown>>, z.ZodObject<{
210
210
  readOnly: z.ZodBoolean;
211
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
211
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
212
212
  }, z.core.$strip>>]>>;
213
213
  result: z.ZodType<{
214
214
  text: string;
@@ -262,5 +262,4 @@ export declare const dataMapSchema: z.ZodObject<{
262
262
  value: boolean;
263
263
  }), unknown>>;
264
264
  certifications: z.ZodOptional<z.ZodArray<z.ZodString>>;
265
- parameterHash: z.ZodOptional<z.ZodString>;
266
265
  }, z.core.$strip>;
@@ -12,16 +12,12 @@ exports.dataMapSchema = zod_1.z
12
12
  .string()
13
13
  .describe("The version of the criteria set used to generate the data map"),
14
14
  revision: zod_1.z.string().describe("The internal version of this criteria set"),
15
- dataMap: exports.elementDataMapSchema
15
+ elements: exports.elementDataMapSchema
16
16
  .describe("The data map consisting of a map of element codes to their data"),
17
17
  result: common_1.treeResultSchema.describe("The overall result of the evaluation of the criteria set"),
18
18
  certifications: zod_1.z
19
19
  .array(zod_1.z.string())
20
20
  .optional()
21
21
  .describe("The attained certifications"),
22
- parameterHash: zod_1.z
23
- .string()
24
- .optional()
25
- .describe("The hash of the configuration. It is used to be able to compare two trees in the client side based on their configuration, as the criteria set defines which configuration options change the tree structure.")
26
22
  })
27
23
  .describe("DataMap");
@@ -4,6 +4,6 @@ import { z } from "zod";
4
4
  */
5
5
  export declare const matrixRequestBodySchema: z.ZodOptional<z.ZodObject<{
6
6
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
7
- values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>>;
7
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>>;
8
8
  additional: z.ZodOptional<z.ZodAny>;
9
9
  }, z.core.$strip>>;
@@ -4,5 +4,5 @@ import { z } from "zod";
4
4
  */
5
5
  export declare const treeAndDataRequestBodySchema: z.ZodOptional<z.ZodObject<{
6
6
  parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
7
- values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>>;
7
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>>;
8
8
  }, z.core.$strip>>;
@@ -165,7 +165,7 @@ export declare const taskGroupSchema: z.ZodObject<{
165
165
  value: boolean;
166
166
  }), unknown>>, z.ZodObject<{
167
167
  readOnly: z.ZodBoolean;
168
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
168
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
169
169
  }, z.core.$strip>>;
170
170
  options: z.ZodObject<{
171
171
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const taskItemValueReferenceMapSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
2
+ export declare const taskItemValueReferenceMapSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
3
3
  export declare const pointOptionSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
5
  text: z.ZodString;
@@ -154,7 +154,7 @@ export declare const taskItemDataSchema: z.ZodIntersection<z.ZodType<{
154
154
  value: boolean;
155
155
  }), unknown>>, z.ZodObject<{
156
156
  readOnly: z.ZodBoolean;
157
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
157
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
158
158
  }, z.core.$strip>>;
159
159
  export declare const taskItemOptionsSchema: z.ZodObject<{
160
160
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -278,7 +278,7 @@ export declare const taskItemSchema: z.ZodObject<{
278
278
  value: boolean;
279
279
  }), unknown>>, z.ZodObject<{
280
280
  readOnly: z.ZodBoolean;
281
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
281
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
282
282
  }, z.core.$strip>>;
283
283
  options: z.ZodObject<{
284
284
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -148,7 +148,7 @@ export declare const taskSchema: z.ZodObject<{
148
148
  value: boolean;
149
149
  }), unknown>>, z.ZodObject<{
150
150
  readOnly: z.ZodBoolean;
151
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
151
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
152
152
  }, z.core.$strip>>;
153
153
  options: z.ZodObject<{
154
154
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
@@ -216,7 +216,7 @@ export declare const themeSchema: z.ZodObject<{
216
216
  value: boolean;
217
217
  }), unknown>>, z.ZodObject<{
218
218
  readOnly: z.ZodBoolean;
219
- valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodString>]>>;
219
+ valueReference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined, z.ZodArray<z.ZodString>]>>;
220
220
  }, z.core.$strip>>;
221
221
  options: z.ZodObject<{
222
222
  excludeFromTargets: z.ZodOptional<z.ZodBoolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "2.7.8-alpha.3",
3
+ "version": "2.7.8",
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>",