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

export type ClientOptions = {
  baseUrl: `${string}://${string}/v1` | (string & {})
}

export type Annotation = {
  content?: string | null
  created_at?: number | null
  hit_count?: number | null
  id: string
  question?: string | null
}

export type AnnotationCreatePayload = {
  answer: string
  question: string
}

export type AnnotationList = {
  data: Array<Annotation>
  has_more: boolean
  limit: number
  page: number
  total: number
}

export type AnnotationListQuery = {
  keyword?: string
  limit?: number
  page?: number
}

export type AnnotationReplyActionPayload = {
  embedding_model_name: string
  embedding_provider_name: string
  score_threshold: number
}

export type AppInfoResponse = {
  author_name: string | null
  description: string | null
  mode: string
  name: string
  tags: Array<string>
}

export type ChatRequestPayload = {
  auto_generate_name?: boolean
  conversation_id?: string | null
  files?: Array<{
    [key: string]: unknown
  }> | null
  inputs: {
    [key: string]: unknown
  }
  query: string
  response_mode?: 'blocking' | 'streaming' | null
  retriever_from?: string
  workflow_id?: string | null
}

export type ChildChunkCreatePayload = {
  content: string
}

export type ChildChunkListQuery = {
  keyword?: string | null
  limit?: number
  page?: number
}

export type ChildChunkUpdatePayload = {
  content: string
}

export type CompletionRequestPayload = {
  files?: Array<{
    [key: string]: unknown
  }> | null
  inputs: {
    [key: string]: unknown
  }
  query?: string
  response_mode?: 'blocking' | 'streaming' | null
  retriever_from?: string
}

export type Condition = {
  comparison_operator:
    | '<'
    | '='
    | '>'
    | 'after'
    | 'before'
    | 'contains'
    | 'empty'
    | 'end with'
    | 'in'
    | 'is'
    | 'is not'
    | 'not contains'
    | 'not empty'
    | 'not in'
    | 'start with'
    | '≠'
    | '≤'
    | '≥'
  name: string
  value?: unknown
}

export type ConversationListQuery = {
  last_id?: string | null
  limit?: number
  sort_by?: '-created_at' | '-updated_at' | 'created_at' | 'updated_at'
}

export type ConversationRenamePayload = {
  auto_generate?: boolean
  name?: string | null
}

export type ConversationVariableInfiniteScrollPaginationResponse = {
  data: Array<ConversationVariableResponse>
  has_more: boolean
  limit: number
}

export type ConversationVariableResponse = {
  created_at?: number | null
  description?: string | null
  id: string
  name: string
  updated_at?: number | null
  value?: string | null
  value_type: string
}

export type ConversationVariableUpdatePayload = {
  value: unknown
}

export type ConversationVariablesQuery = {
  last_id?: string | null
  limit?: number
  variable_name?: string | null
}

export type DatasetBoundTagListResponse = {
  data: Array<DatasetBoundTagResponse>
  total: number
}

export type DatasetBoundTagResponse = {
  id: string
  name: string
}

export type DatasetCreatePayload = {
  description?: string
  embedding_model?: string | null
  embedding_model_provider?: string | null
  external_knowledge_api_id?: string | null
  external_knowledge_id?: string | null
  indexing_technique?: 'economy' | 'high_quality' | null
  name: string
  permission?: DatasetPermissionEnum
  provider?: string
  retrieval_model?: RetrievalModel
  summary_index_setting?: {
    [key: string]: unknown
  } | null
}

export type DatasetDetailResponse = {
  app_count: number
  author_name: string | null
  built_in_field_enabled: boolean
  chunk_structure: string | null
  created_at: number
  created_by: string
  data_source_type: string | null
  description: string | null
  doc_form: string | null
  doc_metadata: Array<DatasetDocMetadataResponse>
  document_count: number
  embedding_available?: boolean | null
  embedding_model: string | null
  embedding_model_provider: string | null
  enable_api: boolean
  external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
  external_retrieval_model: DatasetExternalRetrievalModelResponse
  icon_info?: DatasetIconInfoResponse
  id: string
  indexing_technique: string | null
  is_multimodal: boolean
  is_published: boolean
  name: string
  permission: string
  pipeline_id: string | null
  provider: string
  retrieval_model_dict: DatasetRetrievalModelResponse
  runtime_mode: string | null
  summary_index_setting?: DatasetSummaryIndexSettingResponse
  tags: Array<DatasetTagResponse>
  total_available_documents: number
  total_documents: number
  updated_at: number
  updated_by: string | null
  word_count: number
}

export type DatasetDetailWithPartialMembersResponse = {
  app_count: number
  author_name: string | null
  built_in_field_enabled: boolean
  chunk_structure: string | null
  created_at: number
  created_by: string
  data_source_type: string | null
  description: string | null
  doc_form: string | null
  doc_metadata: Array<DatasetDocMetadataResponse>
  document_count: number
  embedding_available?: boolean | null
  embedding_model: string | null
  embedding_model_provider: string | null
  enable_api: boolean
  external_knowledge_info?: DatasetExternalKnowledgeInfoResponse
  external_retrieval_model: DatasetExternalRetrievalModelResponse
  icon_info?: DatasetIconInfoResponse
  id: string
  indexing_technique: string | null
  is_multimodal: boolean
  is_published: boolean
  name: string
  partial_member_list?: Array<string> | null
  permission: string
  pipeline_id: string | null
  provider: string
  retrieval_model_dict: DatasetRetrievalModelResponse
  runtime_mode: string | null
  summary_index_setting?: DatasetSummaryIndexSettingResponse
  tags: Array<DatasetTagResponse>
  total_available_documents: number
  total_documents: number
  updated_at: number
  updated_by: string | null
  word_count: number
}

export type DatasetDocMetadataResponse = {
  id: string
  name: string
  type: string
}

export type DatasetExternalKnowledgeInfoResponse = {
  external_knowledge_api_endpoint?: string | null
  external_knowledge_api_id?: string | null
  external_knowledge_api_name?: string | null
  external_knowledge_id?: string | null
}

export type DatasetExternalRetrievalModelResponse = {
  score_threshold?: number | null
  score_threshold_enabled?: boolean | null
  top_k: number
}

export type DatasetIconInfoResponse = {
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  icon_url?: string | null
}

export type DatasetKeywordSettingResponse = {
  keyword_weight?: number | null
}

export type DatasetListQuery = {
  include_all?: boolean
  keyword?: string | null
  limit?: number
  page?: number
  tag_ids?: Array<string>
}

export type DatasetListResponse = {
  data: Array<DatasetDetailResponse>
  has_more: boolean
  limit: number
  page: number
  total: number
}

export type DatasetMetadataActionResponse = {
  result: string
}

export type DatasetMetadataBuiltInFieldResponse = {
  name: string
  type: string
}

export type DatasetMetadataBuiltInFieldsResponse = {
  fields: Array<DatasetMetadataBuiltInFieldResponse>
}

export type DatasetMetadataListItemResponse = {
  count?: number
  id: string
  name: string
  type: string
}

export type DatasetMetadataListResponse = {
  built_in_field_enabled: boolean
  doc_metadata: Array<DatasetMetadataListItemResponse>
}

export type DatasetMetadataResponse = {
  id: string
  name: string
  type: string
}

export type DatasetPermissionEnum = 'all_team_members' | 'only_me' | 'partial_members'

export type DatasetRerankingModelResponse = {
  reranking_model_name?: string | null
  reranking_provider_name?: string | null
}

export type DatasetRetrievalModelResponse = {
  reranking_enable: boolean
  reranking_mode?: string | null
  reranking_model?: DatasetRerankingModelResponse
  score_threshold?: number | null
  score_threshold_enabled: boolean
  search_method: string
  top_k: number
  weights?: DatasetWeightedScoreResponse
}

export type DatasetSummaryIndexSettingResponse = {
  enable?: boolean | null
  model_name?: string | null
  model_provider_name?: string | null
  summary_prompt?: string | null
}

export type DatasetTagResponse = {
  id: string
  name: string
  type: string
}

export type DatasetUpdatePayload = {
  description?: string | null
  embedding_model?: string | null
  embedding_model_provider?: string | null
  external_knowledge_api_id?: string | null
  external_knowledge_id?: string | null
  external_retrieval_model?: {
    [key: string]: unknown
  } | null
  indexing_technique?: 'economy' | 'high_quality' | null
  name?: string | null
  partial_member_list?: Array<{
    [key: string]: string
  }> | null
  permission?: DatasetPermissionEnum
  retrieval_model?: RetrievalModel
}

export type DatasetVectorSettingResponse = {
  embedding_model_name?: string | null
  embedding_provider_name?: string | null
  vector_weight?: number | null
}

export type DatasetWeightedScoreResponse = {
  keyword_setting?: DatasetKeywordSettingResponse
  vector_setting?: DatasetVectorSettingResponse
  weight_type?: string | null
}

export type DatasourceNodeRunPayload = {
  credential_id?: string | null
  datasource_type: string
  inputs: {
    [key: string]: unknown
  }
  is_published: boolean
}

export type DocumentBatchDownloadZipPayload = {
  document_ids: Array<string>
}

export type DocumentListQuery = {
  keyword?: string | null
  limit?: number
  page?: number
  status?: string | null
}

export type DocumentMetadataOperation = {
  document_id: string
  metadata_list: Array<MetadataDetail>
  partial_update?: boolean
}

export type DocumentTextCreatePayload = {
  doc_form?: string
  doc_language?: string
  embedding_model?: string | null
  embedding_model_provider?: string | null
  indexing_technique?: string | null
  name: string
  original_document_id?: string | null
  process_rule?: ProcessRule
  retrieval_model?: RetrievalModel
  text: string
}

export type DocumentTextUpdate = {
  doc_form?: string
  doc_language?: string
  name?: string | null
  process_rule?: ProcessRule
  retrieval_model?: RetrievalModel
  text?: string | null
}

export type EndUserDetail = {
  app_id?: string | null
  created_at: string
  external_user_id?: string | null
  id: string
  is_anonymous: boolean
  name?: string | null
  session_id: string
  tenant_id: string
  type: string
  updated_at: string
}

export type FeedbackListQuery = {
  limit?: number
  page?: number
}

export type FilePreviewQuery = {
  as_attachment?: boolean
}

export type FileResponse = {
  conversation_id?: string | null
  created_at?: number | null
  created_by?: string | null
  extension?: string | null
  file_key?: string | null
  id: string
  mime_type?: string | null
  name: string
  original_url?: string | null
  preview_url?: string | null
  size: number
  source_url?: string | null
  tenant_id?: string | null
  user_id?: string | null
}

export type HitTestingChildChunk = {
  content: string
  id: string
  position: number
  score: number
}

export type HitTestingDocument = {
  data_source_type: string
  doc_metadata: unknown
  doc_type: string | null
  id: string
  name: string
}

export type HitTestingFile = {
  extension: string
  id: string
  mime_type: string
  name: string
  size: number
  source_url: string
}

export type HitTestingPayload = {
  attachment_ids?: Array<string> | null
  external_retrieval_model?: {
    [key: string]: unknown
  } | null
  query: string
  retrieval_model?: RetrievalModel
}

export type HitTestingQuery = {
  content: string
}

export type HitTestingRecord = {
  child_chunks: Array<HitTestingChildChunk>
  files: Array<HitTestingFile>
  score: number | null
  segment: HitTestingSegment
  summary: string | null
  tsne_position: unknown
}

export type HitTestingResponse = {
  query: HitTestingQuery
  records: Array<HitTestingRecord>
}

export type HitTestingSegment = {
  answer: string | null
  completed_at: number | null
  content: string
  created_at: number
  created_by: string
  disabled_at: number | null
  disabled_by: string | null
  document: HitTestingDocument
  document_id: string
  enabled: boolean
  error: string | null
  hit_count: number
  id: string
  index_node_hash: string | null
  index_node_id: string | null
  indexing_at: number | null
  keywords: Array<string>
  position: number
  sign_content: string | null
  status: string
  stopped_at: number | null
  tokens: number
  word_count: number
}

export type HumanInputFormSubmitPayload = {
  action: string
  inputs: {
    [key: string]: JsonValue
  }
}

export type IndexInfoResponse = {
  api_version: string
  server_version: string
  welcome: string
}

export type JsonValue = unknown

export type KnowledgeTagListResponse = Array<KnowledgeTagResponse>

export type KnowledgeTagResponse = {
  binding_count?: string | null
  id: string
  name: string
  type: string
}

export type MessageFeedbackPayload = {
  content?: string | null
  rating?: 'dislike' | 'like' | null
}

export type MessageListQuery = {
  conversation_id: string
  first_id?: string | null
  limit?: number
}

export type MetadataArgs = {
  name: string
  type: 'number' | 'string' | 'time'
}

export type MetadataDetail = {
  id: string
  name: string
  value?: unknown
}

export type MetadataFilteringCondition = {
  conditions?: Array<Condition> | null
  logical_operator?: 'and' | 'or' | null
}

export type MetadataOperationData = {
  operation_data: Array<DocumentMetadataOperation>
}

export type MetadataUpdatePayload = {
  name: string
}

export type PipelineRunApiEntity = {
  datasource_info_list: Array<{
    [key: string]: unknown
  }>
  datasource_type: string
  inputs: {
    [key: string]: unknown
  }
  is_published: boolean
  response_mode: string
  start_node_id: string
}

export type PreProcessingRule = {
  enabled: boolean
  id: string
}

export type ProcessRule = {
  mode: 'automatic' | 'custom' | 'hierarchical'
  rules?: Rule
}

export type RerankingModel = {
  reranking_model_name?: string | null
  reranking_provider_name?: string | null
}

export type ResultResponse = {
  result: string
}

export type RetrievalMethod
  = | 'full_text_search'
    | 'hybrid_search'
    | 'keyword_search'
    | 'semantic_search'

export type RetrievalModel = {
  metadata_filtering_conditions?: MetadataFilteringCondition
  reranking_enable: boolean
  reranking_mode?: string | null
  reranking_model?: RerankingModel
  score_threshold?: number | null
  score_threshold_enabled: boolean
  search_method: RetrievalMethod
  top_k: number
  weights?: WeightModel
}

export type Rule = {
  parent_mode?: 'full-doc' | 'paragraph' | null
  pre_processing_rules?: Array<PreProcessingRule> | null
  segmentation?: Segmentation
  subchunk_segmentation?: Segmentation
}

export type SegmentCreatePayload = {
  segments?: Array<{
    [key: string]: unknown
  }> | null
}

export type SegmentListQuery = {
  keyword?: string | null
  status?: Array<string>
}

export type SegmentUpdateArgs = {
  answer?: string | null
  attachment_ids?: Array<string> | null
  content?: string | null
  enabled?: boolean | null
  keywords?: Array<string> | null
  regenerate_child_chunks?: boolean
  summary?: string | null
}

export type SegmentUpdatePayload = {
  segment: SegmentUpdateArgs
}

export type Segmentation = {
  chunk_overlap?: number
  max_tokens: number
  separator?: string
}

export type SimpleAccount = {
  email: string
  id: string
  name: string
}

export type SimpleEndUser = {
  id: string
  is_anonymous: boolean
  session_id?: string | null
  type: string
}

export type SimpleResultResponse = {
  result: string
}

export type SimpleResultStringListResponse = {
  data: Array<string>
  result: string
}

export type Site = {
  chat_color_theme?: string | null
  chat_color_theme_inverted: boolean
  copyright?: string | null
  custom_disclaimer?: string | null
  default_language: string
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  readonly icon_url: string | null
  privacy_policy?: string | null
  show_workflow_steps: boolean
  title: string
  use_icon_as_answer_icon: boolean
}

export type TagBindingPayload = {
  tag_ids: Array<string>
  target_id: string
}

export type TagCreatePayload = {
  name: string
}

export type TagDeletePayload = {
  tag_id: string
}

export type TagUnbindingPayload = {
  tag_id?: string | null
  tag_ids?: Array<string>
  target_id: string
}

export type TagUpdatePayload = {
  name: string
  tag_id: string
}

export type TextToAudioPayload = {
  message_id?: string | null
  streaming?: boolean | null
  text?: string | null
  voice?: string | null
}

export type UrlResponse = {
  url: string
}

export type WeightKeywordSetting = {
  keyword_weight: number
}

export type WeightModel = {
  keyword_setting?: WeightKeywordSetting
  vector_setting?: WeightVectorSetting
  weight_type?: 'customized' | 'keyword_first' | 'semantic_first' | null
}

export type WeightVectorSetting = {
  embedding_model_name: string
  embedding_provider_name: string
  vector_weight: number
}

export type WorkflowAppLogPaginationResponse = {
  data: Array<WorkflowAppLogPartialResponse>
  has_more: boolean
  limit: number
  page: number
  total: number
}

export type WorkflowAppLogPartialResponse = {
  created_at?: number | null
  created_by_account?: SimpleAccount
  created_by_end_user?: SimpleEndUser
  created_by_role?: string | null
  created_from?: string | null
  details?: unknown
  id: string
  workflow_run?: WorkflowRunForLogResponse
}

export type WorkflowLogQuery = {
  created_at__after?: string | null
  created_at__before?: string | null
  created_by_account?: string | null
  created_by_end_user_session_id?: string | null
  keyword?: string | null
  limit?: number
  page?: number
  status?: 'failed' | 'stopped' | 'succeeded' | null
}

export type WorkflowRunForLogResponse = {
  created_at?: number | null
  elapsed_time?: unknown
  error?: string | null
  exceptions_count?: number | null
  finished_at?: number | null
  id: string
  status?: string | null
  total_steps?: number | null
  total_tokens?: number | null
  triggered_from?: string | null
  version?: string | null
}

export type WorkflowRunPayload = {
  files?: Array<{
    [key: string]: unknown
  }> | null
  inputs: {
    [key: string]: unknown
  }
  response_mode?: 'blocking' | 'streaming' | null
}

export type WorkflowRunResponse = {
  created_at?: number | null
  elapsed_time?: unknown
  error?: string | null
  finished_at?: number | null
  id: string
  inputs?: unknown
  outputs?: {
    [key: string]: unknown
  }
  status: string
  total_steps?: number | null
  total_tokens?: number | null
  workflow_id: string
}

export type SiteWritable = {
  chat_color_theme?: string | null
  chat_color_theme_inverted: boolean
  copyright?: string | null
  custom_disclaimer?: string | null
  default_language: string
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  privacy_policy?: string | null
  show_workflow_steps: boolean
  title: string
  use_icon_as_answer_icon: boolean
}

export type GetRootData = {
  body?: never
  path?: never
  query?: never
  url: '/'
}

export type GetRootResponses = {
  200: IndexInfoResponse
}

export type GetRootResponse = GetRootResponses[keyof GetRootResponses]

export type GetAppFeedbacksData = {
  body?: never
  path?: never
  query?: {
    limit?: number
    page?: number
  }
  url: '/app/feedbacks'
}

export type GetAppFeedbacksErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetAppFeedbacksError = GetAppFeedbacksErrors[keyof GetAppFeedbacksErrors]

export type GetAppFeedbacksResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetAppFeedbacksResponse = GetAppFeedbacksResponses[keyof GetAppFeedbacksResponses]

export type PostAppsAnnotationReplyByActionData = {
  body: AnnotationReplyActionPayload
  path: {
    action: string
  }
  query?: never
  url: '/apps/annotation-reply/{action}'
}

export type PostAppsAnnotationReplyByActionErrors = {
  401: {
    [key: string]: unknown
  }
}

export type PostAppsAnnotationReplyByActionError
  = PostAppsAnnotationReplyByActionErrors[keyof PostAppsAnnotationReplyByActionErrors]

export type PostAppsAnnotationReplyByActionResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostAppsAnnotationReplyByActionResponse
  = PostAppsAnnotationReplyByActionResponses[keyof PostAppsAnnotationReplyByActionResponses]

export type GetAppsAnnotationReplyByActionStatusByJobIdData = {
  body?: never
  path: {
    action: string
    job_id: string
  }
  query?: never
  url: '/apps/annotation-reply/{action}/status/{job_id}'
}

export type GetAppsAnnotationReplyByActionStatusByJobIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetAppsAnnotationReplyByActionStatusByJobIdError
  = GetAppsAnnotationReplyByActionStatusByJobIdErrors[keyof GetAppsAnnotationReplyByActionStatusByJobIdErrors]

export type GetAppsAnnotationReplyByActionStatusByJobIdResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetAppsAnnotationReplyByActionStatusByJobIdResponse
  = GetAppsAnnotationReplyByActionStatusByJobIdResponses[keyof GetAppsAnnotationReplyByActionStatusByJobIdResponses]

export type GetAppsAnnotationsData = {
  body?: never
  path?: never
  query?: {
    keyword?: string
    limit?: number
    page?: number
  }
  url: '/apps/annotations'
}

export type GetAppsAnnotationsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetAppsAnnotationsError = GetAppsAnnotationsErrors[keyof GetAppsAnnotationsErrors]

export type GetAppsAnnotationsResponses = {
  200: AnnotationList
}

export type GetAppsAnnotationsResponse
  = GetAppsAnnotationsResponses[keyof GetAppsAnnotationsResponses]

export type PostAppsAnnotationsData = {
  body: AnnotationCreatePayload
  path?: never
  query?: never
  url: '/apps/annotations'
}

export type PostAppsAnnotationsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type PostAppsAnnotationsError = PostAppsAnnotationsErrors[keyof PostAppsAnnotationsErrors]

export type PostAppsAnnotationsResponses = {
  201: Annotation
}

export type PostAppsAnnotationsResponse
  = PostAppsAnnotationsResponses[keyof PostAppsAnnotationsResponses]

export type DeleteAppsAnnotationsByAnnotationIdData = {
  body?: never
  path: {
    annotation_id: string
  }
  query?: never
  url: '/apps/annotations/{annotation_id}'
}

export type DeleteAppsAnnotationsByAnnotationIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type DeleteAppsAnnotationsByAnnotationIdError
  = DeleteAppsAnnotationsByAnnotationIdErrors[keyof DeleteAppsAnnotationsByAnnotationIdErrors]

export type DeleteAppsAnnotationsByAnnotationIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteAppsAnnotationsByAnnotationIdResponse
  = DeleteAppsAnnotationsByAnnotationIdResponses[keyof DeleteAppsAnnotationsByAnnotationIdResponses]

export type PutAppsAnnotationsByAnnotationIdData = {
  body: AnnotationCreatePayload
  path: {
    annotation_id: string
  }
  query?: never
  url: '/apps/annotations/{annotation_id}'
}

export type PutAppsAnnotationsByAnnotationIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PutAppsAnnotationsByAnnotationIdError
  = PutAppsAnnotationsByAnnotationIdErrors[keyof PutAppsAnnotationsByAnnotationIdErrors]

export type PutAppsAnnotationsByAnnotationIdResponses = {
  200: Annotation
}

export type PutAppsAnnotationsByAnnotationIdResponse
  = PutAppsAnnotationsByAnnotationIdResponses[keyof PutAppsAnnotationsByAnnotationIdResponses]

export type PostAudioToTextData = {
  body?: never
  path?: never
  query?: never
  url: '/audio-to-text'
}

export type PostAudioToTextErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  413: {
    [key: string]: unknown
  }
  415: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostAudioToTextError = PostAudioToTextErrors[keyof PostAudioToTextErrors]

export type PostAudioToTextResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostAudioToTextResponse = PostAudioToTextResponses[keyof PostAudioToTextResponses]

export type PostChatMessagesData = {
  body: ChatRequestPayload
  path?: never
  query?: never
  url: '/chat-messages'
}

export type PostChatMessagesErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  429: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostChatMessagesError = PostChatMessagesErrors[keyof PostChatMessagesErrors]

export type PostChatMessagesResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostChatMessagesResponse = PostChatMessagesResponses[keyof PostChatMessagesResponses]

export type PostChatMessagesByTaskIdStopData = {
  body?: never
  path: {
    task_id: string
  }
  query?: never
  url: '/chat-messages/{task_id}/stop'
}

export type PostChatMessagesByTaskIdStopErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostChatMessagesByTaskIdStopError
  = PostChatMessagesByTaskIdStopErrors[keyof PostChatMessagesByTaskIdStopErrors]

export type PostChatMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostChatMessagesByTaskIdStopResponse
  = PostChatMessagesByTaskIdStopResponses[keyof PostChatMessagesByTaskIdStopResponses]

export type PostCompletionMessagesData = {
  body: CompletionRequestPayload
  path?: never
  query?: never
  url: '/completion-messages'
}

export type PostCompletionMessagesErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostCompletionMessagesError
  = PostCompletionMessagesErrors[keyof PostCompletionMessagesErrors]

export type PostCompletionMessagesResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostCompletionMessagesResponse
  = PostCompletionMessagesResponses[keyof PostCompletionMessagesResponses]

export type PostCompletionMessagesByTaskIdStopData = {
  body?: never
  path: {
    task_id: string
  }
  query?: never
  url: '/completion-messages/{task_id}/stop'
}

export type PostCompletionMessagesByTaskIdStopErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostCompletionMessagesByTaskIdStopError
  = PostCompletionMessagesByTaskIdStopErrors[keyof PostCompletionMessagesByTaskIdStopErrors]

export type PostCompletionMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostCompletionMessagesByTaskIdStopResponse
  = PostCompletionMessagesByTaskIdStopResponses[keyof PostCompletionMessagesByTaskIdStopResponses]

export type GetConversationsData = {
  body?: never
  path?: never
  query?: {
    last_id?: string | null
    limit?: number
    sort_by?: '-created_at' | '-updated_at' | 'created_at' | 'updated_at'
  }
  url: '/conversations'
}

export type GetConversationsErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetConversationsError = GetConversationsErrors[keyof GetConversationsErrors]

export type GetConversationsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetConversationsResponse = GetConversationsResponses[keyof GetConversationsResponses]

export type DeleteConversationsByCIdData = {
  body?: never
  path: {
    c_id: string
  }
  query?: never
  url: '/conversations/{c_id}'
}

export type DeleteConversationsByCIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type DeleteConversationsByCIdError
  = DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]

export type DeleteConversationsByCIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteConversationsByCIdResponse
  = DeleteConversationsByCIdResponses[keyof DeleteConversationsByCIdResponses]

export type PostConversationsByCIdNameData = {
  body: ConversationRenamePayload
  path: {
    c_id: string
  }
  query?: never
  url: '/conversations/{c_id}/name'
}

export type PostConversationsByCIdNameErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostConversationsByCIdNameError
  = PostConversationsByCIdNameErrors[keyof PostConversationsByCIdNameErrors]

export type PostConversationsByCIdNameResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostConversationsByCIdNameResponse
  = PostConversationsByCIdNameResponses[keyof PostConversationsByCIdNameResponses]

export type GetConversationsByCIdVariablesData = {
  body?: never
  path: {
    c_id: string
  }
  query?: {
    last_id?: string | null
    limit?: number
    variable_name?: string | null
  }
  url: '/conversations/{c_id}/variables'
}

export type GetConversationsByCIdVariablesErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetConversationsByCIdVariablesError
  = GetConversationsByCIdVariablesErrors[keyof GetConversationsByCIdVariablesErrors]

export type GetConversationsByCIdVariablesResponses = {
  200: ConversationVariableInfiniteScrollPaginationResponse
}

export type GetConversationsByCIdVariablesResponse
  = GetConversationsByCIdVariablesResponses[keyof GetConversationsByCIdVariablesResponses]

export type PutConversationsByCIdVariablesByVariableIdData = {
  body: ConversationVariableUpdatePayload
  path: {
    c_id: string
    variable_id: string
  }
  query?: never
  url: '/conversations/{c_id}/variables/{variable_id}'
}

export type PutConversationsByCIdVariablesByVariableIdErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PutConversationsByCIdVariablesByVariableIdError
  = PutConversationsByCIdVariablesByVariableIdErrors[keyof PutConversationsByCIdVariablesByVariableIdErrors]

export type PutConversationsByCIdVariablesByVariableIdResponses = {
  200: ConversationVariableResponse
}

export type PutConversationsByCIdVariablesByVariableIdResponse
  = PutConversationsByCIdVariablesByVariableIdResponses[keyof PutConversationsByCIdVariablesByVariableIdResponses]

export type GetDatasetsData = {
  body?: never
  path?: never
  query?: {
    include_all?: boolean
    keyword?: string
    limit?: number
    page?: number
    tag_ids?: Array<string>
  }
  url: '/datasets'
}

export type GetDatasetsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetDatasetsError = GetDatasetsErrors[keyof GetDatasetsErrors]

export type GetDatasetsResponses = {
  200: DatasetListResponse
}

export type GetDatasetsResponse = GetDatasetsResponses[keyof GetDatasetsResponses]

export type PostDatasetsData = {
  body: DatasetCreatePayload
  path?: never
  query?: never
  url: '/datasets'
}

export type PostDatasetsErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsError = PostDatasetsErrors[keyof PostDatasetsErrors]

export type PostDatasetsResponses = {
  200: DatasetDetailResponse
}

export type PostDatasetsResponse = PostDatasetsResponses[keyof PostDatasetsResponses]

export type PostDatasetsPipelineFileUploadData = {
  body?: never
  path?: never
  query?: never
  url: '/datasets/pipeline/file-upload'
}

export type PostDatasetsPipelineFileUploadErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  413: {
    [key: string]: unknown
  }
  415: {
    [key: string]: unknown
  }
}

export type PostDatasetsPipelineFileUploadError
  = PostDatasetsPipelineFileUploadErrors[keyof PostDatasetsPipelineFileUploadErrors]

export type PostDatasetsPipelineFileUploadResponses = {
  201: {
    [key: string]: unknown
  }
}

export type PostDatasetsPipelineFileUploadResponse
  = PostDatasetsPipelineFileUploadResponses[keyof PostDatasetsPipelineFileUploadResponses]

export type DeleteDatasetsTagsData = {
  body: TagDeletePayload
  path?: never
  query?: never
  url: '/datasets/tags'
}

export type DeleteDatasetsTagsErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type DeleteDatasetsTagsError = DeleteDatasetsTagsErrors[keyof DeleteDatasetsTagsErrors]

export type DeleteDatasetsTagsResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteDatasetsTagsResponse
  = DeleteDatasetsTagsResponses[keyof DeleteDatasetsTagsResponses]

export type GetDatasetsTagsData = {
  body?: never
  path?: never
  query?: never
  url: '/datasets/tags'
}

export type GetDatasetsTagsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetDatasetsTagsError = GetDatasetsTagsErrors[keyof GetDatasetsTagsErrors]

export type GetDatasetsTagsResponses = {
  200: KnowledgeTagListResponse
}

export type GetDatasetsTagsResponse = GetDatasetsTagsResponses[keyof GetDatasetsTagsResponses]

export type PatchDatasetsTagsData = {
  body: TagUpdatePayload
  path?: never
  query?: never
  url: '/datasets/tags'
}

export type PatchDatasetsTagsErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PatchDatasetsTagsError = PatchDatasetsTagsErrors[keyof PatchDatasetsTagsErrors]

export type PatchDatasetsTagsResponses = {
  200: KnowledgeTagResponse
}

export type PatchDatasetsTagsResponse = PatchDatasetsTagsResponses[keyof PatchDatasetsTagsResponses]

export type PostDatasetsTagsData = {
  body: TagCreatePayload
  path?: never
  query?: never
  url: '/datasets/tags'
}

export type PostDatasetsTagsErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostDatasetsTagsError = PostDatasetsTagsErrors[keyof PostDatasetsTagsErrors]

export type PostDatasetsTagsResponses = {
  200: KnowledgeTagResponse
}

export type PostDatasetsTagsResponse = PostDatasetsTagsResponses[keyof PostDatasetsTagsResponses]

export type PostDatasetsTagsBindingData = {
  body: TagBindingPayload
  path?: never
  query?: never
  url: '/datasets/tags/binding'
}

export type PostDatasetsTagsBindingErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostDatasetsTagsBindingError
  = PostDatasetsTagsBindingErrors[keyof PostDatasetsTagsBindingErrors]

export type PostDatasetsTagsBindingResponses = {
  204: {
    [key: string]: never
  }
}

export type PostDatasetsTagsBindingResponse
  = PostDatasetsTagsBindingResponses[keyof PostDatasetsTagsBindingResponses]

export type PostDatasetsTagsUnbindingData = {
  body: TagUnbindingPayload
  path?: never
  query?: never
  url: '/datasets/tags/unbinding'
}

export type PostDatasetsTagsUnbindingErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostDatasetsTagsUnbindingError
  = PostDatasetsTagsUnbindingErrors[keyof PostDatasetsTagsUnbindingErrors]

export type PostDatasetsTagsUnbindingResponses = {
  204: {
    [key: string]: never
  }
}

export type PostDatasetsTagsUnbindingResponse
  = PostDatasetsTagsUnbindingResponses[keyof PostDatasetsTagsUnbindingResponses]

export type DeleteDatasetsByDatasetIdData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}'
}

export type DeleteDatasetsByDatasetIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  409: {
    [key: string]: unknown
  }
}

export type DeleteDatasetsByDatasetIdError
  = DeleteDatasetsByDatasetIdErrors[keyof DeleteDatasetsByDatasetIdErrors]

export type DeleteDatasetsByDatasetIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteDatasetsByDatasetIdResponse
  = DeleteDatasetsByDatasetIdResponses[keyof DeleteDatasetsByDatasetIdResponses]

export type GetDatasetsByDatasetIdData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}'
}

export type GetDatasetsByDatasetIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdError
  = GetDatasetsByDatasetIdErrors[keyof GetDatasetsByDatasetIdErrors]

export type GetDatasetsByDatasetIdResponses = {
  200: DatasetDetailWithPartialMembersResponse
}

export type GetDatasetsByDatasetIdResponse
  = GetDatasetsByDatasetIdResponses[keyof GetDatasetsByDatasetIdResponses]

export type PatchDatasetsByDatasetIdData = {
  body: DatasetUpdatePayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}'
}

export type PatchDatasetsByDatasetIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PatchDatasetsByDatasetIdError
  = PatchDatasetsByDatasetIdErrors[keyof PatchDatasetsByDatasetIdErrors]

export type PatchDatasetsByDatasetIdResponses = {
  200: DatasetDetailWithPartialMembersResponse
}

export type PatchDatasetsByDatasetIdResponse
  = PatchDatasetsByDatasetIdResponses[keyof PatchDatasetsByDatasetIdResponses]

export type PostDatasetsByDatasetIdDocumentCreateByFileData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/document/create-by-file'
}

export type PostDatasetsByDatasetIdDocumentCreateByFileErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByFileError
  = PostDatasetsByDatasetIdDocumentCreateByFileErrors[keyof PostDatasetsByDatasetIdDocumentCreateByFileErrors]

export type PostDatasetsByDatasetIdDocumentCreateByFileResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByFileResponse
  = PostDatasetsByDatasetIdDocumentCreateByFileResponses[keyof PostDatasetsByDatasetIdDocumentCreateByFileResponses]

export type PostDatasetsByDatasetIdDocumentCreateByTextData = {
  body: DocumentTextCreatePayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/document/create-by-text'
}

export type PostDatasetsByDatasetIdDocumentCreateByTextErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByTextError
  = PostDatasetsByDatasetIdDocumentCreateByTextErrors[keyof PostDatasetsByDatasetIdDocumentCreateByTextErrors]

export type PostDatasetsByDatasetIdDocumentCreateByTextResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByTextResponse
  = PostDatasetsByDatasetIdDocumentCreateByTextResponses[keyof PostDatasetsByDatasetIdDocumentCreateByTextResponses]

export type PostDatasetsByDatasetIdDocumentCreateByFile2Data = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/document/create_by_file'
}

export type PostDatasetsByDatasetIdDocumentCreateByFile2Errors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByFile2Error
  = PostDatasetsByDatasetIdDocumentCreateByFile2Errors[keyof PostDatasetsByDatasetIdDocumentCreateByFile2Errors]

export type PostDatasetsByDatasetIdDocumentCreateByFile2Responses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByFile2Response
  = PostDatasetsByDatasetIdDocumentCreateByFile2Responses[keyof PostDatasetsByDatasetIdDocumentCreateByFile2Responses]

export type PostDatasetsByDatasetIdDocumentCreateByText2Data = {
  body: DocumentTextCreatePayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/document/create_by_text'
}

export type PostDatasetsByDatasetIdDocumentCreateByText2Errors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByText2Error
  = PostDatasetsByDatasetIdDocumentCreateByText2Errors[keyof PostDatasetsByDatasetIdDocumentCreateByText2Errors]

export type PostDatasetsByDatasetIdDocumentCreateByText2Responses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentCreateByText2Response
  = PostDatasetsByDatasetIdDocumentCreateByText2Responses[keyof PostDatasetsByDatasetIdDocumentCreateByText2Responses]

export type GetDatasetsByDatasetIdDocumentsData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents'
}

export type GetDatasetsByDatasetIdDocumentsErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsError
  = GetDatasetsByDatasetIdDocumentsErrors[keyof GetDatasetsByDatasetIdDocumentsErrors]

export type GetDatasetsByDatasetIdDocumentsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsResponse
  = GetDatasetsByDatasetIdDocumentsResponses[keyof GetDatasetsByDatasetIdDocumentsResponses]

export type PostDatasetsByDatasetIdDocumentsDownloadZipData = {
  body: DocumentBatchDownloadZipPayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/download-zip'
}

export type PostDatasetsByDatasetIdDocumentsDownloadZipErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsDownloadZipError
  = PostDatasetsByDatasetIdDocumentsDownloadZipErrors[keyof PostDatasetsByDatasetIdDocumentsDownloadZipErrors]

export type PostDatasetsByDatasetIdDocumentsDownloadZipResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsDownloadZipResponse
  = PostDatasetsByDatasetIdDocumentsDownloadZipResponses[keyof PostDatasetsByDatasetIdDocumentsDownloadZipResponses]

export type PostDatasetsByDatasetIdDocumentsMetadataData = {
  body: MetadataOperationData
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/metadata'
}

export type PostDatasetsByDatasetIdDocumentsMetadataErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsMetadataError
  = PostDatasetsByDatasetIdDocumentsMetadataErrors[keyof PostDatasetsByDatasetIdDocumentsMetadataErrors]

export type PostDatasetsByDatasetIdDocumentsMetadataResponses = {
  200: DatasetMetadataActionResponse
}

export type PostDatasetsByDatasetIdDocumentsMetadataResponse
  = PostDatasetsByDatasetIdDocumentsMetadataResponses[keyof PostDatasetsByDatasetIdDocumentsMetadataResponses]

export type PatchDatasetsByDatasetIdDocumentsStatusByActionData = {
  body?: never
  path: {
    action: string
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/status/{action}'
}

export type PatchDatasetsByDatasetIdDocumentsStatusByActionErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PatchDatasetsByDatasetIdDocumentsStatusByActionError
  = PatchDatasetsByDatasetIdDocumentsStatusByActionErrors[keyof PatchDatasetsByDatasetIdDocumentsStatusByActionErrors]

export type PatchDatasetsByDatasetIdDocumentsStatusByActionResponses = {
  200: SimpleResultResponse
}

export type PatchDatasetsByDatasetIdDocumentsStatusByActionResponse
  = PatchDatasetsByDatasetIdDocumentsStatusByActionResponses[keyof PatchDatasetsByDatasetIdDocumentsStatusByActionResponses]

export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusData = {
  body?: never
  path: {
    batch: string
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{batch}/indexing-status'
}

export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusError
  = GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors[keyof GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors]

export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponse
  = GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses[keyof GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}'
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdError
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}'
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdError
  = GetDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdErrors]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponse
  = GetDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdResponses]

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}'
}

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdError
  = PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors]

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdResponse
  = PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/download'
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadError
  = GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses = {
  200: UrlResponse
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse
  = GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: {
    keyword?: string | null
    status?: Array<string>
  }
  url: '/datasets/{dataset_id}/documents/{document_id}/segments'
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsError
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
  body: SegmentCreatePayload
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/segments'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsError
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
    segment_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
    segment_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
  body: SegmentUpdatePayload
  path: {
    dataset_id: string
    document_id: string
    segment_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
    segment_id: string
  }
  query?: {
    keyword?: string | null
    limit?: number
    page?: number
  }
  url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksError
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors]

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
  = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
  body: ChildChunkCreatePayload
  path: {
    dataset_id: string
    document_id: string
    segment_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksError
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
  = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
  = {
    body?: never
    path: {
      child_chunk_id: string
      dataset_id: string
      document_id: string
      segment_id: string
    }
    query?: never
    url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
  }

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors
  = {
    401: {
      [key: string]: unknown
    }
    404: {
      [key: string]: unknown
    }
  }

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdError
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors]

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
  = {
    204: {
      [key: string]: never
    }
  }

export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
  = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
  = {
    body: ChildChunkUpdatePayload
    path: {
      child_chunk_id: string
      dataset_id: string
      document_id: string
      segment_id: string
    }
    query?: never
    url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
  }

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors
  = {
    401: {
      [key: string]: unknown
    }
    404: {
      [key: string]: unknown
    }
  }

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdError
  = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors]

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
  = {
    200: {
      [key: string]: unknown
    }
  }

export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
  = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileData = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/update-by-file'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileError
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponse
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextData = {
  body: DocumentTextUpdate
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/update-by-text'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextError
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponse
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Data = {
  body?: never
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/update_by_file'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Error
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Response
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Data = {
  body: DocumentTextUpdate
  path: {
    dataset_id: string
    document_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/documents/{document_id}/update_by_text'
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Error
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors]

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Response
  = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses]

export type PostDatasetsByDatasetIdHitTestingData = {
  body: HitTestingPayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/hit-testing'
}

export type PostDatasetsByDatasetIdHitTestingErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdHitTestingError
  = PostDatasetsByDatasetIdHitTestingErrors[keyof PostDatasetsByDatasetIdHitTestingErrors]

export type PostDatasetsByDatasetIdHitTestingResponses = {
  200: HitTestingResponse
}

export type PostDatasetsByDatasetIdHitTestingResponse
  = PostDatasetsByDatasetIdHitTestingResponses[keyof PostDatasetsByDatasetIdHitTestingResponses]

export type GetDatasetsByDatasetIdMetadataData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata'
}

export type GetDatasetsByDatasetIdMetadataErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdMetadataError
  = GetDatasetsByDatasetIdMetadataErrors[keyof GetDatasetsByDatasetIdMetadataErrors]

export type GetDatasetsByDatasetIdMetadataResponses = {
  200: DatasetMetadataListResponse
}

export type GetDatasetsByDatasetIdMetadataResponse
  = GetDatasetsByDatasetIdMetadataResponses[keyof GetDatasetsByDatasetIdMetadataResponses]

export type PostDatasetsByDatasetIdMetadataData = {
  body: MetadataArgs
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata'
}

export type PostDatasetsByDatasetIdMetadataErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdMetadataError
  = PostDatasetsByDatasetIdMetadataErrors[keyof PostDatasetsByDatasetIdMetadataErrors]

export type PostDatasetsByDatasetIdMetadataResponses = {
  201: DatasetMetadataResponse
}

export type PostDatasetsByDatasetIdMetadataResponse
  = PostDatasetsByDatasetIdMetadataResponses[keyof PostDatasetsByDatasetIdMetadataResponses]

export type GetDatasetsByDatasetIdMetadataBuiltInData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata/built-in'
}

export type GetDatasetsByDatasetIdMetadataBuiltInErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdMetadataBuiltInError
  = GetDatasetsByDatasetIdMetadataBuiltInErrors[keyof GetDatasetsByDatasetIdMetadataBuiltInErrors]

export type GetDatasetsByDatasetIdMetadataBuiltInResponses = {
  200: DatasetMetadataBuiltInFieldsResponse
}

export type GetDatasetsByDatasetIdMetadataBuiltInResponse
  = GetDatasetsByDatasetIdMetadataBuiltInResponses[keyof GetDatasetsByDatasetIdMetadataBuiltInResponses]

export type PostDatasetsByDatasetIdMetadataBuiltInByActionData = {
  body?: never
  path: {
    action: string
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata/built-in/{action}'
}

export type PostDatasetsByDatasetIdMetadataBuiltInByActionErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdMetadataBuiltInByActionError
  = PostDatasetsByDatasetIdMetadataBuiltInByActionErrors[keyof PostDatasetsByDatasetIdMetadataBuiltInByActionErrors]

export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponses = {
  200: DatasetMetadataActionResponse
}

export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponse
  = PostDatasetsByDatasetIdMetadataBuiltInByActionResponses[keyof PostDatasetsByDatasetIdMetadataBuiltInByActionResponses]

export type DeleteDatasetsByDatasetIdMetadataByMetadataIdData = {
  body?: never
  path: {
    dataset_id: string
    metadata_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata/{metadata_id}'
}

export type DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type DeleteDatasetsByDatasetIdMetadataByMetadataIdError
  = DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors]

export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses = {
  204: {
    [key: string]: never
  }
}

export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponse
  = DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses]

export type PatchDatasetsByDatasetIdMetadataByMetadataIdData = {
  body: MetadataUpdatePayload
  path: {
    dataset_id: string
    metadata_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/metadata/{metadata_id}'
}

export type PatchDatasetsByDatasetIdMetadataByMetadataIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PatchDatasetsByDatasetIdMetadataByMetadataIdError
  = PatchDatasetsByDatasetIdMetadataByMetadataIdErrors[keyof PatchDatasetsByDatasetIdMetadataByMetadataIdErrors]

export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponses = {
  200: DatasetMetadataResponse
}

export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponse
  = PatchDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof PatchDatasetsByDatasetIdMetadataByMetadataIdResponses]

export type GetDatasetsByDatasetIdPipelineDatasourcePluginsData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: {
    is_published?: string
  }
  url: '/datasets/{dataset_id}/pipeline/datasource-plugins'
}

export type GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdPipelineDatasourcePluginsError
  = GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors[keyof GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors]

export type GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdPipelineDatasourcePluginsResponse
  = GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses[keyof GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses]

export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunData = {
  body?: never
  path: {
    dataset_id: string
    node_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run'
}

export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors = {
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunError
  = PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors[keyof PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors]

export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponse
  = PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses[keyof PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses]

export type PostDatasetsByDatasetIdPipelineRunData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/pipeline/run'
}

export type PostDatasetsByDatasetIdPipelineRunErrors = {
  401: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdPipelineRunError
  = PostDatasetsByDatasetIdPipelineRunErrors[keyof PostDatasetsByDatasetIdPipelineRunErrors]

export type PostDatasetsByDatasetIdPipelineRunResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdPipelineRunResponse
  = PostDatasetsByDatasetIdPipelineRunResponses[keyof PostDatasetsByDatasetIdPipelineRunResponses]

export type PostDatasetsByDatasetIdRetrieveData = {
  body: HitTestingPayload
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/retrieve'
}

export type PostDatasetsByDatasetIdRetrieveErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostDatasetsByDatasetIdRetrieveError
  = PostDatasetsByDatasetIdRetrieveErrors[keyof PostDatasetsByDatasetIdRetrieveErrors]

export type PostDatasetsByDatasetIdRetrieveResponses = {
  200: HitTestingResponse
}

export type PostDatasetsByDatasetIdRetrieveResponse
  = PostDatasetsByDatasetIdRetrieveResponses[keyof PostDatasetsByDatasetIdRetrieveResponses]

export type GetDatasetsByDatasetIdTagsData = {
  body?: never
  path: {
    dataset_id: string
  }
  query?: never
  url: '/datasets/{dataset_id}/tags'
}

export type GetDatasetsByDatasetIdTagsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetDatasetsByDatasetIdTagsError
  = GetDatasetsByDatasetIdTagsErrors[keyof GetDatasetsByDatasetIdTagsErrors]

export type GetDatasetsByDatasetIdTagsResponses = {
  200: DatasetBoundTagListResponse
}

export type GetDatasetsByDatasetIdTagsResponse
  = GetDatasetsByDatasetIdTagsResponses[keyof GetDatasetsByDatasetIdTagsResponses]

export type GetEndUsersByEndUserIdData = {
  body?: never
  path: {
    end_user_id: string
  }
  query?: never
  url: '/end-users/{end_user_id}'
}

export type GetEndUsersByEndUserIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetEndUsersByEndUserIdError
  = GetEndUsersByEndUserIdErrors[keyof GetEndUsersByEndUserIdErrors]

export type GetEndUsersByEndUserIdResponses = {
  200: EndUserDetail
}

export type GetEndUsersByEndUserIdResponse
  = GetEndUsersByEndUserIdResponses[keyof GetEndUsersByEndUserIdResponses]

export type PostFilesUploadData = {
  body?: never
  path?: never
  query?: never
  url: '/files/upload'
}

export type PostFilesUploadErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  413: {
    [key: string]: unknown
  }
  415: {
    [key: string]: unknown
  }
}

export type PostFilesUploadError = PostFilesUploadErrors[keyof PostFilesUploadErrors]

export type PostFilesUploadResponses = {
  201: FileResponse
}

export type PostFilesUploadResponse = PostFilesUploadResponses[keyof PostFilesUploadResponses]

export type GetFilesByFileIdPreviewData = {
  body?: never
  path: {
    file_id: string
  }
  query?: {
    as_attachment?: boolean
  }
  url: '/files/{file_id}/preview'
}

export type GetFilesByFileIdPreviewErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetFilesByFileIdPreviewError
  = GetFilesByFileIdPreviewErrors[keyof GetFilesByFileIdPreviewErrors]

export type GetFilesByFileIdPreviewResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetFilesByFileIdPreviewResponse
  = GetFilesByFileIdPreviewResponses[keyof GetFilesByFileIdPreviewResponses]

export type GetFormHumanInputByFormTokenData = {
  body?: never
  path: {
    form_token: string
  }
  query?: never
  url: '/form/human_input/{form_token}'
}

export type GetFormHumanInputByFormTokenErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  412: {
    [key: string]: unknown
  }
}

export type GetFormHumanInputByFormTokenError
  = GetFormHumanInputByFormTokenErrors[keyof GetFormHumanInputByFormTokenErrors]

export type GetFormHumanInputByFormTokenResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetFormHumanInputByFormTokenResponse
  = GetFormHumanInputByFormTokenResponses[keyof GetFormHumanInputByFormTokenResponses]

export type PostFormHumanInputByFormTokenData = {
  body: HumanInputFormSubmitPayload
  path: {
    form_token: string
  }
  query?: never
  url: '/form/human_input/{form_token}'
}

export type PostFormHumanInputByFormTokenErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  412: {
    [key: string]: unknown
  }
}

export type PostFormHumanInputByFormTokenError
  = PostFormHumanInputByFormTokenErrors[keyof PostFormHumanInputByFormTokenErrors]

export type PostFormHumanInputByFormTokenResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostFormHumanInputByFormTokenResponse
  = PostFormHumanInputByFormTokenResponses[keyof PostFormHumanInputByFormTokenResponses]

export type GetInfoData = {
  body?: never
  path?: never
  query?: never
  url: '/info'
}

export type GetInfoErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetInfoError = GetInfoErrors[keyof GetInfoErrors]

export type GetInfoResponses = {
  200: AppInfoResponse
}

export type GetInfoResponse = GetInfoResponses[keyof GetInfoResponses]

export type GetMessagesData = {
  body?: never
  path?: never
  query: {
    conversation_id: string
    first_id?: string | null
    limit?: number
  }
  url: '/messages'
}

export type GetMessagesErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetMessagesError = GetMessagesErrors[keyof GetMessagesErrors]

export type GetMessagesResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetMessagesResponse = GetMessagesResponses[keyof GetMessagesResponses]

export type PostMessagesByMessageIdFeedbacksData = {
  body: MessageFeedbackPayload
  path: {
    message_id: string
  }
  query?: never
  url: '/messages/{message_id}/feedbacks'
}

export type PostMessagesByMessageIdFeedbacksErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostMessagesByMessageIdFeedbacksError
  = PostMessagesByMessageIdFeedbacksErrors[keyof PostMessagesByMessageIdFeedbacksErrors]

export type PostMessagesByMessageIdFeedbacksResponses = {
  200: ResultResponse
}

export type PostMessagesByMessageIdFeedbacksResponse
  = PostMessagesByMessageIdFeedbacksResponses[keyof PostMessagesByMessageIdFeedbacksResponses]

export type GetMessagesByMessageIdSuggestedData = {
  body?: never
  path: {
    message_id: string
  }
  query?: never
  url: '/messages/{message_id}/suggested'
}

export type GetMessagesByMessageIdSuggestedErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type GetMessagesByMessageIdSuggestedError
  = GetMessagesByMessageIdSuggestedErrors[keyof GetMessagesByMessageIdSuggestedErrors]

export type GetMessagesByMessageIdSuggestedResponses = {
  200: SimpleResultStringListResponse
}

export type GetMessagesByMessageIdSuggestedResponse
  = GetMessagesByMessageIdSuggestedResponses[keyof GetMessagesByMessageIdSuggestedResponses]

export type GetMetaData = {
  body?: never
  path?: never
  query?: never
  url: '/meta'
}

export type GetMetaErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetMetaError = GetMetaErrors[keyof GetMetaErrors]

export type GetMetaResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetMetaResponse = GetMetaResponses[keyof GetMetaResponses]

export type GetParametersData = {
  body?: never
  path?: never
  query?: never
  url: '/parameters'
}

export type GetParametersErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetParametersError = GetParametersErrors[keyof GetParametersErrors]

export type GetParametersResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetParametersResponse = GetParametersResponses[keyof GetParametersResponses]

export type GetSiteData = {
  body?: never
  path?: never
  query?: never
  url: '/site'
}

export type GetSiteErrors = {
  401: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type GetSiteError = GetSiteErrors[keyof GetSiteErrors]

export type GetSiteResponses = {
  200: Site
}

export type GetSiteResponse = GetSiteResponses[keyof GetSiteResponses]

export type PostTextToAudioData = {
  body: TextToAudioPayload
  path?: never
  query?: never
  url: '/text-to-audio'
}

export type PostTextToAudioErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostTextToAudioError = PostTextToAudioErrors[keyof PostTextToAudioErrors]

export type PostTextToAudioResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostTextToAudioResponse = PostTextToAudioResponses[keyof PostTextToAudioResponses]

export type GetWorkflowByTaskIdEventsData = {
  body?: never
  path: {
    task_id: string
  }
  query?: {
    continue_on_pause?: string
    include_state_snapshot?: string
    user?: string
  }
  url: '/workflow/{task_id}/events'
}

export type GetWorkflowByTaskIdEventsErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetWorkflowByTaskIdEventsError
  = GetWorkflowByTaskIdEventsErrors[keyof GetWorkflowByTaskIdEventsErrors]

export type GetWorkflowByTaskIdEventsResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetWorkflowByTaskIdEventsResponse
  = GetWorkflowByTaskIdEventsResponses[keyof GetWorkflowByTaskIdEventsResponses]

export type GetWorkflowsLogsData = {
  body?: never
  path?: never
  query?: {
    created_at__after?: string | null
    created_at__before?: string | null
    created_by_account?: string | null
    created_by_end_user_session_id?: string | null
    keyword?: string | null
    limit?: number
    page?: number
    status?: 'failed' | 'stopped' | 'succeeded' | null
  }
  url: '/workflows/logs'
}

export type GetWorkflowsLogsErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetWorkflowsLogsError = GetWorkflowsLogsErrors[keyof GetWorkflowsLogsErrors]

export type GetWorkflowsLogsResponses = {
  200: WorkflowAppLogPaginationResponse
}

export type GetWorkflowsLogsResponse = GetWorkflowsLogsResponses[keyof GetWorkflowsLogsResponses]

export type PostWorkflowsRunData = {
  body: WorkflowRunPayload
  path?: never
  query?: never
  url: '/workflows/run'
}

export type PostWorkflowsRunErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  429: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostWorkflowsRunError = PostWorkflowsRunErrors[keyof PostWorkflowsRunErrors]

export type PostWorkflowsRunResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostWorkflowsRunResponse = PostWorkflowsRunResponses[keyof PostWorkflowsRunResponses]

export type GetWorkflowsRunByWorkflowRunIdData = {
  body?: never
  path: {
    workflow_run_id: string
  }
  query?: never
  url: '/workflows/run/{workflow_run_id}'
}

export type GetWorkflowsRunByWorkflowRunIdErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type GetWorkflowsRunByWorkflowRunIdError
  = GetWorkflowsRunByWorkflowRunIdErrors[keyof GetWorkflowsRunByWorkflowRunIdErrors]

export type GetWorkflowsRunByWorkflowRunIdResponses = {
  200: WorkflowRunResponse
}

export type GetWorkflowsRunByWorkflowRunIdResponse
  = GetWorkflowsRunByWorkflowRunIdResponses[keyof GetWorkflowsRunByWorkflowRunIdResponses]

export type PostWorkflowsTasksByTaskIdStopData = {
  body?: never
  path: {
    task_id: string
  }
  query?: never
  url: '/workflows/tasks/{task_id}/stop'
}

export type PostWorkflowsTasksByTaskIdStopErrors = {
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
}

export type PostWorkflowsTasksByTaskIdStopError
  = PostWorkflowsTasksByTaskIdStopErrors[keyof PostWorkflowsTasksByTaskIdStopErrors]

export type PostWorkflowsTasksByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostWorkflowsTasksByTaskIdStopResponse
  = PostWorkflowsTasksByTaskIdStopResponses[keyof PostWorkflowsTasksByTaskIdStopResponses]

export type PostWorkflowsByWorkflowIdRunData = {
  body: WorkflowRunPayload
  path: {
    workflow_id: string
  }
  query?: never
  url: '/workflows/{workflow_id}/run'
}

export type PostWorkflowsByWorkflowIdRunErrors = {
  400: {
    [key: string]: unknown
  }
  401: {
    [key: string]: unknown
  }
  404: {
    [key: string]: unknown
  }
  429: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostWorkflowsByWorkflowIdRunError
  = PostWorkflowsByWorkflowIdRunErrors[keyof PostWorkflowsByWorkflowIdRunErrors]

export type PostWorkflowsByWorkflowIdRunResponses = {
  200: {
    [key: string]: unknown
  }
}

export type PostWorkflowsByWorkflowIdRunResponse
  = PostWorkflowsByWorkflowIdRunResponses[keyof PostWorkflowsByWorkflowIdRunResponses]

export type GetWorkspacesCurrentModelsModelTypesByModelTypeData = {
  body?: never
  path: {
    model_type: string
  }
  query?: never
  url: '/workspaces/current/models/model-types/{model_type}'
}

export type GetWorkspacesCurrentModelsModelTypesByModelTypeErrors = {
  401: {
    [key: string]: unknown
  }
}

export type GetWorkspacesCurrentModelsModelTypesByModelTypeError
  = GetWorkspacesCurrentModelsModelTypesByModelTypeErrors[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeErrors]

export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponses = {
  200: {
    [key: string]: unknown
  }
}

export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponse
  = GetWorkspacesCurrentModelsModelTypesByModelTypeResponses[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeResponses]
