feat: Notification Email Templates (#13940)
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
import { IsString } from 'class-validator';
|
||||
|
||||
export class TestEmailResponseDto {
|
||||
messageId!: string;
|
||||
}
|
||||
export class TemplateResponseDto {
|
||||
name!: string;
|
||||
html!: string;
|
||||
}
|
||||
export class TemplateDto {
|
||||
@IsString()
|
||||
template!: string;
|
||||
}
|
||||
|
||||
@@ -465,6 +465,24 @@ class SystemConfigNotificationsDto {
|
||||
smtp!: SystemConfigSmtpDto;
|
||||
}
|
||||
|
||||
class SystemConfigTemplateEmailsDto {
|
||||
@IsString()
|
||||
albumInviteTemplate!: string;
|
||||
|
||||
@IsString()
|
||||
welcomeTemplate!: string;
|
||||
|
||||
@IsString()
|
||||
albumUpdateTemplate!: string;
|
||||
}
|
||||
|
||||
class SystemConfigTemplatesDto {
|
||||
@Type(() => SystemConfigTemplateEmailsDto)
|
||||
@ValidateNested()
|
||||
@IsObject()
|
||||
email!: SystemConfigTemplateEmailsDto;
|
||||
}
|
||||
|
||||
class SystemConfigStorageTemplateDto {
|
||||
@ValidateBoolean()
|
||||
enabled!: boolean;
|
||||
@@ -636,6 +654,11 @@ export class SystemConfigDto implements SystemConfig {
|
||||
@IsObject()
|
||||
notifications!: SystemConfigNotificationsDto;
|
||||
|
||||
@Type(() => SystemConfigTemplatesDto)
|
||||
@ValidateNested()
|
||||
@IsObject()
|
||||
templates!: SystemConfigTemplatesDto;
|
||||
|
||||
@Type(() => SystemConfigServerDto)
|
||||
@ValidateNested()
|
||||
@IsObject()
|
||||
|
||||
Reference in New Issue
Block a user