import request from "@/utils/request";

//获取参数列表
const paramsList=(data)=>{
    return request({
        url: `/tool_chains/params`,
        method: "get",
        params:data
      });
}
//新增第三方工具链信息
const addTool=(data)=>{
    return request({
        url: `/tool_chains`,
        method: "post",
        data:data
      });
}
//获取第三方工具链的详细参数
const paramsInfo=(id)=>{
    return request({
        url: `/tool_chains/params/${id}`,
        method: "get"
      });
}
//获取第三方工具链的工作状态列表
const toolStatusList=(data)=>{
    return request({
        url: `/tool_chains/status`,
        method: "get",
        params:data
      });
}
//获取未注册第三方工具链列表
const unregistedList=()=>{
    return request({
        url: `/tool_chains/unregisted`,
        method: "get"
      });
}
//删除工具链
const deleteTool=(id)=>{
    return request({
        url: `/tool_chains/${id}`,
        method: "delete"
      });
}
//获取第三方工具链的工作状态列表
const toolChains=(id)=>{
    return request({
        url: `/tool_chains/${id}`,
        method: "get"
      });
}
//修改工具链信息
const editTool=(id,data)=>{
    return request({
        url: `/tool_chains/${id}`,
        method: "put",
        data:data
      });
}

export default {
    paramsList,
    addTool,
    paramsInfo,
    toolStatusList,
    unregistedList,
    deleteTool,
    toolChains,
    editTool
}