@openframe-org/criteria-set-protocol 1.5.2 → 1.5.4
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.
|
@@ -32,12 +32,41 @@ export declare const percentageBasedCertificationDefinitionRulesSchema: z.ZodObj
|
|
|
32
32
|
exclusiveMinimum?: number | undefined;
|
|
33
33
|
exclusiveMaximum?: number | undefined;
|
|
34
34
|
}>;
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const abstractCertificationDefinitionSchema: z.ZodObject<{
|
|
36
36
|
code: z.ZodString;
|
|
37
|
-
type: z.ZodLiteral<"number">;
|
|
37
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
38
38
|
icon: z.ZodOptional<z.ZodString>;
|
|
39
39
|
name: z.ZodString;
|
|
40
40
|
description: z.ZodOptional<z.ZodString>;
|
|
41
|
+
rules: z.ZodAny;
|
|
42
|
+
rulesText: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
type: "number" | "percentage";
|
|
45
|
+
code: string;
|
|
46
|
+
name: string;
|
|
47
|
+
rulesText: string;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
icon?: string | undefined;
|
|
50
|
+
rules?: any;
|
|
51
|
+
}, {
|
|
52
|
+
type: "number" | "percentage";
|
|
53
|
+
code: string;
|
|
54
|
+
name: string;
|
|
55
|
+
rulesText: string;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
icon?: string | undefined;
|
|
58
|
+
rules?: any;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const numberBasedCertificationDefinitionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
61
|
+
code: z.ZodString;
|
|
62
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
63
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
description: z.ZodOptional<z.ZodString>;
|
|
66
|
+
rules: z.ZodAny;
|
|
67
|
+
rulesText: z.ZodString;
|
|
68
|
+
}, {
|
|
69
|
+
type: z.ZodLiteral<"number">;
|
|
41
70
|
rules: z.ZodObject<{
|
|
42
71
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
43
72
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -54,8 +83,7 @@ export declare const numberBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
|
54
83
|
exclusiveMinimum?: number | undefined;
|
|
55
84
|
exclusiveMaximum?: number | undefined;
|
|
56
85
|
}>;
|
|
57
|
-
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
}>, "strip", z.ZodTypeAny, {
|
|
59
87
|
type: "number";
|
|
60
88
|
code: string;
|
|
61
89
|
name: string;
|
|
@@ -82,12 +110,16 @@ export declare const numberBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
|
82
110
|
description?: string | undefined;
|
|
83
111
|
icon?: string | undefined;
|
|
84
112
|
}>;
|
|
85
|
-
export declare const percentageBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
113
|
+
export declare const percentageBasedCertificationDefinitionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
86
114
|
code: z.ZodString;
|
|
87
|
-
type: z.ZodLiteral<"percentage">;
|
|
115
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
88
116
|
icon: z.ZodOptional<z.ZodString>;
|
|
89
117
|
name: z.ZodString;
|
|
90
118
|
description: z.ZodOptional<z.ZodString>;
|
|
119
|
+
rules: z.ZodAny;
|
|
120
|
+
rulesText: z.ZodString;
|
|
121
|
+
}, {
|
|
122
|
+
type: z.ZodLiteral<"percentage">;
|
|
91
123
|
rules: z.ZodObject<{
|
|
92
124
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
93
125
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -104,8 +136,7 @@ export declare const percentageBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
|
104
136
|
exclusiveMinimum?: number | undefined;
|
|
105
137
|
exclusiveMaximum?: number | undefined;
|
|
106
138
|
}>;
|
|
107
|
-
|
|
108
|
-
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
}>, "strip", z.ZodTypeAny, {
|
|
109
140
|
type: "percentage";
|
|
110
141
|
code: string;
|
|
111
142
|
name: string;
|
|
@@ -132,12 +163,16 @@ export declare const percentageBasedCertificationDefinitionSchema: z.ZodObject<{
|
|
|
132
163
|
description?: string | undefined;
|
|
133
164
|
icon?: string | undefined;
|
|
134
165
|
}>;
|
|
135
|
-
export declare const certificationDefinitionSchema: z.
|
|
166
|
+
export declare const certificationDefinitionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
136
167
|
code: z.ZodString;
|
|
137
|
-
type: z.ZodLiteral<"number">;
|
|
168
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
138
169
|
icon: z.ZodOptional<z.ZodString>;
|
|
139
170
|
name: z.ZodString;
|
|
140
171
|
description: z.ZodOptional<z.ZodString>;
|
|
172
|
+
rules: z.ZodAny;
|
|
173
|
+
rulesText: z.ZodString;
|
|
174
|
+
}, {
|
|
175
|
+
type: z.ZodLiteral<"number">;
|
|
141
176
|
rules: z.ZodObject<{
|
|
142
177
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
143
178
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -154,8 +189,7 @@ export declare const certificationDefinitionSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
154
189
|
exclusiveMinimum?: number | undefined;
|
|
155
190
|
exclusiveMaximum?: number | undefined;
|
|
156
191
|
}>;
|
|
157
|
-
|
|
158
|
-
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
}>, "strip", z.ZodTypeAny, {
|
|
159
193
|
type: "number";
|
|
160
194
|
code: string;
|
|
161
195
|
name: string;
|
|
@@ -181,12 +215,16 @@ export declare const certificationDefinitionSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
181
215
|
rulesText: string;
|
|
182
216
|
description?: string | undefined;
|
|
183
217
|
icon?: string | undefined;
|
|
184
|
-
}>, z.ZodObject<{
|
|
218
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
185
219
|
code: z.ZodString;
|
|
186
|
-
type: z.ZodLiteral<"percentage">;
|
|
220
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
187
221
|
icon: z.ZodOptional<z.ZodString>;
|
|
188
222
|
name: z.ZodString;
|
|
189
223
|
description: z.ZodOptional<z.ZodString>;
|
|
224
|
+
rules: z.ZodAny;
|
|
225
|
+
rulesText: z.ZodString;
|
|
226
|
+
}, {
|
|
227
|
+
type: z.ZodLiteral<"percentage">;
|
|
190
228
|
rules: z.ZodObject<{
|
|
191
229
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
192
230
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -203,8 +241,7 @@ export declare const certificationDefinitionSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
203
241
|
exclusiveMinimum?: number | undefined;
|
|
204
242
|
exclusiveMaximum?: number | undefined;
|
|
205
243
|
}>;
|
|
206
|
-
|
|
207
|
-
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
}>, "strip", z.ZodTypeAny, {
|
|
208
245
|
type: "percentage";
|
|
209
246
|
code: string;
|
|
210
247
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.certificationDefinitionSchema = exports.percentageBasedCertificationDefinitionSchema = exports.numberBasedCertificationDefinitionSchema = exports.percentageBasedCertificationDefinitionRulesSchema = exports.numberBasedCertificationDefinitionRulesSchema = exports.certificationDefinitionTypeSchema = void 0;
|
|
3
|
+
exports.certificationDefinitionSchema = exports.percentageBasedCertificationDefinitionSchema = exports.numberBasedCertificationDefinitionSchema = exports.abstractCertificationDefinitionSchema = exports.percentageBasedCertificationDefinitionRulesSchema = exports.numberBasedCertificationDefinitionRulesSchema = exports.certificationDefinitionTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.certificationDefinitionTypeSchema = zod_1.z.union([zod_1.z.literal('number'), zod_1.z.literal('percentage')]);
|
|
6
6
|
exports.numberBasedCertificationDefinitionRulesSchema = zod_1.z.object({
|
|
@@ -10,25 +10,24 @@ exports.numberBasedCertificationDefinitionRulesSchema = zod_1.z.object({
|
|
|
10
10
|
exclusiveMaximum: zod_1.z.number().optional()
|
|
11
11
|
});
|
|
12
12
|
exports.percentageBasedCertificationDefinitionRulesSchema = exports.numberBasedCertificationDefinitionRulesSchema;
|
|
13
|
-
exports.
|
|
13
|
+
exports.abstractCertificationDefinitionSchema = zod_1.z.object({
|
|
14
14
|
code: zod_1.z.string(),
|
|
15
|
-
type:
|
|
15
|
+
type: exports.certificationDefinitionTypeSchema,
|
|
16
16
|
icon: zod_1.z.string().optional(),
|
|
17
17
|
name: zod_1.z.string(),
|
|
18
18
|
description: zod_1.z.string().optional(),
|
|
19
|
-
rules:
|
|
19
|
+
rules: zod_1.z.any(),
|
|
20
20
|
rulesText: zod_1.z.string()
|
|
21
21
|
});
|
|
22
|
-
exports.
|
|
23
|
-
|
|
22
|
+
exports.numberBasedCertificationDefinitionSchema = exports.abstractCertificationDefinitionSchema.extend({
|
|
23
|
+
type: zod_1.z.literal('number'),
|
|
24
|
+
rules: exports.numberBasedCertificationDefinitionRulesSchema
|
|
25
|
+
});
|
|
26
|
+
exports.percentageBasedCertificationDefinitionSchema = exports.abstractCertificationDefinitionSchema.extend({
|
|
24
27
|
type: zod_1.z.literal('percentage'),
|
|
25
|
-
|
|
26
|
-
name: zod_1.z.string(),
|
|
27
|
-
description: zod_1.z.string().optional(),
|
|
28
|
-
rules: exports.percentageBasedCertificationDefinitionRulesSchema,
|
|
29
|
-
rulesText: zod_1.z.string()
|
|
28
|
+
rules: exports.percentageBasedCertificationDefinitionRulesSchema
|
|
30
29
|
});
|
|
31
|
-
exports.certificationDefinitionSchema = zod_1.z.
|
|
30
|
+
exports.certificationDefinitionSchema = zod_1.z.discriminatedUnion('type', [
|
|
32
31
|
exports.numberBasedCertificationDefinitionSchema,
|
|
33
32
|
exports.percentageBasedCertificationDefinitionSchema
|
|
34
33
|
]);
|
|
@@ -1310,12 +1310,16 @@ export declare const criteriaTreeSchema: z.ZodObject<z.objectUtil.extendShape<Pi
|
|
|
1310
1310
|
})[] | undefined;
|
|
1311
1311
|
sortOrder?: number | undefined;
|
|
1312
1312
|
}>, "many">;
|
|
1313
|
-
certificationDefinitions: z.ZodOptional<z.ZodArray<z.
|
|
1313
|
+
certificationDefinitions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
1314
1314
|
code: z.ZodString;
|
|
1315
|
-
type: z.ZodLiteral<"number">;
|
|
1315
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
1316
1316
|
icon: z.ZodOptional<z.ZodString>;
|
|
1317
1317
|
name: z.ZodString;
|
|
1318
1318
|
description: z.ZodOptional<z.ZodString>;
|
|
1319
|
+
rules: z.ZodAny;
|
|
1320
|
+
rulesText: z.ZodString;
|
|
1321
|
+
}, {
|
|
1322
|
+
type: z.ZodLiteral<"number">;
|
|
1319
1323
|
rules: z.ZodObject<{
|
|
1320
1324
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1321
1325
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1332,8 +1336,7 @@ export declare const criteriaTreeSchema: z.ZodObject<z.objectUtil.extendShape<Pi
|
|
|
1332
1336
|
exclusiveMinimum?: number | undefined;
|
|
1333
1337
|
exclusiveMaximum?: number | undefined;
|
|
1334
1338
|
}>;
|
|
1335
|
-
|
|
1336
|
-
}, "strip", z.ZodTypeAny, {
|
|
1339
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1337
1340
|
type: "number";
|
|
1338
1341
|
code: string;
|
|
1339
1342
|
name: string;
|
|
@@ -1359,12 +1362,16 @@ export declare const criteriaTreeSchema: z.ZodObject<z.objectUtil.extendShape<Pi
|
|
|
1359
1362
|
rulesText: string;
|
|
1360
1363
|
description?: string | undefined;
|
|
1361
1364
|
icon?: string | undefined;
|
|
1362
|
-
}>, z.ZodObject<{
|
|
1365
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
1363
1366
|
code: z.ZodString;
|
|
1364
|
-
type: z.ZodLiteral<"percentage">;
|
|
1367
|
+
type: z.ZodUnion<[z.ZodLiteral<"number">, z.ZodLiteral<"percentage">]>;
|
|
1365
1368
|
icon: z.ZodOptional<z.ZodString>;
|
|
1366
1369
|
name: z.ZodString;
|
|
1367
1370
|
description: z.ZodOptional<z.ZodString>;
|
|
1371
|
+
rules: z.ZodAny;
|
|
1372
|
+
rulesText: z.ZodString;
|
|
1373
|
+
}, {
|
|
1374
|
+
type: z.ZodLiteral<"percentage">;
|
|
1368
1375
|
rules: z.ZodObject<{
|
|
1369
1376
|
minimum: z.ZodOptional<z.ZodNumber>;
|
|
1370
1377
|
exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1381,8 +1388,7 @@ export declare const criteriaTreeSchema: z.ZodObject<z.objectUtil.extendShape<Pi
|
|
|
1381
1388
|
exclusiveMinimum?: number | undefined;
|
|
1382
1389
|
exclusiveMaximum?: number | undefined;
|
|
1383
1390
|
}>;
|
|
1384
|
-
|
|
1385
|
-
}, "strip", z.ZodTypeAny, {
|
|
1391
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1386
1392
|
type: "percentage";
|
|
1387
1393
|
code: string;
|
|
1388
1394
|
name: string;
|
package/package.json
CHANGED