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

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

export type TenantListResponse = {
  workspaces: Array<TenantListItemResponse>
}

export type TenantInfoResponse = {
  created_at?: number | null
  custom_config?: WorkspaceCustomConfigResponse | null
  id: string
  in_trial?: boolean | null
  name?: string | null
  next_credit_reset_date?: number | null
  plan?: string | null
  role?: string | null
  status?: string | null
  trial_credits?: number | null
  trial_credits_used?: number | null
  trial_end_reason?: string | null
}

export type AgentProviderResponse = {
  [key: string]: unknown
}

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

export type SnippetPagination = {
  data?: Array<AnonymousInlineModelEfd591151Ea9>
  has_more?: boolean
  limit?: number
  page?: number
  total?: number
}

export type CreateSnippetPayload = {
  description?: string | null
  graph?: {
    [key: string]: unknown
  } | null
  icon_info?: IconInfo | null
  input_fields?: Array<InputFieldDefinition> | null
  name: string
  type?: 'group' | 'node'
}

export type Snippet = {
  created_at?: number
  created_by?: AnonymousInlineModelB0Fd3F86D9D5
  description?: string
  graph?: {
    [key: string]: unknown
  }
  icon_info?: {
    [key: string]: unknown
  }
  id?: string
  input_fields?: {
    [key: string]: unknown
  }
  is_published?: boolean
  name?: string
  tags?: Array<AnonymousInlineModel7B8B49Ca164e>
  type?: string
  updated_at?: number
  updated_by?: AnonymousInlineModelB0Fd3F86D9D5
  use_count?: number
  version?: number
}

export type SnippetImportPayload = {
  description?: string | null
  mode: string
  name?: string | null
  snippet_id?: string | null
  yaml_content?: string | null
  yaml_url?: string | null
}

export type SnippetImportResponse = {
  [key: string]: unknown
}

export type UpdateSnippetPayload = {
  description?: string | null
  icon_info?: IconInfo | null
  name?: string | null
}

export type SnippetDependencyCheckResponse = {
  [key: string]: unknown
}

export type TextFileResponse = string

export type SnippetUseCountResponse = {
  result: string
  use_count: number
}

export type AccountWithRoleList = {
  accounts: Array<AccountWithRole>
}

export type DefaultModelDataResponse = {
  data?: DefaultModelResponse | null
}

export type ParserPostDefault = {
  model_settings: Array<Inner>
}

export type SimpleResultResponse = {
  result: string
}

export type EndpointCreatePayload = {
  name: string
  plugin_unique_identifier: string
  settings: {
    [key: string]: unknown
  }
}

export type EndpointCreateResponse = {
  success: boolean
}

export type EndpointIdPayload = {
  endpoint_id: string
}

export type EndpointDeleteResponse = {
  success: boolean
}

export type EndpointDisableResponse = {
  success: boolean
}

export type EndpointEnableResponse = {
  success: boolean
}

export type EndpointListResponse = {
  endpoints: Array<{
    [key: string]: unknown
  }>
}

export type PluginEndpointListResponse = {
  endpoints: Array<{
    [key: string]: unknown
  }>
}

export type LegacyEndpointUpdatePayload = {
  endpoint_id: string
  name: string
  settings: {
    [key: string]: unknown
  }
}

export type EndpointUpdateResponse = {
  success: boolean
}

export type EndpointUpdatePayload = {
  name: string
  settings: {
    [key: string]: unknown
  }
}

export type MemberInvitePayload = {
  emails?: Array<string>
  language?: string | null
  role: TenantAccountRole
}

export type MemberInviteResponse = {
  invitation_results: Array<MemberInviteResultResponse>
  result: string
  tenant_id: string
}

export type OwnerTransferCheckPayload = {
  code: string
  token: string
}

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

export type OwnerTransferEmailPayload = {
  language?: string | null
}

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

export type MemberActionTenantResponse = {
  result: string
  tenant_id: string
}

export type OwnerTransferPayload = {
  token: string
}

export type MemberRoleUpdatePayload = {
  role: string
}

export type ModelProviderListResponse = {
  data: Array<ProviderResponse>
}

export type ModelProviderPaymentCheckoutUrlResponse = {
  payment_link: string
}

export type ParserCredentialDelete = {
  credential_id: string
}

export type ProviderCredentialResponse = {
  credentials?: {
    [key: string]: unknown
  } | null
}

export type ParserCredentialCreate = {
  credentials: {
    [key: string]: unknown
  }
  name?: string | null
}

export type ParserCredentialUpdate = {
  credential_id: string
  credentials: {
    [key: string]: unknown
  }
  name?: string | null
}

export type ParserCredentialSwitch = {
  credential_id: string
}

export type ParserCredentialValidate = {
  credentials: {
    [key: string]: unknown
  }
}

export type ProviderCredentialValidateResponse = {
  error?: string | null
  result: 'error' | 'success'
}

export type ParserDeleteModels = {
  model: string
  model_type: ModelType
}

export type ModelWithProviderListResponse = {
  data: Array<ModelWithProviderEntityResponse>
}

export type ParserPostModels = {
  config_from?: string | null
  credential_id?: string | null
  load_balancing?: LoadBalancingPayload | null
  model: string
  model_type: ModelType
}

export type ParserDeleteCredential = {
  credential_id: string
  model: string
  model_type: ModelType
}

export type ModelCredentialResponse = {
  available_credentials: Array<CredentialConfiguration>
  credentials?: {
    [key: string]: unknown
  }
  current_credential_id?: string | null
  current_credential_name?: string | null
  load_balancing: ModelCredentialLoadBalancingResponse
}

export type ParserCreateCredential = {
  credentials: {
    [key: string]: unknown
  }
  model: string
  model_type: ModelType
  name?: string | null
}

export type ParserUpdateCredential = {
  credential_id: string
  credentials: {
    [key: string]: unknown
  }
  model: string
  model_type: ModelType
  name?: string | null
}

export type ParserSwitch = {
  credential_id: string
  model: string
  model_type: ModelType
}

export type ParserValidate = {
  credentials: {
    [key: string]: unknown
  }
  model: string
  model_type: ModelType
}

export type ModelCredentialValidateResponse = {
  error?: string | null
  result: string
}

export type LoadBalancingCredentialPayload = {
  credentials: {
    [key: string]: unknown
  }
  model: string
  model_type: ModelType
}

export type LoadBalancingCredentialValidateResponse = {
  error?: string | null
  result: string
}

export type ModelParameterRulesResponse = {
  data: Array<ParameterRule>
}

export type ParserPreferredProviderType = {
  preferred_provider_type: 'custom' | 'system'
}

export type ProviderWithModelsDataResponse = {
  data: Array<ProviderWithModelsResponse>
}

export type WorkspacePermissionResponse = {
  allow_member_invite: boolean
  allow_owner_transfer: boolean
  workspace_id: string
}

export type BinaryFileResponse = Blob | File

export type PluginDebuggingKeyResponse = {
  host: string
  key: string
  port: number
}

export type PluginManifestResponse = {
  manifest: unknown
}

export type ParserGithubInstall = {
  package: string
  plugin_unique_identifier: string
  repo: string
  version: string
}

export type PluginDaemonOperationResponse = unknown

export type ParserPluginIdentifiers = {
  plugin_unique_identifiers: Array<string>
}

export type PluginListResponse = {
  plugins: unknown
  total: number
}

export type ParserLatest = {
  plugin_ids: Array<string>
}

export type PluginInstallationsResponse = {
  plugins: unknown
}

export type PluginVersionsResponse = {
  versions: unknown
}

export type PluginDynamicOptionsResponse = {
  options: unknown
}

export type ParserDynamicOptionsWithCredentials = {
  action: string
  credential_id: string
  credentials: {
    [key: string]: unknown
  }
  parameter: string
  plugin_id: string
  provider: string
}

export type ParserPermissionChange = {
  debug_permission: DebugPermission
  install_permission: InstallPermission
}

export type SuccessResponse = {
  success: boolean
}

export type PluginPermissionResponse = {
  debug_permission: DebugPermission
  install_permission: InstallPermission
}

export type ParserExcludePlugin = {
  plugin_id: string
}

export type PluginOperationSuccessResponse = {
  message?: string | null
  success: boolean
}

export type ParserPreferencesChange = {
  auto_upgrade: PluginAutoUpgradeSettingsPayload
  permission: PluginPermissionSettingsPayload
}

export type PluginPreferencesResponse = {
  auto_upgrade: PluginAutoUpgradeSettingsPayload
  permission: PluginPermissionSettingsPayload
}

export type PluginReadmeResponse = {
  readme: string
}

export type PluginTasksResponse = {
  tasks: unknown
}

export type PluginTaskResponse = {
  task: unknown
}

export type ParserUninstall = {
  plugin_installation_id: string
}

export type ParserGithubUpgrade = {
  new_plugin_unique_identifier: string
  original_plugin_unique_identifier: string
  package: string
  repo: string
  version: string
}

export type ParserMarketplaceUpgrade = {
  new_plugin_unique_identifier: string
  original_plugin_unique_identifier: string
}

export type ParserGithubUpload = {
  package: string
  repo: string
  version: string
}

export type ToolProviderOpaqueResponse = unknown

export type ApiToolProviderAddPayload = {
  credentials: {
    [key: string]: unknown
  }
  custom_disclaimer?: string
  icon: {
    [key: string]: unknown
  }
  labels?: Array<string> | null
  privacy_policy?: string | null
  provider: string
  schema: string
  schema_type: ApiProviderSchemaType
}

export type ApiToolProviderDeletePayload = {
  provider: string
}

export type ApiToolSchemaPayload = {
  schema: string
}

export type ApiToolTestPayload = {
  credentials: {
    [key: string]: unknown
  }
  parameters: {
    [key: string]: unknown
  }
  provider_name?: string | null
  schema: string
  schema_type: ApiProviderSchemaType
  tool_name: string
}

export type ApiToolProviderUpdatePayload = {
  credentials: {
    [key: string]: unknown
  }
  custom_disclaimer?: string
  icon: {
    [key: string]: unknown
  }
  labels?: Array<string> | null
  original_provider: string
  privacy_policy?: string | null
  provider: string
  schema: string
  schema_type: ApiProviderSchemaType
}

export type BuiltinToolAddPayload = {
  credentials: {
    [key: string]: unknown
  }
  name?: string | null
  type: CredentialType
  visibility?: string | null
}

export type BuiltinProviderDefaultCredentialPayload = {
  id: string
}

export type BuiltinToolCredentialDeletePayload = {
  credential_id: string
}

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

export type ToolOAuthCustomClientResponse = {
  [key: string]: unknown
}

export type ToolOAuthCustomClientPayload = {
  client_params?: {
    [key: string]: unknown
  } | null
  enable_oauth_custom_client?: boolean | null
}

export type BuiltinToolUpdatePayload = {
  credential_id: string
  credentials?: {
    [key: string]: unknown
  } | null
  name?: string | null
}

export type McpProviderDeletePayload = {
  provider_id: string
}

export type McpProviderCreatePayload = {
  authentication?: {
    [key: string]: unknown
  } | null
  configuration?: {
    [key: string]: unknown
  } | null
  headers?: {
    [key: string]: unknown
  } | null
  icon: string
  icon_background?: string
  icon_type: string
  identity_mode?: IdentityMode | null
  name: string
  server_identifier: string
  server_url: string
}

export type McpProviderUpdatePayload = {
  authentication?: {
    [key: string]: unknown
  } | null
  configuration?: {
    [key: string]: unknown
  } | null
  headers?: {
    [key: string]: unknown
  } | null
  icon: string
  icon_background?: string
  icon_type: string
  identity_mode?: IdentityMode | null
  name: string
  provider_id: string
  server_identifier: string
  server_url: string
}

export type McpAuthPayload = {
  authorization_code?: string | null
  provider_id: string
}

export type WorkflowToolCreatePayload = {
  description: string
  icon: {
    [key: string]: unknown
  }
  label: string
  labels?: Array<string> | null
  name: string
  parameters?: Array<WorkflowToolParameterConfiguration>
  privacy_policy?: string | null
  workflow_app_id: string
}

export type WorkflowToolDeletePayload = {
  workflow_tool_id: string
}

export type WorkflowToolUpdatePayload = {
  description: string
  icon: {
    [key: string]: unknown
  }
  label: string
  labels?: Array<string> | null
  name: string
  parameters?: Array<WorkflowToolParameterConfiguration>
  privacy_policy?: string | null
  workflow_tool_id: string
}

export type TriggerProviderOpaqueResponse = unknown

export type TriggerOAuthClientResponse = {
  configured: boolean
  custom_configured: boolean
  custom_enabled: boolean
  oauth_client_schema: unknown
  params: {
    [key: string]: unknown
  }
  redirect_uri: string
  system_configured: boolean
}

export type TriggerOAuthClientPayload = {
  client_params?: {
    [key: string]: unknown
  } | null
  enabled?: boolean | null
}

export type TriggerSubscriptionBuilderUpdatePayload = {
  credentials?: {
    [key: string]: unknown
  } | null
  name?: string | null
  parameters?: {
    [key: string]: unknown
  } | null
  properties?: {
    [key: string]: unknown
  } | null
}

export type TriggerSubscriptionBuilderCreatePayload = {
  credential_type?: string
}

export type TriggerSubscriptionBuilderVerifyPayload = {
  credentials: {
    [key: string]: unknown
  }
}

export type TriggerOAuthAuthorizeResponse = {
  authorization_url: string
  subscription_builder: unknown
  subscription_builder_id: string
}

export type WorkspaceCustomConfigPayload = {
  remove_webapp_brand?: boolean | null
  replace_webapp_logo?: string | null
}

export type WorkspaceMutationResponse = {
  result: string
  tenant: TenantInfoResponse
}

export type WorkspaceLogoUploadResponse = {
  id: string
}

export type WorkspaceInfoPayload = {
  name: string
}

export type SwitchWorkspacePayload = {
  tenant_id: string
}

export type SwitchWorkspaceResponse = {
  new_tenant: TenantInfoResponse
  result: string
}

export type TenantListItemResponse = {
  created_at?: number | null
  current: boolean
  id: string
  name?: string | null
  plan?: string | null
  status?: string | null
}

export type WorkspaceCustomConfigResponse = {
  remove_webapp_brand?: boolean | null
  replace_webapp_logo?: string | null
}

export type AnonymousInlineModelEfd591151Ea9 = {
  author_name?: string
  created_at?: number
  created_by?: string
  description?: string
  icon_info?: {
    [key: string]: unknown
  }
  id?: string
  is_published?: boolean
  name?: string
  tags?: Array<AnonymousInlineModel7B8B49Ca164e>
  type?: string
  updated_at?: number
  updated_by?: string
  use_count?: number
  version?: number
}

export type IconInfo = {
  icon?: string | null
  icon_background?: string | null
  icon_type?: 'emoji' | 'image' | null
  icon_url?: string | null
}

export type InputFieldDefinition = {
  default?: string | null
  hint?: boolean | null
  label?: string | null
  max_length?: number | null
  options?: Array<string> | null
  placeholder?: string | null
  required?: boolean | null
  type?: string | null
}

export type AnonymousInlineModelB0Fd3F86D9D5 = {
  email?: string
  id?: string
  name?: string
}

export type AnonymousInlineModel7B8B49Ca164e = {
  id?: string
  name?: string
  type?: string
}

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 DefaultModelResponse = {
  model: string
  model_type: ModelType
  provider: SimpleProviderEntityResponse
}

export type Inner = {
  model?: string | null
  model_type: ModelType
  provider?: string | null
}

export type TenantAccountRole = 'admin' | 'dataset_operator' | 'editor' | 'normal' | 'owner'

export type MemberInviteResultResponse = {
  email: string
  message?: string | null
  status: string
  url?: string | null
}

export type ProviderResponse = {
  background?: string | null
  configurate_methods: Array<ConfigurateMethod>
  custom_configuration: CustomConfigurationResponse
  description?: I18nObject | null
  help?: ProviderHelpEntity | null
  icon_small?: I18nObject | null
  icon_small_dark?: I18nObject | null
  label: I18nObject
  model_credential_schema?: ModelCredentialSchema | null
  preferred_provider_type: ProviderType
  provider: string
  provider_credential_schema?: ProviderCredentialSchema | null
  supported_model_types: Array<ModelType>
  system_configuration: SystemConfigurationResponse
  tenant_id: string
}

export type ModelType = 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'

export type ModelWithProviderEntityResponse = {
  deprecated?: boolean
  features?: Array<ModelFeature> | null
  fetch_from: FetchFrom
  has_invalid_load_balancing_configs?: boolean
  label: I18nObject
  load_balancing_enabled?: boolean
  model: string
  model_properties: {
    [key in ModelPropertyKey]?: unknown
  }
  model_type: ModelType
  provider: SimpleProviderEntityResponse
  status: ModelStatus
}

export type LoadBalancingPayload = {
  configs?: Array<{
    [key: string]: unknown
  }> | null
  enabled?: boolean | null
}

export type CredentialConfiguration = {
  credential_id: string
  credential_name: string
}

export type ModelCredentialLoadBalancingResponse = {
  configs?: Array<{
    [key: string]: unknown
  }>
  enabled: boolean
}

export type ParameterRule = {
  default?: unknown | null
  help?: I18nObject | null
  label: I18nObject
  max?: number | null
  min?: number | null
  name: string
  options?: Array<string>
  precision?: number | null
  required?: boolean
  type: ParameterType
  use_template?: string | null
}

export type ProviderWithModelsResponse = {
  icon_small?: I18nObject | null
  icon_small_dark?: I18nObject | null
  label: I18nObject
  models: Array<ProviderModelWithStatusEntity>
  provider: string
  status: CustomConfigurationStatus
  tenant_id: string
}

export type DebugPermission = 'admins' | 'everyone' | 'noone'

export type InstallPermission = 'admins' | 'everyone' | 'noone'

export type PluginAutoUpgradeSettingsPayload = {
  exclude_plugins?: Array<string>
  include_plugins?: Array<string>
  strategy_setting?: StrategySetting
  upgrade_mode?: UpgradeMode
  upgrade_time_of_day?: number
}

export type PluginPermissionSettingsPayload = {
  debug_permission?: DebugPermission
  install_permission?: InstallPermission
}

export type ApiProviderSchemaType = 'openai_actions' | 'openai_plugin' | 'openapi' | 'swagger'

export type CredentialType = 'api-key' | 'oauth2' | 'unauthorized'

export type IdentityMode = 'idp_token' | 'off'

export type WorkflowToolParameterConfiguration = {
  description: string
  form: ToolParameterForm
  name: string
}

export type SimpleProviderEntityResponse = {
  icon_small?: I18nObject | null
  icon_small_dark?: I18nObject | null
  label: I18nObject
  models?: Array<AiModelEntityResponse>
  provider: string
  provider_name?: string
  supported_model_types: Array<ModelType>
  tenant_id: string
}

export type ConfigurateMethod = 'customizable-model' | 'predefined-model'

export type CustomConfigurationResponse = {
  available_credentials?: Array<CredentialConfiguration> | null
  can_added_models?: Array<UnaddedModelConfiguration> | null
  current_credential_id?: string | null
  current_credential_name?: string | null
  custom_models?: Array<CustomModelConfiguration> | null
  status: CustomConfigurationStatus
}

export type I18nObject = {
  en_US: string
  zh_Hans?: string | null
}

export type ProviderHelpEntity = {
  title: I18nObject
  url: I18nObject
}

export type ModelCredentialSchema = {
  credential_form_schemas: Array<CredentialFormSchema>
  model: FieldModelSchema
}

export type ProviderType = 'custom' | 'system'

export type ProviderCredentialSchema = {
  credential_form_schemas: Array<CredentialFormSchema>
}

export type SystemConfigurationResponse = {
  current_quota_type?: ProviderQuotaType | null
  enabled: boolean
  quota_configurations?: Array<QuotaConfiguration>
}

export type ModelFeature
  = | 'agent-thought'
    | 'audio'
    | 'document'
    | 'multi-tool-call'
    | 'polling'
    | 'stream-tool-call'
    | 'structured-output'
    | 'tool-call'
    | 'video'
    | 'vision'

export type FetchFrom = 'customizable-model' | 'predefined-model'

export type ModelPropertyKey
  = | 'audio_type'
    | 'context_size'
    | 'default_voice'
    | 'file_upload_limit'
    | 'max_characters_per_chunk'
    | 'max_chunks'
    | 'max_workers'
    | 'mode'
    | 'supported_file_extensions'
    | 'voices'
    | 'word_limit'

export type ModelStatus
  = | 'active'
    | 'credential-removed'
    | 'disabled'
    | 'no-configure'
    | 'no-permission'
    | 'quota-exceeded'

export type ParameterType = 'boolean' | 'float' | 'int' | 'string' | 'text'

export type ProviderModelWithStatusEntity = {
  deprecated?: boolean
  features?: Array<ModelFeature> | null
  fetch_from: FetchFrom
  has_invalid_load_balancing_configs?: boolean
  label: I18nObject
  load_balancing_enabled?: boolean
  model: string
  model_properties: {
    [key in ModelPropertyKey]?: unknown
  }
  model_type: ModelType
  status: ModelStatus
}

export type CustomConfigurationStatus = 'active' | 'no-configure'

export type StrategySetting = 'disabled' | 'fix_only' | 'latest'

export type UpgradeMode = 'all' | 'exclude' | 'partial'

export type ToolParameterForm = 'form' | 'llm' | 'schema'

export type AiModelEntityResponse = {
  deprecated?: boolean
  features?: Array<ModelFeature> | null
  fetch_from: FetchFrom
  label: I18nObject
  model: string
  model_properties: {
    [key in ModelPropertyKey]?: unknown
  }
  model_type: ModelType
  parameter_rules?: Array<ParameterRule>
  pricing?: PriceConfigResponse | null
}

export type UnaddedModelConfiguration = {
  model: string
  model_type: ModelType
}

export type CustomModelConfiguration = {
  available_model_credentials?: Array<CredentialConfiguration>
  credentials: {
    [key: string]: unknown
  } | null
  current_credential_id?: string | null
  current_credential_name?: string | null
  model: string
  model_type: ModelType
  unadded_to_model_list?: boolean | null
}

export type CredentialFormSchema = {
  default?: string | null
  label: I18nObject
  max_length?: number
  options?: Array<FormOption> | null
  placeholder?: I18nObject | null
  required?: boolean
  show_on?: Array<FormShowOnObject>
  type: FormType
  variable: string
}

export type FieldModelSchema = {
  label: I18nObject
  placeholder?: I18nObject | null
}

export type ProviderQuotaType = 'free' | 'paid' | 'trial'

export type QuotaConfiguration = {
  is_valid: boolean
  quota_limit: number
  quota_type: ProviderQuotaType
  quota_unit: QuotaUnit
  quota_used: number
  restrict_models?: Array<RestrictModel>
}

export type PriceConfigResponse = {
  currency: string
  input: string
  output?: string | null
  unit: string
}

export type FormOption = {
  label: I18nObject
  show_on?: Array<FormShowOnObject>
  value: string
}

export type FormShowOnObject = {
  value: string
  variable: string
}

export type FormType = 'radio' | 'secret-input' | 'select' | 'switch' | 'text-input'

export type QuotaUnit = 'credits' | 'times' | 'tokens'

export type RestrictModel = {
  base_model_name?: string | null
  model: string
  model_type: ModelType
}

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

export type GetWorkspacesResponses = {
  200: TenantListResponse
}

export type GetWorkspacesResponse = GetWorkspacesResponses[keyof GetWorkspacesResponses]

export type PostWorkspacesCurrentData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current'
}

export type PostWorkspacesCurrentResponses = {
  200: TenantInfoResponse
}

export type PostWorkspacesCurrentResponse
  = PostWorkspacesCurrentResponses[keyof PostWorkspacesCurrentResponses]

export type GetWorkspacesCurrentAgentProviderByProviderNameData = {
  body?: never
  path: {
    provider_name: string
  }
  query?: never
  url: '/workspaces/current/agent-provider/{provider_name}'
}

export type GetWorkspacesCurrentAgentProviderByProviderNameResponses = {
  200: AgentProviderResponse
}

export type GetWorkspacesCurrentAgentProviderByProviderNameResponse
  = GetWorkspacesCurrentAgentProviderByProviderNameResponses[keyof GetWorkspacesCurrentAgentProviderByProviderNameResponses]

export type GetWorkspacesCurrentAgentProvidersData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/agent-providers'
}

export type GetWorkspacesCurrentAgentProvidersResponses = {
  200: AgentProviderListResponse
}

export type GetWorkspacesCurrentAgentProvidersResponse
  = GetWorkspacesCurrentAgentProvidersResponses[keyof GetWorkspacesCurrentAgentProvidersResponses]

export type GetWorkspacesCurrentCustomizedSnippetsData = {
  body?: never
  path?: never
  query?: {
    creators?: Array<string>
    is_published?: boolean
    keyword?: string
    limit?: number
    page?: number
    tag_ids?: Array<string>
  }
  url: '/workspaces/current/customized-snippets'
}

export type GetWorkspacesCurrentCustomizedSnippetsResponses = {
  200: SnippetPagination
}

export type GetWorkspacesCurrentCustomizedSnippetsResponse
  = GetWorkspacesCurrentCustomizedSnippetsResponses[keyof GetWorkspacesCurrentCustomizedSnippetsResponses]

export type PostWorkspacesCurrentCustomizedSnippetsData = {
  body: CreateSnippetPayload
  path?: never
  query?: never
  url: '/workspaces/current/customized-snippets'
}

export type PostWorkspacesCurrentCustomizedSnippetsErrors = {
  400: unknown
}

export type PostWorkspacesCurrentCustomizedSnippetsResponses = {
  201: Snippet
}

export type PostWorkspacesCurrentCustomizedSnippetsResponse
  = PostWorkspacesCurrentCustomizedSnippetsResponses[keyof PostWorkspacesCurrentCustomizedSnippetsResponses]

export type PostWorkspacesCurrentCustomizedSnippetsImportsData = {
  body: SnippetImportPayload
  path?: never
  query?: never
  url: '/workspaces/current/customized-snippets/imports'
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsErrors = {
  400: unknown
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsResponses = {
  200: SnippetImportResponse
  202: SnippetImportResponse
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsResponse
  = PostWorkspacesCurrentCustomizedSnippetsImportsResponses[keyof PostWorkspacesCurrentCustomizedSnippetsImportsResponses]

export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmData = {
  body?: never
  path: {
    import_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/imports/{import_id}/confirm'
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmErrors = {
  400: unknown
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses = {
  200: SnippetImportResponse
}

export type PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse
  = PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses[keyof PostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponses]

export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdData = {
  body?: never
  path: {
    snippet_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/{snippet_id}'
}

export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = {
  404: unknown
}

export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = {
  204: void
}

export type DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse
  = DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof DeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses]

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdData = {
  body?: never
  path: {
    snippet_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/{snippet_id}'
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = {
  404: unknown
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = {
  200: Snippet
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse
  = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses]

export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdData = {
  body: UpdateSnippetPayload
  path: {
    snippet_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/{snippet_id}'
}

export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdErrors = {
  400: unknown
  404: unknown
}

export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses = {
  200: Snippet
}

export type PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse
  = PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses[keyof PatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponses]

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesData = {
  body?: never
  path: {
    snippet_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/{snippet_id}/check-dependencies'
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesErrors = {
  404: unknown
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses = {
  200: SnippetDependencyCheckResponse
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse
  = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponses]

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportData = {
  body?: never
  path: {
    snippet_id: string
  }
  query?: {
    include_secret?: string
  }
  url: '/workspaces/current/customized-snippets/{snippet_id}/export'
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportErrors = {
  404: unknown
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses = {
  200: TextFileResponse
}

export type GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse
  = GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses[keyof GetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponses]

export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementData = {
  body?: never
  path: {
    snippet_id: string
  }
  query?: never
  url: '/workspaces/current/customized-snippets/{snippet_id}/use-count/increment'
}

export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementErrors = {
  404: unknown
}

export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses = {
  200: SnippetUseCountResponse
}

export type PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse
  = PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses[keyof PostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponses]

export type GetWorkspacesCurrentDatasetOperatorsData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/dataset-operators'
}

export type GetWorkspacesCurrentDatasetOperatorsResponses = {
  200: AccountWithRoleList
}

export type GetWorkspacesCurrentDatasetOperatorsResponse
  = GetWorkspacesCurrentDatasetOperatorsResponses[keyof GetWorkspacesCurrentDatasetOperatorsResponses]

export type GetWorkspacesCurrentDefaultModelData = {
  body?: never
  path?: never
  query: {
    model_type: 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'
  }
  url: '/workspaces/current/default-model'
}

export type GetWorkspacesCurrentDefaultModelResponses = {
  200: DefaultModelDataResponse
}

export type GetWorkspacesCurrentDefaultModelResponse
  = GetWorkspacesCurrentDefaultModelResponses[keyof GetWorkspacesCurrentDefaultModelResponses]

export type PostWorkspacesCurrentDefaultModelData = {
  body: ParserPostDefault
  path?: never
  query?: never
  url: '/workspaces/current/default-model'
}

export type PostWorkspacesCurrentDefaultModelResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentDefaultModelResponse
  = PostWorkspacesCurrentDefaultModelResponses[keyof PostWorkspacesCurrentDefaultModelResponses]

export type PostWorkspacesCurrentEndpointsData = {
  body: EndpointCreatePayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints'
}

export type PostWorkspacesCurrentEndpointsErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsResponses = {
  200: EndpointCreateResponse
}

export type PostWorkspacesCurrentEndpointsResponse
  = PostWorkspacesCurrentEndpointsResponses[keyof PostWorkspacesCurrentEndpointsResponses]

export type PostWorkspacesCurrentEndpointsCreateData = {
  body: EndpointCreatePayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints/create'
}

export type PostWorkspacesCurrentEndpointsCreateErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsCreateResponses = {
  200: EndpointCreateResponse
}

export type PostWorkspacesCurrentEndpointsCreateResponse
  = PostWorkspacesCurrentEndpointsCreateResponses[keyof PostWorkspacesCurrentEndpointsCreateResponses]

export type PostWorkspacesCurrentEndpointsDeleteData = {
  body: EndpointIdPayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints/delete'
}

export type PostWorkspacesCurrentEndpointsDeleteErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsDeleteResponses = {
  200: EndpointDeleteResponse
}

export type PostWorkspacesCurrentEndpointsDeleteResponse
  = PostWorkspacesCurrentEndpointsDeleteResponses[keyof PostWorkspacesCurrentEndpointsDeleteResponses]

export type PostWorkspacesCurrentEndpointsDisableData = {
  body: EndpointIdPayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints/disable'
}

export type PostWorkspacesCurrentEndpointsDisableErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsDisableResponses = {
  200: EndpointDisableResponse
}

export type PostWorkspacesCurrentEndpointsDisableResponse
  = PostWorkspacesCurrentEndpointsDisableResponses[keyof PostWorkspacesCurrentEndpointsDisableResponses]

export type PostWorkspacesCurrentEndpointsEnableData = {
  body: EndpointIdPayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints/enable'
}

export type PostWorkspacesCurrentEndpointsEnableErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsEnableResponses = {
  200: EndpointEnableResponse
}

export type PostWorkspacesCurrentEndpointsEnableResponse
  = PostWorkspacesCurrentEndpointsEnableResponses[keyof PostWorkspacesCurrentEndpointsEnableResponses]

export type GetWorkspacesCurrentEndpointsListData = {
  body?: never
  path?: never
  query: {
    page: number
    page_size: number
  }
  url: '/workspaces/current/endpoints/list'
}

export type GetWorkspacesCurrentEndpointsListResponses = {
  200: EndpointListResponse
}

export type GetWorkspacesCurrentEndpointsListResponse
  = GetWorkspacesCurrentEndpointsListResponses[keyof GetWorkspacesCurrentEndpointsListResponses]

export type GetWorkspacesCurrentEndpointsListPluginData = {
  body?: never
  path?: never
  query: {
    page: number
    page_size: number
    plugin_id: string
  }
  url: '/workspaces/current/endpoints/list/plugin'
}

export type GetWorkspacesCurrentEndpointsListPluginResponses = {
  200: PluginEndpointListResponse
}

export type GetWorkspacesCurrentEndpointsListPluginResponse
  = GetWorkspacesCurrentEndpointsListPluginResponses[keyof GetWorkspacesCurrentEndpointsListPluginResponses]

export type PostWorkspacesCurrentEndpointsUpdateData = {
  body: LegacyEndpointUpdatePayload
  path?: never
  query?: never
  url: '/workspaces/current/endpoints/update'
}

export type PostWorkspacesCurrentEndpointsUpdateErrors = {
  403: unknown
}

export type PostWorkspacesCurrentEndpointsUpdateResponses = {
  200: EndpointUpdateResponse
}

export type PostWorkspacesCurrentEndpointsUpdateResponse
  = PostWorkspacesCurrentEndpointsUpdateResponses[keyof PostWorkspacesCurrentEndpointsUpdateResponses]

export type DeleteWorkspacesCurrentEndpointsByIdData = {
  body?: never
  path: {
    id: string
  }
  query?: never
  url: '/workspaces/current/endpoints/{id}'
}

export type DeleteWorkspacesCurrentEndpointsByIdErrors = {
  403: unknown
}

export type DeleteWorkspacesCurrentEndpointsByIdResponses = {
  200: EndpointDeleteResponse
}

export type DeleteWorkspacesCurrentEndpointsByIdResponse
  = DeleteWorkspacesCurrentEndpointsByIdResponses[keyof DeleteWorkspacesCurrentEndpointsByIdResponses]

export type PatchWorkspacesCurrentEndpointsByIdData = {
  body: EndpointUpdatePayload
  path: {
    id: string
  }
  query?: never
  url: '/workspaces/current/endpoints/{id}'
}

export type PatchWorkspacesCurrentEndpointsByIdErrors = {
  403: unknown
}

export type PatchWorkspacesCurrentEndpointsByIdResponses = {
  200: EndpointUpdateResponse
}

export type PatchWorkspacesCurrentEndpointsByIdResponse
  = PatchWorkspacesCurrentEndpointsByIdResponses[keyof PatchWorkspacesCurrentEndpointsByIdResponses]

export type GetWorkspacesCurrentMembersData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/members'
}

export type GetWorkspacesCurrentMembersResponses = {
  200: AccountWithRoleList
}

export type GetWorkspacesCurrentMembersResponse
  = GetWorkspacesCurrentMembersResponses[keyof GetWorkspacesCurrentMembersResponses]

export type PostWorkspacesCurrentMembersInviteEmailData = {
  body: MemberInvitePayload
  path?: never
  query?: never
  url: '/workspaces/current/members/invite-email'
}

export type PostWorkspacesCurrentMembersInviteEmailResponses = {
  201: MemberInviteResponse
}

export type PostWorkspacesCurrentMembersInviteEmailResponse
  = PostWorkspacesCurrentMembersInviteEmailResponses[keyof PostWorkspacesCurrentMembersInviteEmailResponses]

export type PostWorkspacesCurrentMembersOwnerTransferCheckData = {
  body: OwnerTransferCheckPayload
  path?: never
  query?: never
  url: '/workspaces/current/members/owner-transfer-check'
}

export type PostWorkspacesCurrentMembersOwnerTransferCheckResponses = {
  200: VerificationTokenResponse
}

export type PostWorkspacesCurrentMembersOwnerTransferCheckResponse
  = PostWorkspacesCurrentMembersOwnerTransferCheckResponses[keyof PostWorkspacesCurrentMembersOwnerTransferCheckResponses]

export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailData = {
  body: OwnerTransferEmailPayload
  path?: never
  query?: never
  url: '/workspaces/current/members/send-owner-transfer-confirm-email'
}

export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses = {
  200: SimpleResultDataResponse
}

export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse
  = PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses[keyof PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses]

export type DeleteWorkspacesCurrentMembersByMemberIdData = {
  body?: never
  path: {
    member_id: string
  }
  query?: never
  url: '/workspaces/current/members/{member_id}'
}

export type DeleteWorkspacesCurrentMembersByMemberIdResponses = {
  200: MemberActionTenantResponse
}

export type DeleteWorkspacesCurrentMembersByMemberIdResponse
  = DeleteWorkspacesCurrentMembersByMemberIdResponses[keyof DeleteWorkspacesCurrentMembersByMemberIdResponses]

export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferData = {
  body: OwnerTransferPayload
  path: {
    member_id: string
  }
  query?: never
  url: '/workspaces/current/members/{member_id}/owner-transfer'
}

export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse
  = PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses[keyof PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses]

export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleData = {
  body: MemberRoleUpdatePayload
  path: {
    member_id: string
  }
  query?: never
  url: '/workspaces/current/members/{member_id}/update-role'
}

export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses = {
  200: SimpleResultResponse
}

export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse
  = PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses[keyof PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses]

export type GetWorkspacesCurrentModelProvidersData = {
  body?: never
  path?: never
  query?: {
    model_type?: 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'
  }
  url: '/workspaces/current/model-providers'
}

export type GetWorkspacesCurrentModelProvidersResponses = {
  200: ModelProviderListResponse
}

export type GetWorkspacesCurrentModelProvidersResponse
  = GetWorkspacesCurrentModelProvidersResponses[keyof GetWorkspacesCurrentModelProvidersResponses]

export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/checkout-url'
}

export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses = {
  200: ModelProviderPaymentCheckoutUrlResponse
}

export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse
  = GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses[keyof GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses]

export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsData = {
  body: ParserCredentialDelete
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/credentials'
}

export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
  204: void
}

export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse
  = DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses]

export type GetWorkspacesCurrentModelProvidersByProviderCredentialsData = {
  body?: never
  path: {
    provider: string
  }
  query?: {
    credential_id?: string
  }
  url: '/workspaces/current/model-providers/{provider}/credentials'
}

export type GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
  200: ProviderCredentialResponse
}

export type GetWorkspacesCurrentModelProvidersByProviderCredentialsResponse
  = GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses]

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsData = {
  body: ParserCredentialCreate
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/credentials'
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
  201: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsResponse
  = PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses]

export type PutWorkspacesCurrentModelProvidersByProviderCredentialsData = {
  body: ParserCredentialUpdate
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/credentials'
}

export type PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
  200: SimpleResultResponse
}

export type PutWorkspacesCurrentModelProvidersByProviderCredentialsResponse
  = PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses]

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchData = {
  body: ParserCredentialSwitch
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/credentials/switch'
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse
  = PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses]

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateData = {
  body: ParserCredentialValidate
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/credentials/validate'
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses = {
  200: ProviderCredentialValidateResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse
  = PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses]

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsData = {
  body: ParserDeleteModels
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models'
}

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses = {
  204: void
}

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponse
  = DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses]

export type GetWorkspacesCurrentModelProvidersByProviderModelsData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models'
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsResponses = {
  200: ModelWithProviderListResponse
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsResponse
  = GetWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsData = {
  body: ParserPostModels
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models'
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsResponses]

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
  body: ParserDeleteCredential
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/credentials'
}

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
  204: void
}

export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
  = DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]

export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
  body?: never
  path: {
    provider: string
  }
  query: {
    config_from?: string
    credential_id?: string
    model: string
    model_type: 'llm' | 'moderation' | 'rerank' | 'speech2text' | 'text-embedding' | 'tts'
  }
  url: '/workspaces/current/model-providers/{provider}/models/credentials'
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
  200: ModelCredentialResponse
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
  = GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
  body: ParserCreateCredential
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/credentials'
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
  201: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]

export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
  body: ParserUpdateCredential
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/credentials'
}

export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
  200: SimpleResultResponse
}

export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
  = PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchData = {
  body: ParserSwitch
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/credentials/switch'
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateData = {
  body: ParserValidate
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/credentials/validate'
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses = {
  200: ModelCredentialValidateResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses]

export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableData = {
  body: ParserDeleteModels
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/disable'
}

export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses = {
  200: SimpleResultResponse
}

export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse
  = PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses[keyof PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses]

export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableData = {
  body: ParserDeleteModels
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/models/enable'
}

export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses = {
  200: SimpleResultResponse
}

export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse
  = PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses[keyof PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateData
  = {
    body: LoadBalancingCredentialPayload
    path: {
      provider: string
    }
    query?: never
    url: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate'
  }

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses
  = {
    200: LoadBalancingCredentialValidateResponse
  }

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses]

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateData
  = {
    body: LoadBalancingCredentialPayload
    path: {
      config_id: string
      provider: string
    }
    query?: never
    url: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate'
  }

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses
  = {
    200: LoadBalancingCredentialValidateResponse
  }

export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse
  = PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses]

export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesData = {
  body?: never
  path: {
    provider: string
  }
  query: {
    model: string
  }
  url: '/workspaces/current/model-providers/{provider}/models/parameter-rules'
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses = {
  200: ModelParameterRulesResponse
}

export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse
  = GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses]

export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeData = {
  body: ParserPreferredProviderType
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/model-providers/{provider}/preferred-provider-type'
}

export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse
  = PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses[keyof PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses]

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

export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponses = {
  200: ProviderWithModelsDataResponse
}

export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponse
  = GetWorkspacesCurrentModelsModelTypesByModelTypeResponses[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeResponses]

export type GetWorkspacesCurrentPermissionData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/permission'
}

export type GetWorkspacesCurrentPermissionResponses = {
  200: WorkspacePermissionResponse
}

export type GetWorkspacesCurrentPermissionResponse
  = GetWorkspacesCurrentPermissionResponses[keyof GetWorkspacesCurrentPermissionResponses]

export type GetWorkspacesCurrentPluginAssetData = {
  body?: never
  path?: never
  query: {
    file_name: string
    plugin_unique_identifier: string
  }
  url: '/workspaces/current/plugin/asset'
}

export type GetWorkspacesCurrentPluginAssetResponses = {
  200: BinaryFileResponse
}

export type GetWorkspacesCurrentPluginAssetResponse
  = GetWorkspacesCurrentPluginAssetResponses[keyof GetWorkspacesCurrentPluginAssetResponses]

export type GetWorkspacesCurrentPluginDebuggingKeyData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/debugging-key'
}

export type GetWorkspacesCurrentPluginDebuggingKeyResponses = {
  200: PluginDebuggingKeyResponse
}

export type GetWorkspacesCurrentPluginDebuggingKeyResponse
  = GetWorkspacesCurrentPluginDebuggingKeyResponses[keyof GetWorkspacesCurrentPluginDebuggingKeyResponses]

export type GetWorkspacesCurrentPluginFetchManifestData = {
  body?: never
  path?: never
  query: {
    plugin_unique_identifier: string
  }
  url: '/workspaces/current/plugin/fetch-manifest'
}

export type GetWorkspacesCurrentPluginFetchManifestResponses = {
  200: PluginManifestResponse
}

export type GetWorkspacesCurrentPluginFetchManifestResponse
  = GetWorkspacesCurrentPluginFetchManifestResponses[keyof GetWorkspacesCurrentPluginFetchManifestResponses]

export type GetWorkspacesCurrentPluginIconData = {
  body?: never
  path?: never
  query: {
    filename: string
    tenant_id: string
  }
  url: '/workspaces/current/plugin/icon'
}

export type GetWorkspacesCurrentPluginIconResponses = {
  200: BinaryFileResponse
}

export type GetWorkspacesCurrentPluginIconResponse
  = GetWorkspacesCurrentPluginIconResponses[keyof GetWorkspacesCurrentPluginIconResponses]

export type PostWorkspacesCurrentPluginInstallGithubData = {
  body: ParserGithubInstall
  path?: never
  query?: never
  url: '/workspaces/current/plugin/install/github'
}

export type PostWorkspacesCurrentPluginInstallGithubResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginInstallGithubResponse
  = PostWorkspacesCurrentPluginInstallGithubResponses[keyof PostWorkspacesCurrentPluginInstallGithubResponses]

export type PostWorkspacesCurrentPluginInstallMarketplaceData = {
  body: ParserPluginIdentifiers
  path?: never
  query?: never
  url: '/workspaces/current/plugin/install/marketplace'
}

export type PostWorkspacesCurrentPluginInstallMarketplaceResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginInstallMarketplaceResponse
  = PostWorkspacesCurrentPluginInstallMarketplaceResponses[keyof PostWorkspacesCurrentPluginInstallMarketplaceResponses]

export type PostWorkspacesCurrentPluginInstallPkgData = {
  body: ParserPluginIdentifiers
  path?: never
  query?: never
  url: '/workspaces/current/plugin/install/pkg'
}

export type PostWorkspacesCurrentPluginInstallPkgResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginInstallPkgResponse
  = PostWorkspacesCurrentPluginInstallPkgResponses[keyof PostWorkspacesCurrentPluginInstallPkgResponses]

export type GetWorkspacesCurrentPluginListData = {
  body?: never
  path?: never
  query?: {
    page?: number
    page_size?: number
  }
  url: '/workspaces/current/plugin/list'
}

export type GetWorkspacesCurrentPluginListResponses = {
  200: PluginListResponse
}

export type GetWorkspacesCurrentPluginListResponse
  = GetWorkspacesCurrentPluginListResponses[keyof GetWorkspacesCurrentPluginListResponses]

export type PostWorkspacesCurrentPluginListInstallationsIdsData = {
  body: ParserLatest
  path?: never
  query?: never
  url: '/workspaces/current/plugin/list/installations/ids'
}

export type PostWorkspacesCurrentPluginListInstallationsIdsResponses = {
  200: PluginInstallationsResponse
}

export type PostWorkspacesCurrentPluginListInstallationsIdsResponse
  = PostWorkspacesCurrentPluginListInstallationsIdsResponses[keyof PostWorkspacesCurrentPluginListInstallationsIdsResponses]

export type PostWorkspacesCurrentPluginListLatestVersionsData = {
  body: ParserLatest
  path?: never
  query?: never
  url: '/workspaces/current/plugin/list/latest-versions'
}

export type PostWorkspacesCurrentPluginListLatestVersionsResponses = {
  200: PluginVersionsResponse
}

export type PostWorkspacesCurrentPluginListLatestVersionsResponse
  = PostWorkspacesCurrentPluginListLatestVersionsResponses[keyof PostWorkspacesCurrentPluginListLatestVersionsResponses]

export type GetWorkspacesCurrentPluginMarketplacePkgData = {
  body?: never
  path?: never
  query: {
    plugin_unique_identifier: string
  }
  url: '/workspaces/current/plugin/marketplace/pkg'
}

export type GetWorkspacesCurrentPluginMarketplacePkgResponses = {
  200: PluginManifestResponse
}

export type GetWorkspacesCurrentPluginMarketplacePkgResponse
  = GetWorkspacesCurrentPluginMarketplacePkgResponses[keyof GetWorkspacesCurrentPluginMarketplacePkgResponses]

export type GetWorkspacesCurrentPluginParametersDynamicOptionsData = {
  body?: never
  path?: never
  query: {
    action: string
    credential_id?: string
    parameter: string
    plugin_id: string
    provider: string
    provider_type: 'tool' | 'trigger'
  }
  url: '/workspaces/current/plugin/parameters/dynamic-options'
}

export type GetWorkspacesCurrentPluginParametersDynamicOptionsResponses = {
  200: PluginDynamicOptionsResponse
}

export type GetWorkspacesCurrentPluginParametersDynamicOptionsResponse
  = GetWorkspacesCurrentPluginParametersDynamicOptionsResponses[keyof GetWorkspacesCurrentPluginParametersDynamicOptionsResponses]

export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsData = {
  body: ParserDynamicOptionsWithCredentials
  path?: never
  query?: never
  url: '/workspaces/current/plugin/parameters/dynamic-options-with-credentials'
}

export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses = {
  200: PluginDynamicOptionsResponse
}

export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse
  = PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses[keyof PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses]

export type PostWorkspacesCurrentPluginPermissionChangeData = {
  body: ParserPermissionChange
  path?: never
  query?: never
  url: '/workspaces/current/plugin/permission/change'
}

export type PostWorkspacesCurrentPluginPermissionChangeResponses = {
  200: SuccessResponse
}

export type PostWorkspacesCurrentPluginPermissionChangeResponse
  = PostWorkspacesCurrentPluginPermissionChangeResponses[keyof PostWorkspacesCurrentPluginPermissionChangeResponses]

export type GetWorkspacesCurrentPluginPermissionFetchData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/permission/fetch'
}

export type GetWorkspacesCurrentPluginPermissionFetchResponses = {
  200: PluginPermissionResponse
}

export type GetWorkspacesCurrentPluginPermissionFetchResponse
  = GetWorkspacesCurrentPluginPermissionFetchResponses[keyof GetWorkspacesCurrentPluginPermissionFetchResponses]

export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeData = {
  body: ParserExcludePlugin
  path?: never
  query?: never
  url: '/workspaces/current/plugin/preferences/autoupgrade/exclude'
}

export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses = {
  200: PluginOperationSuccessResponse
}

export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse
  = PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses[keyof PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses]

export type PostWorkspacesCurrentPluginPreferencesChangeData = {
  body: ParserPreferencesChange
  path?: never
  query?: never
  url: '/workspaces/current/plugin/preferences/change'
}

export type PostWorkspacesCurrentPluginPreferencesChangeResponses = {
  200: PluginOperationSuccessResponse
}

export type PostWorkspacesCurrentPluginPreferencesChangeResponse
  = PostWorkspacesCurrentPluginPreferencesChangeResponses[keyof PostWorkspacesCurrentPluginPreferencesChangeResponses]

export type GetWorkspacesCurrentPluginPreferencesFetchData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/preferences/fetch'
}

export type GetWorkspacesCurrentPluginPreferencesFetchResponses = {
  200: PluginPreferencesResponse
}

export type GetWorkspacesCurrentPluginPreferencesFetchResponse
  = GetWorkspacesCurrentPluginPreferencesFetchResponses[keyof GetWorkspacesCurrentPluginPreferencesFetchResponses]

export type GetWorkspacesCurrentPluginReadmeData = {
  body?: never
  path?: never
  query: {
    language?: string
    plugin_unique_identifier: string
  }
  url: '/workspaces/current/plugin/readme'
}

export type GetWorkspacesCurrentPluginReadmeResponses = {
  200: PluginReadmeResponse
}

export type GetWorkspacesCurrentPluginReadmeResponse
  = GetWorkspacesCurrentPluginReadmeResponses[keyof GetWorkspacesCurrentPluginReadmeResponses]

export type GetWorkspacesCurrentPluginTasksData = {
  body?: never
  path?: never
  query?: {
    page?: number
    page_size?: number
  }
  url: '/workspaces/current/plugin/tasks'
}

export type GetWorkspacesCurrentPluginTasksResponses = {
  200: PluginTasksResponse
}

export type GetWorkspacesCurrentPluginTasksResponse
  = GetWorkspacesCurrentPluginTasksResponses[keyof GetWorkspacesCurrentPluginTasksResponses]

export type PostWorkspacesCurrentPluginTasksDeleteAllData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/tasks/delete_all'
}

export type PostWorkspacesCurrentPluginTasksDeleteAllResponses = {
  200: SuccessResponse
}

export type PostWorkspacesCurrentPluginTasksDeleteAllResponse
  = PostWorkspacesCurrentPluginTasksDeleteAllResponses[keyof PostWorkspacesCurrentPluginTasksDeleteAllResponses]

export type GetWorkspacesCurrentPluginTasksByTaskIdData = {
  body?: never
  path: {
    task_id: string
  }
  query?: never
  url: '/workspaces/current/plugin/tasks/{task_id}'
}

export type GetWorkspacesCurrentPluginTasksByTaskIdResponses = {
  200: PluginTaskResponse
}

export type GetWorkspacesCurrentPluginTasksByTaskIdResponse
  = GetWorkspacesCurrentPluginTasksByTaskIdResponses[keyof GetWorkspacesCurrentPluginTasksByTaskIdResponses]

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteData = {
  body?: never
  path: {
    task_id: string
  }
  query?: never
  url: '/workspaces/current/plugin/tasks/{task_id}/delete'
}

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses = {
  200: SuccessResponse
}

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse
  = PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses[keyof PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses]

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierData = {
  body?: never
  path: {
    identifier: string
    task_id: string
  }
  query?: never
  url: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}'
}

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses = {
  200: SuccessResponse
}

export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse
  = PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses[keyof PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses]

export type PostWorkspacesCurrentPluginUninstallData = {
  body: ParserUninstall
  path?: never
  query?: never
  url: '/workspaces/current/plugin/uninstall'
}

export type PostWorkspacesCurrentPluginUninstallResponses = {
  200: SuccessResponse
}

export type PostWorkspacesCurrentPluginUninstallResponse
  = PostWorkspacesCurrentPluginUninstallResponses[keyof PostWorkspacesCurrentPluginUninstallResponses]

export type PostWorkspacesCurrentPluginUpgradeGithubData = {
  body: ParserGithubUpgrade
  path?: never
  query?: never
  url: '/workspaces/current/plugin/upgrade/github'
}

export type PostWorkspacesCurrentPluginUpgradeGithubResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginUpgradeGithubResponse
  = PostWorkspacesCurrentPluginUpgradeGithubResponses[keyof PostWorkspacesCurrentPluginUpgradeGithubResponses]

export type PostWorkspacesCurrentPluginUpgradeMarketplaceData = {
  body: ParserMarketplaceUpgrade
  path?: never
  query?: never
  url: '/workspaces/current/plugin/upgrade/marketplace'
}

export type PostWorkspacesCurrentPluginUpgradeMarketplaceResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginUpgradeMarketplaceResponse
  = PostWorkspacesCurrentPluginUpgradeMarketplaceResponses[keyof PostWorkspacesCurrentPluginUpgradeMarketplaceResponses]

export type PostWorkspacesCurrentPluginUploadBundleData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/upload/bundle'
}

export type PostWorkspacesCurrentPluginUploadBundleResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginUploadBundleResponse
  = PostWorkspacesCurrentPluginUploadBundleResponses[keyof PostWorkspacesCurrentPluginUploadBundleResponses]

export type PostWorkspacesCurrentPluginUploadGithubData = {
  body: ParserGithubUpload
  path?: never
  query?: never
  url: '/workspaces/current/plugin/upload/github'
}

export type PostWorkspacesCurrentPluginUploadGithubResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginUploadGithubResponse
  = PostWorkspacesCurrentPluginUploadGithubResponses[keyof PostWorkspacesCurrentPluginUploadGithubResponses]

export type PostWorkspacesCurrentPluginUploadPkgData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/plugin/upload/pkg'
}

export type PostWorkspacesCurrentPluginUploadPkgResponses = {
  200: PluginDaemonOperationResponse
}

export type PostWorkspacesCurrentPluginUploadPkgResponse
  = PostWorkspacesCurrentPluginUploadPkgResponses[keyof PostWorkspacesCurrentPluginUploadPkgResponses]

export type GetWorkspacesCurrentToolLabelsData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/tool-labels'
}

export type GetWorkspacesCurrentToolLabelsResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolLabelsResponse
  = GetWorkspacesCurrentToolLabelsResponses[keyof GetWorkspacesCurrentToolLabelsResponses]

export type PostWorkspacesCurrentToolProviderApiAddData = {
  body: ApiToolProviderAddPayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/api/add'
}

export type PostWorkspacesCurrentToolProviderApiAddResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderApiAddResponse
  = PostWorkspacesCurrentToolProviderApiAddResponses[keyof PostWorkspacesCurrentToolProviderApiAddResponses]

export type PostWorkspacesCurrentToolProviderApiDeleteData = {
  body: ApiToolProviderDeletePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/api/delete'
}

export type PostWorkspacesCurrentToolProviderApiDeleteResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderApiDeleteResponse
  = PostWorkspacesCurrentToolProviderApiDeleteResponses[keyof PostWorkspacesCurrentToolProviderApiDeleteResponses]

export type GetWorkspacesCurrentToolProviderApiGetData = {
  body?: never
  path?: never
  query: {
    provider: string
  }
  url: '/workspaces/current/tool-provider/api/get'
}

export type GetWorkspacesCurrentToolProviderApiGetResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderApiGetResponse
  = GetWorkspacesCurrentToolProviderApiGetResponses[keyof GetWorkspacesCurrentToolProviderApiGetResponses]

export type GetWorkspacesCurrentToolProviderApiRemoteData = {
  body?: never
  path?: never
  query: {
    url: string
  }
  url: '/workspaces/current/tool-provider/api/remote'
}

export type GetWorkspacesCurrentToolProviderApiRemoteResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderApiRemoteResponse
  = GetWorkspacesCurrentToolProviderApiRemoteResponses[keyof GetWorkspacesCurrentToolProviderApiRemoteResponses]

export type PostWorkspacesCurrentToolProviderApiSchemaData = {
  body: ApiToolSchemaPayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/api/schema'
}

export type PostWorkspacesCurrentToolProviderApiSchemaResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderApiSchemaResponse
  = PostWorkspacesCurrentToolProviderApiSchemaResponses[keyof PostWorkspacesCurrentToolProviderApiSchemaResponses]

export type PostWorkspacesCurrentToolProviderApiTestPreData = {
  body: ApiToolTestPayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/api/test/pre'
}

export type PostWorkspacesCurrentToolProviderApiTestPreResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderApiTestPreResponse
  = PostWorkspacesCurrentToolProviderApiTestPreResponses[keyof PostWorkspacesCurrentToolProviderApiTestPreResponses]

export type GetWorkspacesCurrentToolProviderApiToolsData = {
  body?: never
  path?: never
  query: {
    provider: string
  }
  url: '/workspaces/current/tool-provider/api/tools'
}

export type GetWorkspacesCurrentToolProviderApiToolsResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderApiToolsResponse
  = GetWorkspacesCurrentToolProviderApiToolsResponses[keyof GetWorkspacesCurrentToolProviderApiToolsResponses]

export type PostWorkspacesCurrentToolProviderApiUpdateData = {
  body: ApiToolProviderUpdatePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/api/update'
}

export type PostWorkspacesCurrentToolProviderApiUpdateResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderApiUpdateResponse
  = PostWorkspacesCurrentToolProviderApiUpdateResponses[keyof PostWorkspacesCurrentToolProviderApiUpdateResponses]

export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddData = {
  body: BuiltinToolAddPayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/add'
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse
  = PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoData = {
  body?: never
  path: {
    provider: string
  }
  query?: {
    include_credential_ids?: Array<string>
  }
  url: '/workspaces/current/tool-provider/builtin/{provider}/credential/info'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeData
  = {
    body?: never
    path: {
      credential_type: string
      provider: string
    }
    query?: never
    url: '/workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}'
  }

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses
  = {
    200: ToolProviderOpaqueResponse
  }

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsData = {
  body?: never
  path: {
    provider: string
  }
  query?: {
    include_credential_ids?: Array<string>
  }
  url: '/workspaces/current/tool-provider/builtin/{provider}/credentials'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses]

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialData = {
  body: BuiltinProviderDefaultCredentialPayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/default-credential'
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse
  = PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses]

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteData = {
  body: BuiltinToolCredentialDeletePayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/delete'
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse
  = PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/icon'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses = {
  200: BinaryFileResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/info'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses = {
  200: ToolOAuthClientSchemaResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses]

export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
}

export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
  200: SimpleResultResponse
}

export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
  = DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
  200: ToolOAuthCustomClientResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]

export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
  body: ToolOAuthCustomClientPayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
  = PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]

export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/tools'
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse
  = GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses]

export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateData = {
  body: BuiltinToolUpdatePayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/builtin/{provider}/update'
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse
  = PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses]

export type DeleteWorkspacesCurrentToolProviderMcpData = {
  body: McpProviderDeletePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/mcp'
}

export type DeleteWorkspacesCurrentToolProviderMcpResponses = {
  200: SimpleResultResponse
}

export type DeleteWorkspacesCurrentToolProviderMcpResponse
  = DeleteWorkspacesCurrentToolProviderMcpResponses[keyof DeleteWorkspacesCurrentToolProviderMcpResponses]

export type PostWorkspacesCurrentToolProviderMcpData = {
  body: McpProviderCreatePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/mcp'
}

export type PostWorkspacesCurrentToolProviderMcpResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderMcpResponse
  = PostWorkspacesCurrentToolProviderMcpResponses[keyof PostWorkspacesCurrentToolProviderMcpResponses]

export type PutWorkspacesCurrentToolProviderMcpData = {
  body: McpProviderUpdatePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/mcp'
}

export type PutWorkspacesCurrentToolProviderMcpResponses = {
  200: SimpleResultResponse
}

export type PutWorkspacesCurrentToolProviderMcpResponse
  = PutWorkspacesCurrentToolProviderMcpResponses[keyof PutWorkspacesCurrentToolProviderMcpResponses]

export type PostWorkspacesCurrentToolProviderMcpAuthData = {
  body: McpAuthPayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/mcp/auth'
}

export type PostWorkspacesCurrentToolProviderMcpAuthResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderMcpAuthResponse
  = PostWorkspacesCurrentToolProviderMcpAuthResponses[keyof PostWorkspacesCurrentToolProviderMcpAuthResponses]

export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdData = {
  body?: never
  path: {
    provider_id: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/mcp/tools/{provider_id}'
}

export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse
  = GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses[keyof GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses]

export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdData = {
  body?: never
  path: {
    provider_id: string
  }
  query?: never
  url: '/workspaces/current/tool-provider/mcp/update/{provider_id}'
}

export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse
  = GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses[keyof GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses]

export type PostWorkspacesCurrentToolProviderWorkflowCreateData = {
  body: WorkflowToolCreatePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/workflow/create'
}

export type PostWorkspacesCurrentToolProviderWorkflowCreateResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderWorkflowCreateResponse
  = PostWorkspacesCurrentToolProviderWorkflowCreateResponses[keyof PostWorkspacesCurrentToolProviderWorkflowCreateResponses]

export type PostWorkspacesCurrentToolProviderWorkflowDeleteData = {
  body: WorkflowToolDeletePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/workflow/delete'
}

export type PostWorkspacesCurrentToolProviderWorkflowDeleteResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderWorkflowDeleteResponse
  = PostWorkspacesCurrentToolProviderWorkflowDeleteResponses[keyof PostWorkspacesCurrentToolProviderWorkflowDeleteResponses]

export type GetWorkspacesCurrentToolProviderWorkflowGetData = {
  body?: never
  path?: never
  query?: {
    workflow_app_id?: string
    workflow_tool_id?: string
  }
  url: '/workspaces/current/tool-provider/workflow/get'
}

export type GetWorkspacesCurrentToolProviderWorkflowGetResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderWorkflowGetResponse
  = GetWorkspacesCurrentToolProviderWorkflowGetResponses[keyof GetWorkspacesCurrentToolProviderWorkflowGetResponses]

export type GetWorkspacesCurrentToolProviderWorkflowToolsData = {
  body?: never
  path?: never
  query: {
    workflow_tool_id: string
  }
  url: '/workspaces/current/tool-provider/workflow/tools'
}

export type GetWorkspacesCurrentToolProviderWorkflowToolsResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProviderWorkflowToolsResponse
  = GetWorkspacesCurrentToolProviderWorkflowToolsResponses[keyof GetWorkspacesCurrentToolProviderWorkflowToolsResponses]

export type PostWorkspacesCurrentToolProviderWorkflowUpdateData = {
  body: WorkflowToolUpdatePayload
  path?: never
  query?: never
  url: '/workspaces/current/tool-provider/workflow/update'
}

export type PostWorkspacesCurrentToolProviderWorkflowUpdateResponses = {
  200: ToolProviderOpaqueResponse
}

export type PostWorkspacesCurrentToolProviderWorkflowUpdateResponse
  = PostWorkspacesCurrentToolProviderWorkflowUpdateResponses[keyof PostWorkspacesCurrentToolProviderWorkflowUpdateResponses]

export type GetWorkspacesCurrentToolProvidersData = {
  body?: never
  path?: never
  query?: {
    type?: 'api' | 'builtin' | 'mcp' | 'model' | 'workflow'
  }
  url: '/workspaces/current/tool-providers'
}

export type GetWorkspacesCurrentToolProvidersResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolProvidersResponse
  = GetWorkspacesCurrentToolProvidersResponses[keyof GetWorkspacesCurrentToolProvidersResponses]

export type GetWorkspacesCurrentToolsApiData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/tools/api'
}

export type GetWorkspacesCurrentToolsApiResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolsApiResponse
  = GetWorkspacesCurrentToolsApiResponses[keyof GetWorkspacesCurrentToolsApiResponses]

export type GetWorkspacesCurrentToolsBuiltinData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/tools/builtin'
}

export type GetWorkspacesCurrentToolsBuiltinResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolsBuiltinResponse
  = GetWorkspacesCurrentToolsBuiltinResponses[keyof GetWorkspacesCurrentToolsBuiltinResponses]

export type GetWorkspacesCurrentToolsMcpData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/tools/mcp'
}

export type GetWorkspacesCurrentToolsMcpResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolsMcpResponse
  = GetWorkspacesCurrentToolsMcpResponses[keyof GetWorkspacesCurrentToolsMcpResponses]

export type GetWorkspacesCurrentToolsWorkflowData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/tools/workflow'
}

export type GetWorkspacesCurrentToolsWorkflowResponses = {
  200: ToolProviderOpaqueResponse
}

export type GetWorkspacesCurrentToolsWorkflowResponse
  = GetWorkspacesCurrentToolsWorkflowResponses[keyof GetWorkspacesCurrentToolsWorkflowResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderIconData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/icon'
}

export type GetWorkspacesCurrentTriggerProviderByProviderIconResponses = {
  200: BinaryFileResponse
}

export type GetWorkspacesCurrentTriggerProviderByProviderIconResponse
  = GetWorkspacesCurrentTriggerProviderByProviderIconResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderIconResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderInfoData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/info'
}

export type GetWorkspacesCurrentTriggerProviderByProviderInfoResponses = {
  200: TriggerProviderOpaqueResponse
}

export type GetWorkspacesCurrentTriggerProviderByProviderInfoResponse
  = GetWorkspacesCurrentTriggerProviderByProviderInfoResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderInfoResponses]

export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
}

export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
  200: SimpleResultResponse
}

export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
  = DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
}

export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
  200: TriggerOAuthClientResponse
}

export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
  = GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
  body: TriggerOAuthClientPayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
}

export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
  = PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdData
  = {
    body: TriggerSubscriptionBuilderUpdatePayload
    path: {
      provider: string
      subscription_builder_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}'
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse
  = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateData = {
  body: TriggerSubscriptionBuilderCreatePayload
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/create'
}

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses = {
  200: TriggerProviderOpaqueResponse
}

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse
  = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdData
  = {
    body?: never
    path: {
      provider: string
      subscription_builder_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}'
  }

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse
  = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdData
  = {
    body: TriggerSubscriptionBuilderUpdatePayload
    path: {
      provider: string
      subscription_builder_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}'
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse
  = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdData
  = {
    body: TriggerSubscriptionBuilderVerifyPayload
    path: {
      provider: string
      subscription_builder_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}'
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse
  = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdData
  = {
    body?: never
    path: {
      provider: string
      subscription_builder_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}'
  }

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse
  = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/subscriptions/list'
}

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses = {
  200: TriggerProviderOpaqueResponse
}

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse
  = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses]

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeData = {
  body?: never
  path: {
    provider: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize'
}

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses = {
  200: TriggerOAuthAuthorizeResponse
}

export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse
  = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses]

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdData
  = {
    body: TriggerSubscriptionBuilderVerifyPayload
    path: {
      provider: string
      subscription_id: string
    }
    query?: never
    url: '/workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}'
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses
  = {
    200: TriggerProviderOpaqueResponse
  }

export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse
  = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses]

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteData = {
  body?: never
  path: {
    subscription_id: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete'
}

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses = {
  200: SimpleResultResponse
}

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse
  = PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses[keyof PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses]

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateData = {
  body: TriggerSubscriptionBuilderUpdatePayload
  path: {
    subscription_id: string
  }
  query?: never
  url: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/update'
}

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses = {
  200: TriggerProviderOpaqueResponse
}

export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse
  = PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses[keyof PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses]

export type GetWorkspacesCurrentTriggersData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/current/triggers'
}

export type GetWorkspacesCurrentTriggersResponses = {
  200: TriggerProviderOpaqueResponse
}

export type GetWorkspacesCurrentTriggersResponse
  = GetWorkspacesCurrentTriggersResponses[keyof GetWorkspacesCurrentTriggersResponses]

export type PostWorkspacesCustomConfigData = {
  body: WorkspaceCustomConfigPayload
  path?: never
  query?: never
  url: '/workspaces/custom-config'
}

export type PostWorkspacesCustomConfigResponses = {
  200: WorkspaceMutationResponse
}

export type PostWorkspacesCustomConfigResponse
  = PostWorkspacesCustomConfigResponses[keyof PostWorkspacesCustomConfigResponses]

export type PostWorkspacesCustomConfigWebappLogoUploadData = {
  body?: never
  path?: never
  query?: never
  url: '/workspaces/custom-config/webapp-logo/upload'
}

export type PostWorkspacesCustomConfigWebappLogoUploadResponses = {
  201: WorkspaceLogoUploadResponse
}

export type PostWorkspacesCustomConfigWebappLogoUploadResponse
  = PostWorkspacesCustomConfigWebappLogoUploadResponses[keyof PostWorkspacesCustomConfigWebappLogoUploadResponses]

export type PostWorkspacesInfoData = {
  body: WorkspaceInfoPayload
  path?: never
  query?: never
  url: '/workspaces/info'
}

export type PostWorkspacesInfoResponses = {
  200: WorkspaceMutationResponse
}

export type PostWorkspacesInfoResponse
  = PostWorkspacesInfoResponses[keyof PostWorkspacesInfoResponses]

export type PostWorkspacesSwitchData = {
  body: SwitchWorkspacePayload
  path?: never
  query?: never
  url: '/workspaces/switch'
}

export type PostWorkspacesSwitchResponses = {
  200: SwitchWorkspaceResponse
}

export type PostWorkspacesSwitchResponse
  = PostWorkspacesSwitchResponses[keyof PostWorkspacesSwitchResponses]

export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangData = {
  body?: never
  path: {
    icon_type: string
    lang: string
    provider: string
    tenant_id: string
  }
  query?: never
  url: '/workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}'
}

export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses = {
  200: BinaryFileResponse
}

export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse
  = GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses[keyof GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses]
