@openframe-org/criteria-set-protocol 2.0.15 → 2.0.16

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.
Files changed (51) hide show
  1. package/dist/index.js +7 -17
  2. package/dist/services/i-versioned.service.d.ts +16 -0
  3. package/dist/services/i-versioned.service.js +2 -0
  4. package/dist/services/index.d.ts +2 -0
  5. package/dist/services/index.js +18 -0
  6. package/dist/services/versions.service.d.ts +38 -0
  7. package/dist/services/versions.service.js +49 -0
  8. package/dist/types.d.ts +2 -0
  9. package/dist/types.js +2 -0
  10. package/dist/v1/schemas/certification.d.ts +8 -8
  11. package/dist/v1/schemas/common.d.ts +2 -2
  12. package/dist/v1/schemas/criteria-set-id-param-schema.d.ts +11 -0
  13. package/dist/v1/schemas/criteria-set-id-param-schema.js +11 -0
  14. package/dist/v1/schemas/criteria-set.d.ts +8 -0
  15. package/dist/v1/schemas/criteria-set.js +7 -0
  16. package/dist/v1/schemas/criteria-tree.d.ts +118 -118
  17. package/dist/v1/schemas/criterion.d.ts +20 -20
  18. package/dist/v1/schemas/download-matrix-body-schema.d.ts +15 -0
  19. package/dist/v1/schemas/download-matrix-body-schema.js +36 -0
  20. package/dist/v1/schemas/index.d.ts +1 -0
  21. package/dist/v1/schemas/index.js +1 -0
  22. package/dist/v1/schemas/matrix-body-schema.d.ts +20 -0
  23. package/dist/v1/schemas/matrix-body-schema.js +14 -0
  24. package/dist/v1/schemas/metadata.d.ts +2 -2
  25. package/dist/v1/schemas/quality.d.ts +498 -181
  26. package/dist/v1/schemas/quality.js +2 -2
  27. package/dist/v1/schemas/response.d.ts +2 -2
  28. package/dist/v1/schemas/task-group.d.ts +12 -12
  29. package/dist/v1/schemas/task-item.d.ts +2 -2
  30. package/dist/v1/schemas/task.d.ts +6 -6
  31. package/dist/v1/schemas/theme.d.ts +30 -30
  32. package/dist/v1/schemas/tree-and-data-body-schema.d.ts +17 -0
  33. package/dist/v1/schemas/tree-and-data-body-schema.js +13 -0
  34. package/dist/v1/schemas/tree-and-matrix-body-schema.d.ts +19 -0
  35. package/dist/v1/schemas/tree-and-matrix-body-schema.js +38 -0
  36. package/dist/v1/schemas/tree-body-schema.d.ts +17 -0
  37. package/dist/v1/schemas/tree-body-schema.js +37 -0
  38. package/dist/v1/schemas/utils.d.ts +4 -1
  39. package/dist/v1/schemas/utils.js +7 -1
  40. package/dist/v1/schemas/version-param-schema.d.ts +11 -0
  41. package/dist/v1/schemas/version-param-schema.js +11 -0
  42. package/dist/v1/services/i-protocol-v1.service.d.ts +26 -0
  43. package/dist/v1/services/i-protocol-v1.service.js +2 -0
  44. package/dist/v1/types/criteria.d.ts +2 -1
  45. package/dist/v1/types/express.d.ts +1 -0
  46. package/dist/v1/utils/color.d.ts +2 -0
  47. package/dist/v1/utils/color.js +10 -0
  48. package/dist/v1/utils/index.d.ts +7 -0
  49. package/dist/v1/utils/index.js +15 -0
  50. package/dist/v1/utils.d.ts +761 -6
  51. package/package.json +1 -1
@@ -554,8 +554,8 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
554
554
  hideCode?: boolean | undefined;
555
555
  }>>;
556
556
  }>, "strip", z.ZodTypeAny, {
557
- code: string;
558
557
  type: "task-item";
558
+ code: string;
559
559
  definition: {
560
560
  type: "select-single";
561
561
  options: {
@@ -624,8 +624,8 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
624
624
  valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
625
625
  providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
626
626
  }, {
627
- code: string;
628
627
  type: "task-item";
628
+ code: string;
629
629
  definition: {
630
630
  type: "select-single";
631
631
  options: {
@@ -702,12 +702,12 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
702
702
  hideCode?: boolean | undefined;
703
703
  }>>;
704
704
  }>, "strip", z.ZodTypeAny, {
705
- code: string;
706
705
  type: "task";
706
+ code: string;
707
707
  title: string;
708
708
  items: {
709
- code: string;
710
709
  type: "task-item";
710
+ code: string;
711
711
  definition: {
712
712
  type: "select-single";
713
713
  options: {
@@ -811,12 +811,12 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
811
811
  })[] | undefined;
812
812
  sortOrder?: number | undefined;
813
813
  }, {
814
- code: string;
815
814
  type: "task";
815
+ code: string;
816
816
  title: string;
817
817
  items: {
818
- code: string;
819
818
  type: "task-item";
819
+ code: string;
820
820
  definition: {
821
821
  type: "select-single";
822
822
  options: {
@@ -931,16 +931,16 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
931
931
  hideFromHierarchy?: boolean | undefined;
932
932
  }>>;
933
933
  }>, "strip", z.ZodTypeAny, {
934
- code: string;
935
934
  type: "task-group";
935
+ code: string;
936
936
  title: string;
937
937
  items: {
938
- code: string;
939
938
  type: "task";
939
+ code: string;
940
940
  title: string;
941
941
  items: {
942
- code: string;
943
942
  type: "task-item";
943
+ code: string;
944
944
  definition: {
945
945
  type: "select-single";
946
946
  options: {
@@ -1080,16 +1080,16 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
1080
1080
  sortOrder?: number | undefined;
1081
1081
  category?: string | undefined;
1082
1082
  }, {
1083
- code: string;
1084
1083
  type: "task-group";
1084
+ code: string;
1085
1085
  title: string;
1086
1086
  items: {
1087
- code: string;
1088
1087
  type: "task";
1088
+ code: string;
1089
1089
  title: string;
1090
1090
  items: {
1091
- code: string;
1092
1091
  type: "task-item";
1092
+ code: string;
1093
1093
  definition: {
1094
1094
  type: "select-single";
1095
1095
  options: {
@@ -1240,20 +1240,20 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
1240
1240
  hideFromHierarchy?: boolean | undefined;
1241
1241
  }>>;
1242
1242
  }>, "strip", z.ZodTypeAny, {
1243
- code: string;
1244
1243
  type: "criterion";
1244
+ code: string;
1245
1245
  title: string;
1246
1246
  items: {
1247
- code: string;
1248
1247
  type: "task-group";
1248
+ code: string;
1249
1249
  title: string;
1250
1250
  items: {
1251
- code: string;
1252
1251
  type: "task";
1252
+ code: string;
1253
1253
  title: string;
1254
1254
  items: {
1255
- code: string;
1256
1255
  type: "task-item";
1256
+ code: string;
1257
1257
  definition: {
1258
1258
  type: "select-single";
1259
1259
  options: {
@@ -1428,20 +1428,20 @@ export declare const criterionSchema: z.ZodObject<z.objectUtil.extendShape<{
1428
1428
  })[] | undefined;
1429
1429
  sortOrder?: number | undefined;
1430
1430
  }, {
1431
- code: string;
1432
1431
  type: "criterion";
1432
+ code: string;
1433
1433
  title: string;
1434
1434
  items: {
1435
- code: string;
1436
1435
  type: "task-group";
1436
+ code: string;
1437
1437
  title: string;
1438
1438
  items: {
1439
- code: string;
1440
1439
  type: "task";
1440
+ code: string;
1441
1441
  title: string;
1442
1442
  items: {
1443
- code: string;
1444
1443
  type: "task-item";
1444
+ code: string;
1445
1445
  definition: {
1446
1446
  type: "select-single";
1447
1447
  options: {
@@ -0,0 +1,15 @@
1
+ import * as yup from 'yup';
2
+ /**
3
+ * Validates the request body for the download matrix endpoints
4
+ */
5
+ export declare const downloadMatrixBodySchema: yup.ObjectSchema<{
6
+ body: {
7
+ values: {};
8
+ parameters: {};
9
+ };
10
+ }, yup.AnyObject, {
11
+ body: {
12
+ parameters: {};
13
+ values: {};
14
+ };
15
+ }, "">;
@@ -0,0 +1,36 @@
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.downloadMatrixBodySchema = void 0;
27
+ const yup = __importStar(require("yup"));
28
+ /**
29
+ * Validates the request body for the download matrix endpoints
30
+ */
31
+ exports.downloadMatrixBodySchema = yup.object({
32
+ body: yup.object({
33
+ parameters: yup.object().required(),
34
+ values: yup.object()
35
+ })
36
+ });
@@ -1,6 +1,7 @@
1
1
  export * from "./request";
2
2
  export * from "./certification";
3
3
  export * from "./common";
4
+ export * from "./criteria-set";
4
5
  export * from "./criteria-tree";
5
6
  export * from "./criterion";
6
7
  export * from "./data-map";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./request"), exports);
18
18
  __exportStar(require("./certification"), exports);
19
19
  __exportStar(require("./common"), exports);
20
+ __exportStar(require("./criteria-set"), exports);
20
21
  __exportStar(require("./criteria-tree"), exports);
21
22
  __exportStar(require("./criterion"), exports);
22
23
  __exportStar(require("./data-map"), exports);
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Validates the request body for the matrix endpoints
4
+ */
5
+ export declare const matrixBodySchema: z.ZodOptional<z.ZodObject<{
6
+ locale: z.ZodOptional<z.ZodString>;
7
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
9
+ additional: z.ZodOptional<z.ZodAny>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ values?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
12
+ locale?: string | undefined;
13
+ parameters?: Record<string, string> | undefined;
14
+ additional?: any;
15
+ }, {
16
+ values?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
17
+ locale?: string | undefined;
18
+ parameters?: Record<string, string> | undefined;
19
+ additional?: any;
20
+ }>>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matrixBodySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const task_item_1 = require("./task-item");
6
+ /**
7
+ * Validates the request body for the matrix endpoints
8
+ */
9
+ exports.matrixBodySchema = zod_1.z.object({
10
+ locale: zod_1.z.string().optional(),
11
+ parameters: zod_1.z.record(zod_1.z.string()).optional(),
12
+ values: task_item_1.taskItemValueMapSchema.optional(),
13
+ additional: zod_1.z.any().optional()
14
+ }).optional();
@@ -30,8 +30,8 @@ export declare const metadataSchema: z.ZodObject<{
30
30
  result?: Record<string, any> | undefined;
31
31
  }>>;
32
32
  }, "strip", z.ZodTypeAny, {
33
- name: string;
34
33
  id: string;
34
+ name: string;
35
35
  description: string;
36
36
  date: Date;
37
37
  version: string;
@@ -43,8 +43,8 @@ export declare const metadataSchema: z.ZodObject<{
43
43
  result?: Record<string, any> | undefined;
44
44
  } | undefined;
45
45
  }, {
46
- name: string;
47
46
  id: string;
47
+ name: string;
48
48
  description: string;
49
49
  date: Date;
50
50
  version: string;