/**
 * Zod schema for OAuthCallbackRequestRequest
 *
 * This schema provides runtime validation and type inference.
 *  * Request to complete OAuth flow (callback handler).
 *  */
import { z } from 'zod'

/**
 * Request to complete OAuth flow (callback handler).
 */
export const OAuthCallbackRequestRequestSchema = z.object({
  code: z.string().min(10).max(500),
  state: z.string().min(20).max(100),
  redirect_uri: z.union([z.url(), z.literal('')]).optional(),
})

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