import axios from 'axios';

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

// 获取组件设计
export function getComponentDesign(componentBaseId) {
  return axios.get(`${urlPrefix}/componentDevelopProcess/design?componentBaseId=${componentBaseId}`);
}

// 更新组件设计
export function updateComponentDesign(params) {
  return axios.post(`${urlPrefix}/componentDevelopProcess/design`, params);
}

// 获取组件基本信息
export function getComponentBaseInfo(componentBaseId) {
  return axios.get(`${urlPrefix}/componentDevelopProcess/baseInfo?componentBaseId=${componentBaseId}`);
}

// 代码初始化
export function codeInit(componentBaseId) {
  return axios.post(`${urlPrefix}/componentDevelopProcess/generate?componentBaseId=${componentBaseId}`);
}