mirror of
https://github.com/langgenius/dify.git
synced 2026-06-16 22:11:09 +08:00
101 lines
2.2 KiB
TypeScript
101 lines
2.2 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { oc } from '@orpc/contract'
|
|
import * as z from 'zod'
|
|
|
|
import {
|
|
zGetAgentsByAgentIdPath,
|
|
zGetAgentsByAgentIdResponse,
|
|
zGetAgentsByAgentIdVersionsByVersionIdPath,
|
|
zGetAgentsByAgentIdVersionsByVersionIdResponse,
|
|
zGetAgentsByAgentIdVersionsPath,
|
|
zGetAgentsByAgentIdVersionsResponse,
|
|
zGetAgentsInviteOptionsQuery,
|
|
zGetAgentsInviteOptionsResponse,
|
|
zGetAgentsQuery,
|
|
zGetAgentsResponse,
|
|
} from './zod.gen'
|
|
|
|
export const get = oc
|
|
.route({
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getAgentsInviteOptions',
|
|
path: '/agents/invite-options',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ query: zGetAgentsInviteOptionsQuery.optional() }))
|
|
.output(zGetAgentsInviteOptionsResponse)
|
|
|
|
export const inviteOptions = {
|
|
get,
|
|
}
|
|
|
|
export const get2 = oc
|
|
.route({
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getAgentsByAgentIdVersionsByVersionId',
|
|
path: '/agents/{agent_id}/versions/{version_id}',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ params: zGetAgentsByAgentIdVersionsByVersionIdPath }))
|
|
.output(zGetAgentsByAgentIdVersionsByVersionIdResponse)
|
|
|
|
export const byVersionId = {
|
|
get: get2,
|
|
}
|
|
|
|
export const get3 = oc
|
|
.route({
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getAgentsByAgentIdVersions',
|
|
path: '/agents/{agent_id}/versions',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ params: zGetAgentsByAgentIdVersionsPath }))
|
|
.output(zGetAgentsByAgentIdVersionsResponse)
|
|
|
|
export const versions = {
|
|
get: get3,
|
|
byVersionId,
|
|
}
|
|
|
|
export const get4 = oc
|
|
.route({
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getAgentsByAgentId',
|
|
path: '/agents/{agent_id}',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ params: zGetAgentsByAgentIdPath }))
|
|
.output(zGetAgentsByAgentIdResponse)
|
|
|
|
export const byAgentId = {
|
|
get: get4,
|
|
versions,
|
|
}
|
|
|
|
export const get5 = oc
|
|
.route({
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getAgents',
|
|
path: '/agents',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ query: zGetAgentsQuery.optional() }))
|
|
.output(zGetAgentsResponse)
|
|
|
|
export const agents = {
|
|
get: get5,
|
|
inviteOptions,
|
|
byAgentId,
|
|
}
|
|
|
|
export const contract = {
|
|
agents,
|
|
}
|