import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsOptional, IsString, Matches, MaxLength } from 'class-validator'; /** Step-up proof for a new Telegram link token (Spec 9a.5). */ export class TelegramLinkTokenDto { @ApiProperty({ description: 'Aktuelles Passwort' }) @IsString() @MaxLength(200) password!: string; @ApiPropertyOptional({ description: 'Aktueller TOTP-Code, falls MFA aktiv' }) @IsOptional() @Matches(/^\d{6}$/, { message: 'mfaCode must be a 6-digit number' }) mfaCode?: string; }