mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 17:38:12 +00:00
45 lines
738 B
TypeScript
45 lines
738 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
|
|
export class SendEmail {
|
|
@ApiProperty()
|
|
@IsEmail()
|
|
@IsNotEmpty()
|
|
to: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
sourceId?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
sourceName?: string;
|
|
|
|
@ApiProperty()
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
subject: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
html?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
text?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
body?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
context?: Record<string, any>;
|
|
|
|
|
|
}
|