/**
 * Zod schema for VerifyBackupRequest
 *
 * This schema provides runtime validation and type inference.
 *  * Serializer for backup code verification during login.
 *  */
import { z } from 'zod'

/**
 * Serializer for backup code verification during login.
 */
export const VerifyBackupRequestSchema = z.object({
  session_id: z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
  backup_code: z.string().min(8).max(8),
})

/**
 * Infer TypeScript type from Zod schema
 */
export type VerifyBackupRequest = z.infer<typeof VerifyBackupRequestSchema>