import { ExtendsOrEmpty } from '../utils'; import { GatewayClass } from './gateway.class'; import { ResendOptions } from './resend.types'; import { SendgridOptions } from './sendgrid.types'; import { SlackOptions } from './slack.types'; import { SmtpOptions } from './smtp.types'; export type Gateway = 'smtp' | 'console' | 'slack' | 'sendgrid' | 'resend'; export type MailOptions = { readonly gateways: [TGateway, ...TGateway[]]; readonly customGateways?: [GatewayClass, ...GatewayClass[]]; } & ExtendsOrEmpty<'smtp', TGateway, { smtp: SmtpOptions; }> & ExtendsOrEmpty<'slack', TGateway, { slack: SlackOptions; }> & ExtendsOrEmpty<'sendgrid', TGateway, { sendgrid: SendgridOptions; }> & ExtendsOrEmpty<'resend', TGateway, { resend: ResendOptions; }>;