@bringg/dashboard-sdk 1.8.0 → 1.9.0-pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Core/CrudService.d.ts +7 -6
- package/dist/Core/CrudService.js +26 -17
- package/dist/Core/CrudService.js.map +1 -1
- package/dist/Core/RouteGenerator.d.ts +5 -0
- package/dist/Core/RouteGenerator.js +15 -1
- package/dist/Core/RouteGenerator.js.map +1 -1
- package/dist/Crew/Service/CrewService.js +30 -13
- package/dist/Crew/Service/CrewService.js.map +1 -1
- package/dist/CustomerConfiguration/Service/customer.configuration.service.js +11 -2
- package/dist/CustomerConfiguration/Service/customer.configuration.service.js.map +1 -1
- package/dist/Dashboard/Service/dashboard.service.js +18 -3
- package/dist/Dashboard/Service/dashboard.service.js.map +1 -1
- package/dist/Language/Service/LanguageService.js +5 -1
- package/dist/Language/Service/LanguageService.js.map +1 -1
- package/dist/LookUp/lookup-service.d.ts +5 -4
- package/dist/LookUp/lookup-service.js +8 -4
- package/dist/LookUp/lookup-service.js.map +1 -1
- package/dist/NotificationTemplate/Service/NotificationTemplateService.js +30 -6
- package/dist/NotificationTemplate/Service/NotificationTemplateService.js.map +1 -1
- package/dist/NotificationType/Service/NotificationTypeService.js +5 -1
- package/dist/NotificationType/Service/NotificationTypeService.js.map +1 -1
- package/dist/ReasonToChangeInventory/Service/ReasonToChangeInventory.service.js +5 -2
- package/dist/ReasonToChangeInventory/Service/ReasonToChangeInventory.service.js.map +1 -1
- package/dist/ResourceUpload/ResourceUploadApi.js +13 -2
- package/dist/ResourceUpload/ResourceUploadApi.js.map +1 -1
- package/dist/RouteOptimization/RouteOptimizationApi.js +37 -6
- package/dist/RouteOptimization/RouteOptimizationApi.js.map +1 -1
- package/dist/Rule/Entity/RuleEntity.d.ts +4 -3
- package/dist/Rule/Entity/RuleEntity.js +14 -5
- package/dist/Rule/Entity/RuleEntity.js.map +1 -1
- package/dist/Rule/RuleApi.d.ts +4 -3
- package/dist/Rule/RuleApi.js +3 -3
- package/dist/Rule/RuleApi.js.map +1 -1
- package/dist/Run/Service/runs.service.d.ts +15 -14
- package/dist/Run/Service/runs.service.js +174 -78
- package/dist/Run/Service/runs.service.js.map +1 -1
- package/dist/Run/v2/runs-api.d.ts +2 -1
- package/dist/Run/v2/runs-api.js +4 -3
- package/dist/Run/v2/runs-api.js.map +1 -1
- package/dist/Services/ServiceRequest.d.ts +9 -7
- package/dist/Services/ServiceRequest.js +15 -12
- package/dist/Services/ServiceRequest.js.map +1 -1
- package/dist/Services/SessionBasedService.d.ts +12 -1
- package/dist/Services/SessionBasedService.js +5 -8
- package/dist/Services/SessionBasedService.js.map +1 -1
- package/dist/TaskInventory/Service/TaskInventory.service.js +25 -7
- package/dist/TaskInventory/Service/TaskInventory.service.js.map +1 -1
- package/dist/User/Service/UsersService.js +139 -34
- package/dist/User/Service/UsersService.js.map +1 -1
- package/dist/Workflow/Entity/WorkflowEntity.d.ts +3 -2
- package/dist/Workflow/Entity/WorkflowEntity.js +4 -2
- package/dist/Workflow/Entity/WorkflowEntity.js.map +1 -1
- package/dist/Workflow/v2/workflows-api.d.ts +7 -6
- package/dist/Workflow/v2/workflows-api.js +3 -2
- package/dist/Workflow/v2/workflows-api.js.map +1 -1
- package/dist/Workflow/v2/workflows-service.d.ts +8 -7
- package/dist/Workflow/v2/workflows-service.js +19 -12
- package/dist/Workflow/v2/workflows-service.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +2047 -1358
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +59 -34
- package/dist/bringg-dashboard-sdk.min.js +4 -4
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/dist/data-entity.d.ts +2 -1
- package/dist/data-entity.js.map +1 -1
- package/package.json +2 -2
|
@@ -499,7 +499,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
499
499
|
/***/ (function(module, exports, __webpack_require__) {
|
|
500
500
|
|
|
501
501
|
"use strict";
|
|
502
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BaseService_1 = __webpack_require__(/*! ./BaseService */ \"./dist/Core/BaseService.js\");\nvar CrudService = /** @class */ (function (_super) {\n __extends(CrudService, _super);\n function CrudService(session, entityName, routePrefix, routeSuffix) {\n var _this = _super.call(this, session, entityName) || this;\n _this.get = function (id, queryString) { return __awaiter(_this, void 0, void 0, function () {\n
|
|
502
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BaseService_1 = __webpack_require__(/*! ./BaseService */ \"./dist/Core/BaseService.js\");\nvar CrudService = /** @class */ (function (_super) {\n __extends(CrudService, _super);\n function CrudService(session, entityName, routePrefix, routeSuffix) {\n var _this = _super.call(this, session, entityName) || this;\n _this.get = function (id, queryString, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .get(this.Routes.GET)\n .withRouteParams({ id: id })\n .withQueryString(queryString)\n .setException(\"Failed to get \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n _this.getAll = function (queryString, commonOptions) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .get(this.Routes.GET_ALL)\n .withQueryString(queryString)\n .setException(\"Failed to get all \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n }); };\n _this.create = function (payload, commonOptions) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .post(this.Routes.CREATE)\n .withPayload(payload)\n .setException(\"Failed to create \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n }); };\n _this.update = function (id, payload, commonOptions) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .put(this.Routes.UPDATE)\n .withRouteParams({ id: id })\n .withPayload(payload)\n .setException(\"Failed to update \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n }); };\n _this.delete = function (id, queryString, commonOptions) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .delete(this.Routes.DELETE)\n .withRouteParams({ id: id })\n .withQueryString(queryString)\n .setException(\"Failed to delete \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n }); };\n _this.patch = function (id, payload, commonOptions) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.routeGenerator\n .patch(id ? this.Routes.PATCH_WITH_ID : this.Routes.PATCH)\n .withRouteParams({ id: id })\n .withPayload(payload)\n .setException(\"Failed to patch \".concat(this.entityName))\n .withCommonOptions(commonOptions)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n }); };\n var basePath = routePrefix ? \"/\".concat(routePrefix, \"/\").concat(entityName) : \"/\".concat(entityName);\n if (routeSuffix) {\n basePath = \"\".concat(basePath, \"/\").concat(routeSuffix);\n }\n _this.Routes = {\n GET: \"\".concat(basePath, \"/{:id}\"),\n GET_ALL: basePath,\n CREATE: basePath,\n UPDATE: \"\".concat(basePath, \"/{:id}\"),\n DELETE: \"\".concat(basePath, \"/{:id}\"),\n PATCH: basePath,\n PATCH_WITH_ID: \"\".concat(basePath, \"/{:id}\")\n };\n return _this;\n }\n return CrudService;\n}(BaseService_1.default));\nexports.default = CrudService;\n//# sourceMappingURL=CrudService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Core/CrudService.js?");
|
|
503
503
|
|
|
504
504
|
/***/ }),
|
|
505
505
|
|
|
@@ -603,7 +603,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# so
|
|
|
603
603
|
/***/ (function(module, exports, __webpack_require__) {
|
|
604
604
|
|
|
605
605
|
"use strict";
|
|
606
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Request = exports.defaultExtractor = void 0;\nvar BringgException_1 = __webpack_require__(/*! ./BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar defaultExtractor = function (response) { return response; };\nexports.defaultExtractor = defaultExtractor;\nvar Request = /** @class */ (function () {\n function Request(service, route) {\n this.service = service;\n this.route = route;\n this.extractor = exports.defaultExtractor;\n }\n Request.prototype.withRouteParams = function (routeParams) {\n this.routeParams = routeParams;\n return this;\n };\n Request.prototype.withQueryString = function (queryString) {\n this.queryString = queryString;\n return this;\n };\n Request.prototype.withExtractor = function (extractor) {\n this.extractor = extractor;\n return this;\n };\n Request.prototype.withPayload = function (payload) {\n this.payload = payload;\n return this;\n };\n Request.prototype.withHeaders = function (headers) {\n this.headers = headers;\n return this;\n };\n Request.prototype.withResponseType = function (responseType) {\n this.responseType = responseType;\n return this;\n };\n Request.prototype.setException = function (exception) {\n // Generating the exception here as we want to get stack trace with the relevant data\n // if generating the error inside the exception function all calls before setException won't exist\n // because of V8 zero-cost async stack trace\n var generatedException = BringgException_1.BringgException.serviceException(exception)();\n if (Error.captureStackTrace) {\n // keep only the frames that happened before calling setException\n Error.captureStackTrace(generatedException, this.setException);\n }\n else {\n // If no start stack function was provided we just use the original stack property\n try {\n // noinspection ExceptionCaughtLocallyJS\n throw new Error();\n }\n catch (e) {\n generatedException.stack = e.stack;\n }\n }\n this.exception = function () { return generatedException; };\n return this;\n };\n Request.prototype.invoke = function () {\n return this.service.handleAuthorizedRequest(this.route
|
|
606
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Request = exports.defaultExtractor = void 0;\nvar BringgException_1 = __webpack_require__(/*! ./BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar defaultExtractor = function (response) { return response; };\nexports.defaultExtractor = defaultExtractor;\nvar Request = /** @class */ (function () {\n function Request(service, route) {\n this.service = service;\n this.route = route;\n this.extractor = exports.defaultExtractor;\n }\n Request.prototype.withRouteParams = function (routeParams) {\n this.routeParams = routeParams;\n return this;\n };\n Request.prototype.withQueryString = function (queryString) {\n this.queryString = queryString;\n return this;\n };\n Request.prototype.withExtractor = function (extractor) {\n this.extractor = extractor;\n return this;\n };\n Request.prototype.withPayload = function (payload) {\n this.payload = payload;\n return this;\n };\n Request.prototype.withHeaders = function (headers) {\n this.headers = headers;\n return this;\n };\n Request.prototype.withResponseType = function (responseType) {\n this.responseType = responseType;\n return this;\n };\n Request.prototype.withCommonOptions = function (commonOptions) {\n this.signal = commonOptions === null || commonOptions === void 0 ? void 0 : commonOptions.signal;\n return this;\n };\n Request.prototype.setException = function (exception) {\n // Generating the exception here as we want to get stack trace with the relevant data\n // if generating the error inside the exception function all calls before setException won't exist\n // because of V8 zero-cost async stack trace\n var generatedException = BringgException_1.BringgException.serviceException(exception)();\n if (Error.captureStackTrace) {\n // keep only the frames that happened before calling setException\n Error.captureStackTrace(generatedException, this.setException);\n }\n else {\n // If no start stack function was provided we just use the original stack property\n try {\n // noinspection ExceptionCaughtLocallyJS\n throw new Error();\n }\n catch (e) {\n generatedException.stack = e.stack;\n }\n }\n this.exception = function () { return generatedException; };\n return this;\n };\n Request.prototype.invoke = function () {\n return this.service.handleAuthorizedRequest({\n route: this.route,\n extractor: this.extractor,\n exceptionProducer: this.exception,\n payload: this.payload,\n routeParams: this.routeParams,\n queryString: this.queryString,\n headers: this.headers,\n responseType: this.responseType,\n signal: this.signal\n });\n };\n return Request;\n}());\nexports.Request = Request;\nvar RouteGenerator = /** @class */ (function () {\n function RouteGenerator(service) {\n this.service = service;\n }\n RouteGenerator.prototype.get = function (routeName) {\n var route = new Route_1.Route(routeName, 0 /* HttpMethod.GET */);\n return new Request(this.service, route);\n };\n RouteGenerator.prototype.post = function (routeName) {\n var route = new Route_1.Route(routeName, 1 /* HttpMethod.POST */);\n return new Request(this.service, route);\n };\n RouteGenerator.prototype.put = function (routeName) {\n var route = new Route_1.Route(routeName, 2 /* HttpMethod.PUT */);\n return new Request(this.service, route);\n };\n RouteGenerator.prototype.patch = function (routeName) {\n var route = new Route_1.Route(routeName, 3 /* HttpMethod.PATCH */);\n return new Request(this.service, route);\n };\n RouteGenerator.prototype.delete = function (routeName) {\n var route = new Route_1.Route(routeName, 4 /* HttpMethod.DELETE */);\n return new Request(this.service, route);\n };\n return RouteGenerator;\n}());\nexports.default = RouteGenerator;\n//# sourceMappingURL=RouteGenerator.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Core/RouteGenerator.js?");
|
|
607
607
|
|
|
608
608
|
/***/ }),
|
|
609
609
|
|
|
@@ -668,7 +668,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
668
668
|
/***/ (function(module, exports, __webpack_require__) {
|
|
669
669
|
|
|
670
670
|
"use strict";
|
|
671
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteResponseExtractor = exports.crewExtractor = exports.defaultExtractor = exports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_CREW: new Route_1.Route('/crews/{:id}', 0 /* HttpMethod.GET */),\n GET_BY_TEAM: new Route_1.Route('/teams/{:teamId}/crews', 0 /* HttpMethod.GET */),\n CREATE_CREW: new Route_1.Route('/crews/', 1 /* HttpMethod.POST */),\n UPDATE_CREW: new Route_1.Route('/crews/{:id}', 2 /* HttpMethod.PUT */),\n DELETE_CREW: new Route_1.Route('/crews/{:id}', 4 /* HttpMethod.DELETE */)\n};\nvar defaultExtractor = function (response) { return response.crews; };\nexports.defaultExtractor = defaultExtractor;\nvar crewExtractor = function (response) { return response.crew; };\nexports.crewExtractor = crewExtractor;\nvar deleteResponseExtractor = function (response) { return response.success; };\nexports.deleteResponseExtractor = deleteResponseExtractor;\nvar CrewService = /** @class */ (function (_super) {\n __extends(CrewService, _super);\n function CrewService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n CrewService.prototype.getAllByTeam = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_BY_TEAM, exports.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to get Crews'), undefined, { teamId: teamId })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.get = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_CREW, exports.crewExtractor, BringgException_1.BringgException.serviceException('Failed to get Crew'), undefined, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.create = function (crew) {\n return __awaiter(this, void 0, void 0, function () {\n var primary_driver_id, driver_ids, planned_route_id, team_id, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n primary_driver_id = crew.primary_driver_id, driver_ids = crew.driver_ids, planned_route_id = crew.planned_route_id, team_id = crew.team_id;\n return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.CREATE_CREW, exports.crewExtractor, BringgException_1.BringgException.serviceException('Failed to create Crew'), {\n primary_driver_id: primary_driver_id,\n driver_ids: driver_ids,\n planned_route_id: planned_route_id,\n team_id: team_id\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.update = function (id, crew) {\n return __awaiter(this, void 0, void 0, function () {\n var primary_driver_id, driver_ids, planned_route_id, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n primary_driver_id = crew.primary_driver_id, driver_ids = crew.driver_ids, planned_route_id = crew.planned_route_id;\n return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.UPDATE_CREW, exports.crewExtractor, BringgException_1.BringgException.serviceException('Failed to update Crew'), {\n primary_driver_id: primary_driver_id,\n driver_ids: driver_ids,\n planned_route_id: planned_route_id\n }, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.DELETE_CREW, exports.deleteResponseExtractor, BringgException_1.BringgException.serviceException('Failed to delete Crew'), undefined, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n return CrewService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = CrewService;\n//# sourceMappingURL=CrewService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Crew/Service/CrewService.js?");
|
|
671
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteResponseExtractor = exports.crewExtractor = exports.defaultExtractor = exports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_CREW: new Route_1.Route('/crews/{:id}', 0 /* HttpMethod.GET */),\n GET_BY_TEAM: new Route_1.Route('/teams/{:teamId}/crews', 0 /* HttpMethod.GET */),\n CREATE_CREW: new Route_1.Route('/crews/', 1 /* HttpMethod.POST */),\n UPDATE_CREW: new Route_1.Route('/crews/{:id}', 2 /* HttpMethod.PUT */),\n DELETE_CREW: new Route_1.Route('/crews/{:id}', 4 /* HttpMethod.DELETE */)\n};\nvar defaultExtractor = function (response) { return response.crews; };\nexports.defaultExtractor = defaultExtractor;\nvar crewExtractor = function (response) { return response.crew; };\nexports.crewExtractor = crewExtractor;\nvar deleteResponseExtractor = function (response) { return response.success; };\nexports.deleteResponseExtractor = deleteResponseExtractor;\nvar CrewService = /** @class */ (function (_super) {\n __extends(CrewService, _super);\n function CrewService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n CrewService.prototype.getAllByTeam = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_BY_TEAM,\n extractor: exports.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get Crews'),\n routeParams: { teamId: teamId }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.get = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_CREW,\n extractor: exports.crewExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get Crew'),\n routeParams: { id: id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.create = function (crew) {\n return __awaiter(this, void 0, void 0, function () {\n var primary_driver_id, driver_ids, planned_route_id, team_id, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n primary_driver_id = crew.primary_driver_id, driver_ids = crew.driver_ids, planned_route_id = crew.planned_route_id, team_id = crew.team_id;\n return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.CREATE_CREW,\n extractor: exports.crewExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to create Crew'),\n payload: { primary_driver_id: primary_driver_id, driver_ids: driver_ids, planned_route_id: planned_route_id, team_id: team_id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.update = function (id, crew) {\n return __awaiter(this, void 0, void 0, function () {\n var primary_driver_id, driver_ids, planned_route_id, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n primary_driver_id = crew.primary_driver_id, driver_ids = crew.driver_ids, planned_route_id = crew.planned_route_id;\n return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.UPDATE_CREW,\n extractor: exports.crewExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update Crew'),\n payload: { primary_driver_id: primary_driver_id, driver_ids: driver_ids, planned_route_id: planned_route_id },\n routeParams: { id: id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n CrewService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.DELETE_CREW,\n extractor: exports.deleteResponseExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to delete Crew'),\n routeParams: { id: id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n return CrewService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = CrewService;\n//# sourceMappingURL=CrewService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Crew/Service/CrewService.js?");
|
|
672
672
|
|
|
673
673
|
/***/ }),
|
|
674
674
|
|
|
@@ -824,7 +824,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
|
|
|
824
824
|
/***/ (function(module, exports, __webpack_require__) {
|
|
825
825
|
|
|
826
826
|
"use strict";
|
|
827
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultExtractor = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET: new Route_1.Route('/merchant/customer_configuration', 0 /* HttpMethod.GET */),\n UPDATE: new Route_1.Route('/merchant/customer_configuration', 2 /* HttpMethod.PUT */)\n};\nvar defaultExtractor = function (config) { return config; };\nexports.defaultExtractor = defaultExtractor;\nvar CustomerConfigurationService = /** @class */ (function (_super) {\n __extends(CustomerConfigurationService, _super);\n function CustomerConfigurationService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n CustomerConfigurationService.prototype.get = function () {\n return this.handleAuthorizedRequest(exports.Routes.GET
|
|
827
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultExtractor = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET: new Route_1.Route('/merchant/customer_configuration', 0 /* HttpMethod.GET */),\n UPDATE: new Route_1.Route('/merchant/customer_configuration', 2 /* HttpMethod.PUT */)\n};\nvar defaultExtractor = function (config) { return config; };\nexports.defaultExtractor = defaultExtractor;\nvar CustomerConfigurationService = /** @class */ (function (_super) {\n __extends(CustomerConfigurationService, _super);\n function CustomerConfigurationService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n CustomerConfigurationService.prototype.get = function () {\n return this.handleAuthorizedRequest({\n route: exports.Routes.GET,\n extractor: exports.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get customer configurations')\n });\n };\n CustomerConfigurationService.prototype.update = function (configuration) {\n return this.handleAuthorizedRequest({\n route: exports.Routes.UPDATE,\n extractor: exports.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update customer configurations'),\n payload: configuration\n });\n };\n return CustomerConfigurationService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = CustomerConfigurationService;\n//# sourceMappingURL=customer.configuration.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/CustomerConfiguration/Service/customer.configuration.service.js?");
|
|
828
828
|
|
|
829
829
|
/***/ }),
|
|
830
830
|
|
|
@@ -850,7 +850,7 @@ eval("\nvar __decorate = (this && this.__decorate) || function (decorators, targ
|
|
|
850
850
|
/***/ (function(module, exports, __webpack_require__) {
|
|
851
851
|
|
|
852
852
|
"use strict";
|
|
853
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WidgetGetResponseExtractor = exports.DashboardGetResponseExtractor = exports.Routes = void 0;\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar dashboard_consts_1 = __webpack_require__(/*! ../dashboard.consts */ \"./dist/Dashboard/dashboard.consts.js\");\nexports.Routes = {\n /* legacy routes - require all the widgets to be loaded to return response */\n GET_DASHBOARDS_FOR_ALL_TEAMS: new Route_1.Route('/dashboard', 0 /* HttpMethod.GET */),\n GET_DASHBOARDS_FOR_TEAM: new Route_1.Route('/dashboard/team/{:teamId}', 0 /* HttpMethod.GET */),\n /* new routes - get widgets structure and load each widget on it's own */\n GET_ALL_WIDGETS_STRUCTURE: new Route_1.Route('/dashboard/widgets', 0 /* HttpMethod.GET */),\n GET_WIDGET_DATA: new Route_1.Route('/dashboard/widgets/{:widgetId}', 0 /* HttpMethod.GET */)\n};\nvar DashboardService = /** @class */ (function (_super) {\n __extends(DashboardService, _super);\n function DashboardService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n DashboardService.prototype.getDashboard = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n var widgets;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest((0, lodash_1.isNumber)(teamId) ? exports.Routes.GET_DASHBOARDS_FOR_TEAM : exports.Routes.GET_DASHBOARDS_FOR_ALL_TEAMS
|
|
853
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WidgetGetResponseExtractor = exports.DashboardGetResponseExtractor = exports.Routes = void 0;\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar dashboard_consts_1 = __webpack_require__(/*! ../dashboard.consts */ \"./dist/Dashboard/dashboard.consts.js\");\nexports.Routes = {\n /* legacy routes - require all the widgets to be loaded to return response */\n GET_DASHBOARDS_FOR_ALL_TEAMS: new Route_1.Route('/dashboard', 0 /* HttpMethod.GET */),\n GET_DASHBOARDS_FOR_TEAM: new Route_1.Route('/dashboard/team/{:teamId}', 0 /* HttpMethod.GET */),\n /* new routes - get widgets structure and load each widget on it's own */\n GET_ALL_WIDGETS_STRUCTURE: new Route_1.Route('/dashboard/widgets', 0 /* HttpMethod.GET */),\n GET_WIDGET_DATA: new Route_1.Route('/dashboard/widgets/{:widgetId}', 0 /* HttpMethod.GET */)\n};\nvar DashboardService = /** @class */ (function (_super) {\n __extends(DashboardService, _super);\n function DashboardService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n DashboardService.prototype.getDashboard = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n var widgets;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: (0, lodash_1.isNumber)(teamId) ? exports.Routes.GET_DASHBOARDS_FOR_TEAM : exports.Routes.GET_DASHBOARDS_FOR_ALL_TEAMS,\n extractor: exports.DashboardGetResponseExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get widgets'),\n routeParams: { teamId: teamId }\n })];\n case 1:\n widgets = _a.sent();\n this.sendDataEvent(dashboard_consts_1.DASHBOARD_EVENTS.DASHBOARDS_DATA_UPDATED, { selectedTeam: teamId, widgets: widgets });\n return [2 /*return*/, widgets];\n }\n });\n });\n };\n DashboardService.prototype.getWidgetsStructure = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_ALL_WIDGETS_STRUCTURE,\n extractor: exports.DashboardGetResponseExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get widgets structure')\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n DashboardService.prototype.getWidgetData = function (widgetId, teamId) {\n return __awaiter(this, void 0, void 0, function () {\n var widgetData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_WIDGET_DATA,\n extractor: exports.WidgetGetResponseExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get widget data'),\n routeParams: { widgetId: widgetId },\n queryString: teamId ? { team_id: teamId } : undefined\n })];\n case 1:\n widgetData = _a.sent();\n this.sendDataEvent(dashboard_consts_1.DASHBOARD_EVENTS.WIDGET_DATA_FETCHED, { widgetId: widgetId, selectedTeam: teamId, widgetData: widgetData });\n return [2 /*return*/, widgetData];\n }\n });\n });\n };\n return DashboardService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = DashboardService;\nvar DashboardGetResponseExtractor = function (response) { return response.widgets; };\nexports.DashboardGetResponseExtractor = DashboardGetResponseExtractor;\nvar WidgetGetResponseExtractor = function (response) { return response.widget; };\nexports.WidgetGetResponseExtractor = WidgetGetResponseExtractor;\n//# sourceMappingURL=dashboard.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Dashboard/Service/dashboard.service.js?");
|
|
854
854
|
|
|
855
855
|
/***/ }),
|
|
856
856
|
|
|
@@ -1266,7 +1266,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
1266
1266
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1267
1267
|
|
|
1268
1268
|
"use strict";
|
|
1269
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar Language_consts_1 = __webpack_require__(/*! ../Language.consts */ \"./dist/Language/Language.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/languages', 0 /* HttpMethod.GET */)\n};\nvar LanguageService = /** @class */ (function (_super) {\n __extends(LanguageService, _super);\n function LanguageService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n LanguageService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_ALL
|
|
1269
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar Language_consts_1 = __webpack_require__(/*! ../Language.consts */ \"./dist/Language/Language.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/languages', 0 /* HttpMethod.GET */)\n};\nvar LanguageService = /** @class */ (function (_super) {\n __extends(LanguageService, _super);\n function LanguageService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n LanguageService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_ALL,\n extractor: Language_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get Language')\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n return LanguageService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = LanguageService;\n//# sourceMappingURL=LanguageService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Language/Service/LanguageService.js?");
|
|
1270
1270
|
|
|
1271
1271
|
/***/ }),
|
|
1272
1272
|
|
|
@@ -1305,7 +1305,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
1305
1305
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1306
1306
|
|
|
1307
1307
|
"use strict";
|
|
1308
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar CrudService_1 = __webpack_require__(/*! ../Core/CrudService */ \"./dist/Core/CrudService.js\");\nvar baseRoute = '/lookup-service';\nexports.Routes = {\n GET_USERS: \"\".concat(baseRoute, \"/user\"),\n GET_RUNS: \"\".concat(baseRoute, \"/run\"),\n GET_TASKS: \"\".concat(baseRoute, \"/task\"),\n GET_PLANNED_ROUTES: \"\".concat(baseRoute, \"/planned-route\")\n};\nvar LookupService = /** @class */ (function () {\n function LookupService(session) {\n this.service = new CrudService_1.default(session, 'lookup');\n }\n LookupService.prototype.getUsers = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_USERS)\n .withQueryString(query)\n .setException('Failed to get users from lookup service')\n .invoke()];\n });\n });\n };\n LookupService.prototype.getRuns = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_RUNS)\n .withQueryString(query)\n .setException('Failed to get runs from lookup service')\n .invoke()];\n });\n });\n };\n LookupService.prototype.getTasks = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_TASKS)\n .withQueryString(query)\n .setException('Failed to get tasks from lookup service')\n .invoke()];\n });\n });\n };\n LookupService.prototype.getPlannedRoutes = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_PLANNED_ROUTES)\n .withQueryString(query)\n .setException('Failed to get planned routes from lookup service')\n .invoke()];\n });\n });\n };\n return LookupService;\n}());\nexports.default = LookupService;\n//# sourceMappingURL=lookup-service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/LookUp/lookup-service.js?");
|
|
1308
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar CrudService_1 = __webpack_require__(/*! ../Core/CrudService */ \"./dist/Core/CrudService.js\");\nvar baseRoute = '/lookup-service';\nexports.Routes = {\n GET_USERS: \"\".concat(baseRoute, \"/user\"),\n GET_RUNS: \"\".concat(baseRoute, \"/run\"),\n GET_TASKS: \"\".concat(baseRoute, \"/task\"),\n GET_PLANNED_ROUTES: \"\".concat(baseRoute, \"/planned-route\")\n};\nvar LookupService = /** @class */ (function () {\n function LookupService(session) {\n this.service = new CrudService_1.default(session, 'lookup');\n }\n LookupService.prototype.getUsers = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_USERS)\n .withQueryString(query)\n .setException('Failed to get users from lookup service')\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n LookupService.prototype.getRuns = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_RUNS)\n .withQueryString(query)\n .setException('Failed to get runs from lookup service')\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n LookupService.prototype.getTasks = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_TASKS)\n .withQueryString(query)\n .setException('Failed to get tasks from lookup service')\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n LookupService.prototype.getPlannedRoutes = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_PLANNED_ROUTES)\n .withQueryString(query)\n .setException('Failed to get planned routes from lookup service')\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n return LookupService;\n}());\nexports.default = LookupService;\n//# sourceMappingURL=lookup-service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/LookUp/lookup-service.js?");
|
|
1309
1309
|
|
|
1310
1310
|
/***/ }),
|
|
1311
1311
|
|
|
@@ -1422,7 +1422,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
1422
1422
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1423
1423
|
|
|
1424
1424
|
"use strict";
|
|
1425
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar NotificationTemplate_consts_1 = __webpack_require__(/*! ../NotificationTemplate.consts */ \"./dist/NotificationTemplate/NotificationTemplate.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/merchant/notification_templates', 0 /* HttpMethod.GET */),\n CREATE: new Route_1.Route('/merchant/notification_templates', 1 /* HttpMethod.POST */),\n UPDATE: new Route_1.Route('/merchant/notification_templates/{:id}', 2 /* HttpMethod.PUT */),\n DELETE: new Route_1.Route('/merchant/notification_templates/{:id}', 4 /* HttpMethod.DELETE */),\n FIND_BY_NAMES: new Route_1.Route('/merchant/notification_templates/find_by_names', 1 /* HttpMethod.POST */)\n};\nvar NotificationTemplateService = /** @class */ (function (_super) {\n __extends(NotificationTemplateService, _super);\n function NotificationTemplateService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n NotificationTemplateService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_ALL
|
|
1425
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar NotificationTemplate_consts_1 = __webpack_require__(/*! ../NotificationTemplate.consts */ \"./dist/NotificationTemplate/NotificationTemplate.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/merchant/notification_templates', 0 /* HttpMethod.GET */),\n CREATE: new Route_1.Route('/merchant/notification_templates', 1 /* HttpMethod.POST */),\n UPDATE: new Route_1.Route('/merchant/notification_templates/{:id}', 2 /* HttpMethod.PUT */),\n DELETE: new Route_1.Route('/merchant/notification_templates/{:id}', 4 /* HttpMethod.DELETE */),\n FIND_BY_NAMES: new Route_1.Route('/merchant/notification_templates/find_by_names', 1 /* HttpMethod.POST */)\n};\nvar NotificationTemplateService = /** @class */ (function (_super) {\n __extends(NotificationTemplateService, _super);\n function NotificationTemplateService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n NotificationTemplateService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_ALL,\n extractor: NotificationTemplate_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get NotificationTemplate')\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n NotificationTemplateService.prototype.getByNames = function (names) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.handleAuthorizedRequest({\n route: exports.Routes.FIND_BY_NAMES,\n extractor: NotificationTemplate_consts_1.notificationsTemplateExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get NotificationTemplate ny names'),\n payload: { names: names }\n })];\n });\n });\n };\n NotificationTemplateService.prototype.create = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.CREATE,\n extractor: NotificationTemplate_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to create NotificationTemplate'),\n payload: { notification_template: request }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n NotificationTemplateService.prototype.update = function (id, request) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.UPDATE,\n extractor: NotificationTemplate_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update NotificationTemplate'),\n payload: { notification_template: request },\n routeParams: { id: id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n NotificationTemplateService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.DELETE,\n extractor: NotificationTemplate_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to delete NotificationTemplate'),\n payload: { id: id },\n routeParams: { id: id }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n return NotificationTemplateService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = NotificationTemplateService;\n//# sourceMappingURL=NotificationTemplateService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/NotificationTemplate/Service/NotificationTemplateService.js?");
|
|
1426
1426
|
|
|
1427
1427
|
/***/ }),
|
|
1428
1428
|
|
|
@@ -1474,7 +1474,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
1474
1474
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1475
1475
|
|
|
1476
1476
|
"use strict";
|
|
1477
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar NotificationType_consts_1 = __webpack_require__(/*! ../NotificationType.consts */ \"./dist/NotificationType/NotificationType.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/notification_types', 0 /* HttpMethod.GET */)\n};\nvar NotificationTypeService = /** @class */ (function (_super) {\n __extends(NotificationTypeService, _super);\n function NotificationTypeService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n NotificationTypeService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_ALL
|
|
1477
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar NotificationType_consts_1 = __webpack_require__(/*! ../NotificationType.consts */ \"./dist/NotificationType/NotificationType.consts.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nexports.Routes = {\n GET_ALL: new Route_1.Route('/notification_types', 0 /* HttpMethod.GET */)\n};\nvar NotificationTypeService = /** @class */ (function (_super) {\n __extends(NotificationTypeService, _super);\n function NotificationTypeService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n NotificationTypeService.prototype.getAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_ALL,\n extractor: NotificationType_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get NotificationType')\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n return NotificationTypeService;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = NotificationTypeService;\n//# sourceMappingURL=NotificationTypeService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/NotificationType/Service/NotificationTypeService.js?");
|
|
1478
1478
|
|
|
1479
1479
|
/***/ }),
|
|
1480
1480
|
|
|
@@ -1929,7 +1929,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
1929
1929
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1930
1930
|
|
|
1931
1931
|
"use strict";
|
|
1932
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReasonToChangeInventoryService = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar ReasonToChangeInventory_consts_1 = __webpack_require__(/*! ../ReasonToChangeInventory.consts */ \"./dist/ReasonToChangeInventory/ReasonToChangeInventory.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET: new Route_1.Route('/reason_to_change_inventories', 0 /* HttpMethod.GET */)\n};\nvar ReasonToChangeInventoryService = /** @class */ (function (_super) {\n __extends(ReasonToChangeInventoryService, _super);\n function ReasonToChangeInventoryService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n ReasonToChangeInventoryService.prototype.getAll = function (tagId) {\n return __awaiter(this, void 0, void 0, function () {\n var reasonsToChangeInventory;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET
|
|
1932
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReasonToChangeInventoryService = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar ReasonToChangeInventory_consts_1 = __webpack_require__(/*! ../ReasonToChangeInventory.consts */ \"./dist/ReasonToChangeInventory/ReasonToChangeInventory.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET: new Route_1.Route('/reason_to_change_inventories', 0 /* HttpMethod.GET */)\n};\nvar ReasonToChangeInventoryService = /** @class */ (function (_super) {\n __extends(ReasonToChangeInventoryService, _super);\n function ReasonToChangeInventoryService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n ReasonToChangeInventoryService.prototype.getAll = function (tagId) {\n return __awaiter(this, void 0, void 0, function () {\n var reasonsToChangeInventory;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET,\n extractor: ReasonToChangeInventory_consts_1.reasonToChangeInventoryExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get reason to change inventory'),\n queryString: { tag_id: tagId }\n })];\n case 1:\n reasonsToChangeInventory = _a.sent();\n return [2 /*return*/, reasonsToChangeInventory];\n }\n });\n });\n };\n return ReasonToChangeInventoryService;\n}(SessionBasedService_1.SessionBasedService));\nexports.ReasonToChangeInventoryService = ReasonToChangeInventoryService;\n//# sourceMappingURL=ReasonToChangeInventory.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ReasonToChangeInventory/Service/ReasonToChangeInventory.service.js?");
|
|
1933
1933
|
|
|
1934
1934
|
/***/ }),
|
|
1935
1935
|
|
|
@@ -2020,7 +2020,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
2020
2020
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2021
2021
|
|
|
2022
2022
|
"use strict";
|
|
2023
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar RouteGenerator_1 = __webpack_require__(/*! ../Core/RouteGenerator */ \"./dist/Core/RouteGenerator.js\");\nvar StoreEntity_1 = __webpack_require__(/*! ../Core/StoreEntity */ \"./dist/Core/StoreEntity.js\");\nvar ResourceUploadApi = /** @class */ (function (_super) {\n __extends(ResourceUploadApi, _super);\n function ResourceUploadApi(session) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.prepare_resource = new Route_1.Route('/resources/prepare', 1 /* HttpMethod.POST */);\n _this.process_resource = new Route_1.Route('/resources/{:id}/process', 1 /* HttpMethod.POST */);\n _this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);\n _this.processedCallbacks = [];\n return _this;\n }\n ResourceUploadApi.prototype.prepare = function (type, body) {\n return this.handleAuthorizedRequest(this.prepare_resource
|
|
2023
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar RouteGenerator_1 = __webpack_require__(/*! ../Core/RouteGenerator */ \"./dist/Core/RouteGenerator.js\");\nvar StoreEntity_1 = __webpack_require__(/*! ../Core/StoreEntity */ \"./dist/Core/StoreEntity.js\");\nvar ResourceUploadApi = /** @class */ (function (_super) {\n __extends(ResourceUploadApi, _super);\n function ResourceUploadApi(session) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.prepare_resource = new Route_1.Route('/resources/prepare', 1 /* HttpMethod.POST */);\n _this.process_resource = new Route_1.Route('/resources/{:id}/process', 1 /* HttpMethod.POST */);\n _this.realTime = new StoreEntity_1.RealTimeHandler(session.persistentConnection);\n _this.processedCallbacks = [];\n return _this;\n }\n ResourceUploadApi.prototype.prepare = function (type, body) {\n return this.handleAuthorizedRequest({\n route: this.prepare_resource,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call prepare resource'),\n payload: __assign({ type: type }, body)\n });\n };\n ResourceUploadApi.prototype.process = function (resourceId, doneEvent) {\n this.realTime.on(doneEvent, this.onProcessed.bind(this));\n return this.handleAuthorizedRequest({\n route: this.process_resource,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call resource process'),\n payload: null,\n routeParams: { id: resourceId }\n });\n };\n ResourceUploadApi.prototype.registerOnProcessed = function (resourceId, callback) {\n var _this = this;\n this.processedCallbacks.push({ callback: callback, resourceId: resourceId });\n return function () {\n return _this.processedCallbacks.splice(_this.processedCallbacks.map(function (processedCallbacks) { return processedCallbacks.callback; }).indexOf(callback), 1);\n };\n };\n ResourceUploadApi.prototype.onProcessed = function (data) {\n this.processedCallbacks.forEach(function (processedCallback) {\n if (data.resource_id === processedCallback.resourceId) {\n processedCallback.callback(data);\n }\n });\n };\n return ResourceUploadApi;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = ResourceUploadApi;\n//# sourceMappingURL=ResourceUploadApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ResourceUpload/ResourceUploadApi.js?");
|
|
2024
2024
|
|
|
2025
2025
|
/***/ }),
|
|
2026
2026
|
|
|
@@ -2098,7 +2098,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
2098
2098
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2099
2099
|
|
|
2100
2100
|
"use strict";
|
|
2101
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RouteGenerator_1 = __webpack_require__(/*! ../Core/RouteGenerator */ \"./dist/Core/RouteGenerator.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar RouteOptimizationApi = /** @class */ (function (_super) {\n __extends(RouteOptimizationApi, _super);\n function RouteOptimizationApi(session) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.optimization = new Route_1.Route('/route_optimizations/optimize', 1 /* HttpMethod.POST */);\n _this.get_optimization_result = new Route_1.Route('/route_optimizations/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);\n _this.cancel_requests = new Route_1.Route('/route_optimizations/optimization', 4 /* HttpMethod.DELETE */);\n _this.assign_users_by_ids = new Route_1.Route('/route_optimizations/assign_users_by_ids', 1 /* HttpMethod.POST */);\n _this.update_user_modified_data = new Route_1.Route('/route_optimizations/update_user_modified_data', 1 /* HttpMethod.POST */);\n _this.assign_user_manual_optimization = new Route_1.Route('/route_optimizations/assign_user_manual_optimization', 1 /* HttpMethod.POST */);\n return _this;\n }\n RouteOptimizationApi.prototype.cancelRequests = function (requestUuids) {\n return this.handleAuthorizedRequest(this.cancel_requests
|
|
2101
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RouteGenerator_1 = __webpack_require__(/*! ../Core/RouteGenerator */ \"./dist/Core/RouteGenerator.js\");\nvar SessionBasedService_1 = __webpack_require__(/*! ../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../Services/Route */ \"./dist/Services/Route.js\");\nvar RouteOptimizationApi = /** @class */ (function (_super) {\n __extends(RouteOptimizationApi, _super);\n function RouteOptimizationApi(session) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.optimization = new Route_1.Route('/route_optimizations/optimize', 1 /* HttpMethod.POST */);\n _this.get_optimization_result = new Route_1.Route('/route_optimizations/get_optimization_result/{:request_uuid}', 0 /* HttpMethod.GET */);\n _this.cancel_requests = new Route_1.Route('/route_optimizations/optimization', 4 /* HttpMethod.DELETE */);\n _this.assign_users_by_ids = new Route_1.Route('/route_optimizations/assign_users_by_ids', 1 /* HttpMethod.POST */);\n _this.update_user_modified_data = new Route_1.Route('/route_optimizations/update_user_modified_data', 1 /* HttpMethod.POST */);\n _this.assign_user_manual_optimization = new Route_1.Route('/route_optimizations/assign_user_manual_optimization', 1 /* HttpMethod.POST */);\n return _this;\n }\n RouteOptimizationApi.prototype.cancelRequests = function (requestUuids) {\n return this.handleAuthorizedRequest({\n route: this.cancel_requests,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call cancel optimization requests'),\n payload: { request_uuids: requestUuids }\n });\n };\n RouteOptimizationApi.prototype.optimize = function (optimizationProps) {\n return this.handleAuthorizedRequest({\n route: this.optimization,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to call optimization requests'),\n payload: optimizationProps\n });\n };\n RouteOptimizationApi.prototype.optimizationResult = function (request_uuid) {\n return this.handleAuthorizedRequest({\n route: this.get_optimization_result,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get optimization results'),\n routeParams: { request_uuid: request_uuid }\n });\n };\n RouteOptimizationApi.prototype.assignUsersByIds = function (teams) {\n return this.handleAuthorizedRequest({\n route: this.assign_users_by_ids,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to assign users by id'),\n payload: { origin: 'route_optimization', teams: teams }\n });\n };\n RouteOptimizationApi.prototype.updateOptimizationModifiedData = function (updateData) {\n return this.handleAuthorizedRequest({\n route: this.update_user_modified_data,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update optimization user data'),\n payload: __assign({}, updateData)\n });\n };\n RouteOptimizationApi.prototype.assignUserManualOptimization = function (updateData) {\n var fiveMinutesInMs = 1000 * 60 * 5;\n return this.handleAuthorizedRequest({\n route: this.assign_user_manual_optimization,\n extractor: RouteGenerator_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to assign user manual optimization data'),\n payload: __assign({}, updateData),\n timeout: fiveMinutesInMs\n });\n };\n return RouteOptimizationApi;\n}(SessionBasedService_1.SessionBasedService));\nexports.default = RouteOptimizationApi;\n//# sourceMappingURL=RouteOptimizationApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/RouteOptimization/RouteOptimizationApi.js?");
|
|
2102
2102
|
|
|
2103
2103
|
/***/ }),
|
|
2104
2104
|
|
|
@@ -2124,7 +2124,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar St
|
|
|
2124
2124
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2125
2125
|
|
|
2126
2126
|
"use strict";
|
|
2127
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar StoreEntity_1 = __webpack_require__(/*! ../../Core/StoreEntity */ \"./dist/Core/StoreEntity.js\");\nvar Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nexports.Routes = {\n GET_RULES: '/rule-service/rules',\n GET_METADATA: '/rule-service/metadata',\n POST_RULES: '/rule-service/rules'\n};\nvar RuleEntity = /** @class */ (function (_super) {\n __extends(RuleEntity, _super);\n function RuleEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'rules',\n routes: [Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.Delete]\n }) || this;\n }\n RuleEntity.prototype.getMetadata = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator.get(exports.Routes.GET_METADATA).withQueryString(query).invoke()];\n });\n });\n };\n RuleEntity.prototype.getRules = function (category_id, entity, entity_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_RULES)\n .withQueryString({ category_id: category_id, entity: entity, entity_id: entity_id })\n .invoke()];\n });\n });\n };\n RuleEntity.prototype.saveRules = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator.patch(exports.Routes.POST_RULES).withPayload(data).invoke()];\n });\n });\n };\n return RuleEntity;\n}(StoreEntity_1.default));\nexports.default = RuleEntity;\n//# sourceMappingURL=RuleEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Rule/Entity/RuleEntity.js?");
|
|
2127
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Routes = void 0;\nvar StoreEntity_1 = __webpack_require__(/*! ../../Core/StoreEntity */ \"./dist/Core/StoreEntity.js\");\nvar Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nexports.Routes = {\n GET_RULES: '/rule-service/rules',\n GET_METADATA: '/rule-service/metadata',\n POST_RULES: '/rule-service/rules'\n};\nvar RuleEntity = /** @class */ (function (_super) {\n __extends(RuleEntity, _super);\n function RuleEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'rules',\n routes: [Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.Delete]\n }) || this;\n }\n RuleEntity.prototype.getMetadata = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_METADATA)\n .withQueryString(query)\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n RuleEntity.prototype.getRules = function (category_id, entity, entity_id, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .get(exports.Routes.GET_RULES)\n .withQueryString({ category_id: category_id, entity: entity, entity_id: entity_id })\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n RuleEntity.prototype.saveRules = function (data, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .patch(exports.Routes.POST_RULES)\n .withPayload(data)\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n return RuleEntity;\n}(StoreEntity_1.default));\nexports.default = RuleEntity;\n//# sourceMappingURL=RuleEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Rule/Entity/RuleEntity.js?");
|
|
2128
2128
|
|
|
2129
2129
|
/***/ }),
|
|
2130
2130
|
|
|
@@ -2137,7 +2137,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
|
|
|
2137
2137
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2138
2138
|
|
|
2139
2139
|
"use strict";
|
|
2140
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RuleEntity_1 = __webpack_require__(/*! ./Entity/RuleEntity */ \"./dist/Rule/Entity/RuleEntity.js\");\nvar Rules = /** @class */ (function () {\n function Rules(session) {\n this.rulesEntity = new RuleEntity_1.default(session);\n }\n Rules.prototype.getMetadata = function (query) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.getMetadata(query)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n Rules.prototype.getRules = function (category_id, entity, entity_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.getRules(category_id, entity, entity_id)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n Rules.prototype.saveRules = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.saveRules(data)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return Rules;\n}());\nexports.default = Rules;\n//# sourceMappingURL=RuleApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Rule/RuleApi.js?");
|
|
2140
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar RuleEntity_1 = __webpack_require__(/*! ./Entity/RuleEntity */ \"./dist/Rule/Entity/RuleEntity.js\");\nvar Rules = /** @class */ (function () {\n function Rules(session) {\n this.rulesEntity = new RuleEntity_1.default(session);\n }\n Rules.prototype.getMetadata = function (query, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.getMetadata(query)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n Rules.prototype.getRules = function (category_id, entity, entity_id, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.getRules(category_id, entity, entity_id)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n Rules.prototype.saveRules = function (data, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.rulesEntity.saveRules(data)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return Rules;\n}());\nexports.default = Rules;\n//# sourceMappingURL=RuleApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Rule/RuleApi.js?");
|
|
2141
2141
|
|
|
2142
2142
|
/***/ }),
|
|
2143
2143
|
|
|
@@ -2150,7 +2150,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
2150
2150
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2151
2151
|
|
|
2152
2152
|
"use strict";
|
|
2153
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RunsService = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar runs_consts_1 = __webpack_require__(/*! ../runs.consts */ \"./dist/Run/runs.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET_RUNS: new Route_1.Route('/runs', 0 /* HttpMethod.GET */),\n GET_RUN: new Route_1.Route('/runs/{:id}', 0 /* HttpMethod.GET */),\n UPDATE_RUN: new Route_1.Route('/runs/{:id}', 3 /* HttpMethod.PATCH */),\n GET_RUN_HISTORY: new Route_1.Route('/runs/{:id}/history', 0 /* HttpMethod.GET */),\n GET_RUN_LOCATIONS: new Route_1.Route('/runs/{:id}/locations', 0 /* HttpMethod.GET */),\n GET_RUN_CASHOUT: new Route_1.Route('/runs/{:id}/cashout', 0 /* HttpMethod.GET */),\n ASSIGN_DRIVER: new Route_1.Route('/runs/{:id}/assign', 2 /* HttpMethod.PUT */),\n UNASSIGN_DRIVER: new Route_1.Route('/runs/{:id}/unassign', 2 /* HttpMethod.PUT */),\n BULK_CLOSE: new Route_1.Route('/runs/bulk_close', 1 /* HttpMethod.POST */),\n MARK_DONE_PLANNING: new Route_1.Route('/runs/mark_done_planning', 1 /* HttpMethod.POST */),\n GET_ACTUAL_BREAKS: new Route_1.Route('/runs/actual_breaks', 0 /* HttpMethod.GET */),\n ASSIGN_VEHICLES: new Route_1.Route('/runs/{:id}/vehicles_assignment', 3 /* HttpMethod.PATCH */),\n UNASSIGN_VEHICLES: new Route_1.Route('/runs/{:id}/vehicles_assignment', 4 /* HttpMethod.DELETE */)\n};\nvar RunsService = /** @class */ (function (_super) {\n __extends(RunsService, _super);\n function RunsService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n RunsService.prototype.getAll = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var runsResponse;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_RUNS, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to get Runs'), undefined, undefined, options)];\n case 1:\n runsResponse = _a.sent();\n return [2 /*return*/, runsResponse];\n }\n });\n });\n };\n RunsService.prototype.loadAll = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var runs;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(!options.ids || options.ids.length <= runs_consts_1.GetAllChunkSize)) return [3 /*break*/, 1];\n return [2 /*return*/, this.loadPage(__assign({ page: 1 }, options))];\n case 1:\n runs = [];\n return [4 /*yield*/, this.loadPageChunked(__assign({ page: 1 }, options), RunsService.splitToChunks(options.ids, runs_consts_1.GetAllChunkSize), runs)];\n case 2:\n _a.sent();\n return [2 /*return*/, runs];\n }\n });\n });\n };\n RunsService.prototype.loadPageChunked = function (options, idsChunks, allRuns, i) {\n if (i === void 0) { i = 0; }\n return __awaiter(this, void 0, void 0, function () {\n var runsChunk;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!idsChunks[i]) {\n return [2 /*return*/, allRuns];\n }\n return [4 /*yield*/, this.loadPage(__assign(__assign({}, options), { ids: idsChunks[i] }))];\n case 1:\n runsChunk = _a.sent();\n Array.prototype.push.apply(allRuns, runsChunk);\n return [2 /*return*/, this.loadPageChunked(options, idsChunks, allRuns, i + 1)];\n }\n });\n });\n };\n RunsService.prototype.loadPage = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var response, runs, _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.getAll(options)];\n case 1:\n response = _c.sent();\n if (!response.success) {\n throw new Error(\"Error fetching runs, error code: \".concat(response.rc));\n }\n runs = response.runs;\n if (!response.next_page) return [3 /*break*/, 3];\n _b = (_a = runs).concat;\n return [4 /*yield*/, this.loadPage(__assign(__assign({}, options), { page: options.page + 1 }))];\n case 2:\n runs = _b.apply(_a, [_c.sent()]);\n _c.label = 3;\n case 3: return [2 /*return*/, runs];\n }\n });\n });\n };\n RunsService.prototype.get = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var run;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_RUN, runs_consts_1.runExtractor, BringgException_1.BringgException.serviceException('Failed to get Run'), undefined, { id: id })];\n case 1:\n run = _a.sent();\n return [2 /*return*/, run];\n }\n });\n });\n };\n RunsService.prototype.update = function (id, options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.UPDATE_RUN, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to update Run'), options, { id: id })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n RunsService.prototype.getHistory = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var runHistory;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_RUN_HISTORY, runs_consts_1.runsHistoryExtractor, BringgException_1.BringgException.serviceException('Failed to get run history'), undefined, { id: id })];\n case 1:\n runHistory = _a.sent();\n return [2 /*return*/, runHistory.run_histories];\n }\n });\n });\n };\n RunsService.prototype.getLocations = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var runLocations;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_RUN_LOCATIONS, runs_consts_1.runsLocationsExtractor, BringgException_1.BringgException.serviceException('Failed to get run locations'), undefined, { id: id })];\n case 1:\n runLocations = _a.sent();\n return [2 /*return*/, runLocations.run_locations];\n }\n });\n });\n };\n RunsService.prototype.getCashout = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var runLocations;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_RUN_CASHOUT, runs_consts_1.runCashoutExtractor, BringgException_1.BringgException.serviceException('Failed to get run cashout'), undefined, { id: id })];\n case 1:\n runLocations = _a.sent();\n return [2 /*return*/, runLocations.run_cashout];\n }\n });\n });\n };\n RunsService.prototype.assignDriver = function (id, userId, targetRun) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.ASSIGN_DRIVER, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to assign driver to run'), { user_id: userId, target_run: targetRun }, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.unassignDriver = function (id, userId) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.UNASSIGN_DRIVER, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to assign driver to run'), { user_id: userId }, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.assignVehicles = function (id, vehicleId, tasks) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.ASSIGN_VEHICLES, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to assign vehicles to run'), {\n vehicle_id: vehicleId,\n tasks: tasks\n }, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.unassignVehicles = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.UNASSIGN_VEHICLES, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to unassign vehicles from run'), {}, { id: id })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.bulkClose = function (runIds) {\n return __awaiter(this, void 0, void 0, function () {\n var runBulkClose;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.BULK_CLOSE, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to bulk close runs'), {\n run_ids: runIds\n })];\n case 1:\n runBulkClose = _a.sent();\n return [2 /*return*/, runBulkClose];\n }\n });\n });\n };\n RunsService.prototype.markDonePlanning = function (runIds) {\n return __awaiter(this, void 0, void 0, function () {\n var markDonePlanning;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.MARK_DONE_PLANNING, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to mark done planning for runs'), { run_ids: runIds })];\n case 1:\n markDonePlanning = _a.sent();\n return [2 /*return*/, markDonePlanning];\n }\n });\n });\n };\n RunsService.prototype.getActualBreaks = function (runIds) {\n return __awaiter(this, void 0, void 0, function () {\n var actualBreaksByRunIdResponse;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(exports.Routes.GET_ACTUAL_BREAKS, runs_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Failed to get actual breaks of runs'), {}, {}, { run_ids: runIds })];\n case 1:\n actualBreaksByRunIdResponse = _a.sent();\n return [2 /*return*/, actualBreaksByRunIdResponse];\n }\n });\n });\n };\n RunsService.splitToChunks = function (arr, size) {\n var chunks = [];\n for (var i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size));\n }\n return chunks;\n };\n return RunsService;\n}(SessionBasedService_1.SessionBasedService));\nexports.RunsService = RunsService;\n//# sourceMappingURL=runs.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Run/Service/runs.service.js?");
|
|
2153
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RunsService = exports.Routes = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar runs_consts_1 = __webpack_require__(/*! ../runs.consts */ \"./dist/Run/runs.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.Routes = {\n GET_RUNS: new Route_1.Route('/runs', 0 /* HttpMethod.GET */),\n GET_RUN: new Route_1.Route('/runs/{:id}', 0 /* HttpMethod.GET */),\n UPDATE_RUN: new Route_1.Route('/runs/{:id}', 3 /* HttpMethod.PATCH */),\n GET_RUN_HISTORY: new Route_1.Route('/runs/{:id}/history', 0 /* HttpMethod.GET */),\n GET_RUN_LOCATIONS: new Route_1.Route('/runs/{:id}/locations', 0 /* HttpMethod.GET */),\n GET_RUN_CASHOUT: new Route_1.Route('/runs/{:id}/cashout', 0 /* HttpMethod.GET */),\n ASSIGN_DRIVER: new Route_1.Route('/runs/{:id}/assign', 2 /* HttpMethod.PUT */),\n UNASSIGN_DRIVER: new Route_1.Route('/runs/{:id}/unassign', 2 /* HttpMethod.PUT */),\n BULK_CLOSE: new Route_1.Route('/runs/bulk_close', 1 /* HttpMethod.POST */),\n MARK_DONE_PLANNING: new Route_1.Route('/runs/mark_done_planning', 1 /* HttpMethod.POST */),\n GET_ACTUAL_BREAKS: new Route_1.Route('/runs/actual_breaks', 0 /* HttpMethod.GET */),\n ASSIGN_VEHICLES: new Route_1.Route('/runs/{:id}/vehicles_assignment', 3 /* HttpMethod.PATCH */),\n UNASSIGN_VEHICLES: new Route_1.Route('/runs/{:id}/vehicles_assignment', 4 /* HttpMethod.DELETE */)\n};\nvar RunsService = /** @class */ (function (_super) {\n __extends(RunsService, _super);\n function RunsService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n RunsService.prototype.getAll = function (options, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var runsResponse;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_RUNS,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get Runs'),\n queryString: options,\n signal: signal\n })];\n case 1:\n runsResponse = _c.sent();\n return [2 /*return*/, runsResponse];\n }\n });\n });\n };\n RunsService.prototype.loadAll = function (options, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var runs;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(!options.ids || options.ids.length <= runs_consts_1.GetAllChunkSize)) return [3 /*break*/, 1];\n return [2 /*return*/, this.loadPage(__assign({ page: 1 }, options), commonOptions)];\n case 1:\n runs = [];\n return [4 /*yield*/, this.loadPageChunked(__assign({ page: 1 }, options), RunsService.splitToChunks(options.ids, runs_consts_1.GetAllChunkSize), runs, 0, commonOptions)];\n case 2:\n _a.sent();\n return [2 /*return*/, runs];\n }\n });\n });\n };\n RunsService.prototype.loadPageChunked = function (options, idsChunks, allRuns, i, commonOptions) {\n if (i === void 0) { i = 0; }\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var runsChunk;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!idsChunks[i]) {\n return [2 /*return*/, allRuns];\n }\n return [4 /*yield*/, this.loadPage(__assign(__assign({}, options), { ids: idsChunks[i] }), commonOptions)];\n case 1:\n runsChunk = _a.sent();\n Array.prototype.push.apply(allRuns, runsChunk);\n return [2 /*return*/, this.loadPageChunked(options, idsChunks, allRuns, i + 1, commonOptions)];\n }\n });\n });\n };\n RunsService.prototype.loadPage = function (options, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var response, runs, _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.getAll(options, commonOptions)];\n case 1:\n response = _c.sent();\n if (!response.success) {\n throw new Error(\"Error fetching runs, error code: \".concat(response.rc));\n }\n runs = response.runs;\n if (!response.next_page) return [3 /*break*/, 3];\n _b = (_a = runs).concat;\n return [4 /*yield*/, this.loadPage(__assign(__assign({}, options), { page: options.page + 1 }), commonOptions)];\n case 2:\n runs = _b.apply(_a, [_c.sent()]);\n _c.label = 3;\n case 3: return [2 /*return*/, runs];\n }\n });\n });\n };\n RunsService.prototype.get = function (id, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var run;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_RUN,\n extractor: runs_consts_1.runExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get Run'),\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n run = _c.sent();\n return [2 /*return*/, run];\n }\n });\n });\n };\n RunsService.prototype.update = function (id, options, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.UPDATE_RUN,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update Run'),\n payload: options,\n routeParams: { id: id },\n signal: signal\n })];\n case 1: return [2 /*return*/, _c.sent()];\n }\n });\n });\n };\n RunsService.prototype.getHistory = function (id, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var runHistory;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_RUN_HISTORY,\n extractor: runs_consts_1.runsHistoryExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get run history'),\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n runHistory = _c.sent();\n return [2 /*return*/, runHistory.run_histories];\n }\n });\n });\n };\n RunsService.prototype.getLocations = function (id, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var runLocations;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_RUN_LOCATIONS,\n extractor: runs_consts_1.runsLocationsExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get run locations'),\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n runLocations = _c.sent();\n return [2 /*return*/, runLocations.run_locations];\n }\n });\n });\n };\n RunsService.prototype.getCashout = function (id, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var runLocations;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_RUN_CASHOUT,\n extractor: runs_consts_1.runCashoutExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get run cashout'),\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n runLocations = _c.sent();\n return [2 /*return*/, runLocations.run_cashout];\n }\n });\n });\n };\n RunsService.prototype.assignDriver = function (id, userId, targetRun, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.ASSIGN_DRIVER,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to assign driver to run'),\n payload: { user_id: userId, target_run: targetRun },\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n response = _c.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.unassignDriver = function (id, userId, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.UNASSIGN_DRIVER,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to assign driver to run'),\n payload: { user_id: userId },\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n response = _c.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.assignVehicles = function (id, vehicleId, tasks, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.ASSIGN_VEHICLES,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to assign vehicles to run'),\n payload: { vehicle_id: vehicleId, tasks: tasks },\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n response = _c.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.unassignVehicles = function (id, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.UNASSIGN_VEHICLES,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to unassign vehicles from run'),\n payload: {},\n routeParams: { id: id },\n signal: signal\n })];\n case 1:\n response = _c.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n RunsService.prototype.bulkClose = function (runIds, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var runBulkClose;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.BULK_CLOSE,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to bulk close runs'),\n payload: { run_ids: runIds },\n signal: signal\n })];\n case 1:\n runBulkClose = _c.sent();\n return [2 /*return*/, runBulkClose];\n }\n });\n });\n };\n RunsService.prototype.markDonePlanning = function (runIds, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var markDonePlanning;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.MARK_DONE_PLANNING,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to mark done planning for runs'),\n payload: { run_ids: runIds },\n signal: signal\n })];\n case 1:\n markDonePlanning = _c.sent();\n return [2 /*return*/, markDonePlanning];\n }\n });\n });\n };\n RunsService.prototype.getActualBreaks = function (runIds, _a) {\n var _b = _a === void 0 ? {} : _a, signal = _b.signal;\n return __awaiter(this, void 0, void 0, function () {\n var actualBreaksByRunIdResponse;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_ACTUAL_BREAKS,\n extractor: runs_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get actual breaks of runs'),\n payload: {},\n routeParams: {},\n queryString: { run_ids: runIds },\n signal: signal\n })];\n case 1:\n actualBreaksByRunIdResponse = _c.sent();\n return [2 /*return*/, actualBreaksByRunIdResponse];\n }\n });\n });\n };\n RunsService.splitToChunks = function (arr, size) {\n var chunks = [];\n for (var i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size));\n }\n return chunks;\n };\n return RunsService;\n}(SessionBasedService_1.SessionBasedService));\nexports.RunsService = RunsService;\n//# sourceMappingURL=runs.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Run/Service/runs.service.js?");
|
|
2154
2154
|
|
|
2155
2155
|
/***/ }),
|
|
2156
2156
|
|
|
@@ -2202,7 +2202,7 @@ eval("\nvar __assign = (this && this.__assign) || function () {\n __assign =
|
|
|
2202
2202
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2203
2203
|
|
|
2204
2204
|
"use strict";
|
|
2205
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar data_store_1 = __webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\");\nvar runs_consts_1 = __webpack_require__(/*! ../runs.consts */ \"./dist/Run/runs.consts.js\");\nvar runs_service_1 = __webpack_require__(/*! ../Service/runs.service */ \"./dist/Run/Service/runs.service.js\");\nvar realtime_subscriptions_1 = __webpack_require__(/*! ../../realtime-subscriptions */ \"./dist/realtime-subscriptions.js\");\nvar RunsApi = /** @class */ (function () {\n function RunsApi(session) {\n var _this = this;\n this.createOrUpdateRun = function (payload) {\n _this.runsStore.set(payload.run);\n };\n this.deleteRun = function (payload) {\n _this.runsStore.remove(payload.id);\n };\n this.runsStore = new data_store_1.default();\n this.runsService = new runs_service_1.RunsService(session);\n this.realtimeSubscriptions = new realtime_subscriptions_1.default(session);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.CREATED, this.createOrUpdateRun);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.UPDATED, this.createOrUpdateRun);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.DELETED, this.deleteRun);\n }\n RunsApi.prototype.getAll = function () {\n return this.runsStore.getAll();\n };\n RunsApi.prototype.getByIds = function (ids) {\n var _this = this;\n return ids.map(function (runId) { return _this.runsStore.get(runId); });\n };\n RunsApi.prototype.loadAll = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var response, runIds, runs;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.runsService.getAll(options)];\n case 1:\n response = _a.sent();\n runIds = response.runs.map(function (run) { return run.id; });\n return [4 /*yield*/, this.runsService.loadAll({ ids: runIds })];\n case 2:\n runs = _a.sent();\n this.runsStore.setAll(runs);\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RunsApi;\n}());\nexports.default = RunsApi;\n//# sourceMappingURL=runs-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Run/v2/runs-api.js?");
|
|
2205
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar data_store_1 = __webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\");\nvar runs_consts_1 = __webpack_require__(/*! ../runs.consts */ \"./dist/Run/runs.consts.js\");\nvar runs_service_1 = __webpack_require__(/*! ../Service/runs.service */ \"./dist/Run/Service/runs.service.js\");\nvar realtime_subscriptions_1 = __webpack_require__(/*! ../../realtime-subscriptions */ \"./dist/realtime-subscriptions.js\");\nvar RunsApi = /** @class */ (function () {\n function RunsApi(session) {\n var _this = this;\n this.createOrUpdateRun = function (payload) {\n _this.runsStore.set(payload.run);\n };\n this.deleteRun = function (payload) {\n _this.runsStore.remove(payload.id);\n };\n this.runsStore = new data_store_1.default();\n this.runsService = new runs_service_1.RunsService(session);\n this.realtimeSubscriptions = new realtime_subscriptions_1.default(session);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.CREATED, this.createOrUpdateRun);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.UPDATED, this.createOrUpdateRun);\n this.realtimeSubscriptions.subscribe(runs_consts_1.RunEvents.DELETED, this.deleteRun);\n }\n RunsApi.prototype.getAll = function () {\n return this.runsStore.getAll();\n };\n RunsApi.prototype.getByIds = function (ids) {\n var _this = this;\n return ids.map(function (runId) { return _this.runsStore.get(runId); });\n };\n RunsApi.prototype.loadAll = function (options, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var response, runIds, runs;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.runsService.getAll(options, commonOptions)];\n case 1:\n response = _a.sent();\n runIds = response.runs.map(function (run) { return run.id; });\n return [4 /*yield*/, this.runsService.loadAll({ ids: runIds }, commonOptions)];\n case 2:\n runs = _a.sent();\n this.runsStore.setAll(runs);\n return [2 /*return*/, response];\n }\n });\n });\n };\n return RunsApi;\n}());\nexports.default = RunsApi;\n//# sourceMappingURL=runs-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Run/v2/runs-api.js?");
|
|
2206
2206
|
|
|
2207
2207
|
/***/ }),
|
|
2208
2208
|
|
|
@@ -2449,7 +2449,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
|
|
|
2449
2449
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2450
2450
|
|
|
2451
2451
|
"use strict";
|
|
2452
|
-
eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar version = '1.8.0';\nfunction logErrorResponse(response) {\n var data = response.data, status = response.status;\n try {\n Logger_1.default.error(response.config.method.toUpperCase(), response.config.url, status);\n }\n catch (e) { }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) { }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) { }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, queryString, authenticationToken, headers, responseType) {\n // NiceToHave: move headers to HttpHeaders class\n this.headers = __assign(__assign({ 'Content-Type': 'application/json' }, headers), { 'sdk-version': version, Client: clientId });\n this.timeout = timeout;\n this.validateStatus = lodash_1.stubTrue;\n if (queryString) {\n this.params = queryString;\n }\n if (authenticationToken) {\n this.headers['Authorization'] = \"Token token=\".concat(authenticationToken);\n }\n if (responseType) {\n this.responseType = responseType;\n }\n }\n RequestOptions.new = function (_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.clientId, clientId = _c === void 0 ? 'Bringg Dashboard' : _c, _d = _b.timeout, timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d, _e = _b.queryString, queryString = _e === void 0 ? undefined : _e, _f = _b.authenticationToken, authenticationToken = _f === void 0 ? undefined : _f, _g = _b.headers, headers = _g === void 0 ? undefined : _g, _h = _b.responseType, responseType = _h === void 0 ? undefined : _h;\n return new RequestOptions(clientId, timeout || DEFAULT_TIMEOUT, queryString, authenticationToken, headers, responseType);\n };\n return RequestOptions;\n}());\nexports.RequestOptions = RequestOptions;\nvar ResponseHandler = /** @class */ (function () {\n function ResponseHandler(response) {\n this.axiosPromise = response;\n }\n ResponseHandler.prototype.handle = function (consumer) {\n return __awaiter(this, void 0, void 0, function () {\n var axiosResponse, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if ((0, lodash_1.isUndefined)(consumer)) {\n throw new Error('consumer must be defined');\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.axiosPromise];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, consumer(axiosResponse)];\n case 3:\n e_1 = _a.sent();\n if (e_1 instanceof BringgException_1.BringgException) {\n throw e_1;\n }\n return [2 /*return*/, consumer(e_1)];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return ResponseHandler;\n}());\nexports.ResponseHandler = ResponseHandler;\nfunction get(axiosInstance, host, uri, queryString) {\n return new ResponseHandler(axiosInstance.get(\"\".concat(host).concat(uri), { params: queryString }));\n}\nfunction post(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.post(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction put(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.put(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction patch(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.patch(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction remove(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.delete(\"\".concat(host).concat(uri), { params: queryString, data: payload }));\n}\nfunction routify(axiosInstance, endpoint, route, routeParams, queryString, payload) {\n switch (route.httpMethod) {\n case 0 /* HttpMethod.GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString);\n case 1 /* HttpMethod.POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 2 /* HttpMethod.PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 3 /* HttpMethod.PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 4 /* HttpMethod.DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n }\n}\nfunction wrapWithInterceptors(axios) {\n axios.interceptors.request.use(function (req) {\n var method = req.method, url = req.url, params = req.params, headers = req.headers, data = req.data;\n try {\n Logger_1.default.debug('REQUEST:', method.toUpperCase(), url);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('REQUEST-query-string:', params);\n Logger_1.default.trace('REQUEST-headers:', headers);\n Logger_1.default.trace('REQUEST-data:', data);\n }\n catch (e) { }\n return req;\n });\n axios.interceptors.response.use(function (res) {\n var statusText = res.statusText, status = res.status, headers = res.headers, data = res.data;\n try {\n Logger_1.default.debug('RESPONSE:', res.config.url, status, statusText);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) { }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, headers, responseType, timeout) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, authenticationToken: authenticationToken, headers: headers, responseType: responseType, timeout: timeout })));\n}\nfunction anonymousAxiosInstance(clientId, headers) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, headers: headers })));\n}\nvar AuthorizedServiceRequest = /** @class */ (function () {\n function AuthorizedServiceRequest(clientId, authToken) {\n this.authToken = authToken;\n this.clientId = clientId;\n }\n AuthorizedServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload, headers, responseType, timeout) {\n return routify(axiosInstance(this.clientId, this.authToken, headers, responseType, timeout), endpoint, route, routeParams, queryString, payload);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId) {\n this.clientId = clientId;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload) {\n return routify(anonymousAxiosInstance(this.clientId), endpoint, route, routeParams, queryString, payload);\n };\n return AnonymousServiceRequest;\n}());\nexports.AnonymousServiceRequest = AnonymousServiceRequest;\n//# sourceMappingURL=ServiceRequest.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/ServiceRequest.js?");
|
|
2452
|
+
eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar version = '1.9.0-pre';\nfunction logErrorResponse(response) {\n var data = response.data, status = response.status;\n try {\n Logger_1.default.error(response.config.method.toUpperCase(), response.config.url, status);\n }\n catch (e) { }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) { }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) { }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, queryString, authenticationToken, headers, responseType, signal) {\n // NiceToHave: move headers to HttpHeaders class\n this.headers = __assign(__assign({ 'Content-Type': 'application/json' }, headers), { 'sdk-version': version, Client: clientId });\n this.timeout = timeout;\n this.validateStatus = lodash_1.stubTrue;\n if (queryString) {\n this.params = queryString;\n }\n if (authenticationToken) {\n this.headers['Authorization'] = \"Token token=\".concat(authenticationToken);\n }\n if (responseType) {\n this.responseType = responseType;\n }\n if (signal) {\n this.signal = signal;\n }\n }\n RequestOptions.new = function (_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.clientId, clientId = _c === void 0 ? 'Bringg Dashboard' : _c, _d = _b.timeout, timeout = _d === void 0 ? DEFAULT_TIMEOUT : _d, queryString = _b.queryString, authenticationToken = _b.authenticationToken, headers = _b.headers, responseType = _b.responseType, signal = _b.signal;\n return new RequestOptions(clientId, timeout || DEFAULT_TIMEOUT, queryString, authenticationToken, headers, responseType, signal);\n };\n return RequestOptions;\n}());\nexports.RequestOptions = RequestOptions;\nvar ResponseHandler = /** @class */ (function () {\n function ResponseHandler(response) {\n this.axiosPromise = response;\n }\n ResponseHandler.prototype.handle = function (consumer) {\n return __awaiter(this, void 0, void 0, function () {\n var axiosResponse, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if ((0, lodash_1.isUndefined)(consumer)) {\n throw new Error('consumer must be defined');\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.axiosPromise];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, consumer(axiosResponse)];\n case 3:\n e_1 = _a.sent();\n if (e_1 instanceof BringgException_1.BringgException) {\n throw e_1;\n }\n return [2 /*return*/, consumer(e_1)];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return ResponseHandler;\n}());\nexports.ResponseHandler = ResponseHandler;\nfunction get(axiosInstance, host, uri, queryString) {\n return new ResponseHandler(axiosInstance.get(\"\".concat(host).concat(uri), { params: queryString }));\n}\nfunction post(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.post(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction put(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.put(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction patch(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.patch(\"\".concat(host).concat(uri), payload, { params: queryString }));\n}\nfunction remove(axiosInstance, host, uri, queryString, payload) {\n return new ResponseHandler(axiosInstance.delete(\"\".concat(host).concat(uri), { params: queryString, data: payload }));\n}\nfunction routify(axiosInstance, endpoint, route, routeParams, queryString, payload) {\n switch (route.httpMethod) {\n case 0 /* HttpMethod.GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString);\n case 1 /* HttpMethod.POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 2 /* HttpMethod.PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 3 /* HttpMethod.PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n case 4 /* HttpMethod.DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload);\n }\n}\nfunction wrapWithInterceptors(axios) {\n axios.interceptors.request.use(function (req) {\n var method = req.method, url = req.url, params = req.params, headers = req.headers, data = req.data;\n try {\n Logger_1.default.debug('REQUEST:', method.toUpperCase(), url);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('REQUEST-query-string:', params);\n Logger_1.default.trace('REQUEST-headers:', headers);\n Logger_1.default.trace('REQUEST-data:', data);\n }\n catch (e) { }\n return req;\n });\n axios.interceptors.response.use(function (res) {\n var statusText = res.statusText, status = res.status, headers = res.headers, data = res.data;\n try {\n Logger_1.default.debug('RESPONSE:', res.config.url, status, statusText);\n }\n catch (e) { }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) { }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, headers, responseType, timeout, signal) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, authenticationToken: authenticationToken, headers: headers, responseType: responseType, timeout: timeout, signal: signal })));\n}\nfunction anonymousAxiosInstance(clientId, headers, signal) {\n return wrapWithInterceptors(axios_1.default.create(RequestOptions.new({ clientId: clientId, headers: headers, signal: signal })));\n}\nvar AuthorizedServiceRequest = /** @class */ (function () {\n function AuthorizedServiceRequest(clientId, authToken) {\n this.authToken = authToken;\n this.clientId = clientId;\n }\n AuthorizedServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload, headers, responseType, timeout, signal) {\n return routify(axiosInstance(this.clientId, this.authToken, headers, responseType, timeout, signal), endpoint, route, routeParams, queryString, payload);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId) {\n this.clientId = clientId;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, routeParams, queryString, payload, signal) {\n return routify(anonymousAxiosInstance(this.clientId, undefined, signal), endpoint, route, routeParams, queryString, payload);\n };\n return AnonymousServiceRequest;\n}());\nexports.AnonymousServiceRequest = AnonymousServiceRequest;\n//# sourceMappingURL=ServiceRequest.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/ServiceRequest.js?");
|
|
2453
2453
|
|
|
2454
2454
|
/***/ }),
|
|
2455
2455
|
|
|
@@ -2462,7 +2462,7 @@ eval("\nvar __assign = (this && this.__assign) || function () {\n __assign =
|
|
|
2462
2462
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2463
2463
|
|
|
2464
2464
|
"use strict";
|
|
2465
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionBasedService = exports.HTTP_EVENTS = void 0;\nvar ServiceRequest_1 = __webpack_require__(/*! ./ServiceRequest */ \"./dist/Services/ServiceRequest.js\");\nvar Enums_1 = __webpack_require__(/*! ../Core/Http/Enums */ \"./dist/Core/Http/Enums.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar ExceptionReason_1 = __webpack_require__(/*! ../Core/ExceptionReason */ \"./dist/Core/ExceptionReason.js\");\nvar responseMessageToString_1 = __webpack_require__(/*! ../utils/responseMessageToString */ \"./dist/utils/responseMessageToString.js\");\nexports.HTTP_EVENTS = {\n HTTP_REQUEST_FAILURE: 'http failure'\n};\nvar SessionBasedService = /** @class */ (function () {\n function SessionBasedService(endpoint, session) {\n this._endpoint = endpoint;\n this._session = session;\n }\n Object.defineProperty(SessionBasedService.prototype, \"sendDataEvent\", {\n get: function () {\n return this.session.sendDataEvent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SessionBasedService.prototype, \"endpoint\", {\n get: function () {\n return this._endpoint;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SessionBasedService.prototype, \"session\", {\n get: function () {\n return this._session;\n },\n enumerable: false,\n configurable: true\n });\n SessionBasedService.prototype.handleAuthorizedRequest = function (route, extractor, exceptionProducer
|
|
2465
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionBasedService = exports.HTTP_EVENTS = void 0;\nvar ServiceRequest_1 = __webpack_require__(/*! ./ServiceRequest */ \"./dist/Services/ServiceRequest.js\");\nvar Enums_1 = __webpack_require__(/*! ../Core/Http/Enums */ \"./dist/Core/Http/Enums.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar ExceptionReason_1 = __webpack_require__(/*! ../Core/ExceptionReason */ \"./dist/Core/ExceptionReason.js\");\nvar responseMessageToString_1 = __webpack_require__(/*! ../utils/responseMessageToString */ \"./dist/utils/responseMessageToString.js\");\nexports.HTTP_EVENTS = {\n HTTP_REQUEST_FAILURE: 'http failure'\n};\nvar SessionBasedService = /** @class */ (function () {\n function SessionBasedService(endpoint, session) {\n this._endpoint = endpoint;\n this._session = session;\n }\n Object.defineProperty(SessionBasedService.prototype, \"sendDataEvent\", {\n get: function () {\n return this.session.sendDataEvent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SessionBasedService.prototype, \"endpoint\", {\n get: function () {\n return this._endpoint;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SessionBasedService.prototype, \"session\", {\n get: function () {\n return this._session;\n },\n enumerable: false,\n configurable: true\n });\n SessionBasedService.prototype.handleAuthorizedRequest = function (_a) {\n var route = _a.route, extractor = _a.extractor, exceptionProducer = _a.exceptionProducer, _b = _a.payload, payload = _b === void 0 ? {} : _b, _c = _a.routeParams, routeParams = _c === void 0 ? {} : _c, _d = _a.queryString, queryString = _d === void 0 ? {} : _d, _e = _a.headers, headers = _e === void 0 ? {} : _e, responseType = _a.responseType, timeout = _a.timeout, signal = _a.signal;\n return __awaiter(this, void 0, void 0, function () {\n var statusCode, response, responseAsDefault, bringgException;\n var _this = this;\n return __generator(this, function (_f) {\n switch (_f.label) {\n case 0: return [4 /*yield*/, new ServiceRequest_1.AuthorizedServiceRequest(this.session.clientId, this.session.user.authentication_token)\n .invoke(this.endpoint, route, routeParams, queryString, payload, headers, responseType, timeout)\n .handle(function (response) {\n var data = response.data, status = response.status;\n statusCode = status;\n if (status != Enums_1.HttpStatusCode.OK &&\n status != Enums_1.HttpStatusCode.CREATED &&\n status != Enums_1.HttpStatusCode.NO_CONTENT) {\n _this.notifyHttpError(new BringgException_1.BringgException(ExceptionReason_1.ExceptionReason.fromHttpStatusCode(status), Enums_1.HttpStatusCode.getStatusText(status), null, {\n request: {\n route: route,\n payload: payload,\n routeParams: routeParams,\n queryString: queryString,\n headers: headers,\n clientId: _this.session.clientId,\n authenticationToken: _this.session.user.authentication_token\n },\n response: response\n }));\n (0, ServiceRequest_1.logErrorResponse)(response);\n throw (0, lodash_1.isFunction)(exceptionProducer) ? exceptionProducer() : response;\n }\n return data;\n })];\n case 1:\n response = _f.sent();\n responseAsDefault = response;\n if (responseAsDefault.success === false) {\n bringgException = exceptionProducer();\n bringgException.details = (0, responseMessageToString_1.responseMessageToString)(responseAsDefault.message);\n bringgException.rc = responseAsDefault.rc;\n bringgException.errors = response.errors;\n bringgException.statusCode = statusCode;\n throw bringgException;\n }\n return [2 /*return*/, extractor(response)];\n }\n });\n });\n };\n SessionBasedService.prototype.notifyHttpError = function (error) {\n this.sendDataEvent(exports.HTTP_EVENTS.HTTP_REQUEST_FAILURE, error);\n };\n return SessionBasedService;\n}());\nexports.SessionBasedService = SessionBasedService;\n//# sourceMappingURL=SessionBasedService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Services/SessionBasedService.js?");
|
|
2466
2466
|
|
|
2467
2467
|
/***/ }),
|
|
2468
2468
|
|
|
@@ -2735,7 +2735,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Ta
|
|
|
2735
2735
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2736
2736
|
|
|
2737
2737
|
"use strict";
|
|
2738
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TaskInventoryService = exports.Routes = exports.baseRoute = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar TaskInventory_consts_1 = __webpack_require__(/*! ../TaskInventory.consts */ \"./dist/TaskInventory/TaskInventory.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.baseRoute = \"/task_inventories\";\nexports.Routes = {\n GET: new Route_1.Route(\"\".concat(exports.baseRoute, \"/mass_quantity_update\"), 1 /* HttpMethod.POST */),\n UPDATE: new Route_1.Route(\"\".concat(exports.baseRoute, \"/{:id}\"), 2 /* HttpMethod.PUT */),\n GET_REJECT_DETAILS: new Route_1.Route(\"\".concat(exports.baseRoute, \"/reject_details\"), 0 /* HttpMethod.GET */)\n};\nvar TaskInventoryService = /** @class */ (function (_super) {\n __extends(TaskInventoryService, _super);\n function TaskInventoryService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n TaskInventoryService.prototype.update = function (id, taskInventory) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.handleAuthorizedRequest(exports.Routes.UPDATE
|
|
2738
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TaskInventoryService = exports.Routes = exports.baseRoute = void 0;\nvar SessionBasedService_1 = __webpack_require__(/*! ../../Services/SessionBasedService */ \"./dist/Services/SessionBasedService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar TaskInventory_consts_1 = __webpack_require__(/*! ../TaskInventory.consts */ \"./dist/TaskInventory/TaskInventory.consts.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nexports.baseRoute = \"/task_inventories\";\nexports.Routes = {\n GET: new Route_1.Route(\"\".concat(exports.baseRoute, \"/mass_quantity_update\"), 1 /* HttpMethod.POST */),\n UPDATE: new Route_1.Route(\"\".concat(exports.baseRoute, \"/{:id}\"), 2 /* HttpMethod.PUT */),\n GET_REJECT_DETAILS: new Route_1.Route(\"\".concat(exports.baseRoute, \"/reject_details\"), 0 /* HttpMethod.GET */)\n};\nvar TaskInventoryService = /** @class */ (function (_super) {\n __extends(TaskInventoryService, _super);\n function TaskInventoryService(session) {\n return _super.call(this, session.config.getApiEndpoint(), session) || this;\n }\n TaskInventoryService.prototype.update = function (id, taskInventory) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.handleAuthorizedRequest({\n route: exports.Routes.UPDATE,\n extractor: TaskInventory_consts_1.taskInventoryExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update task inventory'),\n payload: taskInventory,\n routeParams: { id: id }\n })];\n });\n });\n };\n TaskInventoryService.prototype.getTaskInventoriesRejectDetails = function (taskInventoriesIds) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET_REJECT_DETAILS,\n extractor: TaskInventory_consts_1.taskInventoriesRejectDetailsExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to get task inventories reject details'),\n payload: {},\n routeParams: {},\n queryString: { task_inventories_ids: taskInventoriesIds }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n TaskInventoryService.prototype.massQuantityUpdate = function (taskInventories, reasonToChangeInventoryId, reasonToChangeInventoryText) {\n return __awaiter(this, void 0, void 0, function () {\n var taskInventoriesResponse;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: exports.Routes.GET,\n extractor: TaskInventory_consts_1.taskInventoryMassQuantityExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Failed to update task inventories'),\n payload: {\n reason_to_change_inventory_id: reasonToChangeInventoryId,\n reason_to_change_inventory_text: reasonToChangeInventoryText,\n task_inventories: taskInventories\n }\n })];\n case 1:\n taskInventoriesResponse = _a.sent();\n return [2 /*return*/, taskInventoriesResponse];\n }\n });\n });\n };\n return TaskInventoryService;\n}(SessionBasedService_1.SessionBasedService));\nexports.TaskInventoryService = TaskInventoryService;\n//# sourceMappingURL=TaskInventory.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/TaskInventory/Service/TaskInventory.service.js?");
|
|
2739
2739
|
|
|
2740
2740
|
/***/ }),
|
|
2741
2741
|
|
|
@@ -2865,7 +2865,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Te
|
|
|
2865
2865
|
/***/ (function(module, exports, __webpack_require__) {
|
|
2866
2866
|
|
|
2867
2867
|
"use strict";
|
|
2868
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PubSubService_1 = __webpack_require__(/*! ../../Services/PubSubService */ \"./dist/Services/PubSubService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar User_consts_1 = __webpack_require__(/*! ../User.consts */ \"./dist/User/User.consts.js\");\nvar PubSubEvents_1 = __webpack_require__(/*! ../../Services/PubSubEvents */ \"./dist/Services/PubSubEvents.js\");\nvar keyset_pagination_consts_1 = __webpack_require__(/*! ../../utils/consts/keyset-pagination.consts */ \"./dist/utils/consts/keyset-pagination.consts.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar ROUTES = {\n GET: new Route_1.Route('/users/{:userId}', 0 /* HttpMethod.GET */),\n GET_ALL: new Route_1.Route('/users/', 0 /* HttpMethod.GET */),\n GET_ALL_DRIVERS: new Route_1.Route('/users/drivers', 0 /* HttpMethod.GET */),\n GET_USERS_WITH_USER_TYPE: new Route_1.Route('/user_types/{:userTypeId}/users', 0 /* HttpMethod.GET */),\n GET_DRIVERS_BY_TEAM: new Route_1.Route('/teams/{:teamId}/users', 0 /* HttpMethod.GET */),\n MAKE_ADMIN: new Route_1.Route('/users/{:userId}/admin', 1 /* HttpMethod.POST */),\n CREATE_USER: new Route_1.Route('/users/', 1 /* HttpMethod.POST */),\n INVITE: new Route_1.Route('/users/{:userId}/reinvite', 1 /* HttpMethod.POST */),\n TOTAL_TASKS: new Route_1.Route('/users/{:userId}/tasks/count', 0 /* HttpMethod.GET */),\n TOTAL_EMPLOYEES: new Route_1.Route('/users/count', 0 /* HttpMethod.GET */),\n TOTAL_DRIVERS: new Route_1.Route('/users/drivers/count', 0 /* HttpMethod.GET */),\n UNLOCK: new Route_1.Route('/users/{:userId}/unlock', 1 /* HttpMethod.POST */),\n INVITE_VIA_EMAIL: new Route_1.Route('/users/{:userId}/reinvite_via_email', 1 /* HttpMethod.POST */),\n VALIDATE_PHONE: new Route_1.Route('/api/user/validate_phone', 0 /* HttpMethod.GET */),\n CLOSED_TASKS: new Route_1.Route('/users/{:userId}/tasks/closed_tasks', 0 /* HttpMethod.GET */),\n UPDATE: new Route_1.Route('/users/{:id}', 3 /* HttpMethod.PATCH */),\n DELETE: new Route_1.Route('/users/{:id}', 4 /* HttpMethod.DELETE */),\n GET_PROFILE_IMAGE: new Route_1.Route('/users/{:userId}/profile_image', 0 /* HttpMethod.GET */),\n MESSAGE_DRIVER: new Route_1.Route('/announcement/user/{:userId}', 2 /* HttpMethod.PUT */)\n};\nvar UsersService = /** @class */ (function (_super) {\n __extends(UsersService, _super);\n function UsersService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n UsersService.prototype.create = function (user) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.CREATE_USER, User_consts_1.userExtractor, BringgException_1.BringgException.serviceException('Could not create user'), user)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getDriversByTeam = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_DRIVERS_BY_TEAM, User_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException('Could not get drivers'), {}, { teamId: teamId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.get = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET, User_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not get user \".concat(userId); }), {}, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getAll = function (page, limit) {\n if (page === void 0) { page = 1; }\n if (limit === void 0) { limit = 50; }\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_ALL, function (response) { return ({ has_next_page: response.has_next_page, users: response.users }); }, BringgException_1.BringgException.serviceException('Could not get users'), undefined, undefined, { page: page, limit: limit })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.getAllKeysetPagination = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor;\n return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_ALL, function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); }, BringgException_1.BringgException.serviceException('Could not get users'), undefined, undefined, { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, limit: limit, page_action: page_action, cursor: cursor })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.invite = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.INVITE, User_consts_1.userExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not invite user with id: \".concat(userId); }), undefined, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.unlock = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.UNLOCK, User_consts_1.successExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not unlock user with id: \".concat(userId); }), undefined, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.assignedTasksCount = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.TOTAL_TASKS, User_consts_1.countExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not get task count for user with id: \".concat(userId); }), undefined, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.totalEmployeesCount = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.TOTAL_EMPLOYEES, User_consts_1.countExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not get total employee count\"; }), undefined, undefined)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.totalDriversCount = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.TOTAL_DRIVERS, User_consts_1.countExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not get total drivers count\"; }), undefined, undefined)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.inviteByEmail = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.INVITE_VIA_EMAIL, User_consts_1.userExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not invite user with id: \".concat(userId); }), undefined, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.validatePhone = function (phone) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.VALIDATE_PHONE, function (response) { return response.phone_valid; }, BringgException_1.BringgException.serviceException(function () { return \"Phone is not valid: \".concat(phone); }), undefined, {}, { phone: phone })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.closedTasks = function (userId, page) {\n if (page === void 0) { page = 0; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.CLOSED_TASKS, User_consts_1.defaultExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not get tasks for user: \".concat(userId); }), undefined, { userId: userId }, { page: page })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.update = function (id, userDelta) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.UPDATE, User_consts_1.userExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not update user: \".concat(id); }), __assign({ id: id }, userDelta), // pass id to avoid throwing errors for request with empty body\n { id: id })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getAllAdminsAndDispatchers = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, scopes, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor;\n scopes = [User_consts_1.UsersScopes.DISPATCHERS, User_consts_1.UsersScopes.ADMINS];\n return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_ALL, function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); }, BringgException_1.BringgException.serviceException('Could not get admins and dispatchers'), undefined, undefined, { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, scopes: scopes, limit: limit, page_action: page_action, cursor: cursor })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.getAllDrivers = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, options, scopes;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor, options = request.options;\n scopes = [];\n if ((0, lodash_1.get)(options, 'onlyCustomers')) {\n scopes.push(User_consts_1.UsersScopes.CUSTOMERS);\n }\n else {\n scopes.push(User_consts_1.UsersScopes.DRIVERS);\n }\n if (options.onlyOnlineDriver) {\n scopes.push(User_consts_1.UsersScopes.MARKED_AS_ONLINE);\n }\n return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_ALL, function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); }, BringgException_1.BringgException.serviceException('Could not get drivers'), undefined, undefined, { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, scopes: scopes, limit: limit, page_action: page_action, cursor: cursor })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.DELETE, User_consts_1.successExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not delete user: \".concat(id); }), undefined, { id: id })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result];\n }\n });\n });\n };\n UsersService.prototype.getProfileImage = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_PROFILE_IMAGE, function (response) { return response.profile_image; }, BringgException_1.BringgException.serviceException(function () { return \"Could not get user's \".concat(userId, \" profile image\"); }), {}, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.messageDriver = function (userId, message) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.MESSAGE_DRIVER, function (response) { return response.announcement_id; }, BringgException_1.BringgException.serviceException(function () { return \"Could not message to user \".concat(userId); }), { user_id: userId, message: message }, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.byUserType = function (userTypeId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.GET_USERS_WITH_USER_TYPE, User_consts_1.usersExtractor, BringgException_1.BringgException.serviceException('Could not get users'), {}, { userTypeId: userTypeId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.makeAdmin = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest(ROUTES.MAKE_ADMIN, User_consts_1.userExtractor, BringgException_1.BringgException.serviceException(function () { return \"Could not set admin on userId: \".concat(userId); }), undefined, { userId: userId })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.attachSubscriptions = function () {\n var _this = this;\n this.subscribeToEvent(PubSubEvents_1.DELETE_EMPLOYEE, function (user) {\n _this.store.removeFromStore(user.user_id);\n });\n this.subscribeToEvent(PubSubEvents_1.EMPLOYEE_UPDATE_EVENT, function (user) {\n _this.store.updateInStore(user);\n });\n this.subscribeToEvent(PubSubEvents_1.NEW_EMPLOYEE, function (user) {\n _this.store.addToStore(user);\n });\n };\n return UsersService;\n}(PubSubService_1.PubSubService));\nexports.default = UsersService;\n//# sourceMappingURL=UsersService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/User/Service/UsersService.js?");
|
|
2868
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar PubSubService_1 = __webpack_require__(/*! ../../Services/PubSubService */ \"./dist/Services/PubSubService.js\");\nvar BringgException_1 = __webpack_require__(/*! ../../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Route_1 = __webpack_require__(/*! ../../Services/Route */ \"./dist/Services/Route.js\");\nvar User_consts_1 = __webpack_require__(/*! ../User.consts */ \"./dist/User/User.consts.js\");\nvar PubSubEvents_1 = __webpack_require__(/*! ../../Services/PubSubEvents */ \"./dist/Services/PubSubEvents.js\");\nvar keyset_pagination_consts_1 = __webpack_require__(/*! ../../utils/consts/keyset-pagination.consts */ \"./dist/utils/consts/keyset-pagination.consts.js\");\nvar lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar ROUTES = {\n GET: new Route_1.Route('/users/{:userId}', 0 /* HttpMethod.GET */),\n GET_ALL: new Route_1.Route('/users/', 0 /* HttpMethod.GET */),\n GET_ALL_DRIVERS: new Route_1.Route('/users/drivers', 0 /* HttpMethod.GET */),\n GET_USERS_WITH_USER_TYPE: new Route_1.Route('/user_types/{:userTypeId}/users', 0 /* HttpMethod.GET */),\n GET_DRIVERS_BY_TEAM: new Route_1.Route('/teams/{:teamId}/users', 0 /* HttpMethod.GET */),\n MAKE_ADMIN: new Route_1.Route('/users/{:userId}/admin', 1 /* HttpMethod.POST */),\n CREATE_USER: new Route_1.Route('/users/', 1 /* HttpMethod.POST */),\n INVITE: new Route_1.Route('/users/{:userId}/reinvite', 1 /* HttpMethod.POST */),\n TOTAL_TASKS: new Route_1.Route('/users/{:userId}/tasks/count', 0 /* HttpMethod.GET */),\n TOTAL_EMPLOYEES: new Route_1.Route('/users/count', 0 /* HttpMethod.GET */),\n TOTAL_DRIVERS: new Route_1.Route('/users/drivers/count', 0 /* HttpMethod.GET */),\n UNLOCK: new Route_1.Route('/users/{:userId}/unlock', 1 /* HttpMethod.POST */),\n INVITE_VIA_EMAIL: new Route_1.Route('/users/{:userId}/reinvite_via_email', 1 /* HttpMethod.POST */),\n VALIDATE_PHONE: new Route_1.Route('/api/user/validate_phone', 0 /* HttpMethod.GET */),\n CLOSED_TASKS: new Route_1.Route('/users/{:userId}/tasks/closed_tasks', 0 /* HttpMethod.GET */),\n UPDATE: new Route_1.Route('/users/{:id}', 3 /* HttpMethod.PATCH */),\n DELETE: new Route_1.Route('/users/{:id}', 4 /* HttpMethod.DELETE */),\n GET_PROFILE_IMAGE: new Route_1.Route('/users/{:userId}/profile_image', 0 /* HttpMethod.GET */),\n MESSAGE_DRIVER: new Route_1.Route('/announcement/user/{:userId}', 2 /* HttpMethod.PUT */)\n};\nvar UsersService = /** @class */ (function (_super) {\n __extends(UsersService, _super);\n function UsersService(session, store) {\n var _this = _super.call(this, session.config.getApiEndpoint(), session) || this;\n _this.store = store;\n return _this;\n }\n UsersService.prototype.create = function (user) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.CREATE_USER,\n extractor: User_consts_1.userExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not create user'),\n payload: user\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getDriversByTeam = function (teamId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_DRIVERS_BY_TEAM,\n extractor: User_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get drivers'),\n routeParams: { teamId: teamId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.get = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET,\n extractor: User_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get user \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getAll = function (page, limit) {\n if (page === void 0) { page = 1; }\n if (limit === void 0) { limit = 50; }\n return __awaiter(this, void 0, void 0, function () {\n var response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_ALL,\n extractor: function (response) { return ({ has_next_page: response.has_next_page, users: response.users }); },\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get users'),\n queryString: { page: page, limit: limit }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.getAllKeysetPagination = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor;\n return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_ALL,\n extractor: function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); },\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get users'),\n queryString: { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, limit: limit, page_action: page_action, cursor: cursor }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.invite = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.INVITE,\n extractor: User_consts_1.userExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not invite user with id: \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.unlock = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.UNLOCK,\n extractor: User_consts_1.successExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not unlock user with id: \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.assignedTasksCount = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.TOTAL_TASKS,\n extractor: User_consts_1.countExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get task count for user with id: \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.totalEmployeesCount = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.TOTAL_EMPLOYEES,\n extractor: User_consts_1.countExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get total employee count\"; })\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.totalDriversCount = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.TOTAL_DRIVERS,\n extractor: User_consts_1.countExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get total drivers count\"; })\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.inviteByEmail = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.INVITE_VIA_EMAIL,\n extractor: User_consts_1.userExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not invite user with id: \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.validatePhone = function (phone) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.VALIDATE_PHONE,\n extractor: function (response) { return response.phone_valid; },\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Phone is not valid: \".concat(phone); }),\n queryString: { phone: phone }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.closedTasks = function (userId, page) {\n if (page === void 0) { page = 0; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.CLOSED_TASKS,\n extractor: User_consts_1.defaultExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get tasks for user: \".concat(userId); }),\n routeParams: { userId: userId },\n queryString: { page: page }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.update = function (id, userDelta) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.UPDATE,\n extractor: User_consts_1.userExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not update user: \".concat(id); }),\n payload: __assign({ id: id }, userDelta),\n routeParams: { id: id }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.getAllAdminsAndDispatchers = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, scopes, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor;\n scopes = [User_consts_1.UsersScopes.DISPATCHERS, User_consts_1.UsersScopes.ADMINS];\n return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_ALL,\n extractor: function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); },\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get admins and dispatchers'),\n queryString: { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, scopes: scopes, limit: limit, page_action: page_action, cursor: cursor }\n })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response];\n }\n });\n });\n };\n UsersService.prototype.getAllDrivers = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n var limit, page_action, cursor, options, scopes;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n limit = request.limit, page_action = request.page_action, cursor = request.cursor, options = request.options;\n scopes = [];\n if ((0, lodash_1.get)(options, 'onlyCustomers')) {\n scopes.push(User_consts_1.UsersScopes.CUSTOMERS);\n }\n else {\n scopes.push(User_consts_1.UsersScopes.DRIVERS);\n }\n if (options.onlyOnlineDriver) {\n scopes.push(User_consts_1.UsersScopes.MARKED_AS_ONLINE);\n }\n return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_ALL,\n extractor: function (response) { return ({\n next_page_cursor: response.next_page_cursor,\n previous_page_cursor: response.previous_page_cursor,\n users: response.users\n }); },\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get drivers'),\n queryString: { pgver: keyset_pagination_consts_1.KEYSET_PAGINATION_VER, scopes: scopes, limit: limit, page_action: page_action, cursor: cursor }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n var result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.DELETE,\n extractor: User_consts_1.successExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not delete user: \".concat(id); }),\n routeParams: { id: id }\n })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result];\n }\n });\n });\n };\n UsersService.prototype.getProfileImage = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_PROFILE_IMAGE,\n extractor: function (response) { return response.profile_image; },\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not get user's \".concat(userId, \" profile image\"); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.messageDriver = function (userId, message) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.MESSAGE_DRIVER,\n extractor: function (response) { return response.announcement_id; },\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not message to user \".concat(userId); }),\n payload: { user_id: userId, message: message },\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.byUserType = function (userTypeId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.GET_USERS_WITH_USER_TYPE,\n extractor: User_consts_1.usersExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException('Could not get users'),\n routeParams: { userTypeId: userTypeId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.makeAdmin = function (userId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.handleAuthorizedRequest({\n route: ROUTES.MAKE_ADMIN,\n extractor: User_consts_1.userExtractor,\n exceptionProducer: BringgException_1.BringgException.serviceException(function () { return \"Could not set admin on userId: \".concat(userId); }),\n routeParams: { userId: userId }\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n UsersService.prototype.attachSubscriptions = function () {\n var _this = this;\n this.subscribeToEvent(PubSubEvents_1.DELETE_EMPLOYEE, function (user) {\n _this.store.removeFromStore(user.user_id);\n });\n this.subscribeToEvent(PubSubEvents_1.EMPLOYEE_UPDATE_EVENT, function (user) {\n _this.store.updateInStore(user);\n });\n this.subscribeToEvent(PubSubEvents_1.NEW_EMPLOYEE, function (user) {\n _this.store.addToStore(user);\n });\n };\n return UsersService;\n}(PubSubService_1.PubSubService));\nexports.default = UsersService;\n//# sourceMappingURL=UsersService.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/User/Service/UsersService.js?");
|
|
2869
2869
|
|
|
2870
2870
|
/***/ }),
|
|
2871
2871
|
|
|
@@ -3177,7 +3177,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar We
|
|
|
3177
3177
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3178
3178
|
|
|
3179
3179
|
"use strict";
|
|
3180
|
-
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nvar entityName = 'rule-service/workflow';\nvar baseRoute = \"/\".concat(entityName);\nvar WorkflowEntity = /** @class */ (function (_super) {\n __extends(WorkflowEntity, _super);\n function WorkflowEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: entityName,\n routes: [Entity_1.BaseRoutes.Patch, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Update]\n }) || this;\n }\n WorkflowEntity.prototype.duplicate = function (workflowId) {\n return this.service.routeGenerator\n .post(\"\".concat(baseRoute, \"/{:id}/duplicate\"))\n .withRouteParams({ id: workflowId })\n .setException(\"failed to duplicate workflow \".concat(workflowId))\n .invoke();\n };\n WorkflowEntity.prototype.getTemplates = function () {\n return this.service.routeGenerator\n .get(\"\".concat(baseRoute, \"/templates\"))\n .setException(\"failed to get workflow templates\")\n .invoke();\n };\n return WorkflowEntity;\n}(Entity_1.default));\nexports.default = WorkflowEntity;\n//# sourceMappingURL=WorkflowEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/Entity/WorkflowEntity.js?");
|
|
3180
|
+
eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nvar entityName = 'rule-service/workflow';\nvar baseRoute = \"/\".concat(entityName);\nvar WorkflowEntity = /** @class */ (function (_super) {\n __extends(WorkflowEntity, _super);\n function WorkflowEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: entityName,\n routes: [Entity_1.BaseRoutes.Patch, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Update]\n }) || this;\n }\n WorkflowEntity.prototype.duplicate = function (workflowId, commonOptions) {\n return this.service.routeGenerator\n .post(\"\".concat(baseRoute, \"/{:id}/duplicate\"))\n .withRouteParams({ id: workflowId })\n .setException(\"failed to duplicate workflow \".concat(workflowId))\n .withCommonOptions(commonOptions)\n .invoke();\n };\n WorkflowEntity.prototype.getTemplates = function (commonOptions) {\n return this.service.routeGenerator\n .get(\"\".concat(baseRoute, \"/templates\"))\n .setException(\"failed to get workflow templates\")\n .withCommonOptions(commonOptions)\n .invoke();\n };\n return WorkflowEntity;\n}(Entity_1.default));\nexports.default = WorkflowEntity;\n//# sourceMappingURL=WorkflowEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/Entity/WorkflowEntity.js?");
|
|
3181
3181
|
|
|
3182
3182
|
/***/ }),
|
|
3183
3183
|
|
|
@@ -3203,7 +3203,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
3203
3203
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3204
3204
|
|
|
3205
3205
|
"use strict";
|
|
3206
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar data_store_1 = __webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\");\nvar storable_data_service_1 = __webpack_require__(/*! ../../storable-data-service */ \"./dist/storable-data-service.js\");\nvar workflows_service_1 = __webpack_require__(/*! ./workflows-service */ \"./dist/Workflow/v2/workflows-service.js\");\nvar storable_api_builder_1 = __webpack_require__(/*! ../../storable-api-builder */ \"./dist/storable-api-builder.js\");\nvar WorkflowsApi = /** @class */ (function () {\n function WorkflowsApi(session, mapper) {\n this.workflowStore = new data_store_1.default();\n this.workflowsService = new workflows_service_1.default(session);\n this.storableDataService = new storable_data_service_1.default(this.workflowStore, mapper);\n Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.workflowsService, {\n modify: ['update', 'create', 'patch', 'duplicate'],\n delete: ['delete'],\n loadAll: ['loadAll']\n }));\n }\n WorkflowsApi.prototype.get = function (id) {\n return this.workflowStore.get(id);\n };\n WorkflowsApi.prototype.getAll = function () {\n return this.workflowStore.getAll();\n };\n WorkflowsApi.prototype.getTemplates = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.workflowsService.getTemplates()];\n });\n });\n };\n return WorkflowsApi;\n}());\nexports.default = WorkflowsApi;\n//# sourceMappingURL=workflows-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/v2/workflows-api.js?");
|
|
3206
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar data_store_1 = __webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\");\nvar storable_data_service_1 = __webpack_require__(/*! ../../storable-data-service */ \"./dist/storable-data-service.js\");\nvar workflows_service_1 = __webpack_require__(/*! ./workflows-service */ \"./dist/Workflow/v2/workflows-service.js\");\nvar storable_api_builder_1 = __webpack_require__(/*! ../../storable-api-builder */ \"./dist/storable-api-builder.js\");\nvar WorkflowsApi = /** @class */ (function () {\n function WorkflowsApi(session, mapper) {\n this.workflowStore = new data_store_1.default();\n this.workflowsService = new workflows_service_1.default(session);\n this.storableDataService = new storable_data_service_1.default(this.workflowStore, mapper);\n Object.assign(this, storable_api_builder_1.default.build(this.storableDataService, this.workflowsService, {\n modify: ['update', 'create', 'patch', 'duplicate'],\n delete: ['delete'],\n loadAll: ['loadAll']\n }));\n }\n WorkflowsApi.prototype.get = function (id) {\n return this.workflowStore.get(id);\n };\n WorkflowsApi.prototype.getAll = function () {\n return this.workflowStore.getAll();\n };\n WorkflowsApi.prototype.getTemplates = function (commonOption) {\n if (commonOption === void 0) { commonOption = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.workflowsService.getTemplates(commonOption)];\n });\n });\n };\n return WorkflowsApi;\n}());\nexports.default = WorkflowsApi;\n//# sourceMappingURL=workflows-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/v2/workflows-api.js?");
|
|
3207
3207
|
|
|
3208
3208
|
/***/ }),
|
|
3209
3209
|
|
|
@@ -3216,7 +3216,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
3216
3216
|
/***/ (function(module, exports, __webpack_require__) {
|
|
3217
3217
|
|
|
3218
3218
|
"use strict";
|
|
3219
|
-
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CrudService_1 = __webpack_require__(/*! ../../Core/CrudService */ \"./dist/Core/CrudService.js\");\nvar entityName = 'rule-service/workflow';\nvar baseRoute = \"/\".concat(entityName);\nvar WorkflowsService = /** @class */ (function () {\n function WorkflowsService(session) {\n this.service = new CrudService_1.default(session, entityName);\n }\n WorkflowsService.prototype.loadAll = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.getAll()];\n });\n });\n };\n WorkflowsService.prototype.delete = function (id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.delete(id)];\n });\n });\n };\n WorkflowsService.prototype.update = function (id, workflow) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.update(id, workflow)];\n });\n });\n };\n WorkflowsService.prototype.patch = function (id, workflow) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.patch(id, workflow)];\n });\n });\n };\n WorkflowsService.prototype.create = function (workflow) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.create(workflow)];\n });\n });\n };\n WorkflowsService.prototype.duplicate = function (workflowId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .post(\"\".concat(baseRoute, \"/{:id}/duplicate\"))\n .withRouteParams({ id: workflowId })\n .setException(\"failed to duplicate workflow \".concat(workflowId))\n .invoke()];\n });\n });\n };\n WorkflowsService.prototype.getTemplates = function () {\n return this.service.routeGenerator\n .get(\"\".concat(baseRoute, \"/templates\"))\n .setException(\"failed to get workflow templates\")\n .invoke();\n };\n return WorkflowsService;\n}());\nexports.default = WorkflowsService;\n//# sourceMappingURL=workflows-service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/v2/workflows-service.js?");
|
|
3219
|
+
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CrudService_1 = __webpack_require__(/*! ../../Core/CrudService */ \"./dist/Core/CrudService.js\");\nvar entityName = 'rule-service/workflow';\nvar baseRoute = \"/\".concat(entityName);\nvar WorkflowsService = /** @class */ (function () {\n function WorkflowsService(session) {\n this.service = new CrudService_1.default(session, entityName);\n }\n WorkflowsService.prototype.loadAll = function (commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.getAll(undefined, commonOptions)];\n });\n });\n };\n WorkflowsService.prototype.delete = function (id, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.delete(id, undefined, commonOptions)];\n });\n });\n };\n WorkflowsService.prototype.update = function (id, workflow, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.update(id, workflow, commonOptions)];\n });\n });\n };\n WorkflowsService.prototype.patch = function (id, workflow, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.patch(id, workflow, commonOptions)];\n });\n });\n };\n WorkflowsService.prototype.create = function (workflow, commonOptions) {\n if (commonOptions === void 0) { commonOptions = {}; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.create(workflow, commonOptions)];\n });\n });\n };\n WorkflowsService.prototype.duplicate = function (workflowId, commonOptions) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.service.routeGenerator\n .post(\"\".concat(baseRoute, \"/{:id}/duplicate\"))\n .withRouteParams({ id: workflowId })\n .setException(\"failed to duplicate workflow \".concat(workflowId))\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n WorkflowsService.prototype.getTemplates = function (commonOptions) {\n return this.service.routeGenerator\n .get(\"\".concat(baseRoute, \"/templates\"))\n .setException(\"failed to get workflow templates\")\n .withCommonOptions(commonOptions)\n .invoke();\n };\n return WorkflowsService;\n}());\nexports.default = WorkflowsService;\n//# sourceMappingURL=workflows-service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Workflow/v2/workflows-service.js?");
|
|
3220
3220
|
|
|
3221
3221
|
/***/ }),
|
|
3222
3222
|
|
|
@@ -5126,7 +5126,7 @@ eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"./node_modules/a
|
|
|
5126
5126
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5127
5127
|
|
|
5128
5128
|
"use strict";
|
|
5129
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"./node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n
|
|
5129
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"./node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"./node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"./node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"./node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"./node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"./node_modules/axios/lib/core/createError.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar Cancel = __webpack_require__(/*! ../cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || defaults.transitional;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/adapters/xhr.js?");
|
|
5130
5130
|
|
|
5131
5131
|
/***/ }),
|
|
5132
5132
|
|
|
@@ -5139,7 +5139,7 @@ eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axi
|
|
|
5139
5139
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5140
5140
|
|
|
5141
5141
|
"use strict";
|
|
5142
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n//
|
|
5142
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"./node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"./node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\naxios.VERSION = __webpack_require__(/*! ./env/data */ \"./node_modules/axios/lib/env/data.js\").version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"./node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"./node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/axios.js?");
|
|
5143
5143
|
|
|
5144
5144
|
/***/ }),
|
|
5145
5145
|
|
|
@@ -5165,7 +5165,7 @@ eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is ca
|
|
|
5165
5165
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5166
5166
|
|
|
5167
5167
|
"use strict";
|
|
5168
|
-
eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/cancel/CancelToken.js?");
|
|
5168
|
+
eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/cancel/CancelToken.js?");
|
|
5169
5169
|
|
|
5170
5170
|
/***/ }),
|
|
5171
5171
|
|
|
@@ -5191,7 +5191,7 @@ eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && valu
|
|
|
5191
5191
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5192
5192
|
|
|
5193
5193
|
"use strict";
|
|
5194
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n //
|
|
5194
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"./node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"./node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"./node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"./node_modules/axios/lib/core/mergeConfig.js\");\nvar validator = __webpack_require__(/*! ../helpers/validator */ \"./node_modules/axios/lib/helpers/validator.js\");\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/Axios.js?");
|
|
5195
5195
|
|
|
5196
5196
|
/***/ }),
|
|
5197
5197
|
|
|
@@ -5204,7 +5204,7 @@ eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axi
|
|
|
5204
5204
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5205
5205
|
|
|
5206
5206
|
"use strict";
|
|
5207
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/InterceptorManager.js?");
|
|
5207
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/InterceptorManager.js?");
|
|
5208
5208
|
|
|
5209
5209
|
/***/ }),
|
|
5210
5210
|
|
|
@@ -5243,7 +5243,7 @@ eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"./node_
|
|
|
5243
5243
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5244
5244
|
|
|
5245
5245
|
"use strict";
|
|
5246
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/dispatchRequest.js?");
|
|
5246
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"./node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"./node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"./node_modules/axios/lib/defaults.js\");\nvar Cancel = __webpack_require__(/*! ../cancel/Cancel */ \"./node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/dispatchRequest.js?");
|
|
5247
5247
|
|
|
5248
5248
|
/***/ }),
|
|
5249
5249
|
|
|
@@ -5256,7 +5256,7 @@ eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axi
|
|
|
5256
5256
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5257
5257
|
|
|
5258
5258
|
"use strict";
|
|
5259
|
-
eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/enhanceError.js?");
|
|
5259
|
+
eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/enhanceError.js?");
|
|
5260
5260
|
|
|
5261
5261
|
/***/ }),
|
|
5262
5262
|
|
|
@@ -5269,7 +5269,7 @@ eval("\n\n/**\n * Update an Error with the specified config, error code, and res
|
|
|
5269
5269
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5270
5270
|
|
|
5271
5271
|
"use strict";
|
|
5272
|
-
eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n
|
|
5272
|
+
eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/mergeConfig.js?");
|
|
5273
5273
|
|
|
5274
5274
|
/***/ }),
|
|
5275
5275
|
|
|
@@ -5295,7 +5295,7 @@ eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"./node_mo
|
|
|
5295
5295
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5296
5296
|
|
|
5297
5297
|
"use strict";
|
|
5298
|
-
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/transformData.js?");
|
|
5298
|
+
eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axios/lib/utils.js\");\nvar defaults = __webpack_require__(/*! ./../defaults */ \"./node_modules/axios/lib/defaults.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/core/transformData.js?");
|
|
5299
5299
|
|
|
5300
5300
|
/***/ }),
|
|
5301
5301
|
|
|
@@ -5308,7 +5308,19 @@ eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"./node_modules/axi
|
|
|
5308
5308
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5309
5309
|
|
|
5310
5310
|
"use strict";
|
|
5311
|
-
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json
|
|
5311
|
+
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"./node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"./node_modules/axios/lib/helpers/normalizeHeaderName.js\");\nvar enhanceError = __webpack_require__(/*! ./core/enhanceError */ \"./node_modules/axios/lib/core/enhanceError.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"./node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"./node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/defaults.js?");
|
|
5312
|
+
|
|
5313
|
+
/***/ }),
|
|
5314
|
+
|
|
5315
|
+
/***/ "./node_modules/axios/lib/env/data.js":
|
|
5316
|
+
/*!********************************************!*\
|
|
5317
|
+
!*** ./node_modules/axios/lib/env/data.js ***!
|
|
5318
|
+
\********************************************/
|
|
5319
|
+
/*! no static exports found */
|
|
5320
|
+
/*! all exports used */
|
|
5321
|
+
/***/ (function(module, exports) {
|
|
5322
|
+
|
|
5323
|
+
eval("module.exports = {\n \"version\": \"0.24.0\"\n};\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/env/data.js?");
|
|
5312
5324
|
|
|
5313
5325
|
/***/ }),
|
|
5314
5326
|
|
|
@@ -5442,6 +5454,19 @@ eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array
|
|
|
5442
5454
|
|
|
5443
5455
|
/***/ }),
|
|
5444
5456
|
|
|
5457
|
+
/***/ "./node_modules/axios/lib/helpers/validator.js":
|
|
5458
|
+
/*!*****************************************************!*\
|
|
5459
|
+
!*** ./node_modules/axios/lib/helpers/validator.js ***!
|
|
5460
|
+
\*****************************************************/
|
|
5461
|
+
/*! no static exports found */
|
|
5462
|
+
/*! all exports used */
|
|
5463
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5464
|
+
|
|
5465
|
+
"use strict";
|
|
5466
|
+
eval("\n\nvar VERSION = __webpack_require__(/*! ../env/data */ \"./node_modules/axios/lib/env/data.js\").version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/helpers/validator.js?");
|
|
5467
|
+
|
|
5468
|
+
/***/ }),
|
|
5469
|
+
|
|
5445
5470
|
/***/ "./node_modules/axios/lib/utils.js":
|
|
5446
5471
|
/*!*****************************************!*\
|
|
5447
5472
|
!*** ./node_modules/axios/lib/utils.js ***!
|
|
@@ -5451,7 +5476,7 @@ eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array
|
|
|
5451
5476
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5452
5477
|
|
|
5453
5478
|
"use strict";
|
|
5454
|
-
eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\n\n
|
|
5479
|
+
eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"./node_modules/axios/lib/helpers/bind.js\");\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n//# sourceURL=webpack://BringgDashboardSDK/./node_modules/axios/lib/utils.js?");
|
|
5455
5480
|
|
|
5456
5481
|
/***/ }),
|
|
5457
5482
|
|