import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import { request } from "../../utils/index.js";
//#region src/components/workSpaceList/server.ts
const _excluded = ["id"];
/**
* workspace 主页（workspace 带 base，翻页列表）
* @param params
* @author 左胜杰
* @member 陈磊
*/
const getWorkspaces = function() {
	var _ref = _asyncToGenerator(function* (params) {
		return request.getRequest().get("/workspace/main", params);
	});
	return function getWorkspaces(_x) {
		return _ref.apply(this, arguments);
	};
}();
/**
* workspace 删除
* @param id
* @author 左胜杰
* @member 陈磊
*/
const deleteWorkspace = function() {
	var _ref2 = _asyncToGenerator(function* (id) {
		return request.getRequest().remove(`/workspace/${id}`);
	});
	return function deleteWorkspace(_x2) {
		return _ref2.apply(this, arguments);
	};
}();
/**
* workspace 添加
* @param params
* @author 左胜杰
* @member 陈磊
*/
const addWorkspace = function() {
	var _ref3 = _asyncToGenerator(function* (params) {
		return request.getRequest().post(`/workspace`, params);
	});
	return function addWorkspace(_x3) {
		return _ref3.apply(this, arguments);
	};
}();
/**
* workspace 修改
* @param params
* @author 左胜杰
* @member 陈磊
*/
const updateWorkspace = function() {
	var _ref4 = _asyncToGenerator(function* (params) {
		const { id } = params, others = _objectWithoutProperties(params, _excluded);
		return request.getRequest().put(`/workspace/${id}`, others);
	});
	return function updateWorkspace(_x4) {
		return _ref4.apply(this, arguments);
	};
}();
/**
* workspace 详情
* @param params
* @author 左胜杰
* @member 陈磊
*/
const getWorkspaceDetail = function() {
	var _ref5 = _asyncToGenerator(function* (id) {
		return request.getRequest().get(`/workspace/${id}`, {});
	});
	return function getWorkspaceDetail(_x5) {
		return _ref5.apply(this, arguments);
	};
}();
(function() {
	var _ref6 = _asyncToGenerator(function* (params) {
		return request.getRequest().get("/workspace/selector", params);
	});
	return function getWorkspaceList(_x6) {
		return _ref6.apply(this, arguments);
	};
})();
/**
* workspace 和 base 搜索
* @param params
* @author 左胜杰
* @member 陈磊
*/
const searchWorkspace = function() {
	var _ref7 = _asyncToGenerator(function* (params) {
		return request.getRequest().get("/workspace/search", params);
	});
	return function searchWorkspace(_x7) {
		return _ref7.apply(this, arguments);
	};
}();
/**
* 新增base
* @param params
* @author 左胜杰
* @member 马天宇
*/
const addBase = function() {
	var _ref8 = _asyncToGenerator(function* (params) {
		return request.getRequest().post("/workspace/base", params);
	});
	return function addBase(_x8) {
		return _ref8.apply(this, arguments);
	};
}();
(function() {
	var _ref9 = _asyncToGenerator(function* (id) {
		return request.getRequest().get(`/workspace/base/${id}`, {});
	});
	return function getBaseDetail(_x9) {
		return _ref9.apply(this, arguments);
	};
})();
/**
* 修改base
* @param params
* @author 左胜杰
* @member 马天宇
*/
const updateBaseDetail = function() {
	var _ref10 = _asyncToGenerator(function* (params) {
		return request.getRequest().put(`/workspace/base/${params.id}`, params);
	});
	return function updateBaseDetail(_x10) {
		return _ref10.apply(this, arguments);
	};
}();
/**
* 删除base
* @param id
* @author 左胜杰
* @member 马天宇
*/
const deleteBaseDetail = function() {
	var _ref11 = _asyncToGenerator(function* (id) {
		return request.getRequest().remove(`/workspace/base/${id}`);
	});
	return function deleteBaseDetail(_x11) {
		return _ref11.apply(this, arguments);
	};
}();
/**
* 获取base 列表
* @param params
* @author 左胜杰
* @member 马天宇
*/
const getBaseList = function() {
	var _ref12 = _asyncToGenerator(function* (params) {
		return request.getRequest().get("/workspace/base", params);
	});
	return function getBaseList(_x12) {
		return _ref12.apply(this, arguments);
	};
}();
//#endregion
export { addBase, addWorkspace, deleteBaseDetail, deleteWorkspace, getBaseList, getWorkspaceDetail, getWorkspaces, searchWorkspace, updateBaseDetail, updateWorkspace };
