Spaces:
Runtime error
Runtime error
| import { ApiProperty } from '@nestjs/swagger'; | |
| import { | |
| IsEmail, | |
| IsString, | |
| IsNotEmpty, | |
| IsBoolean, | |
| IsOptional, | |
| Length, | |
| Matches, | |
| } from 'class-validator'; | |
| export class EnableEmail2FADto { | |
| ({ | |
| example: 'admin@streamflix.com', | |
| description: 'Super admin email', | |
| }) | |
| () | |
| () | |
| email: string; | |
| } | |
| export class SendEmail2FACodeDto { | |
| ({ | |
| example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...', | |
| description: 'Pending 2FA token from login', | |
| }) | |
| () | |
| () | |
| pending2faToken: string; | |
| } | |
| export class VerifyEmail2FADto { | |
| ({ | |
| example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...', | |
| description: 'Pending 2FA token from login', | |
| }) | |
| () | |
| () | |
| pending2faToken: string; | |
| ({ example: '123456', description: '6-digit verification code' }) | |
| () | |
| () | |
| (6, 6, { message: 'Code must be exactly 6 digits' }) | |
| (/^\d{6}$/, { message: 'Code must contain only digits' }) | |
| code: string; | |
| ({ | |
| example: true, | |
| description: 'Remember this device for 30 days (skip 2FA on this device)', | |
| required: false, | |
| }) | |
| () | |
| () | |
| trustDevice?: boolean; | |
| } | |