/** * Minimal, dependency-free builder for iCalendar (RFC 5545) event * invites. Produces an `Attachment` you can hand to `email.send()`. * * Scope: single VEVENT with optional organizer + attendees + alarms. * That covers the meeting-invite use case, which is the 95% that * nodemailer's `icalEvent` shipped and every user needs. * * @module */ import type { Attachment } from "../types.mjs"; export type IcsMethod = "REQUEST" | "PUBLISH" | "CANCEL" | "REPLY"; export type IcsStatus = "CONFIRMED" | "TENTATIVE" | "CANCELLED"; export type IcsRole = "REQ-PARTICIPANT" | "OPT-PARTICIPANT" | "CHAIR" | "NON-PARTICIPANT"; export type IcsPartStat = "ACCEPTED" | "DECLINED" | "TENTATIVE" | "NEEDS-ACTION"; export interface IcsAttendee { email: string; name?: string; role?: IcsRole; partstat?: IcsPartStat; rsvp?: boolean; } export interface IcsAlarm { /** Minutes before the event start (positive). */ triggerMinutesBefore: number; description?: string; } export interface IcsEvent { /** Stable unique id — required by RFC 5545. */ uid: string; /** Local or UTC Date. */ start: Date; /** Local or UTC Date. */ end: Date; summary: string; description?: string; location?: string; url?: string; status?: IcsStatus; organizer?: { email: string; name?: string; }; attendees?: ReadonlyArray; alarms?: ReadonlyArray; /** 0 for new invites, incremented on updates. Default 0. */ sequence?: number; } export interface IcsOptions { method?: IcsMethod; /** PRODID identifier. Default: `-//unemail//ics//EN`. */ prodId?: string; /** Filename for the attachment. Default: `invite.ics`. */ filename?: string; } /** Build an iCalendar `VEVENT` attachment for an email. Content-Type is * set with the canonical `method=` parameter so Outlook / Gmail render * the invite inline. */ export declare function icalEvent(event: IcsEvent, options?: IcsOptions): Attachment;