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

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 (46) hide show
  1. package/dist/index.js +17 -7
  2. package/dist/v1/schemas/certification.d.ts +8 -8
  3. package/dist/v1/schemas/common.d.ts +2 -2
  4. package/dist/v1/schemas/criteria-tree.d.ts +118 -118
  5. package/dist/v1/schemas/criterion.d.ts +20 -20
  6. package/dist/v1/schemas/metadata.d.ts +2 -2
  7. package/dist/v1/schemas/quality.d.ts +181 -498
  8. package/dist/v1/schemas/quality.js +2 -2
  9. package/dist/v1/schemas/response.d.ts +2 -2
  10. package/dist/v1/schemas/task-group.d.ts +12 -12
  11. package/dist/v1/schemas/task-item.d.ts +2 -2
  12. package/dist/v1/schemas/task.d.ts +6 -6
  13. package/dist/v1/schemas/theme.d.ts +30 -30
  14. package/dist/v1/schemas/utils.d.ts +1 -4
  15. package/dist/v1/schemas/utils.js +1 -7
  16. package/dist/v1/types/express.d.ts +0 -1
  17. package/dist/v1/utils.d.ts +6 -761
  18. package/package.json +4 -4
  19. package/dist/services/i-versioned.service.d.ts +0 -16
  20. package/dist/services/i-versioned.service.js +0 -2
  21. package/dist/services/index.d.ts +0 -2
  22. package/dist/services/index.js +0 -18
  23. package/dist/services/versions.service.d.ts +0 -38
  24. package/dist/services/versions.service.js +0 -49
  25. package/dist/types.d.ts +0 -2
  26. package/dist/types.js +0 -2
  27. package/dist/v1/schemas/criteria-set-id-param-schema.d.ts +0 -11
  28. package/dist/v1/schemas/criteria-set-id-param-schema.js +0 -11
  29. package/dist/v1/schemas/download-matrix-body-schema.d.ts +0 -15
  30. package/dist/v1/schemas/download-matrix-body-schema.js +0 -36
  31. package/dist/v1/schemas/matrix-body-schema.d.ts +0 -20
  32. package/dist/v1/schemas/matrix-body-schema.js +0 -14
  33. package/dist/v1/schemas/tree-and-data-body-schema.d.ts +0 -17
  34. package/dist/v1/schemas/tree-and-data-body-schema.js +0 -13
  35. package/dist/v1/schemas/tree-and-matrix-body-schema.d.ts +0 -19
  36. package/dist/v1/schemas/tree-and-matrix-body-schema.js +0 -38
  37. package/dist/v1/schemas/tree-body-schema.d.ts +0 -17
  38. package/dist/v1/schemas/tree-body-schema.js +0 -37
  39. package/dist/v1/schemas/version-param-schema.d.ts +0 -11
  40. package/dist/v1/schemas/version-param-schema.js +0 -11
  41. package/dist/v1/services/i-protocol-v1.service.d.ts +0 -26
  42. package/dist/v1/services/i-protocol-v1.service.js +0 -2
  43. package/dist/v1/utils/color.d.ts +0 -2
  44. package/dist/v1/utils/color.js +0 -10
  45. package/dist/v1/utils/index.d.ts +0 -7
  46. package/dist/v1/utils/index.js +0 -15
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.qualitySchema = exports.qualityStyleSchema = exports.colorSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const task_item_1 = require("./task-item");
5
6
  const criterion_1 = require("./criterion");
6
- const documentation_1 = require("./documentation");
7
7
  exports.colorSchema = zod_1.z.union([
8
8
  zod_1.z.string(),
9
9
  zod_1.z.object({
@@ -21,7 +21,7 @@ exports.qualitySchema = zod_1.z.object({
21
21
  title: zod_1.z.string(),
22
22
  code: zod_1.z.string(),
23
23
  tags: zod_1.z.array(zod_1.z.string()).optional(),
24
- documentation: zod_1.z.array(documentation_1.documentationItemSchema).optional(),
24
+ documentation: zod_1.z.array(task_item_1.documentationItemSchema).optional(),
25
25
  data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
26
26
  sortOrder: zod_1.z.number().optional(),
27
27
  style: exports.qualityStyleSchema.optional(),
@@ -19,8 +19,8 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
19
19
  result?: Record<string, any> | undefined;
20
20
  }>>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- id: string;
23
22
  name: string;
23
+ id: string;
24
24
  description: string;
25
25
  date: Date;
26
26
  version: string;
@@ -32,8 +32,8 @@ export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.Z
32
32
  result?: Record<string, any> | undefined;
33
33
  } | undefined;
34
34
  }, {
35
- id: string;
36
35
  name: string;
36
+ id: string;
37
37
  description: string;
38
38
  date: Date;
39
39
  version: string;
@@ -462,8 +462,8 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
462
462
  hideCode?: boolean | undefined;
463
463
  }>>;
464
464
  }>, "strip", z.ZodTypeAny, {
465
- type: "task-item";
466
465
  code: string;
466
+ type: "task-item";
467
467
  definition: {
468
468
  type: "select-single";
469
469
  options: {
@@ -532,8 +532,8 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
532
532
  valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
533
533
  providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
534
534
  }, {
535
- type: "task-item";
536
535
  code: string;
536
+ type: "task-item";
537
537
  definition: {
538
538
  type: "select-single";
539
539
  options: {
@@ -610,12 +610,12 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
610
610
  hideCode?: boolean | undefined;
611
611
  }>>;
612
612
  }>, "strip", z.ZodTypeAny, {
613
- type: "task";
614
613
  code: string;
614
+ type: "task";
615
615
  title: string;
616
616
  items: {
617
- type: "task-item";
618
617
  code: string;
618
+ type: "task-item";
619
619
  definition: {
620
620
  type: "select-single";
621
621
  options: {
@@ -719,12 +719,12 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
719
719
  })[] | undefined;
720
720
  sortOrder?: number | undefined;
721
721
  }, {
722
- type: "task";
723
722
  code: string;
723
+ type: "task";
724
724
  title: string;
725
725
  items: {
726
- type: "task-item";
727
726
  code: string;
727
+ type: "task-item";
728
728
  definition: {
729
729
  type: "select-single";
730
730
  options: {
@@ -839,16 +839,16 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
839
839
  hideFromHierarchy?: boolean | undefined;
840
840
  }>>;
841
841
  }>, "strip", z.ZodTypeAny, {
842
- type: "task-group";
843
842
  code: string;
843
+ type: "task-group";
844
844
  title: string;
845
845
  items: {
846
- type: "task";
847
846
  code: string;
847
+ type: "task";
848
848
  title: string;
849
849
  items: {
850
- type: "task-item";
851
850
  code: string;
851
+ type: "task-item";
852
852
  definition: {
853
853
  type: "select-single";
854
854
  options: {
@@ -988,16 +988,16 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
988
988
  sortOrder?: number | undefined;
989
989
  category?: string | undefined;
990
990
  }, {
991
- type: "task-group";
992
991
  code: string;
992
+ type: "task-group";
993
993
  title: string;
994
994
  items: {
995
- type: "task";
996
995
  code: string;
996
+ type: "task";
997
997
  title: string;
998
998
  items: {
999
- type: "task-item";
1000
999
  code: string;
1000
+ type: "task-item";
1001
1001
  definition: {
1002
1002
  type: "select-single";
1003
1003
  options: {
@@ -586,8 +586,8 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
586
586
  hideCode?: boolean | undefined;
587
587
  }>>;
588
588
  }>, "strip", z.ZodTypeAny, {
589
- type: "task-item";
590
589
  code: string;
590
+ type: "task-item";
591
591
  definition: {
592
592
  type: "select-single";
593
593
  options: {
@@ -656,8 +656,8 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
656
656
  valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
657
657
  providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
658
658
  }, {
659
- type: "task-item";
660
659
  code: string;
660
+ type: "task-item";
661
661
  definition: {
662
662
  type: "select-single";
663
663
  options: {
@@ -366,8 +366,8 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
366
366
  hideCode?: boolean | undefined;
367
367
  }>>;
368
368
  }>, "strip", z.ZodTypeAny, {
369
- type: "task-item";
370
369
  code: string;
370
+ type: "task-item";
371
371
  definition: {
372
372
  type: "select-single";
373
373
  options: {
@@ -436,8 +436,8 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
436
436
  valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
437
437
  providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
438
438
  }, {
439
- type: "task-item";
440
439
  code: string;
440
+ type: "task-item";
441
441
  definition: {
442
442
  type: "select-single";
443
443
  options: {
@@ -514,12 +514,12 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
514
514
  hideCode?: boolean | undefined;
515
515
  }>>;
516
516
  }>, "strip", z.ZodTypeAny, {
517
- type: "task";
518
517
  code: string;
518
+ type: "task";
519
519
  title: string;
520
520
  items: {
521
- type: "task-item";
522
521
  code: string;
522
+ type: "task-item";
523
523
  definition: {
524
524
  type: "select-single";
525
525
  options: {
@@ -623,12 +623,12 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
623
623
  })[] | undefined;
624
624
  sortOrder?: number | undefined;
625
625
  }, {
626
- type: "task";
627
626
  code: string;
627
+ type: "task";
628
628
  title: string;
629
629
  items: {
630
- type: "task-item";
631
630
  code: string;
631
+ type: "task-item";
632
632
  definition: {
633
633
  type: "select-single";
634
634
  options: {
@@ -746,8 +746,8 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
746
746
  hideCode?: boolean | undefined;
747
747
  }>>;
748
748
  }>, "strip", z.ZodTypeAny, {
749
- type: "task-item";
750
749
  code: string;
750
+ type: "task-item";
751
751
  definition: {
752
752
  type: "select-single";
753
753
  options: {
@@ -816,8 +816,8 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
816
816
  valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
817
817
  providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
818
818
  }, {
819
- type: "task-item";
820
819
  code: string;
820
+ type: "task-item";
821
821
  definition: {
822
822
  type: "select-single";
823
823
  options: {
@@ -894,12 +894,12 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
894
894
  hideCode?: boolean | undefined;
895
895
  }>>;
896
896
  }>, "strip", z.ZodTypeAny, {
897
- type: "task";
898
897
  code: string;
898
+ type: "task";
899
899
  title: string;
900
900
  items: {
901
- type: "task-item";
902
901
  code: string;
902
+ type: "task-item";
903
903
  definition: {
904
904
  type: "select-single";
905
905
  options: {
@@ -1003,12 +1003,12 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1003
1003
  })[] | undefined;
1004
1004
  sortOrder?: number | undefined;
1005
1005
  }, {
1006
- type: "task";
1007
1006
  code: string;
1007
+ type: "task";
1008
1008
  title: string;
1009
1009
  items: {
1010
- type: "task-item";
1011
1010
  code: string;
1011
+ type: "task-item";
1012
1012
  definition: {
1013
1013
  type: "select-single";
1014
1014
  options: {
@@ -1123,16 +1123,16 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1123
1123
  hideFromHierarchy?: boolean | undefined;
1124
1124
  }>>;
1125
1125
  }>, "strip", z.ZodTypeAny, {
1126
- type: "task-group";
1127
1126
  code: string;
1127
+ type: "task-group";
1128
1128
  title: string;
1129
1129
  items: {
1130
- type: "task";
1131
1130
  code: string;
1131
+ type: "task";
1132
1132
  title: string;
1133
1133
  items: {
1134
- type: "task-item";
1135
1134
  code: string;
1135
+ type: "task-item";
1136
1136
  definition: {
1137
1137
  type: "select-single";
1138
1138
  options: {
@@ -1272,16 +1272,16 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1272
1272
  sortOrder?: number | undefined;
1273
1273
  category?: string | undefined;
1274
1274
  }, {
1275
- type: "task-group";
1276
1275
  code: string;
1276
+ type: "task-group";
1277
1277
  title: string;
1278
1278
  items: {
1279
- type: "task";
1280
1279
  code: string;
1280
+ type: "task";
1281
1281
  title: string;
1282
1282
  items: {
1283
- type: "task-item";
1284
1283
  code: string;
1284
+ type: "task-item";
1285
1285
  definition: {
1286
1286
  type: "select-single";
1287
1287
  options: {
@@ -1432,20 +1432,20 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1432
1432
  hideFromHierarchy?: boolean | undefined;
1433
1433
  }>>;
1434
1434
  }>, "strip", z.ZodTypeAny, {
1435
- type: "criterion";
1436
1435
  code: string;
1436
+ type: "criterion";
1437
1437
  title: string;
1438
1438
  items: {
1439
- type: "task-group";
1440
1439
  code: string;
1440
+ type: "task-group";
1441
1441
  title: string;
1442
1442
  items: {
1443
- type: "task";
1444
1443
  code: string;
1444
+ type: "task";
1445
1445
  title: string;
1446
1446
  items: {
1447
- type: "task-item";
1448
1447
  code: string;
1448
+ type: "task-item";
1449
1449
  definition: {
1450
1450
  type: "select-single";
1451
1451
  options: {
@@ -1620,20 +1620,20 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1620
1620
  })[] | undefined;
1621
1621
  sortOrder?: number | undefined;
1622
1622
  }, {
1623
- type: "criterion";
1624
1623
  code: string;
1624
+ type: "criterion";
1625
1625
  title: string;
1626
1626
  items: {
1627
- type: "task-group";
1628
1627
  code: string;
1628
+ type: "task-group";
1629
1629
  title: string;
1630
1630
  items: {
1631
- type: "task";
1632
1631
  code: string;
1632
+ type: "task";
1633
1633
  title: string;
1634
1634
  items: {
1635
- type: "task-item";
1636
1635
  code: string;
1636
+ type: "task-item";
1637
1637
  definition: {
1638
1638
  type: "select-single";
1639
1639
  options: {
@@ -1819,24 +1819,24 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
1819
1819
  hideFromHierarchy?: boolean | undefined;
1820
1820
  }>>;
1821
1821
  }>, "strip", z.ZodTypeAny, {
1822
- type: "theme";
1823
1822
  code: string;
1823
+ type: "theme";
1824
1824
  title: string;
1825
1825
  items: {
1826
- type: "criterion";
1827
1826
  code: string;
1827
+ type: "criterion";
1828
1828
  title: string;
1829
1829
  items: {
1830
- type: "task-group";
1831
1830
  code: string;
1831
+ type: "task-group";
1832
1832
  title: string;
1833
1833
  items: {
1834
- type: "task";
1835
1834
  code: string;
1835
+ type: "task";
1836
1836
  title: string;
1837
1837
  items: {
1838
- type: "task-item";
1839
1838
  code: string;
1839
+ type: "task-item";
1840
1840
  definition: {
1841
1841
  type: "select-single";
1842
1842
  options: {
@@ -2058,24 +2058,24 @@ export declare const themeSchema: z.ZodObject<z.objectUtil.extendShape<{
2058
2058
  })[] | undefined;
2059
2059
  sortOrder?: number | undefined;
2060
2060
  }, {
2061
- type: "theme";
2062
2061
  code: string;
2062
+ type: "theme";
2063
2063
  title: string;
2064
2064
  items: {
2065
- type: "criterion";
2066
2065
  code: string;
2066
+ type: "criterion";
2067
2067
  title: string;
2068
2068
  items: {
2069
- type: "task-group";
2070
2069
  code: string;
2070
+ type: "task-group";
2071
2071
  title: string;
2072
2072
  items: {
2073
- type: "task";
2074
2073
  code: string;
2074
+ type: "task";
2075
2075
  title: string;
2076
2076
  items: {
2077
- type: "task-item";
2078
2077
  code: string;
2078
+ type: "task-item";
2079
2079
  definition: {
2080
2080
  type: "select-single";
2081
2081
  options: {
@@ -1,5 +1,2 @@
1
1
  import { z, ZodTypeDef } from "zod";
2
- /**
3
- * Create a new schema that allows null and undefined values. It differs from nullish() in that it coerces null to undefined.
4
- */
5
- export declare const optional: <T, O>(typeSchema: z.ZodType<T, z.ZodTypeDef, O>) => z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodType<T, z.ZodTypeDef, O>>>, (T & {}) | undefined, O | null | undefined>, z.ZodOptional<z.ZodType<T, z.ZodTypeDef, O>>>;
2
+ export declare const optional: <T, O>(typeSchema: z.ZodType<T, ZodTypeDef, O>) => z.ZodOptional<z.ZodType<T, z.ZodTypeDef, O>>;
@@ -1,11 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optional = void 0;
4
- /**
5
- * Create a new schema that allows null and undefined values. It differs from nullish() in that it coerces null to undefined.
6
- */
7
- const optional = (typeSchema) => typeSchema
8
- .nullish()
9
- .transform((value) => (value === null ? undefined : value))
10
- .pipe(typeSchema.optional());
4
+ const optional = (typeSchema) => typeSchema.optional();
11
5
  exports.optional = optional;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { CriteriaTree, DataMap, Metadata } from "./criteria";
3
2
  import { matrixRequestBodySchema, streamMatrixResponseSchema, treeAndDataRequestBodySchema } from "../schemas";
4
3
  import { z } from "zod";