import { Mailable } from '../Mailable.mjs'; import { MailerProvider } from '../MailerProvider.mjs'; /** * Configuration options for the SendGridProvider. */ type SendGridProviderConfig = { /** SendGrid API key */ api_key: string; /** Default sender email address */ default_from: string; }; /** * Mailer provider that sends emails via SendGrid API. * Supports API key from configuration or SENDGRID_API_KEY environment variable. */ declare class SendGridProvider implements MailerProvider { private defaultFrom; private apiKey; /** * Creates a new SendGridProvider instance. * @param options - Provider configuration options */ constructor(options?: Partial); /** * Sets the default sender email address. * @param from - The default sender email address */ setDefaultFrom(from: string): void; /** * Maps email addresses to SendGrid email objects. * @param emails - Array of email addresses * @param required - Whether the field is required * @returns Array of email objects or undefined if not required and empty */ private mapToEmailObjects; /** * Sends an email via SendGrid API. * @param mail - The email message to send * @throws Error if the SendGrid API request fails */ sendMail(mail: Mailable): Promise; } export { SendGridProvider, type SendGridProviderConfig };