import axios from 'axios';
import { apiResData } from '@/api/interface/index';

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

// 我的组件
export function getMyComponents() {
  return axios.get<apiResData>(`${urlPrefix}/components/mineList`);
}

// 公开组件
export function getPubComponents() {
  return axios.get<apiResData>(`${urlPrefix}/components/publicList`);
}

// 协同组件
export function getTeamComponents() {
  return axios.get<apiResData>(`${urlPrefix}/components/teamList`);
}

// 根据组件id查看实例列表
export function queryInstance(compId: string) {
  return axios.get(`${urlPrefix}/components/${compId}/instances`);
}
