/** * SES → SNS → webhook inbound adapter. Verifies the SNS signature, * handles `SubscriptionConfirmation` auto-confirm, and normalizes SES * Bounce/Complaint/Delivery/Received notifications. * * @module */ import type { ParsedEmail } from "../parse/index.mjs"; export type SesInboundEvent = { type: "subscription-confirm"; subscribeUrl: string; } | { type: "bounce"; bounce: Record; raw: Record; } | { type: "complaint"; complaint: Record; raw: Record; } | { type: "delivery"; delivery: Record; raw: Record; } | { type: "received"; email: ParsedEmail; raw: Record; } | { type: "unknown"; raw: Record; }; /** Parse a raw SNS envelope body (the bytes POST'd to your webhook). * The SNS signature is NOT verified here — combine with * `unemail/webhook/ses` if you want verification. */ export declare function defineSesInboundHandler(opts?: { autoConfirm?: (url: string) => void | Promise; }): Promise<(body: string) => Promise>;