@openframe-org/criteria-set-protocol 2.0.0 → 2.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/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 +377 -365
- package/dist/v1/schemas/criteria-tree.js +13 -5
- package/dist/v1/schemas/criterion.d.ts +70 -68
- 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 +49 -47
- package/dist/v1/schemas/task-group.js +5 -5
- package/dist/v1/schemas/task-item.d.ts +25 -24
- package/dist/v1/schemas/task-item.js +30 -36
- package/dist/v1/schemas/task.d.ts +32 -30
- package/dist/v1/schemas/task.js +4 -4
- package/dist/v1/schemas/theme.d.ts +95 -93
- 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 -38
- package/dist/v1/utils.js +6 -6
- package/package.json +11 -3
|
@@ -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, {
|
|
@@ -296,7 +295,7 @@ export declare const taskItemOptionsSchema: z.ZodObject<{
|
|
|
296
295
|
}, {
|
|
297
296
|
hideCode?: boolean | undefined;
|
|
298
297
|
}>;
|
|
299
|
-
export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
298
|
+
export declare const taskItemSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
300
299
|
type: z.ZodEnum<["theme", "criterion", "task-group", "task", "task-item"]>;
|
|
301
300
|
title: z.ZodString;
|
|
302
301
|
code: z.ZodString;
|
|
@@ -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, {
|
|
@@ -511,10 +512,9 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
511
512
|
}, {
|
|
512
513
|
hideCode?: boolean | undefined;
|
|
513
514
|
}>>;
|
|
514
|
-
}>, "strip", z.ZodTypeAny, {
|
|
515
|
+
}>, "title">, "strip", z.ZodTypeAny, {
|
|
515
516
|
type: "task-item";
|
|
516
517
|
code: string;
|
|
517
|
-
title: string;
|
|
518
518
|
definition: {
|
|
519
519
|
type: "select-single";
|
|
520
520
|
options: {
|
|
@@ -545,11 +545,11 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
545
545
|
true: string;
|
|
546
546
|
} | undefined;
|
|
547
547
|
};
|
|
548
|
-
data?:
|
|
548
|
+
data?: {
|
|
549
549
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
550
550
|
text?: string | undefined;
|
|
551
551
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
552
|
-
}
|
|
552
|
+
} | undefined;
|
|
553
553
|
options?: {
|
|
554
554
|
hideCode?: boolean | undefined;
|
|
555
555
|
} | undefined;
|
|
@@ -571,11 +571,11 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
571
571
|
text: string;
|
|
572
572
|
})[] | undefined;
|
|
573
573
|
sortOrder?: number | undefined;
|
|
574
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
574
575
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
575
576
|
}, {
|
|
576
577
|
type: "task-item";
|
|
577
578
|
code: string;
|
|
578
|
-
title: string;
|
|
579
579
|
definition: {
|
|
580
580
|
type: "select-single";
|
|
581
581
|
options: {
|
|
@@ -606,11 +606,11 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
606
606
|
true: string;
|
|
607
607
|
} | undefined;
|
|
608
608
|
};
|
|
609
|
-
data?:
|
|
609
|
+
data?: {
|
|
610
610
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
611
611
|
text?: string | undefined;
|
|
612
612
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
613
|
-
}
|
|
613
|
+
} | undefined;
|
|
614
614
|
options?: {
|
|
615
615
|
hideCode?: boolean | undefined;
|
|
616
616
|
} | undefined;
|
|
@@ -632,5 +632,6 @@ export declare const taskItemSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
632
632
|
text: string;
|
|
633
633
|
})[] | undefined;
|
|
634
634
|
sortOrder?: number | undefined;
|
|
635
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
635
636
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
636
637
|
}>;
|
|
@@ -1,66 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.taskItemSchema = exports.taskItemOptionsSchema = exports.taskItemDataSchema = exports.taskItemDefinitionSchema = exports.booleanTypeSchema = exports.numberTypeSchema = exports.selectMultipleTypeSchema = exports.selectSingleTypeSchema = exports.pointOptionSchema = exports.taskItemValueMapSchema =
|
|
3
|
+
exports.taskItemSchema = exports.taskItemOptionsSchema = exports.taskItemDataSchema = exports.taskItemDefinitionSchema = exports.booleanTypeSchema = exports.numberTypeSchema = exports.selectMultipleTypeSchema = exports.selectSingleTypeSchema = exports.pointOptionSchema = exports.taskItemValueMapSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
|
-
exports.
|
|
7
|
-
zod_1.z.string(),
|
|
8
|
-
zod_1.z.number(),
|
|
9
|
-
zod_1.z.boolean(),
|
|
10
|
-
zod_1.z.null()
|
|
11
|
-
]);
|
|
12
|
-
exports.taskItemValueSchema = zod_1.z.union([exports.taskItemScalarValueSchema, zod_1.z.array(exports.taskItemScalarValueSchema)]);
|
|
13
|
-
exports.taskItemValueMapSchema = zod_1.z.record(zod_1.z.string(), exports.taskItemValueSchema);
|
|
6
|
+
exports.taskItemValueMapSchema = zod_1.z.record(zod_1.z.string(), common_1.taskItemValueSchema);
|
|
14
7
|
exports.pointOptionSchema = zod_1.z.object({
|
|
15
|
-
id:
|
|
8
|
+
id: zod_1.z.string().optional(),
|
|
16
9
|
text: zod_1.z.string(),
|
|
17
|
-
intro:
|
|
18
|
-
outro:
|
|
10
|
+
intro: zod_1.z.string().optional(),
|
|
11
|
+
outro: zod_1.z.string().optional(),
|
|
19
12
|
value: zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null()]),
|
|
20
13
|
});
|
|
21
14
|
const abstractDefinitionSchema = zod_1.z.object({
|
|
22
|
-
type: zod_1.z.enum([
|
|
15
|
+
type: zod_1.z.enum(["select-single", "select-multiple", "number", "boolean"]),
|
|
23
16
|
});
|
|
24
17
|
exports.selectSingleTypeSchema = abstractDefinitionSchema.extend({
|
|
25
|
-
type: zod_1.z.literal(
|
|
18
|
+
type: zod_1.z.literal("select-single"),
|
|
26
19
|
options: zod_1.z.array(exports.pointOptionSchema),
|
|
27
20
|
});
|
|
28
21
|
exports.selectMultipleTypeSchema = abstractDefinitionSchema.extend({
|
|
29
|
-
type: zod_1.z.literal(
|
|
22
|
+
type: zod_1.z.literal("select-multiple"),
|
|
30
23
|
options: zod_1.z.array(exports.pointOptionSchema),
|
|
31
24
|
});
|
|
32
25
|
exports.numberTypeSchema = abstractDefinitionSchema.extend({
|
|
33
|
-
type: zod_1.z.literal(
|
|
34
|
-
minimum:
|
|
35
|
-
maximum:
|
|
36
|
-
step:
|
|
26
|
+
type: zod_1.z.literal("number"),
|
|
27
|
+
minimum: zod_1.z.number().optional(),
|
|
28
|
+
maximum: zod_1.z.number().optional(),
|
|
29
|
+
step: zod_1.z.number().optional(),
|
|
37
30
|
});
|
|
38
31
|
exports.booleanTypeSchema = abstractDefinitionSchema.extend({
|
|
39
|
-
type: zod_1.z.literal(
|
|
40
|
-
labels:
|
|
32
|
+
type: zod_1.z.literal("boolean"),
|
|
33
|
+
labels: zod_1.z
|
|
34
|
+
.object({
|
|
41
35
|
true: zod_1.z.string(),
|
|
42
36
|
false: zod_1.z.string(),
|
|
43
|
-
})
|
|
37
|
+
})
|
|
38
|
+
.optional(),
|
|
44
39
|
});
|
|
45
|
-
exports.taskItemDefinitionSchema = zod_1.z.discriminatedUnion(
|
|
40
|
+
exports.taskItemDefinitionSchema = zod_1.z.discriminatedUnion("type", [
|
|
46
41
|
exports.selectSingleTypeSchema,
|
|
47
42
|
exports.selectMultipleTypeSchema,
|
|
48
43
|
exports.numberTypeSchema,
|
|
49
|
-
exports.booleanTypeSchema
|
|
44
|
+
exports.booleanTypeSchema,
|
|
50
45
|
]);
|
|
51
|
-
exports.taskItemDataSchema =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
valueReference: (0, zod_1.optional)(exports.taskItemValueSchema),
|
|
55
|
-
}).partial());
|
|
46
|
+
exports.taskItemDataSchema = common_1.elementDataSchema.extend({
|
|
47
|
+
valueReference: common_1.taskItemValueSchema.optional(),
|
|
48
|
+
});
|
|
56
49
|
exports.taskItemOptionsSchema = zod_1.z.object({
|
|
57
|
-
hideCode:
|
|
50
|
+
hideCode: zod_1.z.boolean().optional(),
|
|
58
51
|
});
|
|
59
52
|
exports.taskItemSchema = common_1.abstractElementSchema.extend({
|
|
60
|
-
type: zod_1.z.literal(
|
|
61
|
-
data:
|
|
53
|
+
type: zod_1.z.literal("task-item"),
|
|
54
|
+
data: exports.taskItemDataSchema.optional(),
|
|
62
55
|
definition: exports.taskItemDefinitionSchema,
|
|
63
|
-
description:
|
|
64
|
-
providedData:
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
description: zod_1.z.string().optional(),
|
|
57
|
+
providedData: exports.taskItemValueMapSchema.optional(),
|
|
58
|
+
valueReference: common_1.taskItemValueSchema.optional(),
|
|
59
|
+
options: exports.taskItemOptionsSchema.optional(),
|
|
60
|
+
}).omit({ title: true });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from "zod";
|
|
2
2
|
export declare const taskOptionsSchema: z.ZodObject<{
|
|
3
3
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
4
4
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -60,21 +60,21 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
60
60
|
label: string;
|
|
61
61
|
text: string;
|
|
62
62
|
}>]>, "many">>;
|
|
63
|
-
data: z.ZodOptional<z.
|
|
63
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
64
64
|
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">]>>;
|
|
65
|
-
text: z.ZodOptional<z.
|
|
65
|
+
text: z.ZodOptional<z.ZodString>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
68
68
|
text?: string | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
71
71
|
text?: string | undefined;
|
|
72
|
-
}
|
|
72
|
+
}>>;
|
|
73
73
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
74
74
|
}, {
|
|
75
75
|
type: z.ZodLiteral<"task">;
|
|
76
76
|
description: z.ZodOptional<z.ZodString>;
|
|
77
|
-
items: z.ZodArray<z.ZodLazy<z.ZodObject<z.objectUtil.extendShape<{
|
|
77
|
+
items: z.ZodArray<z.ZodLazy<z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
78
78
|
type: z.ZodEnum<["theme", "criterion", "task-group", "task", "task-item"]>;
|
|
79
79
|
title: z.ZodString;
|
|
80
80
|
code: z.ZodString;
|
|
@@ -128,24 +128,25 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
128
128
|
label: string;
|
|
129
129
|
text: string;
|
|
130
130
|
}>]>, "many">>;
|
|
131
|
-
data: z.ZodOptional<z.
|
|
131
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
132
132
|
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">]>>;
|
|
133
|
-
text: z.ZodOptional<z.
|
|
133
|
+
text: z.ZodOptional<z.ZodString>;
|
|
134
134
|
}, "strip", z.ZodTypeAny, {
|
|
135
135
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
136
136
|
text?: string | undefined;
|
|
137
137
|
}, {
|
|
138
138
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
139
139
|
text?: string | undefined;
|
|
140
|
-
}
|
|
140
|
+
}>>;
|
|
141
141
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
142
142
|
}, {
|
|
143
143
|
type: z.ZodLiteral<"task-item">;
|
|
144
|
-
data: z.ZodOptional<z.
|
|
144
|
+
data: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
145
145
|
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">]>>;
|
|
146
|
-
text: z.ZodOptional<z.
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
text: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, {
|
|
148
|
+
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">]>>;
|
|
149
|
+
}>, "strip", z.ZodTypeAny, {
|
|
149
150
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
150
151
|
text?: string | undefined;
|
|
151
152
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
@@ -153,7 +154,7 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
153
154
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
154
155
|
text?: string | undefined;
|
|
155
156
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
156
|
-
}
|
|
157
|
+
}>>;
|
|
157
158
|
definition: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
158
159
|
type: z.ZodEnum<["select-single", "select-multiple", "number", "boolean"]>;
|
|
159
160
|
}, {
|
|
@@ -282,6 +283,7 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
282
283
|
}>]>;
|
|
283
284
|
description: z.ZodOptional<z.ZodString>;
|
|
284
285
|
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">]>>>;
|
|
286
|
+
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">]>>;
|
|
285
287
|
options: z.ZodOptional<z.ZodObject<{
|
|
286
288
|
hideCode: z.ZodOptional<z.ZodBoolean>;
|
|
287
289
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -289,10 +291,9 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
289
291
|
}, {
|
|
290
292
|
hideCode?: boolean | undefined;
|
|
291
293
|
}>>;
|
|
292
|
-
}>, "strip", z.ZodTypeAny, {
|
|
294
|
+
}>, "title">, "strip", z.ZodTypeAny, {
|
|
293
295
|
type: "task-item";
|
|
294
296
|
code: string;
|
|
295
|
-
title: string;
|
|
296
297
|
definition: {
|
|
297
298
|
type: "select-single";
|
|
298
299
|
options: {
|
|
@@ -323,11 +324,11 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
323
324
|
true: string;
|
|
324
325
|
} | undefined;
|
|
325
326
|
};
|
|
326
|
-
data?:
|
|
327
|
+
data?: {
|
|
327
328
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
328
329
|
text?: string | undefined;
|
|
329
330
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
330
|
-
}
|
|
331
|
+
} | undefined;
|
|
331
332
|
options?: {
|
|
332
333
|
hideCode?: boolean | undefined;
|
|
333
334
|
} | undefined;
|
|
@@ -349,11 +350,11 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
349
350
|
text: string;
|
|
350
351
|
})[] | undefined;
|
|
351
352
|
sortOrder?: number | undefined;
|
|
353
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
352
354
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
353
355
|
}, {
|
|
354
356
|
type: "task-item";
|
|
355
357
|
code: string;
|
|
356
|
-
title: string;
|
|
357
358
|
definition: {
|
|
358
359
|
type: "select-single";
|
|
359
360
|
options: {
|
|
@@ -384,11 +385,11 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
384
385
|
true: string;
|
|
385
386
|
} | undefined;
|
|
386
387
|
};
|
|
387
|
-
data?:
|
|
388
|
+
data?: {
|
|
388
389
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
389
390
|
text?: string | undefined;
|
|
390
391
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
391
|
-
}
|
|
392
|
+
} | undefined;
|
|
392
393
|
options?: {
|
|
393
394
|
hideCode?: boolean | undefined;
|
|
394
395
|
} | undefined;
|
|
@@ -410,6 +411,7 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
410
411
|
text: string;
|
|
411
412
|
})[] | undefined;
|
|
412
413
|
sortOrder?: number | undefined;
|
|
414
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
413
415
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
414
416
|
}>>, "many">;
|
|
415
417
|
options: z.ZodOptional<z.ZodObject<{
|
|
@@ -426,7 +428,6 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
426
428
|
items: {
|
|
427
429
|
type: "task-item";
|
|
428
430
|
code: string;
|
|
429
|
-
title: string;
|
|
430
431
|
definition: {
|
|
431
432
|
type: "select-single";
|
|
432
433
|
options: {
|
|
@@ -457,11 +458,11 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
457
458
|
true: string;
|
|
458
459
|
} | undefined;
|
|
459
460
|
};
|
|
460
|
-
data?:
|
|
461
|
+
data?: {
|
|
461
462
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
462
463
|
text?: string | undefined;
|
|
463
464
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
464
|
-
}
|
|
465
|
+
} | undefined;
|
|
465
466
|
options?: {
|
|
466
467
|
hideCode?: boolean | undefined;
|
|
467
468
|
} | undefined;
|
|
@@ -483,12 +484,13 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
483
484
|
text: string;
|
|
484
485
|
})[] | undefined;
|
|
485
486
|
sortOrder?: number | undefined;
|
|
487
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
486
488
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
487
489
|
}[];
|
|
488
|
-
data?:
|
|
490
|
+
data?: {
|
|
489
491
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
490
492
|
text?: string | undefined;
|
|
491
|
-
}
|
|
493
|
+
} | undefined;
|
|
492
494
|
options?: {
|
|
493
495
|
hideCode?: boolean | undefined;
|
|
494
496
|
} | undefined;
|
|
@@ -517,7 +519,6 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
517
519
|
items: {
|
|
518
520
|
type: "task-item";
|
|
519
521
|
code: string;
|
|
520
|
-
title: string;
|
|
521
522
|
definition: {
|
|
522
523
|
type: "select-single";
|
|
523
524
|
options: {
|
|
@@ -548,11 +549,11 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
548
549
|
true: string;
|
|
549
550
|
} | undefined;
|
|
550
551
|
};
|
|
551
|
-
data?:
|
|
552
|
+
data?: {
|
|
552
553
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
553
554
|
text?: string | undefined;
|
|
554
555
|
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
555
|
-
}
|
|
556
|
+
} | undefined;
|
|
556
557
|
options?: {
|
|
557
558
|
hideCode?: boolean | undefined;
|
|
558
559
|
} | undefined;
|
|
@@ -574,12 +575,13 @@ export declare const taskSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
574
575
|
text: string;
|
|
575
576
|
})[] | undefined;
|
|
576
577
|
sortOrder?: number | undefined;
|
|
578
|
+
valueReference?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
577
579
|
providedData?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
|
|
578
580
|
}[];
|
|
579
|
-
data?:
|
|
581
|
+
data?: {
|
|
580
582
|
value?: string | number | boolean | (string | number | boolean | null)[] | null | undefined;
|
|
581
583
|
text?: string | undefined;
|
|
582
|
-
}
|
|
584
|
+
} | undefined;
|
|
583
585
|
options?: {
|
|
584
586
|
hideCode?: boolean | undefined;
|
|
585
587
|
} | undefined;
|
package/dist/v1/schemas/task.js
CHANGED
|
@@ -5,11 +5,11 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const task_item_1 = require("./task-item");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
exports.taskOptionsSchema = zod_1.z.object({
|
|
8
|
-
hideCode:
|
|
8
|
+
hideCode: zod_1.z.boolean().optional(),
|
|
9
9
|
});
|
|
10
10
|
exports.taskSchema = common_1.abstractElementSchema.extend({
|
|
11
|
-
type: zod_1.z.literal(
|
|
12
|
-
description:
|
|
11
|
+
type: zod_1.z.literal("task"),
|
|
12
|
+
description: zod_1.z.string().optional(),
|
|
13
13
|
items: zod_1.z.array(zod_1.z.lazy(() => task_item_1.taskItemSchema)),
|
|
14
|
-
options:
|
|
14
|
+
options: exports.taskOptionsSchema.optional(),
|
|
15
15
|
});
|