forgeplus-react/src/softbot/api.js

226 lines
3.8 KiB
JavaScript

import fetch from './fetch';
// 获取个人注册Bot
export function getMyBot(params) {
return fetch({
url: `/getMyBot`,
method: 'get',
params
});
}
// 查看被转让的bot列表
export function getTransferToBot(params) {
return fetch({
url: '/getTransferToBot',
method: 'get',
params
});
}
// 用户注册bot
export function registerBot(data) {
return fetch({
url: '/registerBot',
method: 'post',
data: data
});
}
// 获取bot市场 分类列表
export function getAllBotCategory(params) {
return fetch({
url: `/getAllBotCategory`,
method: 'get',
params
});
}
// 获取bot市场 softbot列表
export function getContentsLikeNameAndFunc(params) {
return fetch({
url: `/getContentsLikeNameAndFunc`,
method: 'get',
params
});
}
// 获取bot详情
export function getBotDetail(params) {
return fetch({
url: `/getBotDetail`,
method: 'get',
params
});
}
// 用户安装bot
export function installMarketBot(data) {
return fetch({
url: '/installMarketBot',
method: 'post',
data: data
});
}
// 接受转让的bot
export function receiveTransferBot(data) {
return fetch({
url: '/receiveTransferBot',
method: 'post',
data: data
});
}
// 拒绝转让的bot
export function refuseTransferBot(data) {
return fetch({
url: '/refuseTransferBot',
method: 'post',
data: data
});
}
// 获取已经安装的Bot详情信息
export function getInstallBot(params) {
return fetch({
url: `/getInstallBot`,
method: 'get',
params
});
}
// 个人删除Bot
export function deleteBot(data) {
return fetch({
url: '/deleteBot',
method: 'post',
data: data
});
}
// 上架bot
export function marketBot(data) {
return fetch({
url: '/marketBot',
method: 'post',
data: data
});
}
// 转让bot
export function transferBot(data) {
return fetch({
url: '/transferBot',
method: 'post',
data: data
});
}
// 通过BotId查询MarketBot
export function getMarketBotById(params) {
return fetch({
url: `/getMarketBotById`,
method: 'get',
params
});
}
// 配置安装的Bot
export function updateInstallBot(data) {
return fetch({
url: '/updateInstallBot',
method: 'post',
data: data
});
}
// 仓库安装的所有bot
export function getStoreAllInstallBots(params) {
return fetch({
url: `/getStoreAllInstallBots`,
method: 'get',
params
});
}
// 用户安装所有
export function getAllInstallBots(params) {
return fetch({
url: `/getAllInstallBots`,
method: 'get',
params
});
}
// 判断用户是否安装此bot
export function judgeIsIntallBot(params) {
return fetch({
url: `/judgeIsIntallBot`,
method: 'get',
params
});
}
// 获取注册的bot详情
export function getRegisterBot(params) {
return fetch({
url: `/getRegisterBot`,
method: 'get',
params
});
}
// 修改注册的bot信息
export function registerUpdateBot(data) {
return fetch({
url: '/registerUpdateBot',
method: 'post',
data: data
});
}
// 更改bot上架信息
export function updateMarketBot(data) {
return fetch({
url: '/updateMarketBot',
method: 'post',
data: data
});
}
// 下架bot
export function downMarket(id, data) {
return fetch({
url: `/downMarket?id=${id}`,
method: 'post',
data: data
});
}
// 卸载已经安装的bot
export function deleteInstallBot(data) {
return fetch({
url: '/deleteInstallBot',
method: 'post',
data: data
});
}
// 取消转让
export function cancelTransferBot(data) {
return fetch({
url: '/cancelTransferBot',
method: 'post',
data: data
});
}
// 仓库删除时取消安装bot
export function unInstallMarketBot(data){
return fetch({
url: '/uninstallMarketBot',
method: 'post',
data: data
});
}