@openframe-org/criteria-set-protocol 2.2.17 → 2.2.19
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,14 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const schemaDefinitionSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
3
3
|
export declare const schemaDefinitionsSchema: z.ZodObject<{
|
|
4
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4
5
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5
6
|
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
parameters?: Record<string, any> | undefined;
|
|
8
9
|
result?: Record<string, any> | undefined;
|
|
10
|
+
properties?: Record<string, any> | undefined;
|
|
9
11
|
}, {
|
|
10
12
|
parameters?: Record<string, any> | undefined;
|
|
11
13
|
result?: Record<string, any> | undefined;
|
|
14
|
+
properties?: Record<string, any> | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const metadataSchema: z.ZodObject<{
|
|
14
17
|
id: z.ZodString;
|
|
@@ -21,14 +24,17 @@ export declare const metadataSchema: z.ZodObject<{
|
|
|
21
24
|
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
22
25
|
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
23
26
|
schemas: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
24
28
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
25
29
|
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
26
30
|
}, "strip", z.ZodTypeAny, {
|
|
27
31
|
parameters?: Record<string, any> | undefined;
|
|
28
32
|
result?: Record<string, any> | undefined;
|
|
33
|
+
properties?: Record<string, any> | undefined;
|
|
29
34
|
}, {
|
|
30
35
|
parameters?: Record<string, any> | undefined;
|
|
31
36
|
result?: Record<string, any> | undefined;
|
|
37
|
+
properties?: Record<string, any> | undefined;
|
|
32
38
|
}>>;
|
|
33
39
|
}, "strip", z.ZodTypeAny, {
|
|
34
40
|
name: string;
|
|
@@ -43,6 +49,7 @@ export declare const metadataSchema: z.ZodObject<{
|
|
|
43
49
|
schemas?: {
|
|
44
50
|
parameters?: Record<string, any> | undefined;
|
|
45
51
|
result?: Record<string, any> | undefined;
|
|
52
|
+
properties?: Record<string, any> | undefined;
|
|
46
53
|
} | undefined;
|
|
47
54
|
}, {
|
|
48
55
|
name: string;
|
|
@@ -57,5 +64,6 @@ export declare const metadataSchema: z.ZodObject<{
|
|
|
57
64
|
schemas?: {
|
|
58
65
|
parameters?: Record<string, any> | undefined;
|
|
59
66
|
result?: Record<string, any> | undefined;
|
|
67
|
+
properties?: Record<string, any> | undefined;
|
|
60
68
|
} | undefined;
|
|
61
69
|
}>;
|
|
@@ -5,6 +5,9 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.schemaDefinitionSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
|
|
6
6
|
exports.schemaDefinitionsSchema = zod_1.z
|
|
7
7
|
.object({
|
|
8
|
+
properties: exports.schemaDefinitionSchema
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("The JSON schema describing the configurable properties of projects using this criteria set"),
|
|
8
11
|
parameters: exports.schemaDefinitionSchema
|
|
9
12
|
.optional()
|
|
10
13
|
.describe("The JSON schema describing the parameters of the criteria set"),
|
|
@@ -39,6 +42,6 @@ exports.metadataSchema = zod_1.z
|
|
|
39
42
|
.describe("The default locale to use when no specific locale is specified"),
|
|
40
43
|
schemas: exports.schemaDefinitionsSchema
|
|
41
44
|
.optional()
|
|
42
|
-
.describe("Definitions of parameter and result schemas for the criteria set"),
|
|
45
|
+
.describe("Definitions of property, parameter and result schemas for the criteria set"),
|
|
43
46
|
})
|
|
44
47
|
.describe("Metadata - The metadata for a criteria set");
|
|
@@ -10,14 +10,17 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
|
|
|
10
10
|
locales: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
11
11
|
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
12
12
|
schemas: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
13
14
|
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
14
15
|
result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
15
16
|
}, "strip", z.ZodTypeAny, {
|
|
16
17
|
parameters?: Record<string, any> | undefined;
|
|
17
18
|
result?: Record<string, any> | undefined;
|
|
19
|
+
properties?: Record<string, any> | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
parameters?: Record<string, any> | undefined;
|
|
20
22
|
result?: Record<string, any> | undefined;
|
|
23
|
+
properties?: Record<string, any> | undefined;
|
|
21
24
|
}>>;
|
|
22
25
|
}, "strip", z.ZodTypeAny, {
|
|
23
26
|
name: string;
|
|
@@ -32,6 +35,7 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
|
|
|
32
35
|
schemas?: {
|
|
33
36
|
parameters?: Record<string, any> | undefined;
|
|
34
37
|
result?: Record<string, any> | undefined;
|
|
38
|
+
properties?: Record<string, any> | undefined;
|
|
35
39
|
} | undefined;
|
|
36
40
|
}, {
|
|
37
41
|
name: string;
|
|
@@ -46,6 +50,7 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
|
|
|
46
50
|
schemas?: {
|
|
47
51
|
parameters?: Record<string, any> | undefined;
|
|
48
52
|
result?: Record<string, any> | undefined;
|
|
53
|
+
properties?: Record<string, any> | undefined;
|
|
49
54
|
} | undefined;
|
|
50
55
|
}>, "many">>;
|
|
51
56
|
export declare const streamMatrixResponseSchema: z.ZodObject<{
|
package/dist/v1/utils.d.ts
CHANGED
|
@@ -48,5 +48,5 @@ export declare const applyReportTitleTextFormatFormattingPlaceholders: ApplyRepo
|
|
|
48
48
|
/**
|
|
49
49
|
* Given a list of certification definitions, return the ones for which the given value is valid
|
|
50
50
|
*/
|
|
51
|
-
export declare const getCertificationsByValue: (certificationDefinitions
|
|
51
|
+
export declare const getCertificationsByValue: (certificationDefinitions: CertificationDefinition[], value?: TaskItemValue) => CertificationDefinition[] | undefined;
|
|
52
52
|
export {};
|
package/dist/v1/utils.js
CHANGED
|
@@ -77,7 +77,7 @@ const getCertificationsByValue = (certificationDefinitions, value) => {
|
|
|
77
77
|
if (typeof value !== "number") {
|
|
78
78
|
return undefined;
|
|
79
79
|
}
|
|
80
|
-
return certificationDefinitions
|
|
80
|
+
return certificationDefinitions.filter((definition) => {
|
|
81
81
|
return ((definition.rules.minimum === undefined ||
|
|
82
82
|
value > definition.rules.minimum) &&
|
|
83
83
|
(definition.rules.exclusiveMinimum === undefined ||
|
package/package.json
CHANGED