@openframe-org/criteria-set-protocol 1.4.3 → 1.4.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.
- package/dist/v1/types/criteria.d.ts +11 -11
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export type Metadata = {
|
|
|
22
22
|
locales?: string[];
|
|
23
23
|
defaultLocale?: string;
|
|
24
24
|
schemas?: SchemaDefinitions;
|
|
25
|
-
|
|
25
|
+
certificationDefinitions?: CertificationDefinition[];
|
|
26
26
|
};
|
|
27
27
|
export type PdfDocumentationItem = {
|
|
28
28
|
type: 'pdf';
|
|
@@ -45,7 +45,7 @@ export type DocumentationItem = PdfDocumentationItem | InlineDocumentationItem |
|
|
|
45
45
|
export type CriteriaTree = {
|
|
46
46
|
version: string;
|
|
47
47
|
qualities: Quality[];
|
|
48
|
-
|
|
48
|
+
certifications?: string[];
|
|
49
49
|
result?: any;
|
|
50
50
|
};
|
|
51
51
|
type BaseElement<Type extends CriteriaTreeElementType> = {
|
|
@@ -113,24 +113,24 @@ export type DataMap = {
|
|
|
113
113
|
version: string;
|
|
114
114
|
elements: Record<string, any>;
|
|
115
115
|
result: any;
|
|
116
|
-
|
|
116
|
+
certifications?: string[];
|
|
117
117
|
};
|
|
118
|
-
export type
|
|
119
|
-
type
|
|
118
|
+
export type CertificationDefinitionType = 'number' | 'percentage';
|
|
119
|
+
type AbstractCertificationDefinitionRules<Rules> = Rules extends undefined | never ? {
|
|
120
120
|
rules?: never;
|
|
121
121
|
rulesText?: string;
|
|
122
122
|
} : {
|
|
123
123
|
rules: Rules;
|
|
124
124
|
rulesText: string;
|
|
125
125
|
};
|
|
126
|
-
type
|
|
126
|
+
type AbstractCertificationDefinition<Type extends CertificationDefinitionType, Rules> = AbstractCertificationDefinitionRules<Rules> & {
|
|
127
127
|
code: string;
|
|
128
128
|
type: Type;
|
|
129
129
|
icon?: string;
|
|
130
130
|
name: string;
|
|
131
131
|
description?: string;
|
|
132
132
|
};
|
|
133
|
-
export type
|
|
133
|
+
export type NumberBasedCertificationDefinitionRules = ({
|
|
134
134
|
minimum?: number;
|
|
135
135
|
exclusiveMinimum?: never;
|
|
136
136
|
} | {
|
|
@@ -143,8 +143,8 @@ export type NumberBasedCertificateDefinitionRules = ({
|
|
|
143
143
|
maximum?: never;
|
|
144
144
|
exclusiveMaximum?: number;
|
|
145
145
|
});
|
|
146
|
-
export type
|
|
147
|
-
export type
|
|
148
|
-
export type
|
|
149
|
-
export type
|
|
146
|
+
export type PercentageBasedCertificationDefinitionRules = NumberBasedCertificationDefinitionRules;
|
|
147
|
+
export type NumberBasedCertificationDefinition = AbstractCertificationDefinition<'number', NumberBasedCertificationDefinitionRules>;
|
|
148
|
+
export type PercentageBasedCertificationDefinition = AbstractCertificationDefinition<'percentage', PercentageBasedCertificationDefinitionRules>;
|
|
149
|
+
export type CertificationDefinition = NumberBasedCertificationDefinition | PercentageBasedCertificationDefinition;
|
|
150
150
|
export {};
|
package/package.json
CHANGED