Files
calchat/apps/server/src/services/interfaces/EventRepository.ts
Linus Waldowsky 1092ff2648 refactor: improve AI event handling and conflict display in chat
- AI fetches events on-demand via callbacks for better efficiency
- Add conflict detection with warning display when proposing overlapping events
- Improve event search and display in chat interface
- Load full chat history for display while limiting AI context
2026-02-02 22:44:08 +01:00

17 lines
680 B
TypeScript

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[]>;
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>;
}