import axios from 'axios';
import { GlobalParams } from '@/api/interface';

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

// 新增全局变量
export function addGlobal(data: GlobalParams) {
  return axios.post(`${urlPrefix}/global/add`, data);
}

// 获取全局变量列表
export function getGlobalList(sceneId: string) {
  return axios.get(`${urlPrefix}/global/${sceneId}/map`);
}

// 删除全局变量
export function deleteGlobal(id: string) {
  return axios.delete(`${urlPrefix}/global/${id}`);
}