@openframe-org/criteria-set-protocol 2.0.0 → 2.0.1
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/README.md +34 -27
- package/dist/index.d.ts +1 -1
- package/dist/v1/errors/DataValidationError.d.ts +1 -1
- package/dist/v1/errors/DataValidationError.js +1 -1
- package/dist/v1/errors/ParameterValidationError.d.ts +1 -1
- package/dist/v1/errors/ParameterValidationError.js +1 -1
- package/dist/v1/errors/ValidationError.d.ts +1 -1
- package/dist/v1/errors/ValidationError.js +1 -1
- package/dist/v1/errors/index.d.ts +4 -4
- package/dist/v1/errors/types.d.ts +1 -1
- package/dist/v1/index.d.ts +5 -5
- package/dist/v1/schemas/certification.d.ts +1 -1
- package/dist/v1/schemas/certification.js +19 -13
- package/dist/v1/schemas/common.d.ts +13 -11
- package/dist/v1/schemas/common.js +27 -11
- package/dist/v1/schemas/criteria-tree.d.ts +365 -311
- package/dist/v1/schemas/criteria-tree.js +13 -5
- package/dist/v1/schemas/criterion.d.ts +68 -58
- package/dist/v1/schemas/criterion.js +4 -4
- package/dist/v1/schemas/data-map.d.ts +1 -1
- package/dist/v1/schemas/data-map.js +1 -1
- package/dist/v1/schemas/documentation.d.ts +1 -1
- package/dist/v1/schemas/documentation.js +9 -5
- package/dist/v1/schemas/index.d.ts +13 -13
- package/dist/v1/schemas/metadata.d.ts +1 -1
- package/dist/v1/schemas/metadata.js +6 -6
- package/dist/v1/schemas/quality.d.ts +469 -141
- package/dist/v1/schemas/quality.js +7 -7
- package/dist/v1/schemas/request/criteria-set-id-param-schema.d.ts +1 -1
- package/dist/v1/schemas/request/criteria-set-id-param-schema.js +3 -2
- package/dist/v1/schemas/request/index.d.ts +4 -4
- package/dist/v1/schemas/request/matrix-body-schema.d.ts +1 -1
- package/dist/v1/schemas/request/matrix-body-schema.js +5 -3
- package/dist/v1/schemas/request/matrix-request-body-schema.d.ts +1 -1
- package/dist/v1/schemas/request/matrix-request-body-schema.js +8 -6
- package/dist/v1/schemas/request/tree-and-data-body-schema.d.ts +1 -1
- package/dist/v1/schemas/request/tree-and-data-body-schema.js +5 -3
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.d.ts +1 -1
- package/dist/v1/schemas/request/tree-and-data-request-body-schema.js +7 -5
- package/dist/v1/schemas/request/version-param-schema.d.ts +1 -1
- package/dist/v1/schemas/request/version-param-schema.js +3 -2
- package/dist/v1/schemas/response.d.ts +2 -2
- package/dist/v1/schemas/response.js +1 -1
- package/dist/v1/schemas/task-group.d.ts +47 -39
- package/dist/v1/schemas/task-group.js +5 -5
- package/dist/v1/schemas/task-item.d.ts +23 -20
- package/dist/v1/schemas/task-item.js +29 -35
- package/dist/v1/schemas/task.d.ts +30 -24
- package/dist/v1/schemas/task.js +4 -4
- package/dist/v1/schemas/theme.d.ts +93 -81
- package/dist/v1/schemas/theme.js +4 -4
- package/dist/v1/services/i-criteria-set.service.d.ts +1 -1
- package/dist/v1/services/index.d.ts +2 -2
- package/dist/v1/services/manager.service.js +4 -1
- package/dist/v1/types/criteria.d.ts +2 -2
- package/dist/v1/types/express.d.ts +3 -3
- package/dist/v1/types/index.d.ts +2 -2
- package/dist/v1/utils.d.ts +38 -33
- package/dist/v1/utils.js +6 -6
- package/package.json +11 -3
|
@@ -2,28 +2,28 @@
|
|
|
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");
|
|
6
5
|
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({
|
|
10
10
|
red: zod_1.z.number(),
|
|
11
11
|
green: zod_1.z.number(),
|
|
12
|
-
blue: zod_1.z.number()
|
|
13
|
-
})
|
|
12
|
+
blue: zod_1.z.number(),
|
|
13
|
+
}),
|
|
14
14
|
]);
|
|
15
15
|
exports.qualityStyleSchema = zod_1.z.object({
|
|
16
16
|
primaryColor: exports.colorSchema,
|
|
17
|
-
secondaryColor: exports.colorSchema
|
|
17
|
+
secondaryColor: exports.colorSchema,
|
|
18
18
|
});
|
|
19
19
|
exports.qualitySchema = zod_1.z.object({
|
|
20
|
-
type: zod_1.z.literal(
|
|
20
|
+
type: zod_1.z.literal("quality"),
|
|
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(
|
|
24
|
+
documentation: zod_1.z.array(documentation_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(),
|
|
28
|
-
items: zod_1.z.array(criterion_1.criterionSchema)
|
|
28
|
+
items: zod_1.z.array(criterion_1.criterionSchema),
|
|
29
29
|
});
|
|
@@ -6,6 +6,7 @@ const zod_1 = require("zod");
|
|
|
6
6
|
* Validates the criteriaSetId parameter for endpoints which use it
|
|
7
7
|
*/
|
|
8
8
|
exports.criteriaSetIdParamSchema = zod_1.z.object({
|
|
9
|
-
criteriaSetId: zod_1.z
|
|
10
|
-
.
|
|
9
|
+
criteriaSetId: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.regex(/^[a-zA-Z0-9.\-_]+$/, "Criteria set ID must contain only full stops, alphanumeric characters, dashes and underscores"),
|
|
11
12
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./criteria-set-id-param-schema";
|
|
2
|
+
export * from "./matrix-request-body-schema";
|
|
3
|
+
export * from "./tree-and-data-request-body-schema";
|
|
4
|
+
export * from "./version-param-schema";
|
|
@@ -6,9 +6,11 @@ const task_item_1 = require("../task-item");
|
|
|
6
6
|
/**
|
|
7
7
|
* Validates the request body for the matrix endpoints
|
|
8
8
|
*/
|
|
9
|
-
exports.matrixBodySchema = zod_1.z
|
|
9
|
+
exports.matrixBodySchema = zod_1.z
|
|
10
|
+
.object({
|
|
10
11
|
locale: zod_1.z.string().optional(),
|
|
11
12
|
parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
12
13
|
values: task_item_1.taskItemValueMapSchema.optional(),
|
|
13
|
-
additional: zod_1.z.any().optional()
|
|
14
|
-
})
|
|
14
|
+
additional: zod_1.z.any().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional();
|
|
@@ -6,9 +6,11 @@ const task_item_1 = require("../task-item");
|
|
|
6
6
|
/**
|
|
7
7
|
* Validates the request body for the matrix endpoints
|
|
8
8
|
*/
|
|
9
|
-
exports.matrixRequestBodySchema = zod_1.z
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
exports.matrixRequestBodySchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
locale: zod_1.z.string().optional(),
|
|
12
|
+
parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
13
|
+
values: task_item_1.taskItemValueMapSchema.optional(),
|
|
14
|
+
additional: zod_1.z.any().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional();
|
|
@@ -6,8 +6,10 @@ const task_item_1 = require("../task-item");
|
|
|
6
6
|
/**
|
|
7
7
|
* Validates the request body for the tree and data endpoints
|
|
8
8
|
*/
|
|
9
|
-
exports.treeAndDataBodySchema = zod_1.z
|
|
9
|
+
exports.treeAndDataBodySchema = zod_1.z
|
|
10
|
+
.object({
|
|
10
11
|
locale: zod_1.z.string().optional(),
|
|
11
12
|
parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
12
|
-
values: task_item_1.taskItemValueMapSchema.optional()
|
|
13
|
-
})
|
|
13
|
+
values: task_item_1.taskItemValueMapSchema.optional(),
|
|
14
|
+
})
|
|
15
|
+
.optional();
|
|
@@ -6,8 +6,10 @@ const task_item_1 = require("../task-item");
|
|
|
6
6
|
/**
|
|
7
7
|
* Validates the request body for the tree and data endpoints
|
|
8
8
|
*/
|
|
9
|
-
exports.treeAndDataRequestBodySchema = zod_1.z
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
exports.treeAndDataRequestBodySchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
locale: zod_1.z.string().optional(),
|
|
12
|
+
parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
13
|
+
values: task_item_1.taskItemValueMapSchema.optional(),
|
|
14
|
+
})
|
|
15
|
+
.optional();
|
|
@@ -6,6 +6,7 @@ const zod_1 = require("zod");
|
|
|
6
6
|
* Validates the version parameter for endpoints which use it
|
|
7
7
|
*/
|
|
8
8
|
exports.versionParamSchema = zod_1.z.object({
|
|
9
|
-
version: zod_1.z
|
|
10
|
-
.
|
|
9
|
+
version: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.regex(/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/, "Service version must be a SemVer-formatted string which includes exclusively a major, minor and patch version"),
|
|
11
12
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { z } from
|
|
3
|
-
import { Stream } from
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Stream } from "stream";
|
|
4
4
|
export declare const criteriaSetsAndVersionsSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
version: z.ZodString;
|
|
@@ -8,5 +8,5 @@ exports.criteriaSetsAndVersionsSchema = zod_1.z.record(zod_1.z.string(), zod_1.z
|
|
|
8
8
|
exports.streamMatrixResponseSchema = zod_1.z.object({
|
|
9
9
|
filename: zod_1.z.string(),
|
|
10
10
|
contentType: zod_1.z.string(),
|
|
11
|
-
stream: zod_1.z.instanceof(stream_1.Stream)
|
|
11
|
+
stream: zod_1.z.instanceof(stream_1.Stream),
|
|
12
12
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const taskGroupOptionsSchema: z.ZodObject<{
|
|
3
3
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
4
4
|
hideFromHierarchy: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -63,16 +63,16 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
63
63
|
label: string;
|
|
64
64
|
text: string;
|
|
65
65
|
}>]>, "many">>;
|
|
66
|
-
data: z.ZodOptional<z.
|
|
66
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
67
67
|
value: z.ZodOptional<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">]>>;
|
|
68
|
-
text: z.ZodOptional<z.
|
|
68
|
+
text: z.ZodOptional<z.ZodString>;
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
70
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
71
71
|
text?: string | undefined;
|
|
72
72
|
}, {
|
|
73
73
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
74
74
|
text?: string | undefined;
|
|
75
|
-
}
|
|
75
|
+
}>>;
|
|
76
76
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
77
77
|
}, {
|
|
78
78
|
type: z.ZodLiteral<"task-group">;
|
|
@@ -131,16 +131,16 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
131
131
|
label: string;
|
|
132
132
|
text: string;
|
|
133
133
|
}>]>, "many">>;
|
|
134
|
-
data: z.ZodOptional<z.
|
|
134
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
135
135
|
value: z.ZodOptional<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">]>>;
|
|
136
|
-
text: z.ZodOptional<z.
|
|
136
|
+
text: z.ZodOptional<z.ZodString>;
|
|
137
137
|
}, "strip", z.ZodTypeAny, {
|
|
138
138
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
139
139
|
text?: string | undefined;
|
|
140
140
|
}, {
|
|
141
141
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
142
142
|
text?: string | undefined;
|
|
143
|
-
}
|
|
143
|
+
}>>;
|
|
144
144
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
145
145
|
}, {
|
|
146
146
|
type: z.ZodLiteral<"task">;
|
|
@@ -199,24 +199,25 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
199
199
|
label: string;
|
|
200
200
|
text: string;
|
|
201
201
|
}>]>, "many">>;
|
|
202
|
-
data: z.ZodOptional<z.
|
|
202
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
203
203
|
value: z.ZodOptional<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">]>>;
|
|
204
|
-
text: z.ZodOptional<z.
|
|
204
|
+
text: z.ZodOptional<z.ZodString>;
|
|
205
205
|
}, "strip", z.ZodTypeAny, {
|
|
206
206
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
207
207
|
text?: string | undefined;
|
|
208
208
|
}, {
|
|
209
209
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
210
210
|
text?: string | undefined;
|
|
211
|
-
}
|
|
211
|
+
}>>;
|
|
212
212
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
213
213
|
}, {
|
|
214
214
|
type: z.ZodLiteral<"task-item">;
|
|
215
|
-
data: z.ZodOptional<z.
|
|
215
|
+
data: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
216
216
|
value: z.ZodOptional<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">]>>;
|
|
217
|
-
text: z.ZodOptional<z.
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
text: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, {
|
|
219
|
+
valueReference: z.ZodOptional<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">]>>;
|
|
220
|
+
}>, "strip", z.ZodTypeAny, {
|
|
220
221
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
221
222
|
text?: string | undefined;
|
|
222
223
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
@@ -224,7 +225,7 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
224
225
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
225
226
|
text?: string | undefined;
|
|
226
227
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
227
|
-
}
|
|
228
|
+
}>>;
|
|
228
229
|
definition: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
229
230
|
type: z.ZodEnum<["select-single", "select-multiple", "number", "boolean"]>;
|
|
230
231
|
}, {
|
|
@@ -353,6 +354,7 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
353
354
|
}>]>;
|
|
354
355
|
description: z.ZodOptional<z.ZodString>;
|
|
355
356
|
providedData: 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">]>>>;
|
|
357
|
+
valueReference: z.ZodOptional<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">]>>;
|
|
356
358
|
options: z.ZodOptional<z.ZodObject<{
|
|
357
359
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
358
360
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -394,11 +396,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
394
396
|
true: string;
|
|
395
397
|
} | undefined;
|
|
396
398
|
};
|
|
397
|
-
data?:
|
|
399
|
+
data?: {
|
|
398
400
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
399
401
|
text?: string | undefined;
|
|
400
402
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
401
|
-
}
|
|
403
|
+
} | undefined;
|
|
402
404
|
options?: {
|
|
403
405
|
hideCode?: boolean | undefined;
|
|
404
406
|
} | undefined;
|
|
@@ -420,6 +422,7 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
420
422
|
text: string;
|
|
421
423
|
})[] | undefined;
|
|
422
424
|
sortOrder?: number | undefined;
|
|
425
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
423
426
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
424
427
|
}, {
|
|
425
428
|
type: "task-item";
|
|
@@ -455,11 +458,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
455
458
|
true: string;
|
|
456
459
|
} | undefined;
|
|
457
460
|
};
|
|
458
|
-
data?:
|
|
461
|
+
data?: {
|
|
459
462
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
460
463
|
text?: string | undefined;
|
|
461
464
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
462
|
-
}
|
|
465
|
+
} | undefined;
|
|
463
466
|
options?: {
|
|
464
467
|
hideCode?: boolean | undefined;
|
|
465
468
|
} | undefined;
|
|
@@ -481,6 +484,7 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
481
484
|
text: string;
|
|
482
485
|
})[] | undefined;
|
|
483
486
|
sortOrder?: number | undefined;
|
|
487
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
484
488
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
485
489
|
}>>, "many">;
|
|
486
490
|
options: z.ZodOptional<z.ZodObject<{
|
|
@@ -528,11 +532,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
528
532
|
true: string;
|
|
529
533
|
} | undefined;
|
|
530
534
|
};
|
|
531
|
-
data?:
|
|
535
|
+
data?: {
|
|
532
536
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
533
537
|
text?: string | undefined;
|
|
534
538
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
535
|
-
}
|
|
539
|
+
} | undefined;
|
|
536
540
|
options?: {
|
|
537
541
|
hideCode?: boolean | undefined;
|
|
538
542
|
} | undefined;
|
|
@@ -554,12 +558,13 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
554
558
|
text: string;
|
|
555
559
|
})[] | undefined;
|
|
556
560
|
sortOrder?: number | undefined;
|
|
561
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
557
562
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
558
563
|
}[];
|
|
559
|
-
data?:
|
|
564
|
+
data?: {
|
|
560
565
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
561
566
|
text?: string | undefined;
|
|
562
|
-
}
|
|
567
|
+
} | undefined;
|
|
563
568
|
options?: {
|
|
564
569
|
hideCode?: boolean | undefined;
|
|
565
570
|
} | undefined;
|
|
@@ -619,11 +624,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
619
624
|
true: string;
|
|
620
625
|
} | undefined;
|
|
621
626
|
};
|
|
622
|
-
data?:
|
|
627
|
+
data?: {
|
|
623
628
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
624
629
|
text?: string | undefined;
|
|
625
630
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
626
|
-
}
|
|
631
|
+
} | undefined;
|
|
627
632
|
options?: {
|
|
628
633
|
hideCode?: boolean | undefined;
|
|
629
634
|
} | undefined;
|
|
@@ -645,12 +650,13 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
645
650
|
text: string;
|
|
646
651
|
})[] | undefined;
|
|
647
652
|
sortOrder?: number | undefined;
|
|
653
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
648
654
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
649
655
|
}[];
|
|
650
|
-
data?:
|
|
656
|
+
data?: {
|
|
651
657
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
652
658
|
text?: string | undefined;
|
|
653
|
-
}
|
|
659
|
+
} | undefined;
|
|
654
660
|
options?: {
|
|
655
661
|
hideCode?: boolean | undefined;
|
|
656
662
|
} | undefined;
|
|
@@ -725,11 +731,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
725
731
|
true: string;
|
|
726
732
|
} | undefined;
|
|
727
733
|
};
|
|
728
|
-
data?:
|
|
734
|
+
data?: {
|
|
729
735
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
730
736
|
text?: string | undefined;
|
|
731
737
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
732
|
-
}
|
|
738
|
+
} | undefined;
|
|
733
739
|
options?: {
|
|
734
740
|
hideCode?: boolean | undefined;
|
|
735
741
|
} | undefined;
|
|
@@ -751,12 +757,13 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
751
757
|
text: string;
|
|
752
758
|
})[] | undefined;
|
|
753
759
|
sortOrder?: number | undefined;
|
|
760
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
754
761
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
755
762
|
}[];
|
|
756
|
-
data?:
|
|
763
|
+
data?: {
|
|
757
764
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
758
765
|
text?: string | undefined;
|
|
759
|
-
}
|
|
766
|
+
} | undefined;
|
|
760
767
|
options?: {
|
|
761
768
|
hideCode?: boolean | undefined;
|
|
762
769
|
} | undefined;
|
|
@@ -779,10 +786,10 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
779
786
|
})[] | undefined;
|
|
780
787
|
sortOrder?: number | undefined;
|
|
781
788
|
}[];
|
|
782
|
-
data?:
|
|
789
|
+
data?: {
|
|
783
790
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
784
791
|
text?: string | undefined;
|
|
785
|
-
}
|
|
792
|
+
} | undefined;
|
|
786
793
|
options?: {
|
|
787
794
|
hideCode?: boolean | undefined;
|
|
788
795
|
hideFromHierarchy?: boolean | undefined;
|
|
@@ -847,11 +854,11 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
847
854
|
true: string;
|
|
848
855
|
} | undefined;
|
|
849
856
|
};
|
|
850
|
-
data?:
|
|
857
|
+
data?: {
|
|
851
858
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
852
859
|
text?: string | undefined;
|
|
853
860
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
854
|
-
}
|
|
861
|
+
} | undefined;
|
|
855
862
|
options?: {
|
|
856
863
|
hideCode?: boolean | undefined;
|
|
857
864
|
} | undefined;
|
|
@@ -873,12 +880,13 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
873
880
|
text: string;
|
|
874
881
|
})[] | undefined;
|
|
875
882
|
sortOrder?: number | undefined;
|
|
883
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
876
884
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
877
885
|
}[];
|
|
878
|
-
data?:
|
|
886
|
+
data?: {
|
|
879
887
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
880
888
|
text?: string | undefined;
|
|
881
|
-
}
|
|
889
|
+
} | undefined;
|
|
882
890
|
options?: {
|
|
883
891
|
hideCode?: boolean | undefined;
|
|
884
892
|
} | undefined;
|
|
@@ -901,10 +909,10 @@ export declare const taskGroupSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
901
909
|
})[] | undefined;
|
|
902
910
|
sortOrder?: number | undefined;
|
|
903
911
|
}[];
|
|
904
|
-
data?:
|
|
912
|
+
data?: {
|
|
905
913
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
906
914
|
text?: string | undefined;
|
|
907
|
-
}
|
|
915
|
+
} | undefined;
|
|
908
916
|
options?: {
|
|
909
917
|
hideCode?: boolean | undefined;
|
|
910
918
|
hideFromHierarchy?: boolean | undefined;
|
|
@@ -5,12 +5,12 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const task_1 = require("./task");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
exports.taskGroupOptionsSchema = zod_1.z.object({
|
|
8
|
-
hideCode:
|
|
9
|
-
hideFromHierarchy:
|
|
8
|
+
hideCode: zod_1.z.boolean().optional(),
|
|
9
|
+
hideFromHierarchy: zod_1.z.boolean().optional(),
|
|
10
10
|
});
|
|
11
11
|
exports.taskGroupSchema = common_1.abstractElementSchema.extend({
|
|
12
|
-
type: zod_1.z.literal(
|
|
13
|
-
category:
|
|
12
|
+
type: zod_1.z.literal("task-group"),
|
|
13
|
+
category: zod_1.z.string().optional(),
|
|
14
14
|
items: zod_1.z.array(zod_1.z.lazy(() => task_1.taskSchema)),
|
|
15
|
-
options:
|
|
15
|
+
options: exports.taskGroupOptionsSchema.optional(),
|
|
16
16
|
});
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
export declare const taskItemScalarValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
3
|
-
export declare const taskItemValueSchema: 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">]>;
|
|
1
|
+
import { z } from "zod";
|
|
4
2
|
export declare const taskItemValueMapSchema: 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">]>>;
|
|
5
3
|
export declare const pointOptionSchema: z.ZodObject<{
|
|
6
4
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -276,11 +274,12 @@ export declare const taskItemDefinitionSchema: z.ZodDiscriminatedUnion<"type", [
|
|
|
276
274
|
true: string;
|
|
277
275
|
} | undefined;
|
|
278
276
|
}>]>;
|
|
279
|
-
export declare const taskItemDataSchema: z.
|
|
277
|
+
export declare const taskItemDataSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
280
278
|
value: z.ZodOptional<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">]>>;
|
|
281
|
-
text: z.ZodOptional<z.
|
|
282
|
-
|
|
283
|
-
|
|
279
|
+
text: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, {
|
|
281
|
+
valueReference: z.ZodOptional<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">]>>;
|
|
282
|
+
}>, "strip", z.ZodTypeAny, {
|
|
284
283
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
285
284
|
text?: string | undefined;
|
|
286
285
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
@@ -288,7 +287,7 @@ export declare const taskItemDataSchema: z.ZodIntersection<z.ZodRecord<z.ZodStri
|
|
|
288
287
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
289
288
|
text?: string | undefined;
|
|
290
289
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
291
|
-
}
|
|
290
|
+
}>;
|
|
292
291
|
export declare const taskItemOptionsSchema: z.ZodObject<{
|
|
293
292
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
294
293
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -350,24 +349,25 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
350
349
|
label: string;
|
|
351
350
|
text: string;
|
|
352
351
|
}>]>, "many">>;
|
|
353
|
-
data: z.ZodOptional<z.
|
|
352
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
354
353
|
value: z.ZodOptional<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">]>>;
|
|
355
|
-
text: z.ZodOptional<z.
|
|
354
|
+
text: z.ZodOptional<z.ZodString>;
|
|
356
355
|
}, "strip", z.ZodTypeAny, {
|
|
357
356
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
358
357
|
text?: string | undefined;
|
|
359
358
|
}, {
|
|
360
359
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
361
360
|
text?: string | undefined;
|
|
362
|
-
}
|
|
361
|
+
}>>;
|
|
363
362
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
364
363
|
}, {
|
|
365
364
|
type: z.ZodLiteral<"task-item">;
|
|
366
|
-
data: z.ZodOptional<z.
|
|
365
|
+
data: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
367
366
|
value: z.ZodOptional<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">]>>;
|
|
368
|
-
text: z.ZodOptional<z.
|
|
369
|
-
|
|
370
|
-
|
|
367
|
+
text: z.ZodOptional<z.ZodString>;
|
|
368
|
+
}, {
|
|
369
|
+
valueReference: z.ZodOptional<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">]>>;
|
|
370
|
+
}>, "strip", z.ZodTypeAny, {
|
|
371
371
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
372
372
|
text?: string | undefined;
|
|
373
373
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
@@ -375,7 +375,7 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
375
375
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
376
376
|
text?: string | undefined;
|
|
377
377
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
378
|
-
}
|
|
378
|
+
}>>;
|
|
379
379
|
definition: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
380
380
|
type: z.ZodEnum<["select-single", "select-multiple", "number", "boolean"]>;
|
|
381
381
|
}, {
|
|
@@ -504,6 +504,7 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
504
504
|
}>]>;
|
|
505
505
|
description: z.ZodOptional<z.ZodString>;
|
|
506
506
|
providedData: 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">]>>>;
|
|
507
|
+
valueReference: z.ZodOptional<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">]>>;
|
|
507
508
|
options: z.ZodOptional<z.ZodObject<{
|
|
508
509
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
509
510
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -545,11 +546,11 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
545
546
|
true: string;
|
|
546
547
|
} | undefined;
|
|
547
548
|
};
|
|
548
|
-
data?:
|
|
549
|
+
data?: {
|
|
549
550
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
550
551
|
text?: string | undefined;
|
|
551
552
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
552
|
-
}
|
|
553
|
+
} | undefined;
|
|
553
554
|
options?: {
|
|
554
555
|
hideCode?: boolean | undefined;
|
|
555
556
|
} | undefined;
|
|
@@ -571,6 +572,7 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
571
572
|
text: string;
|
|
572
573
|
})[] | undefined;
|
|
573
574
|
sortOrder?: number | undefined;
|
|
575
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
574
576
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
575
577
|
}, {
|
|
576
578
|
type: "task-item";
|
|
@@ -606,11 +608,11 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
606
608
|
true: string;
|
|
607
609
|
} | undefined;
|
|
608
610
|
};
|
|
609
|
-
data?:
|
|
611
|
+
data?: {
|
|
610
612
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
611
613
|
text?: string | undefined;
|
|
612
614
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
613
|
-
}
|
|
615
|
+
} | undefined;
|
|
614
616
|
options?: {
|
|
615
617
|
hideCode?: boolean | undefined;
|
|
616
618
|
} | undefined;
|
|
@@ -632,5 +634,6 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
632
634
|
text: string;
|
|
633
635
|
})[] | undefined;
|
|
634
636
|
sortOrder?: number | undefined;
|
|
637
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
635
638
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
636
639
|
}>;
|