@openframe-org/criteria-set-protocol 1.4.2 → 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 -10
- 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,23 +113,24 @@ export type DataMap = {
|
|
|
113
113
|
version: string;
|
|
114
114
|
elements: Record<string, any>;
|
|
115
115
|
result: any;
|
|
116
|
+
certifications?: string[];
|
|
116
117
|
};
|
|
117
|
-
export type
|
|
118
|
-
type
|
|
118
|
+
export type CertificationDefinitionType = 'number' | 'percentage';
|
|
119
|
+
type AbstractCertificationDefinitionRules<Rules> = Rules extends undefined | never ? {
|
|
119
120
|
rules?: never;
|
|
120
121
|
rulesText?: string;
|
|
121
122
|
} : {
|
|
122
123
|
rules: Rules;
|
|
123
124
|
rulesText: string;
|
|
124
125
|
};
|
|
125
|
-
type
|
|
126
|
+
type AbstractCertificationDefinition<Type extends CertificationDefinitionType, Rules> = AbstractCertificationDefinitionRules<Rules> & {
|
|
126
127
|
code: string;
|
|
127
128
|
type: Type;
|
|
128
129
|
icon?: string;
|
|
129
130
|
name: string;
|
|
130
131
|
description?: string;
|
|
131
132
|
};
|
|
132
|
-
export type
|
|
133
|
+
export type NumberBasedCertificationDefinitionRules = ({
|
|
133
134
|
minimum?: number;
|
|
134
135
|
exclusiveMinimum?: never;
|
|
135
136
|
} | {
|
|
@@ -142,8 +143,8 @@ export type NumberBasedCertificateDefinitionRules = ({
|
|
|
142
143
|
maximum?: never;
|
|
143
144
|
exclusiveMaximum?: number;
|
|
144
145
|
});
|
|
145
|
-
export type
|
|
146
|
-
export type
|
|
147
|
-
export type
|
|
148
|
-
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;
|
|
149
150
|
export {};
|
package/package.json
CHANGED