import axios from 'axios';

// 公共路径
const urlPrefix = '/api/v1/bpms-workbench';

// 部署列表
export function getDeployList(params) {
  return axios.get(`${urlPrefix}/componentDeploy/list`, { params });
}

// 组件上架
export function componentOnSale(params) {
  return axios.get(`${urlPrefix}/componentDeploy/start`, { params });
}

// 组件下架
export function componentOffSale(params) {
  return axios.get(`${urlPrefix}/componentDeploy/stop`, { params });
}

// 网络模式获取
export function getNetworkMode(type: string, deployEnvId: string) {
  return axios.get(`${urlPrefix}/componentDeployEnv/network/${type}?deployEnvId=${deployEnvId}`);
}