"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.updateSubObjectAction = exports.updateNodeLabel = exports.updateNode = exports.startUseSubObjectAction = exports.startUseObjectAction = exports.saveStageView = exports.rulelibListAction = exports.removeSubObjectAction = exports.queryTriggerRuleAction = exports.queryRuleSubObj = exports.queryObjectTypesAction = exports.queryObjectTagsAction = exports.initStageView = exports.fetchRuleElementsAction = exports.fetchNodeConfigAction = exports.delViewNode = exports.addViewNode = exports.addViewLink = exports.addSubObjectAction = void 0;

var _urlFormat = _interopRequireDefault(require("amos-processor/lib/utils/urlFormat")), _urlConsts = _interopRequireDefault(require("../consts/urlConsts")), _request = require("../utils/request"), rulelibListAction = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.rulelibListUrl, e);
};

exports.rulelibListAction = rulelibListAction;

var initStageView = function(e) {
  var t = "".concat(_urlConsts.default.initStageViewUrl, "/").concat(e);
  return (0, _request.commonGet)(t);
};

exports.initStageView = initStageView;

var saveStageView = function(e) {
  return (0, _request.commonPost)(_urlConsts.default.saveStageViewUrl, e);
};

exports.saveStageView = saveStageView;

var queryRuleSubObj = function(e) {
  var t = (0, _urlFormat.default)(_urlConsts.default.queryRuleSubObjUrl, {
    subObjId: e
  });
  return (0, _request.commonGet)(t);
};

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) {
  var t = "".concat(_urlConsts.default.delViewNodeUrl, "/").concat(e);
  return (0, _request.commonDelete)(t);
};

exports.delViewNode = delViewNode;

var queryObjectTagsAction = function(e) {
  var t = (0, _urlFormat.default)(_urlConsts.default.queryObjectTagsUrl, {
    objId: e
  });
  return (0, _request.commonGet)(t);
};

exports.queryObjectTagsAction = queryObjectTagsAction;

var queryObjectTypesAction = function(e) {
  var t = (0, _urlFormat.default)(_urlConsts.default.queryObjectTypesUrl, {
    objId: e
  });
  return (0, _request.commonGet)(t);
};

exports.queryObjectTypesAction = queryObjectTypesAction;

var removeSubObjectAction = function(e) {
  var t = "".concat(_urlConsts.default.removeObjUrl, "/").concat(e);
  return (0, _request.commonDelete)(t);
};

exports.removeSubObjectAction = removeSubObjectAction;

var startUseSubObjectAction = function(e) {
  var t = "".concat(_urlConsts.default.changeRule, "/").concat(e);
  return (0, _request.commonPut)(t);
};

exports.startUseSubObjectAction = startUseSubObjectAction;

var startUseObjectAction = function(e) {
  var t = "".concat(_urlConsts.default.changeAllRule, "/").concat(e);
  return (0, _request.commonPut)(t);
};

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) {
  var t = (0, _urlFormat.default)(_urlConsts.default.queryTriggerUrl, {
    elementId: e
  });
  return (0, _request.commonGet)(t);
};

exports.queryTriggerRuleAction = queryTriggerRuleAction;

var updateNode = function(e) {
  return (0, _request.commonPut)(_urlConsts.default.updateNodeUrl, e);
};

exports.updateNode = updateNode;

var fetchNodeConfigAction = function(e) {
  var t = "".concat(_urlConsts.default.fetchNodeConfig, "/").concat(e);
  return (0, _request.commonGet)(t);
};

exports.fetchNodeConfigAction = fetchNodeConfigAction;

var fetchRuleElementsAction = function() {
  return (0, _request.commonGet)(_urlConsts.default.getRuleElements);
};

exports.fetchRuleElementsAction = fetchRuleElementsAction;