@remcostoeten/fync
Version:
Unified TypeScript library for 9 popular APIs with consistent functional architecture
165 lines • 4.56 kB
TypeScript
import { type TModule } from "../core";
declare const resources: {
calendarList: import("../core").TResourceConfig<{
listCalendars: {
path: string;
};
getCalendarListEntry: {
path: string;
};
insertCalendarListEntry: {
path: string;
method: "POST";
};
updateCalendarListEntry: {
path: string;
method: "PUT";
};
patchCalendarListEntry: {
path: string;
method: "PATCH";
};
deleteCalendarListEntry: {
path: string;
method: "DELETE";
};
}>;
calendars: import("../core").TResourceConfig<{
getCalendar: {
path: string;
};
insertCalendar: {
path: string;
method: "POST";
};
updateCalendar: {
path: string;
method: "PUT";
};
patchCalendar: {
path: string;
method: "PATCH";
};
deleteCalendar: {
path: string;
method: "DELETE";
};
clearCalendar: {
path: string;
method: "POST";
};
}>;
events: import("../core").TResourceConfig<{
listEvents: {
path: string;
};
getEvent: {
path: string;
};
insertEvent: {
path: string;
method: "POST";
};
updateEvent: {
path: string;
method: "PUT";
};
patchEvent: {
path: string;
method: "PATCH";
};
deleteEvent: {
path: string;
method: "DELETE";
};
moveEvent: {
path: string;
method: "POST";
};
watchEvents: {
path: string;
method: "POST";
};
quickAddEvent: {
path: string;
method: "POST";
};
getEventInstances: {
path: string;
};
}>;
freebusy: import("../core").TResourceConfig<{
queryFreeBusy: {
path: string;
method: "POST";
};
}>;
colors: import("../core").TResourceConfig<{
getColors: {
path: string;
};
}>;
acl: import("../core").TResourceConfig<{
listAcl: {
path: string;
};
getAclRule: {
path: string;
};
insertAclRule: {
path: string;
method: "POST";
};
updateAclRule: {
path: string;
method: "PUT";
};
patchAclRule: {
path: string;
method: "PATCH";
};
deleteAclRule: {
path: string;
method: "DELETE";
};
}>;
settings: import("../core").TResourceConfig<{
listSettings: {
path: string;
};
getSetting: {
path: string;
};
watchSettings: {
path: string;
method: "POST";
};
}>;
};
type TGoogleCalendarModule = TModule<typeof resources> & {
getCalendars: () => Promise<any>;
getCalendar: (calendarId: string) => Promise<any>;
getEvents: (calendarId?: string, options?: any) => Promise<any>;
getEvent: (calendarId: string, eventId: string) => Promise<any>;
getUpcomingEvents: (calendarId?: string, maxResults?: number) => Promise<any>;
getEventsInDateRange: (calendarId: string, startDate: Date, endDate: Date) => Promise<any>;
getTodaysEvents: (calendarId?: string) => Promise<any>;
searchEvents: (query: string, calendarId?: string, maxResults?: number) => Promise<any>;
getColors: () => Promise<any>;
getFreeBusy: (params: any) => Promise<any>;
isTimeSlotBusy: (calendarId: string, startTime: Date, endTime: Date) => Promise<boolean>;
getAllCalendarEvents: (maxResults?: number) => Promise<{
calendar: any;
events: any[];
}[]>;
createEvent: (calendarId: string, event: any) => Promise<any>;
updateEvent: (calendarId: string, eventId: string, event: any) => Promise<any>;
deleteEvent: (calendarId: string, eventId: string) => Promise<any>;
quickAddEvent: (calendarId: string, text: string) => Promise<any>;
};
export declare function GoogleCalendar(config: {
token: string;
}): TGoogleCalendarModule;
export { GoogleOAuth } from "./oauth";
export * from "./types";
//# sourceMappingURL=index.d.ts.map