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

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

export type AppPagination = {
  has_next: boolean
  items: Array<AppPartial>
  page: number
  per_page: number
  total: number
}

export type CreateAppPayload = {
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: IconType
  mode: 'advanced-chat' | 'agent-chat' | 'chat' | 'completion' | 'workflow'
  name: string
}

export type AppDetail = {
  access_mode?: string | null
  app_model_config?: ModelConfig
  created_at?: number | null
  created_by?: string | null
  description?: string | null
  enable_api: boolean
  enable_site: boolean
  icon?: string | null
  icon_background?: string | null
  id: string
  mode_compatible_with_agent: string
  name: string
  tags?: Array<Tag>
  tracing?: JsonValue
  updated_at?: number | null
  updated_by?: string | null
  use_icon_as_answer_icon?: boolean | null
  workflow?: WorkflowPartial
}

export type AppImportPayload = {
  app_id?: string | null
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  mode: string
  name?: string | null
  yaml_content?: string | null
  yaml_url?: string | null
}

export type Import = {
  app_id?: string | null
  app_mode?: string | null
  current_dsl_version?: string
  error?: string
  id: string
  imported_dsl_version?: string
  status: ImportStatus
}

export type CheckDependenciesResult = {
  leaked_dependencies?: Array<PluginDependency>
}

export type WorkflowOnlineUsersPayload = {
  app_ids?: Array<string>
}

export type WorkflowOnlineUsersResponse = {
  data: Array<WorkflowOnlineUsersByApp>
}

export type AppDetailWithSite = {
  access_mode?: string | null
  api_base_url?: string | null
  app_model_config?: ModelConfig
  created_at?: number | null
  created_by?: string | null
  deleted_tools?: Array<DeletedTool>
  description?: string | null
  enable_api: boolean
  enable_site: boolean
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  id: string
  max_active_requests?: number | null
  mode_compatible_with_agent: string
  name: string
  site?: Site
  tags?: Array<Tag>
  tracing?: JsonValue
  updated_at?: number | null
  updated_by?: string | null
  use_icon_as_answer_icon?: boolean | null
  workflow?: WorkflowPartial
}

export type UpdateAppPayload = {
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: IconType
  max_active_requests?: number | null
  name: string
  use_icon_as_answer_icon?: boolean | null
}

export type AdvancedChatWorkflowRunPaginationResponse = {
  data: Array<AdvancedChatWorkflowRunForListResponse>
  has_more: boolean
  limit: number
}

export type WorkflowRunCountResponse = {
  failed: number
  partial_succeeded: number
  running: number
  stopped: number
  succeeded: number
  total: number
}

export type HumanInputFormPreviewPayload = {
  inputs?: {
    [key: string]: unknown
  }
}

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

export type IterationNodeRunPayload = {
  inputs?: {
    [key: string]: unknown
  } | null
}

export type LoopNodeRunPayload = {
  inputs?: {
    [key: string]: unknown
  } | null
}

export type AdvancedChatWorkflowRunPayload = {
  conversation_id?: string | null
  files?: Array<{
    [key: string]: unknown
  }> | null
  inputs?: {
    [key: string]: unknown
  } | null
  parent_message_id?: string | null
  query?: string
}

export type AgentAppComposerResponse = {
  active_config_snapshot: AgentConfigSnapshotSummaryResponse
  agent: AgentComposerAgentResponse
  agent_soul: AgentSoulConfig
  save_options: Array<ComposerSaveStrategy>
  variant: string
}

export type ComposerSavePayload = {
  agent_soul?: AgentSoulConfig
  binding?: ComposerBindingPayload
  client_revision_id?: string | null
  idempotency_key?: string | null
  new_agent_name?: string | null
  node_job?: WorkflowNodeJobConfig
  save_strategy: ComposerSaveStrategy
  soul_lock?: ComposerSoulLockPayload
  variant: ComposerVariant
  version_note?: string | null
}

export type AgentComposerCandidatesResponse = {
  allowed_node_job_candidates?: AgentComposerNodeJobCandidatesResponse
  allowed_soul_candidates?: AgentComposerSoulCandidatesResponse
  capabilities?: ComposerCandidateCapabilities
  variant: ComposerVariant
}

export type AgentComposerValidateResponse = {
  errors?: Array<string>
  result: string
}

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

export type AnnotationSettingUpdatePayload = {
  score_threshold: number
}

export type CreateAnnotationPayload = {
  annotation_reply?: {
    [key: string]: unknown
  } | null
  answer?: string | null
  content?: string | null
  message_id?: string | null
  question?: string | null
}

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

export type AnnotationCountResponse = {
  count: number
}

export type AnnotationExportList = {
  data: Array<Annotation>
}

export type UpdateAnnotationPayload = {
  annotation_reply?: {
    [key: string]: unknown
  } | null
  answer?: string | null
  content?: string | null
  question?: string | null
}

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

export type AppApiStatusPayload = {
  enable_api: boolean
}

export type AudioTranscriptResponse = {
  text: string
}

export type ConversationWithSummaryPagination = {
  has_next: boolean
  items: Array<ConversationWithSummary>
  page: number
  per_page: number
  total: number
}

export type ConversationDetail = {
  admin_feedback_stats?: FeedbackStat
  annotated: boolean
  created_at?: number | null
  from_account_id?: string | null
  from_end_user_id?: string | null
  from_source: string
  id: string
  introduction?: string | null
  message_count: number
  model_config?: ModelConfig
  status: string
  updated_at?: number | null
  user_feedback_stats?: FeedbackStat
}

export type MessageInfiniteScrollPaginationResponse = {
  data: Array<MessageDetailResponse>
  has_more: boolean
  limit: number
}

export type SuggestedQuestionsResponse = {
  data: Array<string>
}

export type SimpleResultResponse = {
  result: string
}

export type ConversationPagination = {
  has_next: boolean
  items: Array<Conversation>
  page: number
  per_page: number
  total: number
}

export type ConversationMessageDetail = {
  created_at?: number | null
  first_message?: MessageDetail
  from_account_id?: string | null
  from_end_user_id?: string | null
  from_source: string
  id: string
  model_config?: ModelConfig
  status: string
}

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

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

export type ConvertToWorkflowPayload = {
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  name?: string | null
}

export type NewAppResponse = {
  new_app_id: string
}

export type CopyAppPayload = {
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: IconType
  name?: string | null
}

export type AppExportResponse = {
  data: string
}

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

export type AppIconPayload = {
  icon?: string | null
  icon_background?: string | null
  icon_type?: IconType
}

export type MessageDetailResponse = {
  agent_thoughts?: Array<AgentThought>
  annotation?: ConversationAnnotation
  annotation_hit_history?: ConversationAnnotationHitHistory
  answer_tokens?: number | null
  conversation_id: string
  created_at?: number | null
  error?: string | null
  extra_contents?: Array<HumanInputContent>
  feedbacks?: Array<Feedback>
  from_account_id?: string | null
  from_end_user_id?: string | null
  from_source: string
  id: string
  inputs: {
    [key: string]: JsonValue
  }
  message?: JsonValue
  message_files?: Array<MessageFile>
  message_metadata_dict?: JsonValue
  message_tokens?: number | null
  parent_message_id?: string | null
  provider_response_latency?: number | null
  query: string
  re_sign_file_url_answer: string
  status: string
  workflow_run_id?: string | null
}

export type ModelConfigRequest = {
  agent_mode?: {
    [key: string]: unknown
  } | null
  configs?: {
    [key: string]: unknown
  } | null
  dataset_configs?: {
    [key: string]: unknown
  } | null
  model?: string | null
  more_like_this?: {
    [key: string]: unknown
  } | null
  opening_statement?: string | null
  provider?: string | null
  retrieval_model?: {
    [key: string]: unknown
  } | null
  speech_to_text?: {
    [key: string]: unknown
  } | null
  suggested_questions?: Array<string> | null
  text_to_speech?: {
    [key: string]: unknown
  } | null
  tools?: Array<{
    [key: string]: unknown
  }> | null
}

export type AppNamePayload = {
  name: string
}

export type RedirectUrlResponse = {
  redirect_url: string
}

export type AppMcpServerResponse = {
  created_at?: number | null
  description: string
  id: string
  name: string
  parameters: unknown
  server_code: string
  status: AppMcpServerStatus
  updated_at?: number | null
}

export type McpServerCreatePayload = {
  description?: string | null
  parameters: {
    [key: string]: unknown
  }
}

export type McpServerUpdatePayload = {
  description?: string | null
  id: string
  parameters: {
    [key: string]: unknown
  }
  status?: string | null
}

export type AppSiteUpdatePayload = {
  chat_color_theme?: string | null
  chat_color_theme_inverted?: boolean | null
  copyright?: string | null
  custom_disclaimer?: string | null
  customize_domain?: string | null
  customize_token_strategy?: 'allow' | 'must' | 'not_allow' | null
  default_language?: string | null
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  privacy_policy?: string | null
  prompt_public?: boolean | null
  show_workflow_steps?: boolean | null
  title?: string | null
  use_icon_as_answer_icon?: boolean | null
}

export type AppSiteResponse = {
  app_id: string
  code?: string | null
  copyright?: string | null
  custom_disclaimer?: string | null
  customize_domain?: string | null
  customize_token_strategy: string
  default_language: string
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  privacy_policy?: string | null
  prompt_public: boolean
  show_workflow_steps: boolean
  title: string
  use_icon_as_answer_icon: boolean
}

export type AppSiteStatusPayload = {
  enable_site: boolean
}

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

export type AppTracePayload = {
  enabled: boolean
  tracing_provider?: string | null
}

export type TraceProviderQuery = {
  tracing_provider: string
}

export type TraceConfigPayload = {
  tracing_config: {
    [key: string]: unknown
  }
  tracing_provider: string
}

export type ParserEnable = {
  enable_trigger: boolean
  trigger_id: string
}

export type WorkflowTriggerResponse = {
  created_at?: string | null
  icon: string
  id: string
  node_id: string
  provider_name: string
  status: string
  title: string
  trigger_type: string
  updated_at?: string | null
}

export type WorkflowTriggerListResponse = {
  data: Array<WorkflowTriggerResponse>
}

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

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

export type WorkflowRunPaginationResponse = {
  data: Array<WorkflowRunForListResponse>
  has_more: boolean
  limit: number
}

export type WorkflowRunDetailResponse = {
  created_at?: number | null
  created_by_account?: SimpleAccount
  created_by_end_user?: SimpleEndUser
  created_by_role?: string | null
  elapsed_time?: number | null
  error?: string | null
  exceptions_count?: number | null
  finished_at?: number | null
  graph: unknown
  id: string
  inputs: unknown
  outputs: unknown
  status?: string | null
  total_steps?: number | null
  total_tokens?: number | null
  version?: string | null
}

export type WorkflowRunExportResponse = {
  presigned_url?: string | null
  presigned_url_expires_at?: string | null
  status: string
}

export type WorkflowRunNodeExecutionListResponse = {
  data: Array<WorkflowRunNodeExecutionResponse>
}

export type WorkflowCommentBasicList = {
  data: Array<WorkflowCommentBasic>
}

export type WorkflowCommentCreatePayload = {
  content: string
  mentioned_user_ids?: Array<string>
  position_x: number
  position_y: number
}

export type WorkflowCommentCreate = {
  created_at?: number | null
  id: string
}

export type WorkflowCommentMentionUsersPayload = {
  users: Array<AccountWithRole>
}

export type WorkflowCommentDetail = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccount
  id: string
  mentions: Array<WorkflowCommentMention>
  position_x: number
  position_y: number
  replies: Array<WorkflowCommentReply>
  resolved: boolean
  resolved_at?: number | null
  resolved_by?: string | null
  resolved_by_account?: WorkflowCommentAccount
  updated_at?: number | null
}

export type WorkflowCommentUpdatePayload = {
  content: string
  mentioned_user_ids?: Array<string> | null
  position_x?: number | null
  position_y?: number | null
}

export type WorkflowCommentUpdate = {
  id: string
  updated_at?: number | null
}

export type WorkflowCommentReplyPayload = {
  content: string
  mentioned_user_ids?: Array<string>
}

export type WorkflowCommentReplyCreate = {
  created_at?: number | null
  id: string
}

export type WorkflowCommentReplyUpdate = {
  id: string
  updated_at?: number | null
}

export type WorkflowCommentResolve = {
  id: string
  resolved: boolean
  resolved_at?: number | null
  resolved_by?: string | null
}

export type WorkflowPaginationResponse = {
  has_more: boolean
  items: Array<WorkflowResponse>
  limit: number
  page: number
}

export type WorkflowResponse = {
  conversation_variables: Array<WorkflowConversationVariableResponse>
  created_at: number
  created_by?: SimpleAccount
  environment_variables: Array<WorkflowEnvironmentVariableResponse>
  features: {
    [key: string]: unknown
  }
  graph: {
    [key: string]: unknown
  }
  hash: string
  id: string
  marked_comment: string
  marked_name: string
  rag_pipeline_variables: Array<PipelineVariableResponse>
  tool_published: boolean
  updated_at: number
  updated_by?: SimpleAccount
  version: string
}

export type SyncDraftWorkflowPayload = {
  conversation_variables?: Array<{
    [key: string]: unknown
  }>
  environment_variables?: Array<{
    [key: string]: unknown
  }>
  features: {
    [key: string]: unknown
  }
  graph: {
    [key: string]: unknown
  }
  hash?: string | null
}

export type SyncDraftWorkflowResponse = {
  hash?: string
  result?: string
  updated_at?: string
}

export type WorkflowDraftVariableList = {
  items?: Array<WorkflowDraftVariable>
}

export type ConversationVariableUpdatePayload = {
  conversation_variables: Array<{
    [key: string]: unknown
  }>
}

export type EnvironmentVariableUpdatePayload = {
  environment_variables: Array<{
    [key: string]: unknown
  }>
}

export type WorkflowFeaturesPayload = {
  features: {
    [key: string]: unknown
  }
}

export type HumanInputDeliveryTestPayload = {
  delivery_method_id: string
  inputs?: {
    [key: string]: unknown
  }
}

export type WorkflowAgentComposerResponse = {
  active_config_snapshot?: AgentConfigSnapshotSummaryResponse
  agent?: AgentComposerAgentResponse
  agent_soul: AgentSoulConfig
  app_id?: string | null
  binding?: AgentComposerBindingResponse
  effective_declared_outputs?: Array<DeclaredOutputConfig>
  impact_summary?: AgentComposerImpactResponse
  node_id?: string | null
  node_job: WorkflowNodeJobConfig
  save_options: Array<ComposerSaveStrategy>
  soul_lock: AgentComposerSoulLockResponse
  variant: string
  workflow_id?: string | null
}

export type AgentComposerImpactResponse = {
  bindings?: Array<AgentComposerImpactBindingResponse>
  current_snapshot_id?: string | null
  workflow_node_count: number
}

export type WorkflowRunNodeExecutionResponse = {
  created_at?: number | null
  created_by_account?: SimpleAccount
  created_by_end_user?: SimpleEndUser
  created_by_role?: string | null
  elapsed_time?: number | null
  error?: string | null
  execution_metadata?: unknown
  extras?: unknown
  finished_at?: number | null
  id: string
  index?: number | null
  inputs?: unknown
  inputs_truncated?: boolean | null
  node_id?: string | null
  node_type?: string | null
  outputs?: unknown
  outputs_truncated?: boolean | null
  predecessor_node_id?: string | null
  process_data?: unknown
  process_data_truncated?: boolean | null
  status?: string | null
  title?: string | null
}

export type DraftWorkflowNodeRunPayload = {
  files?: Array<{
    [key: string]: unknown
  }> | null
  inputs: {
    [key: string]: unknown
  }
  query?: string
}

export type DraftWorkflowRunPayload = {
  datasource_info_list: Array<{
    [key: string]: unknown
  }>
  datasource_type: string
  inputs: {
    [key: string]: unknown
  }
  start_node_id: string
}

export type DraftWorkflowTriggerRunRequest = {
  node_id: string
}

export type DraftWorkflowTriggerRunAllPayload = {
  node_ids: Array<string>
}

export type WorkflowDraftVariableListWithoutValue = {
  items?: Array<WorkflowDraftVariableWithoutValue>
  total?: {
    [key: string]: unknown
  }
}

export type WorkflowDraftVariable = {
  description?: string
  edited?: boolean
  full_content?: {
    [key: string]: unknown
  }
  id?: string
  is_truncated?: boolean
  name?: string
  selector?: Array<string>
  type?: string
  value?: {
    [key: string]: unknown
  }
  value_type?: string
  visible?: boolean
}

export type WorkflowDraftVariableUpdatePayload = {
  name?: string | null
  value?: unknown
}

export type PublishWorkflowPayload = {
  marked_comment?: string | null
  marked_name?: string | null
}

export type WebhookTriggerResponse = {
  created_at?: string | null
  id: string
  node_id: string
  webhook_debug_url: string
  webhook_id: string
  webhook_url: string
}

export type WorkflowUpdatePayload = {
  marked_comment?: string | null
  marked_name?: string | null
}

export type ApiKeyList = {
  data: Array<ApiKeyItem>
}

export type ApiKeyItem = {
  created_at?: number | null
  id: string
  last_used_at?: number | null
  token: string
  type: string
}

export type AppPartial = {
  access_mode?: string | null
  app_model_config?: ModelConfigPartial
  author_name?: string | null
  create_user_name?: string | null
  created_at?: number | null
  created_by?: string | null
  desc_or_prompt?: string | null
  has_draft_trigger?: boolean | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: string | null
  id: string
  max_active_requests?: number | null
  mode_compatible_with_agent: string
  name: string
  tags?: Array<Tag>
  updated_at?: number | null
  updated_by?: string | null
  use_icon_as_answer_icon?: boolean | null
  workflow?: WorkflowPartial
}

export type IconType = 'emoji' | 'image' | 'link'

export type ModelConfig = {
  completion_params?: {
    [key: string]: unknown
  }
  mode: LlmMode
  name: string
  provider: string
}

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

export type JsonValue = unknown

export type WorkflowPartial = {
  created_at?: number | null
  created_by?: string | null
  id: string
  updated_at?: number | null
  updated_by?: string | null
}

export type ImportStatus = 'completed' | 'completed-with-warnings' | 'failed' | 'pending'

export type PluginDependency = {
  current_identifier?: string | null
  type: Type
  value: unknown
}

export type WorkflowOnlineUsersByApp = {
  app_id: string
  users: Array<WorkflowOnlineUser>
}

export type DeletedTool = {
  provider_id: string
  tool_name: string
  type: string
}

export type Site = {
  app_base_url?: string | null
  chat_color_theme?: string | null
  chat_color_theme_inverted?: boolean | null
  code?: string | null
  copyright?: string | null
  created_at?: number | null
  created_by?: string | null
  custom_disclaimer?: string | null
  customize_domain?: string | null
  customize_token_strategy?: string | null
  default_language?: string | null
  description?: string | null
  icon?: string | null
  icon_background?: string | null
  icon_type?: unknown
  privacy_policy?: string | null
  prompt_public?: boolean | null
  show_workflow_steps?: boolean | null
  title?: string | null
  updated_at?: number | null
  updated_by?: string | null
  use_icon_as_answer_icon?: boolean | null
}

export type AdvancedChatWorkflowRunForListResponse = {
  conversation_id?: string | null
  created_at?: number | null
  created_by_account?: SimpleAccount
  elapsed_time?: number | null
  exceptions_count?: number | null
  finished_at?: number | null
  id: string
  message_id?: string | null
  retry_index?: number | null
  status?: string | null
  total_steps?: number | null
  total_tokens?: number | null
  version?: string | null
}

export type AgentConfigSnapshotSummaryResponse = {
  agent_id?: string | null
  created_at?: string | null
  created_by?: string | null
  id: string
  summary?: string | null
  version: number
  version_note?: string | null
}

export type AgentComposerAgentResponse = {
  active_config_snapshot_id?: string | null
  description: string
  id: string
  name: string
  scope: AgentScope
  status: AgentStatus
}

export type AgentSoulConfig = {
  app_features?: {
    [key: string]: unknown
  }
  app_variables?: Array<AppVariableConfig>
  env?: AgentSoulEnvConfig
  human?: AgentSoulHumanConfig
  knowledge?: AgentSoulKnowledgeConfig
  memory?: AgentSoulMemoryConfig
  misc_legacy?: {
    [key: string]: unknown
  }
  model?: AgentSoulModelConfig
  prompt?: AgentSoulPromptConfig
  sandbox?: AgentSoulSandboxConfig
  schema_version?: number
  skills_files?: AgentSoulSkillsFilesConfig
  tools?: AgentSoulToolsConfig
}

export type ComposerSaveStrategy
  = | 'node_job_only'
    | 'save_as_new_agent'
    | 'save_as_new_version'
    | 'save_to_current_version'
    | 'save_to_roster'

export type ComposerBindingPayload = {
  agent_id?: string | null
  binding_type: 'inline_agent' | 'roster_agent'
  current_snapshot_id?: string | null
}

export type WorkflowNodeJobConfig = {
  declared_outputs?: Array<DeclaredOutputConfig>
  human_contacts?: Array<{
    [key: string]: unknown
  }>
  metadata?: {
    [key: string]: unknown
  }
  mode?: WorkflowNodeJobMode
  previous_node_output_refs?: Array<{
    [key: string]: unknown
  }>
  schema_version?: number
  workflow_prompt?: string
}

export type ComposerSoulLockPayload = {
  locked?: boolean
  unlocked_from_version_id?: string | null
}

export type ComposerVariant = 'agent_app' | 'workflow'

export type AgentComposerNodeJobCandidatesResponse = {
  declare_output_types?: Array<DeclaredOutputType>
  human_contacts?: Array<{
    [key: string]: unknown
  }>
  previous_node_outputs?: Array<{
    [key: string]: unknown
  }>
}

export type AgentComposerSoulCandidatesResponse = {
  cli_tools?: Array<{
    [key: string]: unknown
  }>
  dify_tools?: Array<{
    [key: string]: unknown
  }>
  human_contacts?: Array<{
    [key: string]: unknown
  }>
  knowledge_datasets?: Array<{
    [key: string]: unknown
  }>
  skills_files?: Array<{
    [key: string]: unknown
  }>
}

export type ComposerCandidateCapabilities = {
  human_roster_available?: boolean
}

export type AnnotationHitHistory = {
  annotation_content?: string | null
  annotation_question?: string | null
  created_at?: number | null
  id: string
  question?: string | null
  score?: number | null
  source?: string | null
}

export type ConversationWithSummary = {
  admin_feedback_stats?: FeedbackStat
  annotated: boolean
  created_at?: number | null
  from_account_id?: string | null
  from_account_name?: string | null
  from_end_user_id?: string | null
  from_end_user_session_id?: string | null
  from_source: string
  id: string
  message_count: number
  model_config?: SimpleModelConfig
  name: string
  read_at?: number | null
  status: string
  status_count?: StatusCount
  summary_or_query: string
  updated_at?: number | null
  user_feedback_stats?: FeedbackStat
}

export type FeedbackStat = {
  dislike: number
  like: number
}

export type Conversation = {
  admin_feedback_stats?: FeedbackStat
  annotation?: ConversationAnnotation
  created_at?: number | null
  first_message?: SimpleMessageDetail
  from_account_id?: string | null
  from_account_name?: string | null
  from_end_user_id?: string | null
  from_end_user_session_id?: string | null
  from_source: string
  id: string
  model_config?: SimpleModelConfig
  read_at?: number | null
  status: string
  updated_at?: number | null
  user_feedback_stats?: FeedbackStat
}

export type MessageDetail = {
  agent_thoughts: Array<AgentThought>
  annotation?: ConversationAnnotation
  annotation_hit_history?: ConversationAnnotationHitHistory
  answer_tokens: number
  conversation_id: string
  created_at?: number | null
  error?: string | null
  feedbacks: Array<Feedback>
  from_account_id?: string | null
  from_end_user_id?: string | null
  from_source: string
  id: string
  inputs: {
    [key: string]: JsonValue
  }
  message: JsonValue
  message_files: Array<MessageFile>
  message_metadata_dict: JsonValue
  message_tokens: number
  parent_message_id?: string | null
  provider_response_latency: number
  query: string
  re_sign_file_url_answer: string
  status: string
  workflow_run_id?: string | null
}

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 AgentThought = {
  chain_id?: string | null
  created_at?: number | null
  files: Array<string>
  id: string
  message_chain_id?: string | null
  message_id: string
  observation?: string | null
  position: number
  thought?: string | null
  tool?: string | null
  tool_input?: string | null
  tool_labels: JsonValue
}

export type ConversationAnnotation = {
  account?: SimpleAccount
  content: string
  created_at?: number | null
  id: string
  question?: string | null
}

export type ConversationAnnotationHitHistory = {
  annotation_create_account?: SimpleAccount
  created_at?: number | null
  id: string
}

export type HumanInputContent = {
  form_definition?: HumanInputFormDefinition
  form_submission_data?: HumanInputFormSubmissionData
  submitted: boolean
  type?: ExecutionContentType
  workflow_run_id: string
}

export type Feedback = {
  content?: string | null
  from_account?: SimpleAccount
  from_end_user_id?: string | null
  from_source: string
  rating: string
}

export type MessageFile = {
  belongs_to?: string | null
  filename: string
  id: string
  mime_type?: string | null
  size?: number | null
  transfer_method: string
  type: string
  upload_file_id?: string | null
  url?: string | null
}

export type AppMcpServerStatus = 'active' | 'inactive' | 'normal'

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 WorkflowArchivedLogPartialResponse = {
  created_at?: number | null
  created_by_account?: SimpleAccount
  created_by_end_user?: SimpleEndUser
  id: string
  trigger_metadata?: unknown
  workflow_run?: WorkflowRunForArchivedLogResponse
}

export type WorkflowRunForListResponse = {
  created_at?: number | null
  created_by_account?: SimpleAccount
  elapsed_time?: number | null
  exceptions_count?: number | null
  finished_at?: number | null
  id: string
  retry_index?: number | null
  status?: string | null
  total_steps?: number | null
  total_tokens?: number | null
  version?: string | null
}

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 WorkflowCommentBasic = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccount
  id: string
  mention_count: number
  participants: Array<WorkflowCommentAccount>
  position_x: number
  position_y: number
  reply_count: number
  resolved: boolean
  resolved_at?: number | null
  resolved_by?: string | null
  resolved_by_account?: WorkflowCommentAccount
  updated_at?: number | null
}

export type AccountWithRole = {
  avatar?: string | null
  created_at?: number | null
  email: string
  id: string
  last_active_at?: number | null
  last_login_at?: number | null
  name: string
  role: string
  status: string
}

export type WorkflowCommentAccount = {
  readonly avatar_url: string | null
  email: string
  id: string
  name: string
}

export type WorkflowCommentMention = {
  mentioned_user_account?: WorkflowCommentAccount
  mentioned_user_id: string
  reply_id?: string | null
}

export type WorkflowCommentReply = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccount
  id: string
}

export type WorkflowConversationVariableResponse = {
  description: string
  id: string
  name: string
  value: {
    [key: string]: unknown
  }
  value_type: string
}

export type WorkflowEnvironmentVariableResponse = {
  description: string
  id: string
  name: string
  value: {
    [key: string]: unknown
  }
  value_type: string
}

export type PipelineVariableResponse = {
  allowed_file_extensions?: Array<string> | null
  allowed_file_types?: Array<string> | null
  allowed_file_upload_methods?: Array<string> | null
  belong_to_node_id: string
  default_value?: {
    [key: string]: unknown
  }
  label: string
  max_length?: number | null
  options?: Array<string> | null
  placeholder?: string | null
  required: boolean
  tooltips?: string | null
  type: string
  unit?: string | null
  variable: string
}

export type AgentComposerBindingResponse = {
  agent_id?: string | null
  binding_type: WorkflowAgentBindingType
  current_snapshot_id?: string | null
  id: string
  node_id: string
  workflow_id: string
}

export type DeclaredOutputConfig = {
  array_item?: DeclaredArrayItem
  check?: DeclaredOutputCheckConfig
  description?: string | null
  failure_strategy?: DeclaredOutputFailureStrategy
  file?: DeclaredOutputFileConfig
  id?: string | null
  name: string
  required?: boolean
  type: DeclaredOutputType
}

export type AgentComposerSoulLockResponse = {
  can_unlock?: boolean
  locked: boolean
  reason?: string | null
}

export type AgentComposerImpactBindingResponse = {
  app_id: string
  node_id: string
  workflow_id: string
}

export type WorkflowDraftVariableWithoutValue = {
  description?: string
  edited?: boolean
  id?: string
  is_truncated?: boolean
  name?: string
  selector?: Array<string>
  type?: string
  value_type?: string
  visible?: boolean
}

export type ModelConfigPartial = {
  created_at?: number | null
  created_by?: string | null
  model_dict?: JsonValue
  pre_prompt?: string | null
  updated_at?: number | null
  updated_by?: string | null
}

export type LlmMode = 'chat' | 'completion'

export type Type = 'github' | 'marketplace' | 'package'

export type Github = {
  github_plugin_unique_identifier: string
  package: string
  repo: string
  version: string
}

export type Marketplace = {
  marketplace_plugin_unique_identifier: string
  version?: string | null
}

export type Package = {
  plugin_unique_identifier: string
  version?: string | null
}

export type WorkflowOnlineUser = {
  avatar?: string | null
  user_id: string
  username: string
}

export type AgentScope = 'roster' | 'workflow_only'

export type AgentStatus = 'active' | 'archived'

export type AppVariableConfig = {
  default?: unknown
  name: string
  required?: boolean
  type: string
}

export type AgentSoulEnvConfig = {
  secret_refs?: Array<{
    [key: string]: unknown
  }>
  variables?: Array<{
    [key: string]: unknown
  }>
}

export type AgentSoulHumanConfig = {
  contacts?: Array<{
    [key: string]: unknown
  }>
  tools?: Array<{
    [key: string]: unknown
  }>
}

export type AgentSoulKnowledgeConfig = {
  datasets?: Array<{
    [key: string]: unknown
  }>
  query_config?: {
    [key: string]: unknown
  }
  query_mode?: AgentKnowledgeQueryMode
}

export type AgentSoulMemoryConfig = {
  artifacts?: Array<{
    [key: string]: unknown
  }>
  budget?: string | null
  scope?: string | null
}

export type AgentSoulModelConfig = {
  credential_ref?: AgentSoulModelCredentialRef
  model: string
  model_provider: string
  model_settings?: {
    [key: string]: unknown
  }
  plugin_id: string
}

export type AgentSoulPromptConfig = {
  system_prompt?: string
}

export type AgentSoulSandboxConfig = {
  config?: {
    [key: string]: unknown
  }
  provider?: string | null
}

export type AgentSoulSkillsFilesConfig = {
  files?: Array<{
    [key: string]: unknown
  }>
  skills?: Array<{
    [key: string]: unknown
  }>
}

export type AgentSoulToolsConfig = {
  cli_tools?: Array<{
    [key: string]: unknown
  }>
  dify_tools?: Array<AgentSoulDifyToolConfig>
}

export type WorkflowNodeJobMode = 'let_agent_figure_it_out' | 'tell_agent_what_to_do'

export type DeclaredOutputType = 'array' | 'boolean' | 'file' | 'number' | 'object' | 'string'

export type SimpleModelConfig = {
  model_dict?: JsonValue
  pre_prompt?: string | null
}

export type StatusCount = {
  failed: number
  partial_success: number
  paused: number
  success: number
}

export type SimpleMessageDetail = {
  answer: string
  inputs: {
    [key: string]: JsonValue
  }
  message: string
  query: string
}

export type HumanInputFormDefinition = {
  actions?: Array<UserActionConfig>
  display_in_ui?: boolean
  expiration_time: number
  form_content: string
  form_id: string
  form_token?: string | null
  inputs?: Array<FormInputConfig>
  node_id: string
  node_title: string
  resolved_default_values?: {
    [key: string]: unknown
  }
}

export type HumanInputFormSubmissionData = {
  action_id: string
  action_text: string
  node_id: string
  node_title: string
  rendered_content: string
}

export type ExecutionContentType = 'human_input'

export type WorkflowRunForLogResponse = {
  created_at?: number | null
  elapsed_time?: number | null
  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 WorkflowRunForArchivedLogResponse = {
  elapsed_time?: number | null
  id: string
  status?: string | null
  total_tokens?: number | null
  triggered_from?: string | null
}

export type WorkflowAgentBindingType = 'inline_agent' | 'roster_agent'

export type DeclaredArrayItem = {
  description?: string | null
  type: DeclaredOutputType
}

export type DeclaredOutputCheckConfig = {
  benchmark_file_ref?: {
    [key: string]: unknown
  } | null
  enabled?: boolean
  model_ref?: {
    [key: string]: unknown
  } | null
  prompt?: string | null
}

export type DeclaredOutputFailureStrategy = {
  default_value?: unknown
  on_failure?: OutputErrorStrategy
  retry?: DeclaredOutputRetryConfig
}

export type DeclaredOutputFileConfig = {
  extensions?: Array<string>
  mime_types?: Array<string>
}

export type AgentKnowledgeQueryMode = 'generated_query' | 'user_query'

export type AgentSoulModelCredentialRef = {
  id?: string | null
  provider?: string | null
  type: string
}

export type AgentSoulDifyToolConfig = {
  credential_ref?: AgentSoulDifyToolCredentialRef
  credential_type?: 'api-key' | 'oauth2' | 'unauthorized'
  description?: string | null
  enabled?: boolean
  name?: string | null
  plugin_id?: string | null
  provider?: string | null
  provider_id?: string | null
  provider_type?: string
  runtime_parameters?: {
    [key: string]: unknown
  }
  tool_name: string
}

export type UserActionConfig = {
  button_style?: ButtonStyle
  id: string
  title: string
}

export type FormInputConfig = unknown

export type OutputErrorStrategy = 'default_value' | 'fail_branch' | 'stop'

export type DeclaredOutputRetryConfig = {
  enabled?: boolean
  max_retries?: number
  retry_interval_ms?: number
}

export type AgentSoulDifyToolCredentialRef = {
  id?: string | null
  provider?: string | null
  type?: 'provider' | 'tool'
}

export type ButtonStyle = 'accent' | 'default' | 'ghost' | 'primary'

export type ParagraphInputConfig = {
  default?: StringSource
  output_variable_name: string
  type?: string
}

export type SelectInputConfig = {
  option_source: StringListSource
  output_variable_name: string
  type?: string
}

export type FileInputConfig = {
  allowed_file_extensions?: Array<string>
  allowed_file_types?: Array<FileType>
  allowed_file_upload_methods?: Array<FileTransferMethod>
  output_variable_name: string
  type?: string
}

export type FileListInputConfig = {
  allowed_file_extensions?: Array<string>
  allowed_file_types?: Array<FileType>
  allowed_file_upload_methods?: Array<FileTransferMethod>
  number_limits?: number
  output_variable_name: string
  type?: string
}

export type StringSource = {
  selector?: Array<string>
  type: ValueSourceType
  value?: string
}

export type StringListSource = {
  selector?: Array<string>
  type: ValueSourceType
  value?: Array<string>
}

export type FileType = 'audio' | 'custom' | 'document' | 'image' | 'video'

export type FileTransferMethod = 'datasource_file' | 'local_file' | 'remote_url' | 'tool_file'

export type ValueSourceType = 'constant' | 'variable'

export type WorkflowCommentBasicListWritable = {
  data: Array<WorkflowCommentBasicWritable>
}

export type WorkflowCommentDetailWritable = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccountWritable
  id: string
  mentions: Array<WorkflowCommentMentionWritable>
  position_x: number
  position_y: number
  replies: Array<WorkflowCommentReplyWritable>
  resolved: boolean
  resolved_at?: number | null
  resolved_by?: string | null
  resolved_by_account?: WorkflowCommentAccountWritable
  updated_at?: number | null
}

export type WorkflowCommentBasicWritable = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccountWritable
  id: string
  mention_count: number
  participants: Array<WorkflowCommentAccountWritable>
  position_x: number
  position_y: number
  reply_count: number
  resolved: boolean
  resolved_at?: number | null
  resolved_by?: string | null
  resolved_by_account?: WorkflowCommentAccountWritable
  updated_at?: number | null
}

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

export type WorkflowCommentMentionWritable = {
  mentioned_user_account?: WorkflowCommentAccountWritable
  mentioned_user_id: string
  reply_id?: string | null
}

export type WorkflowCommentReplyWritable = {
  content: string
  created_at?: number | null
  created_by: string
  created_by_account?: WorkflowCommentAccountWritable
  id: string
}

export type GetAppsData = {
  body?: never
  path?: never
  query?: {
    is_created_by_me?: boolean | null
    limit?: number
    mode?: 'advanced-chat' | 'agent-chat' | 'all' | 'channel' | 'chat' | 'completion' | 'workflow'
    name?: string | null
    page?: number
    tag_ids?: Array<string> | null
  }
  url: '/apps'
}

export type GetAppsResponses = {
  200: AppPagination
}

export type GetAppsResponse = GetAppsResponses[keyof GetAppsResponses]

export type PostAppsData = {
  body: CreateAppPayload
  path?: never
  query?: never
  url: '/apps'
}

export type PostAppsErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostAppsError = PostAppsErrors[keyof PostAppsErrors]

export type PostAppsResponses = {
  201: AppDetail
}

export type PostAppsResponse = PostAppsResponses[keyof PostAppsResponses]

export type PostAppsImportsData = {
  body: AppImportPayload
  path?: never
  query?: never
  url: '/apps/imports'
}

export type PostAppsImportsErrors = {
  400: Import
}

export type PostAppsImportsError = PostAppsImportsErrors[keyof PostAppsImportsErrors]

export type PostAppsImportsResponses = {
  200: Import
  202: Import
}

export type PostAppsImportsResponse = PostAppsImportsResponses[keyof PostAppsImportsResponses]

export type GetAppsImportsByAppIdCheckDependenciesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/imports/{app_id}/check-dependencies'
}

export type GetAppsImportsByAppIdCheckDependenciesResponses = {
  200: CheckDependenciesResult
}

export type GetAppsImportsByAppIdCheckDependenciesResponse
  = GetAppsImportsByAppIdCheckDependenciesResponses[keyof GetAppsImportsByAppIdCheckDependenciesResponses]

export type PostAppsImportsByImportIdConfirmData = {
  body?: never
  path: {
    import_id: string
  }
  query?: never
  url: '/apps/imports/{import_id}/confirm'
}

export type PostAppsImportsByImportIdConfirmErrors = {
  400: Import
}

export type PostAppsImportsByImportIdConfirmError
  = PostAppsImportsByImportIdConfirmErrors[keyof PostAppsImportsByImportIdConfirmErrors]

export type PostAppsImportsByImportIdConfirmResponses = {
  200: Import
}

export type PostAppsImportsByImportIdConfirmResponse
  = PostAppsImportsByImportIdConfirmResponses[keyof PostAppsImportsByImportIdConfirmResponses]

export type PostAppsWorkflowsOnlineUsersData = {
  body: WorkflowOnlineUsersPayload
  path?: never
  query?: never
  url: '/apps/workflows/online-users'
}

export type PostAppsWorkflowsOnlineUsersResponses = {
  200: WorkflowOnlineUsersResponse
}

export type PostAppsWorkflowsOnlineUsersResponse
  = PostAppsWorkflowsOnlineUsersResponses[keyof PostAppsWorkflowsOnlineUsersResponses]

export type DeleteAppsByAppIdData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}'
}

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

export type DeleteAppsByAppIdError = DeleteAppsByAppIdErrors[keyof DeleteAppsByAppIdErrors]

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

export type DeleteAppsByAppIdResponse = DeleteAppsByAppIdResponses[keyof DeleteAppsByAppIdResponses]

export type GetAppsByAppIdData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}'
}

export type GetAppsByAppIdResponses = {
  200: AppDetailWithSite
}

export type GetAppsByAppIdResponse = GetAppsByAppIdResponses[keyof GetAppsByAppIdResponses]

export type PutAppsByAppIdData = {
  body: UpdateAppPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}'
}

export type PutAppsByAppIdErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PutAppsByAppIdError = PutAppsByAppIdErrors[keyof PutAppsByAppIdErrors]

export type PutAppsByAppIdResponses = {
  200: AppDetailWithSite
}

export type PutAppsByAppIdResponse = PutAppsByAppIdResponses[keyof PutAppsByAppIdResponses]

export type GetAppsByAppIdAdvancedChatWorkflowRunsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    last_id?: string
    limit?: number
    status?: 'failed' | 'partial-succeeded' | 'running' | 'stopped' | 'succeeded'
    triggered_from?: 'app-run' | 'debugging'
  }
  url: '/apps/{app_id}/advanced-chat/workflow-runs'
}

export type GetAppsByAppIdAdvancedChatWorkflowRunsResponses = {
  200: AdvancedChatWorkflowRunPaginationResponse
}

export type GetAppsByAppIdAdvancedChatWorkflowRunsResponse
  = GetAppsByAppIdAdvancedChatWorkflowRunsResponses[keyof GetAppsByAppIdAdvancedChatWorkflowRunsResponses]

export type GetAppsByAppIdAdvancedChatWorkflowRunsCountData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    status?: 'failed' | 'partial-succeeded' | 'running' | 'stopped' | 'succeeded'
    time_range?: string
    triggered_from?: 'app-run' | 'debugging'
  }
  url: '/apps/{app_id}/advanced-chat/workflow-runs/count'
}

export type GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses = {
  200: WorkflowRunCountResponse
}

export type GetAppsByAppIdAdvancedChatWorkflowRunsCountResponse
  = GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses[keyof GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses]

export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewData = {
  body: HumanInputFormPreviewPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview'
}

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
  = PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses]

export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunData = {
  body: HumanInputFormSubmitPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run'
}

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
  = PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses]

export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunData = {
  body: IterationNodeRunPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run'
}

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunError
  = PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunErrors]

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse
  = PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponses]

export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunData = {
  body: LoopNodeRunPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run'
}

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunError
  = PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunErrors]

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse
  = PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponses]

export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunData = {
  body: AdvancedChatWorkflowRunPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/advanced-chat/workflows/draft/run'
}

export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunError
  = PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors]

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

export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse
  = PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponses]

export type GetAppsByAppIdAgentComposerData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/agent-composer'
}

export type GetAppsByAppIdAgentComposerResponses = {
  200: AgentAppComposerResponse
}

export type GetAppsByAppIdAgentComposerResponse
  = GetAppsByAppIdAgentComposerResponses[keyof GetAppsByAppIdAgentComposerResponses]

export type PutAppsByAppIdAgentComposerData = {
  body: ComposerSavePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/agent-composer'
}

export type PutAppsByAppIdAgentComposerResponses = {
  200: AgentAppComposerResponse
}

export type PutAppsByAppIdAgentComposerResponse
  = PutAppsByAppIdAgentComposerResponses[keyof PutAppsByAppIdAgentComposerResponses]

export type GetAppsByAppIdAgentComposerCandidatesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/agent-composer/candidates'
}

export type GetAppsByAppIdAgentComposerCandidatesResponses = {
  200: AgentComposerCandidatesResponse
}

export type GetAppsByAppIdAgentComposerCandidatesResponse
  = GetAppsByAppIdAgentComposerCandidatesResponses[keyof GetAppsByAppIdAgentComposerCandidatesResponses]

export type PostAppsByAppIdAgentComposerValidateData = {
  body: ComposerSavePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/agent-composer/validate'
}

export type PostAppsByAppIdAgentComposerValidateResponses = {
  200: AgentComposerValidateResponse
}

export type PostAppsByAppIdAgentComposerValidateResponse
  = PostAppsByAppIdAgentComposerValidateResponses[keyof PostAppsByAppIdAgentComposerValidateResponses]

export type GetAppsByAppIdAgentLogsData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    conversation_id: string
    message_id: string
  }
  url: '/apps/{app_id}/agent/logs'
}

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

export type GetAppsByAppIdAgentLogsError
  = GetAppsByAppIdAgentLogsErrors[keyof GetAppsByAppIdAgentLogsErrors]

export type GetAppsByAppIdAgentLogsResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdAgentLogsResponse
  = GetAppsByAppIdAgentLogsResponses[keyof GetAppsByAppIdAgentLogsResponses]

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

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

export type PostAppsByAppIdAnnotationReplyByActionError
  = PostAppsByAppIdAnnotationReplyByActionErrors[keyof PostAppsByAppIdAnnotationReplyByActionErrors]

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

export type PostAppsByAppIdAnnotationReplyByActionResponse
  = PostAppsByAppIdAnnotationReplyByActionResponses[keyof PostAppsByAppIdAnnotationReplyByActionResponses]

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

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

export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdError
  = GetAppsByAppIdAnnotationReplyByActionStatusByJobIdErrors[keyof GetAppsByAppIdAnnotationReplyByActionStatusByJobIdErrors]

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

export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse
  = GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponses[keyof GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponses]

export type GetAppsByAppIdAnnotationSettingData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotation-setting'
}

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

export type GetAppsByAppIdAnnotationSettingError
  = GetAppsByAppIdAnnotationSettingErrors[keyof GetAppsByAppIdAnnotationSettingErrors]

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

export type GetAppsByAppIdAnnotationSettingResponse
  = GetAppsByAppIdAnnotationSettingResponses[keyof GetAppsByAppIdAnnotationSettingResponses]

export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdData = {
  body: AnnotationSettingUpdatePayload
  path: {
    annotation_setting_id: string
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotation-settings/{annotation_setting_id}'
}

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

export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdError
  = PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdErrors[keyof PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdErrors]

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

export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse
  = PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponses[keyof PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponses]

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

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

export type DeleteAppsByAppIdAnnotationsResponse
  = DeleteAppsByAppIdAnnotationsResponses[keyof DeleteAppsByAppIdAnnotationsResponses]

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

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

export type GetAppsByAppIdAnnotationsError
  = GetAppsByAppIdAnnotationsErrors[keyof GetAppsByAppIdAnnotationsErrors]

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

export type GetAppsByAppIdAnnotationsResponse
  = GetAppsByAppIdAnnotationsResponses[keyof GetAppsByAppIdAnnotationsResponses]

export type PostAppsByAppIdAnnotationsData = {
  body: CreateAnnotationPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotations'
}

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

export type PostAppsByAppIdAnnotationsError
  = PostAppsByAppIdAnnotationsErrors[keyof PostAppsByAppIdAnnotationsErrors]

export type PostAppsByAppIdAnnotationsResponses = {
  201: Annotation
}

export type PostAppsByAppIdAnnotationsResponse
  = PostAppsByAppIdAnnotationsResponses[keyof PostAppsByAppIdAnnotationsResponses]

export type PostAppsByAppIdAnnotationsBatchImportData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotations/batch-import'
}

export type PostAppsByAppIdAnnotationsBatchImportErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
  413: {
    [key: string]: unknown
  }
  429: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdAnnotationsBatchImportError
  = PostAppsByAppIdAnnotationsBatchImportErrors[keyof PostAppsByAppIdAnnotationsBatchImportErrors]

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

export type PostAppsByAppIdAnnotationsBatchImportResponse
  = PostAppsByAppIdAnnotationsBatchImportResponses[keyof PostAppsByAppIdAnnotationsBatchImportResponses]

export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdData = {
  body?: never
  path: {
    app_id: string
    job_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotations/batch-import-status/{job_id}'
}

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

export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdError
  = GetAppsByAppIdAnnotationsBatchImportStatusByJobIdErrors[keyof GetAppsByAppIdAnnotationsBatchImportStatusByJobIdErrors]

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

export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse
  = GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponses[keyof GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponses]

export type GetAppsByAppIdAnnotationsCountData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/annotations/count'
}

export type GetAppsByAppIdAnnotationsCountResponses = {
  200: AnnotationCountResponse
}

export type GetAppsByAppIdAnnotationsCountResponse
  = GetAppsByAppIdAnnotationsCountResponses[keyof GetAppsByAppIdAnnotationsCountResponses]

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

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

export type GetAppsByAppIdAnnotationsExportError
  = GetAppsByAppIdAnnotationsExportErrors[keyof GetAppsByAppIdAnnotationsExportErrors]

export type GetAppsByAppIdAnnotationsExportResponses = {
  200: AnnotationExportList
}

export type GetAppsByAppIdAnnotationsExportResponse
  = GetAppsByAppIdAnnotationsExportResponses[keyof GetAppsByAppIdAnnotationsExportResponses]

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

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

export type DeleteAppsByAppIdAnnotationsByAnnotationIdResponse
  = DeleteAppsByAppIdAnnotationsByAnnotationIdResponses[keyof DeleteAppsByAppIdAnnotationsByAnnotationIdResponses]

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

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

export type PostAppsByAppIdAnnotationsByAnnotationIdError
  = PostAppsByAppIdAnnotationsByAnnotationIdErrors[keyof PostAppsByAppIdAnnotationsByAnnotationIdErrors]

export type PostAppsByAppIdAnnotationsByAnnotationIdResponses = {
  200: Annotation
  204: {
    [key: string]: never
  }
}

export type PostAppsByAppIdAnnotationsByAnnotationIdResponse
  = PostAppsByAppIdAnnotationsByAnnotationIdResponses[keyof PostAppsByAppIdAnnotationsByAnnotationIdResponses]

export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesData = {
  body?: never
  path: {
    annotation_id: string
    app_id: string
  }
  query?: {
    limit?: number
    page?: number
  }
  url: '/apps/{app_id}/annotations/{annotation_id}/hit-histories'
}

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

export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesError
  = GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesErrors[keyof GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesErrors]

export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses = {
  200: AnnotationHitHistoryList
}

export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse
  = GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses[keyof GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses]

export type PostAppsByAppIdApiEnableData = {
  body: AppApiStatusPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/api-enable'
}

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

export type PostAppsByAppIdApiEnableError
  = PostAppsByAppIdApiEnableErrors[keyof PostAppsByAppIdApiEnableErrors]

export type PostAppsByAppIdApiEnableResponses = {
  200: AppDetail
}

export type PostAppsByAppIdApiEnableResponse
  = PostAppsByAppIdApiEnableResponses[keyof PostAppsByAppIdApiEnableResponses]

export type PostAppsByAppIdAudioToTextData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/audio-to-text'
}

export type PostAppsByAppIdAudioToTextErrors = {
  400: {
    [key: string]: unknown
  }
  413: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdAudioToTextError
  = PostAppsByAppIdAudioToTextErrors[keyof PostAppsByAppIdAudioToTextErrors]

export type PostAppsByAppIdAudioToTextResponses = {
  200: AudioTranscriptResponse
}

export type PostAppsByAppIdAudioToTextResponse
  = PostAppsByAppIdAudioToTextResponses[keyof PostAppsByAppIdAudioToTextResponses]

export type GetAppsByAppIdChatConversationsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    annotation_status?: 'all' | 'annotated' | 'not_annotated'
    end?: string | null
    keyword?: string | null
    limit?: number
    page?: number
    sort_by?: '-created_at' | '-updated_at' | 'created_at' | 'updated_at'
    start?: string | null
  }
  url: '/apps/{app_id}/chat-conversations'
}

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

export type GetAppsByAppIdChatConversationsError
  = GetAppsByAppIdChatConversationsErrors[keyof GetAppsByAppIdChatConversationsErrors]

export type GetAppsByAppIdChatConversationsResponses = {
  200: ConversationWithSummaryPagination
}

export type GetAppsByAppIdChatConversationsResponse
  = GetAppsByAppIdChatConversationsResponses[keyof GetAppsByAppIdChatConversationsResponses]

export type DeleteAppsByAppIdChatConversationsByConversationIdData = {
  body?: never
  path: {
    app_id: string
    conversation_id: string
  }
  query?: never
  url: '/apps/{app_id}/chat-conversations/{conversation_id}'
}

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

export type DeleteAppsByAppIdChatConversationsByConversationIdError
  = DeleteAppsByAppIdChatConversationsByConversationIdErrors[keyof DeleteAppsByAppIdChatConversationsByConversationIdErrors]

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

export type DeleteAppsByAppIdChatConversationsByConversationIdResponse
  = DeleteAppsByAppIdChatConversationsByConversationIdResponses[keyof DeleteAppsByAppIdChatConversationsByConversationIdResponses]

export type GetAppsByAppIdChatConversationsByConversationIdData = {
  body?: never
  path: {
    app_id: string
    conversation_id: string
  }
  query?: never
  url: '/apps/{app_id}/chat-conversations/{conversation_id}'
}

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

export type GetAppsByAppIdChatConversationsByConversationIdError
  = GetAppsByAppIdChatConversationsByConversationIdErrors[keyof GetAppsByAppIdChatConversationsByConversationIdErrors]

export type GetAppsByAppIdChatConversationsByConversationIdResponses = {
  200: ConversationDetail
}

export type GetAppsByAppIdChatConversationsByConversationIdResponse
  = GetAppsByAppIdChatConversationsByConversationIdResponses[keyof GetAppsByAppIdChatConversationsByConversationIdResponses]

export type GetAppsByAppIdChatMessagesData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    conversation_id: string
    first_id?: string | null
    limit?: number
  }
  url: '/apps/{app_id}/chat-messages'
}

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

export type GetAppsByAppIdChatMessagesError
  = GetAppsByAppIdChatMessagesErrors[keyof GetAppsByAppIdChatMessagesErrors]

export type GetAppsByAppIdChatMessagesResponses = {
  200: MessageInfiniteScrollPaginationResponse
}

export type GetAppsByAppIdChatMessagesResponse
  = GetAppsByAppIdChatMessagesResponses[keyof GetAppsByAppIdChatMessagesResponses]

export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsData = {
  body?: never
  path: {
    app_id: string
    message_id: string
  }
  query?: never
  url: '/apps/{app_id}/chat-messages/{message_id}/suggested-questions'
}

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

export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsError
  = GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsErrors[keyof GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsErrors]

export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses = {
  200: SuggestedQuestionsResponse
}

export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse
  = GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses[keyof GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses]

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

export type PostAppsByAppIdChatMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdChatMessagesByTaskIdStopResponse
  = PostAppsByAppIdChatMessagesByTaskIdStopResponses[keyof PostAppsByAppIdChatMessagesByTaskIdStopResponses]

export type GetAppsByAppIdCompletionConversationsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    annotation_status?: 'all' | 'annotated' | 'not_annotated'
    end?: string | null
    keyword?: string | null
    limit?: number
    page?: number
    start?: string | null
  }
  url: '/apps/{app_id}/completion-conversations'
}

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

export type GetAppsByAppIdCompletionConversationsError
  = GetAppsByAppIdCompletionConversationsErrors[keyof GetAppsByAppIdCompletionConversationsErrors]

export type GetAppsByAppIdCompletionConversationsResponses = {
  200: ConversationPagination
}

export type GetAppsByAppIdCompletionConversationsResponse
  = GetAppsByAppIdCompletionConversationsResponses[keyof GetAppsByAppIdCompletionConversationsResponses]

export type DeleteAppsByAppIdCompletionConversationsByConversationIdData = {
  body?: never
  path: {
    app_id: string
    conversation_id: string
  }
  query?: never
  url: '/apps/{app_id}/completion-conversations/{conversation_id}'
}

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

export type DeleteAppsByAppIdCompletionConversationsByConversationIdError
  = DeleteAppsByAppIdCompletionConversationsByConversationIdErrors[keyof DeleteAppsByAppIdCompletionConversationsByConversationIdErrors]

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

export type DeleteAppsByAppIdCompletionConversationsByConversationIdResponse
  = DeleteAppsByAppIdCompletionConversationsByConversationIdResponses[keyof DeleteAppsByAppIdCompletionConversationsByConversationIdResponses]

export type GetAppsByAppIdCompletionConversationsByConversationIdData = {
  body?: never
  path: {
    app_id: string
    conversation_id: string
  }
  query?: never
  url: '/apps/{app_id}/completion-conversations/{conversation_id}'
}

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

export type GetAppsByAppIdCompletionConversationsByConversationIdError
  = GetAppsByAppIdCompletionConversationsByConversationIdErrors[keyof GetAppsByAppIdCompletionConversationsByConversationIdErrors]

export type GetAppsByAppIdCompletionConversationsByConversationIdResponses = {
  200: ConversationMessageDetail
}

export type GetAppsByAppIdCompletionConversationsByConversationIdResponse
  = GetAppsByAppIdCompletionConversationsByConversationIdResponses[keyof GetAppsByAppIdCompletionConversationsByConversationIdResponses]

export type PostAppsByAppIdCompletionMessagesData = {
  body: CompletionMessagePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/completion-messages'
}

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

export type PostAppsByAppIdCompletionMessagesError
  = PostAppsByAppIdCompletionMessagesErrors[keyof PostAppsByAppIdCompletionMessagesErrors]

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

export type PostAppsByAppIdCompletionMessagesResponse
  = PostAppsByAppIdCompletionMessagesResponses[keyof PostAppsByAppIdCompletionMessagesResponses]

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

export type PostAppsByAppIdCompletionMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdCompletionMessagesByTaskIdStopResponse
  = PostAppsByAppIdCompletionMessagesByTaskIdStopResponses[keyof PostAppsByAppIdCompletionMessagesByTaskIdStopResponses]

export type GetAppsByAppIdConversationVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    conversation_id: string
  }
  url: '/apps/{app_id}/conversation-variables'
}

export type GetAppsByAppIdConversationVariablesResponses = {
  200: PaginatedConversationVariableResponse
}

export type GetAppsByAppIdConversationVariablesResponse
  = GetAppsByAppIdConversationVariablesResponses[keyof GetAppsByAppIdConversationVariablesResponses]

export type PostAppsByAppIdConvertToWorkflowData = {
  body: ConvertToWorkflowPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/convert-to-workflow'
}

export type PostAppsByAppIdConvertToWorkflowErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdConvertToWorkflowError
  = PostAppsByAppIdConvertToWorkflowErrors[keyof PostAppsByAppIdConvertToWorkflowErrors]

export type PostAppsByAppIdConvertToWorkflowResponses = {
  200: NewAppResponse
}

export type PostAppsByAppIdConvertToWorkflowResponse
  = PostAppsByAppIdConvertToWorkflowResponses[keyof PostAppsByAppIdConvertToWorkflowResponses]

export type PostAppsByAppIdCopyData = {
  body: CopyAppPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/copy'
}

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

export type PostAppsByAppIdCopyError = PostAppsByAppIdCopyErrors[keyof PostAppsByAppIdCopyErrors]

export type PostAppsByAppIdCopyResponses = {
  201: AppDetailWithSite
}

export type PostAppsByAppIdCopyResponse
  = PostAppsByAppIdCopyResponses[keyof PostAppsByAppIdCopyResponses]

export type GetAppsByAppIdExportData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    include_secret?: boolean
    workflow_id?: string | null
  }
  url: '/apps/{app_id}/export'
}

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

export type GetAppsByAppIdExportError = GetAppsByAppIdExportErrors[keyof GetAppsByAppIdExportErrors]

export type GetAppsByAppIdExportResponses = {
  200: AppExportResponse
}

export type GetAppsByAppIdExportResponse
  = GetAppsByAppIdExportResponses[keyof GetAppsByAppIdExportResponses]

export type PostAppsByAppIdFeedbacksData = {
  body: MessageFeedbackPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/feedbacks'
}

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

export type PostAppsByAppIdFeedbacksError
  = PostAppsByAppIdFeedbacksErrors[keyof PostAppsByAppIdFeedbacksErrors]

export type PostAppsByAppIdFeedbacksResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdFeedbacksResponse
  = PostAppsByAppIdFeedbacksResponses[keyof PostAppsByAppIdFeedbacksResponses]

export type GetAppsByAppIdFeedbacksExportData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end_date?: string | null
    format?: 'csv' | 'json'
    from_source?: 'admin' | 'user' | null
    has_comment?: boolean | null
    rating?: 'dislike' | 'like' | null
    start_date?: string | null
  }
  url: '/apps/{app_id}/feedbacks/export'
}

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

export type GetAppsByAppIdFeedbacksExportError
  = GetAppsByAppIdFeedbacksExportErrors[keyof GetAppsByAppIdFeedbacksExportErrors]

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

export type GetAppsByAppIdFeedbacksExportResponse
  = GetAppsByAppIdFeedbacksExportResponses[keyof GetAppsByAppIdFeedbacksExportResponses]

export type PostAppsByAppIdIconData = {
  body: AppIconPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/icon'
}

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

export type PostAppsByAppIdIconError = PostAppsByAppIdIconErrors[keyof PostAppsByAppIdIconErrors]

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

export type PostAppsByAppIdIconResponse
  = PostAppsByAppIdIconResponses[keyof PostAppsByAppIdIconResponses]

export type GetAppsByAppIdMessagesByMessageIdData = {
  body?: never
  path: {
    app_id: string
    message_id: string
  }
  query?: never
  url: '/apps/{app_id}/messages/{message_id}'
}

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

export type GetAppsByAppIdMessagesByMessageIdError
  = GetAppsByAppIdMessagesByMessageIdErrors[keyof GetAppsByAppIdMessagesByMessageIdErrors]

export type GetAppsByAppIdMessagesByMessageIdResponses = {
  200: MessageDetailResponse
}

export type GetAppsByAppIdMessagesByMessageIdResponse
  = GetAppsByAppIdMessagesByMessageIdResponses[keyof GetAppsByAppIdMessagesByMessageIdResponses]

export type PostAppsByAppIdModelConfigData = {
  body: ModelConfigRequest
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/model-config'
}

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

export type PostAppsByAppIdModelConfigError
  = PostAppsByAppIdModelConfigErrors[keyof PostAppsByAppIdModelConfigErrors]

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

export type PostAppsByAppIdModelConfigResponse
  = PostAppsByAppIdModelConfigResponses[keyof PostAppsByAppIdModelConfigResponses]

export type PostAppsByAppIdNameData = {
  body: AppNamePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/name'
}

export type PostAppsByAppIdNameResponses = {
  200: AppDetail
}

export type PostAppsByAppIdNameResponse
  = PostAppsByAppIdNameResponses[keyof PostAppsByAppIdNameResponses]

export type PostAppsByAppIdPublishToCreatorsPlatformData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/publish-to-creators-platform'
}

export type PostAppsByAppIdPublishToCreatorsPlatformResponses = {
  200: RedirectUrlResponse
}

export type PostAppsByAppIdPublishToCreatorsPlatformResponse
  = PostAppsByAppIdPublishToCreatorsPlatformResponses[keyof PostAppsByAppIdPublishToCreatorsPlatformResponses]

export type GetAppsByAppIdServerData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/server'
}

export type GetAppsByAppIdServerResponses = {
  200: AppMcpServerResponse
}

export type GetAppsByAppIdServerResponse
  = GetAppsByAppIdServerResponses[keyof GetAppsByAppIdServerResponses]

export type PostAppsByAppIdServerData = {
  body: McpServerCreatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/server'
}

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

export type PostAppsByAppIdServerError
  = PostAppsByAppIdServerErrors[keyof PostAppsByAppIdServerErrors]

export type PostAppsByAppIdServerResponses = {
  201: AppMcpServerResponse
}

export type PostAppsByAppIdServerResponse
  = PostAppsByAppIdServerResponses[keyof PostAppsByAppIdServerResponses]

export type PutAppsByAppIdServerData = {
  body: McpServerUpdatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/server'
}

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

export type PutAppsByAppIdServerError = PutAppsByAppIdServerErrors[keyof PutAppsByAppIdServerErrors]

export type PutAppsByAppIdServerResponses = {
  200: AppMcpServerResponse
}

export type PutAppsByAppIdServerResponse
  = PutAppsByAppIdServerResponses[keyof PutAppsByAppIdServerResponses]

export type PostAppsByAppIdSiteData = {
  body: AppSiteUpdatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/site'
}

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

export type PostAppsByAppIdSiteError = PostAppsByAppIdSiteErrors[keyof PostAppsByAppIdSiteErrors]

export type PostAppsByAppIdSiteResponses = {
  200: AppSiteResponse
}

export type PostAppsByAppIdSiteResponse
  = PostAppsByAppIdSiteResponses[keyof PostAppsByAppIdSiteResponses]

export type PostAppsByAppIdSiteEnableData = {
  body: AppSiteStatusPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/site-enable'
}

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

export type PostAppsByAppIdSiteEnableError
  = PostAppsByAppIdSiteEnableErrors[keyof PostAppsByAppIdSiteEnableErrors]

export type PostAppsByAppIdSiteEnableResponses = {
  200: AppDetail
}

export type PostAppsByAppIdSiteEnableResponse
  = PostAppsByAppIdSiteEnableResponses[keyof PostAppsByAppIdSiteEnableResponses]

export type PostAppsByAppIdSiteAccessTokenResetData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/site/access-token-reset'
}

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

export type PostAppsByAppIdSiteAccessTokenResetError
  = PostAppsByAppIdSiteAccessTokenResetErrors[keyof PostAppsByAppIdSiteAccessTokenResetErrors]

export type PostAppsByAppIdSiteAccessTokenResetResponses = {
  200: AppSiteResponse
}

export type PostAppsByAppIdSiteAccessTokenResetResponse
  = PostAppsByAppIdSiteAccessTokenResetResponses[keyof PostAppsByAppIdSiteAccessTokenResetResponses]

export type GetAppsByAppIdStatisticsAverageResponseTimeData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/average-response-time'
}

export type GetAppsByAppIdStatisticsAverageResponseTimeResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsAverageResponseTimeResponse
  = GetAppsByAppIdStatisticsAverageResponseTimeResponses[keyof GetAppsByAppIdStatisticsAverageResponseTimeResponses]

export type GetAppsByAppIdStatisticsAverageSessionInteractionsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/average-session-interactions'
}

export type GetAppsByAppIdStatisticsAverageSessionInteractionsResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsAverageSessionInteractionsResponse
  = GetAppsByAppIdStatisticsAverageSessionInteractionsResponses[keyof GetAppsByAppIdStatisticsAverageSessionInteractionsResponses]

export type GetAppsByAppIdStatisticsDailyConversationsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/daily-conversations'
}

export type GetAppsByAppIdStatisticsDailyConversationsResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsDailyConversationsResponse
  = GetAppsByAppIdStatisticsDailyConversationsResponses[keyof GetAppsByAppIdStatisticsDailyConversationsResponses]

export type GetAppsByAppIdStatisticsDailyEndUsersData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/daily-end-users'
}

export type GetAppsByAppIdStatisticsDailyEndUsersResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsDailyEndUsersResponse
  = GetAppsByAppIdStatisticsDailyEndUsersResponses[keyof GetAppsByAppIdStatisticsDailyEndUsersResponses]

export type GetAppsByAppIdStatisticsDailyMessagesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/daily-messages'
}

export type GetAppsByAppIdStatisticsDailyMessagesResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsDailyMessagesResponse
  = GetAppsByAppIdStatisticsDailyMessagesResponses[keyof GetAppsByAppIdStatisticsDailyMessagesResponses]

export type GetAppsByAppIdStatisticsTokenCostsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/token-costs'
}

export type GetAppsByAppIdStatisticsTokenCostsResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsTokenCostsResponse
  = GetAppsByAppIdStatisticsTokenCostsResponses[keyof GetAppsByAppIdStatisticsTokenCostsResponses]

export type GetAppsByAppIdStatisticsTokensPerSecondData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/tokens-per-second'
}

export type GetAppsByAppIdStatisticsTokensPerSecondResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsTokensPerSecondResponse
  = GetAppsByAppIdStatisticsTokensPerSecondResponses[keyof GetAppsByAppIdStatisticsTokensPerSecondResponses]

export type GetAppsByAppIdStatisticsUserSatisfactionRateData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/statistics/user-satisfaction-rate'
}

export type GetAppsByAppIdStatisticsUserSatisfactionRateResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdStatisticsUserSatisfactionRateResponse
  = GetAppsByAppIdStatisticsUserSatisfactionRateResponses[keyof GetAppsByAppIdStatisticsUserSatisfactionRateResponses]

export type PostAppsByAppIdTextToAudioData = {
  body: TextToSpeechPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/text-to-audio'
}

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

export type PostAppsByAppIdTextToAudioError
  = PostAppsByAppIdTextToAudioErrors[keyof PostAppsByAppIdTextToAudioErrors]

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

export type PostAppsByAppIdTextToAudioResponse
  = PostAppsByAppIdTextToAudioResponses[keyof PostAppsByAppIdTextToAudioResponses]

export type GetAppsByAppIdTextToAudioVoicesData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    language: string
  }
  url: '/apps/{app_id}/text-to-audio/voices'
}

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

export type GetAppsByAppIdTextToAudioVoicesError
  = GetAppsByAppIdTextToAudioVoicesErrors[keyof GetAppsByAppIdTextToAudioVoicesErrors]

export type GetAppsByAppIdTextToAudioVoicesResponses = {
  200: Array<{
    [key: string]: unknown
  }>
}

export type GetAppsByAppIdTextToAudioVoicesResponse
  = GetAppsByAppIdTextToAudioVoicesResponses[keyof GetAppsByAppIdTextToAudioVoicesResponses]

export type GetAppsByAppIdTraceData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trace'
}

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

export type GetAppsByAppIdTraceResponse
  = GetAppsByAppIdTraceResponses[keyof GetAppsByAppIdTraceResponses]

export type PostAppsByAppIdTraceData = {
  body: AppTracePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trace'
}

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

export type PostAppsByAppIdTraceError = PostAppsByAppIdTraceErrors[keyof PostAppsByAppIdTraceErrors]

export type PostAppsByAppIdTraceResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdTraceResponse
  = PostAppsByAppIdTraceResponses[keyof PostAppsByAppIdTraceResponses]

export type DeleteAppsByAppIdTraceConfigData = {
  body: TraceProviderQuery
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trace-config'
}

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

export type DeleteAppsByAppIdTraceConfigError
  = DeleteAppsByAppIdTraceConfigErrors[keyof DeleteAppsByAppIdTraceConfigErrors]

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

export type DeleteAppsByAppIdTraceConfigResponse
  = DeleteAppsByAppIdTraceConfigResponses[keyof DeleteAppsByAppIdTraceConfigResponses]

export type GetAppsByAppIdTraceConfigData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    tracing_provider: string
  }
  url: '/apps/{app_id}/trace-config'
}

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

export type GetAppsByAppIdTraceConfigError
  = GetAppsByAppIdTraceConfigErrors[keyof GetAppsByAppIdTraceConfigErrors]

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

export type GetAppsByAppIdTraceConfigResponse
  = GetAppsByAppIdTraceConfigResponses[keyof GetAppsByAppIdTraceConfigResponses]

export type PatchAppsByAppIdTraceConfigData = {
  body: TraceConfigPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trace-config'
}

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

export type PatchAppsByAppIdTraceConfigError
  = PatchAppsByAppIdTraceConfigErrors[keyof PatchAppsByAppIdTraceConfigErrors]

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

export type PatchAppsByAppIdTraceConfigResponse
  = PatchAppsByAppIdTraceConfigResponses[keyof PatchAppsByAppIdTraceConfigResponses]

export type PostAppsByAppIdTraceConfigData = {
  body: TraceConfigPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trace-config'
}

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

export type PostAppsByAppIdTraceConfigError
  = PostAppsByAppIdTraceConfigErrors[keyof PostAppsByAppIdTraceConfigErrors]

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

export type PostAppsByAppIdTraceConfigResponse
  = PostAppsByAppIdTraceConfigResponses[keyof PostAppsByAppIdTraceConfigResponses]

export type PostAppsByAppIdTriggerEnableData = {
  body: ParserEnable
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/trigger-enable'
}

export type PostAppsByAppIdTriggerEnableResponses = {
  200: WorkflowTriggerResponse
}

export type PostAppsByAppIdTriggerEnableResponse
  = PostAppsByAppIdTriggerEnableResponses[keyof PostAppsByAppIdTriggerEnableResponses]

export type GetAppsByAppIdTriggersData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/triggers'
}

export type GetAppsByAppIdTriggersResponses = {
  200: WorkflowTriggerListResponse
}

export type GetAppsByAppIdTriggersResponse
  = GetAppsByAppIdTriggersResponses[keyof GetAppsByAppIdTriggersResponses]

export type GetAppsByAppIdWorkflowAppLogsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    created_at__after?: string | null
    created_at__before?: string | null
    created_by_account?: string | null
    created_by_end_user_session_id?: string | null
    detail?: boolean
    keyword?: string | null
    limit?: number
    page?: number
    status?: string | null
  }
  url: '/apps/{app_id}/workflow-app-logs'
}

export type GetAppsByAppIdWorkflowAppLogsResponses = {
  200: WorkflowAppLogPaginationResponse
}

export type GetAppsByAppIdWorkflowAppLogsResponse
  = GetAppsByAppIdWorkflowAppLogsResponses[keyof GetAppsByAppIdWorkflowAppLogsResponses]

export type GetAppsByAppIdWorkflowArchivedLogsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    created_at__after?: string | null
    created_at__before?: string | null
    created_by_account?: string | null
    created_by_end_user_session_id?: string | null
    detail?: boolean
    keyword?: string | null
    limit?: number
    page?: number
    status?: string | null
  }
  url: '/apps/{app_id}/workflow-archived-logs'
}

export type GetAppsByAppIdWorkflowArchivedLogsResponses = {
  200: WorkflowArchivedLogPaginationResponse
}

export type GetAppsByAppIdWorkflowArchivedLogsResponse
  = GetAppsByAppIdWorkflowArchivedLogsResponses[keyof GetAppsByAppIdWorkflowArchivedLogsResponses]

export type GetAppsByAppIdWorkflowRunsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    last_id?: string
    limit?: number
    status?: 'failed' | 'partial-succeeded' | 'running' | 'stopped' | 'succeeded'
    triggered_from?: 'app-run' | 'debugging'
  }
  url: '/apps/{app_id}/workflow-runs'
}

export type GetAppsByAppIdWorkflowRunsResponses = {
  200: WorkflowRunPaginationResponse
}

export type GetAppsByAppIdWorkflowRunsResponse
  = GetAppsByAppIdWorkflowRunsResponses[keyof GetAppsByAppIdWorkflowRunsResponses]

export type GetAppsByAppIdWorkflowRunsCountData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    status?: 'failed' | 'partial-succeeded' | 'running' | 'stopped' | 'succeeded'
    time_range?: string
    triggered_from?: 'app-run' | 'debugging'
  }
  url: '/apps/{app_id}/workflow-runs/count'
}

export type GetAppsByAppIdWorkflowRunsCountResponses = {
  200: WorkflowRunCountResponse
}

export type GetAppsByAppIdWorkflowRunsCountResponse
  = GetAppsByAppIdWorkflowRunsCountResponses[keyof GetAppsByAppIdWorkflowRunsCountResponses]

export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopData = {
  body?: never
  path: {
    app_id: string
    task_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow-runs/tasks/{task_id}/stop'
}

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

export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopError
  = PostAppsByAppIdWorkflowRunsTasksByTaskIdStopErrors[keyof PostAppsByAppIdWorkflowRunsTasksByTaskIdStopErrors]

export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse
  = PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses[keyof PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses]

export type GetAppsByAppIdWorkflowRunsByRunIdData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow-runs/{run_id}'
}

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

export type GetAppsByAppIdWorkflowRunsByRunIdError
  = GetAppsByAppIdWorkflowRunsByRunIdErrors[keyof GetAppsByAppIdWorkflowRunsByRunIdErrors]

export type GetAppsByAppIdWorkflowRunsByRunIdResponses = {
  200: WorkflowRunDetailResponse
}

export type GetAppsByAppIdWorkflowRunsByRunIdResponse
  = GetAppsByAppIdWorkflowRunsByRunIdResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdResponses]

export type GetAppsByAppIdWorkflowRunsByRunIdExportData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow-runs/{run_id}/export'
}

export type GetAppsByAppIdWorkflowRunsByRunIdExportResponses = {
  200: WorkflowRunExportResponse
}

export type GetAppsByAppIdWorkflowRunsByRunIdExportResponse
  = GetAppsByAppIdWorkflowRunsByRunIdExportResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdExportResponses]

export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow-runs/{run_id}/node-executions'
}

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

export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsError
  = GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsErrors[keyof GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsErrors]

export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses = {
  200: WorkflowRunNodeExecutionListResponse
}

export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse
  = GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses]

export type GetAppsByAppIdWorkflowCommentsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments'
}

export type GetAppsByAppIdWorkflowCommentsResponses = {
  200: WorkflowCommentBasicList
}

export type GetAppsByAppIdWorkflowCommentsResponse
  = GetAppsByAppIdWorkflowCommentsResponses[keyof GetAppsByAppIdWorkflowCommentsResponses]

export type PostAppsByAppIdWorkflowCommentsData = {
  body: WorkflowCommentCreatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments'
}

export type PostAppsByAppIdWorkflowCommentsResponses = {
  201: WorkflowCommentCreate
}

export type PostAppsByAppIdWorkflowCommentsResponse
  = PostAppsByAppIdWorkflowCommentsResponses[keyof PostAppsByAppIdWorkflowCommentsResponses]

export type GetAppsByAppIdWorkflowCommentsMentionUsersData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/mention-users'
}

export type GetAppsByAppIdWorkflowCommentsMentionUsersResponses = {
  200: WorkflowCommentMentionUsersPayload
}

export type GetAppsByAppIdWorkflowCommentsMentionUsersResponse
  = GetAppsByAppIdWorkflowCommentsMentionUsersResponses[keyof GetAppsByAppIdWorkflowCommentsMentionUsersResponses]

export type DeleteAppsByAppIdWorkflowCommentsByCommentIdData = {
  body?: never
  path: {
    app_id: string
    comment_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}'
}

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

export type DeleteAppsByAppIdWorkflowCommentsByCommentIdResponse
  = DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses]

export type GetAppsByAppIdWorkflowCommentsByCommentIdData = {
  body?: never
  path: {
    app_id: string
    comment_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}'
}

export type GetAppsByAppIdWorkflowCommentsByCommentIdResponses = {
  200: WorkflowCommentDetail
}

export type GetAppsByAppIdWorkflowCommentsByCommentIdResponse
  = GetAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof GetAppsByAppIdWorkflowCommentsByCommentIdResponses]

export type PutAppsByAppIdWorkflowCommentsByCommentIdData = {
  body: WorkflowCommentUpdatePayload
  path: {
    app_id: string
    comment_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}'
}

export type PutAppsByAppIdWorkflowCommentsByCommentIdResponses = {
  200: WorkflowCommentUpdate
}

export type PutAppsByAppIdWorkflowCommentsByCommentIdResponse
  = PutAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof PutAppsByAppIdWorkflowCommentsByCommentIdResponses]

export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesData = {
  body: WorkflowCommentReplyPayload
  path: {
    app_id: string
    comment_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}/replies'
}

export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses = {
  201: WorkflowCommentReplyCreate
}

export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse
  = PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses[keyof PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses]

export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdData = {
  body?: never
  path: {
    app_id: string
    comment_id: string
    reply_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}'
}

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

export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
  = DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses[keyof DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses]

export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdData = {
  body: WorkflowCommentReplyPayload
  path: {
    app_id: string
    comment_id: string
    reply_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}'
}

export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses = {
  200: WorkflowCommentReplyUpdate
}

export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
  = PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses[keyof PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses]

export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveData = {
  body?: never
  path: {
    app_id: string
    comment_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflow/comments/{comment_id}/resolve'
}

export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses = {
  200: WorkflowCommentResolve
}

export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse
  = PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses[keyof PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses]

export type GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/workflow/statistics/average-app-interactions'
}

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

export type GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse
  = GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponses[keyof GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponses]

export type GetAppsByAppIdWorkflowStatisticsDailyConversationsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/workflow/statistics/daily-conversations'
}

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

export type GetAppsByAppIdWorkflowStatisticsDailyConversationsResponse
  = GetAppsByAppIdWorkflowStatisticsDailyConversationsResponses[keyof GetAppsByAppIdWorkflowStatisticsDailyConversationsResponses]

export type GetAppsByAppIdWorkflowStatisticsDailyTerminalsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/workflow/statistics/daily-terminals'
}

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

export type GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse
  = GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponses[keyof GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponses]

export type GetAppsByAppIdWorkflowStatisticsTokenCostsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    end?: string | null
    start?: string | null
  }
  url: '/apps/{app_id}/workflow/statistics/token-costs'
}

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

export type GetAppsByAppIdWorkflowStatisticsTokenCostsResponse
  = GetAppsByAppIdWorkflowStatisticsTokenCostsResponses[keyof GetAppsByAppIdWorkflowStatisticsTokenCostsResponses]

export type GetAppsByAppIdWorkflowsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    limit?: number
    named_only?: boolean
    page?: number
    user_id?: string | null
  }
  url: '/apps/{app_id}/workflows'
}

export type GetAppsByAppIdWorkflowsResponses = {
  200: WorkflowPaginationResponse
}

export type GetAppsByAppIdWorkflowsResponse
  = GetAppsByAppIdWorkflowsResponses[keyof GetAppsByAppIdWorkflowsResponses]

export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/default-workflow-block-configs'
}

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

export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse
  = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponses[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponses]

export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeData = {
  body?: never
  path: {
    app_id: string
    block_type: string
  }
  query?: {
    q?: string | null
  }
  url: '/apps/{app_id}/workflows/default-workflow-block-configs/{block_type}'
}

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

export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeError
  = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeErrors[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeErrors]

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

export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse
  = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses]

export type GetAppsByAppIdWorkflowsDraftData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft'
}

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

export type GetAppsByAppIdWorkflowsDraftError
  = GetAppsByAppIdWorkflowsDraftErrors[keyof GetAppsByAppIdWorkflowsDraftErrors]

export type GetAppsByAppIdWorkflowsDraftResponses = {
  200: WorkflowResponse
}

export type GetAppsByAppIdWorkflowsDraftResponse
  = GetAppsByAppIdWorkflowsDraftResponses[keyof GetAppsByAppIdWorkflowsDraftResponses]

export type PostAppsByAppIdWorkflowsDraftData = {
  body: SyncDraftWorkflowPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft'
}

export type PostAppsByAppIdWorkflowsDraftErrors = {
  400: {
    [key: string]: unknown
  }
  403: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdWorkflowsDraftError
  = PostAppsByAppIdWorkflowsDraftErrors[keyof PostAppsByAppIdWorkflowsDraftErrors]

export type PostAppsByAppIdWorkflowsDraftResponses = {
  200: SyncDraftWorkflowResponse
}

export type PostAppsByAppIdWorkflowsDraftResponse
  = PostAppsByAppIdWorkflowsDraftResponses[keyof PostAppsByAppIdWorkflowsDraftResponses]

export type GetAppsByAppIdWorkflowsDraftConversationVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/conversation-variables'
}

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

export type GetAppsByAppIdWorkflowsDraftConversationVariablesError
  = GetAppsByAppIdWorkflowsDraftConversationVariablesErrors[keyof GetAppsByAppIdWorkflowsDraftConversationVariablesErrors]

export type GetAppsByAppIdWorkflowsDraftConversationVariablesResponses = {
  200: WorkflowDraftVariableList
}

export type GetAppsByAppIdWorkflowsDraftConversationVariablesResponse
  = GetAppsByAppIdWorkflowsDraftConversationVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftConversationVariablesResponses]

export type PostAppsByAppIdWorkflowsDraftConversationVariablesData = {
  body: ConversationVariableUpdatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/conversation-variables'
}

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

export type PostAppsByAppIdWorkflowsDraftConversationVariablesResponse
  = PostAppsByAppIdWorkflowsDraftConversationVariablesResponses[keyof PostAppsByAppIdWorkflowsDraftConversationVariablesResponses]

export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/environment-variables'
}

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

export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesError
  = GetAppsByAppIdWorkflowsDraftEnvironmentVariablesErrors[keyof GetAppsByAppIdWorkflowsDraftEnvironmentVariablesErrors]

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

export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse
  = GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses]

export type PostAppsByAppIdWorkflowsDraftEnvironmentVariablesData = {
  body: EnvironmentVariableUpdatePayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/environment-variables'
}

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

export type PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse
  = PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses[keyof PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses]

export type PostAppsByAppIdWorkflowsDraftFeaturesData = {
  body: WorkflowFeaturesPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/features'
}

export type PostAppsByAppIdWorkflowsDraftFeaturesResponses = {
  200: SimpleResultResponse
}

export type PostAppsByAppIdWorkflowsDraftFeaturesResponse
  = PostAppsByAppIdWorkflowsDraftFeaturesResponses[keyof PostAppsByAppIdWorkflowsDraftFeaturesResponses]

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestData = {
  body: HumanInputDeliveryTestPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test'
}

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

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse
  = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponses]

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewData = {
  body: HumanInputFormPreviewPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview'
}

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

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
  = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses]

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunData = {
  body: HumanInputFormSubmitPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run'
}

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

export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
  = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses]

export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunData = {
  body: IterationNodeRunPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run'
}

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

export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunError
  = PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunErrors]

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

export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse
  = PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponses]

export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunData = {
  body: LoopNodeRunPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run'
}

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

export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunError
  = PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunErrors]

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

export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse
  = PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponses]

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer'
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses = {
  200: WorkflowAgentComposerResponse
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse
  = GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses]

export type PutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerData = {
  body: ComposerSavePayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer'
}

export type PutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses = {
  200: WorkflowAgentComposerResponse
}

export type PutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse
  = PutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses[keyof PutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponses]

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/candidates'
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponses = {
  200: AgentComposerCandidatesResponse
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponse
  = GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponses]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactData = {
  body: ComposerSavePayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/impact'
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponses = {
  200: AgentComposerImpactResponse
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponse
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponses]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterData = {
  body: ComposerSavePayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/save-to-roster'
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponses = {
  200: WorkflowAgentComposerResponse
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponse
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponses]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateData = {
  body: ComposerSavePayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/validate'
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponses = {
  200: AgentComposerValidateResponse
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponse
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponses]

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/last-run'
}

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

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunError
  = GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunErrors[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunErrors]

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses = {
  200: WorkflowRunNodeExecutionResponse
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse
  = GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunData = {
  body: DraftWorkflowNodeRunPayload
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/run'
}

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

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunError
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunErrors]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses = {
  200: WorkflowRunNodeExecutionResponse
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses]

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run'
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors = {
  403: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunError
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors]

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

export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse
  = PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponses]

export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables'
}

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

export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
  = DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses]

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesData = {
  body?: never
  path: {
    app_id: string
    node_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables'
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
  200: WorkflowDraftVariableList
}

export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
  = GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses]

export type PostAppsByAppIdWorkflowsDraftRunData = {
  body: DraftWorkflowRunPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/run'
}

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

export type PostAppsByAppIdWorkflowsDraftRunError
  = PostAppsByAppIdWorkflowsDraftRunErrors[keyof PostAppsByAppIdWorkflowsDraftRunErrors]

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

export type PostAppsByAppIdWorkflowsDraftRunResponse
  = PostAppsByAppIdWorkflowsDraftRunResponses[keyof PostAppsByAppIdWorkflowsDraftRunResponses]

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs'
}

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsError
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsErrors[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsErrors]

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsResponse
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsResponses[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsResponses]

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/events'
}

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsError
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsErrors[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsErrors]

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsResponse
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsResponses[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsResponses]

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdData = {
  body?: never
  path: {
    app_id: string
    node_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}'
}

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdError
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdErrors[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdErrors]

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdResponse
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdResponses[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdResponses]

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewData = {
  body?: never
  path: {
    app_id: string
    node_id: string
    output_name: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview'
}

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewError
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewErrors[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewErrors]

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

export type GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse
  = GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponses[keyof GetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponses]

export type GetAppsByAppIdWorkflowsDraftSystemVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/system-variables'
}

export type GetAppsByAppIdWorkflowsDraftSystemVariablesResponses = {
  200: WorkflowDraftVariableList
}

export type GetAppsByAppIdWorkflowsDraftSystemVariablesResponse
  = GetAppsByAppIdWorkflowsDraftSystemVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftSystemVariablesResponses]

export type PostAppsByAppIdWorkflowsDraftTriggerRunData = {
  body: DraftWorkflowTriggerRunRequest
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/trigger/run'
}

export type PostAppsByAppIdWorkflowsDraftTriggerRunErrors = {
  403: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdWorkflowsDraftTriggerRunError
  = PostAppsByAppIdWorkflowsDraftTriggerRunErrors[keyof PostAppsByAppIdWorkflowsDraftTriggerRunErrors]

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

export type PostAppsByAppIdWorkflowsDraftTriggerRunResponse
  = PostAppsByAppIdWorkflowsDraftTriggerRunResponses[keyof PostAppsByAppIdWorkflowsDraftTriggerRunResponses]

export type PostAppsByAppIdWorkflowsDraftTriggerRunAllData = {
  body: DraftWorkflowTriggerRunAllPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/trigger/run-all'
}

export type PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors = {
  403: {
    [key: string]: unknown
  }
  500: {
    [key: string]: unknown
  }
}

export type PostAppsByAppIdWorkflowsDraftTriggerRunAllError
  = PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors[keyof PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors]

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

export type PostAppsByAppIdWorkflowsDraftTriggerRunAllResponse
  = PostAppsByAppIdWorkflowsDraftTriggerRunAllResponses[keyof PostAppsByAppIdWorkflowsDraftTriggerRunAllResponses]

export type DeleteAppsByAppIdWorkflowsDraftVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/variables'
}

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

export type DeleteAppsByAppIdWorkflowsDraftVariablesResponse
  = DeleteAppsByAppIdWorkflowsDraftVariablesResponses[keyof DeleteAppsByAppIdWorkflowsDraftVariablesResponses]

export type GetAppsByAppIdWorkflowsDraftVariablesData = {
  body?: never
  path: {
    app_id: string
  }
  query?: {
    limit?: number
    page?: number
  }
  url: '/apps/{app_id}/workflows/draft/variables'
}

export type GetAppsByAppIdWorkflowsDraftVariablesResponses = {
  200: WorkflowDraftVariableListWithoutValue
}

export type GetAppsByAppIdWorkflowsDraftVariablesResponse
  = GetAppsByAppIdWorkflowsDraftVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftVariablesResponses]

export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
  body?: never
  path: {
    app_id: string
    variable_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
}

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

export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdError
  = DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]

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

export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
  = DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]

export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
  body?: never
  path: {
    app_id: string
    variable_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
}

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

export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdError
  = GetAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof GetAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]

export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
  200: WorkflowDraftVariable
}

export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
  = GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]

export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
  body: WorkflowDraftVariableUpdatePayload
  path: {
    app_id: string
    variable_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
}

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

export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdError
  = PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]

export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
  200: WorkflowDraftVariable
}

export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
  = PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]

export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetData = {
  body?: never
  path: {
    app_id: string
    variable_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/draft/variables/{variable_id}/reset'
}

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

export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetError
  = PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetErrors[keyof PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetErrors]

export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses = {
  200: WorkflowDraftVariable
  204: {
    [key: string]: never
  }
}

export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse
  = PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses[keyof PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses]

export type GetAppsByAppIdWorkflowsPublishData = {
  body?: never
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/publish'
}

export type GetAppsByAppIdWorkflowsPublishResponses = {
  200: WorkflowResponse
}

export type GetAppsByAppIdWorkflowsPublishResponse
  = GetAppsByAppIdWorkflowsPublishResponses[keyof GetAppsByAppIdWorkflowsPublishResponses]

export type PostAppsByAppIdWorkflowsPublishData = {
  body: PublishWorkflowPayload
  path: {
    app_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/publish'
}

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

export type PostAppsByAppIdWorkflowsPublishResponse
  = PostAppsByAppIdWorkflowsPublishResponses[keyof PostAppsByAppIdWorkflowsPublishResponses]

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs'
}

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsError
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsErrors[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsErrors]

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsResponse
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsResponses[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsResponses]

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsData = {
  body?: never
  path: {
    app_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/events'
}

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsError
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsErrors[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsErrors]

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsResponse
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsResponses[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsResponses]

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdData = {
  body?: never
  path: {
    app_id: string
    node_id: string
    run_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}'
}

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdError
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdErrors[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdErrors]

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdResponse
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdResponses[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdResponses]

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewData
  = {
    body?: never
    path: {
      app_id: string
      node_id: string
      output_name: string
      run_id: string
    }
    query?: never
    url: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview'
  }

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewError
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewErrors[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewErrors]

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

export type GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse
  = GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponses[keyof GetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponses]

export type GetAppsByAppIdWorkflowsTriggersWebhookData = {
  body?: never
  path: {
    app_id: string
  }
  query: {
    credential_id?: string | null
    datasource_type: string
    inputs: string
  }
  url: '/apps/{app_id}/workflows/triggers/webhook'
}

export type GetAppsByAppIdWorkflowsTriggersWebhookResponses = {
  200: WebhookTriggerResponse
}

export type GetAppsByAppIdWorkflowsTriggersWebhookResponse
  = GetAppsByAppIdWorkflowsTriggersWebhookResponses[keyof GetAppsByAppIdWorkflowsTriggersWebhookResponses]

export type DeleteAppsByAppIdWorkflowsByWorkflowIdData = {
  body?: never
  path: {
    app_id: string
    workflow_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/{workflow_id}'
}

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

export type DeleteAppsByAppIdWorkflowsByWorkflowIdResponse
  = DeleteAppsByAppIdWorkflowsByWorkflowIdResponses[keyof DeleteAppsByAppIdWorkflowsByWorkflowIdResponses]

export type PatchAppsByAppIdWorkflowsByWorkflowIdData = {
  body: WorkflowUpdatePayload
  path: {
    app_id: string
    workflow_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/{workflow_id}'
}

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

export type PatchAppsByAppIdWorkflowsByWorkflowIdError
  = PatchAppsByAppIdWorkflowsByWorkflowIdErrors[keyof PatchAppsByAppIdWorkflowsByWorkflowIdErrors]

export type PatchAppsByAppIdWorkflowsByWorkflowIdResponses = {
  200: WorkflowResponse
}

export type PatchAppsByAppIdWorkflowsByWorkflowIdResponse
  = PatchAppsByAppIdWorkflowsByWorkflowIdResponses[keyof PatchAppsByAppIdWorkflowsByWorkflowIdResponses]

export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreData = {
  body?: never
  path: {
    app_id: string
    workflow_id: string
  }
  query?: never
  url: '/apps/{app_id}/workflows/{workflow_id}/restore'
}

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

export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreError
  = PostAppsByAppIdWorkflowsByWorkflowIdRestoreErrors[keyof PostAppsByAppIdWorkflowsByWorkflowIdRestoreErrors]

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

export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse
  = PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponses[keyof PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponses]

export type GetAppsByResourceIdApiKeysData = {
  body?: never
  path: {
    resource_id: string
  }
  query?: never
  url: '/apps/{resource_id}/api-keys'
}

export type GetAppsByResourceIdApiKeysResponses = {
  200: ApiKeyList
}

export type GetAppsByResourceIdApiKeysResponse
  = GetAppsByResourceIdApiKeysResponses[keyof GetAppsByResourceIdApiKeysResponses]

export type PostAppsByResourceIdApiKeysData = {
  body?: never
  path: {
    resource_id: string
  }
  query?: never
  url: '/apps/{resource_id}/api-keys'
}

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

export type PostAppsByResourceIdApiKeysError
  = PostAppsByResourceIdApiKeysErrors[keyof PostAppsByResourceIdApiKeysErrors]

export type PostAppsByResourceIdApiKeysResponses = {
  201: ApiKeyItem
}

export type PostAppsByResourceIdApiKeysResponse
  = PostAppsByResourceIdApiKeysResponses[keyof PostAppsByResourceIdApiKeysResponses]

export type DeleteAppsByResourceIdApiKeysByApiKeyIdData = {
  body?: never
  path: {
    api_key_id: string
    resource_id: string
  }
  query?: never
  url: '/apps/{resource_id}/api-keys/{api_key_id}'
}

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

export type DeleteAppsByResourceIdApiKeysByApiKeyIdResponse
  = DeleteAppsByResourceIdApiKeysByApiKeyIdResponses[keyof DeleteAppsByResourceIdApiKeysByApiKeyIdResponses]

export type GetAppsByServerIdServerRefreshData = {
  body?: never
  path: {
    server_id: string
  }
  query?: never
  url: '/apps/{server_id}/server/refresh'
}

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

export type GetAppsByServerIdServerRefreshError
  = GetAppsByServerIdServerRefreshErrors[keyof GetAppsByServerIdServerRefreshErrors]

export type GetAppsByServerIdServerRefreshResponses = {
  200: AppMcpServerResponse
}

export type GetAppsByServerIdServerRefreshResponse
  = GetAppsByServerIdServerRefreshResponses[keyof GetAppsByServerIdServerRefreshResponses]
