Spaces:
Runtime error
Runtime error
| import { ApiProperty } from '@nestjs/swagger'; | |
| import { | |
| IsEmail, | |
| IsString, | |
| IsNotEmpty, | |
| IsBoolean, | |
| IsOptional, | |
| Length, | |
| Matches, | |
| } from 'class-validator'; | |
| export class VerifyRecoveryCodeDto { | |
| ({ | |
| example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...', | |
| description: 'Pending 2FA token from login', | |
| }) | |
| () | |
| () | |
| pending2faToken: string; | |
| ({ example: 'ABCD-EFGH', description: 'Recovery code' }) | |
| () | |
| () | |
| (9, 9, { message: 'Recovery code must be in format XXXX-XXXX' }) | |
| (/^[A-Z0-9]{4}-[A-Z0-9]{4}$/, { | |
| message: 'Invalid recovery code format', | |
| }) | |
| code: string; | |
| ({ | |
| example: true, | |
| description: 'Remember this device for 30 days (skip 2FA on this device)', | |
| required: false, | |
| }) | |
| () | |
| () | |
| trustDevice?: boolean; | |
| } | |
| export class RegenerateRecoveryCodesDto { | |
| ({ | |
| example: 'admin@streamflix.com', | |
| description: 'Super admin email', | |
| }) | |
| () | |
| () | |
| email: string; | |
| } | |