import type { EmailMessage, Middleware } from "../types.mjs"; export type ScrubStrategy = "hash" | "mask" | "drop"; export interface PiiScrubberOptions { /** Which fields to scrub from observable events (logger, telemetry, * event stream). The actual outgoing email is never mutated. */ redact?: ReadonlyArray<"recipient" | "subject" | "body" | "attachments">; strategy?: ScrubStrategy; /** Sink that receives the scrubbed message. Replace the default * `logger.sink` or `telemetry.attributes` extractor with * `(msg) => scrubbed(msg)` to opt in. */ sink?: (scrubbed: Record) => void; } /** Return a sanitized shape of an EmailMessage. Not a middleware in * the Middleware shape — intended to be used inside your logger / * telemetry sink, so the actual send pipeline is untouched. */ export declare function scrubPii(msg: EmailMessage, options?: PiiScrubberOptions): Record; /** Optional plugin middleware — logs a scrubbed view of each message * via the provided sink. For wrapping your existing logger/telemetry * prefer calling `scrubPii(msg, opts)` directly. */ export declare function withPiiLogging(options: Required> & PiiScrubberOptions): Middleware;