@octo-cyber/quiz-engine 0.5.0 → 0.5.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/dist/entities/quiz-answer.entity.js +5 -5
- package/dist/entities/quiz-answer.entity.js.map +1 -1
- package/dist/entities/quiz-attempt.entity.js +1 -1
- package/dist/entities/quiz-attempt.entity.js.map +1 -1
- package/dist/entities/quiz-category.entity.js +2 -2
- package/dist/entities/quiz-exam.entity.js +4 -4
- package/dist/entities/quiz-exam.entity.js.map +1 -1
- package/dist/entities/quiz-paper-question.entity.js +1 -1
- package/dist/entities/quiz-paper.entity.js +2 -2
- package/dist/entities/quiz-question.entity.js +6 -6
- package/dist/schemas/attempt.schema.d.ts +18 -18
- package/dist/schemas/category.schema.d.ts +16 -16
- package/dist/schemas/exam.schema.d.ts +38 -38
- package/dist/schemas/paper.schema.d.ts +32 -32
- package/dist/schemas/question.schema.d.ts +80 -80
- package/package.json +12 -1
|
@@ -45,11 +45,11 @@ __decorate([
|
|
|
45
45
|
], QuizAnswer.prototype, "questionId", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, core_1.Column)({ type: 'text', nullable: true, name: 'user_answer' }),
|
|
48
|
-
__metadata("design:type",
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
49
|
], QuizAnswer.prototype, "userAnswer", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, core_1.Column)({ type: 'boolean', nullable: true, name: 'is_correct' }),
|
|
52
|
-
__metadata("design:type",
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
53
|
], QuizAnswer.prototype, "isCorrect", void 0);
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, core_1.Column)({ type: 'float', default: 0 }),
|
|
@@ -57,15 +57,15 @@ __decorate([
|
|
|
57
57
|
], QuizAnswer.prototype, "score", void 0);
|
|
58
58
|
__decorate([
|
|
59
59
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
60
|
-
__metadata("design:type",
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
61
|
], QuizAnswer.prototype, "feedback", void 0);
|
|
62
62
|
__decorate([
|
|
63
63
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'graded_by' }),
|
|
64
|
-
__metadata("design:type",
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
65
|
], QuizAnswer.prototype, "gradedBy", void 0);
|
|
66
66
|
__decorate([
|
|
67
67
|
(0, core_1.Column)({ type: 'datetime', nullable: true, name: 'graded_at' }),
|
|
68
|
-
__metadata("design:type",
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
69
|
], QuizAnswer.prototype, "gradedAt", void 0);
|
|
70
70
|
__decorate([
|
|
71
71
|
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quiz-answer.entity.js","sourceRoot":"","sources":["../../src/entities/quiz-answer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAO0B;AAGnB,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,EAAE,CAAU;IAIZ,SAAS,CAAU;IAGnB,UAAU,CAAU;IAEpB,mDAAmD;IAEnD,UAAU,CAAiB;IAE3B,uBAAuB;IAEvB,SAAS,CAAkB;IAE3B,SAAS;IAET,KAAK,CAAU;IAEf,WAAW;IAEX,QAAQ,CAAiB;IAEzB,UAAU;IAEV,QAAQ,CAAiB;IAGzB,QAAQ,CAAe;IAGvB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AAvCY,gCAAU;AAErB;IADC,IAAA,6BAAsB,EAAC,MAAM,CAAC;;sCACnB;AAIZ;IAFC,IAAA,YAAK,GAAE;IACP,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;6CACzC;AAGnB;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SA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;6CAAC;qBAtCN,UAAU;IADtB,IAAA,aAAM,EAAC,aAAa,CAAC;GACT,UAAU,CAuCtB"}
|
|
@@ -47,7 +47,7 @@ __decorate([
|
|
|
47
47
|
], QuizAttempt.prototype, "startedAt", void 0);
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, core_1.Column)({ type: 'datetime', nullable: true, name: 'submitted_at' }),
|
|
50
|
-
__metadata("design:type",
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
51
|
], QuizAttempt.prototype, "submittedAt", void 0);
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, core_1.Column)({ type: 'int', default: 0, name: 'time_used_seconds' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quiz-attempt.entity.js","sourceRoot":"","sources":["../../src/entities/quiz-attempt.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAO0B;AAEb,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAIzE,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEtB,EAAE,CAAU;IAIZ,MAAM,CAAU;IAIhB,MAAM,CAAU;IAGhB,SAAS,CAAQ;IAGjB,WAAW,CAAe;IAE1B,cAAc;IAEd,eAAe,CAAU;IAIzB,MAAM,CAAU;IAGhB,UAAU,CAAU;IAGpB,QAAQ,CAAW;IAGnB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AArCY,kCAAW;AAEtB;IADC,IAAA,6BAAsB,EAAC,MAAM,CAAC;;uCACnB;AAIZ;IAFC,IAAA,YAAK,GAAE;IACP,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2CACzC;AAIhB;IAFC,IAAA,YAAK,GAAE;IACP,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,E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AAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;gDACzC;AAI1B;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;;oDACtC;AAIzB;IAFC,IAAA,YAAK,GAAE;IACP,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;;2CAChD;AAGhB;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;+CACvC;AAGpB;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;6CAC5C;AAGnB;IADC,IAAA,uBAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;8CAAC;AAGjB;IADC,IAAA,uBAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;8CAAC;sBApCN,WAAW;IADvB,IAAA,aAAM,EAAC,cAAc,CAAC;GACV,WAAW,CAqCvB"}
|
|
@@ -31,11 +31,11 @@ __decorate([
|
|
|
31
31
|
], QuizCategory.prototype, "name", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'parent_id' }),
|
|
34
|
-
__metadata("design:type",
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
35
|
], QuizCategory.prototype, "parentId", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
38
|
-
__metadata("design:type",
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
39
|
], QuizCategory.prototype, "description", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
(0, core_1.Column)({ type: 'int', default: 0, name: 'sort_order' }),
|
|
@@ -50,15 +50,15 @@ __decorate([
|
|
|
50
50
|
], QuizExam.prototype, "paperId", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
53
|
-
__metadata("design:type",
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
54
|
], QuizExam.prototype, "description", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, core_1.Column)({ type: 'datetime', nullable: true, name: 'start_time' }),
|
|
57
|
-
__metadata("design:type",
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
58
|
], QuizExam.prototype, "startTime", void 0);
|
|
59
59
|
__decorate([
|
|
60
60
|
(0, core_1.Column)({ type: 'datetime', nullable: true, name: 'end_time' }),
|
|
61
|
-
__metadata("design:type",
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
62
|
], QuizExam.prototype, "endTime", void 0);
|
|
63
63
|
__decorate([
|
|
64
64
|
(0, core_1.Column)({ type: 'int', default: 1, name: 'max_attempts' }),
|
|
@@ -83,7 +83,7 @@ __decorate([
|
|
|
83
83
|
], QuizExam.prototype, "status", void 0);
|
|
84
84
|
__decorate([
|
|
85
85
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'created_by' }),
|
|
86
|
-
__metadata("design:type",
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
87
|
], QuizExam.prototype, "createdBy", void 0);
|
|
88
88
|
__decorate([
|
|
89
89
|
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quiz-exam.entity.js","sourceRoot":"","sources":["../../src/entities/quiz-exam.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAO0B;AAEb,QAAA,aAAa,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,S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,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;;kDAC5C;AAI3B;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;;gDAC5C;AAIzB;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;;uDAC9C;AAIhC;IAFC,IAAA,YAAK,GAAE;IACP,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;wCAC1C;AAGhB;IADC,IAAA,aAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;2CAClD;AAG1B;IADC,IAAA,uBAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;2CAAC;AAGjB;IADC,IAAA,uBAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;2CAAC;mBAjDN,QAAQ;IADpB,IAAA,aAAM,EAAC,WAAW,CAAC;GACP,QAAQ,CAkDpB"}
|
|
@@ -46,7 +46,7 @@ __decorate([
|
|
|
46
46
|
], QuizPaperQuestion.prototype, "sortOrder", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, core_1.Column)({ type: 'varchar', length: 128, nullable: true, name: 'section_title' }),
|
|
49
|
-
__metadata("design:type",
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
50
|
], QuizPaperQuestion.prototype, "sectionTitle", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
@@ -38,7 +38,7 @@ __decorate([
|
|
|
38
38
|
], QuizPaper.prototype, "title", void 0);
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
41
|
-
__metadata("design:type",
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
42
|
], QuizPaper.prototype, "description", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, core_1.Column)({ type: 'float', default: 0, name: 'total_score' }),
|
|
@@ -59,7 +59,7 @@ __decorate([
|
|
|
59
59
|
], QuizPaper.prototype, "status", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'created_by' }),
|
|
62
|
-
__metadata("design:type",
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
63
|
], QuizPaper.prototype, "createdBy", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
@@ -50,7 +50,7 @@ __decorate([
|
|
|
50
50
|
__decorate([
|
|
51
51
|
(0, core_1.Index)(),
|
|
52
52
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'category_id' }),
|
|
53
|
-
__metadata("design:type",
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
54
|
], QuizQuestion.prototype, "categoryId", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, core_1.Index)(),
|
|
@@ -63,15 +63,15 @@ __decorate([
|
|
|
63
63
|
], QuizQuestion.prototype, "content", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
66
|
-
__metadata("design:type",
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
67
|
], QuizQuestion.prototype, "options", void 0);
|
|
68
68
|
__decorate([
|
|
69
69
|
(0, core_1.Column)({ type: 'text', nullable: true, name: 'correct_answer' }),
|
|
70
|
-
__metadata("design:type",
|
|
70
|
+
__metadata("design:type", Object)
|
|
71
71
|
], QuizQuestion.prototype, "correctAnswer", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
74
|
-
__metadata("design:type",
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
75
|
], QuizQuestion.prototype, "explanation", void 0);
|
|
76
76
|
__decorate([
|
|
77
77
|
(0, core_1.Column)({ type: 'int', default: 3 }),
|
|
@@ -79,7 +79,7 @@ __decorate([
|
|
|
79
79
|
], QuizQuestion.prototype, "difficulty", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
(0, core_1.Column)({ type: 'text', nullable: true }),
|
|
82
|
-
__metadata("design:type",
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
83
|
], QuizQuestion.prototype, "tags", void 0);
|
|
84
84
|
__decorate([
|
|
85
85
|
(0, core_1.Column)({ type: 'float', default: 1, name: 'default_score' }),
|
|
@@ -91,7 +91,7 @@ __decorate([
|
|
|
91
91
|
], QuizQuestion.prototype, "useCount", void 0);
|
|
92
92
|
__decorate([
|
|
93
93
|
(0, core_1.Column)({ type: 'varchar', length: 36, nullable: true, name: 'created_by' }),
|
|
94
|
-
__metadata("design:type",
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
95
|
], QuizQuestion.prototype, "createdBy", void 0);
|
|
96
96
|
__decorate([
|
|
97
97
|
(0, core_1.CreateDateColumn)({ name: 'created_at' }),
|
|
@@ -2,44 +2,44 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const StartAttemptSchema: z.ZodObject<{
|
|
3
3
|
examId: z.ZodString;
|
|
4
4
|
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
examId
|
|
5
|
+
examId: string;
|
|
6
6
|
}, {
|
|
7
|
-
examId
|
|
7
|
+
examId: string;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const SubmitAnswersSchema: z.ZodObject<{
|
|
10
10
|
answers: z.ZodArray<z.ZodObject<{
|
|
11
11
|
questionId: z.ZodString;
|
|
12
12
|
userAnswer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodNull]>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
questionId
|
|
15
|
-
userAnswer
|
|
14
|
+
questionId: string;
|
|
15
|
+
userAnswer: string | string[] | null;
|
|
16
16
|
}, {
|
|
17
|
-
questionId
|
|
18
|
-
userAnswer
|
|
17
|
+
questionId: string;
|
|
18
|
+
userAnswer: string | string[] | null;
|
|
19
19
|
}>, "many">;
|
|
20
20
|
timeUsedSeconds: z.ZodOptional<z.ZodNumber>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
userAnswer?: string | string[];
|
|
22
|
+
answers: {
|
|
23
|
+
questionId: string;
|
|
24
|
+
userAnswer: string | string[] | null;
|
|
26
25
|
}[];
|
|
26
|
+
timeUsedSeconds?: number | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
userAnswer?: string | string[];
|
|
28
|
+
answers: {
|
|
29
|
+
questionId: string;
|
|
30
|
+
userAnswer: string | string[] | null;
|
|
32
31
|
}[];
|
|
32
|
+
timeUsedSeconds?: number | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export declare const GradeAnswerSchema: z.ZodObject<{
|
|
35
35
|
score: z.ZodNumber;
|
|
36
36
|
feedback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
score
|
|
39
|
-
feedback?: string;
|
|
38
|
+
score: number;
|
|
39
|
+
feedback?: string | null | undefined;
|
|
40
40
|
}, {
|
|
41
|
-
score
|
|
42
|
-
feedback?: string;
|
|
41
|
+
score: number;
|
|
42
|
+
feedback?: string | null | undefined;
|
|
43
43
|
}>;
|
|
44
44
|
export type StartAttemptDto = z.infer<typeof StartAttemptSchema>;
|
|
45
45
|
export type SubmitAnswersDto = z.infer<typeof SubmitAnswersSchema>;
|
|
@@ -5,15 +5,15 @@ export declare const CreateCategorySchema: z.ZodObject<{
|
|
|
5
5
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
name
|
|
9
|
-
parentId?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
sortOrder?: number;
|
|
8
|
+
name: string;
|
|
9
|
+
parentId?: string | null | undefined;
|
|
10
|
+
description?: string | null | undefined;
|
|
11
|
+
sortOrder?: number | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
name
|
|
14
|
-
parentId?: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
sortOrder?: number;
|
|
13
|
+
name: string;
|
|
14
|
+
parentId?: string | null | undefined;
|
|
15
|
+
description?: string | null | undefined;
|
|
16
|
+
sortOrder?: number | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const UpdateCategorySchema: z.ZodObject<{
|
|
19
19
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -21,15 +21,15 @@ export declare const UpdateCategorySchema: z.ZodObject<{
|
|
|
21
21
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
22
22
|
sortOrder: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
name?: string;
|
|
25
|
-
parentId?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
sortOrder?: number;
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
parentId?: string | null | undefined;
|
|
26
|
+
description?: string | null | undefined;
|
|
27
|
+
sortOrder?: number | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
name?: string;
|
|
30
|
-
parentId?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
sortOrder?: number;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
parentId?: string | null | undefined;
|
|
31
|
+
description?: string | null | undefined;
|
|
32
|
+
sortOrder?: number | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export type CreateCategoryDto = z.infer<typeof CreateCategorySchema>;
|
|
35
35
|
export type UpdateCategoryDto = z.infer<typeof UpdateCategorySchema>;
|
|
@@ -10,25 +10,25 @@ export declare const CreateExamSchema: z.ZodObject<{
|
|
|
10
10
|
shuffleOptions: z.ZodDefault<z.ZodBoolean>;
|
|
11
11
|
showAnswerAfterSubmit: z.ZodDefault<z.ZodBoolean>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
title: string;
|
|
14
|
+
paperId: string;
|
|
15
|
+
maxAttempts: number;
|
|
16
|
+
shuffleQuestions: boolean;
|
|
17
|
+
shuffleOptions: boolean;
|
|
18
|
+
showAnswerAfterSubmit: boolean;
|
|
19
|
+
description?: string | null | undefined;
|
|
20
|
+
startTime?: string | null | undefined;
|
|
21
|
+
endTime?: string | null | undefined;
|
|
22
22
|
}, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
startTime?: string;
|
|
27
|
-
endTime?: string;
|
|
28
|
-
maxAttempts?: number;
|
|
29
|
-
shuffleQuestions?: boolean;
|
|
30
|
-
shuffleOptions?: boolean;
|
|
31
|
-
showAnswerAfterSubmit?: boolean;
|
|
23
|
+
title: string;
|
|
24
|
+
paperId: string;
|
|
25
|
+
description?: string | null | undefined;
|
|
26
|
+
startTime?: string | null | undefined;
|
|
27
|
+
endTime?: string | null | undefined;
|
|
28
|
+
maxAttempts?: number | undefined;
|
|
29
|
+
shuffleQuestions?: boolean | undefined;
|
|
30
|
+
shuffleOptions?: boolean | undefined;
|
|
31
|
+
showAnswerAfterSubmit?: boolean | undefined;
|
|
32
32
|
}>;
|
|
33
33
|
export declare const UpdateExamSchema: z.ZodObject<{
|
|
34
34
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -43,27 +43,27 @@ export declare const UpdateExamSchema: z.ZodObject<{
|
|
|
43
43
|
} & {
|
|
44
44
|
status: z.ZodOptional<z.ZodEnum<["DRAFT", "SCHEDULED", "ONGOING", "ENDED", "CANCELLED"]>>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
description?: string;
|
|
47
|
-
title?: string;
|
|
48
|
-
status?: "DRAFT" | "SCHEDULED" | "ONGOING" | "ENDED" | "CANCELLED";
|
|
49
|
-
paperId?: string;
|
|
50
|
-
startTime?: string;
|
|
51
|
-
endTime?: string;
|
|
52
|
-
maxAttempts?: number;
|
|
53
|
-
shuffleQuestions?: boolean;
|
|
54
|
-
shuffleOptions?: boolean;
|
|
55
|
-
showAnswerAfterSubmit?: boolean;
|
|
46
|
+
description?: string | null | undefined;
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
status?: "DRAFT" | "SCHEDULED" | "ONGOING" | "ENDED" | "CANCELLED" | undefined;
|
|
49
|
+
paperId?: string | undefined;
|
|
50
|
+
startTime?: string | null | undefined;
|
|
51
|
+
endTime?: string | null | undefined;
|
|
52
|
+
maxAttempts?: number | undefined;
|
|
53
|
+
shuffleQuestions?: boolean | undefined;
|
|
54
|
+
shuffleOptions?: boolean | undefined;
|
|
55
|
+
showAnswerAfterSubmit?: boolean | undefined;
|
|
56
56
|
}, {
|
|
57
|
-
description?: string;
|
|
58
|
-
title?: string;
|
|
59
|
-
status?: "DRAFT" | "SCHEDULED" | "ONGOING" | "ENDED" | "CANCELLED";
|
|
60
|
-
paperId?: string;
|
|
61
|
-
startTime?: string;
|
|
62
|
-
endTime?: string;
|
|
63
|
-
maxAttempts?: number;
|
|
64
|
-
shuffleQuestions?: boolean;
|
|
65
|
-
shuffleOptions?: boolean;
|
|
66
|
-
showAnswerAfterSubmit?: boolean;
|
|
57
|
+
description?: string | null | undefined;
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
status?: "DRAFT" | "SCHEDULED" | "ONGOING" | "ENDED" | "CANCELLED" | undefined;
|
|
60
|
+
paperId?: string | undefined;
|
|
61
|
+
startTime?: string | null | undefined;
|
|
62
|
+
endTime?: string | null | undefined;
|
|
63
|
+
maxAttempts?: number | undefined;
|
|
64
|
+
shuffleQuestions?: boolean | undefined;
|
|
65
|
+
shuffleOptions?: boolean | undefined;
|
|
66
|
+
showAnswerAfterSubmit?: boolean | undefined;
|
|
67
67
|
}>;
|
|
68
68
|
export type CreateExamDto = z.infer<typeof CreateExamSchema>;
|
|
69
69
|
export type UpdateExamDto = z.infer<typeof UpdateExamSchema>;
|
|
@@ -5,15 +5,15 @@ export declare const CreatePaperSchema: z.ZodObject<{
|
|
|
5
5
|
passingScore: z.ZodDefault<z.ZodNumber>;
|
|
6
6
|
timeLimit: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
title: string;
|
|
9
|
+
passingScore: number;
|
|
10
|
+
timeLimit: number;
|
|
11
|
+
description?: string | null | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
passingScore?: number;
|
|
16
|
-
timeLimit?: number;
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string | null | undefined;
|
|
15
|
+
passingScore?: number | undefined;
|
|
16
|
+
timeLimit?: number | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const UpdatePaperSchema: z.ZodObject<{
|
|
19
19
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -23,17 +23,17 @@ export declare const UpdatePaperSchema: z.ZodObject<{
|
|
|
23
23
|
} & {
|
|
24
24
|
status: z.ZodOptional<z.ZodEnum<["DRAFT", "PUBLISHED", "ARCHIVED"]>>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
description?: string;
|
|
27
|
-
title?: string;
|
|
28
|
-
passingScore?: number;
|
|
29
|
-
timeLimit?: number;
|
|
30
|
-
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED";
|
|
26
|
+
description?: string | null | undefined;
|
|
27
|
+
title?: string | undefined;
|
|
28
|
+
passingScore?: number | undefined;
|
|
29
|
+
timeLimit?: number | undefined;
|
|
30
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
31
31
|
}, {
|
|
32
|
-
description?: string;
|
|
33
|
-
title?: string;
|
|
34
|
-
passingScore?: number;
|
|
35
|
-
timeLimit?: number;
|
|
36
|
-
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED";
|
|
32
|
+
description?: string | null | undefined;
|
|
33
|
+
title?: string | undefined;
|
|
34
|
+
passingScore?: number | undefined;
|
|
35
|
+
timeLimit?: number | undefined;
|
|
36
|
+
status?: "DRAFT" | "PUBLISHED" | "ARCHIVED" | undefined;
|
|
37
37
|
}>;
|
|
38
38
|
export declare const AddQuestionSchema: z.ZodObject<{
|
|
39
39
|
questionId: z.ZodString;
|
|
@@ -41,28 +41,28 @@ export declare const AddQuestionSchema: z.ZodObject<{
|
|
|
41
41
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
42
42
|
sectionTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
43
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
score?: number;
|
|
47
|
-
sectionTitle?: string;
|
|
44
|
+
questionId: string;
|
|
45
|
+
sortOrder?: number | undefined;
|
|
46
|
+
score?: number | undefined;
|
|
47
|
+
sectionTitle?: string | null | undefined;
|
|
48
48
|
}, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
score?: number;
|
|
52
|
-
sectionTitle?: string;
|
|
49
|
+
questionId: string;
|
|
50
|
+
sortOrder?: number | undefined;
|
|
51
|
+
score?: number | undefined;
|
|
52
|
+
sectionTitle?: string | null | undefined;
|
|
53
53
|
}>;
|
|
54
54
|
export declare const UpdatePaperQuestionSchema: z.ZodObject<{
|
|
55
55
|
score: z.ZodOptional<z.ZodNumber>;
|
|
56
56
|
sortOrder: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
sectionTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
sortOrder?: number;
|
|
60
|
-
score?: number;
|
|
61
|
-
sectionTitle?: string;
|
|
59
|
+
sortOrder?: number | undefined;
|
|
60
|
+
score?: number | undefined;
|
|
61
|
+
sectionTitle?: string | null | undefined;
|
|
62
62
|
}, {
|
|
63
|
-
sortOrder?: number;
|
|
64
|
-
score?: number;
|
|
65
|
-
sectionTitle?: string;
|
|
63
|
+
sortOrder?: number | undefined;
|
|
64
|
+
score?: number | undefined;
|
|
65
|
+
sectionTitle?: string | null | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
export type CreatePaperDto = z.infer<typeof CreatePaperSchema>;
|
|
68
68
|
export type UpdatePaperDto = z.infer<typeof UpdatePaperSchema>;
|
|
@@ -3,11 +3,11 @@ export declare const QuestionOptionSchema: z.ZodObject<{
|
|
|
3
3
|
key: z.ZodString;
|
|
4
4
|
text: z.ZodString;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
text
|
|
7
|
-
key
|
|
6
|
+
text: string;
|
|
7
|
+
key: string;
|
|
8
8
|
}, {
|
|
9
|
-
text
|
|
10
|
-
key
|
|
9
|
+
text: string;
|
|
10
|
+
key: string;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const CreateQuestionSchema: z.ZodObject<{
|
|
13
13
|
categoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -17,11 +17,11 @@ export declare const CreateQuestionSchema: z.ZodObject<{
|
|
|
17
17
|
key: z.ZodString;
|
|
18
18
|
text: z.ZodString;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
text
|
|
21
|
-
key
|
|
20
|
+
text: string;
|
|
21
|
+
key: string;
|
|
22
22
|
}, {
|
|
23
|
-
text
|
|
24
|
-
key
|
|
23
|
+
text: string;
|
|
24
|
+
key: string;
|
|
25
25
|
}>, "many">>>;
|
|
26
26
|
correctAnswer: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
27
27
|
explanation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -29,31 +29,31 @@ export declare const CreateQuestionSchema: z.ZodObject<{
|
|
|
29
29
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
30
30
|
defaultScore: z.ZodDefault<z.ZodNumber>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
type
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
type: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY";
|
|
33
|
+
content: string;
|
|
34
|
+
difficulty: number;
|
|
35
|
+
defaultScore: number;
|
|
36
|
+
categoryId?: string | null | undefined;
|
|
35
37
|
options?: {
|
|
36
|
-
text
|
|
37
|
-
key
|
|
38
|
-
}[];
|
|
39
|
-
correctAnswer?: string | string[];
|
|
40
|
-
explanation?: string;
|
|
41
|
-
|
|
42
|
-
tags?: string[];
|
|
43
|
-
defaultScore?: number;
|
|
38
|
+
text: string;
|
|
39
|
+
key: string;
|
|
40
|
+
}[] | null | undefined;
|
|
41
|
+
correctAnswer?: string | string[] | null | undefined;
|
|
42
|
+
explanation?: string | null | undefined;
|
|
43
|
+
tags?: string[] | null | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
type
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
type: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY";
|
|
46
|
+
content: string;
|
|
47
|
+
categoryId?: string | null | undefined;
|
|
48
48
|
options?: {
|
|
49
|
-
text
|
|
50
|
-
key
|
|
51
|
-
}[];
|
|
52
|
-
correctAnswer?: string | string[];
|
|
53
|
-
explanation?: string;
|
|
54
|
-
difficulty?: number;
|
|
55
|
-
tags?: string[];
|
|
56
|
-
defaultScore?: number;
|
|
49
|
+
text: string;
|
|
50
|
+
key: string;
|
|
51
|
+
}[] | null | undefined;
|
|
52
|
+
correctAnswer?: string | string[] | null | undefined;
|
|
53
|
+
explanation?: string | null | undefined;
|
|
54
|
+
difficulty?: number | undefined;
|
|
55
|
+
tags?: string[] | null | undefined;
|
|
56
|
+
defaultScore?: number | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
export declare const UpdateQuestionSchema: z.ZodObject<{
|
|
59
59
|
categoryId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -63,11 +63,11 @@ export declare const UpdateQuestionSchema: z.ZodObject<{
|
|
|
63
63
|
key: z.ZodString;
|
|
64
64
|
text: z.ZodString;
|
|
65
65
|
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
text
|
|
67
|
-
key
|
|
66
|
+
text: string;
|
|
67
|
+
key: string;
|
|
68
68
|
}, {
|
|
69
|
-
text
|
|
70
|
-
key
|
|
69
|
+
text: string;
|
|
70
|
+
key: string;
|
|
71
71
|
}>, "many">>>>;
|
|
72
72
|
correctAnswer: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>;
|
|
73
73
|
explanation: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -75,31 +75,31 @@ export declare const UpdateQuestionSchema: z.ZodObject<{
|
|
|
75
75
|
tags: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
|
|
76
76
|
defaultScore: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY";
|
|
79
|
-
categoryId?: string;
|
|
80
|
-
content?: string;
|
|
78
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
79
|
+
categoryId?: string | null | undefined;
|
|
80
|
+
content?: string | undefined;
|
|
81
81
|
options?: {
|
|
82
|
-
text
|
|
83
|
-
key
|
|
84
|
-
}[];
|
|
85
|
-
correctAnswer?: string | string[];
|
|
86
|
-
explanation?: string;
|
|
87
|
-
difficulty?: number;
|
|
88
|
-
tags?: string[];
|
|
89
|
-
defaultScore?: number;
|
|
82
|
+
text: string;
|
|
83
|
+
key: string;
|
|
84
|
+
}[] | null | undefined;
|
|
85
|
+
correctAnswer?: string | string[] | null | undefined;
|
|
86
|
+
explanation?: string | null | undefined;
|
|
87
|
+
difficulty?: number | undefined;
|
|
88
|
+
tags?: string[] | null | undefined;
|
|
89
|
+
defaultScore?: number | undefined;
|
|
90
90
|
}, {
|
|
91
|
-
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY";
|
|
92
|
-
categoryId?: string;
|
|
93
|
-
content?: string;
|
|
91
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
92
|
+
categoryId?: string | null | undefined;
|
|
93
|
+
content?: string | undefined;
|
|
94
94
|
options?: {
|
|
95
|
-
text
|
|
96
|
-
key
|
|
97
|
-
}[];
|
|
98
|
-
correctAnswer?: string | string[];
|
|
99
|
-
explanation?: string;
|
|
100
|
-
difficulty?: number;
|
|
101
|
-
tags?: string[];
|
|
102
|
-
defaultScore?: number;
|
|
95
|
+
text: string;
|
|
96
|
+
key: string;
|
|
97
|
+
}[] | null | undefined;
|
|
98
|
+
correctAnswer?: string | string[] | null | undefined;
|
|
99
|
+
explanation?: string | null | undefined;
|
|
100
|
+
difficulty?: number | undefined;
|
|
101
|
+
tags?: string[] | null | undefined;
|
|
102
|
+
defaultScore?: number | undefined;
|
|
103
103
|
}>;
|
|
104
104
|
export declare const SmartGenerateSchema: z.ZodObject<{
|
|
105
105
|
paperId: z.ZodString;
|
|
@@ -110,35 +110,35 @@ export declare const SmartGenerateSchema: z.ZodObject<{
|
|
|
110
110
|
count: z.ZodNumber;
|
|
111
111
|
scorePerQuestion: z.ZodOptional<z.ZodNumber>;
|
|
112
112
|
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
scorePerQuestion?: number;
|
|
113
|
+
count: number;
|
|
114
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
115
|
+
categoryId?: string | null | undefined;
|
|
116
|
+
difficulty?: number | undefined;
|
|
117
|
+
scorePerQuestion?: number | undefined;
|
|
118
118
|
}, {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
scorePerQuestion?: number;
|
|
119
|
+
count: number;
|
|
120
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
121
|
+
categoryId?: string | null | undefined;
|
|
122
|
+
difficulty?: number | undefined;
|
|
123
|
+
scorePerQuestion?: number | undefined;
|
|
124
124
|
}>, "many">;
|
|
125
125
|
}, "strip", z.ZodTypeAny, {
|
|
126
|
-
paperId
|
|
127
|
-
rules
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
scorePerQuestion?: number;
|
|
126
|
+
paperId: string;
|
|
127
|
+
rules: {
|
|
128
|
+
count: number;
|
|
129
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
130
|
+
categoryId?: string | null | undefined;
|
|
131
|
+
difficulty?: number | undefined;
|
|
132
|
+
scorePerQuestion?: number | undefined;
|
|
133
133
|
}[];
|
|
134
134
|
}, {
|
|
135
|
-
paperId
|
|
136
|
-
rules
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
scorePerQuestion?: number;
|
|
135
|
+
paperId: string;
|
|
136
|
+
rules: {
|
|
137
|
+
count: number;
|
|
138
|
+
type?: "SINGLE_CHOICE" | "MULTIPLE_CHOICE" | "TRUE_FALSE" | "FILL_BLANK" | "ESSAY" | undefined;
|
|
139
|
+
categoryId?: string | null | undefined;
|
|
140
|
+
difficulty?: number | undefined;
|
|
141
|
+
scorePerQuestion?: number | undefined;
|
|
142
142
|
}[];
|
|
143
143
|
}>;
|
|
144
144
|
export type CreateQuestionDto = z.infer<typeof CreateQuestionSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octo-cyber/quiz-engine",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Octo quiz engine module — question bank, smart paper generation, online exam, auto grading, statistics",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -76,6 +76,17 @@
|
|
|
76
76
|
"registry": "https://registry.npmjs.org/"
|
|
77
77
|
},
|
|
78
78
|
"license": "MIT",
|
|
79
|
+
"repository": {
|
|
80
|
+
"type": "git",
|
|
81
|
+
"url": "https://github.com/jefflower/octo-quiz-engine.git"
|
|
82
|
+
},
|
|
83
|
+
"publishMeta": {
|
|
84
|
+
"repository": "jefflower/octo-quiz-engine",
|
|
85
|
+
"branch": "main",
|
|
86
|
+
"commitHash": "7abdcd595fe7332406f8a3b2539361bba6f3108e",
|
|
87
|
+
"publishedAt": "2026-03-27T15:36:51.428Z",
|
|
88
|
+
"publishedFrom": "monorepo:packages/quiz-engine"
|
|
89
|
+
},
|
|
79
90
|
"scripts": {
|
|
80
91
|
"build": "tsc -p tsconfig.build.json",
|
|
81
92
|
"dev": "tsc -p tsconfig.build.json --watch",
|