Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
79 lines (79 loc) · 2.05 KB
/
Copy pathtypes.ts
File metadata and controls
79 lines (79 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
export type MaterialKind = 'lesson' | 'slides' | 'quiz' | 'practice' | 'flashcards' | 'video';
export type Citation = { sourceId: string; label: string; page?: number; section?: string };
export type Slide = {
title: string;
body: string;
bullets?: string[];
formula?: string;
notes?: string;
image?: { src: string; alt: string; caption?: string };
};
export type Question = {
id: string;
prompt: string;
options: string[];
answer: number;
explanation: string;
};
export type Flashcard = { id: string; front: string; back: string };
export type PracticeProblem = { id: string; prompt: string; hint?: string; solution: string };
export type Material = {
id: string;
kind: MaterialKind;
title: string;
description: string;
duration: number;
section: string;
citations: Citation[];
content?: string;
slides?: Slide[];
questions?: Question[];
problems?: PracticeProblem[];
cards?: Flashcard[];
videoUrl?: string;
transcript?: string;
};
export type Course = {
schemaVersion: 1;
id: string;
title: string;
description: string;
subject: string;
color: 'sage' | 'peach' | 'lavender' | 'blue';
icon: 'calculus' | 'biology' | 'physics' | 'book';
sourceIds: string[];
chapters: string;
createdAt: string;
updatedAt: string;
materials: Material[];
};
export type Source = {
id: string;
name: string;
type: 'pdf' | 'image' | 'text' | 'document' | 'link';
size: number;
createdAt: string;
url: string;
text?: string;
};
export type StudyRequest = {
id: string;
title: string;
prompt: string;
sourceIds: string[];
formats: MaterialKind[];
scope: string;
detail: 'brief' | 'balanced' | 'detailed';
status: 'pending' | 'completed';
createdAt: string;
courseId?: string;
};
export type Workspace = { courses: Course[]; sources: Source[]; requests: StudyRequest[] };
export type Progress = {
completed: string[];
quizScores: Record<string, { score: number; total: number }>;
reviewedCards: Record<string, string[]>;
activity: Record<string, number>;
lastMaterialId?: string;
studyMinutes: number;
};