import type { CalendarCache, Prisma } from "@calcom/prisma/client"; import type { SelectedCalendarEventTypeIds } from "@calcom/types/Calendar"; export type FreeBusyArgs = { timeMin: string; timeMax: string; items: { id: string }[] }; export interface ICalendarCacheRepository { watchCalendar(args: { calendarId: string; eventTypeIds: SelectedCalendarEventTypeIds }): Promise; unwatchCalendar(args: { calendarId: string; eventTypeIds: SelectedCalendarEventTypeIds }): Promise; upsertCachedAvailability({ credentialId, userId, args, value, }: { credentialId: number; userId: number | null; args: FreeBusyArgs; value: Prisma.JsonNullValueInput | Prisma.InputJsonValue; }): Promise; getCachedAvailability({ credentialId, userId, args, }: { credentialId: number; userId: number | null; args: FreeBusyArgs; }): Promise; getCacheStatusByCredentialIds( credentialIds: number[] ): Promise<{ credentialId: number; updatedAt: Date | null }[]>; }