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

import { oc } from '@orpc/contract'
import * as z from 'zod'

import {
  zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zDeleteWorkspacesCurrentEndpointsByIdPath,
  zDeleteWorkspacesCurrentEndpointsByIdResponse,
  zDeleteWorkspacesCurrentMembersByMemberIdPath,
  zDeleteWorkspacesCurrentMembersByMemberIdResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zDeleteWorkspacesCurrentToolProviderMcpBody,
  zDeleteWorkspacesCurrentToolProviderMcpResponse,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse,
  zGetWorkspacesCurrentAgentProviderByProviderNamePath,
  zGetWorkspacesCurrentAgentProviderByProviderNameResponse,
  zGetWorkspacesCurrentAgentProvidersResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportQuery,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zGetWorkspacesCurrentCustomizedSnippetsQuery,
  zGetWorkspacesCurrentCustomizedSnippetsResponse,
  zGetWorkspacesCurrentDatasetOperatorsResponse,
  zGetWorkspacesCurrentDefaultModelQuery,
  zGetWorkspacesCurrentDefaultModelResponse,
  zGetWorkspacesCurrentEndpointsListPluginQuery,
  zGetWorkspacesCurrentEndpointsListPluginResponse,
  zGetWorkspacesCurrentEndpointsListQuery,
  zGetWorkspacesCurrentEndpointsListResponse,
  zGetWorkspacesCurrentMembersResponse,
  zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath,
  zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zGetWorkspacesCurrentModelProvidersQuery,
  zGetWorkspacesCurrentModelProvidersResponse,
  zGetWorkspacesCurrentModelsModelTypesByModelTypePath,
  zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse,
  zGetWorkspacesCurrentPermissionResponse,
  zGetWorkspacesCurrentPluginAssetQuery,
  zGetWorkspacesCurrentPluginAssetResponse,
  zGetWorkspacesCurrentPluginDebuggingKeyResponse,
  zGetWorkspacesCurrentPluginFetchManifestQuery,
  zGetWorkspacesCurrentPluginFetchManifestResponse,
  zGetWorkspacesCurrentPluginIconQuery,
  zGetWorkspacesCurrentPluginIconResponse,
  zGetWorkspacesCurrentPluginListQuery,
  zGetWorkspacesCurrentPluginListResponse,
  zGetWorkspacesCurrentPluginMarketplacePkgQuery,
  zGetWorkspacesCurrentPluginMarketplacePkgResponse,
  zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery,
  zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse,
  zGetWorkspacesCurrentPluginPermissionFetchResponse,
  zGetWorkspacesCurrentPluginPreferencesFetchResponse,
  zGetWorkspacesCurrentPluginReadmeQuery,
  zGetWorkspacesCurrentPluginReadmeResponse,
  zGetWorkspacesCurrentPluginTasksByTaskIdPath,
  zGetWorkspacesCurrentPluginTasksByTaskIdResponse,
  zGetWorkspacesCurrentPluginTasksQuery,
  zGetWorkspacesCurrentPluginTasksResponse,
  zGetWorkspacesCurrentToolLabelsResponse,
  zGetWorkspacesCurrentToolProviderApiGetQuery,
  zGetWorkspacesCurrentToolProviderApiGetResponse,
  zGetWorkspacesCurrentToolProviderApiRemoteQuery,
  zGetWorkspacesCurrentToolProviderApiRemoteResponse,
  zGetWorkspacesCurrentToolProviderApiToolsQuery,
  zGetWorkspacesCurrentToolProviderApiToolsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoQuery,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsQuery,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse,
  zGetWorkspacesCurrentToolProvidersQuery,
  zGetWorkspacesCurrentToolProvidersResponse,
  zGetWorkspacesCurrentToolProviderWorkflowGetQuery,
  zGetWorkspacesCurrentToolProviderWorkflowGetResponse,
  zGetWorkspacesCurrentToolProviderWorkflowToolsQuery,
  zGetWorkspacesCurrentToolProviderWorkflowToolsResponse,
  zGetWorkspacesCurrentToolsApiResponse,
  zGetWorkspacesCurrentToolsBuiltinResponse,
  zGetWorkspacesCurrentToolsMcpResponse,
  zGetWorkspacesCurrentToolsWorkflowResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderIconPath,
  zGetWorkspacesCurrentTriggerProviderByProviderIconResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoPath,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse,
  zGetWorkspacesCurrentTriggersResponse,
  zGetWorkspacesResponse,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zPatchWorkspacesCurrentEndpointsByIdBody,
  zPatchWorkspacesCurrentEndpointsByIdPath,
  zPatchWorkspacesCurrentEndpointsByIdResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse,
  zPostWorkspacesCurrentCustomizedSnippetsBody,
  zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath,
  zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse,
  zPostWorkspacesCurrentCustomizedSnippetsImportsBody,
  zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath,
  zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse,
  zPostWorkspacesCurrentCustomizedSnippetsImportsResponse,
  zPostWorkspacesCurrentCustomizedSnippetsResponse,
  zPostWorkspacesCurrentDefaultModelBody,
  zPostWorkspacesCurrentDefaultModelResponse,
  zPostWorkspacesCurrentEndpointsBody,
  zPostWorkspacesCurrentEndpointsCreateBody,
  zPostWorkspacesCurrentEndpointsCreateResponse,
  zPostWorkspacesCurrentEndpointsDeleteBody,
  zPostWorkspacesCurrentEndpointsDeleteResponse,
  zPostWorkspacesCurrentEndpointsDisableBody,
  zPostWorkspacesCurrentEndpointsDisableResponse,
  zPostWorkspacesCurrentEndpointsEnableBody,
  zPostWorkspacesCurrentEndpointsEnableResponse,
  zPostWorkspacesCurrentEndpointsResponse,
  zPostWorkspacesCurrentEndpointsUpdateBody,
  zPostWorkspacesCurrentEndpointsUpdateResponse,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse,
  zPostWorkspacesCurrentMembersInviteEmailBody,
  zPostWorkspacesCurrentMembersInviteEmailResponse,
  zPostWorkspacesCurrentMembersOwnerTransferCheckBody,
  zPostWorkspacesCurrentMembersOwnerTransferCheckResponse,
  zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody,
  zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse,
  zPostWorkspacesCurrentPluginInstallGithubBody,
  zPostWorkspacesCurrentPluginInstallGithubResponse,
  zPostWorkspacesCurrentPluginInstallMarketplaceBody,
  zPostWorkspacesCurrentPluginInstallMarketplaceResponse,
  zPostWorkspacesCurrentPluginInstallPkgBody,
  zPostWorkspacesCurrentPluginInstallPkgResponse,
  zPostWorkspacesCurrentPluginListInstallationsIdsBody,
  zPostWorkspacesCurrentPluginListInstallationsIdsResponse,
  zPostWorkspacesCurrentPluginListLatestVersionsBody,
  zPostWorkspacesCurrentPluginListLatestVersionsResponse,
  zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody,
  zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse,
  zPostWorkspacesCurrentPluginPermissionChangeBody,
  zPostWorkspacesCurrentPluginPermissionChangeResponse,
  zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody,
  zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse,
  zPostWorkspacesCurrentPluginPreferencesChangeBody,
  zPostWorkspacesCurrentPluginPreferencesChangeResponse,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse,
  zPostWorkspacesCurrentPluginTasksDeleteAllResponse,
  zPostWorkspacesCurrentPluginUninstallBody,
  zPostWorkspacesCurrentPluginUninstallResponse,
  zPostWorkspacesCurrentPluginUpgradeGithubBody,
  zPostWorkspacesCurrentPluginUpgradeGithubResponse,
  zPostWorkspacesCurrentPluginUpgradeMarketplaceBody,
  zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse,
  zPostWorkspacesCurrentPluginUploadBundleResponse,
  zPostWorkspacesCurrentPluginUploadGithubBody,
  zPostWorkspacesCurrentPluginUploadGithubResponse,
  zPostWorkspacesCurrentPluginUploadPkgResponse,
  zPostWorkspacesCurrentResponse,
  zPostWorkspacesCurrentToolProviderApiAddBody,
  zPostWorkspacesCurrentToolProviderApiAddResponse,
  zPostWorkspacesCurrentToolProviderApiDeleteBody,
  zPostWorkspacesCurrentToolProviderApiDeleteResponse,
  zPostWorkspacesCurrentToolProviderApiSchemaBody,
  zPostWorkspacesCurrentToolProviderApiSchemaResponse,
  zPostWorkspacesCurrentToolProviderApiTestPreBody,
  zPostWorkspacesCurrentToolProviderApiTestPreResponse,
  zPostWorkspacesCurrentToolProviderApiUpdateBody,
  zPostWorkspacesCurrentToolProviderApiUpdateResponse,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderAddBody,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderAddPath,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialBody,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialPath,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteBody,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDeletePath,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientBody,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateBody,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdatePath,
  zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse,
  zPostWorkspacesCurrentToolProviderMcpAuthBody,
  zPostWorkspacesCurrentToolProviderMcpAuthResponse,
  zPostWorkspacesCurrentToolProviderMcpBody,
  zPostWorkspacesCurrentToolProviderMcpResponse,
  zPostWorkspacesCurrentToolProviderWorkflowCreateBody,
  zPostWorkspacesCurrentToolProviderWorkflowCreateResponse,
  zPostWorkspacesCurrentToolProviderWorkflowDeleteBody,
  zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse,
  zPostWorkspacesCurrentToolProviderWorkflowUpdateBody,
  zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderOauthClientBody,
  zPostWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdBody,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdPath,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateBody,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreatePath,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdBody,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdPath,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdBody,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdPath,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdBody,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdPath,
  zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse,
  zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeletePath,
  zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse,
  zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateBody,
  zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdatePath,
  zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse,
  zPostWorkspacesCustomConfigBody,
  zPostWorkspacesCustomConfigResponse,
  zPostWorkspacesCustomConfigWebappLogoUploadResponse,
  zPostWorkspacesInfoBody,
  zPostWorkspacesInfoResponse,
  zPostWorkspacesSwitchBody,
  zPostWorkspacesSwitchResponse,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zPutWorkspacesCurrentToolProviderMcpBody,
  zPutWorkspacesCurrentToolProviderMcpResponse,
} from './zod.gen'

/**
 * Get specific agent provider details
 */
export const get = oc
  .route({
    description: 'Get specific agent provider details',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentAgentProviderByProviderName',
    path: '/workspaces/current/agent-provider/{provider_name}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentAgentProviderByProviderNamePath }))
  .output(zGetWorkspacesCurrentAgentProviderByProviderNameResponse)

export const byProviderName = {
  get,
}

export const agentProvider = {
  byProviderName,
}

/**
 * Get list of available agent providers
 */
export const get2 = oc
  .route({
    description: 'Get list of available agent providers',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentAgentProviders',
    path: '/workspaces/current/agent-providers',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentAgentProvidersResponse)

export const agentProviders = {
  get: get2,
}

/**
 * Confirm a pending snippet import
 *
 * Confirm a pending snippet import
 */
export const post = oc
  .route({
    description: 'Confirm a pending snippet import',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirm',
    path: '/workspaces/current/customized-snippets/imports/{import_id}/confirm',
    summary: 'Confirm a pending snippet import',
    tags: ['console'],
  })
  .input(z.object({ params: zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath }))
  .output(zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse)

export const confirm = {
  post,
}

export const byImportId = {
  confirm,
}

/**
 * Import snippet from DSL
 *
 * Import snippet from DSL
 */
export const post2 = oc
  .route({
    description: 'Import snippet from DSL',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentCustomizedSnippetsImports',
    path: '/workspaces/current/customized-snippets/imports',
    summary: 'Import snippet from DSL',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentCustomizedSnippetsImportsBody }))
  .output(zPostWorkspacesCurrentCustomizedSnippetsImportsResponse)

export const imports = {
  post: post2,
  byImportId,
}

/**
 * Check dependencies for a snippet
 *
 * Check dependencies for a snippet
 */
export const get3 = oc
  .route({
    description: 'Check dependencies for a snippet',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependencies',
    path: '/workspaces/current/customized-snippets/{snippet_id}/check-dependencies',
    summary: 'Check dependencies for a snippet',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath }),
  )
  .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse)

export const checkDependencies = {
  get: get3,
}

/**
 * Export snippet as DSL
 *
 * Export snippet configuration as DSL
 */
export const get4 = oc
  .route({
    description: 'Export snippet configuration as DSL',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetIdExport',
    path: '/workspaces/current/customized-snippets/{snippet_id}/export',
    summary: 'Export snippet as DSL',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath,
      query: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse)

export const export_ = {
  get: get4,
}

/**
 * Increment snippet use count when it is inserted into a workflow
 *
 * Increment snippet use count by 1
 */
export const post3 = oc
  .route({
    description: 'Increment snippet use count by 1',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrement',
    path: '/workspaces/current/customized-snippets/{snippet_id}/use-count/increment',
    summary: 'Increment snippet use count when it is inserted into a workflow',
    tags: ['console'],
  })
  .input(
    z.object({ params: zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath }),
  )
  .output(zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse)

export const increment = {
  post: post3,
}

export const useCount = {
  increment,
}

/**
 * Delete customized snippet
 */
export const delete_ = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentCustomizedSnippetsBySnippetId',
    path: '/workspaces/current/customized-snippets/{snippet_id}',
    successStatus: 204,
    summary: 'Delete customized snippet',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath }))
  .output(zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse)

/**
 * Get customized snippet details
 */
export const get5 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentCustomizedSnippetsBySnippetId',
    path: '/workspaces/current/customized-snippets/{snippet_id}',
    summary: 'Get customized snippet details',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath }))
  .output(zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse)

/**
 * Update customized snippet
 */
export const patch = oc
  .route({
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchWorkspacesCurrentCustomizedSnippetsBySnippetId',
    path: '/workspaces/current/customized-snippets/{snippet_id}',
    summary: 'Update customized snippet',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody,
      params: zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
    }),
  )
  .output(zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse)

export const bySnippetId = {
  delete: delete_,
  get: get5,
  patch,
  checkDependencies,
  export: export_,
  useCount,
}

/**
 * List customized snippets with pagination and search
 */
export const get6 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentCustomizedSnippets',
    path: '/workspaces/current/customized-snippets',
    summary: 'List customized snippets with pagination and search',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentCustomizedSnippetsQuery.optional() }))
  .output(zGetWorkspacesCurrentCustomizedSnippetsResponse)

/**
 * Create a new customized snippet
 */
export const post4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentCustomizedSnippets',
    path: '/workspaces/current/customized-snippets',
    successStatus: 201,
    summary: 'Create a new customized snippet',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentCustomizedSnippetsBody }))
  .output(zPostWorkspacesCurrentCustomizedSnippetsResponse)

export const customizedSnippets = {
  get: get6,
  post: post4,
  imports,
  bySnippetId,
}

export const get7 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentDatasetOperators',
    path: '/workspaces/current/dataset-operators',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentDatasetOperatorsResponse)

export const datasetOperators = {
  get: get7,
}

export const get8 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentDefaultModel',
    path: '/workspaces/current/default-model',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentDefaultModelQuery }))
  .output(zGetWorkspacesCurrentDefaultModelResponse)

export const post5 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentDefaultModel',
    path: '/workspaces/current/default-model',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentDefaultModelBody }))
  .output(zPostWorkspacesCurrentDefaultModelResponse)

export const defaultModel = {
  get: get8,
  post: post5,
}

/**
 * Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.
 *
 * @deprecated
 */
export const post6 = oc
  .route({
    deprecated: true,
    description:
      'Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpointsCreate',
    path: '/workspaces/current/endpoints/create',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsCreateBody }))
  .output(zPostWorkspacesCurrentEndpointsCreateResponse)

export const create = {
  post: post6,
}

/**
 * Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.
 *
 * @deprecated
 */
export const post7 = oc
  .route({
    deprecated: true,
    description:
      'Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpointsDelete',
    path: '/workspaces/current/endpoints/delete',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsDeleteBody }))
  .output(zPostWorkspacesCurrentEndpointsDeleteResponse)

export const delete2 = {
  post: post7,
}

/**
 * Disable a plugin endpoint
 */
export const post8 = oc
  .route({
    description: 'Disable a plugin endpoint',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpointsDisable',
    path: '/workspaces/current/endpoints/disable',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsDisableBody }))
  .output(zPostWorkspacesCurrentEndpointsDisableResponse)

export const disable = {
  post: post8,
}

/**
 * Enable a plugin endpoint
 */
export const post9 = oc
  .route({
    description: 'Enable a plugin endpoint',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpointsEnable',
    path: '/workspaces/current/endpoints/enable',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsEnableBody }))
  .output(zPostWorkspacesCurrentEndpointsEnableResponse)

export const enable = {
  post: post9,
}

/**
 * List endpoints for a specific plugin
 */
export const get9 = oc
  .route({
    description: 'List endpoints for a specific plugin',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentEndpointsListPlugin',
    path: '/workspaces/current/endpoints/list/plugin',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentEndpointsListPluginQuery }))
  .output(zGetWorkspacesCurrentEndpointsListPluginResponse)

export const plugin = {
  get: get9,
}

/**
 * List plugin endpoints with pagination
 */
export const get10 = oc
  .route({
    description: 'List plugin endpoints with pagination',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentEndpointsList',
    path: '/workspaces/current/endpoints/list',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentEndpointsListQuery }))
  .output(zGetWorkspacesCurrentEndpointsListResponse)

export const list = {
  get: get10,
  plugin,
}

/**
 * Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.
 *
 * @deprecated
 */
export const post10 = oc
  .route({
    deprecated: true,
    description:
      'Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpointsUpdate',
    path: '/workspaces/current/endpoints/update',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsUpdateBody }))
  .output(zPostWorkspacesCurrentEndpointsUpdateResponse)

export const update = {
  post: post10,
}

/**
 * Delete a plugin endpoint
 */
export const delete3 = oc
  .route({
    description: 'Delete a plugin endpoint',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentEndpointsById',
    path: '/workspaces/current/endpoints/{id}',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentEndpointsByIdPath }))
  .output(zDeleteWorkspacesCurrentEndpointsByIdResponse)

/**
 * Update a plugin endpoint
 */
export const patch2 = oc
  .route({
    description: 'Update a plugin endpoint',
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchWorkspacesCurrentEndpointsById',
    path: '/workspaces/current/endpoints/{id}',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchWorkspacesCurrentEndpointsByIdBody,
      params: zPatchWorkspacesCurrentEndpointsByIdPath,
    }),
  )
  .output(zPatchWorkspacesCurrentEndpointsByIdResponse)

export const byId = {
  delete: delete3,
  patch: patch2,
}

/**
 * Create a new plugin endpoint
 */
export const post11 = oc
  .route({
    description: 'Create a new plugin endpoint',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentEndpoints',
    path: '/workspaces/current/endpoints',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentEndpointsBody }))
  .output(zPostWorkspacesCurrentEndpointsResponse)

export const endpoints = {
  post: post11,
  create,
  delete: delete2,
  disable,
  enable,
  list,
  update,
  byId,
}

export const post12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentMembersInviteEmail',
    path: '/workspaces/current/members/invite-email',
    successStatus: 201,
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentMembersInviteEmailBody }))
  .output(zPostWorkspacesCurrentMembersInviteEmailResponse)

export const inviteEmail = {
  post: post12,
}

export const post13 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentMembersOwnerTransferCheck',
    path: '/workspaces/current/members/owner-transfer-check',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentMembersOwnerTransferCheckBody }))
  .output(zPostWorkspacesCurrentMembersOwnerTransferCheckResponse)

export const ownerTransferCheck = {
  post: post13,
}

export const post14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentMembersSendOwnerTransferConfirmEmail',
    path: '/workspaces/current/members/send-owner-transfer-confirm-email',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody }))
  .output(zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse)

export const sendOwnerTransferConfirmEmail = {
  post: post14,
}

export const post15 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentMembersByMemberIdOwnerTransfer',
    path: '/workspaces/current/members/{member_id}/owner-transfer',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody,
      params: zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath,
    }),
  )
  .output(zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse)

export const ownerTransfer = {
  post: post15,
}

export const put = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentMembersByMemberIdUpdateRole',
    path: '/workspaces/current/members/{member_id}/update-role',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody,
      params: zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath,
    }),
  )
  .output(zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse)

export const updateRole = {
  put,
}

export const delete4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentMembersByMemberId',
    path: '/workspaces/current/members/{member_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentMembersByMemberIdPath }))
  .output(zDeleteWorkspacesCurrentMembersByMemberIdResponse)

export const byMemberId = {
  delete: delete4,
  ownerTransfer,
  updateRole,
}

export const get11 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentMembers',
    path: '/workspaces/current/members',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentMembersResponse)

export const members = {
  get: get11,
  inviteEmail,
  ownerTransferCheck,
  sendOwnerTransferConfirmEmail,
  byMemberId,
}

export const get12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProvidersByProviderCheckoutUrl',
    path: '/workspaces/current/model-providers/{provider}/checkout-url',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath }))
  .output(zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse)

export const checkoutUrl = {
  get: get12,
}

export const post16 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentialsSwitch',
    path: '/workspaces/current/model-providers/{provider}/credentials/switch',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse)

export const switch_ = {
  post: post16,
}

export const post17 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentialsValidate',
    path: '/workspaces/current/model-providers/{provider}/credentials/validate',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse)

export const validate = {
  post: post17,
}

export const delete5 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentModelProvidersByProviderCredentials',
    path: '/workspaces/current/model-providers/{provider}/credentials',
    successStatus: 204,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
      params: zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
    }),
  )
  .output(zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse)

export const get13 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProvidersByProviderCredentials',
    path: '/workspaces/current/model-providers/{provider}/credentials',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath,
      query: zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse)

export const post18 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentials',
    path: '/workspaces/current/model-providers/{provider}/credentials',
    successStatus: 201,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse)

export const put2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentModelProvidersByProviderCredentials',
    path: '/workspaces/current/model-providers/{provider}/credentials',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody,
      params: zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath,
    }),
  )
  .output(zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse)

export const credentials = {
  delete: delete5,
  get: get13,
  post: post18,
  put: put2,
  switch: switch_,
  validate,
}

export const post19 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitch',
    path: '/workspaces/current/model-providers/{provider}/models/credentials/switch',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse)

export const switch2 = {
  post: post19,
}

export const post20 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidate',
    path: '/workspaces/current/model-providers/{provider}/models/credentials/validate',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse)

export const validate2 = {
  post: post20,
}

export const delete6 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentModelProvidersByProviderModelsCredentials',
    path: '/workspaces/current/model-providers/{provider}/models/credentials',
    successStatus: 204,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
      params: zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
    }),
  )
  .output(zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)

export const get14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProvidersByProviderModelsCredentials',
    path: '/workspaces/current/model-providers/{provider}/models/credentials',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
      query: zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery,
    }),
  )
  .output(zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)

export const post21 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentials',
    path: '/workspaces/current/model-providers/{provider}/models/credentials',
    successStatus: 201,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)

export const put3 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentModelProvidersByProviderModelsCredentials',
    path: '/workspaces/current/model-providers/{provider}/models/credentials',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
      params: zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
    }),
  )
  .output(zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)

export const credentials2 = {
  delete: delete6,
  get: get14,
  post: post21,
  put: put3,
  switch: switch2,
  validate: validate2,
}

export const patch3 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchWorkspacesCurrentModelProvidersByProviderModelsDisable',
    path: '/workspaces/current/model-providers/{provider}/models/disable',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
      params: zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
    }),
  )
  .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse)

export const disable2 = {
  patch: patch3,
}

export const patch4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchWorkspacesCurrentModelProvidersByProviderModelsEnable',
    path: '/workspaces/current/model-providers/{provider}/models/enable',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
      params: zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
    }),
  )
  .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse)

export const enable2 = {
  patch: patch4,
}

export const post22 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidate',
    path: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody,
      params:
        zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath,
    }),
  )
  .output(
    zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse,
  )

export const credentialsValidate = {
  post: post22,
}

export const post23 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidate',
    path: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody,
      params:
        zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath,
    }),
  )
  .output(
    zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse,
  )

export const credentialsValidate2 = {
  post: post23,
}

export const byConfigId = {
  credentialsValidate: credentialsValidate2,
}

export const loadBalancingConfigs = {
  credentialsValidate,
  byConfigId,
}

export const get15 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProvidersByProviderModelsParameterRules',
    path: '/workspaces/current/model-providers/{provider}/models/parameter-rules',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath,
      query: zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery,
    }),
  )
  .output(zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse)

export const parameterRules = {
  get: get15,
}

export const delete7 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentModelProvidersByProviderModels',
    path: '/workspaces/current/model-providers/{provider}/models',
    successStatus: 204,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
      params: zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
    }),
  )
  .output(zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse)

export const get16 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProvidersByProviderModels',
    path: '/workspaces/current/model-providers/{provider}/models',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentModelProvidersByProviderModelsPath }))
  .output(zGetWorkspacesCurrentModelProvidersByProviderModelsResponse)

export const post24 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderModels',
    path: '/workspaces/current/model-providers/{provider}/models',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderModelsBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderModelsPath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderModelsResponse)

export const models = {
  delete: delete7,
  get: get16,
  post: post24,
  credentials: credentials2,
  disable: disable2,
  enable: enable2,
  loadBalancingConfigs,
  parameterRules,
}

export const post25 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderPreferredProviderType',
    path: '/workspaces/current/model-providers/{provider}/preferred-provider-type',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody,
      params: zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath,
    }),
  )
  .output(zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse)

export const preferredProviderType = {
  post: post25,
}

export const byProvider = {
  checkoutUrl,
  credentials,
  models,
  preferredProviderType,
}

export const get17 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelProviders',
    path: '/workspaces/current/model-providers',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentModelProvidersQuery.optional() }))
  .output(zGetWorkspacesCurrentModelProvidersResponse)

export const modelProviders = {
  get: get17,
  byProvider,
}

export const get18 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentModelsModelTypesByModelType',
    path: '/workspaces/current/models/model-types/{model_type}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentModelsModelTypesByModelTypePath }))
  .output(zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse)

export const byModelType = {
  get: get18,
}

export const modelTypes = {
  byModelType,
}

export const models2 = {
  modelTypes,
}

/**
 * Get workspace permission settings
 *
 * Returns permission flags that control workspace features like member invitations and owner transfer.
 */
export const get19 = oc
  .route({
    description:
      'Returns permission flags that control workspace features like member invitations and owner transfer.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPermission',
    path: '/workspaces/current/permission',
    summary: 'Get workspace permission settings',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentPermissionResponse)

export const permission = {
  get: get19,
}

export const get20 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginAsset',
    path: '/workspaces/current/plugin/asset',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginAssetQuery }))
  .output(zGetWorkspacesCurrentPluginAssetResponse)

export const asset = {
  get: get20,
}

export const get21 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginDebuggingKey',
    path: '/workspaces/current/plugin/debugging-key',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentPluginDebuggingKeyResponse)

export const debuggingKey = {
  get: get21,
}

export const get22 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginFetchManifest',
    path: '/workspaces/current/plugin/fetch-manifest',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginFetchManifestQuery }))
  .output(zGetWorkspacesCurrentPluginFetchManifestResponse)

export const fetchManifest = {
  get: get22,
}

export const get23 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginIcon',
    path: '/workspaces/current/plugin/icon',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginIconQuery }))
  .output(zGetWorkspacesCurrentPluginIconResponse)

export const icon = {
  get: get23,
}

export const post26 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginInstallGithub',
    path: '/workspaces/current/plugin/install/github',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginInstallGithubBody }))
  .output(zPostWorkspacesCurrentPluginInstallGithubResponse)

export const github = {
  post: post26,
}

export const post27 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginInstallMarketplace',
    path: '/workspaces/current/plugin/install/marketplace',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginInstallMarketplaceBody }))
  .output(zPostWorkspacesCurrentPluginInstallMarketplaceResponse)

export const marketplace = {
  post: post27,
}

export const post28 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginInstallPkg',
    path: '/workspaces/current/plugin/install/pkg',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginInstallPkgBody }))
  .output(zPostWorkspacesCurrentPluginInstallPkgResponse)

export const pkg = {
  post: post28,
}

export const install = {
  github,
  marketplace,
  pkg,
}

export const post29 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginListInstallationsIds',
    path: '/workspaces/current/plugin/list/installations/ids',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginListInstallationsIdsBody }))
  .output(zPostWorkspacesCurrentPluginListInstallationsIdsResponse)

export const ids = {
  post: post29,
}

export const installations = {
  ids,
}

export const post30 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginListLatestVersions',
    path: '/workspaces/current/plugin/list/latest-versions',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginListLatestVersionsBody }))
  .output(zPostWorkspacesCurrentPluginListLatestVersionsResponse)

export const latestVersions = {
  post: post30,
}

export const get24 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginList',
    path: '/workspaces/current/plugin/list',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginListQuery.optional() }))
  .output(zGetWorkspacesCurrentPluginListResponse)

export const list2 = {
  get: get24,
  installations,
  latestVersions,
}

export const get25 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginMarketplacePkg',
    path: '/workspaces/current/plugin/marketplace/pkg',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginMarketplacePkgQuery }))
  .output(zGetWorkspacesCurrentPluginMarketplacePkgResponse)

export const pkg2 = {
  get: get25,
}

export const marketplace2 = {
  pkg: pkg2,
}

export const get26 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginParametersDynamicOptions',
    path: '/workspaces/current/plugin/parameters/dynamic-options',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery }))
  .output(zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse)

export const dynamicOptions = {
  get: get26,
}

/**
 * Fetch dynamic options using credentials directly (for edit mode)
 */
export const post31 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginParametersDynamicOptionsWithCredentials',
    path: '/workspaces/current/plugin/parameters/dynamic-options-with-credentials',
    summary: 'Fetch dynamic options using credentials directly (for edit mode)',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody }),
  )
  .output(zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse)

export const dynamicOptionsWithCredentials = {
  post: post31,
}

export const parameters = {
  dynamicOptions,
  dynamicOptionsWithCredentials,
}

export const post32 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginPermissionChange',
    path: '/workspaces/current/plugin/permission/change',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginPermissionChangeBody }))
  .output(zPostWorkspacesCurrentPluginPermissionChangeResponse)

export const change = {
  post: post32,
}

export const get27 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginPermissionFetch',
    path: '/workspaces/current/plugin/permission/fetch',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentPluginPermissionFetchResponse)

export const fetch_ = {
  get: get27,
}

export const permission2 = {
  change,
  fetch: fetch_,
}

export const post33 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginPreferencesAutoupgradeExclude',
    path: '/workspaces/current/plugin/preferences/autoupgrade/exclude',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody }))
  .output(zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse)

export const exclude = {
  post: post33,
}

export const autoupgrade = {
  exclude,
}

export const post34 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginPreferencesChange',
    path: '/workspaces/current/plugin/preferences/change',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesChangeBody }))
  .output(zPostWorkspacesCurrentPluginPreferencesChangeResponse)

export const change2 = {
  post: post34,
}

export const get28 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginPreferencesFetch',
    path: '/workspaces/current/plugin/preferences/fetch',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentPluginPreferencesFetchResponse)

export const fetch2 = {
  get: get28,
}

export const preferences = {
  autoupgrade,
  change: change2,
  fetch: fetch2,
}

export const get29 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginReadme',
    path: '/workspaces/current/plugin/readme',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginReadmeQuery }))
  .output(zGetWorkspacesCurrentPluginReadmeResponse)

export const readme = {
  get: get29,
}

export const post35 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginTasksDeleteAll',
    path: '/workspaces/current/plugin/tasks/delete_all',
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentPluginTasksDeleteAllResponse)

export const deleteAll = {
  post: post35,
}

export const post36 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifier',
    path: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}',
    tags: ['console'],
  })
  .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath }))
  .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse)

export const byIdentifier = {
  post: post36,
}

export const post37 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDelete',
    path: '/workspaces/current/plugin/tasks/{task_id}/delete',
    tags: ['console'],
  })
  .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath }))
  .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse)

export const delete8 = {
  post: post37,
  byIdentifier,
}

export const get30 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginTasksByTaskId',
    path: '/workspaces/current/plugin/tasks/{task_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentPluginTasksByTaskIdPath }))
  .output(zGetWorkspacesCurrentPluginTasksByTaskIdResponse)

export const byTaskId = {
  get: get30,
  delete: delete8,
}

export const get31 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginTasks',
    path: '/workspaces/current/plugin/tasks',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginTasksQuery.optional() }))
  .output(zGetWorkspacesCurrentPluginTasksResponse)

export const tasks = {
  get: get31,
  deleteAll,
  byTaskId,
}

export const post38 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUninstall',
    path: '/workspaces/current/plugin/uninstall',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginUninstallBody }))
  .output(zPostWorkspacesCurrentPluginUninstallResponse)

export const uninstall = {
  post: post38,
}

export const post39 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUpgradeGithub',
    path: '/workspaces/current/plugin/upgrade/github',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeGithubBody }))
  .output(zPostWorkspacesCurrentPluginUpgradeGithubResponse)

export const github2 = {
  post: post39,
}

export const post40 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUpgradeMarketplace',
    path: '/workspaces/current/plugin/upgrade/marketplace',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeMarketplaceBody }))
  .output(zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse)

export const marketplace3 = {
  post: post40,
}

export const upgrade = {
  github: github2,
  marketplace: marketplace3,
}

export const post41 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUploadBundle',
    path: '/workspaces/current/plugin/upload/bundle',
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentPluginUploadBundleResponse)

export const bundle = {
  post: post41,
}

export const post42 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUploadGithub',
    path: '/workspaces/current/plugin/upload/github',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginUploadGithubBody }))
  .output(zPostWorkspacesCurrentPluginUploadGithubResponse)

export const github3 = {
  post: post42,
}

export const post43 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginUploadPkg',
    path: '/workspaces/current/plugin/upload/pkg',
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentPluginUploadPkgResponse)

export const pkg3 = {
  post: post43,
}

export const upload = {
  bundle,
  github: github3,
  pkg: pkg3,
}

export const plugin2 = {
  asset,
  debuggingKey,
  fetchManifest,
  icon,
  install,
  list: list2,
  marketplace: marketplace2,
  parameters,
  permission: permission2,
  preferences,
  readme,
  tasks,
  uninstall,
  upgrade,
  upload,
}

export const get32 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolLabels',
    path: '/workspaces/current/tool-labels',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolLabelsResponse)

export const toolLabels = {
  get: get32,
}

export const post44 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderApiAdd',
    path: '/workspaces/current/tool-provider/api/add',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiAddBody }))
  .output(zPostWorkspacesCurrentToolProviderApiAddResponse)

export const add = {
  post: post44,
}

export const post45 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderApiDelete',
    path: '/workspaces/current/tool-provider/api/delete',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiDeleteBody }))
  .output(zPostWorkspacesCurrentToolProviderApiDeleteResponse)

export const delete9 = {
  post: post45,
}

export const get33 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderApiGet',
    path: '/workspaces/current/tool-provider/api/get',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProviderApiGetQuery }))
  .output(zGetWorkspacesCurrentToolProviderApiGetResponse)

export const get34 = {
  get: get33,
}

export const get35 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderApiRemote',
    path: '/workspaces/current/tool-provider/api/remote',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProviderApiRemoteQuery }))
  .output(zGetWorkspacesCurrentToolProviderApiRemoteResponse)

export const remote = {
  get: get35,
}

export const post46 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderApiSchema',
    path: '/workspaces/current/tool-provider/api/schema',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiSchemaBody }))
  .output(zPostWorkspacesCurrentToolProviderApiSchemaResponse)

export const schema = {
  post: post46,
}

export const post47 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderApiTestPre',
    path: '/workspaces/current/tool-provider/api/test/pre',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiTestPreBody }))
  .output(zPostWorkspacesCurrentToolProviderApiTestPreResponse)

export const pre = {
  post: post47,
}

export const test = {
  pre,
}

export const get36 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderApiTools',
    path: '/workspaces/current/tool-provider/api/tools',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProviderApiToolsQuery }))
  .output(zGetWorkspacesCurrentToolProviderApiToolsResponse)

export const tools = {
  get: get36,
}

export const post48 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderApiUpdate',
    path: '/workspaces/current/tool-provider/api/update',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiUpdateBody }))
  .output(zPostWorkspacesCurrentToolProviderApiUpdateResponse)

export const update2 = {
  post: post48,
}

export const api = {
  add,
  delete: delete9,
  get: get34,
  remote,
  schema,
  test,
  tools,
  update: update2,
}

export const post49 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderAdd',
    path: '/workspaces/current/tool-provider/builtin/{provider}/add',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentToolProviderBuiltinByProviderAddBody,
      params: zPostWorkspacesCurrentToolProviderBuiltinByProviderAddPath,
    }),
  )
  .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse)

export const add2 = {
  post: post49,
}

export const get37 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfo',
    path: '/workspaces/current/tool-provider/builtin/{provider}/credential/info',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath,
      query: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse)

export const info = {
  get: get37,
}

export const get38 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId:
      'getWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialType',
    path: '/workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}',
    tags: ['console'],
  })
  .input(
    z.object({
      params:
        zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
    }),
  )
  .output(
    zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
  )

export const byCredentialType = {
  get: get38,
}

export const schema2 = {
  byCredentialType,
}

export const credential = {
  info,
  schema: schema2,
}

export const get39 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderCredentials',
    path: '/workspaces/current/tool-provider/builtin/{provider}/credentials',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath,
      query: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse)

export const credentials3 = {
  get: get39,
}

export const post50 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredential',
    path: '/workspaces/current/tool-provider/builtin/{provider}/default-credential',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialBody,
      params: zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialPath,
    }),
  )
  .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse)

export const defaultCredential = {
  post: post50,
}

export const post51 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderDelete',
    path: '/workspaces/current/tool-provider/builtin/{provider}/delete',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteBody,
      params: zPostWorkspacesCurrentToolProviderBuiltinByProviderDeletePath,
    }),
  )
  .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse)

export const delete10 = {
  post: post51,
}

export const get40 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderIcon',
    path: '/workspaces/current/tool-provider/builtin/{provider}/icon',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath }))
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse)

export const icon2 = {
  get: get40,
}

export const get41 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderInfo',
    path: '/workspaces/current/tool-provider/builtin/{provider}/info',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath }))
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse)

export const info2 = {
  get: get41,
}

export const get42 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchema',
    path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath }),
  )
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse)

export const clientSchema = {
  get: get42,
}

export const delete11 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
    path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
    }),
  )
  .output(zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)

export const get43 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
    path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath }),
  )
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)

export const post52 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
    path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientBody,
      params: zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
    }),
  )
  .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)

export const customClient = {
  delete: delete11,
  get: get43,
  post: post52,
}

export const oauth = {
  clientSchema,
  customClient,
}

export const get44 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderTools',
    path: '/workspaces/current/tool-provider/builtin/{provider}/tools',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath }))
  .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse)

export const tools2 = {
  get: get44,
}

export const post53 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderUpdate',
    path: '/workspaces/current/tool-provider/builtin/{provider}/update',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateBody,
      params: zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdatePath,
    }),
  )
  .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse)

export const update3 = {
  post: post53,
}

export const byProvider2 = {
  add: add2,
  credential,
  credentials: credentials3,
  defaultCredential,
  delete: delete10,
  icon: icon2,
  info: info2,
  oauth,
  tools: tools2,
  update: update3,
}

export const builtin = {
  byProvider: byProvider2,
}

export const post54 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderMcpAuth',
    path: '/workspaces/current/tool-provider/mcp/auth',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderMcpAuthBody }))
  .output(zPostWorkspacesCurrentToolProviderMcpAuthResponse)

export const auth = {
  post: post54,
}

export const get45 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderMcpToolsByProviderId',
    path: '/workspaces/current/tool-provider/mcp/tools/{provider_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath }))
  .output(zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse)

export const byProviderId = {
  get: get45,
}

export const tools3 = {
  byProviderId,
}

export const get46 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderMcpUpdateByProviderId',
    path: '/workspaces/current/tool-provider/mcp/update/{provider_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath }))
  .output(zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse)

export const byProviderId2 = {
  get: get46,
}

export const update4 = {
  byProviderId: byProviderId2,
}

export const delete12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentToolProviderMcp',
    path: '/workspaces/current/tool-provider/mcp',
    tags: ['console'],
  })
  .input(z.object({ body: zDeleteWorkspacesCurrentToolProviderMcpBody }))
  .output(zDeleteWorkspacesCurrentToolProviderMcpResponse)

export const post55 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderMcp',
    path: '/workspaces/current/tool-provider/mcp',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderMcpBody }))
  .output(zPostWorkspacesCurrentToolProviderMcpResponse)

export const put4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentToolProviderMcp',
    path: '/workspaces/current/tool-provider/mcp',
    tags: ['console'],
  })
  .input(z.object({ body: zPutWorkspacesCurrentToolProviderMcpBody }))
  .output(zPutWorkspacesCurrentToolProviderMcpResponse)

export const mcp = {
  delete: delete12,
  post: post55,
  put: put4,
  auth,
  tools: tools3,
  update: update4,
}

export const post56 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderWorkflowCreate',
    path: '/workspaces/current/tool-provider/workflow/create',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowCreateBody }))
  .output(zPostWorkspacesCurrentToolProviderWorkflowCreateResponse)

export const create2 = {
  post: post56,
}

export const post57 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderWorkflowDelete',
    path: '/workspaces/current/tool-provider/workflow/delete',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowDeleteBody }))
  .output(zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse)

export const delete13 = {
  post: post57,
}

export const get47 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderWorkflowGet',
    path: '/workspaces/current/tool-provider/workflow/get',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProviderWorkflowGetQuery.optional() }))
  .output(zGetWorkspacesCurrentToolProviderWorkflowGetResponse)

export const get48 = {
  get: get47,
}

export const get49 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviderWorkflowTools',
    path: '/workspaces/current/tool-provider/workflow/tools',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProviderWorkflowToolsQuery }))
  .output(zGetWorkspacesCurrentToolProviderWorkflowToolsResponse)

export const tools4 = {
  get: get49,
}

export const post58 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentToolProviderWorkflowUpdate',
    path: '/workspaces/current/tool-provider/workflow/update',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowUpdateBody }))
  .output(zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse)

export const update5 = {
  post: post58,
}

export const workflow = {
  create: create2,
  delete: delete13,
  get: get48,
  tools: tools4,
  update: update5,
}

export const toolProvider = {
  api,
  builtin,
  mcp,
  workflow,
}

export const get50 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolProviders',
    path: '/workspaces/current/tool-providers',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentToolProvidersQuery.optional() }))
  .output(zGetWorkspacesCurrentToolProvidersResponse)

export const toolProviders = {
  get: get50,
}

export const get51 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolsApi',
    path: '/workspaces/current/tools/api',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolsApiResponse)

export const api2 = {
  get: get51,
}

export const get52 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolsBuiltin',
    path: '/workspaces/current/tools/builtin',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolsBuiltinResponse)

export const builtin2 = {
  get: get52,
}

export const get53 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolsMcp',
    path: '/workspaces/current/tools/mcp',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolsMcpResponse)

export const mcp2 = {
  get: get53,
}

export const get54 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolsWorkflow',
    path: '/workspaces/current/tools/workflow',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolsWorkflowResponse)

export const workflow2 = {
  get: get54,
}

export const tools5 = {
  api: api2,
  builtin: builtin2,
  mcp: mcp2,
  workflow: workflow2,
}

export const get55 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggerProviderByProviderIcon',
    path: '/workspaces/current/trigger-provider/{provider}/icon',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderIconPath }))
  .output(zGetWorkspacesCurrentTriggerProviderByProviderIconResponse)

export const icon3 = {
  get: get55,
}

/**
 * Get info for a trigger provider
 */
export const get56 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggerProviderByProviderInfo',
    path: '/workspaces/current/trigger-provider/{provider}/info',
    summary: 'Get info for a trigger provider',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderInfoPath }))
  .output(zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse)

export const info3 = {
  get: get56,
}

/**
 * Remove custom OAuth client configuration
 */
export const delete14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentTriggerProviderByProviderOauthClient',
    path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
    summary: 'Remove custom OAuth client configuration',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath }))
  .output(zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)

/**
 * Get OAuth client configuration for a provider
 */
export const get57 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggerProviderByProviderOauthClient',
    path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
    summary: 'Get OAuth client configuration for a provider',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath }))
  .output(zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)

/**
 * Configure custom OAuth client for a provider
 */
export const post59 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentTriggerProviderByProviderOauthClient',
    path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
    summary: 'Configure custom OAuth client for a provider',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderOauthClientBody,
      params: zPostWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
    }),
  )
  .output(zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)

export const client = {
  delete: delete14,
  get: get57,
  post: post59,
}

export const oauth2 = {
  client,
}

/**
 * Build a subscription instance for a trigger provider
 */
export const post60 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}',
    summary: 'Build a subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdBody,
      params:
        zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdPath,
    }),
  )
  .output(
    zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse,
  )

export const bySubscriptionBuilderId = {
  post: post60,
}

export const build = {
  bySubscriptionBuilderId,
}

/**
 * Add a new subscription instance for a trigger provider
 */
export const post61 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreate',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/create',
    summary: 'Add a new subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateBody,
      params: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreatePath,
    }),
  )
  .output(zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse)

export const create3 = {
  post: post61,
}

/**
 * Get the request logs for a subscription instance for a trigger provider
 */
export const get58 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId:
      'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}',
    summary: 'Get the request logs for a subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      params:
        zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
    }),
  )
  .output(
    zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
  )

export const bySubscriptionBuilderId2 = {
  get: get58,
}

export const logs = {
  bySubscriptionBuilderId: bySubscriptionBuilderId2,
}

/**
 * Update a subscription instance for a trigger provider
 */
export const post62 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}',
    summary: 'Update a subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdBody,
      params:
        zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdPath,
    }),
  )
  .output(
    zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse,
  )

export const bySubscriptionBuilderId3 = {
  post: post62,
}

export const update6 = {
  bySubscriptionBuilderId: bySubscriptionBuilderId3,
}

/**
 * Verify and update a subscription instance for a trigger provider
 */
export const post63 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}',
    summary: 'Verify and update a subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdBody,
      params:
        zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdPath,
    }),
  )
  .output(
    zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse,
  )

export const bySubscriptionBuilderId4 = {
  post: post63,
}

export const verifyAndUpdate = {
  bySubscriptionBuilderId: bySubscriptionBuilderId4,
}

/**
 * Get a subscription instance for a trigger provider
 */
export const get59 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId:
      'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}',
    summary: 'Get a subscription instance for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      params:
        zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
    }),
  )
  .output(
    zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
  )

export const bySubscriptionBuilderId5 = {
  get: get59,
}

export const builder = {
  build,
  create: create3,
  logs,
  update: update6,
  verifyAndUpdate,
  bySubscriptionBuilderId: bySubscriptionBuilderId5,
}

/**
 * List all trigger subscriptions for the current tenant's provider
 */
export const get60 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsList',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/list',
    summary: 'List all trigger subscriptions for the current tenant\'s provider',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath }))
  .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse)

export const list3 = {
  get: get60,
}

/**
 * Initiate OAuth authorization flow for a trigger provider
 */
export const get61 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorize',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize',
    summary: 'Initiate OAuth authorization flow for a trigger provider',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
    }),
  )
  .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse)

export const authorize = {
  get: get61,
}

export const oauth3 = {
  authorize,
}

/**
 * Verify credentials for an existing subscription (edit mode only)
 */
export const post64 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId:
      'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionId',
    path: '/workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}',
    summary: 'Verify credentials for an existing subscription (edit mode only)',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdBody,
      params:
        zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdPath,
    }),
  )
  .output(
    zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse,
  )

export const bySubscriptionId = {
  post: post64,
}

export const verify = {
  bySubscriptionId,
}

export const subscriptions = {
  builder,
  list: list3,
  oauth: oauth3,
  verify,
}

export const byProvider3 = {
  icon: icon3,
  info: info3,
  oauth: oauth2,
  subscriptions,
}

/**
 * Delete a subscription instance
 */
export const post65 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDelete',
    path: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete',
    summary: 'Delete a subscription instance',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeletePath,
    }),
  )
  .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse)

export const delete15 = {
  post: post65,
}

/**
 * Update a subscription instance
 */
export const post66 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdate',
    path: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/update',
    summary: 'Update a subscription instance',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateBody,
      params: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdatePath,
    }),
  )
  .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse)

export const update7 = {
  post: post66,
}

export const subscriptions2 = {
  delete: delete15,
  update: update7,
}

export const bySubscriptionId2 = {
  subscriptions: subscriptions2,
}

export const triggerProvider = {
  byProvider: byProvider3,
  bySubscriptionId: bySubscriptionId2,
}

/**
 * List all trigger providers for the current tenant
 */
export const get62 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentTriggers',
    path: '/workspaces/current/triggers',
    summary: 'List all trigger providers for the current tenant',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentTriggersResponse)

export const triggers = {
  get: get62,
}

export const post67 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrent',
    path: '/workspaces/current',
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentResponse)

export const current = {
  post: post67,
  agentProvider,
  agentProviders,
  customizedSnippets,
  datasetOperators,
  defaultModel,
  endpoints,
  members,
  modelProviders,
  models: models2,
  permission,
  plugin: plugin2,
  toolLabels,
  toolProvider,
  toolProviders,
  tools: tools5,
  triggerProvider,
  triggers,
}

export const post68 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCustomConfigWebappLogoUpload',
    path: '/workspaces/custom-config/webapp-logo/upload',
    successStatus: 201,
    tags: ['console'],
  })
  .output(zPostWorkspacesCustomConfigWebappLogoUploadResponse)

export const upload2 = {
  post: post68,
}

export const webappLogo = {
  upload: upload2,
}

export const post69 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCustomConfig',
    path: '/workspaces/custom-config',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCustomConfigBody }))
  .output(zPostWorkspacesCustomConfigResponse)

export const customConfig = {
  post: post69,
  webappLogo,
}

export const post70 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesInfo',
    path: '/workspaces/info',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesInfoBody }))
  .output(zPostWorkspacesInfoResponse)

export const info4 = {
  post: post70,
}

export const post71 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesSwitch',
    path: '/workspaces/switch',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesSwitchBody }))
  .output(zPostWorkspacesSwitchResponse)

export const switch3 = {
  post: post71,
}

export const get63 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLang',
    path: '/workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath }))
  .output(zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse)

export const byLang = {
  get: get63,
}

export const byIconType = {
  byLang,
}

export const byProvider4 = {
  byIconType,
}

export const modelProviders2 = {
  byProvider: byProvider4,
}

export const byTenantId = {
  modelProviders: modelProviders2,
}

export const get64 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspaces',
    path: '/workspaces',
    tags: ['console'],
  })
  .output(zGetWorkspacesResponse)

export const workspaces = {
  get: get64,
  current,
  customConfig,
  info: info4,
  switch: switch3,
  byTenantId,
}

export const contract = {
  workspaces,
}
