/** * Outward-facing MFA Device Response DTO * * This DTO is used for all API responses that return device information. * It maps internal `isPrimary` to external `isPreferred` to avoid exposing * internal database field names. * * @example * ```typescript * const device: MFADeviceResponseDTO = { * id: 1, * type: 'totp', * name: 'My Phone', * isPreferred: true, * isActive: true, * createdAt: new Date() * }; * ``` */ import { MFADeviceMethod } from '../enums/mfa-method.enum'; import { IMFADevice } from '../interfaces/entities.interface'; /** * Outward-facing MFA device information * * Note: Uses `isPreferred` instead of internal `isPrimary` field */ export declare class MFADeviceResponseDTO { /** * Unique device identifier */ id: number; /** * MFA method type (totp, sms, email, passkey) */ type: MFADeviceMethod; /** * Device name (user-assigned) */ name: string; /** * Whether this is the preferred device for this method * Maps from internal `isPrimary` field */ isPreferred: boolean; /** * Whether device is currently active */ isActive: boolean; /** * Device creation timestamp */ createdAt: Date; /** * Convert internal device entity to outward-facing DTO * * @param device - Internal device entity * @returns Outward-facing device DTO */ static fromEntity(device: IMFADevice): MFADeviceResponseDTO; /** * Convert array of internal device entities to outward-facing DTOs * * @param devices - Array of internal device entities * @returns Array of outward-facing device DTOs */ static fromEntities(devices: IMFADevice[]): MFADeviceResponseDTO[]; } //# sourceMappingURL=mfa-device-response.dto.d.ts.map