"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.fetchRuleElementsAction = exports.fetchNodeConfigAction = exports.updateNode = exports.queryTriggerRuleAction = exports.updateSubObjectAction = exports.addSubObjectAction = exports.startUseObjectAction = exports.startUseSubObjectAction = exports.removeSubObjectAction = exports.queryObjectTypesAction = exports.queryObjectTagsAction = exports.delViewNode = exports.updateNodeLabel = exports.addViewLink = exports.addViewNode = exports.queryRuleSubObj = exports.saveStageView = exports.initStageView = exports.rulelibListAction = void 0;
var _urlFormat = _interopRequireDefault(require("amos-processor/lib/utils/urlFormat")),
  _urlConsts = _interopRequireDefault(require("../consts/urlConsts")),
  _request = require("../utils/request");

function _interopRequireDefault(e) {
  return e && e.__esModule ? e : {
    default: e
  }
}
var rulelibListAction = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.rulelibListUrl, e)
};
exports.rulelibListAction = rulelibListAction;
var initStageView = function(e) {
  e = "".concat(_urlConsts.default.initStageViewUrl, "/").concat(e);
  return (0, _request.commonGet)(e)
};
exports.initStageView = initStageView;
var saveStageView = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.saveStageViewUrl, e)
};
exports.saveStageView = saveStageView;
var queryRuleSubObj = function(e) {
  e = (0, _urlFormat.default)(_urlConsts.default.queryRuleSubObjUrl, {
    subObjId: e
  });
  return (0, _request.commonGet)(e)
};
exports.queryRuleSubObj = queryRuleSubObj;
var addViewNode = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.addViewNodeUrl, e)
};
exports.addViewNode = addViewNode;
var addViewLink = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.addViewLinkUrl, e)
};
exports.addViewLink = addViewLink;
var updateNodeLabel = function(e) {
  return (0, _request.commonPut)(_urlConsts.default.updateNodeLabelUrl, e)
};
exports.updateNodeLabel = updateNodeLabel;
var delViewNode = function(e) {
  e = "".concat(_urlConsts.default.delViewNodeUrl, "/").concat(e);
  return (0, _request.commonDelete)(e)
};
exports.delViewNode = delViewNode;
var queryObjectTagsAction = function(e) {
  e = (0, _urlFormat.default)(_urlConsts.default.queryObjectTagsUrl, {
    objId: e
  });
  return (0, _request.commonGet)(e)
};
exports.queryObjectTagsAction = queryObjectTagsAction;
var queryObjectTypesAction = function(e) {
  e = (0, _urlFormat.default)(_urlConsts.default.queryObjectTypesUrl, {
    objId: e
  });
  return (0, _request.commonGet)(e)
};
exports.queryObjectTypesAction = queryObjectTypesAction;
var removeSubObjectAction = function(e) {
  e = "".concat(_urlConsts.default.removeObjUrl, "/").concat(e);
  return (0, _request.commonDelete)(e)
};
exports.removeSubObjectAction = removeSubObjectAction;
var startUseSubObjectAction = function(e) {
  e = "".concat(_urlConsts.default.changeRule, "/").concat(e);
  return (0, _request.commonPut)(e)
};
exports.startUseSubObjectAction = startUseSubObjectAction;
var startUseObjectAction = function(e) {
  e = "".concat(_urlConsts.default.changeAllRule, "/").concat(e);
  return (0, _request.commonPut)(e)
};
exports.startUseObjectAction = startUseObjectAction;
var addSubObjectAction = function(e) {
  var t = (0, _urlFormat.default)(_urlConsts.default.addSingleRule);
  return (0, _request.commonPost)(t, e)
};
exports.addSubObjectAction = addSubObjectAction;
var updateSubObjectAction = function(e) {
  var t = (0, _urlFormat.default)(_urlConsts.default.editSingleRule);
  return (0, _request.commonPut)(t, e)
};
exports.updateSubObjectAction = updateSubObjectAction;
var queryTriggerRuleAction = function(e) {
  e = (0, _urlFormat.default)(_urlConsts.default.queryTriggerUrl, {
    elementId: e
  });
  return (0, _request.commonGet)(e)
};
exports.queryTriggerRuleAction = queryTriggerRuleAction;
var updateNode = function(e) {
  return (0, _request.commonPut)(_urlConsts.default.updateNodeUrl, e)
};
exports.updateNode = updateNode;
var fetchNodeConfigAction = function(e) {
  e = "".concat(_urlConsts.default.fetchNodeConfig, "/").concat(e);
  return (0, _request.commonGet)(e)
};
exports.fetchNodeConfigAction = fetchNodeConfigAction;
var fetchRuleElementsAction = function() {
  return (0, _request.commonGet)(_urlConsts.default.getRuleElements)
};
exports.fetchRuleElementsAction = fetchRuleElementsAction;
