import { Event } from '@hebcal/core/dist/esm/event'; import { CalOptions } from '@hebcal/core/dist/esm/CalOptions'; export type ICalEventOptions = { dtstamp?: string; sequence?: number; /** * Text for the `DESCRIPTION` property, overriding `ev.memo`. This is * per-event, so pass a fresh options object to each `IcalEvent` (for * example `new IcalEvent(ev, {...opts, memo})`) rather than setting it on * an options object shared by a whole calendar. */ memo?: string; emoji?: boolean; utmSource?: string; utmMedium?: string; utmCampaign?: string; appendHebrewToSubject?: boolean; prodid?: string; caldesc?: string; title?: string; publishedTTL?: string | boolean; calendarColor?: string; relcalid?: string; subscribe?: string | boolean; url?: boolean; }; export type ICalOptions = CalOptions & ICalEventOptions; /** * Represents an RFC 2445 iCalendar VEVENT */ export declare class IcalEvent { readonly ev: Event; readonly options: ICalOptions; readonly dtstamp: string; readonly sequence?: number; readonly timed: boolean; readonly locationName: string | null | undefined; readonly startDate: string; readonly isoDateOnly: string; readonly dtargs: string; readonly transp: string; readonly busyStatus: string; readonly endDate: string; readonly subj: string; readonly category: string | null; lines?: string[]; /** * Builds an IcalEvent object from a Hebcal Event */ constructor(ev: Event, options?: ICalOptions); getAlarm(): string | null; getUid(): string; getLongLines(): string[]; toString(): string; /** * fold lines to 75 characters */ getLines(): string[]; /** * fold line to 75 characters */ static fold(line: string): string; static escape(str: string): string; static formatYYYYMMDD(dt: Date): string; /** * Returns UTC string for iCalendar */ static makeDtstamp(dt: Date): string; static version(): string; } /** * Transforms a single Event into a VEVENT string * @returns multi-line result, delimited by \r\n */ export declare function eventToIcal(ev: Event, options: ICalOptions): string; /** * Generates an RFC 2445 iCalendar string from an array of events */ export declare function eventsToIcalendar(events: Event[], options: ICalOptions): Promise; /** * Generates an RFC 2445 iCalendar string from an array of IcalEvents */ export declare function icalEventsToString(icals: IcalEvent[], options: ICalOptions): Promise;