import { IsNotEmpty, ValidateNested, MaxLength, MinLength } from 'class-validator' import { Type } from 'class-transformer' import { AUTH_TOKEN_LENGTH } from '../../../../services/authentication/helpers' export class ValidateTokenInput { @IsNotEmpty() readonly login: string @MinLength(AUTH_TOKEN_LENGTH) @MaxLength(AUTH_TOKEN_LENGTH) readonly token: string } export class ValidateTokenParams { @IsNotEmpty() @ValidateNested() @Type(() => ValidateTokenInput) readonly input: ValidateTokenInput }