/**
 * Zod schema for ConfirmSetupRequest
 *
 * This schema provides runtime validation and type inference.
 *  * Serializer for confirming 2FA setup with first code.
 *  */
import { z } from 'zod'

/**
 * Serializer for confirming 2FA setup with first code.
 */
export const ConfirmSetupRequestSchema = z.object({
  device_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 ConfirmSetupRequest = z.infer<typeof ConfirmSetupRequestSchema>