ToolJet/server/src/dto/comment.dto.ts
Gandharv b5850a4694
feat: trigger mail when user is mentioned in comment (#3443)
* feat: trigger mail when user is mentioned in comment

* reset email service

* fix backspace issue

* open comment on view comment clicked from email

* add helper to highlight user in mail

* reset mentioned input value when value turns empty in parent

* fix test

* use where condition + throw error

* add userId

* feat: add notification center (#3484)

* remove commented code
2022-07-25 11:14:59 +05:30

30 lines
664 B
TypeScript

import { PartialType } from '@nestjs/mapped-types';
import { Transform } from 'class-transformer';
import { IsUUID, IsString, IsNotEmpty, IsOptional, IsDefined } from 'class-validator';
import { sanitizeInput } from 'src/helpers/utils.helper';
export class CreateCommentDto {
@IsString()
@Transform(({ value }) => sanitizeInput(value))
@IsNotEmpty()
comment: string;
@IsUUID()
threadId: string;
@IsUUID()
@IsOptional()
userId: string;
@IsUUID()
@IsOptional()
organizationId: string;
@IsString()
appVersionsId: string;
@IsDefined()
mentionedUsers: any;
}
export class UpdateCommentDto extends PartialType(CreateCommentDto) {}