Files
FastGPT/packages/global/common/tsRest/fastgpt/contracts/chat/setting/index.ts
伍闲犬 bd33873fcf feat: integrate ts-rest (#5741)
* feat: integrate ts-rest

* chore: classify core contract and pro contract

* chore: update lockfile

* chore: tweak dir structure

* chore: tweak dir structure
2025-10-13 16:35:56 +08:00

38 lines
824 B
TypeScript

import {
ChatSettingResponseSchema,
ChatSettingSchema
} from '../../../../../../core/chat/setting/type';
import { c } from '../../../../init';
import { favouriteContract } from './favourite';
export const settingContract = c.router({
favourite: favouriteContract,
detail: {
path: '/proApi/core/chat/setting/detail',
method: 'GET',
responses: {
200: ChatSettingResponseSchema
},
metadata: {
tags: ['chat']
},
description: '获取聊天设置',
summary: '获取聊天设置'
},
update: {
path: '/proApi/core/chat/setting/update',
method: 'PUT',
body: ChatSettingSchema.partial(),
responses: {
200: c.type<void>()
},
metadata: {
tags: ['chat']
},
description: '更新聊天设置',
summary: '更新聊天设置'
}
});