Files
yara724api/src/auth/dto/user/verify.dto.ts
2026-05-20 14:57:10 +03:30

45 lines
991 B
TypeScript

import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsNotEmpty, IsOptional, IsString, MaxLength } from "class-validator";
export class UserVerifyOtp {
@ApiProperty({
example: "09226187419",
type: "string",
description: "Mobile number (same value sent to send-otp)",
})
@IsString()
@IsNotEmpty()
@MaxLength(20)
username: string;
@ApiProperty({
example: "258567",
type: "string",
description: "OTP code from SMS",
})
@IsString()
@IsNotEmpty()
@MaxLength(16)
password: string;
@ApiPropertyOptional({
example: "65f0c7f0c3f8a2a7c8b3d001",
type: "string",
description: "Raw token from linked SMS URL (?token=...).",
})
@IsOptional()
@IsString()
@MaxLength(128)
linkToken?: string;
@ApiPropertyOptional({
example: "FIRST",
type: "string",
description: "Optional route/context hint for linked SMS login.",
})
@IsOptional()
@IsString()
@MaxLength(64)
linkContext?: string;
}