This commit refactors how SMTP configuration for mailers is set up and introduces schema validation for incoming configurations. The mailer modules have been restructured, with schema definition files added, and redundant codes removed. Moreover, web application configuration now has minimum validation on name and title, and URL validation has been added.
8 lines
202 B
TypeScript
8 lines
202 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { MailerSchema } from './schema/mailer.schema';
|
|
|
|
export abstract class Mailer<Res = unknown> {
|
|
abstract sendEmail(data: z.infer<typeof MailerSchema>): Promise<Res>;
|
|
}
|