@examplary/schemas 1.5.0 → 1.7.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/.serverless/meta.json +3 -3
- package/.serverless/serverless-state.json +1 -1
- package/.turbo/turbo-deploy.log +6 -7
- package/dist/question-type-qti3.d.ts +58 -0
- package/dist/question-type-qti3.js +47 -0
- package/dist/question-type-setting.d.ts +1 -0
- package/dist/question-type-setting.js +1 -0
- package/dist/question-type.d.ts +31 -1
- package/dist/question-type.js +11 -4
- package/dist/schemas/question-type.json +109 -4
- package/package.json +2 -2
- package/src/question-type-qti3.ts +53 -0
- package/src/question-type-setting.ts +1 -0
- package/src/question-type.ts +15 -4
- package/.turbo/turbo-release.log +0 -69
package/.serverless/meta.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"/home/runner/work/examplary/examplary/schemas/serverless.yml": {
|
|
3
|
-
"versionFramework": "4.
|
|
4
|
-
"servicePath": "/home/runner/work/examplary/examplary/schemas/serverless.yml",
|
|
2
|
+
"/home/runner/work/examplary/examplary/packages/schemas/serverless.yml": {
|
|
3
|
+
"versionFramework": "4.30.0",
|
|
4
|
+
"servicePath": "/home/runner/work/examplary/examplary/packages/schemas/serverless.yml",
|
|
5
5
|
"serviceConfigFileName": "serverless.yml",
|
|
6
6
|
"service": {
|
|
7
7
|
"service": "schemas",
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
"layers": {}
|
|
397
397
|
},
|
|
398
398
|
"package": {
|
|
399
|
-
"artifactDirectoryName": "serverless/schemas/production/
|
|
399
|
+
"artifactDirectoryName": "serverless/schemas/production/1768067559141-2026-01-10T17:52:39.141Z",
|
|
400
400
|
"artifact": ""
|
|
401
401
|
}
|
|
402
402
|
}
|
package/.turbo/turbo-deploy.log
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
|
|
4
|
-
Disable auto-updates by adding "frameworkVersion" to your serverless.yml (frameworkVersion: ~4.19.1)
|
|
5
|
-
|
|
6
3
|
Initializing
|
|
7
4
|
Initializing
|
|
5
|
+
Resolving variables
|
|
8
6
|
Authenticating
|
|
9
7
|
Resolving variables
|
|
8
|
+
Checking AWS credentials
|
|
10
9
|
Resolving variables
|
|
10
|
+
Loading service details
|
|
11
11
|
Deploying "schemas" to stage "production" (eu-central-1)
|
|
12
12
|
[WARNING] aws-cdk-lib.aws_cloudfront_origins.S3Origin is deprecated.
|
|
13
13
|
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
|
|
@@ -22,14 +22,13 @@ Uploading (0/0)
|
|
|
22
22
|
Uploading CloudFormation file to S3
|
|
23
23
|
Uploading State file to S3
|
|
24
24
|
Updating AWS CloudFormation stack
|
|
25
|
-
Fetching
|
|
25
|
+
Fetching service information
|
|
26
26
|
Updating
|
|
27
27
|
Uploading directory 'dist/schemas' to bucket 'schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik'
|
|
28
28
|
Uploading directory 'dist/schemas' to bucket 'schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik'
|
|
29
|
-
|
|
30
|
-
Clearing CloudFront DNS cache
|
|
29
|
+
Skipped uploading 1 unchanged files
|
|
31
30
|
Removing old service artifacts from S3
|
|
32
|
-
✔ Service deployed to stack schemas-production (
|
|
31
|
+
✔ Service deployed to stack schemas-production (12s)
|
|
33
32
|
Stack Outputs:
|
|
34
33
|
schemasBucketName814EA6EC: schemas-production-schemasbucketbe9e7d9f-q1aisqmk2pik
|
|
35
34
|
schemasCloudFrontCName05CBFC31: djykovp21c0ec.cloudfront.net
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Supported QTI 3.0 interaction types
|
|
4
|
+
*/
|
|
5
|
+
export declare const QtiInteractionType: z.ZodEnum<{
|
|
6
|
+
AssociateInteraction: "AssociateInteraction";
|
|
7
|
+
ChoiceInteraction: "ChoiceInteraction";
|
|
8
|
+
DrawingInteraction: "DrawingInteraction";
|
|
9
|
+
EndAttemptInteraction: "EndAttemptInteraction";
|
|
10
|
+
ExtendedTextInteraction: "ExtendedTextInteraction";
|
|
11
|
+
GapMatchInteraction: "GapMatchInteraction";
|
|
12
|
+
GraphicAssociateInteraction: "GraphicAssociateInteraction";
|
|
13
|
+
GraphicGapMatchInteraction: "GraphicGapMatchInteraction";
|
|
14
|
+
GraphicOrderInteraction: "GraphicOrderInteraction";
|
|
15
|
+
HotspotInteraction: "HotspotInteraction";
|
|
16
|
+
HottextInteraction: "HottextInteraction";
|
|
17
|
+
InlineChoiceInteraction: "InlineChoiceInteraction";
|
|
18
|
+
MatchInteraction: "MatchInteraction";
|
|
19
|
+
MediaInteraction: "MediaInteraction";
|
|
20
|
+
OrderInteraction: "OrderInteraction";
|
|
21
|
+
PositionObjectInteraction: "PositionObjectInteraction";
|
|
22
|
+
SelectPointInteraction: "SelectPointInteraction";
|
|
23
|
+
SliderInteraction: "SliderInteraction";
|
|
24
|
+
TextEntryInteraction: "TextEntryInteraction";
|
|
25
|
+
UploadInteraction: "UploadInteraction";
|
|
26
|
+
}>;
|
|
27
|
+
export type QtiInteractionType = z.infer<typeof QtiInteractionType>;
|
|
28
|
+
/**
|
|
29
|
+
* Complete QTI mapping configuration for a question type
|
|
30
|
+
*/
|
|
31
|
+
export declare const Qti3Mapping: z.ZodObject<{
|
|
32
|
+
interaction: z.ZodObject<{
|
|
33
|
+
type: z.ZodEnum<{
|
|
34
|
+
AssociateInteraction: "AssociateInteraction";
|
|
35
|
+
ChoiceInteraction: "ChoiceInteraction";
|
|
36
|
+
DrawingInteraction: "DrawingInteraction";
|
|
37
|
+
EndAttemptInteraction: "EndAttemptInteraction";
|
|
38
|
+
ExtendedTextInteraction: "ExtendedTextInteraction";
|
|
39
|
+
GapMatchInteraction: "GapMatchInteraction";
|
|
40
|
+
GraphicAssociateInteraction: "GraphicAssociateInteraction";
|
|
41
|
+
GraphicGapMatchInteraction: "GraphicGapMatchInteraction";
|
|
42
|
+
GraphicOrderInteraction: "GraphicOrderInteraction";
|
|
43
|
+
HotspotInteraction: "HotspotInteraction";
|
|
44
|
+
HottextInteraction: "HottextInteraction";
|
|
45
|
+
InlineChoiceInteraction: "InlineChoiceInteraction";
|
|
46
|
+
MatchInteraction: "MatchInteraction";
|
|
47
|
+
MediaInteraction: "MediaInteraction";
|
|
48
|
+
OrderInteraction: "OrderInteraction";
|
|
49
|
+
PositionObjectInteraction: "PositionObjectInteraction";
|
|
50
|
+
SelectPointInteraction: "SelectPointInteraction";
|
|
51
|
+
SliderInteraction: "SliderInteraction";
|
|
52
|
+
TextEntryInteraction: "TextEntryInteraction";
|
|
53
|
+
UploadInteraction: "UploadInteraction";
|
|
54
|
+
}>;
|
|
55
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{}, z.core.$strip>]>>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type Qti3Mapping = z.infer<typeof Qti3Mapping>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Qti3Mapping = exports.QtiInteractionType = void 0;
|
|
4
|
+
var zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* A value that can either be a literal or a JSONata expression string.
|
|
7
|
+
* JSONata expressions are evaluated at transform time against the question context.
|
|
8
|
+
*/
|
|
9
|
+
var JsonataExpr = zod_1.z
|
|
10
|
+
.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.array(zod_1.z.any()), zod_1.z.object({})])
|
|
11
|
+
.describe("Literal or JSONata expression string starting with '='");
|
|
12
|
+
/**
|
|
13
|
+
* Supported QTI 3.0 interaction types
|
|
14
|
+
*/
|
|
15
|
+
exports.QtiInteractionType = zod_1.z.enum([
|
|
16
|
+
"AssociateInteraction",
|
|
17
|
+
"ChoiceInteraction",
|
|
18
|
+
"DrawingInteraction",
|
|
19
|
+
"EndAttemptInteraction",
|
|
20
|
+
"ExtendedTextInteraction",
|
|
21
|
+
"GapMatchInteraction",
|
|
22
|
+
"GraphicAssociateInteraction",
|
|
23
|
+
"GraphicGapMatchInteraction",
|
|
24
|
+
"GraphicOrderInteraction",
|
|
25
|
+
"HotspotInteraction",
|
|
26
|
+
"HottextInteraction",
|
|
27
|
+
"InlineChoiceInteraction",
|
|
28
|
+
"MatchInteraction",
|
|
29
|
+
"MediaInteraction",
|
|
30
|
+
"OrderInteraction",
|
|
31
|
+
"PositionObjectInteraction",
|
|
32
|
+
"SelectPointInteraction",
|
|
33
|
+
"SliderInteraction",
|
|
34
|
+
"TextEntryInteraction",
|
|
35
|
+
"UploadInteraction",
|
|
36
|
+
]);
|
|
37
|
+
/**
|
|
38
|
+
* Complete QTI mapping configuration for a question type
|
|
39
|
+
*/
|
|
40
|
+
exports.Qti3Mapping = zod_1.z
|
|
41
|
+
.object({
|
|
42
|
+
interaction: zod_1.z.object({
|
|
43
|
+
type: exports.QtiInteractionType.describe("The QTI interaction type to generate"),
|
|
44
|
+
options: zod_1.z.record(zod_1.z.string(), JsonataExpr).optional(),
|
|
45
|
+
}),
|
|
46
|
+
})
|
|
47
|
+
.describe("QTI 3.0 mapping configuration for transforming questions to QTI format");
|
|
@@ -6,6 +6,7 @@ export declare const QuestionTypeSettingOption: z.ZodObject<{
|
|
|
6
6
|
export declare const QuestionTypeSetting: z.ZodObject<{
|
|
7
7
|
id: z.ZodString;
|
|
8
8
|
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
9
|
+
helpText: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
9
10
|
description: z.ZodOptional<z.ZodString>;
|
|
10
11
|
type: z.ZodEnum<{
|
|
11
12
|
string: "string";
|
|
@@ -16,6 +16,7 @@ exports.QuestionTypeSetting = zod_1.z
|
|
|
16
16
|
.object({
|
|
17
17
|
id: zod_1.z.string().describe("Unique identifier for the setting"),
|
|
18
18
|
name: translatable_1.Translatable.describe("Display name for the setting"),
|
|
19
|
+
helpText: translatable_1.Translatable.optional().describe("Help text for the setting"),
|
|
19
20
|
description: zod_1.z
|
|
20
21
|
.string()
|
|
21
22
|
.optional()
|
package/dist/question-type.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
17
17
|
timeEstimateMinutes: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
isAi: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
20
|
-
iconBackgroundColor: z.ZodOptional<z.ZodString>;
|
|
21
20
|
enforcePosition: z.ZodOptional<z.ZodEnum<{
|
|
22
21
|
start: "start";
|
|
23
22
|
end: "end";
|
|
@@ -38,6 +37,7 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
38
37
|
settings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
38
|
id: z.ZodString;
|
|
40
39
|
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>;
|
|
40
|
+
helpText: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
41
41
|
description: z.ZodOptional<z.ZodString>;
|
|
42
42
|
type: z.ZodEnum<{
|
|
43
43
|
string: "string";
|
|
@@ -65,7 +65,37 @@ export declare const QuestionTypeSchema: z.ZodObject<{
|
|
|
65
65
|
}, z.core.$strict>>>;
|
|
66
66
|
public: z.ZodOptional<z.ZodBoolean>;
|
|
67
67
|
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>>;
|
|
68
|
+
export: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
qti3: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
interaction: z.ZodObject<{
|
|
71
|
+
type: z.ZodEnum<{
|
|
72
|
+
AssociateInteraction: "AssociateInteraction";
|
|
73
|
+
ChoiceInteraction: "ChoiceInteraction";
|
|
74
|
+
DrawingInteraction: "DrawingInteraction";
|
|
75
|
+
EndAttemptInteraction: "EndAttemptInteraction";
|
|
76
|
+
ExtendedTextInteraction: "ExtendedTextInteraction";
|
|
77
|
+
GapMatchInteraction: "GapMatchInteraction";
|
|
78
|
+
GraphicAssociateInteraction: "GraphicAssociateInteraction";
|
|
79
|
+
GraphicGapMatchInteraction: "GraphicGapMatchInteraction";
|
|
80
|
+
GraphicOrderInteraction: "GraphicOrderInteraction";
|
|
81
|
+
HotspotInteraction: "HotspotInteraction";
|
|
82
|
+
HottextInteraction: "HottextInteraction";
|
|
83
|
+
InlineChoiceInteraction: "InlineChoiceInteraction";
|
|
84
|
+
MatchInteraction: "MatchInteraction";
|
|
85
|
+
MediaInteraction: "MediaInteraction";
|
|
86
|
+
OrderInteraction: "OrderInteraction";
|
|
87
|
+
PositionObjectInteraction: "PositionObjectInteraction";
|
|
88
|
+
SelectPointInteraction: "SelectPointInteraction";
|
|
89
|
+
SliderInteraction: "SliderInteraction";
|
|
90
|
+
TextEntryInteraction: "TextEntryInteraction";
|
|
91
|
+
UploadInteraction: "UploadInteraction";
|
|
92
|
+
}>;
|
|
93
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{}, z.core.$strip>]>>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
68
97
|
stylesheet: z.ZodOptional<z.ZodURL>;
|
|
69
98
|
index: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
70
100
|
}, z.core.$strict>;
|
|
71
101
|
export type QuestionType = z.infer<typeof QuestionTypeSchema>;
|
package/dist/question-type.js
CHANGED
|
@@ -5,6 +5,7 @@ var zod_1 = require("zod");
|
|
|
5
5
|
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
|
+
var question_type_qti3_1 = require("./question-type-qti3");
|
|
8
9
|
var question_type_setting_1 = require("./question-type-setting");
|
|
9
10
|
var translatable_1 = require("./translatable");
|
|
10
11
|
exports.QuestionTypeSchema = zod_1.z
|
|
@@ -37,10 +38,6 @@ exports.QuestionTypeSchema = zod_1.z
|
|
|
37
38
|
.string()
|
|
38
39
|
.optional()
|
|
39
40
|
.describe("Background color for the question type"),
|
|
40
|
-
iconBackgroundColor: zod_1.z
|
|
41
|
-
.string()
|
|
42
|
-
.optional()
|
|
43
|
-
.describe("Background color for the question type icon"),
|
|
44
41
|
enforcePosition: zod_1.z
|
|
45
42
|
.enum(["start", "end"])
|
|
46
43
|
.optional()
|
|
@@ -74,8 +71,18 @@ exports.QuestionTypeSchema = zod_1.z
|
|
|
74
71
|
.record(zod_1.z.string(), translatable_1.Translatable)
|
|
75
72
|
.optional()
|
|
76
73
|
.describe("Custom translations for this question type"),
|
|
74
|
+
export: zod_1.z
|
|
75
|
+
.object({
|
|
76
|
+
qti3: question_type_qti3_1.Qti3Mapping.optional().describe("QTI 3.0 mapping configuration for transforming questions to QTI format"),
|
|
77
|
+
})
|
|
78
|
+
.optional()
|
|
79
|
+
.describe("Export configuration for various formats"),
|
|
77
80
|
stylesheet: zod_1.z.url().optional(),
|
|
78
81
|
index: zod_1.z.number().optional(),
|
|
82
|
+
metadata: zod_1.z
|
|
83
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("Optional metadata for the question type, only used by external applications"),
|
|
79
86
|
})
|
|
80
87
|
.strict()
|
|
81
88
|
.describe("Schema for defining question types in the Examplary system");
|
|
@@ -110,10 +110,6 @@
|
|
|
110
110
|
"description": "Background color for the question type",
|
|
111
111
|
"type": "string"
|
|
112
112
|
},
|
|
113
|
-
"iconBackgroundColor": {
|
|
114
|
-
"description": "Background color for the question type icon",
|
|
115
|
-
"type": "string"
|
|
116
|
-
},
|
|
117
113
|
"enforcePosition": {
|
|
118
114
|
"description": "Position enforcement for this question type",
|
|
119
115
|
"type": "string",
|
|
@@ -272,6 +268,26 @@
|
|
|
272
268
|
}
|
|
273
269
|
]
|
|
274
270
|
},
|
|
271
|
+
"helpText": {
|
|
272
|
+
"description": "Help text for the setting",
|
|
273
|
+
"anyOf": [
|
|
274
|
+
{
|
|
275
|
+
"description": "Simple string value",
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"description": "Translation object with language codes as keys",
|
|
280
|
+
"type": "object",
|
|
281
|
+
"propertyNames": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"pattern": "^[a-z]{2}(-[A-Z]{2})?$"
|
|
284
|
+
},
|
|
285
|
+
"additionalProperties": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
275
291
|
"description": {
|
|
276
292
|
"description": "Description to help AI agents auto-generate question settings",
|
|
277
293
|
"type": "string"
|
|
@@ -415,12 +431,101 @@
|
|
|
415
431
|
]
|
|
416
432
|
}
|
|
417
433
|
},
|
|
434
|
+
"export": {
|
|
435
|
+
"description": "Export configuration for various formats",
|
|
436
|
+
"type": "object",
|
|
437
|
+
"properties": {
|
|
438
|
+
"qti3": {
|
|
439
|
+
"description": "QTI 3.0 mapping configuration for transforming questions to QTI format",
|
|
440
|
+
"type": "object",
|
|
441
|
+
"properties": {
|
|
442
|
+
"interaction": {
|
|
443
|
+
"type": "object",
|
|
444
|
+
"properties": {
|
|
445
|
+
"type": {
|
|
446
|
+
"description": "The QTI interaction type to generate",
|
|
447
|
+
"type": "string",
|
|
448
|
+
"enum": [
|
|
449
|
+
"AssociateInteraction",
|
|
450
|
+
"ChoiceInteraction",
|
|
451
|
+
"DrawingInteraction",
|
|
452
|
+
"EndAttemptInteraction",
|
|
453
|
+
"ExtendedTextInteraction",
|
|
454
|
+
"GapMatchInteraction",
|
|
455
|
+
"GraphicAssociateInteraction",
|
|
456
|
+
"GraphicGapMatchInteraction",
|
|
457
|
+
"GraphicOrderInteraction",
|
|
458
|
+
"HotspotInteraction",
|
|
459
|
+
"HottextInteraction",
|
|
460
|
+
"InlineChoiceInteraction",
|
|
461
|
+
"MatchInteraction",
|
|
462
|
+
"MediaInteraction",
|
|
463
|
+
"OrderInteraction",
|
|
464
|
+
"PositionObjectInteraction",
|
|
465
|
+
"SelectPointInteraction",
|
|
466
|
+
"SliderInteraction",
|
|
467
|
+
"TextEntryInteraction",
|
|
468
|
+
"UploadInteraction"
|
|
469
|
+
]
|
|
470
|
+
},
|
|
471
|
+
"options": {
|
|
472
|
+
"type": "object",
|
|
473
|
+
"propertyNames": {
|
|
474
|
+
"type": "string"
|
|
475
|
+
},
|
|
476
|
+
"additionalProperties": {
|
|
477
|
+
"description": "Literal or JSONata expression string starting with '='",
|
|
478
|
+
"anyOf": [
|
|
479
|
+
{
|
|
480
|
+
"type": "string"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"type": "number"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"type": "boolean"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"type": "array",
|
|
490
|
+
"items": {}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"type": "object",
|
|
494
|
+
"properties": {},
|
|
495
|
+
"additionalProperties": false
|
|
496
|
+
}
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"required": [
|
|
502
|
+
"type"
|
|
503
|
+
],
|
|
504
|
+
"additionalProperties": false
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"required": [
|
|
508
|
+
"interaction"
|
|
509
|
+
],
|
|
510
|
+
"additionalProperties": false
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"additionalProperties": false
|
|
514
|
+
},
|
|
418
515
|
"stylesheet": {
|
|
419
516
|
"type": "string",
|
|
420
517
|
"format": "uri"
|
|
421
518
|
},
|
|
422
519
|
"index": {
|
|
423
520
|
"type": "number"
|
|
521
|
+
},
|
|
522
|
+
"metadata": {
|
|
523
|
+
"description": "Optional metadata for the question type, only used by external applications",
|
|
524
|
+
"type": "object",
|
|
525
|
+
"propertyNames": {
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
"additionalProperties": {}
|
|
424
529
|
}
|
|
425
530
|
},
|
|
426
531
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examplary/schemas",
|
|
3
3
|
"packageManager": "yarn@4.8.1",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"description": "Schemas for the Examplary platform.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build:schema": "tsx ./scripts/build.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"serverless": "^4.19.1",
|
|
18
18
|
"serverless-lift": "^1.32.0",
|
|
19
|
-
"tsx": "^4.20.
|
|
19
|
+
"tsx": "^4.20.6",
|
|
20
20
|
"typescript": "^5.9.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A value that can either be a literal or a JSONata expression string.
|
|
5
|
+
* JSONata expressions are evaluated at transform time against the question context.
|
|
6
|
+
*/
|
|
7
|
+
const JsonataExpr = z
|
|
8
|
+
.union([z.string(), z.number(), z.boolean(), z.array(z.any()), z.object({})])
|
|
9
|
+
.describe("Literal or JSONata expression string starting with '='");
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Supported QTI 3.0 interaction types
|
|
13
|
+
*/
|
|
14
|
+
export const QtiInteractionType = z.enum([
|
|
15
|
+
"AssociateInteraction",
|
|
16
|
+
"ChoiceInteraction",
|
|
17
|
+
"DrawingInteraction",
|
|
18
|
+
"EndAttemptInteraction",
|
|
19
|
+
"ExtendedTextInteraction",
|
|
20
|
+
"GapMatchInteraction",
|
|
21
|
+
"GraphicAssociateInteraction",
|
|
22
|
+
"GraphicGapMatchInteraction",
|
|
23
|
+
"GraphicOrderInteraction",
|
|
24
|
+
"HotspotInteraction",
|
|
25
|
+
"HottextInteraction",
|
|
26
|
+
"InlineChoiceInteraction",
|
|
27
|
+
"MatchInteraction",
|
|
28
|
+
"MediaInteraction",
|
|
29
|
+
"OrderInteraction",
|
|
30
|
+
"PositionObjectInteraction",
|
|
31
|
+
"SelectPointInteraction",
|
|
32
|
+
"SliderInteraction",
|
|
33
|
+
"TextEntryInteraction",
|
|
34
|
+
"UploadInteraction",
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
export type QtiInteractionType = z.infer<typeof QtiInteractionType>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Complete QTI mapping configuration for a question type
|
|
41
|
+
*/
|
|
42
|
+
export const Qti3Mapping = z
|
|
43
|
+
.object({
|
|
44
|
+
interaction: z.object({
|
|
45
|
+
type: QtiInteractionType.describe("The QTI interaction type to generate"),
|
|
46
|
+
options: z.record(z.string(), JsonataExpr).optional(),
|
|
47
|
+
}),
|
|
48
|
+
})
|
|
49
|
+
.describe(
|
|
50
|
+
"QTI 3.0 mapping configuration for transforming questions to QTI format",
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export type Qti3Mapping = z.infer<typeof Qti3Mapping>;
|
|
@@ -16,6 +16,7 @@ export const QuestionTypeSetting = z
|
|
|
16
16
|
.object({
|
|
17
17
|
id: z.string().describe("Unique identifier for the setting"),
|
|
18
18
|
name: Translatable.describe("Display name for the setting"),
|
|
19
|
+
helpText: Translatable.optional().describe("Help text for the setting"),
|
|
19
20
|
description: z
|
|
20
21
|
.string()
|
|
21
22
|
.optional()
|
package/src/question-type.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from "./question-type-components";
|
|
7
7
|
import { QuestionTypeGenerationOptions } from "./question-type-generation-options";
|
|
8
8
|
import { QuestionTypeGradingOptions } from "./question-type-grading-options";
|
|
9
|
+
import { Qti3Mapping } from "./question-type-qti3";
|
|
9
10
|
import { QuestionTypeSetting } from "./question-type-setting";
|
|
10
11
|
import { Translatable } from "./translatable";
|
|
11
12
|
|
|
@@ -50,10 +51,6 @@ export const QuestionTypeSchema = z
|
|
|
50
51
|
.string()
|
|
51
52
|
.optional()
|
|
52
53
|
.describe("Background color for the question type"),
|
|
53
|
-
iconBackgroundColor: z
|
|
54
|
-
.string()
|
|
55
|
-
.optional()
|
|
56
|
-
.describe("Background color for the question type icon"),
|
|
57
54
|
enforcePosition: z
|
|
58
55
|
.enum(["start", "end"])
|
|
59
56
|
.optional()
|
|
@@ -99,8 +96,22 @@ export const QuestionTypeSchema = z
|
|
|
99
96
|
.record(z.string(), Translatable)
|
|
100
97
|
.optional()
|
|
101
98
|
.describe("Custom translations for this question type"),
|
|
99
|
+
export: z
|
|
100
|
+
.object({
|
|
101
|
+
qti3: Qti3Mapping.optional().describe(
|
|
102
|
+
"QTI 3.0 mapping configuration for transforming questions to QTI format",
|
|
103
|
+
),
|
|
104
|
+
})
|
|
105
|
+
.optional()
|
|
106
|
+
.describe("Export configuration for various formats"),
|
|
102
107
|
stylesheet: z.url().optional(),
|
|
103
108
|
index: z.number().optional(),
|
|
109
|
+
metadata: z
|
|
110
|
+
.record(z.string(), z.any())
|
|
111
|
+
.optional()
|
|
112
|
+
.describe(
|
|
113
|
+
"Optional metadata for the question type, only used by external applications",
|
|
114
|
+
),
|
|
104
115
|
})
|
|
105
116
|
.strict()
|
|
106
117
|
.describe("Schema for defining question types in the Examplary system");
|
package/.turbo/turbo-release.log
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
[5:44:36 PM] [semantic-release] › ℹ Running semantic-release version 24.2.7
|
|
2
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
|
|
3
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
|
|
4
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
|
|
5
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
|
|
6
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
|
|
7
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
|
|
8
|
-
[5:44:37 PM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/github"
|
|
9
|
-
[5:44:43 PM] [semantic-release] › ✔ Run automated release from branch main on repository https://github.com/examplary-ai/examplary
|
|
10
|
-
[5:44:44 PM] [semantic-release] › ✔ Allowed to push to the Git repository
|
|
11
|
-
[5:44:44 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
|
|
12
|
-
[5:44:44 PM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
|
|
13
|
-
[5:44:44 PM] [semantic-release] [@semantic-release/npm] › ℹ Reading npm config from /home/runner/work/examplary/examplary/.npmrc
|
|
14
|
-
[5:44:44 PM] [semantic-release] [@semantic-release/npm] › ℹ Wrote NPM_TOKEN to /tmp/00c6b2c928d2046796c07a1348cdafe5/.npmrc
|
|
15
|
-
tschoffelen
|
|
16
|
-
[5:44:45 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
|
|
17
|
-
[5:44:45 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
|
|
18
|
-
[5:44:45 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication (https://api.github.com)
|
|
19
|
-
[5:44:45 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
|
|
20
|
-
[5:44:45 PM] [semantic-release] › ℹ Found git tag @examplary/schemas-v1.4.0 associated with version 1.4.0 on branch main
|
|
21
|
-
[5:44:46 PM] [semantic-release] › ℹ Found 3 commits since last release
|
|
22
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
23
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
24
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @examplary/schemas since last release
|
|
25
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analyzing commit: feat(dashboard): add tags UI
|
|
26
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ The release type for the commit is minor
|
|
27
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Analysis of 1 commits complete: minor release
|
|
28
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
29
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
30
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
31
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/release-notes-generator" does not provide step "analyzeCommits"
|
|
32
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
33
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
34
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "analyzeCommits"
|
|
35
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
36
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
37
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/github" does not provide step "analyzeCommits"
|
|
38
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
39
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
40
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
41
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
42
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
43
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
44
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
45
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
46
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
47
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
48
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
49
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
50
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
51
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
52
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
53
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
54
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
55
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ No more plugins
|
|
56
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "[Function: semantic-release-monorepo]"
|
|
57
|
-
[5:44:46 PM] [semantic-release] › ℹ The next release version is 1.5.0
|
|
58
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
59
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/commit-analyzer" does not provide step "generateNotes"
|
|
60
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
61
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
62
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
63
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Found 1 commits for package @examplary/schemas since last release
|
|
64
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
65
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
66
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
67
|
-
[5:44:46 PM] [semantic-release] [[Function: semantic-release-monorepo]] › ℹ Plugin "@semantic-release/npm" does not provide step "generateNotes"
|
|
68
|
-
[5:44:46 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|
|
69
|
-
[5:44:46 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "[Function: semantic-release-monorepo]"
|