import { BaseRequest } from './base'; import { IsBoolean, IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator'; export class SignUpRequest extends BaseRequest { @IsEmail() username: string; @IsNotEmpty() @IsString() password: string; } export class LoginRequest extends SignUpRequest { @IsOptional() @IsNotEmpty() @IsString() otp?: string; } export class TfaComplete extends BaseRequest { @IsNotEmpty() @IsString() code: string; } export class TfaSetup extends BaseRequest { @IsNotEmpty() @IsBoolean() mail: boolean; } export class ChangePasswordRequest extends BaseRequest { @IsNotEmpty() @IsString() oldPassword: string; @IsNotEmpty() @IsString() newPassword: string; }