dify/packages/contracts/generated/api/console/agent/orpc.gen.ts
yyh ab521c4cfd
refactor(chat): modernize speech-to-text pipeline (#38653)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yansong Zhang <916125788@qq.com>
2026-07-13 04:21:29 +00:00

1513 lines
40 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteAgentByAgentIdApiKeysByApiKeyIdPath,
zDeleteAgentByAgentIdApiKeysByApiKeyIdResponse,
zDeleteAgentByAgentIdBuildDraftPath,
zDeleteAgentByAgentIdBuildDraftResponse,
zDeleteAgentByAgentIdConfigFilesByNamePath,
zDeleteAgentByAgentIdConfigFilesByNameQuery,
zDeleteAgentByAgentIdConfigFilesByNameResponse,
zDeleteAgentByAgentIdConfigSkillsByNamePath,
zDeleteAgentByAgentIdConfigSkillsByNameQuery,
zDeleteAgentByAgentIdConfigSkillsByNameResponse,
zDeleteAgentByAgentIdFilesPath,
zDeleteAgentByAgentIdFilesQuery,
zDeleteAgentByAgentIdFilesResponse,
zDeleteAgentByAgentIdPath,
zDeleteAgentByAgentIdResponse,
zDeleteAgentByAgentIdSkillsBySlugPath,
zDeleteAgentByAgentIdSkillsBySlugResponse,
zGetAgentByAgentIdApiAccessPath,
zGetAgentByAgentIdApiAccessResponse,
zGetAgentByAgentIdApiKeysPath,
zGetAgentByAgentIdApiKeysResponse,
zGetAgentByAgentIdBuildDraftPath,
zGetAgentByAgentIdBuildDraftResponse,
zGetAgentByAgentIdChatMessagesByMessageIdSuggestedQuestionsPath,
zGetAgentByAgentIdChatMessagesByMessageIdSuggestedQuestionsResponse,
zGetAgentByAgentIdChatMessagesPath,
zGetAgentByAgentIdChatMessagesQuery,
zGetAgentByAgentIdChatMessagesResponse,
zGetAgentByAgentIdComposerCandidatesPath,
zGetAgentByAgentIdComposerCandidatesResponse,
zGetAgentByAgentIdComposerPath,
zGetAgentByAgentIdComposerResponse,
zGetAgentByAgentIdConfigFilesByNameDownloadPath,
zGetAgentByAgentIdConfigFilesByNameDownloadQuery,
zGetAgentByAgentIdConfigFilesByNameDownloadResponse,
zGetAgentByAgentIdConfigFilesByNamePreviewPath,
zGetAgentByAgentIdConfigFilesByNamePreviewQuery,
zGetAgentByAgentIdConfigFilesByNamePreviewResponse,
zGetAgentByAgentIdConfigFilesPath,
zGetAgentByAgentIdConfigFilesQuery,
zGetAgentByAgentIdConfigFilesResponse,
zGetAgentByAgentIdConfigManifestPath,
zGetAgentByAgentIdConfigManifestQuery,
zGetAgentByAgentIdConfigManifestResponse,
zGetAgentByAgentIdConfigSkillsByNameDownloadPath,
zGetAgentByAgentIdConfigSkillsByNameDownloadQuery,
zGetAgentByAgentIdConfigSkillsByNameDownloadResponse,
zGetAgentByAgentIdConfigSkillsByNameFilesContentPath,
zGetAgentByAgentIdConfigSkillsByNameFilesContentResponse,
zGetAgentByAgentIdConfigSkillsByNameFilesDownloadPath,
zGetAgentByAgentIdConfigSkillsByNameFilesDownloadQuery,
zGetAgentByAgentIdConfigSkillsByNameFilesDownloadResponse,
zGetAgentByAgentIdConfigSkillsByNameFilesPreviewPath,
zGetAgentByAgentIdConfigSkillsByNameFilesPreviewQuery,
zGetAgentByAgentIdConfigSkillsByNameFilesPreviewResponse,
zGetAgentByAgentIdConfigSkillsByNameInspectPath,
zGetAgentByAgentIdConfigSkillsByNameInspectQuery,
zGetAgentByAgentIdConfigSkillsByNameInspectResponse,
zGetAgentByAgentIdConfigSkillsPath,
zGetAgentByAgentIdConfigSkillsQuery,
zGetAgentByAgentIdConfigSkillsResponse,
zGetAgentByAgentIdDriveFilesDownloadPath,
zGetAgentByAgentIdDriveFilesDownloadQuery,
zGetAgentByAgentIdDriveFilesDownloadResponse,
zGetAgentByAgentIdDriveFilesPath,
zGetAgentByAgentIdDriveFilesPreviewPath,
zGetAgentByAgentIdDriveFilesPreviewQuery,
zGetAgentByAgentIdDriveFilesPreviewResponse,
zGetAgentByAgentIdDriveFilesQuery,
zGetAgentByAgentIdDriveFilesResponse,
zGetAgentByAgentIdDriveSkillsBySkillPathInspectPath,
zGetAgentByAgentIdDriveSkillsBySkillPathInspectResponse,
zGetAgentByAgentIdDriveSkillsPath,
zGetAgentByAgentIdDriveSkillsResponse,
zGetAgentByAgentIdLogsByConversationIdMessagesPath,
zGetAgentByAgentIdLogsByConversationIdMessagesQuery,
zGetAgentByAgentIdLogsByConversationIdMessagesResponse,
zGetAgentByAgentIdLogSourcesPath,
zGetAgentByAgentIdLogSourcesResponse,
zGetAgentByAgentIdLogsPath,
zGetAgentByAgentIdLogsQuery,
zGetAgentByAgentIdLogsResponse,
zGetAgentByAgentIdMessagesByMessageIdPath,
zGetAgentByAgentIdMessagesByMessageIdResponse,
zGetAgentByAgentIdPath,
zGetAgentByAgentIdReferencingWorkflowsPath,
zGetAgentByAgentIdReferencingWorkflowsResponse,
zGetAgentByAgentIdResponse,
zGetAgentByAgentIdSandboxFilesPath,
zGetAgentByAgentIdSandboxFilesQuery,
zGetAgentByAgentIdSandboxFilesReadPath,
zGetAgentByAgentIdSandboxFilesReadQuery,
zGetAgentByAgentIdSandboxFilesReadResponse,
zGetAgentByAgentIdSandboxFilesResponse,
zGetAgentByAgentIdSandboxPath,
zGetAgentByAgentIdSandboxQuery,
zGetAgentByAgentIdSandboxResponse,
zGetAgentByAgentIdStatisticsSummaryPath,
zGetAgentByAgentIdStatisticsSummaryQuery,
zGetAgentByAgentIdStatisticsSummaryResponse,
zGetAgentByAgentIdVersionsByVersionIdPath,
zGetAgentByAgentIdVersionsByVersionIdResponse,
zGetAgentByAgentIdVersionsPath,
zGetAgentByAgentIdVersionsResponse,
zGetAgentInviteOptionsQuery,
zGetAgentInviteOptionsResponse,
zGetAgentQuery,
zGetAgentResponse,
zPostAgentBody,
zPostAgentByAgentIdApiEnableBody,
zPostAgentByAgentIdApiEnablePath,
zPostAgentByAgentIdApiEnableResponse,
zPostAgentByAgentIdApiKeysPath,
zPostAgentByAgentIdApiKeysResponse,
zPostAgentByAgentIdAudioToTextBody,
zPostAgentByAgentIdAudioToTextPath,
zPostAgentByAgentIdAudioToTextResponse,
zPostAgentByAgentIdBuildChatFinalizePath,
zPostAgentByAgentIdBuildChatFinalizeResponse,
zPostAgentByAgentIdBuildDraftApplyPath,
zPostAgentByAgentIdBuildDraftApplyResponse,
zPostAgentByAgentIdBuildDraftCheckoutBody,
zPostAgentByAgentIdBuildDraftCheckoutPath,
zPostAgentByAgentIdBuildDraftCheckoutResponse,
zPostAgentByAgentIdChatMessagesByTaskIdStopPath,
zPostAgentByAgentIdChatMessagesByTaskIdStopResponse,
zPostAgentByAgentIdComposerValidateBody,
zPostAgentByAgentIdComposerValidatePath,
zPostAgentByAgentIdComposerValidateResponse,
zPostAgentByAgentIdConfigFilesBody,
zPostAgentByAgentIdConfigFilesPath,
zPostAgentByAgentIdConfigFilesQuery,
zPostAgentByAgentIdConfigFilesResponse,
zPostAgentByAgentIdConfigSkillsUploadBody,
zPostAgentByAgentIdConfigSkillsUploadPath,
zPostAgentByAgentIdConfigSkillsUploadQuery,
zPostAgentByAgentIdConfigSkillsUploadResponse,
zPostAgentByAgentIdCopyBody,
zPostAgentByAgentIdCopyPath,
zPostAgentByAgentIdCopyResponse,
zPostAgentByAgentIdDebugConversationRefreshPath,
zPostAgentByAgentIdDebugConversationRefreshResponse,
zPostAgentByAgentIdFeaturesBody,
zPostAgentByAgentIdFeaturesPath,
zPostAgentByAgentIdFeaturesResponse,
zPostAgentByAgentIdFeedbacksBody,
zPostAgentByAgentIdFeedbacksPath,
zPostAgentByAgentIdFeedbacksResponse,
zPostAgentByAgentIdFilesBody,
zPostAgentByAgentIdFilesPath,
zPostAgentByAgentIdFilesResponse,
zPostAgentByAgentIdPublishBody,
zPostAgentByAgentIdPublishPath,
zPostAgentByAgentIdPublishResponse,
zPostAgentByAgentIdSandboxFilesUploadBody,
zPostAgentByAgentIdSandboxFilesUploadPath,
zPostAgentByAgentIdSandboxFilesUploadResponse,
zPostAgentByAgentIdSkillsBySlugInferToolsPath,
zPostAgentByAgentIdSkillsBySlugInferToolsResponse,
zPostAgentByAgentIdSkillsUploadBody,
zPostAgentByAgentIdSkillsUploadPath,
zPostAgentByAgentIdSkillsUploadResponse,
zPostAgentByAgentIdVersionsByVersionIdRestorePath,
zPostAgentByAgentIdVersionsByVersionIdRestoreResponse,
zPostAgentResponse,
zPutAgentByAgentIdBody,
zPutAgentByAgentIdBuildDraftBody,
zPutAgentByAgentIdBuildDraftPath,
zPutAgentByAgentIdBuildDraftResponse,
zPutAgentByAgentIdComposerBody,
zPutAgentByAgentIdComposerPath,
zPutAgentByAgentIdComposerResponse,
zPutAgentByAgentIdPath,
zPutAgentByAgentIdResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentInviteOptions',
path: '/agent/invite-options',
tags: ['console'],
})
.input(z.object({ query: zGetAgentInviteOptionsQuery.optional() }))
.output(zGetAgentInviteOptionsResponse)
export const inviteOptions = {
get,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdApiAccess',
path: '/agent/{agent_id}/api-access',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdApiAccessPath }))
.output(zGetAgentByAgentIdApiAccessResponse)
export const apiAccess = {
get: get2,
}
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdApiEnable',
path: '/agent/{agent_id}/api-enable',
tags: ['console'],
})
.input(
z.object({ body: zPostAgentByAgentIdApiEnableBody, params: zPostAgentByAgentIdApiEnablePath }),
)
.output(zPostAgentByAgentIdApiEnableResponse)
export const apiEnable = {
post,
}
export const delete_ = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdApiKeysByApiKeyId',
path: '/agent/{agent_id}/api-keys/{api_key_id}',
successStatus: 204,
tags: ['console'],
})
.input(z.object({ params: zDeleteAgentByAgentIdApiKeysByApiKeyIdPath }))
.output(zDeleteAgentByAgentIdApiKeysByApiKeyIdResponse)
export const byApiKeyId = {
delete: delete_,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdApiKeys',
path: '/agent/{agent_id}/api-keys',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdApiKeysPath }))
.output(zGetAgentByAgentIdApiKeysResponse)
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdApiKeys',
path: '/agent/{agent_id}/api-keys',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdApiKeysPath }))
.output(zPostAgentByAgentIdApiKeysResponse)
export const apiKeys = {
get: get3,
post: post2,
byApiKeyId,
}
/**
* Transcribe audio using the current Agent debug configuration
*/
export const post3 = oc
.route({
description: 'Transcribe audio using the current Agent debug configuration',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdAudioToText',
path: '/agent/{agent_id}/audio-to-text',
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdAudioToTextBody,
params: zPostAgentByAgentIdAudioToTextPath,
}),
)
.output(zPostAgentByAgentIdAudioToTextResponse)
export const audioToText = {
post: post3,
}
/**
* Run a build-draft Agent App turn that asks the agent to push config updates
*/
export const post4 = oc
.route({
description: 'Run a build-draft Agent App turn that asks the agent to push config updates',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdBuildChatFinalize',
path: '/agent/{agent_id}/build-chat/finalize',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdBuildChatFinalizePath }))
.output(zPostAgentByAgentIdBuildChatFinalizeResponse)
export const finalize = {
post: post4,
}
export const buildChat = {
finalize,
}
export const post5 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdBuildDraftApply',
path: '/agent/{agent_id}/build-draft/apply',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdBuildDraftApplyPath }))
.output(zPostAgentByAgentIdBuildDraftApplyResponse)
export const apply = {
post: post5,
}
export const post6 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdBuildDraftCheckout',
path: '/agent/{agent_id}/build-draft/checkout',
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdBuildDraftCheckoutBody,
params: zPostAgentByAgentIdBuildDraftCheckoutPath,
}),
)
.output(zPostAgentByAgentIdBuildDraftCheckoutResponse)
export const checkout = {
post: post6,
}
export const delete2 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdBuildDraft',
path: '/agent/{agent_id}/build-draft',
tags: ['console'],
})
.input(z.object({ params: zDeleteAgentByAgentIdBuildDraftPath }))
.output(zDeleteAgentByAgentIdBuildDraftResponse)
export const get4 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdBuildDraft',
path: '/agent/{agent_id}/build-draft',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdBuildDraftPath }))
.output(zGetAgentByAgentIdBuildDraftResponse)
export const put = oc
.route({
inputStructure: 'detailed',
method: 'PUT',
operationId: 'putAgentByAgentIdBuildDraft',
path: '/agent/{agent_id}/build-draft',
tags: ['console'],
})
.input(
z.object({ body: zPutAgentByAgentIdBuildDraftBody, params: zPutAgentByAgentIdBuildDraftPath }),
)
.output(zPutAgentByAgentIdBuildDraftResponse)
export const buildDraft = {
delete: delete2,
get: get4,
put,
apply,
checkout,
}
/**
* Get suggested questions for an Agent App message
*/
export const get5 = oc
.route({
description: 'Get suggested questions for an Agent App message',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdChatMessagesByMessageIdSuggestedQuestions',
path: '/agent/{agent_id}/chat-messages/{message_id}/suggested-questions',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdChatMessagesByMessageIdSuggestedQuestionsPath }))
.output(zGetAgentByAgentIdChatMessagesByMessageIdSuggestedQuestionsResponse)
export const suggestedQuestions = {
get: get5,
}
export const byMessageId = {
suggestedQuestions,
}
/**
* Stop a running Agent App chat message generation
*/
export const post7 = oc
.route({
description: 'Stop a running Agent App chat message generation',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdChatMessagesByTaskIdStop',
path: '/agent/{agent_id}/chat-messages/{task_id}/stop',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdChatMessagesByTaskIdStopPath }))
.output(zPostAgentByAgentIdChatMessagesByTaskIdStopResponse)
export const stop = {
post: post7,
}
export const byTaskId = {
stop,
}
/**
* Get Agent App chat messages for a conversation with pagination
*/
export const get6 = oc
.route({
description: 'Get Agent App chat messages for a conversation with pagination',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdChatMessages',
path: '/agent/{agent_id}/chat-messages',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdChatMessagesPath,
query: zGetAgentByAgentIdChatMessagesQuery,
}),
)
.output(zGetAgentByAgentIdChatMessagesResponse)
export const chatMessages = {
get: get6,
byMessageId,
byTaskId,
}
export const get7 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdComposerCandidates',
path: '/agent/{agent_id}/composer/candidates',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdComposerCandidatesPath }))
.output(zGetAgentByAgentIdComposerCandidatesResponse)
export const candidates = {
get: get7,
}
export const post8 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdComposerValidate',
path: '/agent/{agent_id}/composer/validate',
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdComposerValidateBody,
params: zPostAgentByAgentIdComposerValidatePath,
}),
)
.output(zPostAgentByAgentIdComposerValidateResponse)
export const validate = {
post: post8,
}
export const get8 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdComposer',
path: '/agent/{agent_id}/composer',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdComposerPath }))
.output(zGetAgentByAgentIdComposerResponse)
export const put2 = oc
.route({
inputStructure: 'detailed',
method: 'PUT',
operationId: 'putAgentByAgentIdComposer',
path: '/agent/{agent_id}/composer',
tags: ['console'],
})
.input(z.object({ body: zPutAgentByAgentIdComposerBody, params: zPutAgentByAgentIdComposerPath }))
.output(zPutAgentByAgentIdComposerResponse)
export const composer = {
get: get8,
put: put2,
candidates,
validate,
}
export const get9 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigFilesByNameDownload',
path: '/agent/{agent_id}/config/files/{name}/download',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigFilesByNameDownloadPath,
query: zGetAgentByAgentIdConfigFilesByNameDownloadQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigFilesByNameDownloadResponse)
export const download = {
get: get9,
}
export const get10 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigFilesByNamePreview',
path: '/agent/{agent_id}/config/files/{name}/preview',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigFilesByNamePreviewPath,
query: zGetAgentByAgentIdConfigFilesByNamePreviewQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigFilesByNamePreviewResponse)
export const preview = {
get: get10,
}
export const delete3 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdConfigFilesByName',
path: '/agent/{agent_id}/config/files/{name}',
tags: ['console'],
})
.input(
z.object({
params: zDeleteAgentByAgentIdConfigFilesByNamePath,
query: zDeleteAgentByAgentIdConfigFilesByNameQuery.optional(),
}),
)
.output(zDeleteAgentByAgentIdConfigFilesByNameResponse)
export const byName = {
delete: delete3,
download,
preview,
}
export const get11 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigFiles',
path: '/agent/{agent_id}/config/files',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigFilesPath,
query: zGetAgentByAgentIdConfigFilesQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigFilesResponse)
export const post9 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdConfigFiles',
path: '/agent/{agent_id}/config/files',
successStatus: 201,
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdConfigFilesBody,
params: zPostAgentByAgentIdConfigFilesPath,
query: zPostAgentByAgentIdConfigFilesQuery.optional(),
}),
)
.output(zPostAgentByAgentIdConfigFilesResponse)
export const files = {
get: get11,
post: post9,
byName,
}
export const get12 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigManifest',
path: '/agent/{agent_id}/config/manifest',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigManifestPath,
query: zGetAgentByAgentIdConfigManifestQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigManifestResponse)
export const manifest = {
get: get12,
}
export const post10 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdConfigSkillsUpload',
path: '/agent/{agent_id}/config/skills/upload',
successStatus: 201,
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdConfigSkillsUploadBody,
params: zPostAgentByAgentIdConfigSkillsUploadPath,
query: zPostAgentByAgentIdConfigSkillsUploadQuery.optional(),
}),
)
.output(zPostAgentByAgentIdConfigSkillsUploadResponse)
export const upload = {
post: post10,
}
export const get13 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkillsByNameDownload',
path: '/agent/{agent_id}/config/skills/{name}/download',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigSkillsByNameDownloadPath,
query: zGetAgentByAgentIdConfigSkillsByNameDownloadQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigSkillsByNameDownloadResponse)
export const download2 = {
get: get13,
}
export const get14 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkillsByNameFilesContent',
path: '/agent/{agent_id}/config/skills/{name}/files/content',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdConfigSkillsByNameFilesContentPath }))
.output(zGetAgentByAgentIdConfigSkillsByNameFilesContentResponse)
export const content = {
get: get14,
}
export const get15 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkillsByNameFilesDownload',
path: '/agent/{agent_id}/config/skills/{name}/files/download',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigSkillsByNameFilesDownloadPath,
query: zGetAgentByAgentIdConfigSkillsByNameFilesDownloadQuery,
}),
)
.output(zGetAgentByAgentIdConfigSkillsByNameFilesDownloadResponse)
export const download3 = {
get: get15,
}
export const get16 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkillsByNameFilesPreview',
path: '/agent/{agent_id}/config/skills/{name}/files/preview',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigSkillsByNameFilesPreviewPath,
query: zGetAgentByAgentIdConfigSkillsByNameFilesPreviewQuery,
}),
)
.output(zGetAgentByAgentIdConfigSkillsByNameFilesPreviewResponse)
export const preview2 = {
get: get16,
}
export const files2 = {
content,
download: download3,
preview: preview2,
}
export const get17 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkillsByNameInspect',
path: '/agent/{agent_id}/config/skills/{name}/inspect',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigSkillsByNameInspectPath,
query: zGetAgentByAgentIdConfigSkillsByNameInspectQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigSkillsByNameInspectResponse)
export const inspect = {
get: get17,
}
export const delete4 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdConfigSkillsByName',
path: '/agent/{agent_id}/config/skills/{name}',
tags: ['console'],
})
.input(
z.object({
params: zDeleteAgentByAgentIdConfigSkillsByNamePath,
query: zDeleteAgentByAgentIdConfigSkillsByNameQuery.optional(),
}),
)
.output(zDeleteAgentByAgentIdConfigSkillsByNameResponse)
export const byName2 = {
delete: delete4,
download: download2,
files: files2,
inspect,
}
export const get18 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdConfigSkills',
path: '/agent/{agent_id}/config/skills',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdConfigSkillsPath,
query: zGetAgentByAgentIdConfigSkillsQuery.optional(),
}),
)
.output(zGetAgentByAgentIdConfigSkillsResponse)
export const skills = {
get: get18,
upload,
byName: byName2,
}
export const config = {
files,
manifest,
skills,
}
export const post11 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdCopy',
path: '/agent/{agent_id}/copy',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ body: zPostAgentByAgentIdCopyBody, params: zPostAgentByAgentIdCopyPath }))
.output(zPostAgentByAgentIdCopyResponse)
export const copy = {
post: post11,
}
export const post12 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdDebugConversationRefresh',
path: '/agent/{agent_id}/debug-conversation/refresh',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdDebugConversationRefreshPath }))
.output(zPostAgentByAgentIdDebugConversationRefreshResponse)
export const refresh = {
post: post12,
}
export const debugConversation = {
refresh,
}
/**
* Time-limited external signed URL for one Agent App drive value
*/
export const get19 = oc
.route({
description: 'Time-limited external signed URL for one Agent App drive value',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdDriveFilesDownload',
path: '/agent/{agent_id}/drive/files/download',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdDriveFilesDownloadPath,
query: zGetAgentByAgentIdDriveFilesDownloadQuery,
}),
)
.output(zGetAgentByAgentIdDriveFilesDownloadResponse)
export const download4 = {
get: get19,
}
/**
* Truncated text preview of one Agent App drive value
*/
export const get20 = oc
.route({
description: 'Truncated text preview of one Agent App drive value',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdDriveFilesPreview',
path: '/agent/{agent_id}/drive/files/preview',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdDriveFilesPreviewPath,
query: zGetAgentByAgentIdDriveFilesPreviewQuery,
}),
)
.output(zGetAgentByAgentIdDriveFilesPreviewResponse)
export const preview3 = {
get: get20,
}
/**
* List agent drive entries for an Agent App
*/
export const get21 = oc
.route({
description: 'List agent drive entries for an Agent App',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdDriveFiles',
path: '/agent/{agent_id}/drive/files',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdDriveFilesPath,
query: zGetAgentByAgentIdDriveFilesQuery.optional(),
}),
)
.output(zGetAgentByAgentIdDriveFilesResponse)
export const files3 = {
get: get21,
download: download4,
preview: preview3,
}
/**
* Inspect one drive-backed skill for slash-menu hover/detail UI
*/
export const get22 = oc
.route({
description: 'Inspect one drive-backed skill for slash-menu hover/detail UI',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdDriveSkillsBySkillPathInspect',
path: '/agent/{agent_id}/drive/skills/{skill_path}/inspect',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdDriveSkillsBySkillPathInspectPath }))
.output(zGetAgentByAgentIdDriveSkillsBySkillPathInspectResponse)
export const inspect2 = {
get: get22,
}
export const bySkillPath = {
inspect: inspect2,
}
/**
* List drive-backed skills for an Agent App
*/
export const get23 = oc
.route({
description: 'List drive-backed skills for an Agent App',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdDriveSkills',
path: '/agent/{agent_id}/drive/skills',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdDriveSkillsPath }))
.output(zGetAgentByAgentIdDriveSkillsResponse)
export const skills2 = {
get: get23,
bySkillPath,
}
export const drive = {
files: files3,
skills: skills2,
}
/**
* Update an Agent App's presentation features (opener, follow-up, citations, ...)
*/
export const post13 = oc
.route({
description: "Update an Agent App's presentation features (opener, follow-up, citations, ...)",
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdFeatures',
path: '/agent/{agent_id}/features',
tags: ['console'],
})
.input(
z.object({ body: zPostAgentByAgentIdFeaturesBody, params: zPostAgentByAgentIdFeaturesPath }),
)
.output(zPostAgentByAgentIdFeaturesResponse)
export const features = {
post: post13,
}
/**
* Create or update Agent App message feedback
*/
export const post14 = oc
.route({
description: 'Create or update Agent App message feedback',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdFeedbacks',
path: '/agent/{agent_id}/feedbacks',
tags: ['console'],
})
.input(
z.object({ body: zPostAgentByAgentIdFeedbacksBody, params: zPostAgentByAgentIdFeedbacksPath }),
)
.output(zPostAgentByAgentIdFeedbacksResponse)
export const feedbacks = {
post: post14,
}
/**
* Delete one Agent App drive file by key
*/
export const delete5 = oc
.route({
description: 'Delete one Agent App drive file by key',
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdFiles',
path: '/agent/{agent_id}/files',
tags: ['console'],
})
.input(
z.object({ params: zDeleteAgentByAgentIdFilesPath, query: zDeleteAgentByAgentIdFilesQuery }),
)
.output(zDeleteAgentByAgentIdFilesResponse)
/**
* Commit an uploaded file into the Agent App drive under files/<name>
*/
export const post15 = oc
.route({
description: 'Commit an uploaded file into the Agent App drive under files/<name>',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdFiles',
path: '/agent/{agent_id}/files',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ body: zPostAgentByAgentIdFilesBody, params: zPostAgentByAgentIdFilesPath }))
.output(zPostAgentByAgentIdFilesResponse)
export const files4 = {
delete: delete5,
post: post15,
}
export const get24 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdLogSources',
path: '/agent/{agent_id}/log-sources',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdLogSourcesPath }))
.output(zGetAgentByAgentIdLogSourcesResponse)
export const logSources = {
get: get24,
}
export const get25 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdLogsByConversationIdMessages',
path: '/agent/{agent_id}/logs/{conversation_id}/messages',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdLogsByConversationIdMessagesPath,
query: zGetAgentByAgentIdLogsByConversationIdMessagesQuery.optional(),
}),
)
.output(zGetAgentByAgentIdLogsByConversationIdMessagesResponse)
export const messages = {
get: get25,
}
export const byConversationId = {
messages,
}
export const get26 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdLogs',
path: '/agent/{agent_id}/logs',
tags: ['console'],
})
.input(
z.object({ params: zGetAgentByAgentIdLogsPath, query: zGetAgentByAgentIdLogsQuery.optional() }),
)
.output(zGetAgentByAgentIdLogsResponse)
export const logs = {
get: get26,
byConversationId,
}
/**
* Get Agent App message details by ID
*/
export const get27 = oc
.route({
description: 'Get Agent App message details by ID',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdMessagesByMessageId',
path: '/agent/{agent_id}/messages/{message_id}',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdMessagesByMessageIdPath }))
.output(zGetAgentByAgentIdMessagesByMessageIdResponse)
export const byMessageId2 = {
get: get27,
}
export const messages2 = {
byMessageId: byMessageId2,
}
export const post16 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdPublish',
path: '/agent/{agent_id}/publish',
tags: ['console'],
})
.input(z.object({ body: zPostAgentByAgentIdPublishBody, params: zPostAgentByAgentIdPublishPath }))
.output(zPostAgentByAgentIdPublishResponse)
export const publish = {
post: post16,
}
/**
* List workflow apps that reference this Agent App's bound Agent (read-only)
*/
export const get28 = oc
.route({
description: "List workflow apps that reference this Agent App's bound Agent (read-only)",
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdReferencingWorkflows',
path: '/agent/{agent_id}/referencing-workflows',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdReferencingWorkflowsPath }))
.output(zGetAgentByAgentIdReferencingWorkflowsResponse)
export const referencingWorkflows = {
get: get28,
}
/**
* Read a text/binary preview file in an Agent App conversation sandbox
*/
export const get29 = oc
.route({
description: 'Read a text/binary preview file in an Agent App conversation sandbox',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdSandboxFilesRead',
path: '/agent/{agent_id}/sandbox/files/read',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdSandboxFilesReadPath,
query: zGetAgentByAgentIdSandboxFilesReadQuery,
}),
)
.output(zGetAgentByAgentIdSandboxFilesReadResponse)
export const read = {
get: get29,
}
/**
* Upload one Agent App sandbox file and return a signed download URL
*/
export const post17 = oc
.route({
description: 'Upload one Agent App sandbox file and return a signed download URL',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdSandboxFilesUpload',
path: '/agent/{agent_id}/sandbox/files/upload',
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdSandboxFilesUploadBody,
params: zPostAgentByAgentIdSandboxFilesUploadPath,
}),
)
.output(zPostAgentByAgentIdSandboxFilesUploadResponse)
export const upload2 = {
post: post17,
}
/**
* List a directory in an Agent App conversation sandbox
*/
export const get30 = oc
.route({
description: 'List a directory in an Agent App conversation sandbox',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdSandboxFiles',
path: '/agent/{agent_id}/sandbox/files',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdSandboxFilesPath,
query: zGetAgentByAgentIdSandboxFilesQuery,
}),
)
.output(zGetAgentByAgentIdSandboxFilesResponse)
export const files5 = {
get: get30,
read,
upload: upload2,
}
/**
* Get basic information for an Agent App conversation sandbox
*/
export const get31 = oc
.route({
description: 'Get basic information for an Agent App conversation sandbox',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdSandbox',
path: '/agent/{agent_id}/sandbox',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdSandboxPath, query: zGetAgentByAgentIdSandboxQuery }))
.output(zGetAgentByAgentIdSandboxResponse)
export const sandbox = {
get: get31,
files: files5,
}
/**
* Upload + standardize a Skill into an Agent App drive
*/
export const post18 = oc
.route({
description: 'Upload + standardize a Skill into an Agent App drive',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdSkillsUpload',
path: '/agent/{agent_id}/skills/upload',
successStatus: 201,
tags: ['console'],
})
.input(
z.object({
body: zPostAgentByAgentIdSkillsUploadBody,
params: zPostAgentByAgentIdSkillsUploadPath,
}),
)
.output(zPostAgentByAgentIdSkillsUploadResponse)
export const upload3 = {
post: post18,
}
/**
* Infer CLI tool + ENV suggestions from a standardized Agent App skill
*/
export const post19 = oc
.route({
description: 'Infer CLI tool + ENV suggestions from a standardized Agent App skill',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdSkillsBySlugInferTools',
path: '/agent/{agent_id}/skills/{slug}/infer-tools',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdSkillsBySlugInferToolsPath }))
.output(zPostAgentByAgentIdSkillsBySlugInferToolsResponse)
export const inferTools = {
post: post19,
}
/**
* Delete a standardized skill from an Agent App drive
*/
export const delete6 = oc
.route({
description: 'Delete a standardized skill from an Agent App drive',
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentIdSkillsBySlug',
path: '/agent/{agent_id}/skills/{slug}',
tags: ['console'],
})
.input(z.object({ params: zDeleteAgentByAgentIdSkillsBySlugPath }))
.output(zDeleteAgentByAgentIdSkillsBySlugResponse)
export const bySlug = {
delete: delete6,
inferTools,
}
export const skills3 = {
upload: upload3,
bySlug,
}
export const get32 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdStatisticsSummary',
path: '/agent/{agent_id}/statistics/summary',
tags: ['console'],
})
.input(
z.object({
params: zGetAgentByAgentIdStatisticsSummaryPath,
query: zGetAgentByAgentIdStatisticsSummaryQuery.optional(),
}),
)
.output(zGetAgentByAgentIdStatisticsSummaryResponse)
export const summary = {
get: get32,
}
export const statistics = {
summary,
}
export const post20 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgentByAgentIdVersionsByVersionIdRestore',
path: '/agent/{agent_id}/versions/{version_id}/restore',
tags: ['console'],
})
.input(z.object({ params: zPostAgentByAgentIdVersionsByVersionIdRestorePath }))
.output(zPostAgentByAgentIdVersionsByVersionIdRestoreResponse)
export const restore = {
post: post20,
}
export const get33 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdVersionsByVersionId',
path: '/agent/{agent_id}/versions/{version_id}',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdVersionsByVersionIdPath }))
.output(zGetAgentByAgentIdVersionsByVersionIdResponse)
export const byVersionId = {
get: get33,
restore,
}
export const get34 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentIdVersions',
path: '/agent/{agent_id}/versions',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdVersionsPath }))
.output(zGetAgentByAgentIdVersionsResponse)
export const versions = {
get: get34,
byVersionId,
}
export const delete7 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAgentByAgentId',
path: '/agent/{agent_id}',
successStatus: 204,
tags: ['console'],
})
.input(z.object({ params: zDeleteAgentByAgentIdPath }))
.output(zDeleteAgentByAgentIdResponse)
export const get35 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgentByAgentId',
path: '/agent/{agent_id}',
tags: ['console'],
})
.input(z.object({ params: zGetAgentByAgentIdPath }))
.output(zGetAgentByAgentIdResponse)
export const put3 = oc
.route({
inputStructure: 'detailed',
method: 'PUT',
operationId: 'putAgentByAgentId',
path: '/agent/{agent_id}',
tags: ['console'],
})
.input(z.object({ body: zPutAgentByAgentIdBody, params: zPutAgentByAgentIdPath }))
.output(zPutAgentByAgentIdResponse)
export const byAgentId = {
delete: delete7,
get: get35,
put: put3,
apiAccess,
apiEnable,
apiKeys,
audioToText,
buildChat,
buildDraft,
chatMessages,
composer,
config,
copy,
debugConversation,
drive,
features,
feedbacks,
files: files4,
logSources,
logs,
messages: messages2,
publish,
referencingWorkflows,
sandbox,
skills: skills3,
statistics,
versions,
}
export const get36 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAgent',
path: '/agent',
tags: ['console'],
})
.input(z.object({ query: zGetAgentQuery.optional() }))
.output(zGetAgentResponse)
export const post21 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAgent',
path: '/agent',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ body: zPostAgentBody }))
.output(zPostAgentResponse)
export const agent = {
get: get36,
post: post21,
inviteOptions,
byAgentId,
}
export const contract = {
agent,
}