@examplary/schemas 1.7.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/scalar.d.ts +3 -0
- package/dist/common/scalar.js +10 -0
- package/dist/index.d.ts +6 -8
- package/dist/index.js +5 -5
- package/dist/question/index.d.ts +4 -0
- package/dist/question/index.js +18 -0
- package/dist/question/legacy-question-scoring-criteria.d.ts +9 -0
- package/dist/question/legacy-question-scoring-criteria.js +10 -0
- package/dist/question/question-scoring.d.ts +55 -0
- package/dist/question/question-scoring.js +29 -0
- package/dist/question/question.d.ts +42 -0
- package/dist/question/question.js +26 -0
- package/{src/index.ts → dist/question-type/index.d.ts} +6 -5
- package/dist/question-type/index.js +23 -0
- package/dist/{question-type-generation-options.d.ts → question-type/question-type-generation-options.d.ts} +1 -1
- package/dist/{question-type-generation-options.js → question-type/question-type-generation-options.js} +1 -0
- package/dist/{question-type-grading-options.d.ts → question-type/question-type-grading-options.d.ts} +1 -1
- package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js} +1 -0
- package/dist/{question-type-qti3.d.ts → question-type/question-type-qti3.d.ts} +2 -0
- package/dist/{question-type-qti3.js → question-type/question-type-qti3.js} +1 -0
- package/dist/question-type/question-type-scanning-options.d.ts +5 -0
- package/dist/question-type/question-type-scanning-options.js +13 -0
- package/dist/{question-type-setting.js → question-type/question-type-setting.js} +1 -1
- package/dist/{question-type.d.ts → question-type/question-type.d.ts} +7 -3
- package/dist/{question-type.js → question-type/question-type.js} +5 -2
- package/dist/schemas/question-scoring.json +197 -0
- package/dist/schemas/question-type.json +138 -81
- package/dist/schemas/question.json +364 -0
- package/package.json +11 -5
- package/.env +0 -1
- package/.serverless/cloudformation-template-update-stack.json +0 -175
- package/.serverless/meta.json +0 -274
- package/.serverless/serverless-state.json +0 -402
- package/.turbo/turbo-build.log +0 -1
- package/.turbo/turbo-deploy.log +0 -43
- package/scripts/build.ts +0 -16
- package/serverless.yml +0 -25
- package/src/question-type-components.ts +0 -36
- package/src/question-type-generation-options.ts +0 -21
- package/src/question-type-grading-options.ts +0 -21
- package/src/question-type-qti3.ts +0 -53
- package/src/question-type-setting.ts +0 -70
- package/src/question-type.ts +0 -119
- package/src/translatable.ts +0 -17
- /package/dist/{translatable.d.ts → common/translatable.d.ts} +0 -0
- /package/dist/{translatable.js → common/translatable.js} +0 -0
- /package/dist/{question-type-components.d.ts → question-type/question-type-components.d.ts} +0 -0
- /package/dist/{question-type-components.js → question-type/question-type-components.js} +0 -0
- /package/dist/{question-type-setting.d.ts → question-type/question-type-setting.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScalarSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
exports.ScalarSchema = zod_1.z.union([
|
|
6
|
+
zod_1.z.string(),
|
|
7
|
+
zod_1.z.number(),
|
|
8
|
+
zod_1.z.boolean(),
|
|
9
|
+
zod_1.z.null(),
|
|
10
|
+
]);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export * from "./translatable";
|
|
2
|
-
export type * from "./translatable";
|
|
3
1
|
export * from "./question-type";
|
|
4
2
|
export type * from "./question-type";
|
|
5
|
-
export * from "./question
|
|
6
|
-
export type * from "./question
|
|
7
|
-
export * from "./
|
|
8
|
-
export type * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export type * from "./
|
|
3
|
+
export * from "./question";
|
|
4
|
+
export type * from "./question";
|
|
5
|
+
export * from "./common/scalar";
|
|
6
|
+
export type * from "./common/scalar";
|
|
7
|
+
export * from "./common/translatable";
|
|
8
|
+
export type * from "./common/translatable";
|
package/dist/index.js
CHANGED
|
@@ -14,10 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
// General
|
|
18
|
-
__exportStar(require("./translatable"), exports);
|
|
19
17
|
// Question types
|
|
20
18
|
__exportStar(require("./question-type"), exports);
|
|
21
|
-
|
|
22
|
-
__exportStar(require("./question
|
|
23
|
-
|
|
19
|
+
// Questions
|
|
20
|
+
__exportStar(require("./question"), exports);
|
|
21
|
+
// Common
|
|
22
|
+
__exportStar(require("./common/scalar"), exports);
|
|
23
|
+
__exportStar(require("./common/translatable"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./question"), exports);
|
|
18
|
+
__exportStar(require("./question-scoring"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** @deprecated Replaced with `scoring` object */
|
|
3
|
+
export declare const LegacyQuestionScoringCriteriaSchema: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
points: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
/** @deprecated Replaced with `scoring` object */
|
|
9
|
+
export type LegacyQuestionScoringCriteria = z.infer<typeof LegacyQuestionScoringCriteriaSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LegacyQuestionScoringCriteriaSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
/** @deprecated Replaced with `scoring` object */
|
|
6
|
+
exports.LegacyQuestionScoringCriteriaSchema = zod_1.z.array(zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().optional(),
|
|
8
|
+
description: zod_1.z.string().nullish(),
|
|
9
|
+
points: zod_1.z.number().nullish().default(1),
|
|
10
|
+
}));
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ScoringCriterionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ScoringCriterion = z.infer<typeof ScoringCriterionSchema>;
|
|
11
|
+
export declare const TopLevelScoringCriterionSchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18
|
+
levels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
25
|
+
}, z.core.$strip>>>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare enum RubricType {
|
|
28
|
+
Simple = "simple",
|
|
29
|
+
Analytical = "analytical",
|
|
30
|
+
Holistic = "holistic",
|
|
31
|
+
ExactValues = "exact-values"
|
|
32
|
+
}
|
|
33
|
+
export declare const QuestionScoringSchema: z.ZodObject<{
|
|
34
|
+
rubricType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof RubricType>>>;
|
|
35
|
+
criteria: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
+
levels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
48
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
49
|
+
}, z.core.$strip>>>>;
|
|
50
|
+
}, z.core.$strip>>>>;
|
|
51
|
+
guidance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
modelAnswer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type QuestionScoring = z.infer<typeof QuestionScoringSchema>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionScoringSchema = exports.RubricType = exports.TopLevelScoringCriterionSchema = exports.ScoringCriterionSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
exports.ScoringCriterionSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string(),
|
|
7
|
+
title: zod_1.z.string().nullish(),
|
|
8
|
+
description: zod_1.z.string().nullish(),
|
|
9
|
+
points: zod_1.z.number().nullish(),
|
|
10
|
+
minPoints: zod_1.z.number().nullish(),
|
|
11
|
+
maxPoints: zod_1.z.number().nullish(),
|
|
12
|
+
});
|
|
13
|
+
exports.TopLevelScoringCriterionSchema = exports.ScoringCriterionSchema.extend({
|
|
14
|
+
levels: zod_1.z.array(exports.ScoringCriterionSchema).nullish(),
|
|
15
|
+
});
|
|
16
|
+
var RubricType;
|
|
17
|
+
(function (RubricType) {
|
|
18
|
+
RubricType["Simple"] = "simple";
|
|
19
|
+
RubricType["Analytical"] = "analytical";
|
|
20
|
+
RubricType["Holistic"] = "holistic";
|
|
21
|
+
RubricType["ExactValues"] = "exact-values";
|
|
22
|
+
})(RubricType || (exports.RubricType = RubricType = {}));
|
|
23
|
+
exports.QuestionScoringSchema = zod_1.z.object({
|
|
24
|
+
rubricType: zod_1.z.enum(RubricType).nullish(),
|
|
25
|
+
criteria: zod_1.z.array(exports.TopLevelScoringCriterionSchema).nullish(),
|
|
26
|
+
guidance: zod_1.z.string().nullish(),
|
|
27
|
+
modelAnswer: zod_1.z.string().nullish(),
|
|
28
|
+
templateId: zod_1.z.string().nullish(),
|
|
29
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const QuestionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodString;
|
|
5
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
settings: z.ZodObject<{}, z.core.$loose>;
|
|
8
|
+
scoring: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
9
|
+
rubricType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof import("./question-scoring").RubricType>>>;
|
|
10
|
+
criteria: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
15
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
levels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
points: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
22
|
+
minPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
|
+
maxPoints: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
}, z.core.$strip>>>>;
|
|
25
|
+
}, z.core.$strip>>>>;
|
|
26
|
+
guidance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
modelAnswer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
templateId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
31
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
|
|
32
|
+
v: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
33
|
+
questionBankItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
traceIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
35
|
+
/** @deprecated Replaced with `scoring` object */
|
|
36
|
+
scoringCriteria: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
points: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
40
|
+
}, z.core.$strip>>>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
export type Question = z.infer<typeof QuestionSchema>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionSchema = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
var legacy_question_scoring_criteria_1 = require("./legacy-question-scoring-criteria");
|
|
6
|
+
var question_scoring_1 = require("./question-scoring");
|
|
7
|
+
var scalar_1 = require("../common/scalar");
|
|
8
|
+
exports.QuestionSchema = zod_1.z.looseObject({
|
|
9
|
+
id: zod_1.z.string(),
|
|
10
|
+
type: zod_1.z.string(),
|
|
11
|
+
title: zod_1.z.string().nullish(),
|
|
12
|
+
description: zod_1.z.string().nullish(),
|
|
13
|
+
settings: zod_1.z.looseObject({}),
|
|
14
|
+
// Scoring
|
|
15
|
+
scoring: question_scoring_1.QuestionScoringSchema.nullish(),
|
|
16
|
+
// Tags and metadata
|
|
17
|
+
tags: zod_1.z.array(zod_1.z.string()).nullish(),
|
|
18
|
+
metadata: zod_1.z.record(zod_1.z.string(), scalar_1.ScalarSchema).nullish(),
|
|
19
|
+
// Internal tracking
|
|
20
|
+
v: zod_1.z.number().nullish(), // version number, incremented when question is edited
|
|
21
|
+
questionBankItemId: zod_1.z.string().nullish(),
|
|
22
|
+
traceIds: zod_1.z.array(zod_1.z.string()).nullish(),
|
|
23
|
+
// Deprecated
|
|
24
|
+
/** @deprecated Replaced with `scoring` object */
|
|
25
|
+
scoringCriteria: legacy_question_scoring_criteria_1.LegacyQuestionScoringCriteriaSchema.nullish(),
|
|
26
|
+
});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// General
|
|
2
|
-
export * from "./translatable";
|
|
3
|
-
export type * from "./translatable";
|
|
4
|
-
|
|
5
|
-
// Question types
|
|
6
1
|
export * from "./question-type";
|
|
7
2
|
export type * from "./question-type";
|
|
8
3
|
export * from "./question-type-setting";
|
|
@@ -11,3 +6,9 @@ export * from "./question-type-components";
|
|
|
11
6
|
export type * from "./question-type-components";
|
|
12
7
|
export * from "./question-type-generation-options";
|
|
13
8
|
export type * from "./question-type-generation-options";
|
|
9
|
+
export * from "./question-type-grading-options";
|
|
10
|
+
export type * from "./question-type-grading-options";
|
|
11
|
+
export * from "./question-type-scanning-options";
|
|
12
|
+
export type * from "./question-type-scanning-options";
|
|
13
|
+
export * from "./question-type-qti3";
|
|
14
|
+
export type * from "./question-type-qti3";
|
|
@@ -0,0 +1,23 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./question-type"), exports);
|
|
18
|
+
__exportStar(require("./question-type-setting"), exports);
|
|
19
|
+
__exportStar(require("./question-type-components"), exports);
|
|
20
|
+
__exportStar(require("./question-type-generation-options"), exports);
|
|
21
|
+
__exportStar(require("./question-type-grading-options"), exports);
|
|
22
|
+
__exportStar(require("./question-type-scanning-options"), exports);
|
|
23
|
+
__exportStar(require("./question-type-qti3"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const QuestionTypeGenerationOptions: z.ZodObject<{
|
|
3
3
|
enabled: z.ZodBoolean;
|
|
4
|
-
instructions: z.ZodOptional<z.ZodString
|
|
4
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type QuestionTypeGenerationOptionsType = z.infer<typeof QuestionTypeGenerationOptions>;
|
|
@@ -9,6 +9,7 @@ exports.QuestionTypeGenerationOptions = zod_1.z
|
|
|
9
9
|
.describe("Whether this question type can be automatically generated using AI (default to false)"),
|
|
10
10
|
instructions: zod_1.z
|
|
11
11
|
.string()
|
|
12
|
+
.or(zod_1.z.array(zod_1.z.string()))
|
|
12
13
|
.optional()
|
|
13
14
|
.describe("Optional instructions to guide AI in generating this question type"),
|
|
14
15
|
})
|
package/dist/{question-type-grading-options.d.ts → question-type/question-type-grading-options.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const QuestionTypeGradingOptions: z.ZodObject<{
|
|
3
3
|
enabled: z.ZodBoolean;
|
|
4
|
-
instructions: z.ZodOptional<z.ZodString
|
|
4
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export type QuestionTypeGradingOptionsType = z.infer<typeof QuestionTypeGradingOptions>;
|
package/dist/{question-type-grading-options.js → question-type/question-type-grading-options.js}
RENAMED
|
@@ -9,6 +9,7 @@ exports.QuestionTypeGradingOptions = zod_1.z
|
|
|
9
9
|
.describe("Whether this question type can be automatically graded using AI (default to false)"),
|
|
10
10
|
instructions: zod_1.z
|
|
11
11
|
.string()
|
|
12
|
+
.or(zod_1.z.array(zod_1.z.string()))
|
|
12
13
|
.optional()
|
|
13
14
|
.describe("Optional instructions to guide AI in grading this question type"),
|
|
14
15
|
})
|
|
@@ -18,6 +18,7 @@ export declare const QtiInteractionType: z.ZodEnum<{
|
|
|
18
18
|
MatchInteraction: "MatchInteraction";
|
|
19
19
|
MediaInteraction: "MediaInteraction";
|
|
20
20
|
OrderInteraction: "OrderInteraction";
|
|
21
|
+
PortableCustomInteraction: "PortableCustomInteraction";
|
|
21
22
|
PositionObjectInteraction: "PositionObjectInteraction";
|
|
22
23
|
SelectPointInteraction: "SelectPointInteraction";
|
|
23
24
|
SliderInteraction: "SliderInteraction";
|
|
@@ -46,6 +47,7 @@ export declare const Qti3Mapping: z.ZodObject<{
|
|
|
46
47
|
MatchInteraction: "MatchInteraction";
|
|
47
48
|
MediaInteraction: "MediaInteraction";
|
|
48
49
|
OrderInteraction: "OrderInteraction";
|
|
50
|
+
PortableCustomInteraction: "PortableCustomInteraction";
|
|
49
51
|
PositionObjectInteraction: "PositionObjectInteraction";
|
|
50
52
|
SelectPointInteraction: "SelectPointInteraction";
|
|
51
53
|
SliderInteraction: "SliderInteraction";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const QuestionTypeScanningOptions: z.ZodObject<{
|
|
3
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type QuestionTypeScanningOptionsType = z.infer<typeof QuestionTypeScanningOptions>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionTypeScanningOptions = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
exports.QuestionTypeScanningOptions = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
instructions: zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.or(zod_1.z.array(zod_1.z.string()))
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("Optional instructions to guide AI in converting answers for this question type when scanning documents"),
|
|
12
|
+
})
|
|
13
|
+
.describe("Options for AI question scanning");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QuestionTypeSetting = exports.QuestionTypeSettingOption = void 0;
|
|
4
4
|
var zod_1 = require("zod");
|
|
5
|
-
var translatable_1 = require("
|
|
5
|
+
var translatable_1 = require("../common/translatable");
|
|
6
6
|
// Setting option for enum type settings
|
|
7
7
|
exports.QuestionTypeSettingOption = zod_1.z
|
|
8
8
|
.object({
|
|
@@ -8,11 +8,14 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
8
8
|
shortcut: z.ZodOptional<z.ZodString>;
|
|
9
9
|
generation: z.ZodOptional<z.ZodObject<{
|
|
10
10
|
enabled: z.ZodBoolean;
|
|
11
|
-
instructions: z.ZodOptional<z.ZodString
|
|
11
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
12
12
|
}, z.core.$strip>>;
|
|
13
13
|
grading: z.ZodOptional<z.ZodObject<{
|
|
14
14
|
enabled: z.ZodBoolean;
|
|
15
|
-
instructions: z.ZodOptional<z.ZodString
|
|
15
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
scanning: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
instructions: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
16
19
|
}, z.core.$strip>>;
|
|
17
20
|
timeEstimateMinutes: z.ZodOptional<z.ZodNumber>;
|
|
18
21
|
isAi: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -84,6 +87,7 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
84
87
|
MatchInteraction: "MatchInteraction";
|
|
85
88
|
MediaInteraction: "MediaInteraction";
|
|
86
89
|
OrderInteraction: "OrderInteraction";
|
|
90
|
+
PortableCustomInteraction: "PortableCustomInteraction";
|
|
87
91
|
PositionObjectInteraction: "PositionObjectInteraction";
|
|
88
92
|
SelectPointInteraction: "SelectPointInteraction";
|
|
89
93
|
SliderInteraction: "SliderInteraction";
|
|
@@ -96,6 +100,6 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
96
100
|
}, z.core.$strip>>;
|
|
97
101
|
stylesheet: z.ZodOptional<z.ZodURL>;
|
|
98
102
|
index: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
103
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
100
104
|
}, z.core.$strict>;
|
|
101
105
|
export type QuestionType = z.infer<typeof QuestionTypeSchema>;
|
|
@@ -6,8 +6,10 @@ var question_type_components_1 = require("./question-type-components");
|
|
|
6
6
|
var question_type_generation_options_1 = require("./question-type-generation-options");
|
|
7
7
|
var question_type_grading_options_1 = require("./question-type-grading-options");
|
|
8
8
|
var question_type_qti3_1 = require("./question-type-qti3");
|
|
9
|
+
var question_type_scanning_options_1 = require("./question-type-scanning-options");
|
|
9
10
|
var question_type_setting_1 = require("./question-type-setting");
|
|
10
|
-
var
|
|
11
|
+
var scalar_1 = require("../common/scalar");
|
|
12
|
+
var translatable_1 = require("../common/translatable");
|
|
11
13
|
exports.QuestionTypeSchema = zod_1.z
|
|
12
14
|
.object({
|
|
13
15
|
$schema: zod_1.z.string().optional(),
|
|
@@ -25,6 +27,7 @@ exports.QuestionTypeSchema = zod_1.z
|
|
|
25
27
|
.describe("Keyboard shortcut for quick access to this question type"),
|
|
26
28
|
generation: question_type_generation_options_1.QuestionTypeGenerationOptions.optional(),
|
|
27
29
|
grading: question_type_grading_options_1.QuestionTypeGradingOptions.optional(),
|
|
30
|
+
scanning: question_type_scanning_options_1.QuestionTypeScanningOptions.optional(),
|
|
28
31
|
timeEstimateMinutes: zod_1.z
|
|
29
32
|
.number()
|
|
30
33
|
.min(1)
|
|
@@ -80,7 +83,7 @@ exports.QuestionTypeSchema = zod_1.z
|
|
|
80
83
|
stylesheet: zod_1.z.url().optional(),
|
|
81
84
|
index: zod_1.z.number().optional(),
|
|
82
85
|
metadata: zod_1.z
|
|
83
|
-
.record(zod_1.z.string(),
|
|
86
|
+
.record(zod_1.z.string(), scalar_1.ScalarSchema)
|
|
84
87
|
.optional()
|
|
85
88
|
.describe("Optional metadata for the question type, only used by external applications"),
|
|
86
89
|
})
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"rubricType": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": [
|
|
10
|
+
"simple",
|
|
11
|
+
"analytical",
|
|
12
|
+
"holistic",
|
|
13
|
+
"exact-values"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "null"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"criteria": {
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"title": {
|
|
32
|
+
"anyOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"description": {
|
|
42
|
+
"anyOf": [
|
|
43
|
+
{
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "null"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"points": {
|
|
52
|
+
"anyOf": [
|
|
53
|
+
{
|
|
54
|
+
"type": "number"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "null"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"minPoints": {
|
|
62
|
+
"anyOf": [
|
|
63
|
+
{
|
|
64
|
+
"type": "number"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "null"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"maxPoints": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "number"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "null"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"levels": {
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"id": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"title": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "null"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"description": {
|
|
102
|
+
"anyOf": [
|
|
103
|
+
{
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "null"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"points": {
|
|
112
|
+
"anyOf": [
|
|
113
|
+
{
|
|
114
|
+
"type": "number"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "null"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"minPoints": {
|
|
122
|
+
"anyOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "number"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "null"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"maxPoints": {
|
|
132
|
+
"anyOf": [
|
|
133
|
+
{
|
|
134
|
+
"type": "number"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "null"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": [
|
|
143
|
+
"id"
|
|
144
|
+
],
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "null"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"id"
|
|
156
|
+
],
|
|
157
|
+
"additionalProperties": false
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"type": "null"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"guidance": {
|
|
166
|
+
"anyOf": [
|
|
167
|
+
{
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "null"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"modelAnswer": {
|
|
176
|
+
"anyOf": [
|
|
177
|
+
{
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "null"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"templateId": {
|
|
186
|
+
"anyOf": [
|
|
187
|
+
{
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "null"
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
}
|