import { DestinationCalendar, SelectedCalendar } from "@prisma/client"; import { TFunction } from "next-i18next"; import { PaymentInfo } from "@ee/lib/stripe/server"; import { Ensure } from "@lib/types/utils"; import { VideoCallData } from "@lib/videoClient"; import { NewCalendarEventType } from "../constants/types"; import { ConferenceData } from "./GoogleCalendar"; import type { Event } from "@lib/events/EventManager"; export type Person = { name: string; email: string; timeZone: string; language: { translate: TFunction; locale: string }; }; export interface EntryPoint { entryPointType?: string; uri?: string; label?: string; pin?: string; accessCode?: string; meetingCode?: string; passcode?: string; password?: string; } export interface AdditionInformation { conferenceData?: ConferenceData; entryPoints?: EntryPoint[]; hangoutLink?: string; } export interface CalendarEvent { type: string; title: string; startTime: string; endTime: string; description?: string | null; team?: { name: string; members: string[]; }; location?: string | null; organizer: Person; attendees: Person[]; conferenceData?: ConferenceData; additionInformation?: AdditionInformation; uid?: string | null; videoCallData?: VideoCallData; paymentInfo?: PaymentInfo | null; destinationCalendar?: DestinationCalendar | null; cancellationReason?: string | null; rejectionReason?: string | null; } export interface IntegrationCalendar extends Ensure, "externalId"> { primary?: boolean; name?: string; } type EventBusyDate = Record<"start" | "end", Date | string>; export interface Calendar { createEvent(event: CalendarEvent): Promise; updateEvent(uid: string, event: CalendarEvent): Promise; deleteEvent(uid: string, event: CalendarEvent): Promise; getAvailability( dateFrom: string, dateTo: string, selectedCalendars: IntegrationCalendar[] ): Promise; listCalendars(event?: CalendarEvent): Promise; }