import type { EmailTransport } from './types.js'; export interface LettermintConfig { /** Lettermint API token, sent in the `x-lettermint-token` header. Required. */ token: string; /** * Default sender (optionally `Display Name `), used when a * send carries no `from` of its own. A per-send `from` always wins. The * Lettermint v2 API requires a sender, so a send with neither a per-send nor a * configured `from` throws before issuing the request. */ from?: string; /** * API base URL, without a trailing slash. The send endpoint is `${baseUrl}/send`. * @default 'https://api.lettermint.co/v1' */ baseUrl?: string; /** * Abort the request after this many milliseconds (via `AbortSignal.timeout`), * surfaced as an Error so a stalled connection can't hang the caller forever. * @default 10000 */ timeoutMs?: number; } /** * Email transport backed by the Lettermint v2 send API. Zero-dependency: uses * the native `fetch` (no SDK). POSTs to `${baseUrl}/send` with the token in the * `x-lettermint-token` header and a JSON body of * `{ from, to: string[], subject, html?, text? }`. * * The sender resolves from the per-send `from`, falling back to the transport's * configured {@link LettermintConfig.from}. The API requires a sender, so a send * with neither throws (the auth handlers thread `config.email.from`, so their * mails always carry one). The request is bounded by * {@link LettermintConfig.timeoutMs}; a timeout and a non-2xx response are both * surfaced as an Error (the latter carrying the status + response body). */ export declare function createLettermintTransport(config: LettermintConfig): EmailTransport;