import { CalendarEvent, CreateEventDTO, UpdateEventDTO } from "@calchat/shared";

export interface EventRepository {
  findById(id: string): Promise<CalendarEvent | null>;
  findByUserId(userId: string): Promise<CalendarEvent[]>;
  findByDateRange(
    userId: string,
    startDate: Date,
    endDate: Date,
  ): Promise<CalendarEvent[]>;
  findByCaldavUUID(
    userId: string,
    caldavUUID: string,
  ): Promise<CalendarEvent | null>;
  searchByTitle(userId: string, query: string): Promise<CalendarEvent[]>;
  create(userId: string, data: CreateEventDTO): Promise<CalendarEvent>;
  update(id: string, data: UpdateEventDTO): Promise<CalendarEvent | null>;
  delete(id: string): Promise<boolean>;
  addExceptionDate(id: string, date: string): Promise<CalendarEvent | null>;
}
