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

/**
 * Serializer for TOTP code verification during login.
 */
export const VerifyRequestSchema = 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),
  code: z.string().min(6).max(6),
})

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