This commit is contained in:
1 parent
50df22928b
commit
7c0ee9f186
38 files changed
+920
-240
No files matched your search
Vendored
+18
-2
@@ -1,4 +1,9 @@
|
||||
import type { BookingSeat, DestinationCalendar, Prisma, SelectedCalendar } from "@prisma/client";
|
||||
import type {
|
||||
BookingSeat,
|
||||
DestinationCalendar,
|
||||
Prisma,
|
||||
SelectedCalendar as _SelectedCalendar,
|
||||
} from "@prisma/client";
|
||||
import type { Dayjs } from "dayjs";
|
||||
import type { calendar_v3 } from "googleapis";
|
||||
import type { Time } from "ical.js";
|
||||
@@ -231,7 +236,7 @@ export interface AdditionalInformation {
|
||||
hangoutLink?: string;
|
||||
}
|
||||
|
||||
export interface IntegrationCalendar extends Ensure<Partial<SelectedCalendar>, "externalId"> {
|
||||
export interface IntegrationCalendar extends Ensure<Partial<_SelectedCalendar>, "externalId"> {
|
||||
primary?: boolean;
|
||||
name?: string;
|
||||
readOnly?: boolean;
|
||||
@@ -259,7 +264,13 @@ export interface Calendar {
|
||||
selectedCalendars: IntegrationCalendar[]
|
||||
): Promise<EventBusyDate[]>;
|
||||
|
||||
fetchAvailabilityAndSetCache?(selectedCalendars: IntegrationCalendar[]): Promise<unknown>;
|
||||
|
||||
listCalendars(event?: CalendarEvent): Promise<IntegrationCalendar[]>;
|
||||
|
||||
watchCalendar?(options: { calendarId: string }): Promise<unknown>;
|
||||
|
||||
unwatchCalendar?(options: { calendarId: string }): Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -268,3 +279,8 @@ export interface Calendar {
|
||||
type Class<I, Args extends any[] = any[]> = new (...args: Args) => I;
|
||||
|
||||
export type CalendarClass = Class<Calendar, [CredentialPayload]>;
|
||||
|
||||
export type SelectedCalendar = Pick<
|
||||
_SelectedCalendar,
|
||||
"userId" | "integration" | "externalId" | "credentialId"
|
||||
>;
|
||||
Reference in new issue
Block a user