import { SentlyError } from "../core/errors.js"; import type { MailOptions, SendResult, Transport, VerifyResult } from "../core/types.js"; /** Header for a per-message SNDR template ID (`template_id`). */ export declare const SNDR_TEMPLATE_ID_HEADER = "x-sndr-template-id"; /** SNDR API configuration. */ export interface SndrConfig { /** * SNDR API key (starts with `sndr_live_` or `sndr_test_`). * Store in environment variables — never hardcode. */ apiKey: string; /** API base URL. Default: `https://api.sndr.sh`. */ baseUrl?: string; /** * Default SNDR template ID when not set per message via * {@link SNDR_TEMPLATE_ID_HEADER}. */ defaultTemplateId?: string; } /** Error thrown when the SNDR API returns a non-success response. */ export declare class SndrError extends SentlyError { readonly statusCode: number; readonly apiError: unknown; /** Creates an SNDR API error with status code and response payload. */ constructor(message: string, statusCode: number, apiError: unknown); } /** * SNDR HTTP API transport. */ export declare class SndrTransport implements Transport { readonly provider = "sndr"; private readonly apiKey; private readonly baseUrl; private readonly defaultTemplateId?; /** Creates an SNDR transport with the given API key. */ constructor(config: SndrConfig); /** Sends an email via `POST /v1/send`. */ send(options: MailOptions): Promise; /** Verifies the API key by listing domains (`GET /v1/domains`). */ verify(): Promise; }