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

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

import {
  zDeleteWorkspacesCurrentEndpointsByIdPath,
  zDeleteWorkspacesCurrentEndpointsByIdResponse,
  zDeleteWorkspacesCurrentMembersByMemberIdPath,
  zDeleteWorkspacesCurrentMembersByMemberIdResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zDeleteWorkspacesCurrentToolProviderMcpBody,
  zDeleteWorkspacesCurrentToolProviderMcpResponse,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse,
  zGetWorkspacesCurrentAgentProviderByProviderNamePath,
  zGetWorkspacesCurrentAgentProviderByProviderNameResponse,
  zGetWorkspacesCurrentAgentProvidersResponse,
  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,
  zGetWorkspacesCurrentToolProviderApiGetResponse,
  zGetWorkspacesCurrentToolProviderApiRemoteResponse,
  zGetWorkspacesCurrentToolProviderApiToolsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse,
  zGetWorkspacesCurrentToolProvidersResponse,
  zGetWorkspacesCurrentToolProviderWorkflowGetResponse,
  zGetWorkspacesCurrentToolProviderWorkflowToolsResponse,
  zGetWorkspacesCurrentToolsApiResponse,
  zGetWorkspacesCurrentToolsBuiltinResponse,
  zGetWorkspacesCurrentToolsMcpResponse,
  zGetWorkspacesCurrentToolsWorkflowResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderIconPath,
  zGetWorkspacesCurrentTriggerProviderByProviderIconResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoPath,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse,
  zGetWorkspacesCurrentTriggersResponse,
  zGetWorkspacesResponse,
  zPatchWorkspacesCurrentEndpointsByIdBody,
  zPatchWorkspacesCurrentEndpointsByIdPath,
  zPatchWorkspacesCurrentEndpointsByIdResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse,
  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,
}

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

export const datasetOperators = {
  get: get3,
}

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

export const post = 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: get4,
  post,
}

/**
 * Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.
 *
 * @deprecated
 */
export const post2 = 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: post2,
}

/**
 * Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.
 *
 * @deprecated
 */
export const post3 = 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 delete_ = {
  post: post3,
}

/**
 * Disable a plugin endpoint
 */
export const post4 = 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: post4,
}

/**
 * Enable a plugin endpoint
 */
export const post5 = 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: post5,
}

/**
 * List endpoints for a specific plugin
 */
export const get5 = 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: get5,
}

/**
 * List plugin endpoints with pagination
 */
export const get6 = 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: get6,
  plugin,
}

/**
 * Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.
 *
 * @deprecated
 */
export const post6 = 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: post6,
}

/**
 * Delete a plugin endpoint
 */
export const delete2 = 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 patch = 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: delete2,
  patch,
}

/**
 * Create a new plugin endpoint
 */
export const post7 = 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: post7,
  create,
  delete: delete_,
  disable,
  enable,
  list,
  update,
  byId,
}

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

export const inviteEmail = {
  post: post8,
}

export const post9 = 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: post9,
}

export const post10 = 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: post10,
}

export const post11 = 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: post11,
}

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 delete3 = 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: delete3,
  ownerTransfer,
  updateRole,
}

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

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

export const get8 = 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: get8,
}

export const post12 = 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: post12,
}

export const post13 = 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: post13,
}

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

export const get9 = 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 post14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentials',
    path: '/workspaces/current/model-providers/{provider}/credentials',
    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: delete4,
  get: get9,
  post: post14,
  put: put2,
  switch: switch_,
  validate,
}

export const post15 = 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: post15,
}

export const post16 = 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: post16,
}

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

export const get10 = 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 post17 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentials',
    path: '/workspaces/current/model-providers/{provider}/models/credentials',
    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: delete5,
  get: get10,
  post: post17,
  put: put3,
  switch: switch2,
  validate: validate2,
}

export const patch2 = 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: patch2,
}

export const patch3 = 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: patch3,
}

export const post18 = 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: post18,
}

export const post19 = 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: post19,
}

export const byConfigId = {
  credentialsValidate: credentialsValidate2,
}

export const loadBalancingConfigs = {
  credentialsValidate,
  byConfigId,
}

export const get11 = 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: get11,
}

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

export const get12 = 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 post20 = 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: delete6,
  get: get12,
  post: post20,
  credentials: credentials2,
  disable: disable2,
  enable: enable2,
  loadBalancingConfigs,
  parameterRules,
}

export const post21 = 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: post21,
}

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

export const get13 = 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: get13,
  byProvider,
}

export const get14 = 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: get14,
}

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 get15 = 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: get15,
}

export const get16 = 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: get16,
}

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

export const debuggingKey = {
  get: get17,
}

export const get18 = 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: get18,
}

export const get19 = 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: get19,
}

export const post22 = 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: post22,
}

export const post23 = 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: post23,
}

export const post24 = 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: post24,
}

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

export const post25 = 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: post25,
}

export const installations = {
  ids,
}

export const post26 = 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: post26,
}

export const get20 = 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: get20,
  installations,
  latestVersions,
}

export const get21 = 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: get21,
}

export const marketplace2 = {
  pkg: pkg2,
}

export const get22 = 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: get22,
}

/**
 * Fetch dynamic options using credentials directly (for edit mode)
 */
export const post27 = 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: post27,
}

export const parameters = {
  dynamicOptions,
  dynamicOptionsWithCredentials,
}

export const post28 = 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: post28,
}

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

export const fetch_ = {
  get: get23,
}

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

export const post29 = 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: post29,
}

export const autoupgrade = {
  exclude,
}

export const post30 = 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: post30,
}

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

export const fetch2 = {
  get: get24,
}

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

export const get25 = 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: get25,
}

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

export const deleteAll = {
  post: post31,
}

export const post32 = 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: post32,
}

export const post33 = 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 delete7 = {
  post: post33,
  byIdentifier,
}

export const get26 = 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: get26,
  delete: delete7,
}

export const get27 = 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: get27,
  deleteAll,
  byTaskId,
}

export const post34 = 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: post34,
}

export const post35 = 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: post35,
}

export const post36 = 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: post36,
}

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

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

export const bundle = {
  post: post37,
}

export const post38 = 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: post38,
}

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

export const pkg3 = {
  post: post39,
}

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 get28 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentToolLabels',
    path: '/workspaces/current/tool-labels',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentToolLabelsResponse)

export const toolLabels = {
  get: get28,
}

export const post40 = 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: post40,
}

export const post41 = 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 delete8 = {
  post: post41,
}

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

export const get30 = {
  get: get29,
}

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

export const remote = {
  get: get31,
}

export const post42 = 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: post42,
}

export const post43 = 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: post43,
}

export const test = {
  pre,
}

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

export const tools = {
  get: get32,
}

export const post44 = 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: post44,
}

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

export const post45 = 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: post45,
}

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

export const info = {
  get: get33,
}

export const get34 = 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: get34,
}

export const schema2 = {
  byCredentialType,
}

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

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

export const credentials3 = {
  get: get35,
}

export const post46 = 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: post46,
}

export const post47 = 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 delete9 = {
  post: post47,
}

export const get36 = 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: get36,
}

export const get37 = 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: get37,
}

export const get38 = 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: get38,
}

export const delete10 = 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 get39 = 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 post48 = 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: delete10,
  get: get39,
  post: post48,
}

export const oauth = {
  clientSchema,
  customClient,
}

export const get40 = 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: get40,
}

export const post49 = 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: post49,
}

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

export const builtin = {
  byProvider: byProvider2,
}

export const post50 = 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: post50,
}

export const get41 = 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: get41,
}

export const tools3 = {
  byProviderId,
}

export const get42 = 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: get42,
}

export const update4 = {
  byProviderId: byProviderId2,
}

export const delete11 = 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 post51 = 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: delete11,
  post: post51,
  put: put4,
  auth,
  tools: tools3,
  update: update4,
}

export const post52 = 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: post52,
}

export const post53 = 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 delete12 = {
  post: post53,
}

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

export const get44 = {
  get: get43,
}

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

export const tools4 = {
  get: get45,
}

export const post54 = 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: post54,
}

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

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

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

export const toolProviders = {
  get: get46,
}

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

export const api2 = {
  get: get47,
}

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

export const builtin2 = {
  get: get48,
}

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

export const mcp2 = {
  get: get49,
}

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

export const workflow2 = {
  get: get50,
}

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

export const get51 = 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: get51,
}

/**
 * Get info for a trigger provider
 */
export const get52 = 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: get52,
}

/**
 * Remove custom OAuth client configuration
 */
export const delete13 = 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 get53 = 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 post55 = 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: delete13,
  get: get53,
  post: post55,
}

export const oauth2 = {
  client,
}

/**
 * Build a subscription instance for a trigger provider
 */
export const post56 = 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: post56,
}

export const build = {
  bySubscriptionBuilderId,
}

/**
 * Add a new subscription instance for a trigger provider
 */
export const post57 = 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: post57,
}

/**
 * Get the request logs for a subscription instance for a trigger provider
 */
export const get54 = 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: get54,
}

export const logs = {
  bySubscriptionBuilderId: bySubscriptionBuilderId2,
}

/**
 * Update a subscription instance for a trigger provider
 */
export const post58 = 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: post58,
}

export const update6 = {
  bySubscriptionBuilderId: bySubscriptionBuilderId3,
}

/**
 * Verify and update a subscription instance for a trigger provider
 */
export const post59 = 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: post59,
}

export const verifyAndUpdate = {
  bySubscriptionBuilderId: bySubscriptionBuilderId4,
}

/**
 * Get a subscription instance for a trigger provider
 */
export const get55 = 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: get55,
}

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

/**
 * List all trigger subscriptions for the current tenant's provider
 */
export const get56 = 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: get56,
}

/**
 * Initiate OAuth authorization flow for a trigger provider
 */
export const get57 = 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: get57,
}

export const oauth3 = {
  authorize,
}

/**
 * Verify credentials for an existing subscription (edit mode only)
 */
export const post60 = 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: post60,
}

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 post61 = 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 delete14 = {
  post: post61,
}

/**
 * Update a subscription instance
 */
export const post62 = 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: post62,
}

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

export const bySubscriptionId2 = {
  subscriptions: subscriptions2,
}

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

/**
 * List all trigger providers for the current tenant
 */
export const get58 = 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: get58,
}

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

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

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

export const upload2 = {
  post: post64,
}

export const webappLogo = {
  upload: upload2,
}

export const post65 = 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: post65,
  webappLogo,
}

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

export const info4 = {
  post: post66,
}

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

export const switch3 = {
  post: post67,
}

export const get59 = 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: get59,
}

export const byIconType = {
  byLang,
}

export const byProvider4 = {
  byIconType,
}

export const modelProviders2 = {
  byProvider: byProvider4,
}

export const byTenantId = {
  modelProviders: modelProviders2,
}

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

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

export const contract = {
  workspaces,
}
