@openframe-org/criteria-set-protocol 1.4.4 → 1.4.6

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.
@@ -22,7 +22,6 @@ export type Metadata = {
22
22
  locales?: string[];
23
23
  defaultLocale?: string;
24
24
  schemas?: SchemaDefinitions;
25
- certificationDefinitions?: CertificationDefinition[];
26
25
  };
27
26
  export type PdfDocumentationItem = {
28
27
  type: 'pdf';
@@ -46,6 +45,7 @@ export type CriteriaTree = {
46
45
  version: string;
47
46
  qualities: Quality[];
48
47
  certifications?: string[];
48
+ certificationDefinitions?: CertificationDefinition[];
49
49
  result?: any;
50
50
  };
51
51
  type BaseElement<Type extends CriteriaTreeElementType> = {
@@ -117,7 +117,7 @@ export type DataMap = {
117
117
  };
118
118
  export type CertificationDefinitionType = 'number' | 'percentage';
119
119
  type AbstractCertificationDefinitionRules<Rules> = Rules extends undefined | never ? {
120
- rules?: never;
120
+ rules?: Rules;
121
121
  rulesText?: string;
122
122
  } : {
123
123
  rules: Rules;
@@ -130,19 +130,12 @@ type AbstractCertificationDefinition<Type extends CertificationDefinitionType, R
130
130
  name: string;
131
131
  description?: string;
132
132
  };
133
- export type NumberBasedCertificationDefinitionRules = ({
133
+ export type NumberBasedCertificationDefinitionRules = {
134
134
  minimum?: number;
135
- exclusiveMinimum?: never;
136
- } | {
137
- minimum?: never;
138
135
  exclusiveMinimum?: number;
139
- }) & ({
140
136
  maximum?: number;
141
- exclusiveMaximum?: never;
142
- } | {
143
- maximum?: never;
144
137
  exclusiveMaximum?: number;
145
- });
138
+ };
146
139
  export type PercentageBasedCertificationDefinitionRules = NumberBasedCertificationDefinitionRules;
147
140
  export type NumberBasedCertificationDefinition = AbstractCertificationDefinition<'number', NumberBasedCertificationDefinitionRules>;
148
141
  export type PercentageBasedCertificationDefinition = AbstractCertificationDefinition<'percentage', PercentageBasedCertificationDefinitionRules>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
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>",