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

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

export type AccessModeResponse = {
  accessMode: string
}

export type AccessTokenData = {
  access_token: string
}

export type AccessTokenResultResponse = {
  data: AccessTokenData
  result: string
}

export type AppAccessModeQuery = {
  appCode?: string | null
  appId?: string | null
}

export type BooleanResultResponse = {
  result: boolean
}

export type BrandingModel = {
  application_title: string
  enabled: boolean
  favicon: string
  login_page_logo: string
  workspace_logo: string
}

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

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

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

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

export type EmailCodeLoginSendPayload = {
  email: string
  language?: string | null
}

export type EmailCodeLoginVerifyPayload = {
  code: string
  email: string
  token: string
}

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

export type FileWithSignedUrl = {
  created_at: number | null
  created_by: string | null
  extension: string | null
  id: string
  mime_type: string | null
  name: string
  size: number
  url: string | null
}

export type ForgotPasswordCheckPayload = {
  code: string
  email: string
  token: string
}

export type ForgotPasswordResetPayload = {
  new_password: string
  password_confirm: string
  token: string
}

export type ForgotPasswordSendPayload = {
  email: string
  language?: string | null
}

export type LicenseLimitationModel = {
  enabled: boolean
  limit: number
  size: number
}

export type LicenseModel = {
  expired_at: string
  status: LicenseStatus
  workspaces: LicenseLimitationModel
}

export type LicenseStatus = 'active' | 'expired' | 'expiring' | 'inactive' | 'lost' | 'none'

export type LoginPayload = {
  email: string
  password: string
}

export type LoginStatusResponse = {
  app_logged_in: boolean
  logged_in: boolean
}

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

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

export type MessageMoreLikeThisQuery = {
  response_mode: 'blocking' | 'streaming'
}

export type PluginInstallationPermissionModel = {
  plugin_installation_scope: PluginInstallationScope
  restrict_to_marketplace_only: boolean
}

export type PluginInstallationScope
  = | 'all'
    | 'none'
    | 'official_and_specific_partners'
    | 'official_only'

export type PluginManagerModel = {
  enabled: boolean
}

export type RemoteFileInfo = {
  file_length: number
  file_type: string
}

export type RemoteFileUploadPayload = {
  url: string
}

export type ResultResponse = {
  result: string
}

export type SavedMessageCreatePayload = {
  message_id: string
}

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

export type SimpleResultDataResponse = {
  data: string
  result: string
}

export type SimpleResultResponse = {
  result: string
}

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

export type SystemFeatureModel = {
  app_dsl_version: string
  branding: BrandingModel
  enable_change_email: boolean
  enable_collaboration_mode: boolean
  enable_creators_platform: boolean
  enable_email_code_login: boolean
  enable_email_password_login: boolean
  enable_explore_banner: boolean
  enable_marketplace: boolean
  enable_social_oauth_login: boolean
  enable_trial_app: boolean
  is_allow_create_workspace: boolean
  is_allow_register: boolean
  is_email_setup: boolean
  license: LicenseModel
  max_plugin_package_size: number
  plugin_installation_permission: PluginInstallationPermissionModel
  plugin_manager: PluginManagerModel
  sso_enforced_for_signin: boolean
  sso_enforced_for_signin_protocol: string
  trial_models: Array<string>
  webapp_auth: WebAppAuthModel
}

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

export type VerificationTokenResponse = {
  email: string
  is_valid: boolean
  token: string
}

export type WebAppAuthModel = {
  allow_email_code_login: boolean
  allow_email_password_login: boolean
  allow_sso: boolean
  enabled: boolean
  sso_config: WebAppAuthSsoModel
}

export type WebAppAuthSsoModel = {
  protocol: string
}

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

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

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

export type PostAudioToTextError = PostAudioToTextErrors[keyof PostAudioToTextErrors]

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

export type PostAudioToTextResponse = PostAudioToTextResponses[keyof PostAudioToTextResponses]

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

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

export type PostChatMessagesError = PostChatMessagesErrors[keyof PostChatMessagesErrors]

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

export type PostChatMessagesResponse = PostChatMessagesResponses[keyof PostChatMessagesResponses]

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

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

export type PostChatMessagesByTaskIdStopError
  = PostChatMessagesByTaskIdStopErrors[keyof PostChatMessagesByTaskIdStopErrors]

export type PostChatMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostChatMessagesByTaskIdStopResponse
  = PostChatMessagesByTaskIdStopResponses[keyof PostChatMessagesByTaskIdStopResponses]

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

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

export type PostCompletionMessagesError
  = PostCompletionMessagesErrors[keyof PostCompletionMessagesErrors]

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

export type PostCompletionMessagesResponse
  = PostCompletionMessagesResponses[keyof PostCompletionMessagesResponses]

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

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

export type PostCompletionMessagesByTaskIdStopError
  = PostCompletionMessagesByTaskIdStopErrors[keyof PostCompletionMessagesByTaskIdStopErrors]

export type PostCompletionMessagesByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostCompletionMessagesByTaskIdStopResponse
  = PostCompletionMessagesByTaskIdStopResponses[keyof PostCompletionMessagesByTaskIdStopResponses]

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

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

export type GetConversationsError = GetConversationsErrors[keyof GetConversationsErrors]

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

export type GetConversationsResponse = GetConversationsResponses[keyof GetConversationsResponses]

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

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

export type DeleteConversationsByCIdError
  = DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]

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

export type DeleteConversationsByCIdResponse
  = DeleteConversationsByCIdResponses[keyof DeleteConversationsByCIdResponses]

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

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

export type PostConversationsByCIdNameError
  = PostConversationsByCIdNameErrors[keyof PostConversationsByCIdNameErrors]

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

export type PostConversationsByCIdNameResponse
  = PostConversationsByCIdNameResponses[keyof PostConversationsByCIdNameResponses]

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

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

export type PatchConversationsByCIdPinError
  = PatchConversationsByCIdPinErrors[keyof PatchConversationsByCIdPinErrors]

export type PatchConversationsByCIdPinResponses = {
  200: ResultResponse
}

export type PatchConversationsByCIdPinResponse
  = PatchConversationsByCIdPinResponses[keyof PatchConversationsByCIdPinResponses]

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

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

export type PatchConversationsByCIdUnpinError
  = PatchConversationsByCIdUnpinErrors[keyof PatchConversationsByCIdUnpinErrors]

export type PatchConversationsByCIdUnpinResponses = {
  200: ResultResponse
}

export type PatchConversationsByCIdUnpinResponse
  = PatchConversationsByCIdUnpinResponses[keyof PatchConversationsByCIdUnpinResponses]

export type PostEmailCodeLoginData = {
  body: EmailCodeLoginSendPayload
  path?: never
  query?: never
  url: '/email-code-login'
}

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

export type PostEmailCodeLoginError = PostEmailCodeLoginErrors[keyof PostEmailCodeLoginErrors]

export type PostEmailCodeLoginResponses = {
  200: SimpleResultDataResponse
}

export type PostEmailCodeLoginResponse
  = PostEmailCodeLoginResponses[keyof PostEmailCodeLoginResponses]

export type PostEmailCodeLoginValidityData = {
  body: EmailCodeLoginVerifyPayload
  path?: never
  query?: never
  url: '/email-code-login/validity'
}

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

export type PostEmailCodeLoginValidityError
  = PostEmailCodeLoginValidityErrors[keyof PostEmailCodeLoginValidityErrors]

export type PostEmailCodeLoginValidityResponses = {
  200: AccessTokenResultResponse
}

export type PostEmailCodeLoginValidityResponse
  = PostEmailCodeLoginValidityResponses[keyof PostEmailCodeLoginValidityResponses]

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

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

export type PostFilesUploadError = PostFilesUploadErrors[keyof PostFilesUploadErrors]

export type PostFilesUploadResponses = {
  201: FileResponse
}

export type PostFilesUploadResponse = PostFilesUploadResponses[keyof PostFilesUploadResponses]

export type PostForgotPasswordData = {
  body: ForgotPasswordSendPayload
  path?: never
  query?: never
  url: '/forgot-password'
}

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

export type PostForgotPasswordError = PostForgotPasswordErrors[keyof PostForgotPasswordErrors]

export type PostForgotPasswordResponses = {
  200: SimpleResultDataResponse
}

export type PostForgotPasswordResponse
  = PostForgotPasswordResponses[keyof PostForgotPasswordResponses]

export type PostForgotPasswordResetsData = {
  body: ForgotPasswordResetPayload
  path?: never
  query?: never
  url: '/forgot-password/resets'
}

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

export type PostForgotPasswordResetsError
  = PostForgotPasswordResetsErrors[keyof PostForgotPasswordResetsErrors]

export type PostForgotPasswordResetsResponses = {
  200: SimpleResultResponse
}

export type PostForgotPasswordResetsResponse
  = PostForgotPasswordResetsResponses[keyof PostForgotPasswordResetsResponses]

export type PostForgotPasswordValidityData = {
  body: ForgotPasswordCheckPayload
  path?: never
  query?: never
  url: '/forgot-password/validity'
}

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

export type PostForgotPasswordValidityError
  = PostForgotPasswordValidityErrors[keyof PostForgotPasswordValidityErrors]

export type PostForgotPasswordValidityResponses = {
  200: VerificationTokenResponse
}

export type PostForgotPasswordValidityResponse
  = PostForgotPasswordValidityResponses[keyof PostForgotPasswordValidityResponses]

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

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

export type GetFormHumanInputByFormTokenResponse
  = GetFormHumanInputByFormTokenResponses[keyof GetFormHumanInputByFormTokenResponses]

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

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

export type PostFormHumanInputByFormTokenResponse
  = PostFormHumanInputByFormTokenResponses[keyof PostFormHumanInputByFormTokenResponses]

export type PostLoginData = {
  body: LoginPayload
  path?: never
  query?: never
  url: '/login'
}

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

export type PostLoginError = PostLoginErrors[keyof PostLoginErrors]

export type PostLoginResponses = {
  200: AccessTokenResultResponse
}

export type PostLoginResponse = PostLoginResponses[keyof PostLoginResponses]

export type GetLoginStatusData = {
  body?: never
  path?: never
  query?: never
  url: '/login/status'
}

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

export type GetLoginStatusError = GetLoginStatusErrors[keyof GetLoginStatusErrors]

export type GetLoginStatusResponses = {
  200: LoginStatusResponse
}

export type GetLoginStatusResponse = GetLoginStatusResponses[keyof GetLoginStatusResponses]

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

export type PostLogoutResponses = {
  200: SimpleResultResponse
}

export type PostLogoutResponse = PostLogoutResponses[keyof PostLogoutResponses]

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

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

export type GetMessagesError = GetMessagesErrors[keyof GetMessagesErrors]

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

export type GetMessagesResponse = GetMessagesResponses[keyof GetMessagesResponses]

export type PostMessagesByMessageIdFeedbacksData = {
  body?: never
  path: {
    message_id: string
  }
  query?: {
    content?: string
    rating?: 'dislike' | 'like'
  }
  url: '/messages/{message_id}/feedbacks'
}

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

export type PostMessagesByMessageIdFeedbacksError
  = PostMessagesByMessageIdFeedbacksErrors[keyof PostMessagesByMessageIdFeedbacksErrors]

export type PostMessagesByMessageIdFeedbacksResponses = {
  200: ResultResponse
}

export type PostMessagesByMessageIdFeedbacksResponse
  = PostMessagesByMessageIdFeedbacksResponses[keyof PostMessagesByMessageIdFeedbacksResponses]

export type GetMessagesByMessageIdMoreLikeThisData = {
  body?: never
  path: {
    message_id: string
  }
  query: {
    response_mode: 'blocking' | 'streaming'
  }
  url: '/messages/{message_id}/more-like-this'
}

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

export type GetMessagesByMessageIdMoreLikeThisError
  = GetMessagesByMessageIdMoreLikeThisErrors[keyof GetMessagesByMessageIdMoreLikeThisErrors]

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

export type GetMessagesByMessageIdMoreLikeThisResponse
  = GetMessagesByMessageIdMoreLikeThisResponses[keyof GetMessagesByMessageIdMoreLikeThisResponses]

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

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

export type GetMessagesByMessageIdSuggestedQuestionsError
  = GetMessagesByMessageIdSuggestedQuestionsErrors[keyof GetMessagesByMessageIdSuggestedQuestionsErrors]

export type GetMessagesByMessageIdSuggestedQuestionsResponses = {
  200: SuggestedQuestionsResponse
}

export type GetMessagesByMessageIdSuggestedQuestionsResponse
  = GetMessagesByMessageIdSuggestedQuestionsResponses[keyof GetMessagesByMessageIdSuggestedQuestionsResponses]

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

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

export type GetMetaError = GetMetaErrors[keyof GetMetaErrors]

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

export type GetMetaResponse = GetMetaResponses[keyof GetMetaResponses]

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

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

export type GetParametersError = GetParametersErrors[keyof GetParametersErrors]

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

export type GetParametersResponse = GetParametersResponses[keyof GetParametersResponses]

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

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

export type GetPassportError = GetPassportErrors[keyof GetPassportErrors]

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

export type GetPassportResponse = GetPassportResponses[keyof GetPassportResponses]

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

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

export type PostRemoteFilesUploadError
  = PostRemoteFilesUploadErrors[keyof PostRemoteFilesUploadErrors]

export type PostRemoteFilesUploadResponses = {
  201: FileWithSignedUrl
}

export type PostRemoteFilesUploadResponse
  = PostRemoteFilesUploadResponses[keyof PostRemoteFilesUploadResponses]

export type GetRemoteFilesByUrlData = {
  body?: never
  path: {
    url: string
  }
  query?: never
  url: '/remote-files/{url}'
}

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

export type GetRemoteFilesByUrlError = GetRemoteFilesByUrlErrors[keyof GetRemoteFilesByUrlErrors]

export type GetRemoteFilesByUrlResponses = {
  200: RemoteFileInfo
}

export type GetRemoteFilesByUrlResponse
  = GetRemoteFilesByUrlResponses[keyof GetRemoteFilesByUrlResponses]

export type GetSavedMessagesData = {
  body?: never
  path?: never
  query?: {
    last_id?: string
    limit?: number
  }
  url: '/saved-messages'
}

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

export type GetSavedMessagesError = GetSavedMessagesErrors[keyof GetSavedMessagesErrors]

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

export type GetSavedMessagesResponse = GetSavedMessagesResponses[keyof GetSavedMessagesResponses]

export type PostSavedMessagesData = {
  body?: never
  path?: never
  query: {
    message_id: string
  }
  url: '/saved-messages'
}

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

export type PostSavedMessagesError = PostSavedMessagesErrors[keyof PostSavedMessagesErrors]

export type PostSavedMessagesResponses = {
  200: ResultResponse
}

export type PostSavedMessagesResponse = PostSavedMessagesResponses[keyof PostSavedMessagesResponses]

export type DeleteSavedMessagesByMessageIdData = {
  body?: never
  path: {
    message_id: string
  }
  query?: never
  url: '/saved-messages/{message_id}'
}

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

export type DeleteSavedMessagesByMessageIdError
  = DeleteSavedMessagesByMessageIdErrors[keyof DeleteSavedMessagesByMessageIdErrors]

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

export type DeleteSavedMessagesByMessageIdResponse
  = DeleteSavedMessagesByMessageIdResponses[keyof DeleteSavedMessagesByMessageIdResponses]

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

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

export type GetSiteError = GetSiteErrors[keyof GetSiteErrors]

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

export type GetSiteResponse = GetSiteResponses[keyof GetSiteResponses]

export type GetSystemFeaturesData = {
  body?: never
  path?: never
  query?: never
  url: '/system-features'
}

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

export type GetSystemFeaturesError = GetSystemFeaturesErrors[keyof GetSystemFeaturesErrors]

export type GetSystemFeaturesResponses = {
  200: SystemFeatureModel
}

export type GetSystemFeaturesResponse = GetSystemFeaturesResponses[keyof GetSystemFeaturesResponses]

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

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

export type PostTextToAudioError = PostTextToAudioErrors[keyof PostTextToAudioErrors]

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

export type PostTextToAudioResponse = PostTextToAudioResponses[keyof PostTextToAudioResponses]

export type GetWebappAccessModeData = {
  body?: never
  path?: never
  query?: {
    appCode?: string
    appId?: string
  }
  url: '/webapp/access-mode'
}

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

export type GetWebappAccessModeError = GetWebappAccessModeErrors[keyof GetWebappAccessModeErrors]

export type GetWebappAccessModeResponses = {
  200: AccessModeResponse
}

export type GetWebappAccessModeResponse
  = GetWebappAccessModeResponses[keyof GetWebappAccessModeResponses]

export type GetWebappPermissionData = {
  body?: never
  path?: never
  query: {
    appId: string
  }
  url: '/webapp/permission'
}

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

export type GetWebappPermissionError = GetWebappPermissionErrors[keyof GetWebappPermissionErrors]

export type GetWebappPermissionResponses = {
  200: BooleanResultResponse
}

export type GetWebappPermissionResponse
  = GetWebappPermissionResponses[keyof GetWebappPermissionResponses]

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

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

export type GetWorkflowByTaskIdEventsResponse
  = GetWorkflowByTaskIdEventsResponses[keyof GetWorkflowByTaskIdEventsResponses]

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

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

export type PostWorkflowsRunError = PostWorkflowsRunErrors[keyof PostWorkflowsRunErrors]

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

export type PostWorkflowsRunResponse = PostWorkflowsRunResponses[keyof PostWorkflowsRunResponses]

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

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

export type PostWorkflowsTasksByTaskIdStopError
  = PostWorkflowsTasksByTaskIdStopErrors[keyof PostWorkflowsTasksByTaskIdStopErrors]

export type PostWorkflowsTasksByTaskIdStopResponses = {
  200: SimpleResultResponse
}

export type PostWorkflowsTasksByTaskIdStopResponse
  = PostWorkflowsTasksByTaskIdStopResponses[keyof PostWorkflowsTasksByTaskIdStopResponses]
