-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
93 lines (82 loc) · 2.07 KB
/
Copy pathtypes.ts
File metadata and controls
93 lines (82 loc) · 2.07 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Data Models
export enum AgentType {
DIETITIAN = 'DIETITIAN',
PHYSICAL = 'PHYSICAL',
SLEEP = 'SLEEP',
COUNSELOR = 'COUNSELOR',
MEDICAL = 'MEDICAL',
COORDINATOR = 'COORDINATOR'
}
export interface FoodEntry {
id: string;
name: string;
calories: number;
protein: number;
carbs: number;
fats: number;
timestamp: Date;
imageUrl?: string;
notes?: string;
}
export interface ExerciseEntry {
id: string;
type: string;
durationMinutes: number;
intensity: 'Low' | 'Medium' | 'High';
caloriesBurned: number;
timestamp: Date;
notes?: string;
}
export type SleepQuality = 'Poor' | 'Fair' | 'Good' | 'Excellent';
export interface SleepEntry {
date: string;
bedTime: string; // HH:mm
wakeTime: string; // HH:mm
durationHours: number;
quality: SleepQuality;
dreamDescription?: string;
dreamAnalysis?: string;
}
export interface ChatMessage {
id: string;
sender: 'user' | 'agent';
text: string;
timestamp: Date;
}
export interface UserProfile {
name: string;
age: number;
gender: 'Male' | 'Female' | 'Non-binary' | 'Other' | '';
height?: number; // cm
weight?: number; // kg
goals: string[];
medicalHistory: string; // Static long-term context
geneticRisks?: string;
concerns?: string[];
}
export interface DailySummary {
date: string;
consensus: string;
caloriesIn: number;
caloriesBurned: number;
mood: string | null;
details?: string; // Text summary for quick view
foodLog?: FoodEntry[]; // Full record
exerciseLog?: ExerciseEntry[]; // Full record
sleepLog?: SleepEntry | null; // Full record
}
export interface AppState {
isAuthenticated: boolean;
onboardingComplete: boolean;
daysActive: number; // Streak
profile: UserProfile;
foodLog: FoodEntry[];
exerciseLog: ExerciseEntry[];
sleepLog: SleepEntry | null;
chatHistory: ChatMessage[];
currentEmotion: string | null;
dailyConsensus: string | null;
history: DailySummary[];
isSynthesizing: boolean;
}
export type ViewState = 'AUTH' | 'ONBOARDING' | 'DASHBOARD' | 'DIETITIAN' | 'PHYSICAL' | 'SLEEP' | 'COUNSELOR' | 'MEDICAL' | 'PROFILE';