"use strict";

exports.__esModule = true;
exports.ssrsDownloadFilterTaskNames = exports.getTaskLog = exports.getTaskList = exports.getTaskInfo = exports.deleteTask = exports.clearTaskLog = exports.GET_TASK_LOG_SUCCESS = exports.GET_TASK_LOG_REQUEST = exports.GET_TASK_LOG_FAILURE = exports.GET_TASK_LIST_SUCCESS = exports.GET_TASK_LIST_REQUEST = exports.GET_TASK_LIST_FAILURE = exports.GET_TASK_LIST = exports.GET_TASKINFO_SUCCESS = exports.GET_TASKINFO_REQUEST = exports.GET_TASKINFO_FAILURE = exports.DELETE_TASK_SUCCESS = exports.DELETE_TASK_REQUEST = exports.DELETE_TASK_FAILURE = exports.CLEAR_TASK_LOG = void 0;
var _makeApiAction = require("./makeApiAction");
var _makeOrcApiAction = _interopRequireDefault(require("./makeOrcApiAction"));
var _requestsApi = require("./requestsApi");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var GET_TASKINFO = "GET_TASKINFO";
var _makeActionTypes = (0, _makeApiAction.makeActionTypes)(GET_TASKINFO),
  _makeActionTypes2 = _slicedToArray(_makeActionTypes, 3),
  GET_TASKINFO_REQUEST = exports.GET_TASKINFO_REQUEST = _makeActionTypes2[0],
  GET_TASKINFO_SUCCESS = exports.GET_TASKINFO_SUCCESS = _makeActionTypes2[1],
  GET_TASKINFO_FAILURE = exports.GET_TASKINFO_FAILURE = _makeActionTypes2[2];
var getTaskInfo = exports.getTaskInfo = function getTaskInfo(taskId) {
  return (0, _makeOrcApiAction.default)(GET_TASKINFO, _requestsApi.getTaskInfoRequest.buildUrl(taskId));
};
var GET_TASK_LIST = exports.GET_TASK_LIST = "GET_TASK_LIST";
var ssrsDownloadFilterTaskNames = exports.ssrsDownloadFilterTaskNames = ["Orckestra.Overture.Providers.CommerceEngine.Profiles.ProfileSchemaExportTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Profiles.ProfileSchemaImportTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Orders.ExportOrderSchemaTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Orders.ImportOrderSchemaTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Products.ImportExport.ExportProductsTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Products.ImportExport.ProductSchemaExportTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Products.ImportExport.ImportProductsTask, Orckestra.Overture.Providers.CommerceEngine", "OrckestraCommerce.DataExchange.Product.Tasks.ProductExportTask, OrckestraCommerce.DataExchange", "Orckestra.Overture.Providers.CommerceEngine.Marketing.ExportCouponCodesTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Marketing.ImportCouponCodesTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Marketing.GenerateCouponTask, Orckestra.Overture.Providers.CommerceEngine", "Orckestra.Overture.Providers.CommerceEngine.Reporting.ReportExportTask, Orckestra.Overture.Providers.CommerceEngine"];
var _makeActionTypes3 = (0, _makeApiAction.makeActionTypes)(GET_TASK_LIST),
  _makeActionTypes4 = _slicedToArray(_makeActionTypes3, 3),
  GET_TASK_LIST_REQUEST = exports.GET_TASK_LIST_REQUEST = _makeActionTypes4[0],
  GET_TASK_LIST_SUCCESS = exports.GET_TASK_LIST_SUCCESS = _makeActionTypes4[1],
  GET_TASK_LIST_FAILURE = exports.GET_TASK_LIST_FAILURE = _makeActionTypes4[2];
var getTaskList = exports.getTaskList = function getTaskList(requester, filterTaskNames, lastModified, addToActiveRequests) {
  if (lastModified === void 0) {
    lastModified = null;
  }
  if (addToActiveRequests === void 0) {
    addToActiveRequests = true;
  }
  return (0, _makeOrcApiAction.default)(GET_TASK_LIST, _requestsApi.getRequesterTasksInfoRequest.buildUrl({
    filterTaskNames: filterTaskNames,
    requester: requester,
    lastModified: lastModified
  }), _requestsApi.getRequesterTasksInfoRequest.verb, {
    meta: {
      addToActiveRequests: addToActiveRequests
    }
  });
};
var DELETE_TASK = "DELETE_TASK";
var _makeActionTypes5 = (0, _makeApiAction.makeActionTypes)(DELETE_TASK),
  _makeActionTypes6 = _slicedToArray(_makeActionTypes5, 3),
  DELETE_TASK_REQUEST = exports.DELETE_TASK_REQUEST = _makeActionTypes6[0],
  DELETE_TASK_SUCCESS = exports.DELETE_TASK_SUCCESS = _makeActionTypes6[1],
  DELETE_TASK_FAILURE = exports.DELETE_TASK_FAILURE = _makeActionTypes6[2];
var deleteTask = exports.deleteTask = function deleteTask(taskId) {
  return (0, _makeOrcApiAction.default)(DELETE_TASK, _requestsApi.deleteTaskInfoRequest.buildUrl(taskId), _requestsApi.deleteTaskInfoRequest.verb, {
    meta: {
      taskId: taskId
    }
  });
};
var GET_TASK_LOG = "GET_TASK_LOG";
var _makeActionTypes7 = (0, _makeApiAction.makeActionTypes)(GET_TASK_LOG),
  _makeActionTypes8 = _slicedToArray(_makeActionTypes7, 3),
  GET_TASK_LOG_REQUEST = exports.GET_TASK_LOG_REQUEST = _makeActionTypes8[0],
  GET_TASK_LOG_SUCCESS = exports.GET_TASK_LOG_SUCCESS = _makeActionTypes8[1],
  GET_TASK_LOG_FAILURE = exports.GET_TASK_LOG_FAILURE = _makeActionTypes8[2];
var getTaskLog = exports.getTaskLog = function getTaskLog(taskId, addToActiveRequests) {
  if (addToActiveRequests === void 0) {
    addToActiveRequests = true;
  }
  return (0, _makeOrcApiAction.default)(GET_TASK_LOG, _requestsApi.getTaskExecutionLogsRequest.buildUrl(taskId), _requestsApi.getTaskExecutionLogsRequest.verb, {
    meta: {
      taskId: taskId,
      addToActiveRequests: addToActiveRequests
    }
  });
};
var CLEAR_TASK_LOG = exports.CLEAR_TASK_LOG = "CLEAR_TASK_LOG";
var clearTaskLog = exports.clearTaskLog = function clearTaskLog(taskId) {
  return {
    type: CLEAR_TASK_LOG,
    meta: {
      taskId: taskId
    }
  };
};
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(GET_TASKINFO, "GET_TASKINFO", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_REQUEST, "GET_TASKINFO_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_SUCCESS, "GET_TASKINFO_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_FAILURE, "GET_TASKINFO_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskInfo, "getTaskInfo", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST, "GET_TASK_LIST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(ssrsDownloadFilterTaskNames, "ssrsDownloadFilterTaskNames", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_REQUEST, "GET_TASK_LIST_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_SUCCESS, "GET_TASK_LIST_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_FAILURE, "GET_TASK_LIST_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskList, "getTaskList", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK, "DELETE_TASK", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_REQUEST, "DELETE_TASK_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_SUCCESS, "DELETE_TASK_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_FAILURE, "DELETE_TASK_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(deleteTask, "deleteTask", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG, "GET_TASK_LOG", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_REQUEST, "GET_TASK_LOG_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_SUCCESS, "GET_TASK_LOG_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_FAILURE, "GET_TASK_LOG_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskLog, "getTaskLog", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(CLEAR_TASK_LOG, "CLEAR_TASK_LOG", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(clearTaskLog, "clearTaskLog", "/home/vsts/work/1/s/src/actions/tasks.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(GET_TASKINFO, "GET_TASKINFO", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_REQUEST, "GET_TASKINFO_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_SUCCESS, "GET_TASKINFO_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASKINFO_FAILURE, "GET_TASKINFO_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskInfo, "getTaskInfo", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST, "GET_TASK_LIST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(ssrsDownloadFilterTaskNames, "ssrsDownloadFilterTaskNames", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_REQUEST, "GET_TASK_LIST_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_SUCCESS, "GET_TASK_LIST_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LIST_FAILURE, "GET_TASK_LIST_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskList, "getTaskList", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK, "DELETE_TASK", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_REQUEST, "DELETE_TASK_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_SUCCESS, "DELETE_TASK_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(DELETE_TASK_FAILURE, "DELETE_TASK_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(deleteTask, "deleteTask", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG, "GET_TASK_LOG", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_REQUEST, "GET_TASK_LOG_REQUEST", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_SUCCESS, "GET_TASK_LOG_SUCCESS", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(GET_TASK_LOG_FAILURE, "GET_TASK_LOG_FAILURE", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(getTaskLog, "getTaskLog", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(CLEAR_TASK_LOG, "CLEAR_TASK_LOG", "/home/vsts/work/1/s/src/actions/tasks.js");
  reactHotLoader.register(clearTaskLog, "clearTaskLog", "/home/vsts/work/1/s/src/actions/tasks.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();