@openframe-org/criteria-set-protocol 1.1.0 → 1.1.2
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,10 +1,10 @@
|
|
|
1
|
-
import { CriteriaTree, Metadata, StreamMatrixResponse, TaskItemValueMap } from '../types';
|
|
1
|
+
import { CriteriaTree, Metadata, DataMap, StreamMatrixResponse, TaskItemValueMap } from '../types';
|
|
2
2
|
export interface ICriteriaSetService<ParametersType extends Record<string, any> = Record<string, any>> {
|
|
3
3
|
id: string;
|
|
4
4
|
version: string;
|
|
5
5
|
validateParameters(parameters: ParametersType): Promise<void>;
|
|
6
6
|
getMetadata(): Metadata;
|
|
7
|
-
|
|
7
|
+
getDataMap(parameters?: ParametersType, values?: TaskItemValueMap | null, locale?: string | null): DataMap;
|
|
8
8
|
getCriteriaTree(parameters?: ParametersType, values?: TaskItemValueMap | null, locale?: string | null): CriteriaTree;
|
|
9
9
|
streamMatrix(parameters?: ParametersType, values?: TaskItemValueMap | null, locale?: string | null): StreamMatrixResponse;
|
|
10
10
|
}
|
|
@@ -104,4 +104,8 @@ export type TaskItemValue = TaskItemScalarValue | Array<TaskItemScalarValue>;
|
|
|
104
104
|
export type TaskItemDefinition = SelectSingleType | SelectMultipleType | NumberType | BooleanType;
|
|
105
105
|
export type CriteriaTreeElement = Quality | Criterion | TaskGroup | Task | TaskItem;
|
|
106
106
|
export type CriteriaTreeElementType = 'quality' | 'criterion' | 'task-group' | 'task' | 'task-item';
|
|
107
|
+
export type DataMap = {
|
|
108
|
+
elements: Record<string, any>;
|
|
109
|
+
result: any;
|
|
110
|
+
};
|
|
107
111
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Stream } from 'stream';
|
|
3
|
-
import { CriteriaTree, Metadata, TaskItemValue } from './criteria';
|
|
3
|
+
import { CriteriaTree, DataMap, Metadata, TaskItemValue } from './criteria';
|
|
4
4
|
export type MetadataResponse = Metadata;
|
|
5
5
|
export type CriteriaTreeResponse = CriteriaTree;
|
|
6
|
+
export type DataMapResponse = DataMap;
|
|
6
7
|
export type StringParam<ParamName extends string> = Record<ParamName, string>;
|
|
7
8
|
export type TaskItemValueMap = Record<string, TaskItemValue>;
|
|
8
9
|
export type TreeAndMatrixRequestBody = {
|
package/package.json
CHANGED