import type { DriverFactory, EmailMessage } from "../types.mjs"; /** Options for the generic `http` driver — useful for proxying through * your own endpoint (a Next.js route handler, a hosted worker, a test * harness, anything JSON-shaped). */ export interface HttpDriverOptions { /** The POST target. */ endpoint: string; /** HTTP method. Defaults to POST. */ method?: string; /** Bearer token sent as `Authorization: Bearer ` when set. */ apiKey?: string; /** Extra headers merged on every request. */ headers?: Record; /** Transform the normalized message into the payload shape your API * expects. The default emits a sensible object similar to Resend's * public shape. */ transform?: (msg: EmailMessage) => unknown; /** Extract the provider-assigned id from the response body. Default: * looks at \`id\`, \`messageId\`, \`data.id\`, \`data.messageId\`. */ extractId?: (body: unknown) => string | null; /** Injected fetch — defaults to global \`fetch\`. */ fetch?: typeof fetch; } declare const http: DriverFactory; export default http;