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