// This file is auto-generated by @hey-api/openapi-ts

import * as z from 'zod'

/**
 * ChatRequest
 */
export const zChatRequest = z.object({
  conversation_id: z.string().nullish(),
  files: z.array(z.unknown()).nullish(),
  inputs: z.record(z.string(), z.unknown()),
  parent_message_id: z.string().nullish(),
  query: z.string(),
  retriever_from: z.string().optional().default('explore_app'),
})

/**
 * CompletionRequest
 */
export const zCompletionRequest = z.object({
  files: z.array(z.unknown()).nullish(),
  inputs: z.record(z.string(), z.unknown()),
  query: z.string().optional().default(''),
  response_mode: z.enum(['blocking', 'streaming']).nullish(),
  retriever_from: z.string().optional().default('explore_app'),
})

/**
 * TextToSpeechRequest
 */
export const zTextToSpeechRequest = z.object({
  message_id: z.string().nullish(),
  streaming: z.boolean().nullish(),
  text: z.string().nullish(),
  voice: z.string().nullish(),
})

/**
 * WorkflowRunRequest
 */
export const zWorkflowRunRequest = z.object({
  files: z.array(z.unknown()).nullish(),
  inputs: z.record(z.string(), z.unknown()),
})

export const zGetTrialAppsByAppIdPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdAudioToTextPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdAudioToTextResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdChatMessagesBody = zChatRequest

export const zPostTrialAppsByAppIdChatMessagesPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdChatMessagesResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdCompletionMessagesBody = zCompletionRequest

export const zPostTrialAppsByAppIdCompletionMessagesPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdCompletionMessagesResponse = z.record(z.string(), z.unknown())

export const zGetTrialAppsByAppIdDatasetsPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdDatasetsResponse = z.record(z.string(), z.unknown())

export const zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsPath = z.object({
  app_id: z.string(),
  message_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponse = z.record(
  z.string(),
  z.unknown(),
)

export const zGetTrialAppsByAppIdParametersPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdParametersResponse = z.record(z.string(), z.unknown())

export const zGetTrialAppsByAppIdSitePath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdSiteResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdTextToAudioBody = zTextToSpeechRequest

export const zPostTrialAppsByAppIdTextToAudioPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdTextToAudioResponse = z.record(z.string(), z.unknown())

export const zGetTrialAppsByAppIdWorkflowsPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zGetTrialAppsByAppIdWorkflowsResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdWorkflowsRunBody = zWorkflowRunRequest

export const zPostTrialAppsByAppIdWorkflowsRunPath = z.object({
  app_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdWorkflowsRunResponse = z.record(z.string(), z.unknown())

export const zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopPath = z.object({
  app_id: z.string(),
  task_id: z.string(),
})

/**
 * Success
 */
export const zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse = z.record(
  z.string(),
  z.unknown(),
)
