import { SentlyError } from "../core/errors.js"; import type { MailOptions, SendResult, Transport, VerifyResult } from "../core/types.js"; /** Resend API configuration. */ export interface ResendConfig { /** Resend API key (starts with `re_`). */ apiKey: string; /** API base URL. Default: `https://api.resend.com`. */ baseUrl?: string; /** Max batch HTTP requests per rate window. Default: `2` (Resend API limit). Set `0` to disable. */ rateDelta?: number; /** Rate limit window in milliseconds. Default: `1000`. */ rateLimit?: number; } /** Maximum messages per Resend batch request (overridable per account). */ export declare const RESEND_BATCH_MAX = 100; /** Error thrown when the Resend API returns a non-success response. */ export declare class ResendError extends SentlyError { readonly statusCode: number; readonly apiError: unknown; /** Creates a Resend API error with status code and response payload. */ constructor(message: string, statusCode: number, apiError: unknown); } /** * Resend HTTP API transport. */ export declare class ResendTransport implements Transport { readonly provider = "resend"; /** Resend API key for Bearer authentication. */ private readonly apiKey; /** Resend API base URL. */ private readonly baseUrl; /** Optional rate limiter for multi-chunk batch sends. */ private readonly rateLimiter; /** Maximum messages per batch HTTP request. */ readonly batchMax = 100; /** Creates a Resend transport with the given API key. */ constructor(config: ResendConfig); /** Build the JSON body for a single Resend email. */ private buildEmailBody; /** Map a Resend API response id to a normalized SendResult. */ private toSendResult; /** Sends an email via the Resend HTTP API. */ send(options: MailOptions): Promise; /** Send up to {@link RESEND_BATCH_MAX} attachment-free messages per batch request. */ sendBatch(messages: MailOptions[]): Promise; /** Verifies the Resend API key by listing domains. */ verify(): Promise; }