outlook-events-client
Version:
TypeScript library to manage Outlook calendar events using the Microsoft Graph API.
37 lines • 1.65 kB
TypeScript
import { IClientCredential, IEvent, OutlookEvent, PatchEventType } from "./interfaces";
/**
* Client for managing Outlook calendar events using Microsoft Graph API.
*/
export declare class OutlookEventsClient {
private readonly client;
/**
* Creates a new OutlookEventsClient instance.
* @param options Client credentials for authentication.
*/
constructor(options: IClientCredential);
/**
* Creates a new calendar event for a user.
* @param event The event data to create.
* @param userPrincipalName The user's principal name (email or UPN).
* @returns The created Outlook event.
* @throws Error if the event cannot be created.
*/
createEvent(event: IEvent, userPrincipalName: string): Promise<OutlookEvent>;
/**
* Cancels an existing calendar event for a user.
* @param eventId The ID of the event to cancel.
* @param userPrincipalName The user's principal name (email or UPN).
* @param comment The cancellation comment.
* @throws Error if the event cannot be canceled.
*/
cancelEvent(eventId: string, userPrincipalName: string, comment: string): Promise<void>;
/**
* Updates an existing calendar event for a user.
* @param eventId The ID of the event to update.
* @param userPrincipalName The user's principal name (email or UPN).
* @param eventPatch The patch object with updated event fields.
* @throws Error if the event cannot be updated.
*/
updateEvent(eventId: string, userPrincipalName: string, eventPatch: PatchEventType): Promise<void>;
}
//# sourceMappingURL=outlook-events-client.d.ts.map