/** * ICS (iCalendar / RFC 5545) generation and parsing. * * Supports a VEVENT-only subset: * SUMMARY, DESCRIPTION, DTSTART, DTEND, LOCATION, UID, RRULE, VTIMEZONE ref. * * Cron→RRULE mapping: * daily (0 H * * *) → FREQ=DAILY * weekly+days (0 H * * 1,3,5) → FREQ=WEEKLY;BYDAY=MO,WE,FR * monthly-date (0 H D * *) → FREQ=MONTHLY;BYMONTHDAY=D * unmappable (anything else) → no RRULE; individual VEVENTs per occurrence */ export interface ICSEvent { eventId: string; name: string; description?: string; startDate: string; endDate?: string; location?: string; recurrence?: string; timezone?: string; } export type AttendeeRole = "organizer" | "chair" | "req-participant" | "opt-participant" | "non-participant"; export interface ParsedAttendee { /** Lowercased email local+domain from `mailto:` URI; null for non-mailto values (rooms, resources, groups). */ address: string | null; /** CN parameter, unescaped. */ displayName?: string; role: AttendeeRole; /** PARTSTAT parameter, lowercased (e.g. "accepted", "declined", "tentative", "needs-action"). */ partstat?: string; /** Raw URI value, kept verbatim for visibility on non-mailto entries. */ rawValue: string; } export interface ParsedEvent { summary: string; dtstart: string; dtend?: string; location?: string; description?: string; uid?: string; recurrence?: string; /** True when DTSTART carries `VALUE=DATE` (RFC 5545 §3.3.4 date-only). */ isAllDay: boolean; /** Every ATTENDEE plus the ORGANIZER if present. Empty array if none. */ attendees: ParsedAttendee[]; } export interface ParseResult { events: ParsedEvent[]; parseErrors: string[]; } export interface RRuleResult { rrule: string | null; reason?: string; } export declare function cronToRRule(cron: string): RRuleResult; export interface GenerateOptions { /** Number of individual VEVENTs to produce for unmappable recurring events */ fallbackOccurrences?: number; } export declare function generateICS(events: ICSEvent[], options?: GenerateOptions): string; export declare function parseICS(content: string): ParseResult; //# sourceMappingURL=ics.d.ts.map