@openframe-org/criteria-set-protocol 1.0.1 → 1.0.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.
package/dist/v1/schemas/index.js
CHANGED
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./criteria-set-id-param-schema"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./tree-and-matrix-body-schema"), exports);
|
|
19
19
|
__exportStar(require("./version-param-schema"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* Validates the request body for the tree and matrix endpoints
|
|
4
|
+
*/
|
|
5
|
+
export declare const treeAndMatrixBodySchema: yup.ObjectSchema<{
|
|
6
|
+
body: {
|
|
7
|
+
locale?: string | undefined;
|
|
8
|
+
values: {};
|
|
9
|
+
parameters: {};
|
|
10
|
+
};
|
|
11
|
+
}, yup.AnyObject, {
|
|
12
|
+
body: {
|
|
13
|
+
locale: undefined;
|
|
14
|
+
parameters: {};
|
|
15
|
+
values: {};
|
|
16
|
+
};
|
|
17
|
+
}, "">;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.treeAndMatrixBodySchema = void 0;
|
|
27
|
+
const yup = __importStar(require("yup"));
|
|
28
|
+
/**
|
|
29
|
+
* Validates the request body for the tree and matrix endpoints
|
|
30
|
+
*/
|
|
31
|
+
exports.treeAndMatrixBodySchema = yup.object({
|
|
32
|
+
body: yup.object({
|
|
33
|
+
locale: yup.string(),
|
|
34
|
+
parameters: yup.object().required(),
|
|
35
|
+
values: yup.object()
|
|
36
|
+
})
|
|
37
|
+
});
|
|
@@ -8,7 +8,8 @@ export type MetadataResponse<Parameters extends ParameterCombination = Parameter
|
|
|
8
8
|
};
|
|
9
9
|
export type StringParam<ParamName extends string> = Record<ParamName, string>;
|
|
10
10
|
export type TaskItemValueMap = Record<string, TaskItemValue>;
|
|
11
|
-
export type
|
|
11
|
+
export type TreeAndMatrixRequestBody = {
|
|
12
|
+
locale?: string;
|
|
12
13
|
parameters: ParameterCombination;
|
|
13
14
|
values?: TaskItemValueMap;
|
|
14
15
|
};
|
package/package.json
CHANGED