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

import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
  zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zDeleteWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zDeleteWorkspacesCurrentEndpointsByIdPath,
  zDeleteWorkspacesCurrentEndpointsByIdResponse,
  zDeleteWorkspacesCurrentMembersByMemberIdPath,
  zDeleteWorkspacesCurrentMembersByMemberIdResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
  zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zDeleteWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath,
  zDeleteWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse,
  zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsBody,
  zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsPath,
  zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsBody,
  zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsPath,
  zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  zDeleteWorkspacesCurrentRbacRolesByRoleIdPath,
  zDeleteWorkspacesCurrentRbacRolesByRoleIdResponse,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zDeleteWorkspacesCurrentToolProviderMcpBody,
  zDeleteWorkspacesCurrentToolProviderMcpResponse,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath,
  zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse,
  zGetWorkspacesCurrentAgentProviderByProviderNamePath,
  zGetWorkspacesCurrentAgentProviderByProviderNameResponse,
  zGetWorkspacesCurrentAgentProvidersResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdCheckDependenciesResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportQuery,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdExportResponse,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zGetWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zGetWorkspacesCurrentCustomizedSnippetsQuery,
  zGetWorkspacesCurrentCustomizedSnippetsResponse,
  zGetWorkspacesCurrentDatasetOperatorsResponse,
  zGetWorkspacesCurrentDefaultModelQuery,
  zGetWorkspacesCurrentDefaultModelResponse,
  zGetWorkspacesCurrentEndpointsListPluginQuery,
  zGetWorkspacesCurrentEndpointsListPluginResponse,
  zGetWorkspacesCurrentEndpointsListQuery,
  zGetWorkspacesCurrentEndpointsListResponse,
  zGetWorkspacesCurrentMembersResponse,
  zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath,
  zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery,
  zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery,
  zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery,
  zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse,
  zGetWorkspacesCurrentModelProvidersByProviderModelsPath,
  zGetWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zGetWorkspacesCurrentModelProvidersQuery,
  zGetWorkspacesCurrentModelProvidersResponse,
  zGetWorkspacesCurrentModelsModelTypesByModelTypePath,
  zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse,
  zGetWorkspacesCurrentPermissionResponse,
  zGetWorkspacesCurrentPluginAssetQuery,
  zGetWorkspacesCurrentPluginAssetResponse,
  zGetWorkspacesCurrentPluginAutoUpgradeFetchQuery,
  zGetWorkspacesCurrentPluginAutoUpgradeFetchResponse,
  zGetWorkspacesCurrentPluginByCategoryListPath,
  zGetWorkspacesCurrentPluginByCategoryListQuery,
  zGetWorkspacesCurrentPluginByCategoryListResponse,
  zGetWorkspacesCurrentPluginDebuggingKeyResponse,
  zGetWorkspacesCurrentPluginFetchManifestQuery,
  zGetWorkspacesCurrentPluginFetchManifestResponse,
  zGetWorkspacesCurrentPluginIconQuery,
  zGetWorkspacesCurrentPluginIconResponse,
  zGetWorkspacesCurrentPluginListQuery,
  zGetWorkspacesCurrentPluginListResponse,
  zGetWorkspacesCurrentPluginMarketplacePkgQuery,
  zGetWorkspacesCurrentPluginMarketplacePkgResponse,
  zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery,
  zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse,
  zGetWorkspacesCurrentPluginPermissionFetchResponse,
  zGetWorkspacesCurrentPluginReadmeQuery,
  zGetWorkspacesCurrentPluginReadmeResponse,
  zGetWorkspacesCurrentPluginTasksByTaskIdPath,
  zGetWorkspacesCurrentPluginTasksByTaskIdResponse,
  zGetWorkspacesCurrentPluginTasksQuery,
  zGetWorkspacesCurrentPluginTasksResponse,
  zGetWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath,
  zGetWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse,
  zGetWorkspacesCurrentRbacAccessPoliciesResponse,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsPath,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdRoleBindingsPath,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdRoleBindingsResponse,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyPath,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyQuery,
  zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyResponse,
  zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesPath,
  zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesQuery,
  zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesResponse,
  zGetWorkspacesCurrentRbacAppsByAppIdWhitelistPath,
  zGetWorkspacesCurrentRbacAppsByAppIdWhitelistResponse,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsPath,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdRoleBindingsPath,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdRoleBindingsResponse,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyPath,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyQuery,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyResponse,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesPath,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesQuery,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesResponse,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistPath,
  zGetWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistResponse,
  zGetWorkspacesCurrentRbacMembersByMemberIdRbacRolesPath,
  zGetWorkspacesCurrentRbacMembersByMemberIdRbacRolesResponse,
  zGetWorkspacesCurrentRbacMyPermissionsResponse,
  zGetWorkspacesCurrentRbacRolePermissionsCatalogAppResponse,
  zGetWorkspacesCurrentRbacRolePermissionsCatalogDatasetResponse,
  zGetWorkspacesCurrentRbacRolePermissionsCatalogResponse,
  zGetWorkspacesCurrentRbacRolesByRoleIdMembersPath,
  zGetWorkspacesCurrentRbacRolesByRoleIdMembersResponse,
  zGetWorkspacesCurrentRbacRolesByRoleIdPath,
  zGetWorkspacesCurrentRbacRolesByRoleIdResponse,
  zGetWorkspacesCurrentRbacRolesResponse,
  zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdMemberBindingsPath,
  zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdMemberBindingsResponse,
  zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdRoleBindingsPath,
  zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdRoleBindingsResponse,
  zGetWorkspacesCurrentRbacWorkspaceAppsAccessPolicyResponse,
  zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdMemberBindingsPath,
  zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdMemberBindingsResponse,
  zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdRoleBindingsPath,
  zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdRoleBindingsResponse,
  zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPolicyResponse,
  zGetWorkspacesCurrentToolLabelsResponse,
  zGetWorkspacesCurrentToolProviderApiGetQuery,
  zGetWorkspacesCurrentToolProviderApiGetResponse,
  zGetWorkspacesCurrentToolProviderApiRemoteQuery,
  zGetWorkspacesCurrentToolProviderApiRemoteResponse,
  zGetWorkspacesCurrentToolProviderApiToolsQuery,
  zGetWorkspacesCurrentToolProviderApiToolsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoQuery,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsQuery,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath,
  zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath,
  zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse,
  zGetWorkspacesCurrentToolProvidersQuery,
  zGetWorkspacesCurrentToolProvidersResponse,
  zGetWorkspacesCurrentToolProviderWorkflowGetQuery,
  zGetWorkspacesCurrentToolProviderWorkflowGetResponse,
  zGetWorkspacesCurrentToolProviderWorkflowToolsQuery,
  zGetWorkspacesCurrentToolProviderWorkflowToolsResponse,
  zGetWorkspacesCurrentToolsApiResponse,
  zGetWorkspacesCurrentToolsBuiltinResponse,
  zGetWorkspacesCurrentToolsMcpResponse,
  zGetWorkspacesCurrentToolsWorkflowResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderIconPath,
  zGetWorkspacesCurrentTriggerProviderByProviderIconResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoPath,
  zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
  zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
  zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse,
  zGetWorkspacesCurrentTriggersResponse,
  zGetWorkspacesResponse,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdBody,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdPath,
  zPatchWorkspacesCurrentCustomizedSnippetsBySnippetIdResponse,
  zPatchWorkspacesCurrentEndpointsByIdBody,
  zPatchWorkspacesCurrentEndpointsByIdPath,
  zPatchWorkspacesCurrentEndpointsByIdResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
  zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse,
  zPostWorkspacesCurrentCustomizedSnippetsBody,
  zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementPath,
  zPostWorkspacesCurrentCustomizedSnippetsBySnippetIdUseCountIncrementResponse,
  zPostWorkspacesCurrentCustomizedSnippetsImportsBody,
  zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmPath,
  zPostWorkspacesCurrentCustomizedSnippetsImportsByImportIdConfirmResponse,
  zPostWorkspacesCurrentCustomizedSnippetsImportsResponse,
  zPostWorkspacesCurrentCustomizedSnippetsResponse,
  zPostWorkspacesCurrentDefaultModelBody,
  zPostWorkspacesCurrentDefaultModelResponse,
  zPostWorkspacesCurrentEndpointsBody,
  zPostWorkspacesCurrentEndpointsCreateBody,
  zPostWorkspacesCurrentEndpointsCreateResponse,
  zPostWorkspacesCurrentEndpointsDeleteBody,
  zPostWorkspacesCurrentEndpointsDeleteResponse,
  zPostWorkspacesCurrentEndpointsDisableBody,
  zPostWorkspacesCurrentEndpointsDisableResponse,
  zPostWorkspacesCurrentEndpointsEnableBody,
  zPostWorkspacesCurrentEndpointsEnableResponse,
  zPostWorkspacesCurrentEndpointsResponse,
  zPostWorkspacesCurrentEndpointsUpdateBody,
  zPostWorkspacesCurrentEndpointsUpdateResponse,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath,
  zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse,
  zPostWorkspacesCurrentMembersInviteEmailBody,
  zPostWorkspacesCurrentMembersInviteEmailResponse,
  zPostWorkspacesCurrentMembersOwnerTransferCheckBody,
  zPostWorkspacesCurrentMembersOwnerTransferCheckResponse,
  zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody,
  zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse,
  zPostWorkspacesCurrentModelProvidersByProviderModelsPath,
  zPostWorkspacesCurrentModelProvidersByProviderModelsResponse,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath,
  zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse,
  zPostWorkspacesCurrentPluginAutoUpgradeChangeBody,
  zPostWorkspacesCurrentPluginAutoUpgradeChangeResponse,
  zPostWorkspacesCurrentPluginAutoUpgradeExcludeBody,
  zPostWorkspacesCurrentPluginAutoUpgradeExcludeResponse,
  zPostWorkspacesCurrentPluginInstallGithubBody,
  zPostWorkspacesCurrentPluginInstallGithubResponse,
  zPostWorkspacesCurrentPluginInstallMarketplaceBody,
  zPostWorkspacesCurrentPluginInstallMarketplaceResponse,
  zPostWorkspacesCurrentPluginInstallPkgBody,
  zPostWorkspacesCurrentPluginInstallPkgResponse,
  zPostWorkspacesCurrentPluginListInstallationsIdsBody,
  zPostWorkspacesCurrentPluginListInstallationsIdsResponse,
  zPostWorkspacesCurrentPluginListLatestVersionsBody,
  zPostWorkspacesCurrentPluginListLatestVersionsResponse,
  zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody,
  zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse,
  zPostWorkspacesCurrentPluginPermissionChangeBody,
  zPostWorkspacesCurrentPluginPermissionChangeResponse,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath,
  zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse,
  zPostWorkspacesCurrentPluginTasksDeleteAllResponse,
  zPostWorkspacesCurrentPluginUninstallBody,
  zPostWorkspacesCurrentPluginUninstallResponse,
  zPostWorkspacesCurrentPluginUpgradeGithubBody,
  zPostWorkspacesCurrentPluginUpgradeGithubResponse,
  zPostWorkspacesCurrentPluginUpgradeMarketplaceBody,
  zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse,
  zPostWorkspacesCurrentPluginUploadBundleResponse,
  zPostWorkspacesCurrentPluginUploadGithubBody,
  zPostWorkspacesCurrentPluginUploadGithubResponse,
  zPostWorkspacesCurrentPluginUploadPkgBody,
  zPostWorkspacesCurrentPluginUploadPkgResponse,
  zPostWorkspacesCurrentRbacAccessPoliciesByPolicyIdCopyPath,
  zPostWorkspacesCurrentRbacAccessPoliciesByPolicyIdCopyResponse,
  zPostWorkspacesCurrentRbacAccessPoliciesResponse,
  zPostWorkspacesCurrentRbacRolesByRoleIdCopyPath,
  zPostWorkspacesCurrentRbacRolesByRoleIdCopyResponse,
  zPostWorkspacesCurrentRbacRolesResponse,
  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,
  zPostWorkspacesCustomConfigWebappLogoUploadBody,
  zPostWorkspacesCustomConfigWebappLogoUploadResponse,
  zPostWorkspacesInfoBody,
  zPostWorkspacesInfoResponse,
  zPostWorkspacesSwitchBody,
  zPostWorkspacesSwitchResponse,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath,
  zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath,
  zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
  zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
  zPutWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath,
  zPutWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse,
  zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdLockPath,
  zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdLockResponse,
  zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdUnlockPath,
  zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdUnlockResponse,
  zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesBody,
  zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesPath,
  zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesResponse,
  zPutWorkspacesCurrentRbacAppsByAppIdWhitelistBody,
  zPutWorkspacesCurrentRbacAppsByAppIdWhitelistPath,
  zPutWorkspacesCurrentRbacAppsByAppIdWhitelistResponse,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesBody,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesPath,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesResponse,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistBody,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistPath,
  zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistResponse,
  zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesBody,
  zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesPath,
  zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesResponse,
  zPutWorkspacesCurrentRbacRolesByRoleIdPath,
  zPutWorkspacesCurrentRbacRolesByRoleIdResponse,
  zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsBody,
  zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsPath,
  zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsResponse,
  zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsBody,
  zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsPath,
  zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsResponse,
  zPutWorkspacesCurrentToolProviderMcpBody,
  zPutWorkspacesCurrentToolProviderMcpResponse,
} from './zod.gen'

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

export const byProviderName = {
  get,
}

export const agentProvider = {
  byProviderName,
}

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

export const agentProviders = {
  get: get2,
}

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

export const confirm = {
  post,
}

export const byImportId = {
  confirm,
}

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

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

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

export const checkDependencies = {
  get: get3,
}

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

export const export_ = {
  get: get4,
}

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

export const increment = {
  post: post3,
}

export const useCount = {
  increment,
}

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

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

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

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

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

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

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

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

export const datasetOperators = {
  get: get7,
}

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

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

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

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

export const create = {
  post: post6,
}

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

export const delete2 = {
  post: post7,
}

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

export const disable = {
  post: post8,
}

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

export const enable = {
  post: post9,
}

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

export const plugin = {
  get: get9,
}

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

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

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

export const update = {
  post: post10,
}

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

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

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

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

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

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

export const inviteEmail = {
  post: post12,
}

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

export const ownerTransferCheck = {
  post: post13,
}

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

export const sendOwnerTransferConfirmEmail = {
  post: post14,
}

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

export const ownerTransfer = {
  post: post15,
}

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

export const updateRole = {
  put,
}

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

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

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

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

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

export const checkoutUrl = {
  get: get12,
}

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

export const switch_ = {
  post: post16,
}

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

export const validate = {
  post: post17,
}

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

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

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

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

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

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

export const switch2 = {
  post: post19,
}

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

export const validate2 = {
  post: post20,
}

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

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

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

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

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

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

export const disable2 = {
  patch: patch3,
}

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

export const enable2 = {
  patch: patch4,
}

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

export const credentialsValidate = {
  post: post22,
}

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

export const credentialsValidate2 = {
  post: post23,
}

export const byConfigId = {
  credentialsValidate: credentialsValidate2,
}

export const loadBalancingConfigs = {
  credentialsValidate,
  byConfigId,
}

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

export const parameterRules = {
  get: get15,
}

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

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

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

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

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

export const preferredProviderType = {
  post: post25,
}

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

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

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

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

export const byModelType = {
  get: get18,
}

export const modelTypes = {
  byModelType,
}

export const models2 = {
  modelTypes,
}

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

export const permission = {
  get: get19,
}

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

export const asset = {
  get: get20,
}

export const post26 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginAutoUpgradeChange',
    path: '/workspaces/current/plugin/auto-upgrade/change',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginAutoUpgradeChangeBody }))
  .output(zPostWorkspacesCurrentPluginAutoUpgradeChangeResponse)

export const change = {
  post: post26,
}

export const post27 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentPluginAutoUpgradeExclude',
    path: '/workspaces/current/plugin/auto-upgrade/exclude',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWorkspacesCurrentPluginAutoUpgradeExcludeBody }))
  .output(zPostWorkspacesCurrentPluginAutoUpgradeExcludeResponse)

export const exclude = {
  post: post27,
}

export const get21 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginAutoUpgradeFetch',
    path: '/workspaces/current/plugin/auto-upgrade/fetch',
    tags: ['console'],
  })
  .input(z.object({ query: zGetWorkspacesCurrentPluginAutoUpgradeFetchQuery }))
  .output(zGetWorkspacesCurrentPluginAutoUpgradeFetchResponse)

export const fetch_ = {
  get: get21,
}

export const autoUpgrade = {
  change,
  exclude,
  fetch: fetch_,
}

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

export const debuggingKey = {
  get: get22,
}

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

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

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

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

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

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

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

export const installations = {
  ids,
}

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

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

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

export const marketplace2 = {
  pkg: pkg2,
}

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

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

export const parameters = {
  dynamicOptions,
  dynamicOptionsWithCredentials,
}

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

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

export const fetch2 = {
  get: get28,
}

export const permission2 = {
  change: change2,
  fetch: fetch2,
}

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

export const readme = {
  get: get29,
}

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

export const deleteAll = {
  post: post35,
}

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

export const byIdentifier = {
  post: post36,
}

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

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

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

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

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

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

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

export const uninstall = {
  post: post38,
}

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

export const github2 = {
  post: post39,
}

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

export const marketplace3 = {
  post: post40,
}

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

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

export const bundle = {
  post: post41,
}

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

export const github3 = {
  post: post42,
}

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

export const pkg3 = {
  post: post43,
}

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

export const get32 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentPluginByCategoryList',
    path: '/workspaces/current/plugin/{category}/list',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentPluginByCategoryListPath,
      query: zGetWorkspacesCurrentPluginByCategoryListQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentPluginByCategoryListResponse)

export const list3 = {
  get: get32,
}

export const byCategory = {
  list: list3,
}

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

export const post44 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentRbacAccessPoliciesByPolicyIdCopy',
    path: '/workspaces/current/rbac/access-policies/{policy_id}/copy',
    successStatus: 201,
    tags: ['console'],
  })
  .input(z.object({ params: zPostWorkspacesCurrentRbacAccessPoliciesByPolicyIdCopyPath }))
  .output(zPostWorkspacesCurrentRbacAccessPoliciesByPolicyIdCopyResponse)

export const copy = {
  post: post44,
}

export const delete9 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentRbacAccessPoliciesByPolicyId',
    path: '/workspaces/current/rbac/access-policies/{policy_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath }))
  .output(zDeleteWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse)

export const get33 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAccessPoliciesByPolicyId',
    path: '/workspaces/current/rbac/access-policies/{policy_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath }))
  .output(zGetWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse)

export const put4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacAccessPoliciesByPolicyId',
    path: '/workspaces/current/rbac/access-policies/{policy_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zPutWorkspacesCurrentRbacAccessPoliciesByPolicyIdPath }))
  .output(zPutWorkspacesCurrentRbacAccessPoliciesByPolicyIdResponse)

export const byPolicyId = {
  delete: delete9,
  get: get33,
  put: put4,
  copy,
}

export const get34 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAccessPolicies',
    path: '/workspaces/current/rbac/access-policies',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacAccessPoliciesResponse)

export const post45 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentRbacAccessPolicies',
    path: '/workspaces/current/rbac/access-policies',
    successStatus: 201,
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentRbacAccessPoliciesResponse)

export const accessPolicies = {
  get: get34,
  post: post45,
  byPolicyId,
}

export const put5 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdLock',
    path: '/workspaces/current/rbac/access-policy-bindings/{binding_id}/lock',
    tags: ['console'],
  })
  .input(z.object({ params: zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdLockPath }))
  .output(zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdLockResponse)

export const lock = {
  put: put5,
}

export const put6 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdUnlock',
    path: '/workspaces/current/rbac/access-policy-bindings/{binding_id}/unlock',
    tags: ['console'],
  })
  .input(z.object({ params: zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdUnlockPath }))
  .output(zPutWorkspacesCurrentRbacAccessPolicyBindingsByBindingIdUnlockResponse)

export const unlock = {
  put: put6,
}

export const byBindingId = {
  lock,
  unlock,
}

export const accessPolicyBindings = {
  byBindingId,
}

export const delete10 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/apps/{app_id}/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsBody,
      params: zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(zDeleteWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsResponse)

export const get35 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/apps/{app_id}/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdMemberBindingsResponse)

export const memberBindings = {
  delete: delete10,
  get: get35,
}

export const get36 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdRoleBindings',
    path: '/workspaces/current/rbac/apps/{app_id}/access-policies/{policy_id}/role-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdRoleBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacAppsByAppIdAccessPoliciesByPolicyIdRoleBindingsResponse)

export const roleBindings = {
  get: get36,
}

export const byPolicyId2 = {
  memberBindings,
  roleBindings,
}

export const accessPolicies2 = {
  byPolicyId: byPolicyId2,
}

export const get37 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAppsByAppIdAccessPolicy',
    path: '/workspaces/current/rbac/apps/{app_id}/access-policy',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyPath,
      query: zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentRbacAppsByAppIdAccessPolicyResponse)

export const accessPolicy = {
  get: get37,
}

export const get38 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAppsByAppIdUserAccessPolicies',
    path: '/workspaces/current/rbac/apps/{app_id}/user-access-policies',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesPath,
      query: zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentRbacAppsByAppIdUserAccessPoliciesResponse)

export const userAccessPolicies = {
  get: get38,
}

export const put7 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPolicies',
    path: '/workspaces/current/rbac/apps/{app_id}/users/{target_account_id}/access-policies',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesBody,
      params: zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacAppsByAppIdUsersByTargetAccountIdAccessPoliciesResponse)

export const accessPolicies3 = {
  put: put7,
}

export const byTargetAccountId = {
  accessPolicies: accessPolicies3,
}

export const users = {
  byTargetAccountId,
}

export const get39 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacAppsByAppIdWhitelist',
    path: '/workspaces/current/rbac/apps/{app_id}/whitelist',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacAppsByAppIdWhitelistPath }))
  .output(zGetWorkspacesCurrentRbacAppsByAppIdWhitelistResponse)

export const put8 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacAppsByAppIdWhitelist',
    path: '/workspaces/current/rbac/apps/{app_id}/whitelist',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacAppsByAppIdWhitelistBody,
      params: zPutWorkspacesCurrentRbacAppsByAppIdWhitelistPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacAppsByAppIdWhitelistResponse)

export const whitelist = {
  get: get39,
  put: put8,
}

export const byAppId = {
  accessPolicies: accessPolicies2,
  accessPolicy,
  userAccessPolicies,
  users,
  whitelist,
}

export const apps = {
  byAppId,
}

export const delete11 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId:
      'deleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsBody,
      params:
        zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(
    zDeleteWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  )

export const get40 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId:
      'getWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params:
        zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(
    zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdMemberBindingsResponse,
  )

export const memberBindings2 = {
  delete: delete11,
  get: get40,
}

export const get41 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdRoleBindings',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/access-policies/{policy_id}/role-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdRoleBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPoliciesByPolicyIdRoleBindingsResponse)

export const roleBindings2 = {
  get: get41,
}

export const byPolicyId3 = {
  memberBindings: memberBindings2,
  roleBindings: roleBindings2,
}

export const accessPolicies4 = {
  byPolicyId: byPolicyId3,
}

export const get42 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicy',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/access-policy',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyPath,
      query: zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentRbacDatasetsByDatasetIdAccessPolicyResponse)

export const accessPolicy2 = {
  get: get42,
}

export const get43 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPolicies',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/user-access-policies',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesPath,
      query: zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesQuery.optional(),
    }),
  )
  .output(zGetWorkspacesCurrentRbacDatasetsByDatasetIdUserAccessPoliciesResponse)

export const userAccessPolicies2 = {
  get: get43,
}

export const put9 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPolicies',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/users/{target_account_id}/access-policies',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesBody,
      params: zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacDatasetsByDatasetIdUsersByTargetAccountIdAccessPoliciesResponse)

export const accessPolicies5 = {
  put: put9,
}

export const byTargetAccountId2 = {
  accessPolicies: accessPolicies5,
}

export const users2 = {
  byTargetAccountId: byTargetAccountId2,
}

export const get44 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacDatasetsByDatasetIdWhitelist',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/whitelist',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistPath }))
  .output(zGetWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistResponse)

export const put10 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacDatasetsByDatasetIdWhitelist',
    path: '/workspaces/current/rbac/datasets/{dataset_id}/whitelist',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistBody,
      params: zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacDatasetsByDatasetIdWhitelistResponse)

export const whitelist2 = {
  get: get44,
  put: put10,
}

export const byDatasetId = {
  accessPolicies: accessPolicies4,
  accessPolicy: accessPolicy2,
  userAccessPolicies: userAccessPolicies2,
  users: users2,
  whitelist: whitelist2,
}

export const datasets = {
  byDatasetId,
}

export const get45 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacMembersByMemberIdRbacRoles',
    path: '/workspaces/current/rbac/members/{member_id}/rbac-roles',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacMembersByMemberIdRbacRolesPath }))
  .output(zGetWorkspacesCurrentRbacMembersByMemberIdRbacRolesResponse)

export const put11 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacMembersByMemberIdRbacRoles',
    path: '/workspaces/current/rbac/members/{member_id}/rbac-roles',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesBody,
      params: zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacMembersByMemberIdRbacRolesResponse)

export const rbacRoles = {
  get: get45,
  put: put11,
}

export const byMemberId2 = {
  rbacRoles,
}

export const members2 = {
  byMemberId: byMemberId2,
}

export const get46 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacMyPermissions',
    path: '/workspaces/current/rbac/my-permissions',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacMyPermissionsResponse)

export const myPermissions = {
  get: get46,
}

export const get47 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRolePermissionsCatalogApp',
    path: '/workspaces/current/rbac/role-permissions/catalog/app',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacRolePermissionsCatalogAppResponse)

export const app = {
  get: get47,
}

export const get48 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRolePermissionsCatalogDataset',
    path: '/workspaces/current/rbac/role-permissions/catalog/dataset',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacRolePermissionsCatalogDatasetResponse)

export const dataset = {
  get: get48,
}

export const get49 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRolePermissionsCatalog',
    path: '/workspaces/current/rbac/role-permissions/catalog',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacRolePermissionsCatalogResponse)

export const catalog = {
  get: get49,
  app,
  dataset,
}

export const rolePermissions = {
  catalog,
}

export const post46 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentRbacRolesByRoleIdCopy',
    path: '/workspaces/current/rbac/roles/{role_id}/copy',
    successStatus: 201,
    tags: ['console'],
  })
  .input(z.object({ params: zPostWorkspacesCurrentRbacRolesByRoleIdCopyPath }))
  .output(zPostWorkspacesCurrentRbacRolesByRoleIdCopyResponse)

export const copy2 = {
  post: post46,
}

export const get50 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRolesByRoleIdMembers',
    path: '/workspaces/current/rbac/roles/{role_id}/members',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacRolesByRoleIdMembersPath }))
  .output(zGetWorkspacesCurrentRbacRolesByRoleIdMembersResponse)

export const members3 = {
  get: get50,
}

export const delete12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteWorkspacesCurrentRbacRolesByRoleId',
    path: '/workspaces/current/rbac/roles/{role_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteWorkspacesCurrentRbacRolesByRoleIdPath }))
  .output(zDeleteWorkspacesCurrentRbacRolesByRoleIdResponse)

export const get51 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRolesByRoleId',
    path: '/workspaces/current/rbac/roles/{role_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetWorkspacesCurrentRbacRolesByRoleIdPath }))
  .output(zGetWorkspacesCurrentRbacRolesByRoleIdResponse)

export const put12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacRolesByRoleId',
    path: '/workspaces/current/rbac/roles/{role_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zPutWorkspacesCurrentRbacRolesByRoleIdPath }))
  .output(zPutWorkspacesCurrentRbacRolesByRoleIdResponse)

export const byRoleId = {
  delete: delete12,
  get: get51,
  put: put12,
  copy: copy2,
  members: members3,
}

export const get52 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacRoles',
    path: '/workspaces/current/rbac/roles',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacRolesResponse)

export const post47 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postWorkspacesCurrentRbacRoles',
    path: '/workspaces/current/rbac/roles',
    successStatus: 201,
    tags: ['console'],
  })
  .output(zPostWorkspacesCurrentRbacRolesResponse)

export const roles = {
  get: get52,
  post: post47,
  byRoleId,
}

export const put13 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindings',
    path: '/workspaces/current/rbac/workspace/apps/access-policies/{policy_id}/bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsBody,
      params: zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdBindingsResponse)

export const bindings = {
  put: put13,
}

export const get53 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/workspace/apps/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdMemberBindingsResponse)

export const memberBindings3 = {
  get: get53,
}

export const get54 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdRoleBindings',
    path: '/workspaces/current/rbac/workspace/apps/access-policies/{policy_id}/role-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdRoleBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacWorkspaceAppsAccessPoliciesByPolicyIdRoleBindingsResponse)

export const roleBindings3 = {
  get: get54,
}

export const byPolicyId4 = {
  bindings,
  memberBindings: memberBindings3,
  roleBindings: roleBindings3,
}

export const accessPolicies6 = {
  byPolicyId: byPolicyId4,
}

export const get55 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceAppsAccessPolicy',
    path: '/workspaces/current/rbac/workspace/apps/access-policy',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacWorkspaceAppsAccessPolicyResponse)

export const accessPolicy3 = {
  get: get55,
}

export const apps2 = {
  accessPolicies: accessPolicies6,
  accessPolicy: accessPolicy3,
}

export const put14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindings',
    path: '/workspaces/current/rbac/workspace/datasets/access-policies/{policy_id}/bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsBody,
      params: zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsPath,
    }),
  )
  .output(zPutWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdBindingsResponse)

export const bindings2 = {
  put: put14,
}

export const get56 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdMemberBindings',
    path: '/workspaces/current/rbac/workspace/datasets/access-policies/{policy_id}/member-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdMemberBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdMemberBindingsResponse)

export const memberBindings4 = {
  get: get56,
}

export const get57 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdRoleBindings',
    path: '/workspaces/current/rbac/workspace/datasets/access-policies/{policy_id}/role-bindings',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdRoleBindingsPath,
    }),
  )
  .output(zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPoliciesByPolicyIdRoleBindingsResponse)

export const roleBindings4 = {
  get: get57,
}

export const byPolicyId5 = {
  bindings: bindings2,
  memberBindings: memberBindings4,
  roleBindings: roleBindings4,
}

export const accessPolicies7 = {
  byPolicyId: byPolicyId5,
}

export const get58 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getWorkspacesCurrentRbacWorkspaceDatasetsAccessPolicy',
    path: '/workspaces/current/rbac/workspace/datasets/access-policy',
    tags: ['console'],
  })
  .output(zGetWorkspacesCurrentRbacWorkspaceDatasetsAccessPolicyResponse)

export const accessPolicy4 = {
  get: get58,
}

export const datasets2 = {
  accessPolicies: accessPolicies7,
  accessPolicy: accessPolicy4,
}

export const workspace = {
  apps: apps2,
  datasets: datasets2,
}

export const rbac = {
  accessPolicies,
  accessPolicyBindings,
  apps,
  datasets,
  members: members2,
  myPermissions,
  rolePermissions,
  roles,
  workspace,
}

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

export const toolLabels = {
  get: get59,
}

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

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

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

export const get61 = {
  get: get60,
}

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

export const remote = {
  get: get62,
}

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

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

export const test = {
  pre,
}

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

export const tools = {
  get: get63,
}

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

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

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

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

export const info = {
  get: get64,
}

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

export const schema2 = {
  byCredentialType,
}

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

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

export const credentials3 = {
  get: get66,
}

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

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

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

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

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

export const delete15 = 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 get70 = 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 post56 = 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: delete15,
  get: get70,
  post: post56,
}

export const oauth = {
  clientSchema,
  customClient,
}

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

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

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

export const builtin = {
  byProvider: byProvider2,
}

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

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

export const tools3 = {
  byProviderId,
}

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

export const update4 = {
  byProviderId: byProviderId2,
}

export const delete16 = 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 post59 = 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 put15 = 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: delete16,
  post: post59,
  put: put15,
  auth,
  tools: tools3,
  update: update4,
}

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

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

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

export const get75 = {
  get: get74,
}

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

export const tools4 = {
  get: get76,
}

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

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

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

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

export const toolProviders = {
  get: get77,
}

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

export const api2 = {
  get: get78,
}

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

export const builtin2 = {
  get: get79,
}

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

export const mcp2 = {
  get: get80,
}

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

export const workflow2 = {
  get: get81,
}

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

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

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

/**
 * Remove custom OAuth client configuration
 */
export const delete18 = 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 get84 = 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 post63 = 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: delete18,
  get: get84,
  post: post63,
}

export const oauth2 = {
  client,
}

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

export const build = {
  bySubscriptionBuilderId,
}

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

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

export const logs = {
  bySubscriptionBuilderId: bySubscriptionBuilderId2,
}

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

export const update6 = {
  bySubscriptionBuilderId: bySubscriptionBuilderId3,
}

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

export const verifyAndUpdate = {
  bySubscriptionBuilderId: bySubscriptionBuilderId4,
}

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

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

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

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

export const oauth3 = {
  authorize,
}

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

export const verify = {
  bySubscriptionId,
}

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

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

/**
 * Delete a subscription instance
 */
export const post69 = 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 delete19 = {
  post: post69,
}

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

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

export const bySubscriptionId2 = {
  subscriptions: subscriptions2,
}

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

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

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

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

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

export const upload2 = {
  post: post72,
}

export const webappLogo = {
  upload: upload2,
}

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

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

export const info4 = {
  post: post74,
}

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

export const switch3 = {
  post: post75,
}

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

export const byIconType = {
  byLang,
}

export const byProvider4 = {
  byIconType,
}

export const modelProviders2 = {
  byProvider: byProvider4,
}

export const byTenantId = {
  modelProviders: modelProviders2,
}

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

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

export const contract = {
  workspaces,
}
