@bringg/dashboard-sdk 9.42.0-pre → 9.42.1
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/AnalyticsReports/AnalyticsReportsApi.d.ts +6 -33
- package/dist/AnalyticsReports/AnalyticsReportsApi.js +12 -65
- package/dist/AnalyticsReports/AnalyticsReportsApi.js.map +1 -1
- package/dist/AnalyticsReports/Entity/AnalyticsReportsEntity.d.ts +6 -33
- package/dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js +23 -174
- package/dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js.map +1 -1
- package/dist/Customer/v2/customers-api.js +1 -3
- package/dist/Customer/v2/customers-api.js.map +1 -1
- package/dist/Relay/Relay.consts.d.ts +1 -1
- package/dist/Relay/Relay.consts.js +1 -1
- package/dist/Relay/Relay.consts.js.map +1 -1
- package/dist/Relay/RelayApi.d.ts +2 -1
- package/dist/Relay/RelayApi.js +7 -0
- package/dist/Relay/RelayApi.js.map +1 -1
- package/dist/Relay/Service/Relay.service.d.ts +2 -1
- package/dist/Relay/Service/Relay.service.js +12 -1
- package/dist/Relay/Service/Relay.service.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +57 -245
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +7 -7
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -83,7 +83,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
|
|
|
83
83
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
84
84
|
|
|
85
85
|
"use strict";
|
|
86
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar AnalyticsReportsEntity_1 = __importDefault(__webpack_require__(/*! ./Entity/AnalyticsReportsEntity */ \"./dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js\"));\nvar AnalyticsReportsApi = /** @class */ (function () {\n function AnalyticsReportsApi(session) {\n this.analyticsReportsEntity = new AnalyticsReportsEntity_1.default(session);\n }\n AnalyticsReportsApi.prototype.getReport = function (reportId) {\n return this.analyticsReportsEntity.getReport(reportId);\n };\n AnalyticsReportsApi.prototype.
|
|
86
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar AnalyticsReportsEntity_1 = __importDefault(__webpack_require__(/*! ./Entity/AnalyticsReportsEntity */ \"./dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js\"));\nvar AnalyticsReportsApi = /** @class */ (function () {\n function AnalyticsReportsApi(session) {\n this.analyticsReportsEntity = new AnalyticsReportsEntity_1.default(session);\n }\n AnalyticsReportsApi.prototype.getReport = function (reportId) {\n return this.analyticsReportsEntity.getReport(reportId);\n };\n AnalyticsReportsApi.prototype.deleteReport = function (reportId) {\n return this.analyticsReportsEntity.deleteReport(reportId);\n };\n AnalyticsReportsApi.prototype.getUserReports = function (queryString) {\n return this.analyticsReportsEntity.getUserReports(queryString);\n };\n AnalyticsReportsApi.prototype.getSystemReports = function (queryString) {\n return this.analyticsReportsEntity.getSystemReports(queryString);\n };\n AnalyticsReportsApi.prototype.createReportScheduledJob = function (queryParams) {\n return this.analyticsReportsEntity.createReportScheduledJob(queryParams);\n };\n AnalyticsReportsApi.prototype.updateReportScheduledJob = function (jobId, queryParams) {\n return this.analyticsReportsEntity.updateReportScheduledJob(jobId, queryParams);\n };\n AnalyticsReportsApi.prototype.getReportScheduledJob = function (jobId) {\n return this.analyticsReportsEntity.getReportScheduledJob(jobId);\n };\n AnalyticsReportsApi.prototype.deleteReportScheduledJob = function (jobId) {\n return this.analyticsReportsEntity.deleteReportScheduledJob(jobId);\n };\n AnalyticsReportsApi.prototype.isWebhookUsedInScheduledJobs = function (webhookUuid) {\n return this.analyticsReportsEntity.isWebhookUsedInScheduledJobs(webhookUuid);\n };\n AnalyticsReportsApi.prototype.getApiLink = function () {\n return this.analyticsReportsEntity.getApiLink();\n };\n AnalyticsReportsApi.prototype.getActiveReportExecutions = function () {\n return this.analyticsReportsEntity.getActiveReportExecutions();\n };\n AnalyticsReportsApi.prototype.exportReport = function (reportId, queryParams) {\n return this.analyticsReportsEntity.exportReport(reportId, queryParams);\n };\n AnalyticsReportsApi.prototype.downloadReport = function (reportId, queryParams) {\n return this.analyticsReportsEntity.downloadReport(reportId, queryParams);\n };\n AnalyticsReportsApi.prototype.retryReportExecution = function (executionId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.analyticsReportsEntity.retryReportExecutions(executionId)];\n });\n });\n };\n AnalyticsReportsApi.prototype.removeReportExecution = function (executionId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.analyticsReportsEntity.removeReportExecutions(executionId)];\n });\n });\n };\n AnalyticsReportsApi.prototype.subscribeReportExecutions = function (handler) {\n this.analyticsReportsEntity.subscribeReportExecutions(handler);\n };\n AnalyticsReportsApi.prototype.unsubscribeReportExecutions = function () {\n this.analyticsReportsEntity.unsubscribeReportExecutions();\n };\n AnalyticsReportsApi.prototype.createReport = function (report) {\n return this.analyticsReportsEntity.createReport(report);\n };\n AnalyticsReportsApi.prototype.updateReport = function (reportId, report) {\n return this.analyticsReportsEntity.updateReport(reportId, report);\n };\n AnalyticsReportsApi.prototype.getReportRowsCount = function (queryJson, timezone) {\n return this.analyticsReportsEntity.getReportRowsCount(queryJson, timezone);\n };\n AnalyticsReportsApi.prototype.optOutReport = function (reportId) {\n return this.analyticsReportsEntity.optOutReport(reportId);\n };\n return AnalyticsReportsApi;\n}());\nexports[\"default\"] = AnalyticsReportsApi;\n//# sourceMappingURL=AnalyticsReportsApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/AnalyticsReports/AnalyticsReportsApi.js?");
|
|
87
87
|
|
|
88
88
|
/***/ }),
|
|
89
89
|
|
|
@@ -94,7 +94,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
94
94
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
95
95
|
|
|
96
96
|
"use strict";
|
|
97
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar Entity_1 = __importDefault(__webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\"));\nvar PubSubEvents_1 = __webpack_require__(/*! ../../Services/PubSubEvents */ \"./dist/Services/PubSubEvents.js\");\nvar Version;\n(function (Version) {\n Version[\"v1\"] = \"v1\";\n})(Version || (Version = {}));\nvar BaseRoute = '/analytics-service';\nvar createRoute = function (route, version) {\n if (version === void 0) { version = Version.v1; }\n return \"\".concat(BaseRoute, \"/\").concat(version).concat(route);\n};\nvar DeprecatedRoutes = {\n CREATE_REPORT: createRoute('/reports'),\n UPDATE_REPORT: createRoute('/reports/{:reportId}'),\n DELETE_REPORT: createRoute('/reports/{:reportId}'),\n START_EXPORT_REPORT: createRoute('/reports/{:reportId}/start-export'),\n START_DOWNLOAD_REPORT: createRoute('/reports/{:reportId}/start-download'),\n RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry')\n};\nvar Routes = {\n GET_USER_REPORTS: createRoute('/user-reports'),\n CREATE_USER_REPORT: createRoute('/user-reports'),\n UPDATE_USER_REPORT: createRoute('/user-reports/{:reportId}'),\n DELETE_USER_REPORT: createRoute('/user-reports/{:reportId}'),\n START_EXPORT_USER_REPORT: createRoute('/user-reports/{:reportId}/start-export'),\n START_DOWNLOAD_USER_REPORT: createRoute('/user-reports/{:reportId}/start-download'),\n OPT_OUT_SHARES: createRoute('/user-reports/{:reportId}/opt-out'),\n GET_SYSTEM_REPORTS: createRoute('/system-reports'),\n START_EXPORT_SYSTEM_REPORT: createRoute('/system-reports/{:reportId}/start-export'),\n START_DOWNLOAD_SYSTEM_REPORT: createRoute('/system-reports/{:reportId}/start-download'),\n CREATE_SCHEDULE_JOB: createRoute('/scheduled-jobs'),\n UPDATE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n GET_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n DELETE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n IS_WEBHOOK_USED_IN_SCHEDULED_JOBS: createRoute('/scheduled-jobs/webhook/{:webhookUuid}/is-used'),\n GET_ACTIVE_REPORT_EXECUTIONS: createRoute('/report-executions/active'),\n REMOVE_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}'),\n RETRY_USER_REPORT_EXECUTION: createRoute('/report-executions/user/{:executionId}/retry'),\n RETRY_SYSTEM_REPORT_EXECUTION: createRoute('/report-executions/system/{:executionId}/retry'),\n SHARE_REPORT: createRoute('/reports/{:reportId}/shares'),\n UPDATE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),\n DELETE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),\n DELETE_ALL_REPORT_SHARES: createRoute('/reports/{:reportId}/shares'),\n GET_REPORT: createRoute('/reports/{:reportId}'),\n GET_API_LINK: createRoute('/api-link'),\n GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count')\n};\nvar AnalyticsReportsEntity = /** @class */ (function (_super) {\n __extends(AnalyticsReportsEntity, _super);\n function AnalyticsReportsEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'analytics-service'\n }) || this;\n }\n AnalyticsReportsEntity.prototype.getReport = function (reportId) {\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.service.routeGenerator.get(Routes.GET_REPORT).withRouteParams({ reportId: reportId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.createUserReport = function (report) {\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.service.routeGenerator.post(Routes.CREATE_USER_REPORT).withPayload(report).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.updateUserReport = function (reportId, report) {\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.service.routeGenerator\n .put(Routes.UPDATE_USER_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(report)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.deleteUserReport = function (reportId) {\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.service.routeGenerator\n .delete(Routes.DELETE_USER_REPORT)\n .withRouteParams({ reportId: reportId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getUserReports = function (queryString) {\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.service.routeGenerator.get(Routes.GET_USER_REPORTS).withQueryString(queryString).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getSystemReports = function (queryString) {\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.service.routeGenerator.get(Routes.GET_SYSTEM_REPORTS).withQueryString(queryString).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.createReportScheduledJob = function (queryParams) {\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.service.routeGenerator.post(Routes.CREATE_SCHEDULE_JOB).withPayload(queryParams).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.updateReportScheduledJob = function (jobId, queryParams) {\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.service.routeGenerator\n .put(Routes.UPDATE_SCHEDULE_JOB)\n .withRouteParams({ jobId: jobId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getReportScheduledJob = function (jobId) {\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.service.routeGenerator.get(Routes.GET_SCHEDULE_JOB).withRouteParams({ jobId: jobId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.deleteReportScheduledJob = function (jobId) {\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.service.routeGenerator.delete(Routes.DELETE_SCHEDULE_JOB).withRouteParams({ jobId: jobId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.isWebhookUsedInScheduledJobs = function (webhookUuid) {\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.service.routeGenerator\n .get(Routes.IS_WEBHOOK_USED_IN_SCHEDULED_JOBS)\n .withRouteParams({ webhookUuid: webhookUuid })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getApiLink = 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.service.routeGenerator.get(Routes.GET_API_LINK).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.exportUserReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_EXPORT_USER_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.exportSystemReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_EXPORT_SYSTEM_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.downloadUserReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_DOWNLOAD_USER_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.downloadSystemReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_DOWNLOAD_SYSTEM_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getActiveReportExecutions = 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.service.routeGenerator.get(Routes.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.subscribeReportExecutions = function (handler) {\n this.service.session.persistentConnection.subscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'), handler);\n };\n AnalyticsReportsEntity.prototype.unsubscribeReportExecutions = function () {\n this.service.session.persistentConnection.unsubscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'));\n };\n AnalyticsReportsEntity.prototype.retryUserReportExecutions = function (executionId) {\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.service.routeGenerator\n .post(Routes.RETRY_USER_REPORT_EXECUTION)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.retrySystemReportExecutions = function (executionId) {\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.service.routeGenerator\n .post(Routes.RETRY_SYSTEM_REPORT_EXECUTION)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.removeReportExecutions = function (executionId) {\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.service.routeGenerator\n .delete(Routes.REMOVE_EXECUTION_REPORT)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getReportRowsCount = function (queryJson, timeZone) {\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.service.routeGenerator\n .post(Routes.GET_REPORT_ROWS_COUNT)\n .withPayload({ queryJson: queryJson, timeZone: timeZone })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.optOutReport = function (reportId) {\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.service.routeGenerator.delete(Routes.OPT_OUT_SHARES).withRouteParams({ reportId: reportId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use createUserReport() instead\n */\n AnalyticsReportsEntity.prototype.createReport = function (report) {\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.service.routeGenerator.post(DeprecatedRoutes.CREATE_REPORT).withPayload(report).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use updateUserReport() instead\n */\n AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {\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.service.routeGenerator\n .put(DeprecatedRoutes.UPDATE_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(report)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use deleteUserReport() instead\n */\n AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {\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.service.routeGenerator\n .delete(DeprecatedRoutes.DELETE_REPORT)\n .withRouteParams({ reportId: reportId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use exportUserReport() or exportSystemReport() instead\n */\n AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(DeprecatedRoutes.START_EXPORT_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use downloadUserReport() or downloadSystemReport() instead\n */\n AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(DeprecatedRoutes.START_DOWNLOAD_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n /**\n * @deprecated Use retryUserReportExecutions() or retrySystemReportExecutions() instead\n */\n AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {\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.service.routeGenerator\n .post(DeprecatedRoutes.RETRY_EXECUTION_REPORT)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AnalyticsReportsEntity;\n}(Entity_1.default));\nexports[\"default\"] = AnalyticsReportsEntity;\n//# sourceMappingURL=AnalyticsReportsEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js?");
|
|
97
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar Entity_1 = __importDefault(__webpack_require__(/*! ../../Core/Entity */ \"./dist/Core/Entity.js\"));\nvar PubSubEvents_1 = __webpack_require__(/*! ../../Services/PubSubEvents */ \"./dist/Services/PubSubEvents.js\");\nvar Version;\n(function (Version) {\n Version[\"v1\"] = \"v1\";\n})(Version || (Version = {}));\nvar BaseRoute = '/analytics-service';\nvar createRoute = function (route, version) {\n if (version === void 0) { version = Version.v1; }\n return \"\".concat(BaseRoute, \"/\").concat(version).concat(route);\n};\nvar Routes = {\n GET_USER_REPORTS: createRoute('/reports'),\n GET_SYSTEM_REPORTS: createRoute('/system-reports'),\n GET_REPORT: createRoute('/reports/{:reportId}'),\n CREATE_REPORT: createRoute('/reports'),\n UPDATE_REPORT: createRoute('/reports/{:reportId}'),\n DELETE_REPORT: createRoute('/reports/{:reportId}'),\n CREATE_SCHEDULE_JOB: createRoute('/scheduled-jobs'),\n UPDATE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n GET_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n DELETE_SCHEDULE_JOB: createRoute('/scheduled-jobs/{:jobId}'),\n IS_WEBHOOK_USED_IN_SCHEDULED_JOBS: createRoute('/scheduled-jobs/webhook/{:webhookUuid}/is-used'),\n GET_API_LINK: createRoute('/api-link'),\n START_EXPORT_REPORT: createRoute('/reports/{:reportId}/start-export'),\n START_DOWNLOAD_REPORT: createRoute('/reports/{:reportId}/start-download'),\n GET_ACTIVE_REPORT_EXECUTIONS: createRoute('/report-executions/active'),\n RETRY_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}/retry'),\n REMOVE_EXECUTION_REPORT: createRoute('/report-executions/{:executionId}'),\n GET_REPORT_ROWS_COUNT: createRoute('/report-query/rows-count'),\n SHARE_REPORT: createRoute('/reports/{:reportId}/shares'),\n UPDATE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),\n DELETE_REPORT_SHARES: createRoute('/reports/{:reportId}/shares/{:reportShareId}'),\n DELETE_ALL_REPORT_SHARES: createRoute('/reports/{:reportId}/shares'),\n OPT_OUT_SHARES: createRoute('/reports/{:reportId}/opt-out')\n};\nvar AnalyticsReportsEntity = /** @class */ (function (_super) {\n __extends(AnalyticsReportsEntity, _super);\n function AnalyticsReportsEntity(session) {\n return _super.call(this, {\n session: session,\n entityName: 'analytics-service'\n }) || this;\n }\n AnalyticsReportsEntity.prototype.getReport = function (reportId) {\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.service.routeGenerator.get(Routes.GET_REPORT).withRouteParams({ reportId: reportId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.deleteReport = function (reportId) {\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.service.routeGenerator.delete(Routes.DELETE_REPORT).withRouteParams({ reportId: reportId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.createReport = function (report) {\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.service.routeGenerator.post(Routes.CREATE_REPORT).withPayload(report).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.updateReport = function (reportId, report) {\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.service.routeGenerator\n .put(Routes.UPDATE_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(report)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getUserReports = function (queryString) {\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.service.routeGenerator.get(Routes.GET_USER_REPORTS).withQueryString(queryString).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getSystemReports = function (queryString) {\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.service.routeGenerator.get(Routes.GET_SYSTEM_REPORTS).withQueryString(queryString).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.createReportScheduledJob = function (queryParams) {\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.service.routeGenerator.post(Routes.CREATE_SCHEDULE_JOB).withPayload(queryParams).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.updateReportScheduledJob = function (jobId, queryParams) {\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.service.routeGenerator\n .put(Routes.UPDATE_SCHEDULE_JOB)\n .withRouteParams({ jobId: jobId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getReportScheduledJob = function (jobId) {\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.service.routeGenerator.get(Routes.GET_SCHEDULE_JOB).withRouteParams({ jobId: jobId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.deleteReportScheduledJob = function (jobId) {\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.service.routeGenerator.delete(Routes.DELETE_SCHEDULE_JOB).withRouteParams({ jobId: jobId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.isWebhookUsedInScheduledJobs = function (webhookUuid) {\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.service.routeGenerator\n .get(Routes.IS_WEBHOOK_USED_IN_SCHEDULED_JOBS)\n .withRouteParams({ webhookUuid: webhookUuid })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getApiLink = 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.service.routeGenerator.get(Routes.GET_API_LINK).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.exportReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_EXPORT_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.downloadReport = function (reportId, queryParams) {\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.service.routeGenerator\n .post(Routes.START_DOWNLOAD_REPORT)\n .withRouteParams({ reportId: reportId })\n .withPayload(queryParams)\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getActiveReportExecutions = 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.service.routeGenerator.get(Routes.GET_ACTIVE_REPORT_EXECUTIONS).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.subscribeReportExecutions = function (handler) {\n this.service.session.persistentConnection.subscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'), handler);\n };\n AnalyticsReportsEntity.prototype.unsubscribeReportExecutions = function () {\n this.service.session.persistentConnection.unsubscribe(new PubSubEvents_1.PubSubEvent('report_export_progress'));\n };\n AnalyticsReportsEntity.prototype.retryReportExecutions = function (executionId) {\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.service.routeGenerator\n .post(Routes.RETRY_EXECUTION_REPORT)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.removeReportExecutions = function (executionId) {\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.service.routeGenerator\n .delete(Routes.REMOVE_EXECUTION_REPORT)\n .withRouteParams({ executionId: executionId })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.getReportRowsCount = function (queryJson, timeZone) {\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.service.routeGenerator\n .post(Routes.GET_REPORT_ROWS_COUNT)\n .withPayload({ queryJson: queryJson, timeZone: timeZone })\n .invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n AnalyticsReportsEntity.prototype.optOutReport = function (reportId) {\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.service.routeGenerator.delete(Routes.OPT_OUT_SHARES).withRouteParams({ reportId: reportId }).invoke()];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AnalyticsReportsEntity;\n}(Entity_1.default));\nexports[\"default\"] = AnalyticsReportsEntity;\n//# sourceMappingURL=AnalyticsReportsEntity.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/AnalyticsReports/Entity/AnalyticsReportsEntity.js?");
|
|
98
98
|
|
|
99
99
|
/***/ }),
|
|
100
100
|
|
|
@@ -600,7 +600,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
600
600
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
601
601
|
|
|
602
602
|
"use strict";
|
|
603
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar _ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar merge_mapper_1 = __webpack_require__(/*! ../../Data/merge-mapper */ \"./dist/Data/merge-mapper.js\");\nvar storable_realtime_subscriptions_1 = __importDefault(__webpack_require__(/*! ../../Data/storable-realtime-subscriptions */ \"./dist/Data/storable-realtime-subscriptions.js\"));\nvar data_entity_1 = __webpack_require__(/*! ../../data-entity */ \"./dist/data-entity.js\");\nvar data_store_1 = __importDefault(__webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\"));\nvar storable_data_service_1 = __importDefault(__webpack_require__(/*! ../../storable-data-service */ \"./dist/storable-data-service.js\"));\nvar array_utils_1 = __webpack_require__(/*! ../../utils/array-utils */ \"./dist/utils/array-utils.js\");\nvar Customer_consts_1 = __webpack_require__(/*! ../Customer.consts */ \"./dist/Customer/Customer.consts.js\");\nvar customers_service_1 = __importDefault(__webpack_require__(/*! ./customers-service */ \"./dist/Customer/v2/customers-service.js\"));\nvar CustomersApi = /** @class */ (function () {\n function CustomersApi(session) {\n var _this = this;\n var _a;\n var disableCustomerObservabilityFF = !!((_a = session.user.feature_flags) === null || _a === void 0 ? void 0 : _a.disable_customer_observability);\n this.customersStore = new data_store_1.default(undefined, { shallow: disableCustomerObservabilityFF });\n this.customersService = new customers_service_1.default(session);\n this.storableDataService = new storable_data_service_1.default(this.customersStore, function (customer) {\n return merge_mapper_1.mergeMapper.mergeIntoExisting(_this.customersStore, customer);\n });\n this.storableRealtimeSubscriptions = new storable_realtime_subscriptions_1.default(session, this.customersStore, this.storableDataService);\n this.storableRealtimeSubscriptions.updateStoreOnEvents([\n { name: Customer_consts_1.RealtimeEvents.Created, isDelete: false },\n { name: Customer_consts_1.RealtimeEvents.Updated, isDelete: false },\n {\n name: Customer_consts_1.RealtimeEvents.Deleted,\n isDelete: true,\n itemExtractor: function (payload) { return ({ id: payload.customer_id }); }\n }\n ]);\n }\n CustomersApi.prototype.onCreate = function (callback) {\n return this.storableRealtimeSubscriptions.onEvent(Customer_consts_1.RealtimeEvents.Created, function (item) { return callback(item.current); });\n };\n CustomersApi.prototype.add = function (customer) {\n return this.storableDataService.updateInStores(customer);\n };\n CustomersApi.prototype.getAll = function () {\n return this.customersStore.getAll();\n };\n CustomersApi.prototype.get = function (id) {\n return this.customersStore.get(id);\n };\n CustomersApi.prototype.loadAll = function (params, options) {\n var _this = this;\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n var loadResult;\n var loadFunc = function () { 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.customersService.loadAll(params)];\n case 1:\n result = _a.sent();\n loadResult = result;\n return [2 /*return*/, result.items];\n }\n });\n }); };\n var promise = params\n ? this.storableDataService.loadMany('loadAll', loadFunc, [], options)\n : this.storableDataService.loadAll('loadAll', loadFunc, options);\n return promise.then(function (customers) {\n return __assign(__assign({}, loadResult), { items: customers });\n });\n };\n CustomersApi.prototype.loadMany = function (ids, options) {\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, this.storableDataService.loadMany('batchGet', function (idsToLoad) { return __awaiter(_this, void 0, void 0, function () {\n var results;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!options.chunkSize) return [3 /*break*/, 1];\n return [2 /*return*/, this.customersService.loadMany(idsToLoad)];\n case 1: return [4 /*yield*/, Promise.all(array_utils_1.arrayUtils.splitToChunks(idsToLoad, options.chunkSize).map(function (idsChunk) {\n return _this.customersService.loadMany(idsChunk);\n }))];\n case 2:\n results = _a.sent();\n return [2 /*return*/, _.flatten(results)];\n }\n });\n }); }, ids, options)];\n });\n });\n };\n CustomersApi.prototype.load = function (id, options) {\n var _this = this;\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n return this.storableDataService.load('load', function () { return _this.customersService.load(id); }, id, options);\n };\n CustomersApi.prototype.find = function (params) {\n return this.customersService.find(params);\n };\n CustomersApi.prototype.getTasks = function (id, page) {\n return this.customersService.getTasks(id, page);\n };\n CustomersApi.prototype.getTotalTasks = function (id) {\n return this.customersService.getTotalTasks(id);\n };\n CustomersApi.prototype.update = function (customerData) {\n var _this = this;\n return this.storableDataService.modify('update', function () { return _this.customersService.update(customerData); });\n };\n CustomersApi.prototype.create = function (customerData) {\n var _this = this;\n return this.storableDataService.modify('create', function () { return _this.customersService.create(customerData); });\n };\n return CustomersApi;\n}());\nexports[\"default\"] = CustomersApi;\n//# sourceMappingURL=customers-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Customer/v2/customers-api.js?");
|
|
603
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar _ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nvar merge_mapper_1 = __webpack_require__(/*! ../../Data/merge-mapper */ \"./dist/Data/merge-mapper.js\");\nvar storable_realtime_subscriptions_1 = __importDefault(__webpack_require__(/*! ../../Data/storable-realtime-subscriptions */ \"./dist/Data/storable-realtime-subscriptions.js\"));\nvar data_entity_1 = __webpack_require__(/*! ../../data-entity */ \"./dist/data-entity.js\");\nvar data_store_1 = __importDefault(__webpack_require__(/*! ../../data-store */ \"./dist/data-store.js\"));\nvar storable_data_service_1 = __importDefault(__webpack_require__(/*! ../../storable-data-service */ \"./dist/storable-data-service.js\"));\nvar array_utils_1 = __webpack_require__(/*! ../../utils/array-utils */ \"./dist/utils/array-utils.js\");\nvar Customer_consts_1 = __webpack_require__(/*! ../Customer.consts */ \"./dist/Customer/Customer.consts.js\");\nvar customers_service_1 = __importDefault(__webpack_require__(/*! ./customers-service */ \"./dist/Customer/v2/customers-service.js\"));\nvar CustomersApi = /** @class */ (function () {\n function CustomersApi(session) {\n var _this = this;\n this.customersStore = new data_store_1.default(undefined, { shallow: true });\n this.customersService = new customers_service_1.default(session);\n this.storableDataService = new storable_data_service_1.default(this.customersStore, function (customer) {\n return merge_mapper_1.mergeMapper.mergeIntoExisting(_this.customersStore, customer);\n });\n this.storableRealtimeSubscriptions = new storable_realtime_subscriptions_1.default(session, this.customersStore, this.storableDataService);\n this.storableRealtimeSubscriptions.updateStoreOnEvents([\n { name: Customer_consts_1.RealtimeEvents.Created, isDelete: false },\n { name: Customer_consts_1.RealtimeEvents.Updated, isDelete: false },\n {\n name: Customer_consts_1.RealtimeEvents.Deleted,\n isDelete: true,\n itemExtractor: function (payload) { return ({ id: payload.customer_id }); }\n }\n ]);\n }\n CustomersApi.prototype.onCreate = function (callback) {\n return this.storableRealtimeSubscriptions.onEvent(Customer_consts_1.RealtimeEvents.Created, function (item) { return callback(item.current); });\n };\n CustomersApi.prototype.add = function (customer) {\n return this.storableDataService.updateInStores(customer);\n };\n CustomersApi.prototype.getAll = function () {\n return this.customersStore.getAll();\n };\n CustomersApi.prototype.get = function (id) {\n return this.customersStore.get(id);\n };\n CustomersApi.prototype.loadAll = function (params, options) {\n var _this = this;\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n var loadResult;\n var loadFunc = function () { 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.customersService.loadAll(params)];\n case 1:\n result = _a.sent();\n loadResult = result;\n return [2 /*return*/, result.items];\n }\n });\n }); };\n var promise = params\n ? this.storableDataService.loadMany('loadAll', loadFunc, [], options)\n : this.storableDataService.loadAll('loadAll', loadFunc, options);\n return promise.then(function (customers) {\n return __assign(__assign({}, loadResult), { items: customers });\n });\n };\n CustomersApi.prototype.loadMany = function (ids, options) {\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, this.storableDataService.loadMany('batchGet', function (idsToLoad) { return __awaiter(_this, void 0, void 0, function () {\n var results;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!options.chunkSize) return [3 /*break*/, 1];\n return [2 /*return*/, this.customersService.loadMany(idsToLoad)];\n case 1: return [4 /*yield*/, Promise.all(array_utils_1.arrayUtils.splitToChunks(idsToLoad, options.chunkSize).map(function (idsChunk) {\n return _this.customersService.loadMany(idsChunk);\n }))];\n case 2:\n results = _a.sent();\n return [2 /*return*/, _.flatten(results)];\n }\n });\n }); }, ids, options)];\n });\n });\n };\n CustomersApi.prototype.load = function (id, options) {\n var _this = this;\n if (options === void 0) { options = data_entity_1.DEFAULT_OPTIONS; }\n return this.storableDataService.load('load', function () { return _this.customersService.load(id); }, id, options);\n };\n CustomersApi.prototype.find = function (params) {\n return this.customersService.find(params);\n };\n CustomersApi.prototype.getTasks = function (id, page) {\n return this.customersService.getTasks(id, page);\n };\n CustomersApi.prototype.getTotalTasks = function (id) {\n return this.customersService.getTotalTasks(id);\n };\n CustomersApi.prototype.update = function (customerData) {\n var _this = this;\n return this.storableDataService.modify('update', function () { return _this.customersService.update(customerData); });\n };\n CustomersApi.prototype.create = function (customerData) {\n var _this = this;\n return this.storableDataService.modify('create', function () { return _this.customersService.create(customerData); });\n };\n return CustomersApi;\n}());\nexports[\"default\"] = CustomersApi;\n//# sourceMappingURL=customers-api.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Customer/v2/customers-api.js?");
|
|
604
604
|
|
|
605
605
|
/***/ }),
|
|
606
606
|
|
|
@@ -1909,7 +1909,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
1909
1909
|
/***/ ((__unused_webpack_module, exports) => {
|
|
1910
1910
|
|
|
1911
1911
|
"use strict";
|
|
1912
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Routes = exports.baseRoute = void 0;\nexports.baseRoute = '/task-service/relay';\nexports.Routes = {\n
|
|
1912
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Routes = exports.baseRoute = void 0;\nexports.baseRoute = '/task-service/relay';\nexports.Routes = {\n RELAY: \"\".concat(exports.baseRoute)\n};\n//# sourceMappingURL=Relay.consts.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Relay/Relay.consts.js?");
|
|
1913
1913
|
|
|
1914
1914
|
/***/ }),
|
|
1915
1915
|
|
|
@@ -1920,7 +1920,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
1920
1920
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1921
1921
|
|
|
1922
1922
|
"use strict";
|
|
1923
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar Relay_service_1 = __importDefault(__webpack_require__(/*! ./Service/Relay.service */ \"./dist/Relay/Service/Relay.service.js\"));\nvar RelayApi = /** @class */ (function () {\n function RelayApi(session) {\n this.relayService = new Relay_service_1.default(session);\n }\n RelayApi.prototype.getRelaysByTaskId = function (taskId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.relayService.getRelaysByTaskId(taskId)];\n });\n });\n };\n return RelayApi;\n}());\nexports[\"default\"] = RelayApi;\n//# sourceMappingURL=RelayApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Relay/RelayApi.js?");
|
|
1923
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar Relay_service_1 = __importDefault(__webpack_require__(/*! ./Service/Relay.service */ \"./dist/Relay/Service/Relay.service.js\"));\nvar RelayApi = /** @class */ (function () {\n function RelayApi(session) {\n this.relayService = new Relay_service_1.default(session);\n }\n RelayApi.prototype.getRelaysByTaskId = function (taskId) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.relayService.getRelaysByTaskId(taskId)];\n });\n });\n };\n RelayApi.prototype.createRelays = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.relayService.createRelays(request)];\n });\n });\n };\n return RelayApi;\n}());\nexports[\"default\"] = RelayApi;\n//# sourceMappingURL=RelayApi.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Relay/RelayApi.js?");
|
|
1924
1924
|
|
|
1925
1925
|
/***/ }),
|
|
1926
1926
|
|
|
@@ -1931,7 +1931,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument
|
|
|
1931
1931
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1932
1932
|
|
|
1933
1933
|
"use strict";
|
|
1934
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar CrudService_1 = __importDefault(__webpack_require__(/*! ../../Core/CrudService */ \"./dist/Core/CrudService.js\"));\nvar Relay_consts_1 = __webpack_require__(/*! ../Relay.consts */ \"./dist/Relay/Relay.consts.js\");\nvar RelayService = /** @class */ (function () {\n function RelayService(session) {\n this.service = new CrudService_1.default(session, 'relay', 'task-service');\n }\n RelayService.prototype.getRelaysByTaskId = function (taskId, 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(Relay_consts_1.Routes.
|
|
1934
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar CrudService_1 = __importDefault(__webpack_require__(/*! ../../Core/CrudService */ \"./dist/Core/CrudService.js\"));\nvar Relay_consts_1 = __webpack_require__(/*! ../Relay.consts */ \"./dist/Relay/Relay.consts.js\");\nvar RelayService = /** @class */ (function () {\n function RelayService(session) {\n this.service = new CrudService_1.default(session, 'relay', 'task-service');\n }\n RelayService.prototype.getRelaysByTaskId = function (taskId, 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(Relay_consts_1.Routes.RELAY)\n .withQueryString({ task_id: taskId })\n .setException(\"failed to fetch relays for task \".concat(taskId))\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n RelayService.prototype.createRelays = function (relayData, 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(Relay_consts_1.Routes.RELAY)\n .withPayload(relayData)\n .withCommonOptions(commonOptions)\n .invoke()];\n });\n });\n };\n return RelayService;\n}());\nexports[\"default\"] = RelayService;\n//# sourceMappingURL=Relay.service.js.map\n\n//# sourceURL=webpack://BringgDashboardSDK/./dist/Relay/Service/Relay.service.js?");
|
|
1935
1935
|
|
|
1936
1936
|
/***/ }),
|
|
1937
1937
|
|
|
@@ -2371,7 +2371,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
|
2371
2371
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2372
2372
|
|
|
2373
2373
|
"use strict";
|
|
2374
|
-
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __importDefault(__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 = __importDefault(__webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\"));\nvar abort_1 = __webpack_require__(/*! ../utils/abort */ \"./dist/utils/abort.js\");\nvar version = '9.42.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 //\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?");
|
|
2374
|
+
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};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.AnonymousServiceRequest = exports.AuthorizedServiceRequest = exports.ResponseHandler = exports.RequestOptions = exports.logErrorResponse = void 0;\nvar axios_1 = __importDefault(__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 = __importDefault(__webpack_require__(/*! ../Core/Logger */ \"./dist/Core/Logger.js\"));\nvar abort_1 = __webpack_require__(/*! ../utils/abort */ \"./dist/utils/abort.js\");\nvar version = '9.42.1';\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?");
|
|
2375
2375
|
|
|
2376
2376
|
/***/ }),
|
|
2377
2377
|
|