import { IsNotEmpty, ValidateNested, IsEmail } from 'class-validator' import { Type } from 'class-transformer' export class CredentialAttributes { @IsNotEmpty() @IsEmail() email: string @IsNotEmpty() password: string } export class SignInInput { @IsNotEmpty() @ValidateNested() @Type(() => CredentialAttributes) readonly credentials: CredentialAttributes } export class SignInParams { @IsNotEmpty() @ValidateNested() @Type(() => SignInInput) readonly input: SignInInput }