/**
 * Zod schema for SetupResponse
 *
 * This schema provides runtime validation and type inference.
 *  * Response serializer for setup initiation.
 *  */
import { z } from 'zod'

/**
 * Response serializer for setup initiation.
 */
export const SetupResponseSchema = 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),
  secret: z.string(),
  provisioning_uri: z.string(),
  qr_code_base64: z.string(),
  expires_in: z.int(),
})

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