import { SendSupportMessageDto as ISendSupportMessageDto } from "@edr/types";
import { ApiPropertyOptional } from "@nestjs/swagger";
import { IsOptional, IsString, MaxLength } from "class-validator";

export class SendMessageDto implements ISendSupportMessageDto {
  @ApiPropertyOptional({
    description:
      "Message text. Optional only when the request carries attachments — the " +
      "service rejects a message that is neither text nor files.",
  })
  @IsOptional()
  @IsString()
  @MaxLength(4000)
  body?: string;
}
