import { User, Medication, UserSettings, TakenDoses, CustomReminder, } from '../../types'; export interface DatabaseStrategy { // User operations createUser(user: Omit): Promise; updateUser(user: User): Promise; getUserById(id: string): Promise; findUserByEmail(email: string): Promise; deleteUser(id: string): Promise; getAllUsers(): Promise; // Medication operations createMedication( userId: string, medication: Omit ): Promise; updateMedication(medication: Medication): Promise; getMedications(userId: string): Promise; deleteMedication(id: string): Promise; // User settings operations getUserSettings(userId: string): Promise; updateUserSettings(settings: UserSettings): Promise; // Taken doses operations getTakenDoses(userId: string): Promise; updateTakenDoses(takenDoses: TakenDoses): Promise; // Custom reminders operations createCustomReminder( userId: string, reminder: Omit ): Promise; updateCustomReminder(reminder: CustomReminder): Promise; getCustomReminders(userId: string): Promise; deleteCustomReminder(id: string): Promise; // User operations with password createUserWithPassword( email: string, hashedPassword: string, username?: string ): Promise; createUserFromOAuth( email: string, username: string, provider: string ): Promise; } export class DatabaseError extends Error { status: number; constructor(message: string, status: number = 500) { super(message); this.name = 'DatabaseError'; this.status = status; } }