UNPKG

@mbc-cqrs-serverless/core

Version:
22 lines (21 loc) 950 B
import { SendEmailCommandOutput } from '@aws-sdk/client-sesv2'; import { ConfigService } from '@nestjs/config'; import { EmailNotification, TemplatedEmailNotification } from '../interfaces'; declare const CLIENT_INSTANCE: unique symbol; export declare class EmailService { private readonly config; private readonly logger; private readonly [CLIENT_INSTANCE]; constructor(config: ConfigService); sendEmail(msg: EmailNotification): Promise<any>; /** * Sends an email using SES v2 Inline Templates. * @remarks * Supports a hybrid mode for local development: * - PRODUCTION: Uses AWS SES Native Inline Templates. * - OFFLINE/LOCAL: Falls back to 'Simple' email with manual variable substitution * to bypass limitations of local emulators (like serverless-offline-ses-v2). */ sendInlineTemplateEmail(msg: TemplatedEmailNotification): Promise<SendEmailCommandOutput | undefined>; } export {};