@bringg/dashboard-sdk 8.2.0-pre.0 → 8.2.0

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.
@@ -265,7 +265,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
265
265
  /***/ (function(module, exports, __webpack_require__) {
266
266
 
267
267
  "use strict";
268
- 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 ApplicationTeamConfigurationEntity_1 = __webpack_require__(/*! ./Entity/ApplicationTeamConfigurationEntity */ \"./dist/ApplicationTeamConfiguration/Entity/ApplicationTeamConfigurationEntity.js\");\nvar ApplicationTeamConfigurationApi = /** @class */ (function () {\n function ApplicationTeamConfigurationApi(session) {\n this.entity = new ApplicationTeamConfigurationEntity_1.default(session);\n }\n ApplicationTeamConfigurationApi.prototype.getConfig = function (uuid, 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.entity.getConfig(uuid, teamId)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ApplicationTeamConfigurationApi.prototype.getConfigurations = function (uuid) {\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.entity.getConfigurations(uuid)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ApplicationTeamConfigurationApi.prototype.updateConfig = function (uuid, teamId, 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.entity.updateConfig(uuid, teamId, data)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ApplicationTeamConfigurationApi.prototype.removeConfig = function (uuid, 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.entity.removeConfig(uuid, teamId)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return ApplicationTeamConfigurationApi;\n}());\nexports.default = ApplicationTeamConfigurationApi;\n//# sourceMappingURL=ApplicationTeamConfigurationApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ApplicationTeamConfiguration/ApplicationTeamConfigurationApi.js?");
268
+ 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 ApplicationTeamConfigurationEntity_1 = __webpack_require__(/*! ./Entity/ApplicationTeamConfigurationEntity */ \"./dist/ApplicationTeamConfiguration/Entity/ApplicationTeamConfigurationEntity.js\");\nvar ApplicationTeamConfigurationApi = /** @class */ (function () {\n function ApplicationTeamConfigurationApi(session) {\n this.entity = new ApplicationTeamConfigurationEntity_1.default(session);\n }\n ApplicationTeamConfigurationApi.prototype.getConfig = function (uuid, 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.entity.getConfig(uuid, teamId)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ApplicationTeamConfigurationApi.prototype.updateConfig = function (uuid, teamId, 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.entity.updateConfig(uuid, teamId, data)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n ApplicationTeamConfigurationApi.prototype.removeConfig = function (uuid, 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.entity.removeConfig(uuid, teamId)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return ApplicationTeamConfigurationApi;\n}());\nexports.default = ApplicationTeamConfigurationApi;\n//# sourceMappingURL=ApplicationTeamConfigurationApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ApplicationTeamConfiguration/ApplicationTeamConfigurationApi.js?");
269
269
 
270
270
  /***/ }),
271
271
 
@@ -278,7 +278,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
278
278
  /***/ (function(module, exports, __webpack_require__) {
279
279
 
280
280
  "use strict";
281
- 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 Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nvar ApplicationTeamConfigurationEntity = /** @class */ (function (_super) {\n __extends(ApplicationTeamConfigurationEntity, _super);\n function ApplicationTeamConfigurationEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'applications',\n routePrefix: 'team',\n routes: [Entity_1.BaseRoutes.Get, Entity_1.BaseRoutes.Update, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.Create]\n }) || this;\n }\n ApplicationTeamConfigurationEntity.prototype.getConfig = function (uuid, 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.service.get(uuid, { teamId: teamId })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response && response.config];\n }\n });\n });\n };\n ApplicationTeamConfigurationEntity.prototype.getConfigurations = function (uuid) {\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.service.get(uuid)];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response && response.configurations];\n }\n });\n });\n };\n ApplicationTeamConfigurationEntity.prototype.updateConfig = function (uuid, teamId, data) {\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.service.update(uuid, { data: data, teamId: teamId })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result.success];\n }\n });\n });\n };\n ApplicationTeamConfigurationEntity.prototype.removeConfig = function (uuid, teamId) {\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.service.delete(uuid, { teamId: teamId })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result.success];\n }\n });\n });\n };\n return ApplicationTeamConfigurationEntity;\n}(Entity_1.default));\nexports.default = ApplicationTeamConfigurationEntity;\n//# sourceMappingURL=ApplicationTeamConfigurationEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ApplicationTeamConfiguration/Entity/ApplicationTeamConfigurationEntity.js?");
281
+ 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 Entity_1 = __webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\");\nvar ApplicationTeamConfigurationEntity = /** @class */ (function (_super) {\n __extends(ApplicationTeamConfigurationEntity, _super);\n function ApplicationTeamConfigurationEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'applications',\n routePrefix: 'team',\n routes: [Entity_1.BaseRoutes.Get, Entity_1.BaseRoutes.Update, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.Create]\n }) || this;\n }\n ApplicationTeamConfigurationEntity.prototype.getConfig = function (uuid, 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.service.get(uuid, { teamId: teamId })];\n case 1:\n response = _a.sent();\n return [2 /*return*/, response && response.config];\n }\n });\n });\n };\n ApplicationTeamConfigurationEntity.prototype.updateConfig = function (uuid, teamId, data) {\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.service.update(uuid, { data: data, teamId: teamId })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result.success];\n }\n });\n });\n };\n ApplicationTeamConfigurationEntity.prototype.removeConfig = function (uuid, teamId) {\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.service.delete(uuid, { teamId: teamId })];\n case 1:\n result = _a.sent();\n return [2 /*return*/, result.success];\n }\n });\n });\n };\n return ApplicationTeamConfigurationEntity;\n}(Entity_1.default));\nexports.default = ApplicationTeamConfigurationEntity;\n//# sourceMappingURL=ApplicationTeamConfigurationEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/ApplicationTeamConfiguration/Entity/ApplicationTeamConfigurationEntity.js?");
282
282
 
283
283
  /***/ }),
284
284
 
@@ -1565,7 +1565,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
1565
1565
  /***/ (function(module, exports, __webpack_require__) {
1566
1566
 
1567
1567
  "use strict";
1568
- eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MerchantConfigurationKeys = void 0;\nexports.MerchantConfigurationKeys = [\n 'allow_share_location',\n 'acknowledge_flow_ui_config',\n 'task_fields',\n 'advance_configuration_enabled',\n 'address_format',\n 'alert_configurations',\n 'alert_if_user_rated_below',\n 'alerts_types',\n 'allow_access_to_all_open_tasks',\n 'allow_customer_fb_like',\n 'allow_customer_find_me',\n 'allow_cx_customer_cancellation',\n 'allow_dispatcher_to_access_all_teams',\n 'allow_dispatcher_to_access_task_price',\n 'allow_dispatcher_to_edit_drivers',\n 'allow_moving_tasks_to_planning_phase',\n 'allow_offshift_drivers_to_be_assigned',\n 'allow_rating',\n 'allow_single_order_per_driver',\n 'alternate_delivery_pin',\n 'application_configurations',\n 'application_merchant_configurations',\n 'applications',\n 'auto_dispatch',\n 'auto_dispatch_optimization_method',\n 'auto_dispatch_timeout',\n 'auto_dispatch_timeout_per_driver',\n 'auto_share_location',\n 'average_delivery_time',\n 'avoid_commercial_roads',\n 'driver_administration_time_seconds',\n 'cancel_undone_tasks_by_eod',\n 'cash_out_flow_enabled',\n 'settlement_enabled',\n 'cash_out_template_name',\n 'consumer_app_eta_display_method',\n 'country_code',\n 'custom_drivers_page_row_colors',\n 'customer_fb_like_url',\n 'cx_cancel_event_type',\n 'dashboard_refresh_rate_secs',\n 'debrief_flow_enabled',\n 'default_estimate_duration_on_site_in_seconds',\n 'default_inventory_time_on_site_seconds',\n 'default_minutes_buffer_for_asap_orders',\n 'default_minutes_buffer_for_scheduled_orders',\n 'delivery_pin',\n 'destination_pin',\n 'distance_threshold',\n 'driver_at_home_flow_options',\n 'driver_preparation_time_seconds',\n 'email_logo',\n 'email_style_color',\n 'enable_dashboard',\n 'enable_dimension_editing_in_ui',\n 'enable_future_tasks',\n 'enable_kds',\n 'enable_looping_alert_sound',\n 'enable_map_overlays',\n 'enable_planned_routes',\n 'enable_reschedule_flow',\n 'enable_shifts_actions',\n 'enable_support',\n 'enable_task_acknowledge_flow',\n 'enable_task_cancellation',\n 'enable_task_price',\n 'enable_teams',\n 'enable_user_types',\n 'end_of_day_time',\n 'eta_background_color',\n 'eta_minutes_color',\n 'eta_time_color',\n 'eta_title_color',\n 'extra_terms_and_conditions_url',\n 'grab_future_timeout',\n 'grab_mode',\n 'grab_mode_alert_type',\n 'grab_mode_radius',\n 'grab_mode_timeout',\n 'header_color',\n 'history_fields',\n 'initial_tasks_page_size',\n 'inverse_header_color',\n 'invoice_printed_copies',\n 'language_code',\n 'lat',\n 'late_buffer',\n 'lng',\n 'logo',\n 'logout_idle_admin_minutes',\n 'logout_idle_dispatcher_minutes',\n 'looping_alert_sound_type',\n 'map_type',\n 'max_distance_for_optimization_in_meters',\n 'max_distance_from_home_to_task_km',\n 'max_distance_to_not_report',\n 'merchant_id',\n 'merchant_mode',\n 'minutes_until_first_wp_scheduled_at',\n 'name',\n 'number_of_retries_before_a_phone_call',\n 'open_tasks_filter',\n 'paid_google_maps_api',\n 'phone_call_string',\n 'planning_fields',\n 'planning_phase_exists',\n 'planning_phase_print_on_apply',\n 'planning_phase_send_emails_to_drivers_on_apply',\n 'preparation_flow_ui_config',\n 'price_currency',\n 'printer_type',\n 'qr_login_flow_options',\n 'reminder_timeout',\n 'reply_to_shared_email',\n 'run_batcher_on_grab_mode',\n 'scan_code_unique',\n 'secured_setup',\n 'send_sms_to_first_way_point',\n 'set_min_eta_by_time_window',\n 'share_if_too_close',\n 'sharing_mode',\n 'show_bringg_logo',\n 'show_eta_to_home',\n 'show_new_reports',\n 'soft_csv_import',\n 'sound_on_new_order',\n 'support_parcel_shop_last_mile',\n 'task_fields',\n 'task_alert_fields',\n 'driver_alert_fields',\n 'optimization_alert_fields',\n 'task_forwarding_enabled',\n 'task_invoice_template_name',\n 'task_window_bottom_buffer_minutes',\n 'task_window_top_buffer_minutes',\n 'tasks_page_size',\n 'the_batcher',\n 'time_to_remind_before_start_task',\n 'tip_driver_enabled',\n 'unique_external_id_rule',\n 'update_location_max_idle_time',\n 'use_coc',\n 'use_time_windows',\n 'voice_reminder_frequency',\n 'voice_reminder_text',\n 'windows',\n 'windows_mode',\n 'enable_chat',\n 'inherit_team_from_group_team',\n 'hour_format',\n 'dispatch_filter_limit',\n 'set_duplicated_order_in_planning',\n 'dynamic_capacity_values_mode',\n 'customer_verification_pin_code_flow'\n];\n//# sourceMappingURL=MerchantConfiguration.consts.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/MerchantConfiguration/MerchantConfiguration.consts.js?");
1568
+ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MerchantConfigurationKeys = void 0;\nexports.MerchantConfigurationKeys = [\n 'allow_share_location',\n 'acknowledge_flow_ui_config',\n 'task_fields',\n 'advance_configuration_enabled',\n 'address_format',\n 'alert_configurations',\n 'alert_if_user_rated_below',\n 'alerts_types',\n 'allow_access_to_all_open_tasks',\n 'allow_customer_fb_like',\n 'allow_customer_find_me',\n 'allow_cx_customer_cancellation',\n 'allow_dispatcher_to_access_all_teams',\n 'allow_dispatcher_to_access_task_price',\n 'allow_dispatcher_to_edit_drivers',\n 'allow_moving_tasks_to_planning_phase',\n 'allow_offshift_drivers_to_be_assigned',\n 'allow_rating',\n 'allow_single_order_per_driver',\n 'alternate_delivery_pin',\n 'application_configurations',\n 'application_merchant_configurations',\n 'applications',\n 'auto_dispatch',\n 'auto_dispatch_optimization_method',\n 'auto_dispatch_timeout',\n 'auto_dispatch_timeout_per_driver',\n 'auto_share_location',\n 'average_delivery_time',\n 'avoid_commercial_roads',\n 'driver_administration_time_seconds',\n 'cancel_undone_tasks_by_eod',\n 'cash_out_flow_enabled',\n 'settlement_enabled',\n 'cash_out_template_name',\n 'consumer_app_eta_display_method',\n 'country_code',\n 'custom_drivers_page_row_colors',\n 'customer_fb_like_url',\n 'cx_cancel_event_type',\n 'cx_calendar_view_for_delivery_options',\n 'dashboard_refresh_rate_secs',\n 'debrief_flow_enabled',\n 'default_estimate_duration_on_site_in_seconds',\n 'default_inventory_time_on_site_seconds',\n 'default_minutes_buffer_for_asap_orders',\n 'default_minutes_buffer_for_scheduled_orders',\n 'delivery_pin',\n 'destination_pin',\n 'distance_threshold',\n 'driver_at_home_flow_options',\n 'driver_preparation_time_seconds',\n 'email_logo',\n 'email_style_color',\n 'enable_dashboard',\n 'enable_dimension_editing_in_ui',\n 'enable_future_tasks',\n 'enable_kds',\n 'enable_looping_alert_sound',\n 'enable_map_overlays',\n 'enable_planned_routes',\n 'enable_reschedule_flow',\n 'enable_shifts_actions',\n 'enable_support',\n 'enable_task_acknowledge_flow',\n 'enable_task_cancellation',\n 'enable_task_price',\n 'enable_teams',\n 'enable_user_types',\n 'end_of_day_time',\n 'eta_background_color',\n 'eta_minutes_color',\n 'eta_time_color',\n 'eta_title_color',\n 'extra_terms_and_conditions_url',\n 'grab_future_timeout',\n 'grab_mode',\n 'grab_mode_alert_type',\n 'grab_mode_radius',\n 'grab_mode_timeout',\n 'header_color',\n 'history_fields',\n 'initial_tasks_page_size',\n 'inverse_header_color',\n 'invoice_printed_copies',\n 'language_code',\n 'lat',\n 'late_buffer',\n 'lng',\n 'logo',\n 'logout_idle_admin_minutes',\n 'logout_idle_dispatcher_minutes',\n 'looping_alert_sound_type',\n 'map_type',\n 'max_distance_for_optimization_in_meters',\n 'max_distance_from_home_to_task_km',\n 'max_distance_to_not_report',\n 'merchant_id',\n 'merchant_mode',\n 'minutes_until_first_wp_scheduled_at',\n 'name',\n 'number_of_retries_before_a_phone_call',\n 'open_tasks_filter',\n 'paid_google_maps_api',\n 'phone_call_string',\n 'planning_fields',\n 'planning_phase_exists',\n 'planning_phase_print_on_apply',\n 'planning_phase_send_emails_to_drivers_on_apply',\n 'preparation_flow_ui_config',\n 'price_currency',\n 'printer_type',\n 'qr_login_flow_options',\n 'reminder_timeout',\n 'reply_to_shared_email',\n 'run_batcher_on_grab_mode',\n 'scan_code_unique',\n 'secured_setup',\n 'send_sms_to_first_way_point',\n 'set_min_eta_by_time_window',\n 'share_if_too_close',\n 'sharing_mode',\n 'show_bringg_logo',\n 'show_eta_to_home',\n 'show_new_reports',\n 'soft_csv_import',\n 'sound_on_new_order',\n 'support_parcel_shop_last_mile',\n 'task_fields',\n 'task_alert_fields',\n 'driver_alert_fields',\n 'optimization_alert_fields',\n 'task_forwarding_enabled',\n 'task_invoice_template_name',\n 'task_window_bottom_buffer_minutes',\n 'task_window_top_buffer_minutes',\n 'tasks_page_size',\n 'the_batcher',\n 'time_to_remind_before_start_task',\n 'tip_driver_enabled',\n 'unique_external_id_rule',\n 'update_location_max_idle_time',\n 'use_coc',\n 'use_time_windows',\n 'voice_reminder_frequency',\n 'voice_reminder_text',\n 'windows',\n 'windows_mode',\n 'enable_chat',\n 'inherit_team_from_group_team',\n 'hour_format',\n 'dispatch_filter_limit',\n 'set_duplicated_order_in_planning',\n 'dynamic_capacity_values_mode',\n 'customer_verification_pin_code_flow'\n];\n//# sourceMappingURL=MerchantConfiguration.consts.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/MerchantConfiguration/MerchantConfiguration.consts.js?");
1569
1569
 
1570
1570
  /***/ }),
1571
1571
 
@@ -2735,7 +2735,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexport
2735
2735
  /***/ (function(module, exports, __webpack_require__) {
2736
2736
 
2737
2737
  "use strict";
2738
- 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 lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar abort_1 = __webpack_require__(/*! ../utils/abort */ \"./dist/utils/abort.js\");\nvar version = '8.2.0-pre.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 //\n }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) {\n //\n }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) {\n //\n }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, authenticationToken, \n // eslint-disable-next-line @typescript-eslint/ban-types\n 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, signal) {\n this.axiosPromise = response;\n this.signal = signal;\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 (axios_1.default.isCancel(e_1)) {\n (0, abort_1.throwAbortError)(this.signal, 'Request Aborted');\n }\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, signal) {\n return new ResponseHandler(axiosInstance.get(\"\".concat(host).concat(uri), { params: queryString, signal: signal }), signal);\n}\nfunction post(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.post(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction put(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.put(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction patch(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.patch(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction remove(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.delete(\"\".concat(host).concat(uri), { params: queryString, data: payload, signal: signal }), signal);\n}\nfunction routify(axiosInstance, endpoint, route, \n// eslint-disable-next-line @typescript-eslint/ban-types\nrouteParams, queryString, payload, signal) {\n switch (route.httpMethod) {\n case 0 /* HttpMethod.GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, signal);\n case 1 /* HttpMethod.POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 2 /* HttpMethod.PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 3 /* HttpMethod.PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 4 /* HttpMethod.DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\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 //\n }\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 //\n }\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 //\n }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) {\n //\n }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, \n// eslint-disable-next-line @typescript-eslint/ban-types\nheaders, 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}\n// eslint-disable-next-line @typescript-eslint/ban-types\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, \n // eslint-disable-next-line @typescript-eslint/ban-types\n routeParams, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, payload, \n // eslint-disable-next-line @typescript-eslint/ban-types\n headers, responseType, timeout, signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n (0, abort_1.throwAbortError)(signal, 'Request aborted (before even started the request)');\n }\n return routify(axiosInstance(this.clientId, this.authToken, headers, responseType, timeout), endpoint, route, routeParams, queryString, payload, signal);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId, headers) {\n this.clientId = clientId;\n this.headers = headers;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, \n // eslint-disable-next-line @typescript-eslint/ban-types\n routeParams, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, payload, signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n (0, abort_1.throwAbortError)(signal, 'Request aborted (before even started the request)');\n }\n return routify(anonymousAxiosInstance(this.clientId, this.headers, 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?");
2738
+ 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 lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar BringgException_1 = __webpack_require__(/*! ../Core/BringgException */ \"./dist/Core/BringgException.js\");\nvar Logger_1 = __webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\");\nvar abort_1 = __webpack_require__(/*! ../utils/abort */ \"./dist/utils/abort.js\");\nvar version = '8.2.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 //\n }\n try {\n Logger_1.default.info(response.config.method.toUpperCase(), response.config.url, status, data);\n }\n catch (e) {\n //\n }\n try {\n Logger_1.default.debug(response);\n }\n catch (e) {\n //\n }\n}\nexports.logErrorResponse = logErrorResponse;\nvar DEFAULT_TIMEOUT = 120000;\nvar RequestOptions = /** @class */ (function () {\n function RequestOptions(clientId, timeout, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, authenticationToken, \n // eslint-disable-next-line @typescript-eslint/ban-types\n 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, signal) {\n this.axiosPromise = response;\n this.signal = signal;\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 (axios_1.default.isCancel(e_1)) {\n (0, abort_1.throwAbortError)(this.signal, 'Request Aborted');\n }\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, signal) {\n return new ResponseHandler(axiosInstance.get(\"\".concat(host).concat(uri), { params: queryString, signal: signal }), signal);\n}\nfunction post(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.post(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction put(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.put(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction patch(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.patch(\"\".concat(host).concat(uri), payload, { params: queryString, signal: signal }), signal);\n}\nfunction remove(axiosInstance, host, uri, queryString, payload, signal) {\n return new ResponseHandler(axiosInstance.delete(\"\".concat(host).concat(uri), { params: queryString, data: payload, signal: signal }), signal);\n}\nfunction routify(axiosInstance, endpoint, route, \n// eslint-disable-next-line @typescript-eslint/ban-types\nrouteParams, queryString, payload, signal) {\n switch (route.httpMethod) {\n case 0 /* HttpMethod.GET */:\n return get(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, signal);\n case 1 /* HttpMethod.POST */:\n return post(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 2 /* HttpMethod.PUT */:\n return put(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 3 /* HttpMethod.PATCH */:\n return patch(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\n case 4 /* HttpMethod.DELETE */:\n return remove(axiosInstance, endpoint.encode(), route.applyParams(routeParams), queryString, payload, signal);\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 //\n }\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 //\n }\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 //\n }\n try {\n Logger_1.default.trace('RESPONSE-headers:', headers);\n Logger_1.default.trace('RESPONSE-data:', data);\n }\n catch (e) {\n //\n }\n return res;\n });\n return axios;\n}\nfunction axiosInstance(clientId, authenticationToken, \n// eslint-disable-next-line @typescript-eslint/ban-types\nheaders, 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}\n// eslint-disable-next-line @typescript-eslint/ban-types\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, \n // eslint-disable-next-line @typescript-eslint/ban-types\n routeParams, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, payload, \n // eslint-disable-next-line @typescript-eslint/ban-types\n headers, responseType, timeout, signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n (0, abort_1.throwAbortError)(signal, 'Request aborted (before even started the request)');\n }\n return routify(axiosInstance(this.clientId, this.authToken, headers, responseType, timeout), endpoint, route, routeParams, queryString, payload, signal);\n };\n return AuthorizedServiceRequest;\n}());\nexports.AuthorizedServiceRequest = AuthorizedServiceRequest;\nvar AnonymousServiceRequest = /** @class */ (function () {\n function AnonymousServiceRequest(clientId, headers) {\n this.clientId = clientId;\n this.headers = headers;\n }\n AnonymousServiceRequest.prototype.invoke = function (endpoint, route, \n // eslint-disable-next-line @typescript-eslint/ban-types\n routeParams, \n // eslint-disable-next-line @typescript-eslint/ban-types\n queryString, payload, signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n (0, abort_1.throwAbortError)(signal, 'Request aborted (before even started the request)');\n }\n return routify(anonymousAxiosInstance(this.clientId, this.headers, 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?");
2739
2739
 
2740
2740
  /***/ }),
2741
2741