feat(api): 新增组件发布与管理api

master
钟良源 3 months ago
parent 130c15332b
commit fb01b0b0f2

@ -8,18 +8,27 @@ export function getMyComponentList(params) {
return axios.get(`${urlPrefix}/componentBase/list`, { params });
}
// 获取标签列表
export function getTagList() {
return axios.get(`${urlPrefix}/componentBase/tags`);
}
// 校验项目标识
export function compProjectValidate(projectId) {
return axios.post(`${urlPrefix}/componentBase/validate?projectId=${projectId}`);
}
// 组件信息提交/更新
export function compSubmit(params) {
return axios.post(`${urlPrefix}/componentBase/submit`, params);
}
// 组件删除
export const remove = (ids) => {
return axios.post(`${urlPrefix}/componentBase/remove?ids=${ids}`);
};
// 组件导出
export const exportComponent = (id) => {
return axios.get(`${urlPrefix}/componentBase/export?id=${id}`);
};

@ -0,0 +1,21 @@
import axios from 'axios';
import { AxiosPromise } from 'axios';
// 公共路径
const urlPrefix = '/api/v1/bpms-workbench';
export interface ComponentReleaseParams {
identifier: string;
version: string;
[key: string]: any;
}
// 组件发布/公开
export function componentRelease(params: ComponentReleaseParams): AxiosPromise<any> {
return axios.post(`${urlPrefix}/componentRelease/publish`, params);
}
// 组件撤销
export function componentRevoke(params: ComponentReleaseParams): AxiosPromise<any> {
return axios.post(`${urlPrefix}/componentRelease/revoke`, params);
}
Loading…
Cancel
Save