mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 00:33:37 +08:00
63 lines
2.3 KiB
TypeScript
63 lines
2.3 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { z } from 'zod'
|
|
|
|
import { zDeleteConversationData, zGetConversationsListData, zGetConversationsListResponse, zGetConversationVariablesData, zGetConversationVariablesResponse, zRenameConversationData, zRenameConversationResponse } from '../../zod/api/conversations'
|
|
import { base } from '../common'
|
|
|
|
/**
|
|
* Get Conversations
|
|
*
|
|
* Retrieve the conversation list for the current user, defaulting to the most recent 20 entries.
|
|
*/
|
|
export const getConversationsListContract = base.route({
|
|
method: 'GET',
|
|
path: '/conversations',
|
|
operationId: 'getConversationsList',
|
|
summary: 'Get Conversations',
|
|
description: 'Retrieve the conversation list for the current user, defaulting to the most recent 20 entries.',
|
|
tags: ['Conversations'],
|
|
}).input(zGetConversationsListData).output(z.object({ body: zGetConversationsListResponse, status: z.literal(200) }))
|
|
|
|
/**
|
|
* Delete Conversation
|
|
*
|
|
* Delete a conversation.
|
|
*/
|
|
export const deleteConversationContract = base.route({
|
|
method: 'DELETE',
|
|
path: '/conversations/{conversation_id}',
|
|
operationId: 'deleteConversation',
|
|
summary: 'Delete Conversation',
|
|
description: 'Delete a conversation.',
|
|
tags: ['Conversations'],
|
|
}).input(zDeleteConversationData)
|
|
|
|
/**
|
|
* Conversation Rename
|
|
*
|
|
* Rename the session. The session name is used for display on clients that support multiple sessions.
|
|
*/
|
|
export const renameConversationContract = base.route({
|
|
method: 'POST',
|
|
path: '/conversations/{conversation_id}/name',
|
|
operationId: 'renameConversation',
|
|
summary: 'Conversation Rename',
|
|
description: 'Rename the session. The session name is used for display on clients that support multiple sessions.',
|
|
tags: ['Conversations'],
|
|
}).input(zRenameConversationData).output(z.object({ body: zRenameConversationResponse, status: z.literal(200) }))
|
|
|
|
/**
|
|
* Get Conversation Variables
|
|
*
|
|
* Retrieve variables from a specific conversation.
|
|
*/
|
|
export const getConversationVariablesContract = base.route({
|
|
method: 'GET',
|
|
path: '/conversations/{conversation_id}/variables',
|
|
operationId: 'getConversationVariables',
|
|
summary: 'Get Conversation Variables',
|
|
description: 'Retrieve variables from a specific conversation.',
|
|
tags: ['Conversations'],
|
|
}).input(zGetConversationVariablesData).output(z.object({ body: zGetConversationVariablesResponse, status: z.literal(200) }))
|