@checkfirst/nestjs-outlook
Version:
An opinionated NestJS module for Microsoft Outlook integration that provides easy access to Microsoft Graph API for emails, calendars, and more.
58 lines (57 loc) • 1.55 kB
TypeScript
export interface RecurrenceRule {
pattern: {
type: 'daily' | 'weekly' | 'absoluteMonthly' | 'relativeMonthly' | 'absoluteYearly' | 'relativeYearly';
interval: number;
daysOfWeek?: string[];
dayOfMonth?: number;
month?: number;
firstDayOfWeek?: string;
index?: string;
};
range: {
type: 'endDate' | 'noEnd' | 'numbered';
startDate: string;
endDate?: string;
numberOfOccurrences?: number;
recurrenceTimeZone?: string;
};
}
export type OutlookEventType = 'singleInstance' | 'seriesMaster' | 'occurrence' | 'exception';
export interface ProcessedOutlookEvent {
externalId: string;
eventType: OutlookEventType;
start: {
dateTime: string;
timeZone: string;
};
end: {
dateTime: string;
timeZone: string;
};
subject: string;
bodyPreview: string;
location?: string;
showAs?: string;
changeKey?: string;
seriesMasterId?: string;
transactionId?: string;
recurrenceRule?: RecurrenceRule;
originalStart?: {
dateTime: string;
timeZone: string;
};
}
export interface ExpansionWindow {
startDate: Date;
endDate: Date;
}
export interface ExpandRecurringSeriesOptions {
existingExternalIds?: string[];
existingWindowEnd?: Date;
}
export interface RecurringEventExpansionResult {
seriesMaster: ProcessedOutlookEvent;
instances: ProcessedOutlookEvent[];
expansionWindow: ExpansionWindow;
staleExternalIds: string[];
}