this repo has no description
1export type ExerciseType =
2 | 'multiple-choice'
3 | 'translation'
4 | 'matching-pairs'
5 | 'fill-in-the-blank'
6 | 'speak';
7
8export interface BaseExercise {
9 type: ExerciseType;
10 prompt: string;
11 promptAudio?: boolean;
12 audioText?: string;
13}
14
15export interface MultipleChoiceExercise extends BaseExercise {
16 type: 'multiple-choice';
17 choices: string[];
18 correctIndex: number;
19}
20
21export interface TranslationExercise extends BaseExercise {
22 type: 'translation';
23 acceptedAnswers: string[];
24 hint?: string;
25}
26
27export interface MatchingPairsExercise extends BaseExercise {
28 type: 'matching-pairs';
29 pairs: { left: string; right: string }[];
30}
31
32export interface FillInTheBlankExercise extends BaseExercise {
33 type: 'fill-in-the-blank';
34 sentence: string;
35 blank: string;
36 hint?: string;
37 wordBank?: string[];
38}
39
40export interface SpeakExercise extends BaseExercise {
41 type: 'speak';
42 phrase: string;
43 acceptedAnswers: string[];
44}
45
46export type Exercise =
47 | MultipleChoiceExercise
48 | TranslationExercise
49 | MatchingPairsExercise
50 | FillInTheBlankExercise
51 | SpeakExercise;
52
53export interface Lesson {
54 id: string;
55 topicId: string;
56 title: string;
57 xpReward: number;
58 exercises: Exercise[];
59}
60
61export interface Topic {
62 id: string;
63 name: string;
64 icon: string;
65 description: string;
66 section: number;
67 prerequisites: string[];
68 lessons: string[];
69}
70
71export interface Section {
72 id: number;
73 name: string;
74 description: string;
75}
76
77export interface TopicsConfig {
78 sections: Section[];
79 topics: Topic[];
80}