refactor: mail templates

This commit is contained in:
Ahmed Bouhuolia
2025-06-08 16:49:03 +02:00
parent 0a57b6e20e
commit 4366bf478a
44 changed files with 1866 additions and 134 deletions

View File

@@ -0,0 +1,37 @@
import { ArrayMinSize, IsArray, IsNotEmpty, IsObject, IsString } from "class-validator";
import { AddressItem } from "../MailNotification.types";
export class CommonMailOptionsDto {
@IsArray()
@ArrayMinSize(1)
@IsNotEmpty()
from: Array<string>;
@IsString()
@IsNotEmpty()
subject: string;
@IsString()
@IsNotEmpty()
message: string;
@IsArray()
@ArrayMinSize(1)
@IsNotEmpty()
to: Array<string>;
@IsArray()
cc?: Array<string>;
@IsArray()
bcc?: Array<string>;
@IsObject()
formatArgs?: Record<string, any>;
@IsArray()
toOptions: Array<AddressItem>;
@IsArray()
fromOptions: Array<AddressItem>;
}