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

import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
  zDeleteAppsByAppIdAgentConfigFilesByNamePath,
  zDeleteAppsByAppIdAgentConfigFilesByNameQuery,
  zDeleteAppsByAppIdAgentConfigFilesByNameResponse,
  zDeleteAppsByAppIdAgentConfigSkillsByNamePath,
  zDeleteAppsByAppIdAgentConfigSkillsByNameQuery,
  zDeleteAppsByAppIdAgentConfigSkillsByNameResponse,
  zDeleteAppsByAppIdAgentFilesPath,
  zDeleteAppsByAppIdAgentFilesQuery,
  zDeleteAppsByAppIdAgentFilesResponse,
  zDeleteAppsByAppIdAgentSkillsBySlugPath,
  zDeleteAppsByAppIdAgentSkillsBySlugQuery,
  zDeleteAppsByAppIdAgentSkillsBySlugResponse,
  zDeleteAppsByAppIdAnnotationsByAnnotationIdPath,
  zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse,
  zDeleteAppsByAppIdAnnotationsPath,
  zDeleteAppsByAppIdAnnotationsResponse,
  zDeleteAppsByAppIdChatConversationsByConversationIdPath,
  zDeleteAppsByAppIdChatConversationsByConversationIdResponse,
  zDeleteAppsByAppIdCompletionConversationsByConversationIdPath,
  zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse,
  zDeleteAppsByAppIdPath,
  zDeleteAppsByAppIdResponse,
  zDeleteAppsByAppIdStarPath,
  zDeleteAppsByAppIdStarResponse,
  zDeleteAppsByAppIdTraceConfigPath,
  zDeleteAppsByAppIdTraceConfigQuery,
  zDeleteAppsByAppIdTraceConfigResponse,
  zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath,
  zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
  zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse,
  zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse,
  zDeleteAppsByAppIdWorkflowsByWorkflowIdPath,
  zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse,
  zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath,
  zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse,
  zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
  zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
  zDeleteAppsByAppIdWorkflowsDraftVariablesPath,
  zDeleteAppsByAppIdWorkflowsDraftVariablesResponse,
  zDeleteAppsByResourceIdApiKeysByApiKeyIdPath,
  zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse,
  zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath,
  zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery,
  zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse,
  zGetAppsByAppIdAdvancedChatWorkflowRunsPath,
  zGetAppsByAppIdAdvancedChatWorkflowRunsQuery,
  zGetAppsByAppIdAdvancedChatWorkflowRunsResponse,
  zGetAppsByAppIdAgentConfigFilesByNameDownloadPath,
  zGetAppsByAppIdAgentConfigFilesByNameDownloadQuery,
  zGetAppsByAppIdAgentConfigFilesByNameDownloadResponse,
  zGetAppsByAppIdAgentConfigFilesByNamePreviewPath,
  zGetAppsByAppIdAgentConfigFilesByNamePreviewQuery,
  zGetAppsByAppIdAgentConfigFilesByNamePreviewResponse,
  zGetAppsByAppIdAgentConfigFilesPath,
  zGetAppsByAppIdAgentConfigFilesQuery,
  zGetAppsByAppIdAgentConfigFilesResponse,
  zGetAppsByAppIdAgentConfigManifestPath,
  zGetAppsByAppIdAgentConfigManifestQuery,
  zGetAppsByAppIdAgentConfigManifestResponse,
  zGetAppsByAppIdAgentConfigSkillsByNameDownloadPath,
  zGetAppsByAppIdAgentConfigSkillsByNameDownloadQuery,
  zGetAppsByAppIdAgentConfigSkillsByNameDownloadResponse,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesContentPath,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesContentResponse,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadPath,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadQuery,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadResponse,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewPath,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewQuery,
  zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewResponse,
  zGetAppsByAppIdAgentConfigSkillsByNameInspectPath,
  zGetAppsByAppIdAgentConfigSkillsByNameInspectQuery,
  zGetAppsByAppIdAgentConfigSkillsByNameInspectResponse,
  zGetAppsByAppIdAgentConfigSkillsPath,
  zGetAppsByAppIdAgentConfigSkillsQuery,
  zGetAppsByAppIdAgentConfigSkillsResponse,
  zGetAppsByAppIdAgentDriveFilesDownloadPath,
  zGetAppsByAppIdAgentDriveFilesDownloadQuery,
  zGetAppsByAppIdAgentDriveFilesDownloadResponse,
  zGetAppsByAppIdAgentDriveFilesPath,
  zGetAppsByAppIdAgentDriveFilesPreviewPath,
  zGetAppsByAppIdAgentDriveFilesPreviewQuery,
  zGetAppsByAppIdAgentDriveFilesPreviewResponse,
  zGetAppsByAppIdAgentDriveFilesQuery,
  zGetAppsByAppIdAgentDriveFilesResponse,
  zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectPath,
  zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectQuery,
  zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectResponse,
  zGetAppsByAppIdAgentDriveSkillsPath,
  zGetAppsByAppIdAgentDriveSkillsQuery,
  zGetAppsByAppIdAgentDriveSkillsResponse,
  zGetAppsByAppIdAgentLogsPath,
  zGetAppsByAppIdAgentLogsQuery,
  zGetAppsByAppIdAgentLogsResponse,
  zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath,
  zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse,
  zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath,
  zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse,
  zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath,
  zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery,
  zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse,
  zGetAppsByAppIdAnnotationsCountPath,
  zGetAppsByAppIdAnnotationsCountResponse,
  zGetAppsByAppIdAnnotationSettingPath,
  zGetAppsByAppIdAnnotationSettingResponse,
  zGetAppsByAppIdAnnotationsExportPath,
  zGetAppsByAppIdAnnotationsExportResponse,
  zGetAppsByAppIdAnnotationsPath,
  zGetAppsByAppIdAnnotationsQuery,
  zGetAppsByAppIdAnnotationsResponse,
  zGetAppsByAppIdChatConversationsByConversationIdPath,
  zGetAppsByAppIdChatConversationsByConversationIdResponse,
  zGetAppsByAppIdChatConversationsPath,
  zGetAppsByAppIdChatConversationsQuery,
  zGetAppsByAppIdChatConversationsResponse,
  zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath,
  zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse,
  zGetAppsByAppIdChatMessagesPath,
  zGetAppsByAppIdChatMessagesQuery,
  zGetAppsByAppIdChatMessagesResponse,
  zGetAppsByAppIdCompletionConversationsByConversationIdPath,
  zGetAppsByAppIdCompletionConversationsByConversationIdResponse,
  zGetAppsByAppIdCompletionConversationsPath,
  zGetAppsByAppIdCompletionConversationsQuery,
  zGetAppsByAppIdCompletionConversationsResponse,
  zGetAppsByAppIdConversationVariablesPath,
  zGetAppsByAppIdConversationVariablesQuery,
  zGetAppsByAppIdConversationVariablesResponse,
  zGetAppsByAppIdExportPath,
  zGetAppsByAppIdExportQuery,
  zGetAppsByAppIdExportResponse,
  zGetAppsByAppIdFeedbacksExportPath,
  zGetAppsByAppIdFeedbacksExportQuery,
  zGetAppsByAppIdFeedbacksExportResponse,
  zGetAppsByAppIdMessagesByMessageIdPath,
  zGetAppsByAppIdMessagesByMessageIdResponse,
  zGetAppsByAppIdPath,
  zGetAppsByAppIdResponse,
  zGetAppsByAppIdServerPath,
  zGetAppsByAppIdServerResponse,
  zGetAppsByAppIdStatisticsAverageResponseTimePath,
  zGetAppsByAppIdStatisticsAverageResponseTimeQuery,
  zGetAppsByAppIdStatisticsAverageResponseTimeResponse,
  zGetAppsByAppIdStatisticsAverageSessionInteractionsPath,
  zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery,
  zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse,
  zGetAppsByAppIdStatisticsDailyConversationsPath,
  zGetAppsByAppIdStatisticsDailyConversationsQuery,
  zGetAppsByAppIdStatisticsDailyConversationsResponse,
  zGetAppsByAppIdStatisticsDailyEndUsersPath,
  zGetAppsByAppIdStatisticsDailyEndUsersQuery,
  zGetAppsByAppIdStatisticsDailyEndUsersResponse,
  zGetAppsByAppIdStatisticsDailyMessagesPath,
  zGetAppsByAppIdStatisticsDailyMessagesQuery,
  zGetAppsByAppIdStatisticsDailyMessagesResponse,
  zGetAppsByAppIdStatisticsTokenCostsPath,
  zGetAppsByAppIdStatisticsTokenCostsQuery,
  zGetAppsByAppIdStatisticsTokenCostsResponse,
  zGetAppsByAppIdStatisticsTokensPerSecondPath,
  zGetAppsByAppIdStatisticsTokensPerSecondQuery,
  zGetAppsByAppIdStatisticsTokensPerSecondResponse,
  zGetAppsByAppIdStatisticsUserSatisfactionRatePath,
  zGetAppsByAppIdStatisticsUserSatisfactionRateQuery,
  zGetAppsByAppIdStatisticsUserSatisfactionRateResponse,
  zGetAppsByAppIdTextToAudioVoicesPath,
  zGetAppsByAppIdTextToAudioVoicesQuery,
  zGetAppsByAppIdTextToAudioVoicesResponse,
  zGetAppsByAppIdTraceConfigPath,
  zGetAppsByAppIdTraceConfigQuery,
  zGetAppsByAppIdTraceConfigResponse,
  zGetAppsByAppIdTracePath,
  zGetAppsByAppIdTraceResponse,
  zGetAppsByAppIdTriggersPath,
  zGetAppsByAppIdTriggersResponse,
  zGetAppsByAppIdWorkflowAppLogsPath,
  zGetAppsByAppIdWorkflowAppLogsQuery,
  zGetAppsByAppIdWorkflowAppLogsResponse,
  zGetAppsByAppIdWorkflowArchivedLogsPath,
  zGetAppsByAppIdWorkflowArchivedLogsQuery,
  zGetAppsByAppIdWorkflowArchivedLogsResponse,
  zGetAppsByAppIdWorkflowCommentsByCommentIdPath,
  zGetAppsByAppIdWorkflowCommentsByCommentIdResponse,
  zGetAppsByAppIdWorkflowCommentsMentionUsersPath,
  zGetAppsByAppIdWorkflowCommentsMentionUsersResponse,
  zGetAppsByAppIdWorkflowCommentsPath,
  zGetAppsByAppIdWorkflowCommentsResponse,
  zGetAppsByAppIdWorkflowRunsByRunIdExportPath,
  zGetAppsByAppIdWorkflowRunsByRunIdExportResponse,
  zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath,
  zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse,
  zGetAppsByAppIdWorkflowRunsByRunIdPath,
  zGetAppsByAppIdWorkflowRunsByRunIdResponse,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesPath,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesQuery,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadPath,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadQuery,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadResponse,
  zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesResponse,
  zGetAppsByAppIdWorkflowRunsCountPath,
  zGetAppsByAppIdWorkflowRunsCountQuery,
  zGetAppsByAppIdWorkflowRunsCountResponse,
  zGetAppsByAppIdWorkflowRunsPath,
  zGetAppsByAppIdWorkflowRunsQuery,
  zGetAppsByAppIdWorkflowRunsResponse,
  zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
  zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery,
  zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse,
  zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath,
  zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse,
  zGetAppsByAppIdWorkflowsDraftConversationVariablesPath,
  zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse,
  zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
  zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesPath,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponse,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerQuery,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath,
  zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse,
  zGetAppsByAppIdWorkflowsDraftPath,
  zGetAppsByAppIdWorkflowsDraftResponse,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewPath,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdPath,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdResponse,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsPath,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsResponse,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsPath,
  zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsResponse,
  zGetAppsByAppIdWorkflowsDraftSystemVariablesPath,
  zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse,
  zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
  zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
  zGetAppsByAppIdWorkflowsDraftVariablesPath,
  zGetAppsByAppIdWorkflowsDraftVariablesQuery,
  zGetAppsByAppIdWorkflowsDraftVariablesResponse,
  zGetAppsByAppIdWorkflowsPath,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewPath,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdPath,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdResponse,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsPath,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsResponse,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsPath,
  zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsResponse,
  zGetAppsByAppIdWorkflowsPublishPath,
  zGetAppsByAppIdWorkflowsPublishResponse,
  zGetAppsByAppIdWorkflowsQuery,
  zGetAppsByAppIdWorkflowsResponse,
  zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath,
  zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery,
  zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse,
  zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath,
  zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery,
  zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse,
  zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath,
  zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery,
  zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse,
  zGetAppsByAppIdWorkflowStatisticsTokenCostsPath,
  zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery,
  zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse,
  zGetAppsByAppIdWorkflowsTriggersWebhookPath,
  zGetAppsByAppIdWorkflowsTriggersWebhookQuery,
  zGetAppsByAppIdWorkflowsTriggersWebhookResponse,
  zGetAppsByResourceIdApiKeysPath,
  zGetAppsByResourceIdApiKeysResponse,
  zGetAppsByServerIdServerRefreshPath,
  zGetAppsByServerIdServerRefreshResponse,
  zGetAppsImportsByAppIdCheckDependenciesPath,
  zGetAppsImportsByAppIdCheckDependenciesResponse,
  zGetAppsQuery,
  zGetAppsRecentQuery,
  zGetAppsRecentResponse,
  zGetAppsResponse,
  zGetAppsStarredQuery,
  zGetAppsStarredResponse,
  zPatchAppsByAppIdTraceConfigBody,
  zPatchAppsByAppIdTraceConfigPath,
  zPatchAppsByAppIdTraceConfigResponse,
  zPatchAppsByAppIdWorkflowsByWorkflowIdBody,
  zPatchAppsByAppIdWorkflowsByWorkflowIdPath,
  zPatchAppsByAppIdWorkflowsByWorkflowIdResponse,
  zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody,
  zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
  zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
  zPostAppsBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath,
  zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse,
  zPostAppsByAppIdAgentConfigFilesBody,
  zPostAppsByAppIdAgentConfigFilesPath,
  zPostAppsByAppIdAgentConfigFilesQuery,
  zPostAppsByAppIdAgentConfigFilesResponse,
  zPostAppsByAppIdAgentConfigSkillsUploadBody,
  zPostAppsByAppIdAgentConfigSkillsUploadPath,
  zPostAppsByAppIdAgentConfigSkillsUploadQuery,
  zPostAppsByAppIdAgentConfigSkillsUploadResponse,
  zPostAppsByAppIdAgentFilesBody,
  zPostAppsByAppIdAgentFilesPath,
  zPostAppsByAppIdAgentFilesQuery,
  zPostAppsByAppIdAgentFilesResponse,
  zPostAppsByAppIdAgentSkillsBySlugInferToolsPath,
  zPostAppsByAppIdAgentSkillsBySlugInferToolsQuery,
  zPostAppsByAppIdAgentSkillsBySlugInferToolsResponse,
  zPostAppsByAppIdAgentSkillsUploadBody,
  zPostAppsByAppIdAgentSkillsUploadPath,
  zPostAppsByAppIdAgentSkillsUploadQuery,
  zPostAppsByAppIdAgentSkillsUploadResponse,
  zPostAppsByAppIdAnnotationReplyByActionBody,
  zPostAppsByAppIdAnnotationReplyByActionPath,
  zPostAppsByAppIdAnnotationReplyByActionResponse,
  zPostAppsByAppIdAnnotationsBatchImportPath,
  zPostAppsByAppIdAnnotationsBatchImportResponse,
  zPostAppsByAppIdAnnotationsBody,
  zPostAppsByAppIdAnnotationsByAnnotationIdBody,
  zPostAppsByAppIdAnnotationsByAnnotationIdPath,
  zPostAppsByAppIdAnnotationsByAnnotationIdResponse,
  zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody,
  zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath,
  zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse,
  zPostAppsByAppIdAnnotationsPath,
  zPostAppsByAppIdAnnotationsResponse,
  zPostAppsByAppIdApiEnableBody,
  zPostAppsByAppIdApiEnablePath,
  zPostAppsByAppIdApiEnableResponse,
  zPostAppsByAppIdAudioToTextBody,
  zPostAppsByAppIdAudioToTextPath,
  zPostAppsByAppIdAudioToTextResponse,
  zPostAppsByAppIdChatMessagesByTaskIdStopPath,
  zPostAppsByAppIdChatMessagesByTaskIdStopResponse,
  zPostAppsByAppIdCompletionMessagesBody,
  zPostAppsByAppIdCompletionMessagesByTaskIdStopPath,
  zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse,
  zPostAppsByAppIdCompletionMessagesPath,
  zPostAppsByAppIdCompletionMessagesResponse,
  zPostAppsByAppIdConvertToWorkflowBody,
  zPostAppsByAppIdConvertToWorkflowPath,
  zPostAppsByAppIdConvertToWorkflowResponse,
  zPostAppsByAppIdCopyBody,
  zPostAppsByAppIdCopyPath,
  zPostAppsByAppIdCopyResponse,
  zPostAppsByAppIdFeedbacksBody,
  zPostAppsByAppIdFeedbacksPath,
  zPostAppsByAppIdFeedbacksResponse,
  zPostAppsByAppIdIconBody,
  zPostAppsByAppIdIconPath,
  zPostAppsByAppIdIconResponse,
  zPostAppsByAppIdModelConfigBody,
  zPostAppsByAppIdModelConfigPath,
  zPostAppsByAppIdModelConfigResponse,
  zPostAppsByAppIdNameBody,
  zPostAppsByAppIdNamePath,
  zPostAppsByAppIdNameResponse,
  zPostAppsByAppIdPublishToCreatorsPlatformPath,
  zPostAppsByAppIdPublishToCreatorsPlatformResponse,
  zPostAppsByAppIdServerBody,
  zPostAppsByAppIdServerPath,
  zPostAppsByAppIdServerResponse,
  zPostAppsByAppIdSiteAccessTokenResetPath,
  zPostAppsByAppIdSiteAccessTokenResetResponse,
  zPostAppsByAppIdSiteBody,
  zPostAppsByAppIdSiteEnableBody,
  zPostAppsByAppIdSiteEnablePath,
  zPostAppsByAppIdSiteEnableResponse,
  zPostAppsByAppIdSitePath,
  zPostAppsByAppIdSiteResponse,
  zPostAppsByAppIdStarPath,
  zPostAppsByAppIdStarResponse,
  zPostAppsByAppIdTextToAudioBody,
  zPostAppsByAppIdTextToAudioPath,
  zPostAppsByAppIdTextToAudioResponse,
  zPostAppsByAppIdTraceBody,
  zPostAppsByAppIdTraceConfigBody,
  zPostAppsByAppIdTraceConfigPath,
  zPostAppsByAppIdTraceConfigResponse,
  zPostAppsByAppIdTracePath,
  zPostAppsByAppIdTraceResponse,
  zPostAppsByAppIdTriggerEnableBody,
  zPostAppsByAppIdTriggerEnablePath,
  zPostAppsByAppIdTriggerEnableResponse,
  zPostAppsByAppIdWorkflowCommentsBody,
  zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody,
  zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath,
  zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse,
  zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath,
  zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse,
  zPostAppsByAppIdWorkflowCommentsPath,
  zPostAppsByAppIdWorkflowCommentsResponse,
  zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadBody,
  zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadPath,
  zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadResponse,
  zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath,
  zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse,
  zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath,
  zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse,
  zPostAppsByAppIdWorkflowsDraftBody,
  zPostAppsByAppIdWorkflowsDraftConversationVariablesBody,
  zPostAppsByAppIdWorkflowsDraftConversationVariablesPath,
  zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse,
  zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody,
  zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
  zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse,
  zPostAppsByAppIdWorkflowsDraftFeaturesBody,
  zPostAppsByAppIdWorkflowsDraftFeaturesPath,
  zPostAppsByAppIdWorkflowsDraftFeaturesResponse,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
  zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse,
  zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody,
  zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath,
  zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse,
  zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody,
  zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath,
  zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterBody,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterPath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactBody,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactPath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterBody,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterPath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateBody,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidatePath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath,
  zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse,
  zPostAppsByAppIdWorkflowsDraftPath,
  zPostAppsByAppIdWorkflowsDraftResponse,
  zPostAppsByAppIdWorkflowsDraftRunBody,
  zPostAppsByAppIdWorkflowsDraftRunPath,
  zPostAppsByAppIdWorkflowsDraftRunResponse,
  zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody,
  zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath,
  zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse,
  zPostAppsByAppIdWorkflowsDraftTriggerRunBody,
  zPostAppsByAppIdWorkflowsDraftTriggerRunPath,
  zPostAppsByAppIdWorkflowsDraftTriggerRunResponse,
  zPostAppsByAppIdWorkflowsPublishBody,
  zPostAppsByAppIdWorkflowsPublishPath,
  zPostAppsByAppIdWorkflowsPublishResponse,
  zPostAppsByResourceIdApiKeysPath,
  zPostAppsByResourceIdApiKeysResponse,
  zPostAppsImportsBody,
  zPostAppsImportsByImportIdConfirmPath,
  zPostAppsImportsByImportIdConfirmResponse,
  zPostAppsImportsResponse,
  zPostAppsResponse,
  zPostAppsWorkflowsOnlineUsersBody,
  zPostAppsWorkflowsOnlineUsersResponse,
  zPutAppsByAppIdBody,
  zPutAppsByAppIdPath,
  zPutAppsByAppIdResponse,
  zPutAppsByAppIdServerBody,
  zPutAppsByAppIdServerPath,
  zPutAppsByAppIdServerResponse,
  zPutAppsByAppIdWorkflowCommentsByCommentIdBody,
  zPutAppsByAppIdWorkflowCommentsByCommentIdPath,
  zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody,
  zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
  zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse,
  zPutAppsByAppIdWorkflowCommentsByCommentIdResponse,
  zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerBody,
  zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath,
  zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse,
  zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath,
  zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse,
} from './zod.gen'

export const get = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsImportsByAppIdCheckDependencies',
    path: '/apps/imports/{app_id}/check-dependencies',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsImportsByAppIdCheckDependenciesPath }))
  .output(zGetAppsImportsByAppIdCheckDependenciesResponse)

export const checkDependencies = {
  get,
}

export const byAppId = {
  checkDependencies,
}

export const post = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsImportsByImportIdConfirm',
    path: '/apps/imports/{import_id}/confirm',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsImportsByImportIdConfirmPath }))
  .output(zPostAppsImportsByImportIdConfirmResponse)

export const confirm = {
  post,
}

export const byImportId = {
  confirm,
}

export const post2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsImports',
    path: '/apps/imports',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsImportsBody }))
  .output(zPostAppsImportsResponse)

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

/**
 * Return the lightweight app cards needed by the Explore home page
 *
 * Get recently modified apps for the home Continue Work section
 */
export const get2 = oc
  .route({
    description: 'Get recently modified apps for the home Continue Work section',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsRecent',
    path: '/apps/recent',
    summary: 'Return the lightweight app cards needed by the Explore home page',
    tags: ['console'],
  })
  .input(z.object({ query: zGetAppsRecentQuery.optional() }))
  .output(zGetAppsRecentResponse)

export const recent = {
  get: get2,
}

/**
 * Get applications starred by the current account
 */
export const get3 = oc
  .route({
    description: 'Get applications starred by the current account',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsStarred',
    path: '/apps/starred',
    tags: ['console'],
  })
  .input(z.object({ query: zGetAppsStarredQuery.optional() }))
  .output(zGetAppsStarredResponse)

export const starred = {
  get: get3,
}

/**
 * Get workflow online users
 */
export const post3 = oc
  .route({
    description: 'Get workflow online users',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsWorkflowsOnlineUsers',
    path: '/apps/workflows/online-users',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsWorkflowsOnlineUsersBody }))
  .output(zPostAppsWorkflowsOnlineUsersResponse)

export const onlineUsers = {
  post: post3,
}

export const workflows = {
  onlineUsers,
}

/**
 * Get advanced chat workflow runs count statistics
 *
 * Get advanced chat workflow runs count statistics
 */
export const get4 = oc
  .route({
    description: 'Get advanced chat workflow runs count statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAdvancedChatWorkflowRunsCount',
    path: '/apps/{app_id}/advanced-chat/workflow-runs/count',
    summary: 'Get advanced chat workflow runs count statistics',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath,
      query: zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse)

export const count = {
  get: get4,
}

/**
 * Get advanced chat app workflow run list
 *
 * Get advanced chat workflow run list
 */
export const get5 = oc
  .route({
    description: 'Get advanced chat workflow run list',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAdvancedChatWorkflowRuns',
    path: '/apps/{app_id}/advanced-chat/workflow-runs',
    summary: 'Get advanced chat app workflow run list',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAdvancedChatWorkflowRunsPath,
      query: zGetAppsByAppIdAdvancedChatWorkflowRunsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAdvancedChatWorkflowRunsResponse)

export const workflowRuns = {
  get: get5,
  count,
}

/**
 * Preview human input form content and placeholders
 *
 * Get human input form preview for advanced chat workflow
 */
export const post4 = oc
  .route({
    description: 'Get human input form preview for advanced chat workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreview',
    path: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview',
    summary: 'Preview human input form content and placeholders',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
      params: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
    }),
  )
  .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse)

export const preview = {
  post: post4,
}

/**
 * Submit human input form preview
 *
 * Submit human input form preview for advanced chat workflow
 */
export const post5 = oc
  .route({
    description: 'Submit human input form preview for advanced chat workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRun',
    path: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run',
    summary: 'Submit human input form preview',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
      params: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
    }),
  )
  .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse)

export const run = {
  post: post5,
}

export const form = {
  preview,
  run,
}

export const byNodeId = {
  form,
}

export const nodes = {
  byNodeId,
}

export const humanInput = {
  nodes,
}

/**
 * Run draft workflow iteration node
 *
 * Run draft workflow iteration node for advanced chat
 */
export const post6 = oc
  .route({
    description: 'Run draft workflow iteration node for advanced chat',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRun',
    path: '/apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run',
    summary: 'Run draft workflow iteration node',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody,
      params: zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath,
    }),
  )
  .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse)

export const run2 = {
  post: post6,
}

export const byNodeId2 = {
  run: run2,
}

export const nodes2 = {
  byNodeId: byNodeId2,
}

export const iteration = {
  nodes: nodes2,
}

/**
 * Run draft workflow loop node
 *
 * Run draft workflow loop node for advanced chat
 */
export const post7 = oc
  .route({
    description: 'Run draft workflow loop node for advanced chat',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRun',
    path: '/apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run',
    summary: 'Run draft workflow loop node',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody,
      params: zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath,
    }),
  )
  .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse)

export const run3 = {
  post: post7,
}

export const byNodeId3 = {
  run: run3,
}

export const nodes3 = {
  byNodeId: byNodeId3,
}

export const loop = {
  nodes: nodes3,
}

/**
 * Run draft workflow
 *
 * Run draft workflow for advanced chat application
 */
export const post8 = oc
  .route({
    description: 'Run draft workflow for advanced chat application',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftRun',
    path: '/apps/{app_id}/advanced-chat/workflows/draft/run',
    summary: 'Run draft workflow',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody,
      params: zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath,
    }),
  )
  .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse)

export const run4 = {
  post: post8,
}

export const draft = {
  humanInput,
  iteration,
  loop,
  run: run4,
}

export const workflows2 = {
  draft,
}

export const advancedChat = {
  workflowRuns,
  workflows: workflows2,
}

export const get6 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigFilesByNameDownload',
    path: '/apps/{app_id}/agent/config/files/{name}/download',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigFilesByNameDownloadPath,
      query: zGetAppsByAppIdAgentConfigFilesByNameDownloadQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigFilesByNameDownloadResponse)

export const download = {
  get: get6,
}

export const get7 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigFilesByNamePreview',
    path: '/apps/{app_id}/agent/config/files/{name}/preview',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigFilesByNamePreviewPath,
      query: zGetAppsByAppIdAgentConfigFilesByNamePreviewQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigFilesByNamePreviewResponse)

export const preview2 = {
  get: get7,
}

export const delete_ = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAgentConfigFilesByName',
    path: '/apps/{app_id}/agent/config/files/{name}',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteAppsByAppIdAgentConfigFilesByNamePath,
      query: zDeleteAppsByAppIdAgentConfigFilesByNameQuery.optional(),
    }),
  )
  .output(zDeleteAppsByAppIdAgentConfigFilesByNameResponse)

export const byName = {
  delete: delete_,
  download,
  preview: preview2,
}

export const get8 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigFiles',
    path: '/apps/{app_id}/agent/config/files',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigFilesPath,
      query: zGetAppsByAppIdAgentConfigFilesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigFilesResponse)

export const post9 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAgentConfigFiles',
    path: '/apps/{app_id}/agent/config/files',
    successStatus: 201,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAgentConfigFilesBody,
      params: zPostAppsByAppIdAgentConfigFilesPath,
      query: zPostAppsByAppIdAgentConfigFilesQuery.optional(),
    }),
  )
  .output(zPostAppsByAppIdAgentConfigFilesResponse)

export const files = {
  get: get8,
  post: post9,
  byName,
}

export const get9 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigManifest',
    path: '/apps/{app_id}/agent/config/manifest',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigManifestPath,
      query: zGetAppsByAppIdAgentConfigManifestQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigManifestResponse)

export const manifest = {
  get: get9,
}

export const post10 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAgentConfigSkillsUpload',
    path: '/apps/{app_id}/agent/config/skills/upload',
    successStatus: 201,
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAgentConfigSkillsUploadBody,
      params: zPostAppsByAppIdAgentConfigSkillsUploadPath,
      query: zPostAppsByAppIdAgentConfigSkillsUploadQuery.optional(),
    }),
  )
  .output(zPostAppsByAppIdAgentConfigSkillsUploadResponse)

export const upload = {
  post: post10,
}

export const get10 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkillsByNameDownload',
    path: '/apps/{app_id}/agent/config/skills/{name}/download',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigSkillsByNameDownloadPath,
      query: zGetAppsByAppIdAgentConfigSkillsByNameDownloadQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigSkillsByNameDownloadResponse)

export const download2 = {
  get: get10,
}

export const get11 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkillsByNameFilesContent',
    path: '/apps/{app_id}/agent/config/skills/{name}/files/content',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAgentConfigSkillsByNameFilesContentPath }))
  .output(zGetAppsByAppIdAgentConfigSkillsByNameFilesContentResponse)

export const content = {
  get: get11,
}

export const get12 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkillsByNameFilesDownload',
    path: '/apps/{app_id}/agent/config/skills/{name}/files/download',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadPath,
      query: zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadQuery,
    }),
  )
  .output(zGetAppsByAppIdAgentConfigSkillsByNameFilesDownloadResponse)

export const download3 = {
  get: get12,
}

export const get13 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkillsByNameFilesPreview',
    path: '/apps/{app_id}/agent/config/skills/{name}/files/preview',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewPath,
      query: zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewQuery,
    }),
  )
  .output(zGetAppsByAppIdAgentConfigSkillsByNameFilesPreviewResponse)

export const preview3 = {
  get: get13,
}

export const files2 = {
  content,
  download: download3,
  preview: preview3,
}

export const get14 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkillsByNameInspect',
    path: '/apps/{app_id}/agent/config/skills/{name}/inspect',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigSkillsByNameInspectPath,
      query: zGetAppsByAppIdAgentConfigSkillsByNameInspectQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigSkillsByNameInspectResponse)

export const inspect = {
  get: get14,
}

export const delete2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAgentConfigSkillsByName',
    path: '/apps/{app_id}/agent/config/skills/{name}',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteAppsByAppIdAgentConfigSkillsByNamePath,
      query: zDeleteAppsByAppIdAgentConfigSkillsByNameQuery.optional(),
    }),
  )
  .output(zDeleteAppsByAppIdAgentConfigSkillsByNameResponse)

export const byName2 = {
  delete: delete2,
  download: download2,
  files: files2,
  inspect,
}

export const get15 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentConfigSkills',
    path: '/apps/{app_id}/agent/config/skills',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentConfigSkillsPath,
      query: zGetAppsByAppIdAgentConfigSkillsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentConfigSkillsResponse)

export const skills = {
  get: get15,
  upload,
  byName: byName2,
}

export const config = {
  files,
  manifest,
  skills,
}

/**
 * Time-limited external signed URL for one drive value (no streaming proxy)
 */
export const get16 = oc
  .route({
    description: 'Time-limited external signed URL for one drive value (no streaming proxy)',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentDriveFilesDownload',
    path: '/apps/{app_id}/agent/drive/files/download',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentDriveFilesDownloadPath,
      query: zGetAppsByAppIdAgentDriveFilesDownloadQuery,
    }),
  )
  .output(zGetAppsByAppIdAgentDriveFilesDownloadResponse)

export const download4 = {
  get: get16,
}

/**
 * Truncated text preview of one drive value (binary-safe; SKILL.md is the main case)
 */
export const get17 = oc
  .route({
    description:
      'Truncated text preview of one drive value (binary-safe; SKILL.md is the main case)',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentDriveFilesPreview',
    path: '/apps/{app_id}/agent/drive/files/preview',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentDriveFilesPreviewPath,
      query: zGetAppsByAppIdAgentDriveFilesPreviewQuery,
    }),
  )
  .output(zGetAppsByAppIdAgentDriveFilesPreviewResponse)

export const preview4 = {
  get: get17,
}

/**
 * List agent drive entries (read-only inspector; one endpoint for both tabs)
 */
export const get18 = oc
  .route({
    description: 'List agent drive entries (read-only inspector; one endpoint for both tabs)',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentDriveFiles',
    path: '/apps/{app_id}/agent/drive/files',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentDriveFilesPath,
      query: zGetAppsByAppIdAgentDriveFilesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentDriveFilesResponse)

export const files3 = {
  get: get18,
  download: download4,
  preview: preview4,
}

/**
 * Inspect one drive-backed skill for slash-menu hover/detail UI
 */
export const get19 = oc
  .route({
    description: 'Inspect one drive-backed skill for slash-menu hover/detail UI',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentDriveSkillsBySkillPathInspect',
    path: '/apps/{app_id}/agent/drive/skills/{skill_path}/inspect',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectPath,
      query: zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentDriveSkillsBySkillPathInspectResponse)

export const inspect2 = {
  get: get19,
}

export const bySkillPath = {
  inspect: inspect2,
}

/**
 * List drive-backed skills for the bound agent
 */
export const get20 = oc
  .route({
    description: 'List drive-backed skills for the bound agent',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentDriveSkills',
    path: '/apps/{app_id}/agent/drive/skills',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAgentDriveSkillsPath,
      query: zGetAppsByAppIdAgentDriveSkillsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAgentDriveSkillsResponse)

export const skills2 = {
  get: get20,
  bySkillPath,
}

export const drive = {
  files: files3,
  skills: skills2,
}

/**
 * Delete one drive file by key via drive commit-null semantics
 */
export const delete3 = oc
  .route({
    description: 'Delete one drive file by key via drive commit-null semantics',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAgentFiles',
    path: '/apps/{app_id}/agent/files',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteAppsByAppIdAgentFilesPath,
      query: zDeleteAppsByAppIdAgentFilesQuery,
    }),
  )
  .output(zDeleteAppsByAppIdAgentFilesResponse)

/**
 * ADD FILE: commit one uploaded file into the bound agent's drive
 *
 * Commit an uploaded file into the agent drive under files/<name> (ENG-625 D3)
 */
export const post11 = oc
  .route({
    description: 'Commit an uploaded file into the agent drive under files/<name> (ENG-625 D3)',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAgentFiles',
    path: '/apps/{app_id}/agent/files',
    successStatus: 201,
    summary: "ADD FILE: commit one uploaded file into the bound agent's drive",
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAgentFilesBody,
      params: zPostAppsByAppIdAgentFilesPath,
      query: zPostAppsByAppIdAgentFilesQuery.optional(),
    }),
  )
  .output(zPostAppsByAppIdAgentFilesResponse)

export const files4 = {
  delete: delete3,
  post: post11,
}

/**
 * Get agent logs
 *
 * Get agent execution logs for an application
 */
export const get21 = oc
  .route({
    description: 'Get agent execution logs for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAgentLogs',
    path: '/apps/{app_id}/agent/logs',
    summary: 'Get agent logs',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAgentLogsPath, query: zGetAppsByAppIdAgentLogsQuery }))
  .output(zGetAppsByAppIdAgentLogsResponse)

export const logs = {
  get: get21,
}

/**
 * Upload a Skill, validate it, and commit drive-backed skill files
 *
 * Upload + standardize a Skill into the agent drive
 */
export const post12 = oc
  .route({
    description: 'Upload + standardize a Skill into the agent drive',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAgentSkillsUpload',
    path: '/apps/{app_id}/agent/skills/upload',
    successStatus: 201,
    summary: 'Upload a Skill, validate it, and commit drive-backed skill files',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAgentSkillsUploadBody,
      params: zPostAppsByAppIdAgentSkillsUploadPath,
      query: zPostAppsByAppIdAgentSkillsUploadQuery.optional(),
    }),
  )
  .output(zPostAppsByAppIdAgentSkillsUploadResponse)

export const upload2 = {
  post: post12,
}

/**
 * Suggest CLI tools/env for a skill
 *
 * Infer CLI tool + ENV suggestions from a standardized skill's SKILL.md (draft only, ENG-371)
 * Saving still goes through composer validation.
 */
export const post13 = oc
  .route({
    description:
      "Infer CLI tool + ENV suggestions from a standardized skill's SKILL.md (draft only, ENG-371)\nSaving still goes through composer validation.",
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAgentSkillsBySlugInferTools',
    path: '/apps/{app_id}/agent/skills/{slug}/infer-tools',
    summary: 'Suggest CLI tools/env for a skill',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zPostAppsByAppIdAgentSkillsBySlugInferToolsPath,
      query: zPostAppsByAppIdAgentSkillsBySlugInferToolsQuery.optional(),
    }),
  )
  .output(zPostAppsByAppIdAgentSkillsBySlugInferToolsResponse)

export const inferTools = {
  post: post13,
}

/**
 * Delete a standardized skill by removing its known drive keys via commit-null
 */
export const delete4 = oc
  .route({
    description: 'Delete a standardized skill by removing its known drive keys via commit-null',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAgentSkillsBySlug',
    path: '/apps/{app_id}/agent/skills/{slug}',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteAppsByAppIdAgentSkillsBySlugPath,
      query: zDeleteAppsByAppIdAgentSkillsBySlugQuery.optional(),
    }),
  )
  .output(zDeleteAppsByAppIdAgentSkillsBySlugResponse)

export const bySlug = {
  delete: delete4,
  inferTools,
}

export const skills3 = {
  upload: upload2,
  bySlug,
}

export const agent = {
  config,
  drive,
  files: files4,
  logs,
  skills: skills3,
}

/**
 * Get status of annotation reply action job
 */
export const get22 = oc
  .route({
    description: 'Get status of annotation reply action job',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationReplyByActionStatusByJobId',
    path: '/apps/{app_id}/annotation-reply/{action}/status/{job_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath }))
  .output(zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse)

export const byJobId = {
  get: get22,
}

export const status = {
  byJobId,
}

/**
 * Enable or disable annotation reply for an app
 */
export const post14 = oc
  .route({
    description: 'Enable or disable annotation reply for an app',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAnnotationReplyByAction',
    path: '/apps/{app_id}/annotation-reply/{action}',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAnnotationReplyByActionBody,
      params: zPostAppsByAppIdAnnotationReplyByActionPath,
    }),
  )
  .output(zPostAppsByAppIdAnnotationReplyByActionResponse)

export const byAction = {
  post: post14,
  status,
}

export const annotationReply = {
  byAction,
}

/**
 * Get annotation settings for an app
 */
export const get23 = oc
  .route({
    description: 'Get annotation settings for an app',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationSetting',
    path: '/apps/{app_id}/annotation-setting',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAnnotationSettingPath }))
  .output(zGetAppsByAppIdAnnotationSettingResponse)

export const annotationSetting = {
  get: get23,
}

/**
 * Update annotation settings for an app
 */
export const post15 = oc
  .route({
    description: 'Update annotation settings for an app',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAnnotationSettingsByAnnotationSettingId',
    path: '/apps/{app_id}/annotation-settings/{annotation_setting_id}',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody,
      params: zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath,
    }),
  )
  .output(zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse)

export const byAnnotationSettingId = {
  post: post15,
}

export const annotationSettings = {
  byAnnotationSettingId,
}

/**
 * Batch import annotations from CSV file with rate limiting and security checks
 */
export const post16 = oc
  .route({
    description: 'Batch import annotations from CSV file with rate limiting and security checks',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAnnotationsBatchImport',
    path: '/apps/{app_id}/annotations/batch-import',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdAnnotationsBatchImportPath }))
  .output(zPostAppsByAppIdAnnotationsBatchImportResponse)

export const batchImport = {
  post: post16,
}

/**
 * Get status of batch import job
 */
export const get24 = oc
  .route({
    description: 'Get status of batch import job',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationsBatchImportStatusByJobId',
    path: '/apps/{app_id}/annotations/batch-import-status/{job_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath }))
  .output(zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse)

export const byJobId2 = {
  get: get24,
}

export const batchImportStatus = {
  byJobId: byJobId2,
}

/**
 * Get count of message annotations for the app
 */
export const get25 = oc
  .route({
    description: 'Get count of message annotations for the app',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationsCount',
    path: '/apps/{app_id}/annotations/count',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAnnotationsCountPath }))
  .output(zGetAppsByAppIdAnnotationsCountResponse)

export const count2 = {
  get: get25,
}

/**
 * Export all annotations for an app with CSV injection protection
 */
export const get26 = oc
  .route({
    description: 'Export all annotations for an app with CSV injection protection',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationsExport',
    path: '/apps/{app_id}/annotations/export',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdAnnotationsExportPath }))
  .output(zGetAppsByAppIdAnnotationsExportResponse)

export const export_ = {
  get: get26,
}

/**
 * Get hit histories for an annotation
 */
export const get27 = oc
  .route({
    description: 'Get hit histories for an annotation',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotationsByAnnotationIdHitHistories',
    path: '/apps/{app_id}/annotations/{annotation_id}/hit-histories',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath,
      query: zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse)

export const hitHistories = {
  get: get27,
}

export const delete5 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAnnotationsByAnnotationId',
    path: '/apps/{app_id}/annotations/{annotation_id}',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdAnnotationsByAnnotationIdPath }))
  .output(zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse)

/**
 * Update or delete an annotation
 */
export const post17 = oc
  .route({
    description: 'Update or delete an annotation',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAnnotationsByAnnotationId',
    path: '/apps/{app_id}/annotations/{annotation_id}',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdAnnotationsByAnnotationIdBody,
      params: zPostAppsByAppIdAnnotationsByAnnotationIdPath,
    }),
  )
  .output(zPostAppsByAppIdAnnotationsByAnnotationIdResponse)

export const byAnnotationId = {
  delete: delete5,
  post: post17,
  hitHistories,
}

export const delete6 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdAnnotations',
    path: '/apps/{app_id}/annotations',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdAnnotationsPath }))
  .output(zDeleteAppsByAppIdAnnotationsResponse)

/**
 * Get annotations for an app with pagination
 */
export const get28 = oc
  .route({
    description: 'Get annotations for an app with pagination',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdAnnotations',
    path: '/apps/{app_id}/annotations',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdAnnotationsPath,
      query: zGetAppsByAppIdAnnotationsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdAnnotationsResponse)

/**
 * Create a new annotation for an app
 */
export const post18 = oc
  .route({
    description: 'Create a new annotation for an app',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAnnotations',
    path: '/apps/{app_id}/annotations',
    successStatus: 201,
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostAppsByAppIdAnnotationsBody, params: zPostAppsByAppIdAnnotationsPath }),
  )
  .output(zPostAppsByAppIdAnnotationsResponse)

export const annotations = {
  delete: delete6,
  get: get28,
  post: post18,
  batchImport,
  batchImportStatus,
  count: count2,
  export: export_,
  byAnnotationId,
}

/**
 * Enable or disable app API
 */
export const post19 = oc
  .route({
    description: 'Enable or disable app API',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdApiEnable',
    path: '/apps/{app_id}/api-enable',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdApiEnableBody, params: zPostAppsByAppIdApiEnablePath }))
  .output(zPostAppsByAppIdApiEnableResponse)

export const apiEnable = {
  post: post19,
}

/**
 * Transcript audio to text for chat messages
 */
export const post20 = oc
  .route({
    description: 'Transcript audio to text for chat messages',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdAudioToText',
    path: '/apps/{app_id}/audio-to-text',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostAppsByAppIdAudioToTextBody, params: zPostAppsByAppIdAudioToTextPath }),
  )
  .output(zPostAppsByAppIdAudioToTextResponse)

export const audioToText = {
  post: post20,
}

/**
 * Delete a chat conversation
 */
export const delete7 = oc
  .route({
    description: 'Delete a chat conversation',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdChatConversationsByConversationId',
    path: '/apps/{app_id}/chat-conversations/{conversation_id}',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdChatConversationsByConversationIdPath }))
  .output(zDeleteAppsByAppIdChatConversationsByConversationIdResponse)

/**
 * Get chat conversation details
 */
export const get29 = oc
  .route({
    description: 'Get chat conversation details',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdChatConversationsByConversationId',
    path: '/apps/{app_id}/chat-conversations/{conversation_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdChatConversationsByConversationIdPath }))
  .output(zGetAppsByAppIdChatConversationsByConversationIdResponse)

export const byConversationId = {
  delete: delete7,
  get: get29,
}

/**
 * Get chat conversations with pagination, filtering and summary
 */
export const get30 = oc
  .route({
    description: 'Get chat conversations with pagination, filtering and summary',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdChatConversations',
    path: '/apps/{app_id}/chat-conversations',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdChatConversationsPath,
      query: zGetAppsByAppIdChatConversationsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdChatConversationsResponse)

export const chatConversations = {
  get: get30,
  byConversationId,
}

/**
 * Get suggested questions for a message
 */
export const get31 = oc
  .route({
    description: 'Get suggested questions for a message',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdChatMessagesByMessageIdSuggestedQuestions',
    path: '/apps/{app_id}/chat-messages/{message_id}/suggested-questions',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath }))
  .output(zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse)

export const suggestedQuestions = {
  get: get31,
}

export const byMessageId = {
  suggestedQuestions,
}

/**
 * Stop a running chat message generation
 */
export const post21 = oc
  .route({
    description: 'Stop a running chat message generation',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdChatMessagesByTaskIdStop',
    path: '/apps/{app_id}/chat-messages/{task_id}/stop',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdChatMessagesByTaskIdStopPath }))
  .output(zPostAppsByAppIdChatMessagesByTaskIdStopResponse)

export const stop = {
  post: post21,
}

export const byTaskId = {
  stop,
}

/**
 * Get chat messages for a conversation with pagination
 */
export const get32 = oc
  .route({
    description: 'Get chat messages for a conversation with pagination',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdChatMessages',
    path: '/apps/{app_id}/chat-messages',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetAppsByAppIdChatMessagesPath, query: zGetAppsByAppIdChatMessagesQuery }),
  )
  .output(zGetAppsByAppIdChatMessagesResponse)

export const chatMessages = {
  get: get32,
  byMessageId,
  byTaskId,
}

/**
 * Delete a completion conversation
 */
export const delete8 = oc
  .route({
    description: 'Delete a completion conversation',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdCompletionConversationsByConversationId',
    path: '/apps/{app_id}/completion-conversations/{conversation_id}',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdCompletionConversationsByConversationIdPath }))
  .output(zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse)

/**
 * Get completion conversation details with messages
 */
export const get33 = oc
  .route({
    description: 'Get completion conversation details with messages',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdCompletionConversationsByConversationId',
    path: '/apps/{app_id}/completion-conversations/{conversation_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdCompletionConversationsByConversationIdPath }))
  .output(zGetAppsByAppIdCompletionConversationsByConversationIdResponse)

export const byConversationId2 = {
  delete: delete8,
  get: get33,
}

/**
 * Get completion conversations with pagination and filtering
 */
export const get34 = oc
  .route({
    description: 'Get completion conversations with pagination and filtering',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdCompletionConversations',
    path: '/apps/{app_id}/completion-conversations',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdCompletionConversationsPath,
      query: zGetAppsByAppIdCompletionConversationsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdCompletionConversationsResponse)

export const completionConversations = {
  get: get34,
  byConversationId: byConversationId2,
}

/**
 * Stop a running completion message generation
 */
export const post22 = oc
  .route({
    description: 'Stop a running completion message generation',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdCompletionMessagesByTaskIdStop',
    path: '/apps/{app_id}/completion-messages/{task_id}/stop',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdCompletionMessagesByTaskIdStopPath }))
  .output(zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse)

export const stop2 = {
  post: post22,
}

export const byTaskId2 = {
  stop: stop2,
}

/**
 * Generate completion message for debugging
 */
export const post23 = oc
  .route({
    description: 'Generate completion message for debugging',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdCompletionMessages',
    path: '/apps/{app_id}/completion-messages',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdCompletionMessagesBody,
      params: zPostAppsByAppIdCompletionMessagesPath,
    }),
  )
  .output(zPostAppsByAppIdCompletionMessagesResponse)

export const completionMessages = {
  post: post23,
  byTaskId: byTaskId2,
}

/**
 * Get conversation variables for an application
 */
export const get35 = oc
  .route({
    description: 'Get conversation variables for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdConversationVariables',
    path: '/apps/{app_id}/conversation-variables',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdConversationVariablesPath,
      query: zGetAppsByAppIdConversationVariablesQuery,
    }),
  )
  .output(zGetAppsByAppIdConversationVariablesResponse)

export const conversationVariables = {
  get: get35,
}

/**
 * Convert basic mode of chatbot app to workflow mode
 *
 * Convert application to workflow mode
 * Convert expert mode of chatbot app to workflow mode
 * Convert Completion App to Workflow App
 */
export const post24 = oc
  .route({
    description:
      'Convert application to workflow mode\nConvert expert mode of chatbot app to workflow mode\nConvert Completion App to Workflow App',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdConvertToWorkflow',
    path: '/apps/{app_id}/convert-to-workflow',
    summary: 'Convert basic mode of chatbot app to workflow mode',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdConvertToWorkflowBody,
      params: zPostAppsByAppIdConvertToWorkflowPath,
    }),
  )
  .output(zPostAppsByAppIdConvertToWorkflowResponse)

export const convertToWorkflow = {
  post: post24,
}

/**
 * Copy app
 *
 * Create a copy of an existing application
 */
export const post25 = oc
  .route({
    description: 'Create a copy of an existing application',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdCopy',
    path: '/apps/{app_id}/copy',
    successStatus: 201,
    summary: 'Copy app',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdCopyBody, params: zPostAppsByAppIdCopyPath }))
  .output(zPostAppsByAppIdCopyResponse)

export const copy = {
  post: post25,
}

/**
 * Export app
 *
 * Export application configuration as DSL
 */
export const get36 = oc
  .route({
    description: 'Export application configuration as DSL',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdExport',
    path: '/apps/{app_id}/export',
    summary: 'Export app',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetAppsByAppIdExportPath, query: zGetAppsByAppIdExportQuery.optional() }),
  )
  .output(zGetAppsByAppIdExportResponse)

export const export2 = {
  get: get36,
}

/**
 * Export user feedback data for Google Sheets
 */
export const get37 = oc
  .route({
    description: 'Export user feedback data for Google Sheets',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdFeedbacksExport',
    path: '/apps/{app_id}/feedbacks/export',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdFeedbacksExportPath,
      query: zGetAppsByAppIdFeedbacksExportQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdFeedbacksExportResponse)

export const export3 = {
  get: get37,
}

/**
 * Create or update message feedback (like/dislike)
 */
export const post26 = oc
  .route({
    description: 'Create or update message feedback (like/dislike)',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdFeedbacks',
    path: '/apps/{app_id}/feedbacks',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdFeedbacksBody, params: zPostAppsByAppIdFeedbacksPath }))
  .output(zPostAppsByAppIdFeedbacksResponse)

export const feedbacks = {
  post: post26,
  export: export3,
}

/**
 * Update application icon
 */
export const post27 = oc
  .route({
    description: 'Update application icon',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdIcon',
    path: '/apps/{app_id}/icon',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdIconBody, params: zPostAppsByAppIdIconPath }))
  .output(zPostAppsByAppIdIconResponse)

export const icon = {
  post: post27,
}

/**
 * Get message details by ID
 */
export const get38 = oc
  .route({
    description: 'Get message details by ID',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdMessagesByMessageId',
    path: '/apps/{app_id}/messages/{message_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdMessagesByMessageIdPath }))
  .output(zGetAppsByAppIdMessagesByMessageIdResponse)

export const byMessageId2 = {
  get: get38,
}

export const messages = {
  byMessageId: byMessageId2,
}

/**
 * Modify the app model config and dataset joins in one request transaction
 *
 * Update application model configuration
 */
export const post28 = oc
  .route({
    description: 'Update application model configuration',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdModelConfig',
    path: '/apps/{app_id}/model-config',
    summary: 'Modify the app model config and dataset joins in one request transaction',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostAppsByAppIdModelConfigBody, params: zPostAppsByAppIdModelConfigPath }),
  )
  .output(zPostAppsByAppIdModelConfigResponse)

export const modelConfig = {
  post: post28,
}

/**
 * Check if app name is available
 */
export const post29 = oc
  .route({
    description: 'Check if app name is available',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdName',
    path: '/apps/{app_id}/name',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdNameBody, params: zPostAppsByAppIdNamePath }))
  .output(zPostAppsByAppIdNameResponse)

export const name = {
  post: post29,
}

/**
 * Publish app to Creators Platform
 */
export const post30 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdPublishToCreatorsPlatform',
    path: '/apps/{app_id}/publish-to-creators-platform',
    summary: 'Publish app to Creators Platform',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdPublishToCreatorsPlatformPath }))
  .output(zPostAppsByAppIdPublishToCreatorsPlatformResponse)

export const publishToCreatorsPlatform = {
  post: post30,
}

/**
 * Get MCP server configuration for an application
 */
export const get39 = oc
  .route({
    description: 'Get MCP server configuration for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdServer',
    path: '/apps/{app_id}/server',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdServerPath }))
  .output(zGetAppsByAppIdServerResponse)

/**
 * Create MCP server configuration for an application
 */
export const post31 = oc
  .route({
    description: 'Create MCP server configuration for an application',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdServer',
    path: '/apps/{app_id}/server',
    successStatus: 201,
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdServerBody, params: zPostAppsByAppIdServerPath }))
  .output(zPostAppsByAppIdServerResponse)

/**
 * Update MCP server configuration for an application
 */
export const put = oc
  .route({
    description: 'Update MCP server configuration for an application',
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppIdServer',
    path: '/apps/{app_id}/server',
    tags: ['console'],
  })
  .input(z.object({ body: zPutAppsByAppIdServerBody, params: zPutAppsByAppIdServerPath }))
  .output(zPutAppsByAppIdServerResponse)

export const server = {
  get: get39,
  post: post31,
  put,
}

/**
 * Reset access token for application site
 */
export const post32 = oc
  .route({
    description: 'Reset access token for application site',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdSiteAccessTokenReset',
    path: '/apps/{app_id}/site/access-token-reset',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdSiteAccessTokenResetPath }))
  .output(zPostAppsByAppIdSiteAccessTokenResetResponse)

export const accessTokenReset = {
  post: post32,
}

/**
 * Update application site configuration
 */
export const post33 = oc
  .route({
    description: 'Update application site configuration',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdSite',
    path: '/apps/{app_id}/site',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdSiteBody, params: zPostAppsByAppIdSitePath }))
  .output(zPostAppsByAppIdSiteResponse)

export const site = {
  post: post33,
  accessTokenReset,
}

/**
 * Enable or disable app site
 */
export const post34 = oc
  .route({
    description: 'Enable or disable app site',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdSiteEnable',
    path: '/apps/{app_id}/site-enable',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdSiteEnableBody, params: zPostAppsByAppIdSiteEnablePath }))
  .output(zPostAppsByAppIdSiteEnableResponse)

export const siteEnable = {
  post: post34,
}

/**
 * Remove the current account's star from an application
 */
export const delete9 = oc
  .route({
    description: "Remove the current account's star from an application",
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdStar',
    path: '/apps/{app_id}/star',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdStarPath }))
  .output(zDeleteAppsByAppIdStarResponse)

/**
 * Star an application for the current account
 */
export const post35 = oc
  .route({
    description: 'Star an application for the current account',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdStar',
    path: '/apps/{app_id}/star',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdStarPath }))
  .output(zPostAppsByAppIdStarResponse)

export const star = {
  delete: delete9,
  post: post35,
}

/**
 * Get average response time statistics for an application
 */
export const get40 = oc
  .route({
    description: 'Get average response time statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsAverageResponseTime',
    path: '/apps/{app_id}/statistics/average-response-time',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsAverageResponseTimePath,
      query: zGetAppsByAppIdStatisticsAverageResponseTimeQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsAverageResponseTimeResponse)

export const averageResponseTime = {
  get: get40,
}

/**
 * Get average session interaction statistics for an application
 */
export const get41 = oc
  .route({
    description: 'Get average session interaction statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsAverageSessionInteractions',
    path: '/apps/{app_id}/statistics/average-session-interactions',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsAverageSessionInteractionsPath,
      query: zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse)

export const averageSessionInteractions = {
  get: get41,
}

/**
 * Get daily conversation statistics for an application
 */
export const get42 = oc
  .route({
    description: 'Get daily conversation statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsDailyConversations',
    path: '/apps/{app_id}/statistics/daily-conversations',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsDailyConversationsPath,
      query: zGetAppsByAppIdStatisticsDailyConversationsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsDailyConversationsResponse)

export const dailyConversations = {
  get: get42,
}

/**
 * Get daily terminal/end-user statistics for an application
 */
export const get43 = oc
  .route({
    description: 'Get daily terminal/end-user statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsDailyEndUsers',
    path: '/apps/{app_id}/statistics/daily-end-users',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsDailyEndUsersPath,
      query: zGetAppsByAppIdStatisticsDailyEndUsersQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsDailyEndUsersResponse)

export const dailyEndUsers = {
  get: get43,
}

/**
 * Get daily message statistics for an application
 */
export const get44 = oc
  .route({
    description: 'Get daily message statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsDailyMessages',
    path: '/apps/{app_id}/statistics/daily-messages',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsDailyMessagesPath,
      query: zGetAppsByAppIdStatisticsDailyMessagesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsDailyMessagesResponse)

export const dailyMessages = {
  get: get44,
}

/**
 * Get daily token cost statistics for an application
 */
export const get45 = oc
  .route({
    description: 'Get daily token cost statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsTokenCosts',
    path: '/apps/{app_id}/statistics/token-costs',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsTokenCostsPath,
      query: zGetAppsByAppIdStatisticsTokenCostsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsTokenCostsResponse)

export const tokenCosts = {
  get: get45,
}

/**
 * Get tokens per second statistics for an application
 */
export const get46 = oc
  .route({
    description: 'Get tokens per second statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsTokensPerSecond',
    path: '/apps/{app_id}/statistics/tokens-per-second',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsTokensPerSecondPath,
      query: zGetAppsByAppIdStatisticsTokensPerSecondQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsTokensPerSecondResponse)

export const tokensPerSecond = {
  get: get46,
}

/**
 * Get user satisfaction rate statistics for an application
 */
export const get47 = oc
  .route({
    description: 'Get user satisfaction rate statistics for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdStatisticsUserSatisfactionRate',
    path: '/apps/{app_id}/statistics/user-satisfaction-rate',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdStatisticsUserSatisfactionRatePath,
      query: zGetAppsByAppIdStatisticsUserSatisfactionRateQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdStatisticsUserSatisfactionRateResponse)

export const userSatisfactionRate = {
  get: get47,
}

export const statistics = {
  averageResponseTime,
  averageSessionInteractions,
  dailyConversations,
  dailyEndUsers,
  dailyMessages,
  tokenCosts,
  tokensPerSecond,
  userSatisfactionRate,
}

/**
 * Get available TTS voices for a specific language
 */
export const get48 = oc
  .route({
    description: 'Get available TTS voices for a specific language',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdTextToAudioVoices',
    path: '/apps/{app_id}/text-to-audio/voices',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdTextToAudioVoicesPath,
      query: zGetAppsByAppIdTextToAudioVoicesQuery,
    }),
  )
  .output(zGetAppsByAppIdTextToAudioVoicesResponse)

export const voices = {
  get: get48,
}

/**
 * Convert text to speech for chat messages
 */
export const post36 = oc
  .route({
    description: 'Convert text to speech for chat messages',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdTextToAudio',
    path: '/apps/{app_id}/text-to-audio',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostAppsByAppIdTextToAudioBody, params: zPostAppsByAppIdTextToAudioPath }),
  )
  .output(zPostAppsByAppIdTextToAudioResponse)

export const textToAudio = {
  post: post36,
  voices,
}

/**
 * Get app trace
 *
 * Get app tracing configuration
 */
export const get49 = oc
  .route({
    description: 'Get app tracing configuration',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdTrace',
    path: '/apps/{app_id}/trace',
    summary: 'Get app trace',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdTracePath }))
  .output(zGetAppsByAppIdTraceResponse)

/**
 * Update app tracing configuration
 */
export const post37 = oc
  .route({
    description: 'Update app tracing configuration',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdTrace',
    path: '/apps/{app_id}/trace',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsByAppIdTraceBody, params: zPostAppsByAppIdTracePath }))
  .output(zPostAppsByAppIdTraceResponse)

export const trace = {
  get: get49,
  post: post37,
}

/**
 * Delete an existing trace app configuration
 *
 * Delete an existing tracing configuration for an application
 */
export const delete10 = oc
  .route({
    description: 'Delete an existing tracing configuration for an application',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdTraceConfig',
    path: '/apps/{app_id}/trace-config',
    successStatus: 204,
    summary: 'Delete an existing trace app configuration',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zDeleteAppsByAppIdTraceConfigPath,
      query: zDeleteAppsByAppIdTraceConfigQuery,
    }),
  )
  .output(zDeleteAppsByAppIdTraceConfigResponse)

/**
 * Get tracing configuration for an application
 */
export const get50 = oc
  .route({
    description: 'Get tracing configuration for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdTraceConfig',
    path: '/apps/{app_id}/trace-config',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetAppsByAppIdTraceConfigPath, query: zGetAppsByAppIdTraceConfigQuery }),
  )
  .output(zGetAppsByAppIdTraceConfigResponse)

/**
 * Update an existing trace app configuration
 *
 * Update an existing tracing configuration for an application
 */
export const patch = oc
  .route({
    description: 'Update an existing tracing configuration for an application',
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchAppsByAppIdTraceConfig',
    path: '/apps/{app_id}/trace-config',
    summary: 'Update an existing trace app configuration',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPatchAppsByAppIdTraceConfigBody, params: zPatchAppsByAppIdTraceConfigPath }),
  )
  .output(zPatchAppsByAppIdTraceConfigResponse)

/**
 * Create a new trace app configuration
 *
 * Create a new tracing configuration for an application
 */
export const post38 = oc
  .route({
    description: 'Create a new tracing configuration for an application',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdTraceConfig',
    path: '/apps/{app_id}/trace-config',
    successStatus: 201,
    summary: 'Create a new trace app configuration',
    tags: ['console'],
  })
  .input(
    z.object({ body: zPostAppsByAppIdTraceConfigBody, params: zPostAppsByAppIdTraceConfigPath }),
  )
  .output(zPostAppsByAppIdTraceConfigResponse)

export const traceConfig = {
  delete: delete10,
  get: get50,
  patch,
  post: post38,
}

/**
 * Update app trigger (enable/disable)
 */
export const post39 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdTriggerEnable',
    path: '/apps/{app_id}/trigger-enable',
    summary: 'Update app trigger (enable/disable)',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdTriggerEnableBody,
      params: zPostAppsByAppIdTriggerEnablePath,
    }),
  )
  .output(zPostAppsByAppIdTriggerEnableResponse)

export const triggerEnable = {
  post: post39,
}

/**
 * Get app triggers list
 */
export const get51 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdTriggers',
    path: '/apps/{app_id}/triggers',
    summary: 'Get app triggers list',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdTriggersPath }))
  .output(zGetAppsByAppIdTriggersResponse)

export const triggers = {
  get: get51,
}

/**
 * Get workflow app logs
 *
 * Get workflow application execution logs
 */
export const get52 = oc
  .route({
    description: 'Get workflow application execution logs',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowAppLogs',
    path: '/apps/{app_id}/workflow-app-logs',
    summary: 'Get workflow app logs',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowAppLogsPath,
      query: zGetAppsByAppIdWorkflowAppLogsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowAppLogsResponse)

export const workflowAppLogs = {
  get: get52,
}

/**
 * Get workflow archived logs
 *
 * Get workflow archived execution logs
 */
export const get53 = oc
  .route({
    description: 'Get workflow archived execution logs',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowArchivedLogs',
    path: '/apps/{app_id}/workflow-archived-logs',
    summary: 'Get workflow archived logs',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowArchivedLogsPath,
      query: zGetAppsByAppIdWorkflowArchivedLogsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowArchivedLogsResponse)

export const workflowArchivedLogs = {
  get: get53,
}

/**
 * Get workflow runs count statistics
 *
 * Get workflow runs count statistics
 */
export const get54 = oc
  .route({
    description: 'Get workflow runs count statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsCount',
    path: '/apps/{app_id}/workflow-runs/count',
    summary: 'Get workflow runs count statistics',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowRunsCountPath,
      query: zGetAppsByAppIdWorkflowRunsCountQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowRunsCountResponse)

export const count3 = {
  get: get54,
}

/**
 * Stop workflow task
 *
 * Stop running workflow task
 */
export const post40 = oc
  .route({
    description: 'Stop running workflow task',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowRunsTasksByTaskIdStop',
    path: '/apps/{app_id}/workflow-runs/tasks/{task_id}/stop',
    summary: 'Stop workflow task',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath }))
  .output(zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse)

export const stop3 = {
  post: post40,
}

export const byTaskId3 = {
  stop: stop3,
}

export const tasks = {
  byTaskId: byTaskId3,
}

/**
 * Generate a download URL for an archived workflow run.
 */
export const get55 = oc
  .route({
    description: 'Generate a download URL for an archived workflow run.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsByRunIdExport',
    path: '/apps/{app_id}/workflow-runs/{run_id}/export',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdExportPath }))
  .output(zGetAppsByAppIdWorkflowRunsByRunIdExportResponse)

export const export4 = {
  get: get55,
}

/**
 * Get workflow run node execution list
 *
 * Get workflow run node execution list
 */
export const get56 = oc
  .route({
    description: 'Get workflow run node execution list',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsByRunIdNodeExecutions',
    path: '/apps/{app_id}/workflow-runs/{run_id}/node-executions',
    summary: 'Get workflow run node execution list',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath }))
  .output(zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse)

export const nodeExecutions = {
  get: get56,
}

/**
 * Get workflow run detail
 *
 * Get workflow run detail
 */
export const get57 = oc
  .route({
    description: 'Get workflow run detail',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsByRunId',
    path: '/apps/{app_id}/workflow-runs/{run_id}',
    summary: 'Get workflow run detail',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdPath }))
  .output(zGetAppsByAppIdWorkflowRunsByRunIdResponse)

export const byRunId = {
  get: get57,
  export: export4,
  nodeExecutions,
}

/**
 * Read a text/binary preview file in a workflow Agent node sandbox
 */
export const get58 = oc
  .route({
    description: 'Read a text/binary preview file in a workflow Agent node sandbox',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesRead',
    path: '/apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/read',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadPath,
      query: zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadQuery,
    }),
  )
  .output(zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesReadResponse)

export const read = {
  get: get58,
}

/**
 * Upload one workflow Agent sandbox file and return a signed download URL
 */
export const post41 = oc
  .route({
    description: 'Upload one workflow Agent sandbox file and return a signed download URL',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUpload',
    path: '/apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/upload',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadBody,
      params: zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesUploadResponse)

export const upload3 = {
  post: post41,
}

/**
 * List a directory in a workflow Agent node sandbox
 */
export const get59 = oc
  .route({
    description: 'List a directory in a workflow Agent node sandbox',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFiles',
    path: '/apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesPath,
      query:
        zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowRunsByWorkflowRunIdAgentNodesByNodeIdSandboxFilesResponse)

export const files5 = {
  get: get59,
  read,
  upload: upload3,
}

export const sandbox = {
  files: files5,
}

export const byNodeId4 = {
  sandbox,
}

export const agentNodes = {
  byNodeId: byNodeId4,
}

export const byWorkflowRunId = {
  agentNodes,
}

/**
 * Get workflow run list
 *
 * Get workflow run list
 */
export const get60 = oc
  .route({
    description: 'Get workflow run list',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowRuns',
    path: '/apps/{app_id}/workflow-runs',
    summary: 'Get workflow run list',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowRunsPath,
      query: zGetAppsByAppIdWorkflowRunsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowRunsResponse)

export const workflowRuns2 = {
  get: get60,
  count: count3,
  tasks,
  byRunId,
  byWorkflowRunId,
}

/**
 * Get all users in current tenant for mentions
 *
 * Get all users in current tenant for mentions
 */
export const get61 = oc
  .route({
    description: 'Get all users in current tenant for mentions',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowCommentsMentionUsers',
    path: '/apps/{app_id}/workflow/comments/mention-users',
    summary: 'Get all users in current tenant for mentions',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsMentionUsersPath }))
  .output(zGetAppsByAppIdWorkflowCommentsMentionUsersResponse)

export const mentionUsers = {
  get: get61,
}

/**
 * Delete a comment reply
 *
 * Delete a comment reply
 */
export const delete11 = oc
  .route({
    description: 'Delete a comment reply',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyId',
    path: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}',
    successStatus: 204,
    summary: 'Delete a comment reply',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath }))
  .output(zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse)

/**
 * Update a comment reply
 *
 * Update a comment reply
 */
export const put2 = oc
  .route({
    description: 'Update a comment reply',
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyId',
    path: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}',
    summary: 'Update a comment reply',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody,
      params: zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
    }),
  )
  .output(zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse)

export const byReplyId = {
  delete: delete11,
  put: put2,
}

/**
 * Add a reply to a workflow comment
 *
 * Add a reply to a workflow comment
 */
export const post42 = oc
  .route({
    description: 'Add a reply to a workflow comment',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowCommentsByCommentIdReplies',
    path: '/apps/{app_id}/workflow/comments/{comment_id}/replies',
    successStatus: 201,
    summary: 'Add a reply to a workflow comment',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody,
      params: zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse)

export const replies = {
  post: post42,
  byReplyId,
}

/**
 * Resolve a workflow comment
 *
 * Resolve a workflow comment
 */
export const post43 = oc
  .route({
    description: 'Resolve a workflow comment',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowCommentsByCommentIdResolve',
    path: '/apps/{app_id}/workflow/comments/{comment_id}/resolve',
    summary: 'Resolve a workflow comment',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath }))
  .output(zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse)

export const resolve = {
  post: post43,
}

/**
 * Delete a workflow comment
 *
 * Delete a workflow comment
 */
export const delete12 = oc
  .route({
    description: 'Delete a workflow comment',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowCommentsByCommentId',
    path: '/apps/{app_id}/workflow/comments/{comment_id}',
    successStatus: 204,
    summary: 'Delete a workflow comment',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath }))
  .output(zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse)

/**
 * Get a specific workflow comment
 *
 * Get a specific workflow comment
 */
export const get62 = oc
  .route({
    description: 'Get a specific workflow comment',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowCommentsByCommentId',
    path: '/apps/{app_id}/workflow/comments/{comment_id}',
    summary: 'Get a specific workflow comment',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsByCommentIdPath }))
  .output(zGetAppsByAppIdWorkflowCommentsByCommentIdResponse)

/**
 * Update a workflow comment
 *
 * Update a workflow comment
 */
export const put3 = oc
  .route({
    description: 'Update a workflow comment',
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppIdWorkflowCommentsByCommentId',
    path: '/apps/{app_id}/workflow/comments/{comment_id}',
    summary: 'Update a workflow comment',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutAppsByAppIdWorkflowCommentsByCommentIdBody,
      params: zPutAppsByAppIdWorkflowCommentsByCommentIdPath,
    }),
  )
  .output(zPutAppsByAppIdWorkflowCommentsByCommentIdResponse)

export const byCommentId = {
  delete: delete12,
  get: get62,
  put: put3,
  replies,
  resolve,
}

/**
 * Get all comments for a workflow
 *
 * Get all comments for a workflow
 */
export const get63 = oc
  .route({
    description: 'Get all comments for a workflow',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowComments',
    path: '/apps/{app_id}/workflow/comments',
    summary: 'Get all comments for a workflow',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsPath }))
  .output(zGetAppsByAppIdWorkflowCommentsResponse)

/**
 * Create a new workflow comment
 *
 * Create a new workflow comment
 */
export const post44 = oc
  .route({
    description: 'Create a new workflow comment',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowComments',
    path: '/apps/{app_id}/workflow/comments',
    successStatus: 201,
    summary: 'Create a new workflow comment',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowCommentsBody,
      params: zPostAppsByAppIdWorkflowCommentsPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowCommentsResponse)

export const comments = {
  get: get63,
  post: post44,
  mentionUsers,
  byCommentId,
}

/**
 * Get workflow average app interaction statistics
 */
export const get64 = oc
  .route({
    description: 'Get workflow average app interaction statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowStatisticsAverageAppInteractions',
    path: '/apps/{app_id}/workflow/statistics/average-app-interactions',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath,
      query: zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse)

export const averageAppInteractions = {
  get: get64,
}

/**
 * Get workflow daily runs statistics
 */
export const get65 = oc
  .route({
    description: 'Get workflow daily runs statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowStatisticsDailyConversations',
    path: '/apps/{app_id}/workflow/statistics/daily-conversations',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath,
      query: zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse)

export const dailyConversations2 = {
  get: get65,
}

/**
 * Get workflow daily terminals statistics
 */
export const get66 = oc
  .route({
    description: 'Get workflow daily terminals statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowStatisticsDailyTerminals',
    path: '/apps/{app_id}/workflow/statistics/daily-terminals',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath,
      query: zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse)

export const dailyTerminals = {
  get: get66,
}

/**
 * Get workflow daily token cost statistics
 */
export const get67 = oc
  .route({
    description: 'Get workflow daily token cost statistics',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowStatisticsTokenCosts',
    path: '/apps/{app_id}/workflow/statistics/token-costs',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowStatisticsTokenCostsPath,
      query: zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse)

export const tokenCosts2 = {
  get: get67,
}

export const statistics2 = {
  averageAppInteractions,
  dailyConversations: dailyConversations2,
  dailyTerminals,
  tokenCosts: tokenCosts2,
}

export const workflow = {
  comments,
  statistics: statistics2,
}

/**
 * Get default block config
 *
 * Get default block configuration by type
 */
export const get68 = oc
  .route({
    description: 'Get default block configuration by type',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockType',
    path: '/apps/{app_id}/workflows/default-workflow-block-configs/{block_type}',
    summary: 'Get default block config',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
      query: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse)

export const byBlockType = {
  get: get68,
}

/**
 * Get default block config
 *
 * Get default block configurations for workflow
 */
export const get69 = oc
  .route({
    description: 'Get default block configurations for workflow',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDefaultWorkflowBlockConfigs',
    path: '/apps/{app_id}/workflows/default-workflow-block-configs',
    summary: 'Get default block config',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath }))
  .output(zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse)

export const defaultWorkflowBlockConfigs = {
  get: get69,
  byBlockType,
}

/**
 * Get conversation variables for workflow
 */
export const get70 = oc
  .route({
    description: 'Get conversation variables for workflow',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftConversationVariables',
    path: '/apps/{app_id}/workflows/draft/conversation-variables',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftConversationVariablesPath }))
  .output(zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse)

/**
 * Update conversation variables for workflow draft
 */
export const post45 = oc
  .route({
    description: 'Update conversation variables for workflow draft',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftConversationVariables',
    path: '/apps/{app_id}/workflows/draft/conversation-variables',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftConversationVariablesBody,
      params: zPostAppsByAppIdWorkflowsDraftConversationVariablesPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse)

export const conversationVariables2 = {
  get: get70,
  post: post45,
}

/**
 * Get draft workflow
 *
 * Get environment variables for workflow
 */
export const get71 = oc
  .route({
    description: 'Get environment variables for workflow',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftEnvironmentVariables',
    path: '/apps/{app_id}/workflows/draft/environment-variables',
    summary: 'Get draft workflow',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath }))
  .output(zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse)

/**
 * Update environment variables for workflow draft
 */
export const post46 = oc
  .route({
    description: 'Update environment variables for workflow draft',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftEnvironmentVariables',
    path: '/apps/{app_id}/workflows/draft/environment-variables',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody,
      params: zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse)

export const environmentVariables = {
  get: get71,
  post: post46,
}

/**
 * Update draft workflow features
 */
export const post47 = oc
  .route({
    description: 'Update draft workflow features',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftFeatures',
    path: '/apps/{app_id}/workflows/draft/features',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftFeaturesBody,
      params: zPostAppsByAppIdWorkflowsDraftFeaturesPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftFeaturesResponse)

export const features = {
  post: post47,
}

/**
 * Test human input delivery
 *
 * Test human input delivery for workflow
 */
export const post48 = oc
  .route({
    description: 'Test human input delivery for workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTest',
    path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test',
    summary: 'Test human input delivery',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody,
      params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse)

export const deliveryTest = {
  post: post48,
}

/**
 * Preview human input form content and placeholders
 *
 * Get human input form preview for workflow
 */
export const post49 = oc
  .route({
    description: 'Get human input form preview for workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreview',
    path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview',
    summary: 'Preview human input form content and placeholders',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
      params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse)

export const preview5 = {
  post: post49,
}

/**
 * Submit human input form preview
 *
 * Submit human input form preview for workflow
 */
export const post50 = oc
  .route({
    description: 'Submit human input form preview for workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRun',
    path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run',
    summary: 'Submit human input form preview',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
      params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse)

export const run5 = {
  post: post50,
}

export const form2 = {
  preview: preview5,
  run: run5,
}

export const byNodeId5 = {
  deliveryTest,
  form: form2,
}

export const nodes4 = {
  byNodeId: byNodeId5,
}

export const humanInput2 = {
  nodes: nodes4,
}

/**
 * Run draft workflow iteration node
 *
 * Run draft workflow iteration node
 */
export const post51 = oc
  .route({
    description: 'Run draft workflow iteration node',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRun',
    path: '/apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run',
    summary: 'Run draft workflow iteration node',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody,
      params: zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse)

export const run6 = {
  post: post51,
}

export const byNodeId6 = {
  run: run6,
}

export const nodes5 = {
  byNodeId: byNodeId6,
}

export const iteration2 = {
  nodes: nodes5,
}

/**
 * Run draft workflow loop node
 *
 * Run draft workflow loop node
 */
export const post52 = oc
  .route({
    description: 'Run draft workflow loop node',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRun',
    path: '/apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run',
    summary: 'Run draft workflow loop node',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody,
      params: zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse)

export const run7 = {
  post: post52,
}

export const byNodeId7 = {
  run: run7,
}

export const nodes6 = {
  byNodeId: byNodeId7,
}

export const loop2 = {
  nodes: nodes6,
}

export const get72 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidates',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/candidates',
    tags: ['console'],
  })
  .input(
    z.object({ params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesPath }),
  )
  .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponse)

export const candidates = {
  get: get72,
}

export const post53 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRoster',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/copy-from-roster',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterBody,
      params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCopyFromRosterResponse)

export const copyFromRoster = {
  post: post53,
}

export const post54 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpact',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/impact',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactBody,
      params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponse)

export const impact = {
  post: post54,
}

export const post55 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRoster',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/save-to-roster',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterBody,
      params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponse)

export const saveToRoster = {
  post: post55,
}

export const post56 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidate',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer/validate',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateBody,
      params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidatePath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponse)

export const validate = {
  post: post56,
}

export const get73 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposer',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath,
      query: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse)

export const put4 = oc
  .route({
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposer',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composer',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerBody,
      params: zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath,
    }),
  )
  .output(zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse)

export const agentComposer = {
  get: get73,
  put: put4,
  candidates,
  copyFromRoster,
  impact,
  saveToRoster,
  validate,
}

/**
 * Get last run result for draft workflow node
 */
export const get74 = oc
  .route({
    description: 'Get last run result for draft workflow node',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdLastRun',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/last-run',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath }))
  .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse)

export const lastRun = {
  get: get74,
}

/**
 * Run draft workflow node
 *
 * Run draft workflow node
 */
export const post57 = oc
  .route({
    description: 'Run draft workflow node',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdRun',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/run',
    summary: 'Run draft workflow node',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody,
      params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse)

export const run8 = {
  post: post57,
}

/**
 * Poll for trigger events and execute single node when event arrives
 *
 * Poll for trigger events and execute single node when event arrives
 */
export const post58 = oc
  .route({
    description: 'Poll for trigger events and execute single node when event arrives',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRun',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run',
    summary: 'Poll for trigger events and execute single node when event arrives',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath }))
  .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse)

export const run9 = {
  post: post58,
}

export const trigger = {
  run: run9,
}

/**
 * Delete all variables for a specific node
 */
export const delete13 = oc
  .route({
    description: 'Delete all variables for a specific node',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariables',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath }))
  .output(zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse)

/**
 * Get variables for a specific node
 */
export const get75 = oc
  .route({
    description: 'Get variables for a specific node',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdVariables',
    path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath }))
  .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse)

export const variables = {
  delete: delete13,
  get: get75,
}

export const byNodeId8 = {
  agentComposer,
  lastRun,
  run: run8,
  trigger,
  variables,
}

export const nodes7 = {
  byNodeId: byNodeId8,
}

/**
 * Run draft workflow
 *
 * Run draft workflow
 */
export const post59 = oc
  .route({
    description: 'Run draft workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftRun',
    path: '/apps/{app_id}/workflows/draft/run',
    summary: 'Run draft workflow',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftRunBody,
      params: zPostAppsByAppIdWorkflowsDraftRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftRunResponse)

export const run10 = {
  post: post59,
}

/**
 * Server-Sent Events stream of inspector deltas for a draft workflow run.
 */
export const get76 = oc
  .route({
    description: 'Server-Sent Events stream of inspector deltas for a draft workflow run.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEvents',
    path: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/events',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsPath }))
  .output(zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsEventsResponse)

export const events = {
  get: get76,
}

/**
 * Full value for one declared output, including signed download URL for files.
 */
export const get77 = oc
  .route({
    description: 'Full value for one declared output, including signed download URL for files.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreview',
    path: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewPath,
    }),
  )
  .output(zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse)

export const preview6 = {
  get: get77,
}

export const byOutputName = {
  preview: preview6,
}

/**
 * One node's declared outputs for a draft workflow run.
 */
export const get78 = oc
  .route({
    description: "One node's declared outputs for a draft workflow run.",
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeId',
    path: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs/{node_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdPath }))
  .output(zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsByNodeIdResponse)

export const byNodeId9 = {
  get: get78,
  byOutputName,
}

/**
 * Snapshot of every node's declared outputs for a draft workflow run.
 */
export const get79 = oc
  .route({
    description: "Snapshot of every node's declared outputs for a draft workflow run.",
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputs',
    path: '/apps/{app_id}/workflows/draft/runs/{run_id}/node-outputs',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsPath }))
  .output(zGetAppsByAppIdWorkflowsDraftRunsByRunIdNodeOutputsResponse)

export const nodeOutputs = {
  get: get79,
  events,
  byNodeId: byNodeId9,
}

export const byRunId2 = {
  nodeOutputs,
}

export const runs = {
  byRunId: byRunId2,
}

/**
 * Get system variables for workflow
 */
export const get80 = oc
  .route({
    description: 'Get system variables for workflow',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftSystemVariables',
    path: '/apps/{app_id}/workflows/draft/system-variables',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftSystemVariablesPath }))
  .output(zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse)

export const systemVariables = {
  get: get80,
}

/**
 * Poll for trigger events and execute full workflow when event arrives
 *
 * Poll for trigger events and execute full workflow when event arrives
 */
export const post60 = oc
  .route({
    description: 'Poll for trigger events and execute full workflow when event arrives',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftTriggerRun',
    path: '/apps/{app_id}/workflows/draft/trigger/run',
    summary: 'Poll for trigger events and execute full workflow when event arrives',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftTriggerRunBody,
      params: zPostAppsByAppIdWorkflowsDraftTriggerRunPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftTriggerRunResponse)

export const run11 = {
  post: post60,
}

/**
 * Full workflow debug when the start node is a trigger
 *
 * Full workflow debug when the start node is a trigger
 */
export const post61 = oc
  .route({
    description: 'Full workflow debug when the start node is a trigger',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraftTriggerRunAll',
    path: '/apps/{app_id}/workflows/draft/trigger/run-all',
    summary: 'Full workflow debug when the start node is a trigger',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody,
      params: zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse)

export const runAll = {
  post: post61,
}

export const trigger2 = {
  run: run11,
  runAll,
}

/**
 * Reset a workflow variable to its default value
 */
export const put5 = oc
  .route({
    description: 'Reset a workflow variable to its default value',
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppIdWorkflowsDraftVariablesByVariableIdReset',
    path: '/apps/{app_id}/workflows/draft/variables/{variable_id}/reset',
    tags: ['console'],
  })
  .input(z.object({ params: zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath }))
  .output(zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse)

export const reset = {
  put: put5,
}

/**
 * Delete a workflow variable
 */
export const delete14 = oc
  .route({
    description: 'Delete a workflow variable',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowsDraftVariablesByVariableId',
    path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath }))
  .output(zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)

/**
 * Get a specific workflow variable
 */
export const get81 = oc
  .route({
    description: 'Get a specific workflow variable',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftVariablesByVariableId',
    path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath }))
  .output(zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)

/**
 * Update a workflow variable
 */
export const patch2 = oc
  .route({
    description: 'Update a workflow variable',
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchAppsByAppIdWorkflowsDraftVariablesByVariableId',
    path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody,
      params: zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
    }),
  )
  .output(zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)

export const byVariableId = {
  delete: delete14,
  get: get81,
  patch: patch2,
  reset,
}

/**
 * Delete all draft workflow variables
 */
export const delete15 = oc
  .route({
    description: 'Delete all draft workflow variables',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowsDraftVariables',
    path: '/apps/{app_id}/workflows/draft/variables',
    successStatus: 204,
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftVariablesPath }))
  .output(zDeleteAppsByAppIdWorkflowsDraftVariablesResponse)

/**
 * Get draft workflow
 *
 * Get draft workflow variables
 */
export const get82 = oc
  .route({
    description: 'Get draft workflow variables',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraftVariables',
    path: '/apps/{app_id}/workflows/draft/variables',
    summary: 'Get draft workflow',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsDraftVariablesPath,
      query: zGetAppsByAppIdWorkflowsDraftVariablesQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowsDraftVariablesResponse)

export const variables2 = {
  delete: delete15,
  get: get82,
  byVariableId,
}

/**
 * Get draft workflow
 *
 * Get draft workflow for an application
 */
export const get83 = oc
  .route({
    description: 'Get draft workflow for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsDraft',
    path: '/apps/{app_id}/workflows/draft',
    summary: 'Get draft workflow',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftPath }))
  .output(zGetAppsByAppIdWorkflowsDraftResponse)

/**
 * Sync draft workflow
 *
 * Sync draft workflow configuration
 */
export const post62 = oc
  .route({
    description: 'Sync draft workflow configuration',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsDraft',
    path: '/apps/{app_id}/workflows/draft',
    summary: 'Sync draft workflow',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsDraftBody,
      params: zPostAppsByAppIdWorkflowsDraftPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsDraftResponse)

export const draft2 = {
  get: get83,
  post: post62,
  conversationVariables: conversationVariables2,
  environmentVariables,
  features,
  humanInput: humanInput2,
  iteration: iteration2,
  loop: loop2,
  nodes: nodes7,
  run: run10,
  runs,
  systemVariables,
  trigger: trigger2,
  variables: variables2,
}

/**
 * Get published workflow
 *
 * Get published workflow for an application
 */
export const get84 = oc
  .route({
    description: 'Get published workflow for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsPublish',
    path: '/apps/{app_id}/workflows/publish',
    summary: 'Get published workflow',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsPublishPath }))
  .output(zGetAppsByAppIdWorkflowsPublishResponse)

/**
 * Publish workflow
 */
export const post63 = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsPublish',
    path: '/apps/{app_id}/workflows/publish',
    summary: 'Publish workflow',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPostAppsByAppIdWorkflowsPublishBody,
      params: zPostAppsByAppIdWorkflowsPublishPath,
    }),
  )
  .output(zPostAppsByAppIdWorkflowsPublishResponse)

export const publish = {
  get: get84,
  post: post63,
}

/**
 * Server-Sent Events stream of inspector deltas for a published workflow run.
 */
export const get85 = oc
  .route({
    description: 'Server-Sent Events stream of inspector deltas for a published workflow run.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEvents',
    path: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/events',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsPath }))
  .output(zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsEventsResponse)

export const events2 = {
  get: get85,
}

/**
 * Full value for one declared output of a published run.
 */
export const get86 = oc
  .route({
    description: 'Full value for one declared output of a published run.',
    inputStructure: 'detailed',
    method: 'GET',
    operationId:
      'getAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreview',
    path: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}/{output_name}/preview',
    tags: ['console'],
  })
  .input(
    z.object({
      params:
        zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewPath,
    }),
  )
  .output(
    zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdByOutputNamePreviewResponse,
  )

export const preview7 = {
  get: get86,
}

export const byOutputName2 = {
  preview: preview7,
}

/**
 * One node's declared outputs for a published workflow run.
 */
export const get87 = oc
  .route({
    description: "One node's declared outputs for a published workflow run.",
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeId',
    path: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs/{node_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdPath }))
  .output(zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsByNodeIdResponse)

export const byNodeId10 = {
  get: get87,
  byOutputName: byOutputName2,
}

/**
 * Snapshot of every node's declared outputs for a published workflow run.
 */
export const get88 = oc
  .route({
    description: "Snapshot of every node's declared outputs for a published workflow run.",
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputs',
    path: '/apps/{app_id}/workflows/published/runs/{run_id}/node-outputs',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsPath }))
  .output(zGetAppsByAppIdWorkflowsPublishedRunsByRunIdNodeOutputsResponse)

export const nodeOutputs2 = {
  get: get88,
  events: events2,
  byNodeId: byNodeId10,
}

export const byRunId3 = {
  nodeOutputs: nodeOutputs2,
}

export const runs2 = {
  byRunId: byRunId3,
}

export const published = {
  runs: runs2,
}

/**
 * Get webhook trigger for a node
 */
export const get89 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflowsTriggersWebhook',
    path: '/apps/{app_id}/workflows/triggers/webhook',
    summary: 'Get webhook trigger for a node',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsTriggersWebhookPath,
      query: zGetAppsByAppIdWorkflowsTriggersWebhookQuery,
    }),
  )
  .output(zGetAppsByAppIdWorkflowsTriggersWebhookResponse)

export const webhook = {
  get: get89,
}

export const triggers2 = {
  webhook,
}

/**
 * Restore a published workflow version into the draft workflow
 */
export const post64 = oc
  .route({
    description: 'Restore a published workflow version into the draft workflow',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByAppIdWorkflowsByWorkflowIdRestore',
    path: '/apps/{app_id}/workflows/{workflow_id}/restore',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath }))
  .output(zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse)

export const restore = {
  post: post64,
}

/**
 * Delete workflow
 */
export const delete16 = oc
  .route({
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppIdWorkflowsByWorkflowId',
    path: '/apps/{app_id}/workflows/{workflow_id}',
    successStatus: 204,
    summary: 'Delete workflow',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdWorkflowsByWorkflowIdPath }))
  .output(zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse)

/**
 * Update workflow attributes
 *
 * Update workflow by ID
 */
export const patch3 = oc
  .route({
    description: 'Update workflow by ID',
    inputStructure: 'detailed',
    method: 'PATCH',
    operationId: 'patchAppsByAppIdWorkflowsByWorkflowId',
    path: '/apps/{app_id}/workflows/{workflow_id}',
    summary: 'Update workflow attributes',
    tags: ['console'],
  })
  .input(
    z.object({
      body: zPatchAppsByAppIdWorkflowsByWorkflowIdBody,
      params: zPatchAppsByAppIdWorkflowsByWorkflowIdPath,
    }),
  )
  .output(zPatchAppsByAppIdWorkflowsByWorkflowIdResponse)

export const byWorkflowId = {
  delete: delete16,
  patch: patch3,
  restore,
}

/**
 * Get published workflows
 *
 * Get all published workflows for an application
 */
export const get90 = oc
  .route({
    description: 'Get all published workflows for an application',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppIdWorkflows',
    path: '/apps/{app_id}/workflows',
    summary: 'Get published workflows',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetAppsByAppIdWorkflowsPath,
      query: zGetAppsByAppIdWorkflowsQuery.optional(),
    }),
  )
  .output(zGetAppsByAppIdWorkflowsResponse)

export const workflows3 = {
  get: get90,
  defaultWorkflowBlockConfigs,
  draft: draft2,
  publish,
  published,
  triggers: triggers2,
  byWorkflowId,
}

/**
 * Delete app
 *
 * Delete application
 */
export const delete17 = oc
  .route({
    description: 'Delete application',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByAppId',
    path: '/apps/{app_id}',
    successStatus: 204,
    summary: 'Delete app',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByAppIdPath }))
  .output(zDeleteAppsByAppIdResponse)

/**
 * Get app detail
 *
 * Get application details
 */
export const get91 = oc
  .route({
    description: 'Get application details',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByAppId',
    path: '/apps/{app_id}',
    summary: 'Get app detail',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByAppIdPath }))
  .output(zGetAppsByAppIdResponse)

/**
 * Update app
 *
 * Update application details
 */
export const put6 = oc
  .route({
    description: 'Update application details',
    inputStructure: 'detailed',
    method: 'PUT',
    operationId: 'putAppsByAppId',
    path: '/apps/{app_id}',
    summary: 'Update app',
    tags: ['console'],
  })
  .input(z.object({ body: zPutAppsByAppIdBody, params: zPutAppsByAppIdPath }))
  .output(zPutAppsByAppIdResponse)

export const byAppId2 = {
  delete: delete17,
  get: get91,
  put: put6,
  advancedChat,
  agent,
  annotationReply,
  annotationSetting,
  annotationSettings,
  annotations,
  apiEnable,
  audioToText,
  chatConversations,
  chatMessages,
  completionConversations,
  completionMessages,
  conversationVariables,
  convertToWorkflow,
  copy,
  export: export2,
  feedbacks,
  icon,
  messages,
  modelConfig,
  name,
  publishToCreatorsPlatform,
  server,
  site,
  siteEnable,
  star,
  statistics,
  textToAudio,
  trace,
  traceConfig,
  triggerEnable,
  triggers,
  workflowAppLogs,
  workflowArchivedLogs,
  workflowRuns: workflowRuns2,
  workflow,
  workflows: workflows3,
}

/**
 * Delete an API key for an app
 *
 * Delete an API key for an app
 */
export const delete18 = oc
  .route({
    description: 'Delete an API key for an app',
    inputStructure: 'detailed',
    method: 'DELETE',
    operationId: 'deleteAppsByResourceIdApiKeysByApiKeyId',
    path: '/apps/{resource_id}/api-keys/{api_key_id}',
    successStatus: 204,
    summary: 'Delete an API key for an app',
    tags: ['console'],
  })
  .input(z.object({ params: zDeleteAppsByResourceIdApiKeysByApiKeyIdPath }))
  .output(zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse)

export const byApiKeyId = {
  delete: delete18,
}

/**
 * Get all API keys for an app
 *
 * Get all API keys for an app
 */
export const get92 = oc
  .route({
    description: 'Get all API keys for an app',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByResourceIdApiKeys',
    path: '/apps/{resource_id}/api-keys',
    summary: 'Get all API keys for an app',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByResourceIdApiKeysPath }))
  .output(zGetAppsByResourceIdApiKeysResponse)

/**
 * Create a new API key for an app
 *
 * Create a new API key for an app
 */
export const post65 = oc
  .route({
    description: 'Create a new API key for an app',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postAppsByResourceIdApiKeys',
    path: '/apps/{resource_id}/api-keys',
    successStatus: 201,
    summary: 'Create a new API key for an app',
    tags: ['console'],
  })
  .input(z.object({ params: zPostAppsByResourceIdApiKeysPath }))
  .output(zPostAppsByResourceIdApiKeysResponse)

export const apiKeys = {
  get: get92,
  post: post65,
  byApiKeyId,
}

export const byResourceId = {
  apiKeys,
}

/**
 * Refresh MCP server configuration and regenerate server code
 */
export const get93 = oc
  .route({
    description: 'Refresh MCP server configuration and regenerate server code',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getAppsByServerIdServerRefresh',
    path: '/apps/{server_id}/server/refresh',
    tags: ['console'],
  })
  .input(z.object({ params: zGetAppsByServerIdServerRefreshPath }))
  .output(zGetAppsByServerIdServerRefreshResponse)

export const refresh = {
  get: get93,
}

export const server2 = {
  refresh,
}

export const byServerId = {
  server: server2,
}

/**
 * Get app list
 *
 * Get list of applications with pagination and filtering
 */
export const get94 = oc
  .route({
    description: 'Get list of applications with pagination and filtering',
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getApps',
    path: '/apps',
    summary: 'Get app list',
    tags: ['console'],
  })
  .input(z.object({ query: zGetAppsQuery.optional() }))
  .output(zGetAppsResponse)

/**
 * Create app
 *
 * Create a new application
 */
export const post66 = oc
  .route({
    description: 'Create a new application',
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postApps',
    path: '/apps',
    successStatus: 201,
    summary: 'Create app',
    tags: ['console'],
  })
  .input(z.object({ body: zPostAppsBody }))
  .output(zPostAppsResponse)

export const apps = {
  get: get94,
  post: post66,
  imports,
  recent,
  starred,
  workflows,
  byAppId: byAppId2,
  byResourceId,
  byServerId,
}

export const contract = {
  apps,
}
