import type { AuthLocale } from '../../i18n/keys.js'; /** * The shape every auth mail builder (default or consumer-supplied hook) returns. * `text` is always present so each mail ships a real `text/plain` alternative * alongside the HTML — better deliverability and a graceful fallback in clients * that don't render HTML. */ export interface BuiltEmail { subject: string; html: string; text: string; } /** * Minimal HTML escape for interpolating untrusted strings (display name, * URLs containing user-controlled segments) into email bodies. Covers the * five characters that materially break out of attribute or text contexts; * sufficient for use inside a quoted attribute or as inline text. */ export declare function escapeHtml(value: string): string; /** * Combine a bare `from` address with an optional display name into the RFC-5322 * `"Name "` form. A no-op when `from` already carries a name, when no name * is given, or when `from` is unset (transport default applies). */ export declare function applyFromName(from: string | undefined, fromName: string | undefined): string | undefined; /** Context shared by the link-bearing default builders. */ export interface MailContext { name: string; url: string; appName: string; } export declare function buildVerificationEmail(ctx: MailContext, t: AuthLocale): BuiltEmail; export declare function buildPasswordResetEmail(ctx: MailContext, t: AuthLocale): BuiltEmail; export declare function buildInvitationEmail(ctx: { url: string; appName: string; }, t: AuthLocale): BuiltEmail; export declare function buildChangeEmail(ctx: MailContext, t: AuthLocale): BuiltEmail; export declare function buildChangeEmailNotice(ctx: { name: string; appName: string; newEmail: string; }, t: AuthLocale): BuiltEmail;