@openinc/parse-server-opendash
Version:
Parse Server Cloud Code for open.INC Stack.
35 lines (34 loc) • 1.08 kB
TypeScript
import { GraphEvent, GraphEventResponse } from "../types/Event";
/**
* Manager for calendar operations via Microsoft Graph API
*/
export declare class CalendarManager {
isValid: boolean;
private getAccess;
/**
* Create a new event in the calendar
* @param event The event data to create
* @returns the created event response
*/
createEvent(event: GraphEvent): Promise<GraphEventResponse | undefined>;
/**
* Update an event in the calendar
* @param eventId The ID of the event to update
* @param event The updated event data
* @returns
*/
updateEvent(eventId: string, event: Partial<GraphEvent>): Promise<unknown>;
/**
* Delete an event from the calendar
* @param eventId The ID of the event to delete
* @returns whether the deletion was successful
*/
deleteEvent(eventId: string): Promise<boolean | undefined>;
/**
* Fetch all events in calendar
* @returns the list of events
*/
fetchEvents(): Promise<{
value: GraphEventResponse[];
} | undefined>;
}