sysone-api-mapper 1.0.143 → 1.0.146
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/config/dist/index.js +51 -3
- package/config/dist/index.ts +319 -0
- package/config/webpack.dev.js +7 -2
- package/config/webpack.prod.js +7 -2
- package/dist/axiosInstance.d.ts +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/services.d.ts +2 -0
- package/dist/servicesData.d.ts +143 -0
- package/dist/src/adapters/createApiAdapter.d.ts +16 -0
- package/dist/src/adapters/financeAdapter.d.ts +3 -0
- package/dist/src/adapters/locationAdapter.d.ts +4 -0
- package/dist/src/adapters/partyAdapter.d.ts +6 -0
- package/dist/src/components/notificationToast.d.ts +0 -0
- package/dist/src/contexts/actionsContext.d.ts +5 -0
- package/dist/src/contexts/apiContext.d.ts +2 -0
- package/dist/src/contexts/translationContext.d.ts +5 -0
- package/dist/src/mapper/Mapper.d.ts +2 -0
- package/dist/src/mapper/endpointsConfig.d.ts +2577 -0
- package/dist/src/mapper/helpers/mappingHelpers.d.ts +3 -0
- package/dist/src/mapper/modules/billing/index.d.ts +20 -0
- package/dist/src/mapper/modules/claim/index.d.ts +3 -0
- package/dist/src/mapper/modules/general/index.d.ts +4 -0
- package/dist/src/mapper/modules/party/index.d.ts +29 -0
- package/dist/src/mapper/modules/policy/index.d.ts +366 -0
- package/dist/src/mapper/modules/quotation/index.d.ts +297 -0
- package/dist/src/mapper/modules/request/index.d.ts +42 -0
- package/dist/src/public/index.d.ts +3 -0
- package/dist/src/server.d.ts +1 -0
- package/index.d.ts +5 -0
- package/{index.js → index.ts} +4 -1
- package/package.json +7 -3
- package/src/adapters/createApiAdapter.ts +29 -0
- package/src/contexts/apiContext.js +3 -3
- package/tsconfig.json +9 -0
- package/src/adapters/createApiAdapter.js +0 -10
package/config/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
8
8
|
*/
|
|
9
9
|
/******/ (() => { // webpackBootstrap
|
|
10
|
-
/******/ "use strict";
|
|
11
10
|
/******/ var __webpack_modules__ = ({
|
|
12
11
|
|
|
13
12
|
/***/ "./axiosInstance.js":
|
|
@@ -16,6 +15,7 @@
|
|
|
16
15
|
\**************************/
|
|
17
16
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18
17
|
|
|
18
|
+
"use strict";
|
|
19
19
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n\nvar axiosInstance = axios__WEBPACK_IMPORTED_MODULE_0___default().create({\n baseURL: ''\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (axiosInstance);\n\n//# sourceURL=webpack://sysone-api-mapper/./axiosInstance.js?");
|
|
20
20
|
|
|
21
21
|
/***/ }),
|
|
@@ -26,7 +26,8 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
26
26
|
\******************/
|
|
27
27
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
"use strict";
|
|
30
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ApiContext: () => (/* reexport safe */ _src_contexts_apiContext__WEBPACK_IMPORTED_MODULE_4__.ApiContext),\n/* harmony export */ apiCall: () => (/* reexport safe */ _services__WEBPACK_IMPORTED_MODULE_0__.apiCall),\n/* harmony export */ apiMapper: () => (/* reexport safe */ _src_mapper_Mapper__WEBPACK_IMPORTED_MODULE_3__.apiMapper),\n/* harmony export */ axiosInstance: () => (/* reexport safe */ _axiosInstance__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ configureApiMapper: () => (/* reexport safe */ _src_mapper_Mapper__WEBPACK_IMPORTED_MODULE_3__.configureApiMapper),\n/* harmony export */ createApiAdapter: () => (/* reexport safe */ _src_adapters_createApiAdapter__WEBPACK_IMPORTED_MODULE_5__.createApiAdapter),\n/* harmony export */ endpoints: () => (/* reexport safe */ _servicesData__WEBPACK_IMPORTED_MODULE_1__.endpoints),\n/* harmony export */ useApi: () => (/* reexport safe */ _src_contexts_apiContext__WEBPACK_IMPORTED_MODULE_4__.useApi)\n/* harmony export */ });\n/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services */ \"./services.js\");\n/* harmony import */ var _servicesData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./servicesData */ \"./servicesData.js\");\n/* harmony import */ var _axiosInstance__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./axiosInstance */ \"./axiosInstance.js\");\n/* harmony import */ var _src_mapper_Mapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./src/mapper/Mapper */ \"./src/mapper/Mapper.js\");\n/* harmony import */ var _src_contexts_apiContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./src/contexts/apiContext */ \"./src/contexts/apiContext.js\");\n/* harmony import */ var _src_adapters_createApiAdapter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./src/adapters/createApiAdapter */ \"./src/adapters/createApiAdapter.ts\");\n/* harmony import */ var _src_adapters_createApiAdapter__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_src_adapters_createApiAdapter__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://sysone-api-mapper/./index.js?");
|
|
30
31
|
|
|
31
32
|
/***/ }),
|
|
32
33
|
|
|
@@ -36,6 +37,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
36
37
|
\*********************/
|
|
37
38
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
38
39
|
|
|
40
|
+
"use strict";
|
|
39
41
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ apiCall: () => (/* binding */ apiCall),\n/* harmony export */ formatNumberES: () => (/* binding */ formatNumberES)\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _axiosInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./axiosInstance */ \"./axiosInstance.js\");\n/* harmony import */ var _servicesData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./servicesData */ \"./servicesData.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\n\n\n\n// import {\n// \topenNotificationWithIcon,\n// \tTYPE,\n// } from \"./src/components/notificationToast\";\n\nvar handleApiError = function handleApiError(service, e) {\n try {\n var errorToDisplay = {\n title: \"\",\n errors: []\n };\n if (!(e instanceof axios__WEBPACK_IMPORTED_MODULE_0__.AxiosError)) {\n errorToDisplay.title = e.message;\n } else {\n var _modulesInfo$find, _error$data$errorMess;\n var error = e.response;\n var statusError = error.status;\n var modulesInfo = JSON.parse(localStorage.getItem(\"modules_info\"));\n var translationInfo = (_modulesInfo$find = modulesInfo.find(function (m) {\n return m.code === service.module;\n })) === null || _modulesInfo$find === void 0 || (_modulesInfo$find = _modulesInfo$find.services) === null || _modulesInfo$find === void 0 || (_modulesInfo$find = _modulesInfo$find.find(function (s) {\n return s.name.toUpperCase() === service.serviceName.toUpperCase() && s.httpMethod.toUpperCase() === service.method.toUpperCase();\n })) === null || _modulesInfo$find === void 0 ? void 0 : _modulesInfo$find.errors.find(function (e) {\n return e.httpStatus === statusError;\n });\n errorToDisplay.title = (translationInfo === null || translationInfo === void 0 ? void 0 : translationInfo.content) || error.data.message;\n var subErrorTranslations = (_error$data$errorMess = error.data.errorMessages) === null || _error$data$errorMess === void 0 ? void 0 : _error$data$errorMess.map(function (err) {\n var _translationInfo$subE;\n var translatedSubError = translationInfo === null || translationInfo === void 0 || (_translationInfo$subE = translationInfo.subErrors) === null || _translationInfo$subE === void 0 ? void 0 : _translationInfo$subE.find(function (s) {\n return s.errorType === err.fieldError && s.fieldName === err.fieldName;\n });\n return (translatedSubError === null || translatedSubError === void 0 ? void 0 : translatedSubError.content) || (err === null || err === void 0 ? void 0 : err.error);\n });\n errorToDisplay.errors = subErrorTranslations || [];\n }\n\n // openNotificationWithIcon(\n // \tTYPE.ERROR,\n // \t\"\",\n // \terrorToDisplay.title,\n // \terrorToDisplay.errors\n // );\n } catch (e) {\n console.error(e);\n throw e;\n }\n};\nvar getUrl = function getUrl(serviceUrl, routeParams) {\n if (!routeParams) return serviceUrl;\n return serviceUrl.replace(/{(\\d+)}/g, function (match, routeParamNumber) {\n return routeParams[routeParamNumber] ? routeParams[routeParamNumber] : match;\n });\n};\nvar formatNumberES = function formatNumberES(n) {\n var _parseFloat;\n var d = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n n = new Intl.NumberFormat(\"de-DE\").format((_parseFloat = parseFloat(n)) === null || _parseFloat === void 0 ? void 0 : _parseFloat.toFixed(d));\n if (d > 0) {\n var decimals = n.indexOf(\",\") > -1 ? n.length - 1 - n.indexOf(\",\") : 0;\n n = decimals == 0 ? n + \",\" + \"0\".repeat(d) : n + \"0\".repeat(d - decimals);\n }\n return n;\n};\nvar apiCall = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpoint, routeParams) {\n var params,\n service,\n url,\n response,\n _args = arguments;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n params = _args.length > 2 && _args[2] !== undefined ? _args[2] : null;\n service = _servicesData__WEBPACK_IMPORTED_MODULE_2__.services.find(function (s) {\n return s.endpoint === endpoint;\n });\n _context.prev = 2;\n if (service) {\n _context.next = 5;\n break;\n }\n throw new Error(\"Service does not exists\");\n case 5:\n url = getUrl(service.url, routeParams);\n _context.t0 = service.method;\n _context.next = _context.t0 === _servicesData__WEBPACK_IMPORTED_MODULE_2__.methods.GET ? 9 : _context.t0 === _servicesData__WEBPACK_IMPORTED_MODULE_2__.methods.POST ? 13 : _context.t0 === _servicesData__WEBPACK_IMPORTED_MODULE_2__.methods.PUT ? 17 : _context.t0 === _servicesData__WEBPACK_IMPORTED_MODULE_2__.methods.DELETE ? 21 : 25;\n break;\n case 9:\n _context.next = 11;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"default\"].get(url, {\n params: params\n });\n case 11:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data);\n case 13:\n _context.next = 15;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"default\"].post(url, params);\n case 15:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data);\n case 17:\n _context.next = 19;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"default\"].put(url, params);\n case 19:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data);\n case 21:\n _context.next = 23;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_1__[\"default\"][\"delete\"](url, params);\n case 23:\n response = _context.sent;\n return _context.abrupt(\"return\", response.data);\n case 25:\n response = null;\n throw new Error(\"Request error: Method not allowed. Only use GET, POST, PUT, DELETE\");\n case 27:\n _context.next = 33;\n break;\n case 29:\n _context.prev = 29;\n _context.t1 = _context[\"catch\"](2);\n handleApiError(service, _context.t1);\n throw _context.t1;\n case 33:\n case \"end\":\n return _context.stop();\n }\n }, _callee, null, [[2, 29]]);\n }));\n return function apiCall(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack://sysone-api-mapper/./services.js?");
|
|
40
42
|
|
|
41
43
|
/***/ }),
|
|
@@ -46,17 +48,40 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
46
48
|
\*************************/
|
|
47
49
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
48
50
|
|
|
51
|
+
"use strict";
|
|
49
52
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ endpoints: () => (/* binding */ endpoints),\n/* harmony export */ methods: () => (/* binding */ methods),\n/* harmony export */ modules: () => (/* binding */ modules),\n/* harmony export */ services: () => (/* binding */ services)\n/* harmony export */ });\nvar _endpoints;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar modules = {\n PARTY: \"PARTY_MODULE\",\n INTERMEDIARY: \"INTERMEDIARY_MODULE\",\n COMMERCIAL_STRUCTURE: \"COMMERCIAL_STRUCTURE_MODULE\",\n POLICY: \"POLICY_MODULE\",\n BILLING: \"BILLING_MODULE\",\n COLLECTION: \"COLLECTION_MODULE\",\n ACCOUNTING: \"ACCOUNTING_MODULE\",\n CONFIGURATOR: \"CONFIGURATOR_MODULE\"\n //falta agregar los endpoints para billing, collection, accounting, configurator\n};\nvar methods = {\n GET: \"GET\",\n POST: \"POST\",\n PUT: \"PUT\",\n DELETE: \"DELETE\"\n};\nvar endpoints = (_endpoints = {\n // *************** PARTY_MODULE ****************\n // ------PEOPLE-------\n GET_ACTIVITIES: \"GET_ACTIVITIES\",\n GET_PRACTICES: \"GET_PRACTICES\",\n SEARCH_INDIVIDUALS: \"SEARCH_INDIVIDUALS\",\n CREATE_INDIVIDUAL: \"CREATE_INDIVIDUAL\",\n GET_IDENTIFICATION_TYPES: \"GET_IDENTIFICATION_TYPES\",\n GET_RELATIONS: \"GET_RELATIONS\",\n GET_NOTES: \"GET_NOTES\",\n GET_FILES: \"GET_FILES\",\n GET_SECTORS: \"GET_SECTORS\",\n GET_FISCAL_CATEGORIES: \"GET_FISCAL_CATEGORIES\",\n GET_MAIL_TYPES: \"GET_MAIL_TYPES\",\n GET_PHONE_TYPES: \"GET_PHONE_TYPES\",\n UPDATE_NOTES: \"UPDATE_NOTES\",\n UPDATE_FILES: \"UPDATE_FILES\",\n ADD_RELATION_WITH_EXISTING_PARTY: \"ADD_RELATION_WITH_EXISTING_PARTY\",\n GET_RELATIONS_BY_PARTY_CODE: \"GET_RELATIONS_BY_PARTY_CODE\",\n REMOVE_RELATION: \"REMOVE_RELATION\",\n GET_FILE: \"GET_FILE\",\n //-ORGANIZATION-ENDPOINTS\n GET_ORGANIZATION_TYPES: \"GET_ORGANIZATION_TYPES\",\n SEARCH_ORGANIZATION: \"SEARCH_ORGANIZATION\",\n CREATE_ORGANIZATION: \"CREATE_ORGANIZATION\",\n GET_ORGANIZATION_BY_CODE: \"GET_ORGANIZATION_BY_CODE\",\n UPDATE_ORGANIZATION: \"UPDATE_ORGANIZATION\",\n ADD_RELATION_WITH_NEW_ORGANIZATION: \"ADD_RELATION_WITH_NEW_ORGANIZATION\",\n //-PEOPLE-ENDPOINTS\n GET_PERSON_BY_CODE: \"GET_PERSON_BY_CODE\",\n GET_GENDERS: \"GET_GENDERS\",\n GET_MARITAL_STATUSES: \"GET_MARITAL_STATUSES\",\n GET_WORKER_TYPES: \"GET_WORKER_TYPES\",\n GET_ECONOMIC_CLASSES: \"GET_ECONOMIC_CLASSES\",\n SEARCH_PERSON: \"SEARCH_PERSON\",\n UPDATE_PERSON: \"UPDATE_PERSON\",\n GET_RELATION_TYPES: \"GET_RELATION_TYPES\",\n ADD_RELATION_WITH_NEW_PERSON: \"ADD_RELATION_WITH_NEW_PERSON\",\n // ------POLICIES-------\n GET_POLICY_PROCESSES: \"GET_POLICY_PROCESSES\",\n // ------LOCATION-------\n GET_COUNTRIES: \"GET_COUNTRIES\",\n GET_COUNTRY_BY_CODE: \"GET_COUNTRY_BY_CODE\",\n GET_PROVINCES: \"GET_PROVINCES\",\n GET_CITIES: \"GET_CITIES\",\n GET_POSTAL_CODES: \"GET_POSTAL_CODES\",\n GET_ADDRESSES_BY_PARTY_CODE: \"GET_ADDRESSES_BY_PARTY_CODE\",\n GET_ADDRESS_TYPES: \"GET_ADDRESS_TYPES\",\n // ------FINANCE-------\n GET_PAYMENT_METHODS_BY_PARTY_CODE: \"GET_PAYMENT_METHODS_BY_PARTY_CODE\",\n GET_CREDIT_CARD_TYPES: \"GET_CREDIT_CARD_TYPES\",\n GET_CARD_PROVIDERS: \"GET_CARD_PROVIDERS\",\n UPDATE_PAYMENTS: \"UPDATE_PAYMENTS\",\n GET_BANKS: \"GET_BANKS\",\n GET_CURRENCIES: \"GET_CURRENCIES\",\n GET_BANK_ACCOUNT_TYPES: \"GET_BANK_ACCOUNT_TYPES\",\n GET_BANK_BRANCHES: \"GET_BANK_BRANCHES\",\n // **************** INTERMEDIARY_MODULE ****************\n // ------INTERMEDIARIES-------\n GET_PERSON_INTERMEDIARY_BY_CODE: \"GET_PERSON_INTERMEDIARY_BY_CODE\",\n GET_ORGANIZATION_INTERMEDIARY_BY_CODE: \"GET_ORGANIZATION_INTERMEDIARY_BY_CODE\",\n GET_INTERMEDIARIES_GROUPS: \"GET_INTERMEDIARIES_GROUPS\",\n GET_INTERMEDIARIES_ROLES: \"GET_INTERMEDIARIES_ROLES\",\n GET_INTERMEDIARY_STRUCTURES: \"GET_INTERMEDIARY_STRUCTURES\",\n SEARCH_INTERMEDIARIES: \"SEARCH_INTERMEDIARIES\",\n SEARCH_ACCOUNT_OFFICERS: \"SEARCH_ACCOUNT_OFFICERS\",\n GET_INTERMEDIARIES_STATES: \"GET_INTERMEDIARIES_STATES\",\n GET_INTERMEDIARIES_TYPES: \"GET_INTERMEDIARIES_TYPES\",\n CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY: \"CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY\",\n CREATE_INTERMEDIARY_WITH_WITH_PERSON: \"CREATE_INTERMEDIARY_WITH_WITH_PERSON\",\n CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION: \"CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION\",\n UPDATE_INTERMEDIARY: \"UPDATE_INTERMEDIARY\",\n // **************** COMMERCIAL_STRUCTURE_MODULE ****************\n // ------COMMERCIAL-STRUCTURES-------\n CREATE_COMMERCIAL_STRUCTURE: \"CREATE_COMMERCIAL_STRUCTURE\",\n GET_COMMERCIAL_STRUCTURE_STATUSES: \"GET_COMMERCIAL_STRUCTURE_STATUSES\",\n SEARCH_COMMERCIAL_STRUCTURE: \"SEARCH_COMMERCIAL_STRUCTURE\",\n GET_COMMERCIAL_STRUCTURES_BY_CODE: \"GET_COMMERCIAL_STRUCTURES_BY_CODE\",\n UPDATE_COMMERCIAL_STRUCTURE: \"UPDATE_COMMERCIAL_STRUCTURE\",\n UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES: \"UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES\",\n // ********************** POLICY_MODULE **********************\n // ------POLICIES-------\n GET_POLICY_SECTIONS: \"GET_POLICY_SECTIONS\",\n GET_POLICY_SUBSECTIONS: \"GET_POLICY_SUBSECTIONS\"\n}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_endpoints, \"GET_POLICY_PROCESSES\", \"GET_POLICY_PROCESSES\"), \"GET_POLICY_PRODUCTS\", \"GET_POLICY_PRODUCTS\"), \"GET_VALIDITY_TYPES\", \"GET_VALIDITY_TYPES\"), \"GET_POLICY_CARACTERS\", \"GET_POLICY_CARACTERS\"), \"GET_POLICY_TYPE_OF_DOCUMENTATION\", \"GET_POLICY_TYPE_OF_DOCUMENTATION\"), \"GET_PAYMENT_FREQUENCIES\", \"GET_PAYMENT_FREQUENCIES\"), \"GET_ASSOCIATE_TERMS_CONDITION\", \"GET_ASSOCIATE_TERMS_CONDITION\"), \"GET_ASSOCIATE_EXPENSES\", \"GET_ASSOCIATE_EXPENSES\"), \"GET_ASSOCIATE_COVERAGE\", \"GET_ASSOCIATE_COVERAGE\"), \"GET_COVERAGES\", \"GET_COVERAGES\"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_endpoints, \"GET_EXPENSEVALUES\", \"GET_EXPENSEVALUES\"), \"GET_MORTALITY_TABLE\", \"GET_MORTALITY_TABLE\"), \"CREATE_POLICY_STEP1\", \"CREATE_POLICY_STEP1\"), \"CREATE_POLICY_STEP2\", \"CREATE_POLICY_STEP2\"), \"CREATE_POLICY_STEP3\", \"CREATE_POLICY_STEP3\"), \"CREATE_POLICY_STEP4\", \"CREATE_POLICY_STEP4\"), \"CREATE_POLICY_STEP5\", \"CREATE_POLICY_STEP5\"), \"CREATE_POLICY_STEP6\", \"CREATE_POLICY_STEP6\"), \"CREATE_POLICY_STEP7\", \"CREATE_POLICY_STEP7\"), \"CREATE_POLICY_STEP8\", \"CREATE_POLICY_STEP8\"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_endpoints, \"CREATE_POLICY_STEP9\", \"CREATE_POLICY_STEP9\"), \"CREATE_POLICY_STEP10\", \"CREATE_POLICY_STEP10\"), \"CREATE_POLICY_STEP11\", \"CREATE_POLICY_STEP11\"), \"GET_STEP1_DATA\", \"GET_STEP1_DATA\"), \"GET_STEP2_DATA\", \"GET_STEP2_DATA\"), \"GET_STEP3_DATA\", \"GET_STEP3_DATA\"), \"GET_STEP4_DATA\", \"GET_STEP4_DATA\"), \"GET_STEP5_DATA\", \"GET_STEP5_DATA\"), \"GET_STEP6_DATA\", \"GET_STEP6_DATA\"), \"GET_STEP7_DATA\", \"GET_STEP7_DATA\"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_endpoints, \"GET_STEP9_DATA\", \"GET_STEP9_DATA\"), \"GET_STEP11_DATA\", \"GET_STEP11_DATA\"), \"GET_STEP11_FILE\", \"GET_STEP11_FILE\"), \"UPDATE_POLICY_STEP1\", \"UPDATE_POLICY_STEP1\"), \"GET_ISURED_PERSONS\", \"GET_ISURED_PERSONS\"), \"UPDATE_PARTY\", \"UPDATE_PARTY\"), \"GET_POLICY_DETAILS\", \"GET_POLICY_DETAILS\"), \"UPDATE_PAYMENTS\", \"UPDATE_PAYMENTS\"), \"CREATE_POLICY_RISK\", \"CREATE_POLICY_RISK\"), \"ACTIVATE_POLICY\", \"ACTIVATE_POLICY\"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_endpoints, \"COMPLETE_POLICY\", \"COMPLETE_POLICY\"), \"SET_POLICY_BUILDING\", \"SET_POLICY_BUILDING\"), \"SEARCH_POLICIES\", \"SEARCH_POLICIES\"), \"SEARCH_POLICY_GENERAL_CONDITIONS\", \"SEARCH_POLICY_GENERAL_CONDITIONS\"), \"GET_ASSURED_LIST\", \"GET_ASSURED_LIST\"), \"GET_ADHERENTS\", \"GET_ADHERENTS\"), \"GET_ADHERENTS_BY_OWNER\", \"GET_ADHERENTS_BY_OWNER\"), \"GET_OWNERS\", \"GET_OWNERS\"), \"GET_POLICY_ROLES\", \"GET_POLICY_ROLES\"), \"CREATE_PRODUCT\", \"CREATE_PRODUCT\"));\nvar services = [{\n endpoint: endpoints.SEARCH_INDIVIDUALS,\n serviceName: \"individuals\",\n url: \"party/v1/individuals\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.CREATE_INDIVIDUAL,\n serviceName: \"individuals\",\n url: \"party/v1/individuals\",\n method: methods.POST,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ACTIVITIES,\n serviceName: \"activities\",\n url: \"party/v1/activities/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_PRACTICES,\n serviceName: \"practices\",\n url: \"party/v1/practices/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_SECTORS,\n serviceName: \"sectors\",\n url: \"party/v1/sectors\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_FISCAL_CATEGORIES,\n serviceName: \"fiscal-categories\",\n url: \"party/v1/fiscal-categories?party-type-code={0}&country-code={1}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_MAIL_TYPES,\n serviceName: \"mail-types\",\n url: \"party/v1/mail-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_PHONE_TYPES,\n serviceName: \"phone-types\",\n url: \"party/v1/phone-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_IDENTIFICATION_TYPES,\n serviceName: \"identification-types\",\n url: \"party/v1/identification-types?party-type-code={0}&country-code={1}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_RELATIONS,\n serviceName: \"parties/relations\",\n url: \"party/v1/parties/{0}/relations\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_NOTES,\n serviceName: \"parties/notes\",\n url: \"party/v1/parties/{0}/notes\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_FILES,\n serviceName: \"parties/files\",\n url: \"party/v1/parties/{0}/files\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.UPDATE_NOTES,\n serviceName: \"parties/notes\",\n url: \"party/v1/parties/{0}/notes\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.UPDATE_FILES,\n serviceName: \"parties/files\",\n url: \"party/v1/parties/{0}/files\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.ADD_RELATION_WITH_EXISTING_PARTY,\n serviceName: \"parties/relations\",\n url: \"party/v1/parties/{0}/relations\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_RELATIONS_BY_PARTY_CODE,\n serviceName: \"parties/relations\",\n url: \"party/v1/parties/{0}/relations\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.REMOVE_RELATION,\n serviceName: \"parties/relations/disable\",\n url: \"party/v1/parties/{0}/relations/disable\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_FILE,\n serviceName: \"parties/file\",\n url: \"party/v1/parties/{0}/file/{1}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.SEARCH_ORGANIZATION,\n serviceName: \"organisations\",\n url: \"party/v1/organisations\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ORGANIZATION_TYPES,\n serviceName: \"organisation-types\",\n url: \"party/v1/organisation-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.CREATE_ORGANIZATION,\n serviceName: \"organisations\",\n url: \"party/v1/organisations\",\n method: methods.POST,\n module: modules.PARTY\n}, {\n endpoint: endpoints.UPDATE_ORGANIZATION,\n serviceName: \"organisations\",\n url: \"party/v1/organisations/{0}\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ORGANIZATION_BY_CODE,\n serviceName: \"organisations\",\n url: \"party/v1/organisations/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.ADD_RELATION_WITH_NEW_ORGANIZATION,\n serviceName: \"organisations/relations\",\n url: \"party/v1/organisations/{0}/relations\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.UPDATE_PERSON,\n serviceName: \"individuals\",\n url: \"party/v1/individuals/{0}\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.SEARCH_PERSON,\n serviceName: \"individuals\",\n url: \"party/v1/individuals\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_PERSON_BY_CODE,\n serviceName: \"individuals\",\n url: \"party/v1/individuals/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_GENDERS,\n serviceName: \"genders\",\n url: \"party/v1/genders\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_MARITAL_STATUSES,\n serviceName: \"marital-statuses\",\n url: \"party/v1/marital-statuses\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_WORKER_TYPES,\n serviceName: \"worker-types\",\n url: \"party/v1/worker-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ECONOMIC_CLASSES,\n serviceName: \"economic-classes\",\n url: \"party/v1/economic-classes\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_RELATION_TYPES,\n serviceName: \"relation-types\",\n url: \"party/v1/relation-types/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.ADD_RELATION_WITH_NEW_PERSON,\n serviceName: \"individuals/relations\",\n url: \"party/v1/individuals/{0}/relations\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_POLICY_PROCESSES,\n serviceName: \"policy-statuses\",\n url: \"policy/v1/policy-statuses\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_COUNTRIES,\n serviceName: \"countries\",\n url: \"location/v1/countries\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_COUNTRY_BY_CODE,\n serviceName: \"countries\",\n url: \"location/v1/countries/{0}\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_PROVINCES,\n serviceName: \"countries/provinces\",\n url: \"location/v1/countries/{0}/provinces\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_CITIES,\n serviceName: \"provinces/cities\",\n url: \"location/v1/provinces/{0}/cities\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_POSTAL_CODES,\n serviceName: \"cities/postal-codes\",\n url: \"location/v1/cities/{0}/postal-codes\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ADDRESSES_BY_PARTY_CODE,\n serviceName: \"party/addresses\",\n url: \"location/v1/party/{0}/addresses\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_ADDRESS_TYPES,\n serviceName: \"address-types\",\n url: \"location/v1/address-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_PAYMENT_METHODS_BY_PARTY_CODE,\n serviceName: \"parties/payment-methods\",\n url: \"party/v1/parties/{0}/payment-methods\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_CREDIT_CARD_TYPES,\n serviceName: \"credit-card-types\",\n url: \"finance/v1/credit-card-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_CARD_PROVIDERS,\n serviceName: \"card-providers\",\n url: \"finance/v1/card-providers\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.UPDATE_PAYMENTS,\n serviceName: \"parties/payment-methods\",\n url: \"party/v1/parties/{0}/payment-methods\",\n method: methods.PUT,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_BANKS,\n serviceName: \"banks\",\n url: \"finance/v1/banks\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_CURRENCIES,\n serviceName: \"currencies\",\n url: \"finance/v1/currencies\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_BANK_ACCOUNT_TYPES,\n serviceName: \"bank-account-types\",\n url: \"finance/v1/bank-account-types\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.GET_BANK_BRANCHES,\n serviceName: \"banks/branches\",\n url: \"finance/v1/banks/{0}/branches\",\n method: methods.GET,\n module: modules.PARTY\n}, {\n endpoint: endpoints.SEARCH_INTERMEDIARIES,\n serviceName: \"intermediary\",\n url: \"intermediary/v1/intermediary\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_PERSON_INTERMEDIARY_BY_CODE,\n serviceName: \"intermediary-individual\",\n url: \"intermediary/v1/intermediary-individual/{0}\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,\n serviceName: \"intermediary-organisation\",\n url: \"intermediary/v1/intermediary-organisation/{0}\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_INTERMEDIARIES_GROUPS,\n serviceName: \"intermediary-groups\",\n url: \"intermediary/v1/intermediary-groups\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_INTERMEDIARIES_ROLES,\n serviceName: \"intermediary-roles\",\n url: \"intermediary/v1/intermediary-roles\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_INTERMEDIARY_STRUCTURES,\n serviceName: \"intermediary-structures\",\n url: \"intermediary/v1/intermediary/{0}/commercial-structures\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_INTERMEDIARIES_STATES,\n serviceName: \"commercial-structure-statuses\",\n url: \"intermediary/v1/commercial-structure-statuses\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.GET_INTERMEDIARIES_TYPES,\n serviceName: \"intermediary-types\",\n url: \"intermediary/v1/intermediary-types\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,\n serviceName: \"intermediary-party-association\",\n url: \"intermediary/v1/intermediary-party-association\",\n method: methods.POST,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.CREATE_INTERMEDIARY_WITH_WITH_PERSON,\n serviceName: \"intermediary-individual\",\n url: \"intermediary/v1/intermediary-individual\",\n method: methods.POST,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,\n serviceName: \"intermediary-organisation\",\n url: \"intermediary/v1/intermediary-organisation\",\n method: methods.POST,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.UPDATE_INTERMEDIARY,\n serviceName: \"intermediary\",\n url: \"intermediary/v1/intermediary/{0}\",\n method: methods.PUT,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.SEARCH_COMMERCIAL_STRUCTURE,\n serviceName: \"commercial-structures\",\n url: \"intermediary/v1/commercial-structures\",\n method: methods.GET,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.CREATE_COMMERCIAL_STRUCTURE,\n serviceName: \"commercial-structures\",\n url: \"intermediary/v1/commercial-structures\",\n method: methods.POST,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.GET_COMMERCIAL_STRUCTURE_STATUSES,\n serviceName: \"commercial-structure-statuses\",\n url: \"intermediary/v1/commercial-structure-statuses\",\n method: methods.GET,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.GET_COMMERCIAL_STRUCTURES_BY_CODE,\n serviceName: \"commercial-structures\",\n url: \"intermediary/v1/commercial-structures/{0}\",\n method: methods.GET,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.UPDATE_COMMERCIAL_STRUCTURE,\n serviceName: \"commercial-structures\",\n url: \"intermediary/v1/commercial-structures/{0}\",\n method: methods.PUT,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,\n serviceName: \"commercial-structures/intermediaries\",\n url: \"intermediary/v1/commercial-structures/{0}/intermediaries\",\n method: methods.PUT,\n module: modules.COMMERCIAL_STRUCTURE\n}, {\n endpoint: endpoints.SEARCH_POLICIES,\n serviceName: \"policies\",\n url: \"policy/v1/policies\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_SECTIONS,\n serviceName: \"sections\",\n url: \"product/v1/sections\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_SUBSECTIONS,\n serviceName: \"sections/subsections\",\n url: \"product/v1/sections/{0}/subsections\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_PROCESSES,\n serviceName: \"policy-statuses\",\n url: \"policy/v1/policy-statuses\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_PRODUCTS,\n serviceName: \"subsections/products\",\n url: \"product/v1/subsections/{0}/products\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_VALIDITY_TYPES,\n serviceName: \"policy-validities\",\n url: \"policy/v1/policy-validities\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_CARACTERS,\n serviceName: \"wording-types\",\n url: \"product/v1/wording-types\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.SEARCH_POLICY_GENERAL_CONDITIONS,\n serviceName: \"wordings\",\n url: \"/product/v1/products/{0}/wordings\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_TYPE_OF_DOCUMENTATION,\n serviceName: \"file-types\",\n url: \"policy/v1/file-types\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_PAYMENT_FREQUENCIES,\n serviceName: \"payment-frequencies\",\n url: \"policy/v1/payment-frequencies\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ASSOCIATE_TERMS_CONDITION,\n serviceName: \"terms\",\n url: \"policy/v1/policies/{0}/terms\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ASSOCIATE_EXPENSES,\n serviceName: \"expenses\",\n url: \"policy/v1/policies/{0}/expenses\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ASSOCIATE_COVERAGE,\n serviceName: \"coverages\",\n url: \"policy-life/v1/policies/{0}/coverages\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_COVERAGES,\n serviceName: \"coverages\",\n url: \"product/v1/products/{0}/coverages\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_EXPENSEVALUES,\n serviceName: \"expenses\",\n url: \"/product/v1/products/{0}/expenses\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_MORTALITY_TABLE,\n serviceName: \"mortality-tables\",\n url: \"policy-life/v1/mortality-tables\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP1,\n serviceName: \"policies\",\n url: \"policy/v1/policies\",\n method: methods.POST,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP2,\n serviceName: \"policies/roles\",\n url: \"policy/v1/policies/{0}/roles\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP3,\n serviceName: \"policies/collections\",\n url: \"policy/v1/policies/{0}/collections\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP4,\n serviceName: \"policies/commercial-structures\",\n url: \"policy/v1/policies/{0}/commercial-structures\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP5,\n serviceName: \"policies/products\",\n url: \"policy-life/v1/policies/{0}/products\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP6,\n serviceName: \"policies/coverages\",\n url: \"policy-life/v1/policies/{0}/coverages\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP7,\n serviceName: \"policies/insurables\",\n url: \"policy-life/v1/policies/{0}/insurables\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP8,\n serviceName: \"policies/expenses\",\n url: \"policy/v1/policies/{0}/expenses\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP9,\n serviceName: \"policies/wordings\",\n url: \"policy/v1/policies/{0}/wordings\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP10,\n serviceName: \"policies/terms\",\n url: \"policy/v1/policies/{0}/terms\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_STEP11,\n serviceName: \"policies/documentation\",\n url: \"policy/v1/policies/{0}/documentation\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP1_DATA,\n serviceName: \"policies\",\n url: \"policy/v1/policies/{0}\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP2_DATA,\n serviceName: \"policies/roles\",\n url: \"policy/v1/policies/{0}/roles\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP3_DATA,\n serviceName: \"policies/collections\",\n url: \"policy/v1/policies/{0}/collections\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP4_DATA,\n serviceName: \"policies/commercial-structures\",\n url: \"policy/v1/policies/{0}/commercial-structures\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP5_DATA,\n serviceName: \"policies/products\",\n url: \"policy/v1/policies/{0}/products\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP6_DATA,\n serviceName: \"policies/coverages\",\n url: \"policy-life/v1/policies/{0}/coverages\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP7_DATA,\n serviceName: \"policies/insurables\",\n url: \"policy-life/v1/policies/{0}/insurables\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP9_DATA,\n serviceName: \"policies/wordings\",\n url: \"policy/v1/policies/{0}/wordings\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP11_DATA,\n serviceName: \"policies/documentation\",\n url: \"policy/v1/policies/{0}/documentation\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_STEP11_FILE,\n serviceName: \"policies/file\",\n url: \"policy/v1/policies/{0}/file/{1}\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.UPDATE_POLICY_STEP1,\n serviceName: \"policies\",\n url: \"policy/v1/policies/{0}\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ISURED_PERSONS,\n serviceName: \"insurables\",\n url: \"policy-life/v1/products/{0}/insurables\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.UPDATE_PARTY,\n serviceName: \"parties\",\n url: \"policy/v1/parties/{0}\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_DETAILS,\n serviceName: \"policies/details\",\n url: \"policy-life/v1/policies/{0}/details\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.UPDATE_PAYMENTS,\n serviceName: \"policies/collections\",\n url: \"policy/v1/policies/collections\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.CREATE_POLICY_RISK,\n serviceName: \"policies\",\n url: \"policy-life/v1/policies/{0}/insureds\",\n method: methods.POST,\n module: modules.POLICY\n}, {\n endpoint: endpoints.ACTIVATE_POLICY,\n serviceName: \"policies/activate\",\n url: \"policy-life/v1/policies/{0}/activate\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.COMPLETE_POLICY,\n serviceName: \"policies/complete\",\n url: \"/policy-life/v1/policies/{0}/complete\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.SET_POLICY_BUILDING,\n serviceName: \"policies/build\",\n url: \"policy-life/v1/policies/{0}/build\",\n method: methods.PUT,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_POLICY_ROLES,\n serviceName: \"policies/roles\",\n url: \"policy/v1/policies/{0}/roles\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ASSURED_LIST,\n serviceName: \"insureds\",\n url: \"policy-life/v1/policies/{0}/insureds\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ADHERENTS,\n serviceName: \"adherents\",\n url: \"policy-life/v1/adherents/{0}\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_OWNERS,\n serviceName: \"owners\",\n url: \"policy-life/v1/owners/{0}\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.GET_ADHERENTS_BY_OWNER,\n serviceName: \"owners/adherents\",\n url: \"policy-life/v1/owners/{0}/adherents\",\n method: methods.GET,\n module: modules.POLICY\n}, {\n endpoint: endpoints.SEARCH_ACCOUNT_OFFICERS,\n serviceName: \"account-officers\",\n url: \"intermediary/v1/account-officers\",\n method: methods.GET,\n module: modules.INTERMEDIARY\n}, {\n endpoint: endpoints.CREATE_PRODUCT,\n serviceName: \"configurator-product-creation\",\n // modificar cuando agregan service para modulo configurator\n url: \"policy-life/v1/products\",\n method: methods.POST,\n module: modules.CONFIGURATOR\n}];\n\n//# sourceURL=webpack://sysone-api-mapper/./servicesData.js?");
|
|
50
53
|
|
|
51
54
|
/***/ }),
|
|
52
55
|
|
|
56
|
+
/***/ "./src/adapters/createApiAdapter.ts":
|
|
57
|
+
/*!******************************************!*\
|
|
58
|
+
!*** ./src/adapters/createApiAdapter.ts ***!
|
|
59
|
+
\******************************************/
|
|
60
|
+
/***/ (() => {
|
|
61
|
+
|
|
62
|
+
eval("throw new Error(\"Module build failed (from ./node_modules/ts-loader/index.js):\\nError: TypeScript emitted no output for C:\\\\Users\\\\carli\\\\Documents\\\\Programacion\\\\Sysone-Api-Mapper\\\\api-mapper\\\\src\\\\adapters\\\\createApiAdapter.ts.\\n at makeSourceMapAndFinish (C:\\\\Users\\\\carli\\\\Documents\\\\Programacion\\\\Sysone-Api-Mapper\\\\api-mapper\\\\node_modules\\\\ts-loader\\\\dist\\\\index.js:55:18)\\n at successLoader (C:\\\\Users\\\\carli\\\\Documents\\\\Programacion\\\\Sysone-Api-Mapper\\\\api-mapper\\\\node_modules\\\\ts-loader\\\\dist\\\\index.js:42:5)\\n at Object.loader (C:\\\\Users\\\\carli\\\\Documents\\\\Programacion\\\\Sysone-Api-Mapper\\\\api-mapper\\\\node_modules\\\\ts-loader\\\\dist\\\\index.js:23:5)\");\n\n//# sourceURL=webpack://sysone-api-mapper/./src/adapters/createApiAdapter.ts?");
|
|
63
|
+
|
|
64
|
+
/***/ }),
|
|
65
|
+
|
|
66
|
+
/***/ "./src/contexts/apiContext.js":
|
|
67
|
+
/*!************************************!*\
|
|
68
|
+
!*** ./src/contexts/apiContext.js ***!
|
|
69
|
+
\************************************/
|
|
70
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
71
|
+
|
|
72
|
+
"use strict";
|
|
73
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ApiContext: () => (/* binding */ ApiContext),\n/* harmony export */ useApi: () => (/* binding */ useApi)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar ApiContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);\nvar useApi = function useApi() {\n var ctx = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ApiContext);\n if (!ctx) throw new Error(\"ApiContext not found\");\n return ctx;\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/contexts/apiContext.js?");
|
|
74
|
+
|
|
75
|
+
/***/ }),
|
|
76
|
+
|
|
53
77
|
/***/ "./src/mapper/Mapper.js":
|
|
54
78
|
/*!******************************!*\
|
|
55
79
|
!*** ./src/mapper/Mapper.js ***!
|
|
56
80
|
\******************************/
|
|
57
81
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
58
82
|
|
|
59
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ apiMapper: () => (/* binding */ apiMapper),\n/* harmony export */ configureApiMapper: () => (/* binding */ configureApiMapper)\n/* harmony export */ });\n/* harmony import */ var _axiosInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../axiosInstance */ \"./axiosInstance.js\");\n/* harmony import */ var _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./endpointsConfig */ \"./src/mapper/endpointsConfig.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _excluded = [\"mappedParams\", \"responseType\", \"headers\"];\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\n\n\nvar apiConfig = null;\nvar configureApiMapper = function configureApiMapper(config) {\n if (!(config !== null && config !== void 0 && config.baseURL)) {\n throw new Error(\"apiMapper requires baseURL\");\n }\n apiConfig = {\n baseURL: config.baseURL,\n headers: config.headers || {}\n };\n};\nvar getConfig = function getConfig() {\n if (!apiConfig) {\n throw new Error(\"apiMapper not configured. Call configureApiMapper() first.\");\n }\n return apiConfig;\n};\n\n/**\r\n * Normaliza tenant (ej: \"cnp/foo\" → \"cnp\")\r\n */\nvar normalizeTenant = function normalizeTenant(tenant) {\n if (!tenant || typeof tenant !== \"string\") return tenant;\n return tenant.split(\"/\")[0];\n};\nvar getUrl = function getUrl(serviceUrl, routeParams) {\n if (!routeParams || routeParams.length === 0) return serviceUrl;\n return serviceUrl.replace(/{(\\d+)}/g, function (match, index) {\n return routeParams[index] !== undefined ? routeParams[index] : match;\n });\n};\nvar apiMapper = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointCode, tenant, routeParams) {\n var _configData$normalize;\n var params,\n additionalHeaders,\n configData,\n normalizedTenant,\n endpointData,\n _getConfig,\n baseURL,\n headers,\n axiosConfig,\n url,\n _endpointData$request,\n mappedParams,\n responseType,\n requestHeaders,\n otherOptions,\n response,\n _endpointData$request2,\n mappedPostParams,\n mappedBody,\n _requestHeaders,\n _response,\n _response2,\n _response3,\n _args = arguments;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n params = _args.length > 3 && _args[3] !== undefined ? _args[3] : null;\n additionalHeaders = _args.length > 4 && _args[4] !== undefined ? _args[4] : {};\n /* -------- Endpoint config -------- */\n configData = _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.tenantsConfig[endpointCode];\n if (configData) {\n _context.next = 5;\n break;\n }\n throw new Error(\"Endpoint no configurado: \".concat(endpointCode));\n case 5:\n normalizedTenant = normalizeTenant(tenant);\n endpointData = (_configData$normalize = configData[normalizedTenant]) !== null && _configData$normalize !== void 0 ? _configData$normalize : configData[\"default\"];\n if (endpointData) {\n _context.next = 9;\n break;\n }\n throw new Error(\"No hay configuraci\\xF3n para endpoint \".concat(endpointCode, \" y tenant \").concat(normalizedTenant));\n case 9:\n /* -------- Axios config -------- */\n _getConfig = getConfig(), baseURL = _getConfig.baseURL, headers = _getConfig.headers;\n axiosConfig = {\n baseURL: baseURL,\n headers: _objectSpread(_objectSpread({}, headers), additionalHeaders),\n validateStatus: function validateStatus(s) {\n return s < 500;\n }\n };\n url = getUrl(endpointData.url, routeParams);\n /* -------- Request -------- */\n _context.t0 = endpointData.method;\n _context.next = _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.GET ? 15 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.POST ? 20 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.PUT ? 25 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.DELETE ? 29 : 33;\n break;\n case 15:\n _endpointData$request = endpointData.requestMapper(params), mappedParams = _endpointData$request.mappedParams, responseType = _endpointData$request.responseType, requestHeaders = _endpointData$request.headers, otherOptions = _objectWithoutProperties(_endpointData$request, _excluded);\n _context.next = 18;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].get(url, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n params: mappedParams,\n responseType: responseType,\n headers: _objectSpread(_objectSpread({}, axiosConfig.headers), requestHeaders)\n }, otherOptions));\n case 18:\n response = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(response));\n case 20:\n _endpointData$request2 = endpointData.requestMapper(params), mappedPostParams = _endpointData$request2.mappedPostParams, mappedBody = _endpointData$request2.mappedBody, _requestHeaders = _endpointData$request2.headers;\n _context.next = 23;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].post(url, mappedBody, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n params: mappedPostParams,\n headers: _objectSpread(_objectSpread({}, axiosConfig.headers), _requestHeaders)\n }));\n case 23:\n _response = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response.data));\n case 25:\n _context.next = 27;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].put(url, params, axiosConfig);\n case 27:\n _response2 = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response2.data));\n case 29:\n _context.next = 31;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"][\"delete\"](url, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n data: params\n }));\n case 31:\n _response3 = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response3.data));\n case 33:\n throw new Error(\"HTTP method not supported\");\n case 34:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function apiMapper(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/Mapper.js?");
|
|
83
|
+
"use strict";
|
|
84
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ apiMapper: () => (/* binding */ apiMapper),\n/* harmony export */ configureApiMapper: () => (/* binding */ configureApiMapper)\n/* harmony export */ });\n/* harmony import */ var _axiosInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../axiosInstance */ \"./axiosInstance.js\");\n/* harmony import */ var _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./endpointsConfig */ \"./src/mapper/endpointsConfig.js\");\nvar _excluded = [\"mappedParams\", \"responseType\", \"headers\"];\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\n\nvar apiConfig = null;\nvar configureApiMapper = function configureApiMapper(config) {\n var _apiConfig;\n apiConfig = _objectSpread(_objectSpread(_objectSpread({}, apiConfig), config), {}, {\n headers: _objectSpread(_objectSpread({}, ((_apiConfig = apiConfig) === null || _apiConfig === void 0 ? void 0 : _apiConfig.headers) || {}), (config === null || config === void 0 ? void 0 : config.headers) || {})\n });\n};\nvar getConfig = function getConfig() {\n if (!apiConfig) {\n throw new Error(\"apiMapper not configured. Call configureApiMapper() first.\");\n }\n return apiConfig;\n};\n\n/**\r\n * Normaliza tenant (ej: \"cnp/foo\" → \"cnp\")\r\n */\nvar normalizeTenant = function normalizeTenant(tenant) {\n if (!tenant || typeof tenant !== \"string\") return tenant;\n return tenant.split(\"/\")[0];\n};\nvar getUrl = function getUrl(serviceUrl, routeParams) {\n if (!routeParams || routeParams.length === 0) return serviceUrl;\n return serviceUrl.replace(/{(\\d+)}/g, function (match, index) {\n return routeParams[index] !== undefined ? routeParams[index] : match;\n });\n};\nvar apiMapper = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(endpointCode, tenant, routeParams) {\n var _configData$normalize;\n var params,\n additionalHeaders,\n configData,\n normalizedTenant,\n endpointData,\n _getConfig,\n baseURL,\n headers,\n axiosConfig,\n url,\n _endpointData$request,\n mappedParams,\n responseType,\n requestHeaders,\n otherOptions,\n response,\n _endpointData$request2,\n mappedPostParams,\n mappedBody,\n _requestHeaders,\n _response,\n _response2,\n _response3,\n _args = arguments;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n params = _args.length > 3 && _args[3] !== undefined ? _args[3] : null;\n additionalHeaders = _args.length > 4 && _args[4] !== undefined ? _args[4] : {};\n /* -------- Endpoint config -------- */\n configData = _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.tenantsConfig[endpointCode];\n if (configData) {\n _context.next = 5;\n break;\n }\n throw new Error(\"Endpoint no configurado: \".concat(endpointCode));\n case 5:\n normalizedTenant = normalizeTenant(tenant);\n endpointData = (_configData$normalize = configData[normalizedTenant]) !== null && _configData$normalize !== void 0 ? _configData$normalize : configData[\"default\"];\n if (endpointData) {\n _context.next = 9;\n break;\n }\n throw new Error(\"No hay configuraci\\xF3n para endpoint \".concat(endpointCode, \" y tenant \").concat(normalizedTenant));\n case 9:\n /* -------- Axios config -------- */\n _getConfig = getConfig(), baseURL = _getConfig.baseURL, headers = _getConfig.headers;\n axiosConfig = {\n baseURL: baseURL,\n headers: _objectSpread(_objectSpread({}, headers), additionalHeaders),\n validateStatus: function validateStatus(s) {\n return s < 500;\n }\n };\n url = getUrl(endpointData.url, routeParams);\n /* -------- Request -------- */\n _context.t0 = endpointData.method;\n _context.next = _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.GET ? 15 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.POST ? 20 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.PUT ? 25 : _context.t0 === _endpointsConfig__WEBPACK_IMPORTED_MODULE_1__.methods.DELETE ? 29 : 33;\n break;\n case 15:\n _endpointData$request = endpointData.requestMapper(params), mappedParams = _endpointData$request.mappedParams, responseType = _endpointData$request.responseType, requestHeaders = _endpointData$request.headers, otherOptions = _objectWithoutProperties(_endpointData$request, _excluded);\n _context.next = 18;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].get(url, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n params: mappedParams,\n responseType: responseType,\n headers: _objectSpread(_objectSpread({}, axiosConfig.headers), requestHeaders)\n }, otherOptions));\n case 18:\n response = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(response));\n case 20:\n _endpointData$request2 = endpointData.requestMapper(params), mappedPostParams = _endpointData$request2.mappedPostParams, mappedBody = _endpointData$request2.mappedBody, _requestHeaders = _endpointData$request2.headers;\n _context.next = 23;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].post(url, mappedBody, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n params: mappedPostParams,\n headers: _objectSpread(_objectSpread({}, axiosConfig.headers), _requestHeaders)\n }));\n case 23:\n _response = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response.data));\n case 25:\n _context.next = 27;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"].put(url, params, axiosConfig);\n case 27:\n _response2 = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response2.data));\n case 29:\n _context.next = 31;\n return _axiosInstance__WEBPACK_IMPORTED_MODULE_0__[\"default\"][\"delete\"](url, _objectSpread(_objectSpread({}, axiosConfig), {}, {\n data: params\n }));\n case 31:\n _response3 = _context.sent;\n return _context.abrupt(\"return\", endpointData.responseMapper(_response3.data));\n case 33:\n throw new Error(\"HTTP method not supported\");\n case 34:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function apiMapper(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/Mapper.js?");
|
|
60
85
|
|
|
61
86
|
/***/ }),
|
|
62
87
|
|
|
@@ -66,6 +91,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
66
91
|
\***************************************/
|
|
67
92
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
68
93
|
|
|
94
|
+
"use strict";
|
|
69
95
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ methods: () => (/* binding */ methods),\n/* harmony export */ tenantsConfig: () => (/* binding */ tenantsConfig)\n/* harmony export */ });\n/* harmony import */ var _modules_billing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/billing */ \"./src/mapper/modules/billing/index.js\");\n/* harmony import */ var _modules_claim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/claim */ \"./src/mapper/modules/claim/index.js\");\n/* harmony import */ var _modules_general__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/general */ \"./src/mapper/modules/general/index.js\");\n/* harmony import */ var _modules_party__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/party */ \"./src/mapper/modules/party/index.js\");\n/* harmony import */ var _modules_policy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/policy */ \"./src/mapper/modules/policy/index.js\");\n/* harmony import */ var _modules_quotation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/quotation */ \"./src/mapper/modules/quotation/index.js\");\n/* harmony import */ var _modules_request__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/request */ \"./src/mapper/modules/request/index.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n// Import modules organized by functionality\n\n\n\n\n\n\n\nvar methods = {\n GET: \"GET\",\n POST: \"POST\",\n PUT: \"PUT\",\n DELETE: \"DELETE\"\n};\n\n// ============================================================================\n// CONFIGURATION MODULE\n// ============================================================================\nvar configurationModule = {\n GET_MODULES: {\n \"default\": {\n url: 'ui-configuration/v1/platforms/link-one/modules',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'ui-configuration/v1/modules',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_general__WEBPACK_IMPORTED_MODULE_2__.getModules_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_POWERBI_TOKEN: {\n cnp: {\n url: 'ui-configuration/v1/embedded-reports',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n }\n};\n\n// ============================================================================\n// BILLING MODULE\n// ============================================================================\nvar billingModule = {\n GET_BILLINGS: {\n \"default\": {\n url: 'billing/v1/billing',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy/{0}/{1}/payments',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getBillingsParams)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getBillingsResponse)(response.data);\n }\n }\n },\n GET_POLICY_COLLECTIONS: {\n \"default\": {\n url: '/collection/v1/collections',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy/{0}/{1}/payments',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getBillingsParams)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getCollecionsResponse)(response.data);\n }\n }\n },\n GET_DEBTORS: {\n \"default\": {\n url: 'billing/v1/billing',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy/{0}/{1}/payments',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getBillingsParams)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getDebtorsResponse)(response.data);\n }\n }\n },\n GET_BILLING_TYPE: {\n \"default\": {\n url: 'billing/v1/billing-types',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/genders',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_billing__WEBPACK_IMPORTED_MODULE_0__.getBillingTypeResponse)(response.data);\n }\n }\n }\n};\n\n// ============================================================================\n// INTERMEDIARY MODULE\n// ============================================================================\nvar intermediaryModule = {\n GET_INTERMEDIARY_STRUCTURE: {\n \"default\": {\n url: 'intermediary/v1/intermediary/{0}/commercial-structures',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_INTERMEDIARY_BY_CODE: {\n \"default\": {\n url: 'intermediary/v1/intermediary/{0}',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_COMMERCIAL_STRUCTURE: {\n \"default\": {\n url: 'intermediary/v1/commercial-structures',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n }\n};\n\n// ============================================================================\n// PARTY MODULE\n// ============================================================================\nvar partyModule = {\n GET_CURRENCIES: {\n \"default\": {\n url: 'finance/v1/currencies',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/currencies',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-currencies\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_GENDERS: {\n \"default\": {\n url: 'party/v1/genders',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1genders/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/genders',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getGenders)(response.data);\n }\n }\n },\n GET_IDENTIFICATION_TYPES: {\n \"default\": {\n url: 'party/v1/identification-types',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1identification-types/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/identification-types',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-identification-types\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getIdentificationTypes)(response.data);\n }\n }\n },\n GET_COUNTRIES: {\n \"default\": {\n url: 'location/v1/countries',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/countries',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getCountries)(response.data);\n }\n }\n },\n GET_PROVINCES: {\n \"default\": {\n url: 'location/v1/countries/{0}/provinces',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/location/v1/open-api.html#/paths/~1v1~1countries/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/countries/{0}/provinces',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-countries\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getProvinces)(response.data);\n }\n }\n },\n GET_MARITAL_STATUS: {\n \"default\": {\n url: 'party/v1/marital-statuses',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1marital-statuses/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/marital-statuses',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-marital-statuses\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getMaritalStatuses)(response.data);\n }\n }\n },\n GET_ACTIVITY: {\n \"default\": {\n url: 'party/v1/sectors',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/activities',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getActivityList)(response.data);\n }\n }\n },\n GET_BLOOD_PRESSURES: {\n cnp: {\n url: 'party/v1/blood-pressures',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-blood-pressures\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_PAYMENT_FRECUENCIES: {\n \"default\": {\n url: 'quotation/v1/payment-frequencies',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/payment-frequencies',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-frequencies\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getPaymentFrecuencies)(response.data);\n }\n }\n },\n GET_PAYMENT_TYPES: {\n cnp: {\n url: 'party/v1/payment-types',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-payment-types\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_BRANCHES: {\n cnp: {\n url: 'party/v1/branches',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-branches\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_PARTIES: {\n \"default\": {\n url: 'party/v1/{0}',\n method: methods.GET,\n source: \"https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1individuals/get\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/parties',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-parties\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.partySearchParams)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.partySearch)(response.data);\n }\n }\n },\n POST_AGE: {\n \"default\": {\n url: '',\n method: methods.POST,\n source: '',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: 'party/v1/age',\n method: methods.POST,\n source: 'https://developers-test.cnp.com.ar/api-details#api=party-api&operation=post-v1-age',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n }\n};\n\n// ============================================================================\n// PRODUCT MODULE\n// ============================================================================\nvar productModule = {\n GET_COVERAGES: {\n \"default\": {\n url: 'product/v1/products/{0}/coverages',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/products/{0}/coverages',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getCoverages)(response.data);\n }\n }\n },\n GET_DISTRIBUTION_LIMITS: {\n cnp: {\n url: 'party/v1/products/{0}/savings-distribution',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-coverages-currencycode-currencycode-smoker-smoker\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_PRODUCTS_BY_SUBSECTIONS: {\n \"default\": {\n url: 'product/v1/products',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/product/v1/open-api.html#/paths/~1v1~1products/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'party/v1/subsections/{0}/products',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-subsections-code-products\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_party__WEBPACK_IMPORTED_MODULE_3__.getProductsBySubsections_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getProductsBySubsections)(response.data);\n }\n }\n },\n GET_PRODUCT_PARAMETERS: {\n cnp: {\n url: \"party/v1/products/{0}\",\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getProductParameters)(response.data);\n }\n }\n },\n GET_MONETARY_GOALS: {\n cnp: {\n url: 'party/v1/products/{0}/monetary-goals',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-monetary-goals\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_SAVINGS_DISTRIBUTION: {\n cnp: {\n url: 'party/v1/products/{0}/savings-distribution',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-products-code-savings-distribution-goalcode-goalcode-goalamount-goala\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_QUOTATION_BENEFITS: {\n cnp: {\n url: 'party/v1/quotation-benefits',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=party-api&operation=get-v1-quotation-benefits\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n }\n};\n\n// ============================================================================\n// POLICY MODULE\n// ============================================================================\nvar policyModule = {\n GET_ENDORSEMENTS: {\n \"default\": {\n url: 'policy/v1/policies/{0}/endorsements',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy/{0}/{1}/endorsements',\n method: methods.GET,\n source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getEndorsements_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getEndorsements_CNP)(response.data);\n }\n }\n },\n GET_INSUREDS: {\n \"default\": {\n url: '{0}/v1/policies/{1}/insureds',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy/{0}/{1}/policy-insured',\n method: methods.GET,\n source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getInsureds_CNP_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getInsureds_CNP)(response.data);\n }\n }\n },\n GET_POLICIES: {\n \"default\": {\n url: 'policy/v1/policies',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicies_CNP_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicies_CNP)(response.data);\n }\n }\n },\n GET_POLICY_DETAIL: {\n \"default\": {\n url: '/{0}/v1/policies/{1}/details',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyDetail_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyDetail_CNP)(response.data);\n }\n }\n },\n GET_COLLECTIONS: {\n \"default\": {\n url: '/policy/v1/policies/{0}/collections',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollection_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollection)(response.data);\n }\n }\n },\n GET_POLICY_HOME_COLLECTIVE_DETAIL: {\n \"default\": {\n url: 'policy-home/v1/policies/{0}/details',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollectiveDetail_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollectiveDetail_CNP)(response.data);\n }\n }\n },\n GET_POLICY_HOME_INDIVIDUAL_DETAIL: {\n \"default\": {\n url: 'policy-home/v1/policies/{0}/details',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyIndividualDetail_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyDetail_CNP)(response.data);\n }\n }\n },\n GET_POLICY_LIFE_COLLECTIVE_DETAIL: {\n \"default\": {\n url: 'policy-life/v1/policies/{0}/details',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollectiveDetail_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyCollectiveDetail_CNP)(response.data);\n }\n }\n },\n GET_POLICY_LIFE_INDIVIDUAL_DETAIL: {\n \"default\": {\n url: 'policy-life/v1/policies/{0}/details',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'policy/v1/policy-individual/{0}/{1}/detail',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail\",\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyIndividualDetail_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.getPolicyDetail_CNP)(response.data);\n }\n }\n },\n GET_POLICY_STATUSES: {\n \"default\": {\n url: 'policy/v1/policy-statuses',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_BENEFICIRY_TYPES: {\n cnp: {\n url: 'policy/v1/beneficiary-types',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n POST_INSURED_UPDATE: {\n \"default\": {\n url: 'policy-life/v1/policies/{0}/insureds',\n method: methods.POST,\n requestMapper: null,\n source: 'https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post',\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: 'v1/policy-collective/{0}/{1}/insureds',\n method: methods.POST,\n requestMapper: null,\n source: 'https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds',\n responseMapper: function responseMapper(response) {\n return (0,_modules_policy__WEBPACK_IMPORTED_MODULE_4__.postInsureds_CNP)(response);\n }\n }\n }\n};\n\n// ============================================================================\n// CLAIM MODULE\n// ============================================================================\nvar claimModule = {\n GET_CLAIMS: {\n \"default\": {\n url: 'claim/v1/claims',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/claim/v1/open-api.html',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'claim/v1/claim',\n method: methods.GET,\n source: \"https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize\",\n requestMapper: null,\n responseMapper: function responseMapper(response) {\n return (0,_modules_claim__WEBPACK_IMPORTED_MODULE_1__.getClaims_CNP)(response.data);\n }\n }\n }\n};\n\n// ============================================================================\n// QUOTATION MODULE\n// ============================================================================\nvar quotationModule = {\n GET_QUOTATION_BY_CODE: {\n \"default\": {\n url: 'quotation/v1/quotations/{0}',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'quotation/v1/quotation/standard-plan/{0}',\n method: methods.GET,\n source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getQuotationByCode_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getQuotationByCode)(response.data);\n }\n }\n },\n GET_QUOTATIONS: {\n \"default\": {\n url: 'quotation/v1/quotations',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'quotation/v1/quotations',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getQuotations_Request)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getQuotationsList)(response.data);\n }\n }\n },\n GET_QUOTATION_DETAILS: {\n \"default\": {\n url: '{0}/v1/quotations/{1}',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'quotation/v1/quotations/{0}',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.getQuotationDetail)(response.data);\n }\n }\n },\n GET_SWORN_STATEMENT: {\n cnp: {\n url: 'quotation/v1/quotations/{0}/questionnaires',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_QUOTATION_REPORT: {\n \"default\": {\n url: '{0}/v1/quotations/{1}/report',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request,\n responseType: \"arraybuffer\"\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: '/quotation/v1/quotations/{0}/report',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request,\n headers: {\n 'Accept': 'application/json'\n }\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_CREATE_QUOTATION_STANDARD_PLAN: {\n \"default\": {\n url: 'quotation/v1/quotations',\n method: methods.POST,\n source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: 'quotation/v1/quotation/standard-plan',\n method: methods.POST,\n source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.quotationStandardPlanCreationMapped)(params)\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_CREATE_QUOTATION_VARIABLE_PLAN: {\n \"default\": {\n url: 'quotation/v1/quotations',\n method: methods.POST,\n source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: 'quotation/v1/quotation/variable-plan',\n method: methods.POST,\n source: 'https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan',\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: (0,_modules_quotation__WEBPACK_IMPORTED_MODULE_5__.quotationVariablePlanCreationMapped)(params)\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_CALCULATE_LS: {\n cnp: {\n url: 'quotation/v1/quotations/calculate',\n method: methods.POST,\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_CREATE_QUOTATION_LS: {\n cnp: {\n url: 'quotation/v1/quotations',\n method: methods.POST,\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n }\n};\n\n// ============================================================================\n// REQUEST MODULE\n// ============================================================================\nvar requestModule = {\n GET_REQUESTS_LOOKUP: {\n \"default\": {\n url: 'request/v1/requests',\n method: methods.GET,\n source: 'https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get',\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: 'request/v1/request/savings',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: (0,_modules_request__WEBPACK_IMPORTED_MODULE_6__.getRequest_Params)(request)\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n }\n },\n GET_REQUEST_DETAIL: {\n \"default\": {\n url: '{0}/v1/requests/{1}',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return response.data;\n }\n },\n cnp: {\n url: '/request/v1/request/savings/{0}',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request\n };\n },\n responseMapper: function responseMapper(response) {\n return (0,_modules_request__WEBPACK_IMPORTED_MODULE_6__.getRequestDetail)(response.data);\n }\n }\n },\n GET_REQUEST_REPORT: {\n \"default\": {\n url: '{0}/v1/policies/{1}/certificate',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request,\n responseType: \"arraybuffer\"\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n },\n cnp: {\n url: '/request/v1/request/savings/{0}/report',\n method: methods.GET,\n requestMapper: function requestMapper(request) {\n return {\n mappedParams: request,\n headers: {\n 'Accept': 'application/json'\n }\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_REQUEST_SIGNATURE: {\n cnp: {\n url: '/request/v1/request/savings/{0}/signature',\n method: methods.POST,\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n },\n POST_SEND_REQUEST: {\n cnp: {\n url: '/request/v1/request/savings',\n method: methods.POST,\n requestMapper: function requestMapper(params) {\n return {\n mappedBody: params\n };\n },\n responseMapper: function responseMapper(response) {\n return response;\n }\n }\n }\n};\n\n// ============================================================================\n// MAIN CONFIGURATION EXPORT\n// ============================================================================\nvar tenantsConfig = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, configurationModule), intermediaryModule), partyModule), productModule), policyModule), claimModule), quotationModule), requestModule), billingModule);\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/endpointsConfig.js?");
|
|
70
96
|
|
|
71
97
|
/***/ }),
|
|
@@ -76,6 +102,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
76
102
|
\**********************************************/
|
|
77
103
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
78
104
|
|
|
105
|
+
"use strict";
|
|
79
106
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ mapPaymentFrequency: () => (/* binding */ mapPaymentFrequency),\n/* harmony export */ mapProductCode: () => (/* binding */ mapProductCode),\n/* harmony export */ mapProvinceCode: () => (/* binding */ mapProvinceCode)\n/* harmony export */ });\nvar mapPaymentFrequency = function mapPaymentFrequency(frequencyCode) {\n var mapping = {\n 'ANNUAL': 6,\n 'MONTHLY': 1,\n 'QUARTERLY': 3,\n 'SEMI_ANNUAL': 5\n };\n return mapping[frequencyCode] || 6;\n};\nvar mapProductCode = function mapProductCode(productCode) {\n var mapping = {\n 'SC_SC': 534,\n 'VI_VI_VIDA_IND_1': 120,\n 'OTRO_CODIGO': 0\n };\n return mapping[productCode] || 404;\n};\nvar mapProvinceCode = function mapProvinceCode(provinceCode) {\n var mapping = {\n 'BS_AS': 1,\n 'CABA': 2\n };\n return mapping[provinceCode] || 0;\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/helpers/mappingHelpers.js?");
|
|
80
107
|
|
|
81
108
|
/***/ }),
|
|
@@ -86,6 +113,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
86
113
|
\*********************************************/
|
|
87
114
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
88
115
|
|
|
116
|
+
"use strict";
|
|
89
117
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getBillingTypeResponse: () => (/* binding */ getBillingTypeResponse),\n/* harmony export */ getBillingsParams: () => (/* binding */ getBillingsParams),\n/* harmony export */ getBillingsResponse: () => (/* binding */ getBillingsResponse),\n/* harmony export */ getCollecionsResponse: () => (/* binding */ getCollecionsResponse),\n/* harmony export */ getDebtorsResponse: () => (/* binding */ getDebtorsResponse)\n/* harmony export */ });\nvar getBillingsParams = function getBillingsParams(i) {\n return {};\n};\nvar getBillingsResponse = function getBillingsResponse(data) {\n var values = data.paymentsEndorsement.flatMap(function (endorsement, index) {\n return endorsement.payments.map(function (payment, pIndex) {\n var _payment$expiration;\n return {\n id: \"\".concat(index + 1, \"-\").concat(pIndex + 1),\n // No tiene ID propio, uso el index + 1\n code: \"\".concat(index + 1, \"-\").concat(pIndex + 1),\n // No tiene código propio, uso el index + 1\n billingNumber: payment.installmentNumber,\n billingDate: payment.paymentDate,\n billingExpirationDate: (_payment$expiration = payment.expiration) !== null && _payment$expiration !== void 0 ? _payment$expiration : payment.expirationDate,\n totalAmount: payment.amount,\n remainingAmount: payment.debt,\n paymentStatus: {\n code: payment.amount < 0 ? \"UNPAID\" : \"PAID\",\n // ---- Si el monto es negativo esta pago???\n name: payment.amount < 0 ? \"Sin Pagar\" : \"Pagado\" // ---- Si el monto es negativo esta pago???\n },\n status: {},\n // ----- NO HAY STATUS\n name: \"Sin nombre del pagador\",\n // ----- NO HAY NOMBRE DEL PAGADOR\n policy: {},\n // ----- NO HAY DATOS DE POLIZA\n billingValuesGrouping: [{\n type: {\n name: \"Prima\",\n code: \"PRIME\"\n },\n value: payment.amount // ----- SOLO LLEGA LA PRIMA\n }],\n type: {\n name: \"Factura\",\n code: \"INVOICE\"\n },\n subtype: {},\n exchangeRate: null,\n billingDateFrom: \"N/A\",\n billingDateTo: \"N/A\",\n invoiceBarcode: payment.invoiceBarcode || null\n };\n });\n });\n return {\n values: values,\n total: values.length\n };\n};\nvar getDebtorsResponse = function getDebtorsResponse(data) {\n var values = data.paymentsEndorsement.flatMap(function (endorsement, index) {\n return endorsement.payments.map(function (payment, pIndex) {\n var _payment$expiration2;\n return {\n id: \"\".concat(index + 1, \"-\").concat(pIndex + 1),\n code: \"\".concat(index + 1, \"-\").concat(pIndex + 1),\n billingNumber: payment.installmentNumber,\n billingDate: payment.paymentDate,\n billingExpirationDate: (_payment$expiration2 = payment.expiration) !== null && _payment$expiration2 !== void 0 ? _payment$expiration2 : payment.expirationDate,\n totalAmount: payment.amount,\n remainingAmount: payment.debt,\n paymentStatus: {\n code: payment.debt < 0 ? \"UNPAID\" : \"PAID\",\n name: payment.debt < 0 ? \"Sin Pagar\" : \"Pagado\"\n },\n status: {},\n name: \"Sin nombre del pagador\",\n policy: {},\n billingValuesGrouping: [{\n type: {\n name: \"Prima\",\n code: \"PRIME\"\n },\n value: payment.amount\n }],\n type: {\n name: \"Factura\",\n code: \"INVOICE\"\n },\n subtype: {},\n exchangeRate: null,\n billingDateFrom: \"N/A\",\n billingDateTo: \"N/A\",\n invoiceBarcode: payment.invoiceBarcode || null\n };\n });\n }).filter(function (payment) {\n return (payment === null || payment === void 0 ? void 0 : payment.debt) > 0 || (payment === null || payment === void 0 ? void 0 : payment.remainingAmount) > 0;\n });\n return {\n values: values,\n total: values.length\n };\n};\nvar getCollecionsResponse = function getCollecionsResponse(data) {\n var values = data.paymentsEndorsement.flatMap(function (endorsement, index) {\n return endorsement.payments.map(function (payment, pIndex) {\n return {\n code: \"\".concat(index + 1, \"-\").concat(pIndex + 1),\n amount: payment.amount,\n applyAmount: payment.debt,\n collectionDate: payment.paymentDate,\n collectionNumber: payment.installmentNumber,\n currency: {\n name: \"Peso Argentino\",\n code: \"PESO_ARG\",\n mnemonic: \"ARS\",\n symbol: \"$\"\n },\n name: \"Sin nombre del pagador\",\n paymentType: null,\n policy: {},\n status: {},\n invoiceBarcode: payment.invoiceBarcode || null,\n rejectionReason: payment.rejectionReason || null,\n expirationDate: payment.expirationDate || null\n };\n });\n });\n return {\n values: values,\n total: values.length\n };\n};\nvar getBillingTypeResponse = function getBillingTypeResponse() {\n return {\n types: [{\n name: \"Factura\",\n code: \"INVOICE\",\n operator: null\n }]\n };\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/billing/index.js?");
|
|
90
118
|
|
|
91
119
|
/***/ }),
|
|
@@ -96,6 +124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
96
124
|
\*******************************************/
|
|
97
125
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
98
126
|
|
|
127
|
+
"use strict";
|
|
99
128
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getClaims_CNP: () => (/* binding */ getClaims_CNP)\n/* harmony export */ });\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nvar getClaims_CNP = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {\n var _response$claims;\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n objectMapped = {\n values: response === null || response === void 0 || (_response$claims = response.claims) === null || _response$claims === void 0 ? void 0 : _response$claims.map(function (claim) {\n return {\n claimNumber: claim.claimNumber.toString(),\n policyNumber: claim.policyNumber,\n creationDate: claim.claimDate,\n status: {\n name: claim.status,\n code: \"N/A\"\n }\n };\n })\n };\n return _context.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function getClaims_CNP(_x) {\n return _ref.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/claim/index.js?");
|
|
100
129
|
|
|
101
130
|
/***/ }),
|
|
@@ -106,6 +135,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
106
135
|
\*********************************************/
|
|
107
136
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
108
137
|
|
|
138
|
+
"use strict";
|
|
109
139
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getModules: () => (/* binding */ getModules),\n/* harmony export */ getModules_Request: () => (/* binding */ getModules_Request)\n/* harmony export */ });\nvar getModules = function getModules() {};\nvar getModules_Request = function getModules_Request(params) {\n return {\n roles: params.roles\n };\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/general/index.js?");
|
|
110
140
|
|
|
111
141
|
/***/ }),
|
|
@@ -116,6 +146,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
116
146
|
\*******************************************/
|
|
117
147
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
118
148
|
|
|
149
|
+
"use strict";
|
|
119
150
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getCountries: () => (/* binding */ getCountries),\n/* harmony export */ getCoverages: () => (/* binding */ getCoverages),\n/* harmony export */ getGenders: () => (/* binding */ getGenders),\n/* harmony export */ getIdentificationTypes: () => (/* binding */ getIdentificationTypes),\n/* harmony export */ getMaritalStatuses: () => (/* binding */ getMaritalStatuses),\n/* harmony export */ getProductsBySubsections_Request: () => (/* binding */ getProductsBySubsections_Request),\n/* harmony export */ getProvinces: () => (/* binding */ getProvinces),\n/* harmony export */ partySearch: () => (/* binding */ partySearch),\n/* harmony export */ partySearchParams: () => (/* binding */ partySearchParams)\n/* harmony export */ });\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nvar getIdentificationTypes = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n objectMapped = {\n values: response.types.map(function (a) {\n return {\n code: a.code,\n name: a.name\n };\n })\n };\n return _context.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function getIdentificationTypes(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar getCountries = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n objectMapped = {\n countries: response.countries.map(function (a) {\n return {\n code: a.code,\n name: a.name,\n areaCode: 'N/A'\n };\n })\n };\n return _context2.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return function getCountries(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar getProvinces = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n objectMapped = {\n provinces: response.provinces.map(function (a) {\n return {\n name: a.name,\n code: a.code,\n country: {\n code: a.country.code,\n name: a.country.name,\n areaCode: \"N/A\"\n }\n };\n })\n };\n return _context3.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return function getProvinces(_x3) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar getMaritalStatuses = /*#__PURE__*/function () {\n var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n objectMapped = {\n values: response.statuses.map(function (a) {\n return {\n name: a.name,\n code: a.code\n };\n })\n };\n return _context4.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function getMaritalStatuses(_x4) {\n return _ref4.apply(this, arguments);\n };\n}();\nvar getGenders = /*#__PURE__*/function () {\n var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n objectMapped = {\n values: response.genders.map(function (a) {\n return {\n name: a.name,\n code: a.code\n };\n })\n };\n return _context5.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }));\n return function getGenders(_x5) {\n return _ref5.apply(this, arguments);\n };\n}();\nvar getProductsBySubsections_Request = function getProductsBySubsections_Request(params) {\n return {\n subsectionCode: null\n };\n};\nvar partySearchParams = function partySearchParams(params) {\n return {\n firstName: params.firstName || params.name || null,\n lastName: params.lastName || null,\n identification: params.identificationValue || null\n };\n};\nvar partySearch = function partySearch(res) {\n var _res$parties;\n var objectMapped = {\n values: res === null || res === void 0 || (_res$parties = res.parties) === null || _res$parties === void 0 ? void 0 : _res$parties.map(function (party) {\n var _party$fullName, _party$identification, _party$identification2;\n // Separación por doble espacio\n var _ref6 = (party === null || party === void 0 || (_party$fullName = party.fullName) === null || _party$fullName === void 0 ? void 0 : _party$fullName.split(\" \")) || [],\n _ref7 = _slicedToArray(_ref6, 2),\n lastNamePart = _ref7[0],\n firstNamePart = _ref7[1];\n return {\n activeDate: (party === null || party === void 0 ? void 0 : party.activeDate) || null,\n partyCode: (party === null || party === void 0 ? void 0 : party.code) || null,\n code: (party === null || party === void 0 || (_party$identification = party.identification) === null || _party$identification === void 0 ? void 0 : _party$identification.value) || null,\n firstName: firstNamePart || null,\n lastName: lastNamePart || null,\n identifications: {\n values: [{\n \"default\": true,\n type: {\n code: \"\",\n name: \"\"\n },\n value: (party === null || party === void 0 || (_party$identification2 = party.identification) === null || _party$identification2 === void 0 ? void 0 : _party$identification2.value) || null\n }]\n },\n birthDate: party === null || party === void 0 ? void 0 : party.birthDate,\n insuredCode: party === null || party === void 0 ? void 0 : party.insuredCode\n };\n })\n };\n return objectMapped;\n};\nvar getCoverages = function getCoverages(p) {\n var _p$coverages;\n var objectMapped = {\n coverages: (_p$coverages = p.coverages) === null || _p$coverages === void 0 ? void 0 : _p$coverages.map(function (c) {\n var _c$coverage, _c$coverage2, _c$coverage3;\n return {\n calculatorTypes: [],\n active: c.active,\n coverage: {\n code: (_c$coverage = c.coverage) === null || _c$coverage === void 0 ? void 0 : _c$coverage.code,\n name: (_c$coverage2 = c.coverage) === null || _c$coverage2 === void 0 ? void 0 : _c$coverage2.description,\n description: (_c$coverage3 = c.coverage) === null || _c$coverage3 === void 0 ? void 0 : _c$coverage3.name\n },\n coverageValues: c.coverageValues,\n type: c.type,\n deductibles: null,\n requiredDeductible: null,\n taxPlan: null,\n wordings: []\n };\n })\n };\n return objectMapped;\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/party/index.js?");
|
|
120
151
|
|
|
121
152
|
/***/ }),
|
|
@@ -126,6 +157,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
126
157
|
\********************************************/
|
|
127
158
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
128
159
|
|
|
160
|
+
"use strict";
|
|
129
161
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getEndorsements_CNP: () => (/* binding */ getEndorsements_CNP),\n/* harmony export */ getEndorsements_Request: () => (/* binding */ getEndorsements_Request),\n/* harmony export */ getInsureds_CNP: () => (/* binding */ getInsureds_CNP),\n/* harmony export */ getInsureds_CNP_Request: () => (/* binding */ getInsureds_CNP_Request),\n/* harmony export */ getPolicies_CNP: () => (/* binding */ getPolicies_CNP),\n/* harmony export */ getPolicies_CNP_Request: () => (/* binding */ getPolicies_CNP_Request),\n/* harmony export */ getPolicyCollection: () => (/* binding */ getPolicyCollection),\n/* harmony export */ getPolicyCollection_Request: () => (/* binding */ getPolicyCollection_Request),\n/* harmony export */ getPolicyCollectiveDetail_CNP: () => (/* binding */ getPolicyCollectiveDetail_CNP),\n/* harmony export */ getPolicyCollectiveDetail_Request: () => (/* binding */ getPolicyCollectiveDetail_Request),\n/* harmony export */ getPolicyDetail_CNP: () => (/* binding */ getPolicyDetail_CNP),\n/* harmony export */ getPolicyDetail_Request: () => (/* binding */ getPolicyDetail_Request),\n/* harmony export */ getPolicyIndividualDetail_Request: () => (/* binding */ getPolicyIndividualDetail_Request),\n/* harmony export */ postInsureds_CNP: () => (/* binding */ postInsureds_CNP)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var dayjs_plugin_customParseFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs/plugin/customParseFormat */ \"dayjs/plugin/customParseFormat\");\n/* harmony import */ var dayjs_plugin_customParseFormat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat__WEBPACK_IMPORTED_MODULE_1__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\n\n\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend((dayjs_plugin_customParseFormat__WEBPACK_IMPORTED_MODULE_1___default()));\nvar parseSafeDate = function parseSafeDate(dateString) {\n if (!dateString) return null;\n try {\n // Parsear explícitamente con el formato DD/MM/YYYY\n // El tercer parámetro 'true' activa el modo strict\n var parsed = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(dateString, 'DD/MM/YYYY', true);\n\n // Verificar si la fecha es válida\n if (!parsed.isValid()) {\n console.warn(\"Invalid date format: \".concat(dateString));\n return null;\n }\n return parsed.toISOString();\n } catch (error) {\n console.error(\"Error parsing date: \".concat(dateString), error);\n return null;\n }\n};\nvar getInsureds_CNP = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {\n var _response$insureds, _response$insureds2, _response$insureds3;\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n objectMapped = {\n total: (response === null || response === void 0 || (_response$insureds = response.insureds) === null || _response$insureds === void 0 ? void 0 : _response$insureds.length) || 0,\n totalActive: null,\n values: (response === null || response === void 0 || (_response$insureds2 = response.insureds) === null || _response$insureds2 === void 0 ? void 0 : _response$insureds2.length) > 0 ? response === null || response === void 0 || (_response$insureds3 = response.insureds) === null || _response$insureds3 === void 0 ? void 0 : _response$insureds3.map(function (i) {\n var _i$status, _i$status2;\n return {\n code: i.code,\n number: i.code,\n firstName: i.firstName || i.name,\n lastName: i.lastName,\n type: {\n code: i.role.code === \"T\" ? \"OWNER\" : \"ADHERENT\",\n name: i.role.code === \"T\" ? \"Titular\" : \"Adherente\"\n },\n status: {\n code: ((_i$status = i.status) === null || _i$status === void 0 ? void 0 : _i$status.code) || \"-\",\n name: ((_i$status2 = i.status) === null || _i$status2 === void 0 ? void 0 : _i$status2.name) || \"-\"\n },\n insuredAmount: i.insuredAmount,\n inclusionDate: i.entranceDate,\n exclusionDate: i.cancellationDate,\n identification: {\n value: i.identification.number,\n type: {\n name: i.identification.type.name,\n code: i.identification.type.code\n }\n }\n };\n }) : []\n };\n return _context.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function getInsureds_CNP(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar getInsureds_CNP_Request = function getInsureds_CNP_Request(inputParams) {\n return {\n code: inputParams.number || undefined,\n name: inputParams.firstName || undefined\n };\n};\nvar postInsureds_CNP = function postInsureds_CNP(payload) {\n var objectMapped = {\n salary: typeof payload.salary === 'string' ? payload.salary : String(payload.salary),\n identification: typeof payload.identification === 'string' ? payload.identification : String(payload.identification)\n };\n return objectMapped;\n};\nvar getEndorsements_CNP = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n objectMapped = {\n values: response.endorsements.map(function (e) {\n return {\n activeDate: e.dateFrom ? parseSafeDate(e.dateFrom) : null,\n number: e.number,\n type: {\n code: e.detail,\n name: e.detail,\n group: {}\n },\n validityFrom: e.dateFrom ? parseSafeDate(e.dateFrom) : null,\n validityTo: e.dateTo ? parseSafeDate(e.dateTo) : null\n };\n }),\n total: response.endorsements.length\n };\n return _context2.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return function getEndorsements_CNP(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar getEndorsements_Request = function getEndorsements_Request(inputParams) {\n return {};\n};\nvar getPolicies_CNP = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n if (!(!(response !== null && response !== void 0 && response.policies) || response.policies.length === 0)) {\n _context3.next = 2;\n break;\n }\n return _context3.abrupt(\"return\", {\n values: [],\n total: 0\n });\n case 2:\n objectMapped = {\n values: response.policies.map(function (p) {\n var _p$holder, _p$holder2, _p$holder3, _p$holder4, _p$holder5, _p$product, _p$product2, _p$section, _p$section2, _p$status;\n return {\n number: p.number,\n validityFrom: parseSafeDate(p.issueDate),\n validityTo: \"N/A\",\n ingress: parseSafeDate(p.issueDate),\n holder: {\n name: ((_p$holder = p.holder) === null || _p$holder === void 0 ? void 0 : _p$holder.name) || ((_p$holder2 = p.holder) === null || _p$holder2 === void 0 ? void 0 : _p$holder2.firstName),\n identifications: {\n values: [{\n value: ((_p$holder3 = p.holder) === null || _p$holder3 === void 0 || (_p$holder3 = _p$holder3.identification) === null || _p$holder3 === void 0 ? void 0 : _p$holder3.number) || null,\n type: {\n name: ((_p$holder4 = p.holder) === null || _p$holder4 === void 0 || (_p$holder4 = _p$holder4.identification) === null || _p$holder4 === void 0 || (_p$holder4 = _p$holder4.type) === null || _p$holder4 === void 0 ? void 0 : _p$holder4.name) || null,\n code: ((_p$holder5 = p.holder) === null || _p$holder5 === void 0 || (_p$holder5 = _p$holder5.identification) === null || _p$holder5 === void 0 || (_p$holder5 = _p$holder5.type) === null || _p$holder5 === void 0 ? void 0 : _p$holder5.code) || null\n },\n \"default\": true\n }]\n }\n },\n code: p.number,\n alias: \"N/A\",\n product: {\n code: ((_p$product = p.product) === null || _p$product === void 0 || (_p$product = _p$product.code) === null || _p$product === void 0 ? void 0 : _p$product.toString()) || null,\n name: ((_p$product2 = p.product) === null || _p$product2 === void 0 ? void 0 : _p$product2.name) || null,\n subsection: {\n name: \"N/A\",\n code: \"N/A\",\n section: {\n name: ((_p$section = p.section) === null || _p$section === void 0 ? void 0 : _p$section.name) || null,\n code: ((_p$section2 = p.section) === null || _p$section2 === void 0 ? void 0 : _p$section2.code) || null\n }\n }\n },\n process: {\n name: ((_p$status = p.status) === null || _p$status === void 0 ? void 0 : _p$status.name) || null,\n code: \"N/A\"\n }\n };\n }),\n total: response.totalRecord || 0\n };\n return _context3.abrupt(\"return\", objectMapped);\n case 4:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return function getPolicies_CNP(_x3) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar getPolicies_CNP_Request = function getPolicies_CNP_Request(inputParams) {\n return {\n sort: \"TomadorCodigo\",\n orderType: \"desc\",\n pageNumber: inputParams.page || 1,\n pageSize: inputParams.pageSize || 10,\n allPolicies: null,\n policyNumber: inputParams.number,\n holderIdentification: inputParams.holderPartyCode,\n requestNumber: inputParams.requestNumber\n };\n};\nvar getPolicyDetail_CNP = /*#__PURE__*/function () {\n var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {\n var _data$holder$identifi, _data$holder$identifi2, _data$insured, _data$insured2, _data$insured3, _data$insured4;\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n objectMapped = {\n policyData: {\n alias: null,\n creationDate: data.insured.policyDateFrom,\n currency: data === null || data === void 0 ? void 0 : data.currency,\n number: data.number,\n process: data.status,\n renewable: null,\n validityy: {\n dateFrom: data === null || data === void 0 ? void 0 : data.vigencyDateFrom,\n dateTo: data === null || data === void 0 ? void 0 : data.vigencyDateTo\n }\n },\n roleData: {\n holder: {\n identification: {\n type: data === null || data === void 0 ? void 0 : data.holder.identification.type,\n value: data === null || data === void 0 || (_data$holder$identifi = data.holder.identification) === null || _data$holder$identifi === void 0 ? void 0 : _data$holder$identifi.number\n },\n name: data.holder.name,\n partyCode: data.holder.code || data.holder.id,\n partyType: null\n },\n contacts: [{\n identification: {\n type: data === null || data === void 0 ? void 0 : data.holder.identification.type,\n value: data === null || data === void 0 || (_data$holder$identifi2 = data.holder.identification) === null || _data$holder$identifi2 === void 0 ? void 0 : _data$holder$identifi2.number\n },\n name: data.holder.name,\n partyCode: data.holder.code || data.holder.id,\n partyType: null\n }]\n },\n collectionData: {\n paymentMethodData: {\n simpleMethodData: {\n number: data.paymentMethod.number,\n type: data.paymentMethod.type\n }\n },\n paymentFrequency: data.paymentMethod.periodicity\n },\n commercialStructureData: {\n data: {},\n intermediaries: {\n values: [{\n code: data.intermediary.id,\n name: data.intermediary.name,\n role: null,\n status: null\n }]\n }\n },\n productData: {\n number: data.product.code || data.product.id,\n name: data.product.name,\n status: {},\n subsection: {\n name: null,\n code: null,\n section: data.section\n }\n },\n coverageData: {\n coverages: data === null || data === void 0 || (_data$insured = data.insured) === null || _data$insured === void 0 ? void 0 : _data$insured.coverages.map(function (cv) {\n return {\n ageType: null,\n deductible: null,\n coverage: {\n calculatorType: null,\n code: null,\n name: cv.name,\n type: cv.type\n },\n values: [{\n minValue: cv.amount,\n maxValue: cv.amount,\n type: {\n code: \"INSURED_AMOUNT\",\n name: \"Suma aseguradas\"\n }\n }]\n };\n })\n },\n expenseData: {\n values: []\n },\n wordingData: {\n wordings: []\n },\n termData: {\n values: []\n },\n documentationData: {\n files: [],\n comments: \"\"\n },\n endorsementData: {\n number: data === null || data === void 0 ? void 0 : data.endorsementNumber\n },\n insurableData: {\n minimumQuantityInsured: 0,\n estimatedDeadline: (data === null || data === void 0 || (_data$insured2 = data.insured) === null || _data$insured2 === void 0 ? void 0 : _data$insured2.entranceDate) || null,\n minimumAge: 0,\n maximumAge: 0,\n maximumQuantityInsuredByEvent: 0,\n maximumAmountToIndemnify: 0,\n insurables: data !== null && data !== void 0 && data.insured ? [{\n type: {\n name: (data === null || data === void 0 || (_data$insured3 = data.insured) === null || _data$insured3 === void 0 || (_data$insured3 = _data$insured3.type) === null || _data$insured3 === void 0 ? void 0 : _data$insured3.name) || null,\n code: (data === null || data === void 0 || (_data$insured4 = data.insured) === null || _data$insured4 === void 0 || (_data$insured4 = _data$insured4.type) === null || _data$insured4 === void 0 ? void 0 : _data$insured4.code) || null\n },\n wording: null,\n minimumEntryAge: 0,\n maximumEntryAge: 0,\n endingAgePrincipalCoverage: 0,\n endingAgeAditionalCoverage: 0\n }] : null\n },\n savings: {\n accountBalance: (data === null || data === void 0 ? void 0 : data.accountBalance) || null,\n annualPremium: (data === null || data === void 0 ? void 0 : data.annualPremium) || null,\n premium: (data === null || data === void 0 ? void 0 : data.premium) || null,\n prize: (data === null || data === void 0 ? void 0 : data.prize) || null,\n simpleEndorsementPremium: (data === null || data === void 0 ? void 0 : data.simpleEndorsementPremium) || null\n },\n salesAgent: (data === null || data === void 0 ? void 0 : data.salesAgent) || null,\n salesBranch: (data === null || data === void 0 ? void 0 : data.salesBranch) || null\n };\n return _context4.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function getPolicyDetail_CNP(_x4) {\n return _ref4.apply(this, arguments);\n };\n}();\nvar getPolicyCollection = /*#__PURE__*/function () {\n var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n objectMapped = {\n billingForm: {},\n holderDistribution: null,\n insuredDistribution: null,\n paymentFrecuency: data.paymentMethod.periodicity,\n paymentMethodData: {\n simpleMethodData: {\n number: data.paymentMethod.number,\n method: data.paymentMethod.type\n }\n }\n };\n return _context5.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }));\n return function getPolicyCollection(_x5) {\n return _ref5.apply(this, arguments);\n };\n}();\nvar getPolicyCollectiveDetail_CNP = /*#__PURE__*/function () {\n var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(response) {\n var _response$currency, _response$currency2, _response$currency3, _response$currency4, _response$currency5, _response$status, _response$holder, _response$holder2, _response$holder3, _response$holder4, _response$holder5, _response$holder6, _response$holder7, _response$paymentMeth, _response$paymentMeth2, _response$currency6, _response$paymentMeth3, _response$paymentMeth4, _response$currency7, _response$paymentMeth5, _response$intermediar, _response$intermediar2, _response$product, _response$product2, _response$section, _response$section2, _response$status2, _response$insured, _response$insured2, _response$insured3, _response$insured4;\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n objectMapped = {\n policyData: {\n number: (response === null || response === void 0 ? void 0 : response.number) || null,\n alias: \"N/A\",\n currency: {\n name: (response === null || response === void 0 || (_response$currency = response.currency) === null || _response$currency === void 0 ? void 0 : _response$currency.name) || null,\n code: (response === null || response === void 0 || (_response$currency2 = response.currency) === null || _response$currency2 === void 0 ? void 0 : _response$currency2.code) || null,\n mnemonic: \"N/A\",\n symbol: (response === null || response === void 0 || (_response$currency3 = response.currency) === null || _response$currency3 === void 0 ? void 0 : _response$currency3.symbol) || null\n },\n validity: {\n type: {\n name: (response === null || response === void 0 || (_response$currency4 = response.currency) === null || _response$currency4 === void 0 ? void 0 : _response$currency4.name) || null,\n code: (response === null || response === void 0 || (_response$currency5 = response.currency) === null || _response$currency5 === void 0 ? void 0 : _response$currency5.code) || null,\n months: \"N/A\"\n },\n dateFrom: response !== null && response !== void 0 && response.vigencyDateFrom ? parseSafeDate(response.vigencyDateFrom) : null,\n dateTo: response !== null && response !== void 0 && response.vigencyDateTo ? parseSafeDate(response.vigencyDateTo) : null\n },\n creationDate: response !== null && response !== void 0 && response.issueDate ? parseSafeDate(response.issueDate) : null,\n renewable: true,\n process: {\n name: (response === null || response === void 0 || (_response$status = response.status) === null || _response$status === void 0 ? void 0 : _response$status.name) || null,\n code: \"N/A\"\n }\n },\n roleData: {\n holder: {\n partyCode: (response === null || response === void 0 || (_response$holder = response.holder) === null || _response$holder === void 0 ? void 0 : _response$holder.code) || null,\n name: response !== null && response !== void 0 && (_response$holder2 = response.holder) !== null && _response$holder2 !== void 0 && _response$holder2.firstName && response !== null && response !== void 0 && (_response$holder3 = response.holder) !== null && _response$holder3 !== void 0 && _response$holder3.lastName ? \"\".concat(response.holder.firstName, \" \").concat(response.holder.lastName) : (response === null || response === void 0 || (_response$holder4 = response.holder) === null || _response$holder4 === void 0 ? void 0 : _response$holder4.name) || null,\n identification: {\n value: (response === null || response === void 0 || (_response$holder5 = response.holder) === null || _response$holder5 === void 0 || (_response$holder5 = _response$holder5.identification) === null || _response$holder5 === void 0 ? void 0 : _response$holder5.number) || null,\n type: {\n code: (response === null || response === void 0 || (_response$holder6 = response.holder) === null || _response$holder6 === void 0 || (_response$holder6 = _response$holder6.identification) === null || _response$holder6 === void 0 || (_response$holder6 = _response$holder6.type) === null || _response$holder6 === void 0 ? void 0 : _response$holder6.code) || null,\n name: (response === null || response === void 0 || (_response$holder7 = response.holder) === null || _response$holder7 === void 0 || (_response$holder7 = _response$holder7.identification) === null || _response$holder7 === void 0 || (_response$holder7 = _response$holder7.type) === null || _response$holder7 === void 0 ? void 0 : _response$holder7.name) || null\n }\n }\n },\n contacts: [{\n partyCode: \"N/A\",\n name: \"N/A\",\n identification: {\n value: \"N/A\",\n type: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }\n }],\n legalResponsible: {\n partyCode: \"N/A\",\n name: \"N/A\",\n identification: {\n value: \"N/A\",\n type: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }\n }\n },\n collectionData: {\n holderDistribution: 0,\n insuredDistribution: 0,\n paymentFrequency: {\n name: (response === null || response === void 0 || (_response$paymentMeth = response.paymentMethod) === null || _response$paymentMeth === void 0 || (_response$paymentMeth = _response$paymentMeth.periodicity) === null || _response$paymentMeth === void 0 ? void 0 : _response$paymentMeth.name) || null,\n code: \"N/A\"\n },\n paymentMethodData: {\n cashMethodData: (response === null || response === void 0 || (_response$paymentMeth2 = response.paymentMethod) === null || _response$paymentMeth2 === void 0 ? void 0 : _response$paymentMeth2.name) === \"CASH\" ? {\n values: [{\n code: \"N/A\",\n name: (response === null || response === void 0 || (_response$currency6 = response.currency) === null || _response$currency6 === void 0 ? void 0 : _response$currency6.name) || null\n }]\n } : null,\n bankAccountData: (response === null || response === void 0 || (_response$paymentMeth3 = response.paymentMethod) === null || _response$paymentMeth3 === void 0 ? void 0 : _response$paymentMeth3.name) === \"CBU\" ? {\n values: [{\n code: \"BA-1\",\n number: \"1\",\n cbu: (response === null || response === void 0 || (_response$paymentMeth4 = response.paymentMethod) === null || _response$paymentMeth4 === void 0 ? void 0 : _response$paymentMeth4.bankAccountNumber) || null,\n alias: \"N/A\",\n currency: {\n code: \"N/A\",\n name: (response === null || response === void 0 || (_response$currency7 = response.currency) === null || _response$currency7 === void 0 ? void 0 : _response$currency7.name) || null\n },\n bankBranch: {\n name: \"N/A\",\n code: \"N/A\",\n bank: {\n name: \"N/A\",\n code: \"N/A\"\n }\n },\n bankAccountType: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }]\n } : null,\n creditCardData: (response === null || response === void 0 || (_response$paymentMeth5 = response.paymentMethod) === null || _response$paymentMeth5 === void 0 ? void 0 : _response$paymentMeth5.name) === \"CREDIT\" ? {\n values: [{\n code: \"N/A\",\n ownerName: \"N/A\",\n cardType: {\n name: \"N/A\",\n code: \"N/A\"\n },\n cardProvider: {\n name: \"N/A\",\n code: \"N/A\"\n },\n number: \"N/A\",\n securityCode: \"N/A\",\n dateTo: \"N/A\"\n }]\n } : null\n }\n },\n commercialStructureData: {\n data: {\n name: \"N/A\",\n code: \"N/A\",\n version: 0,\n description: \"N/A\",\n status: {\n name: \"N/A\",\n code: \"N/A\"\n }\n },\n intermediaries: {\n values: [{\n code: (response === null || response === void 0 || (_response$intermediar = response.intermediary) === null || _response$intermediar === void 0 || (_response$intermediar = _response$intermediar.code) === null || _response$intermediar === void 0 ? void 0 : _response$intermediar.toString()) || null,\n name: (response === null || response === void 0 || (_response$intermediar2 = response.intermediary) === null || _response$intermediar2 === void 0 ? void 0 : _response$intermediar2.name) || null,\n licence: \"N/A\",\n role: {\n name: \"N/A\",\n code: \"N/A\"\n },\n status: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }]\n }\n },\n productData: {\n name: (response === null || response === void 0 || (_response$product = response.product) === null || _response$product === void 0 ? void 0 : _response$product.name) || null,\n code: (response === null || response === void 0 || (_response$product2 = response.product) === null || _response$product2 === void 0 ? void 0 : _response$product2.code) || null,\n version: 0,\n subsection: {\n name: \"N/A\",\n code: \"N/A\",\n section: {\n name: (response === null || response === void 0 || (_response$section = response.section) === null || _response$section === void 0 ? void 0 : _response$section.name) || null,\n code: (response === null || response === void 0 || (_response$section2 = response.section) === null || _response$section2 === void 0 ? void 0 : _response$section2.code) || null\n }\n },\n status: {\n name: (response === null || response === void 0 || (_response$status2 = response.status) === null || _response$status2 === void 0 ? void 0 : _response$status2.name) || null,\n code: \"N/A\"\n }\n },\n coverageData: {\n coverages: (response === null || response === void 0 || (_response$insured = response.insured) === null || _response$insured === void 0 || (_response$insured = _response$insured.coverages) === null || _response$insured === void 0 ? void 0 : _response$insured.map(function (c) {\n return {\n coverage: {\n name: (c === null || c === void 0 ? void 0 : c.name) || null,\n code: 'N/A',\n calculatorType: {\n name: \"N/A\",\n code: \"N/A\"\n },\n type: {\n name: \"N/A\",\n code: \"N/A\"\n }\n },\n values: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n maxValue: \"N/A\",\n minValue: \"N/A\"\n }],\n mortalityTable: {\n name: \"N/A\",\n code: \"N/A\"\n },\n ageType: {\n name: \"N/A\",\n code: \"N/A\"\n }\n };\n })) || []\n },\n expenseData: {\n values: []\n },\n wordingData: {\n wordings: []\n },\n termData: {\n values: []\n },\n documentationData: {\n files: [],\n comments: \"N/A\"\n },\n endorsementData: {\n number: (response === null || response === void 0 ? void 0 : response.endorsementNumber) || 0,\n validityFrom: \"N/A\",\n validityTo: \"N/A\",\n type: {\n name: \"N/A\",\n code: \"N/A\"\n }\n },\n insurableData: {\n minimumQuantityInsured: 0,\n estimatedDeadline: (response === null || response === void 0 || (_response$insured2 = response.insured) === null || _response$insured2 === void 0 ? void 0 : _response$insured2.entranceDate) || null,\n minimumAge: 0,\n maximumAge: 0,\n maximumQuantityInsuredByEvent: 0,\n maximumAmountToIndemnify: \"N/A\",\n insurables: response !== null && response !== void 0 && response.insured ? [{\n type: {\n name: (response === null || response === void 0 || (_response$insured3 = response.insured) === null || _response$insured3 === void 0 || (_response$insured3 = _response$insured3.type) === null || _response$insured3 === void 0 ? void 0 : _response$insured3.name) || null,\n code: (response === null || response === void 0 || (_response$insured4 = response.insured) === null || _response$insured4 === void 0 || (_response$insured4 = _response$insured4.type) === null || _response$insured4 === void 0 ? void 0 : _response$insured4.code) || null\n },\n wording: \"N/A\",\n minimumEntryAge: 0,\n maximumEntryAge: 0,\n endingAgePrincipalCoverage: 0,\n endingAgeAditionalCoverage: 0\n }] : null\n }\n };\n return _context6.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }));\n return function getPolicyCollectiveDetail_CNP(_x6) {\n return _ref6.apply(this, arguments);\n };\n}();\nvar getPolicyDetail_Request = function getPolicyDetail_Request(inputParams) {\n return {};\n};\nvar getPolicyCollection_Request = function getPolicyCollection_Request(inputParams) {\n return {};\n};\nvar getPolicyCollectiveDetail_Request = function getPolicyCollectiveDetail_Request(inputParams) {\n return {};\n};\nvar getPolicyIndividualDetail_Request = function getPolicyIndividualDetail_Request(inputParams) {\n return {};\n};\n\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/policy/index.js?");
|
|
130
162
|
|
|
131
163
|
/***/ }),
|
|
@@ -136,6 +168,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
136
168
|
\***********************************************/
|
|
137
169
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
138
170
|
|
|
171
|
+
"use strict";
|
|
139
172
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getActivityList: () => (/* binding */ getActivityList),\n/* harmony export */ getPaymentFrecuencies: () => (/* binding */ getPaymentFrecuencies),\n/* harmony export */ getProductParameters: () => (/* binding */ getProductParameters),\n/* harmony export */ getProductsBySubsections: () => (/* binding */ getProductsBySubsections),\n/* harmony export */ getQuotationByCode: () => (/* binding */ getQuotationByCode),\n/* harmony export */ getQuotationByCode_Request: () => (/* binding */ getQuotationByCode_Request),\n/* harmony export */ getQuotationDetail: () => (/* binding */ getQuotationDetail),\n/* harmony export */ getQuotationsList: () => (/* binding */ getQuotationsList),\n/* harmony export */ getQuotations_Request: () => (/* binding */ getQuotations_Request),\n/* harmony export */ quotationStandardPlanCreationMapped: () => (/* binding */ quotationStandardPlanCreationMapped),\n/* harmony export */ quotationVariablePlanCreationMapped: () => (/* binding */ quotationVariablePlanCreationMapped)\n/* harmony export */ });\n/* harmony import */ var _helpers_mappingHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/mappingHelpers */ \"./src/mapper/helpers/mappingHelpers.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dayjs */ \"dayjs\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__);\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = \"function\" == typeof Symbol ? Symbol : {}, a = i.iterator || \"@@iterator\", c = i.asyncIterator || \"@@asyncIterator\", u = i.toStringTag || \"@@toStringTag\"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, \"\"); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, \"_invoke\", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: \"normal\", arg: t.call(e, r) }; } catch (t) { return { type: \"throw\", arg: t }; } } e.wrap = wrap; var h = \"suspendedStart\", l = \"suspendedYield\", f = \"executing\", s = \"completed\", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { [\"next\", \"throw\", \"return\"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if (\"throw\" !== c.type) { var u = c.arg, h = u.value; return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) { invoke(\"next\", t, i, a); }, function (t) { invoke(\"throw\", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke(\"throw\", t, i, a); }); } a(c.arg); } var r; o(this, \"_invoke\", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error(\"Generator is already running\"); if (o === s) { if (\"throw\" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else \"return\" === n.method && n.abrupt(\"return\", n.arg); o = f; var p = tryCatch(e, r, n); if (\"normal\" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y; var i = tryCatch(o, e.iterator, r.arg); if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = \"normal\", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: \"root\" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || \"\" === e) { var r = e[a]; if (r) return r.call(e); if (\"function\" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + \" is not iterable\"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) { var e = \"function\" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () { return this; }), define(g, \"toString\", function () { return \"[object Generator]\"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if (\"throw\" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if (\"root\" === i.tryLoc) return handle(\"end\"); if (i.tryLoc <= this.prev) { var c = n.call(i, \"catchLoc\"), u = n.call(i, \"finallyLoc\"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error(\"try statement without catch or finally\"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) { var i = o; break; } } i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if (\"throw\" === t.type) throw t.arg; return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, \"catch\": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if (\"throw\" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, \"next\" === this.method && (this.arg = t), y; } }, e; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\n\n\nvar normalizeDateToYYYYMMDD = function normalizeDateToYYYYMMDD(date) {\n if (!date) return null;\n var formats = ['DD/MM/YYYY', 'YYYY/MM/DD'];\n var parsed = dayjs__WEBPACK_IMPORTED_MODULE_1___default()(date, formats, true);\n return parsed.isValid() ? parsed.format('YYYY/MM/DD') : null;\n};\nvar getQuotationsList = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {\n var quotations, total;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n quotations = Array.isArray(response === null || response === void 0 ? void 0 : response.quotations) ? response.quotations.map(function (q) {\n var _q$paymentFrequency, _q$paymentFrequency2, _q$product, _q$product2, _q$product3, _q$product4, _q$product5, _q$product6, _q$product7, _q$status, _q$status2;\n return {\n code: q.code || null,\n email: q.email || null,\n creationDate: normalizeDateToYYYYMMDD(q.creationDate),\n expirationDate: normalizeDateToYYYYMMDD(q.expirationDate),\n number: q.number || null,\n paymentFrequency: {\n name: ((_q$paymentFrequency = q.paymentFrequency) === null || _q$paymentFrequency === void 0 ? void 0 : _q$paymentFrequency.name) || null,\n code: ((_q$paymentFrequency2 = q.paymentFrequency) === null || _q$paymentFrequency2 === void 0 ? void 0 : _q$paymentFrequency2.code) || null\n },\n product: {\n code: ((_q$product = q.product) === null || _q$product === void 0 || (_q$product = _q$product.code) === null || _q$product === void 0 ? void 0 : _q$product.toString()) || null,\n name: ((_q$product2 = q.product) === null || _q$product2 === void 0 ? void 0 : _q$product2.name) || null,\n subsection: {\n code: ((_q$product3 = q.product) === null || _q$product3 === void 0 || (_q$product3 = _q$product3.subsection) === null || _q$product3 === void 0 ? void 0 : _q$product3.code) || null,\n name: ((_q$product4 = q.product) === null || _q$product4 === void 0 || (_q$product4 = _q$product4.subsection) === null || _q$product4 === void 0 ? void 0 : _q$product4.name) || null,\n section: {\n code: ((_q$product5 = q.product) === null || _q$product5 === void 0 || (_q$product5 = _q$product5.subsection) === null || _q$product5 === void 0 || (_q$product5 = _q$product5.section) === null || _q$product5 === void 0 ? void 0 : _q$product5.code) || null,\n name: ((_q$product6 = q.product) === null || _q$product6 === void 0 || (_q$product6 = _q$product6.subsection) === null || _q$product6 === void 0 || (_q$product6 = _q$product6.section) === null || _q$product6 === void 0 ? void 0 : _q$product6.name) || null\n }\n },\n version: ((_q$product7 = q.product) === null || _q$product7 === void 0 ? void 0 : _q$product7.version) || 0\n },\n status: {\n code: ((_q$status = q.status) === null || _q$status === void 0 ? void 0 : _q$status.code) || null,\n name: ((_q$status2 = q.status) === null || _q$status2 === void 0 ? void 0 : _q$status2.name) || null\n }\n };\n }) : [];\n total = response !== null && response !== void 0 && response.total ? response.total : 0;\n return _context.abrupt(\"return\", {\n quotations: quotations,\n total: total\n });\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function getQuotationsList(_x) {\n return _ref.apply(this, arguments);\n };\n}();\nvar getQuotationDetail = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(res) {\n var _res$intermediary, _res$intermediary2, _res$intermediary3, _res$paymentFrequency, _res$paymentFrequency2, _res$paymentFrequency3, _res$product, _res$product2, _res$product3, _res$product4, _res$product5, _res$product6, _res$product7, _res$status, _res$status2, _res$values, _res$values2;\n var quotation;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n quotation = {\n areaCode: (res === null || res === void 0 ? void 0 : res.areaCode) || null,\n code: (res === null || res === void 0 ? void 0 : res.code) || null,\n commercialStructure: {\n data: {\n code: null,\n description: null,\n name: null,\n status: {\n code: null,\n name: null\n },\n version: 0\n },\n intermediaries: {\n values: []\n }\n },\n creationDate: (res === null || res === void 0 ? void 0 : res.creationDate) || null,\n email: (res === null || res === void 0 ? void 0 : res.email) || null,\n intermediary: {\n code: (res === null || res === void 0 || (_res$intermediary = res.intermediary) === null || _res$intermediary === void 0 ? void 0 : _res$intermediary.code) || null,\n group: {\n code: null,\n name: null\n },\n licence: (res === null || res === void 0 || (_res$intermediary2 = res.intermediary) === null || _res$intermediary2 === void 0 ? void 0 : _res$intermediary2.licence) || null,\n name: (res === null || res === void 0 || (_res$intermediary3 = res.intermediary) === null || _res$intermediary3 === void 0 ? void 0 : _res$intermediary3.name) || null,\n roles: [{\n code: null,\n name: null\n }],\n status: {\n code: null,\n name: null\n }\n },\n number: (res === null || res === void 0 ? void 0 : res.number) || null,\n paymentFrequency: {\n code: (res === null || res === void 0 || (_res$paymentFrequency = res.paymentFrequency) === null || _res$paymentFrequency === void 0 ? void 0 : _res$paymentFrequency.code) || null,\n months: (res === null || res === void 0 || (_res$paymentFrequency2 = res.paymentFrequency) === null || _res$paymentFrequency2 === void 0 ? void 0 : _res$paymentFrequency2.months) || null,\n name: (res === null || res === void 0 || (_res$paymentFrequency3 = res.paymentFrequency) === null || _res$paymentFrequency3 === void 0 ? void 0 : _res$paymentFrequency3.name) || null\n },\n phone: (res === null || res === void 0 ? void 0 : res.phone) || null,\n product: {\n code: (res === null || res === void 0 || (_res$product = res.product) === null || _res$product === void 0 ? void 0 : _res$product.code) || null,\n currency: {\n code: null,\n mnemonic: null,\n name: null,\n symbol: null\n },\n name: (res === null || res === void 0 || (_res$product2 = res.product) === null || _res$product2 === void 0 ? void 0 : _res$product2.name) || null,\n status: {\n code: null,\n name: null\n },\n subsection: {\n code: (res === null || res === void 0 || (_res$product3 = res.product) === null || _res$product3 === void 0 || (_res$product3 = _res$product3.subsection) === null || _res$product3 === void 0 ? void 0 : _res$product3.code) || null,\n name: (res === null || res === void 0 || (_res$product4 = res.product) === null || _res$product4 === void 0 || (_res$product4 = _res$product4.subsection) === null || _res$product4 === void 0 ? void 0 : _res$product4.name) || null,\n section: {\n category: null,\n code: (res === null || res === void 0 || (_res$product5 = res.product) === null || _res$product5 === void 0 || (_res$product5 = _res$product5.subsection) === null || _res$product5 === void 0 || (_res$product5 = _res$product5.section) === null || _res$product5 === void 0 ? void 0 : _res$product5.code) || null,\n name: (res === null || res === void 0 || (_res$product6 = res.product) === null || _res$product6 === void 0 || (_res$product6 = _res$product6.subsection) === null || _res$product6 === void 0 || (_res$product6 = _res$product6.section) === null || _res$product6 === void 0 ? void 0 : _res$product6.name) || null,\n type: null\n }\n },\n version: (res === null || res === void 0 || (_res$product7 = res.product) === null || _res$product7 === void 0 ? void 0 : _res$product7.version) || 0\n },\n productSegment: null,\n status: {\n code: (res === null || res === void 0 || (_res$status = res.status) === null || _res$status === void 0 ? void 0 : _res$status.code) || null,\n name: (res === null || res === void 0 || (_res$status2 = res.status) === null || _res$status2 === void 0 ? void 0 : _res$status2.name) || null\n },\n validity: {\n code: null,\n months: 0,\n name: null\n },\n values: {\n commercialAgreement: {\n code: null,\n intermediaries: []\n },\n expenses: [],\n groupedEconomicValues: (res === null || res === void 0 || (_res$values = res.values) === null || _res$values === void 0 || (_res$values = _res$values.groupedEconomicValues) === null || _res$values === void 0 ? void 0 : _res$values.map(function (e) {\n var _e$type, _e$type2;\n return {\n type: {\n code: (e === null || e === void 0 || (_e$type = e.type) === null || _e$type === void 0 ? void 0 : _e$type.code) || null,\n name: (e === null || e === void 0 || (_e$type2 = e.type) === null || _e$type2 === void 0 ? void 0 : _e$type2.name) || null\n },\n value: (e === null || e === void 0 ? void 0 : e.value) || null\n };\n })) || [],\n risks: (res === null || res === void 0 || (_res$values2 = res.values) === null || _res$values2 === void 0 || (_res$values2 = _res$values2.risks) === null || _res$values2 === void 0 ? void 0 : _res$values2.map(function (risk) {\n var _risk$coverages, _risk$data, _risk$data2, _risk$data3, _risk$data4, _risk$data5, _risk$data6, _risk$data7, _risk$data$identifica, _risk$data8, _risk$data$firstName, _risk$data9, _risk$data$lastName, _risk$data10, _risk$data$spouse, _risk$data11, _risk$data12, _risk$data13, _risk$data14, _risk$data15, _risk$data16;\n return {\n adherents: [],\n code: (risk === null || risk === void 0 ? void 0 : risk.code) || null,\n coverages: (risk === null || risk === void 0 || (_risk$coverages = risk.coverages) === null || _risk$coverages === void 0 ? void 0 : _risk$coverages.map(function (cv) {\n var _cv$coverageValues;\n return {\n code: (cv === null || cv === void 0 ? void 0 : cv.code) || null,\n coverageValues: (cv === null || cv === void 0 || (_cv$coverageValues = cv.coverageValues) === null || _cv$coverageValues === void 0 ? void 0 : _cv$coverageValues.map(function (c) {\n var _c$type, _c$type2;\n return {\n type: {\n code: (c === null || c === void 0 || (_c$type = c.type) === null || _c$type === void 0 ? void 0 : _c$type.code) || null,\n name: (c === null || c === void 0 || (_c$type2 = c.type) === null || _c$type2 === void 0 ? void 0 : _c$type2.name) || null\n },\n value: (c === null || c === void 0 ? void 0 : c.value) || null\n };\n })) || [],\n deductible: null,\n economicValues: [{\n type: {\n code: null,\n name: null\n },\n value: 0\n }],\n name: (cv === null || cv === void 0 ? void 0 : cv.description) || null,\n description: (cv === null || cv === void 0 ? void 0 : cv.name) || null\n };\n })) || [],\n data: {\n city: {\n code: (risk === null || risk === void 0 || (_risk$data = risk.data) === null || _risk$data === void 0 || (_risk$data = _risk$data.city) === null || _risk$data === void 0 ? void 0 : _risk$data.code) || null,\n name: (risk === null || risk === void 0 || (_risk$data2 = risk.data) === null || _risk$data2 === void 0 || (_risk$data2 = _risk$data2.city) === null || _risk$data2 === void 0 ? void 0 : _risk$data2.name) || null,\n province: (risk === null || risk === void 0 || (_risk$data3 = risk.data) === null || _risk$data3 === void 0 || (_risk$data3 = _risk$data3.city) === null || _risk$data3 === void 0 ? void 0 : _risk$data3.province) || null\n },\n gender: {\n code: (risk === null || risk === void 0 || (_risk$data4 = risk.data) === null || _risk$data4 === void 0 || (_risk$data4 = _risk$data4.gender) === null || _risk$data4 === void 0 ? void 0 : _risk$data4.code) || null,\n name: (risk === null || risk === void 0 || (_risk$data5 = risk.data) === null || _risk$data5 === void 0 || (_risk$data5 = _risk$data5.gender) === null || _risk$data5 === void 0 ? void 0 : _risk$data5.name) || null\n },\n birthdate: (risk === null || risk === void 0 || (_risk$data6 = risk.data) === null || _risk$data6 === void 0 ? void 0 : _risk$data6.birthdate) || null,\n savings: (risk === null || risk === void 0 || (_risk$data7 = risk.data) === null || _risk$data7 === void 0 ? void 0 : _risk$data7.savings) || null,\n identification: (_risk$data$identifica = risk === null || risk === void 0 || (_risk$data8 = risk.data) === null || _risk$data8 === void 0 ? void 0 : _risk$data8.identification) !== null && _risk$data$identifica !== void 0 ? _risk$data$identifica : null,\n firstName: (_risk$data$firstName = risk === null || risk === void 0 || (_risk$data9 = risk.data) === null || _risk$data9 === void 0 ? void 0 : _risk$data9.firstName) !== null && _risk$data$firstName !== void 0 ? _risk$data$firstName : null,\n lastName: (_risk$data$lastName = risk === null || risk === void 0 || (_risk$data10 = risk.data) === null || _risk$data10 === void 0 ? void 0 : _risk$data10.lastName) !== null && _risk$data$lastName !== void 0 ? _risk$data$lastName : null,\n spouse: (_risk$data$spouse = risk === null || risk === void 0 || (_risk$data11 = risk.data) === null || _risk$data11 === void 0 ? void 0 : _risk$data11.spouse) !== null && _risk$data$spouse !== void 0 ? _risk$data$spouse : null,\n values: (risk === null || risk === void 0 || (_risk$data12 = risk.data) === null || _risk$data12 === void 0 ? void 0 : _risk$data12.values) || null,\n activity: (risk === null || risk === void 0 || (_risk$data13 = risk.data) === null || _risk$data13 === void 0 ? void 0 : _risk$data13.activity) || null,\n bloodPressure: (risk === null || risk === void 0 || (_risk$data14 = risk.data) === null || _risk$data14 === void 0 ? void 0 : _risk$data14.bloodPressure) || null,\n height: (risk === null || risk === void 0 || (_risk$data15 = risk.data) === null || _risk$data15 === void 0 ? void 0 : _risk$data15.height) || null,\n weight: (risk === null || risk === void 0 || (_risk$data16 = risk.data) === null || _risk$data16 === void 0 ? void 0 : _risk$data16.weight) || null\n },\n groupedEconomicValues: []\n };\n })) || []\n }\n };\n return _context2.abrupt(\"return\", quotation);\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return function getQuotationDetail(_x2) {\n return _ref2.apply(this, arguments);\n };\n}();\nvar getQuotationByCode = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(response) {\n var _response$quotationNu, _response$productCode, _response$sectionCode;\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n objectMapped = {\n code: ((_response$quotationNu = response.quotationNumber) === null || _response$quotationNu === void 0 ? void 0 : _response$quotationNu.toString()) || null,\n number: response.activityCode || 0,\n creationDate: response.vigencyDateFrom || null,\n expirationDate: response.vigencyDateTo || null,\n validity: {\n code: \"N/A\",\n name: \"N/A\",\n months: \"N/A\"\n },\n status: {\n code: \"N/A\",\n name: \"N/A\"\n },\n paymentFrequency: {\n name: \"N/A\",\n code: \"N/A\",\n months: 0\n },\n email: \"N/A\",\n phone: \"N/A\",\n intermediary: {\n code: \"N/A\",\n name: \"N/A\",\n roles: {}\n },\n commercialStructure: {\n data: {\n name: \"N/A\",\n code: \"N/A\",\n version: 0,\n description: \"N/A\",\n status: {\n name: \"N/A\",\n code: \"N/A\"\n }\n },\n intermediaries: {\n values: [{\n code: \"N/A\",\n name: \"N/A\",\n licence: \"N/A\",\n role: {\n name: \"N/A\",\n code: \"N/A\"\n },\n status: {\n name: \"N/A\",\n code: \"N/A\"\n },\n group: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }]\n }\n },\n product: {\n name: \"N/A\",\n code: (response === null || response === void 0 || (_response$productCode = response.productCode) === null || _response$productCode === void 0 ? void 0 : _response$productCode.toString()) || null,\n version: 0,\n subsection: {\n name: \"N/A\",\n code: \"N/A\",\n section: {\n name: \"N/A\",\n code: (response === null || response === void 0 || (_response$sectionCode = response.sectionCode) === null || _response$sectionCode === void 0 ? void 0 : _response$sectionCode.toString()) || null,\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n category: {\n name: \"N/A\",\n code: \"N/A\"\n }\n }\n },\n status: {\n code: \"N/A\",\n name: \"N/A\"\n },\n currency: {\n name: \"N/A\",\n code: \"N/A\",\n mnemonic: \"N/A\",\n symbol: \"N/A\"\n }\n },\n productSegment: {\n coverages: [],\n expenses: [],\n name: \"N/A\",\n code: \"N/A\",\n version: 0,\n description: \"N/A\"\n },\n values: {\n risks: [{\n code: \"N/A\",\n coverages: [{\n code: \"N/A\",\n name: \"N/A\",\n deductible: {\n name: \"N/A\",\n code: \"N/A\",\n value: 0,\n appliedValue: 0\n },\n economicValues: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n value: 0\n }],\n coverageValues: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n value: 0\n }]\n }],\n data: {},\n adherents: [{\n code: \"N/A\",\n coverages: [{\n code: \"N/A\",\n name: \"N/A\",\n deductible: {\n name: \"N/A\",\n code: \"N/A\",\n value: 0,\n appliedValue: 0\n },\n economicValues: [{\n type: \"N/A\",\n code: \"N/A\"\n }],\n coverageValues: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n value: 0\n }]\n }],\n data: {}\n }]\n }],\n expenses: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n value: 0\n }],\n groupedEconomicValues: [{\n type: {\n name: \"N/A\",\n code: \"N/A\"\n },\n value: 0\n }],\n commercialAgreement: {}\n }\n };\n return _context3.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return function getQuotationByCode(_x3) {\n return _ref3.apply(this, arguments);\n };\n}();\nvar getQuotationByCode_Request = function getQuotationByCode_Request(inputParams) {\n return {};\n};\nvar getQuotations_Request = function getQuotations_Request(inputParams) {\n return {\n number: inputParams.quotationNumber || undefined,\n from: inputParams.dateFrom || undefined,\n to: inputParams.dateTo || undefined\n };\n};\nvar quotationStandardPlanCreationMapped = function quotationStandardPlanCreationMapped(params) {\n if (!params) return null;\n return {\n sectionCode: 17,\n // no recibe se asigna 17 por defecto\n paymentTypeCode: (0,_helpers_mappingHelpers__WEBPACK_IMPORTED_MODULE_0__.mapPaymentFrequency)(params.paymentFrequencyCode),\n productCode: (0,_helpers_mappingHelpers__WEBPACK_IMPORTED_MODULE_0__.mapProductCode)(params.productCode),\n provinceCode: 1 // no recibe provincia, se asigna 1 por defecto\n };\n};\nvar quotationVariablePlanCreationMapped = function quotationVariablePlanCreationMapped(params) {\n var _params$risks$, _params$risks$2;\n if (!params) return null;\n return {\n sectionCode: 17,\n // no recibe se asigna 17 por defecto\n paymentTypeCode: (0,_helpers_mappingHelpers__WEBPACK_IMPORTED_MODULE_0__.mapPaymentFrequency)(params.paymentFrequencyCode),\n productCode: (0,_helpers_mappingHelpers__WEBPACK_IMPORTED_MODULE_0__.mapProductCode)(params.productCode),\n provinceCode: 1,\n // no recibe provincia, se asigna 1 por defecto\n birthdate: (_params$risks$ = params.risks[0]) === null || _params$risks$ === void 0 ? void 0 : _params$risks$.birthDate,\n insuredAmount: ((_params$risks$2 = params.risks[0]) === null || _params$risks$2 === void 0 || (_params$risks$2 = _params$risks$2.coverages[0]) === null || _params$risks$2 === void 0 || (_params$risks$2 = _params$risks$2.values.find(function (v) {\n return v.code === \"INSURED_AMOUNT\";\n })) === null || _params$risks$2 === void 0 ? void 0 : _params$risks$2.value) || 0\n };\n};\nvar getActivityList = /*#__PURE__*/function () {\n var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n objectMapped = {\n values: response.activities.map(function (a) {\n return {\n code: a.code,\n name: a.name\n };\n })\n };\n return _context4.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return function getActivityList(_x4) {\n return _ref4.apply(this, arguments);\n };\n}();\nvar getProductsBySubsections = /*#__PURE__*/function () {\n var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n objectMapped = {\n values: response.products.map(function (item) {\n return {\n name: item.name,\n code: item.code,\n version: item.version,\n subsection: (item === null || item === void 0 ? void 0 : item.subsection) || null,\n fieldExclusions: (item === null || item === void 0 ? void 0 : item.exclusions) || null,\n fields: (item === null || item === void 0 ? void 0 : item.fieldValues) || (item === null || item === void 0 ? void 0 : item.fields) || null\n };\n })\n };\n return _context5.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }));\n return function getProductsBySubsections(_x5) {\n return _ref5.apply(this, arguments);\n };\n}();\nvar getProductParameters = /*#__PURE__*/function () {\n var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(item) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n objectMapped = {\n name: item.name,\n code: item.code,\n version: item.version,\n subsection: (item === null || item === void 0 ? void 0 : item.subsection) || null,\n fieldExclusions: (item === null || item === void 0 ? void 0 : item.exclusions) || null,\n fields: (item === null || item === void 0 ? void 0 : item.fields) || null\n };\n return _context6.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }));\n return function getProductParameters(_x6) {\n return _ref6.apply(this, arguments);\n };\n}();\nvar getPaymentFrecuencies = /*#__PURE__*/function () {\n var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {\n var objectMapped;\n return _regeneratorRuntime().wrap(function _callee7$(_context7) {\n while (1) switch (_context7.prev = _context7.next) {\n case 0:\n objectMapped = {\n frequencies: response.frequencies.map(function (a) {\n return {\n name: a.name,\n code: a.code,\n months: a.months\n };\n })\n };\n return _context7.abrupt(\"return\", objectMapped);\n case 2:\n case \"end\":\n return _context7.stop();\n }\n }, _callee7);\n }));\n return function getPaymentFrecuencies(_x7) {\n return _ref7.apply(this, arguments);\n };\n}();\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/quotation/index.js?");
|
|
140
173
|
|
|
141
174
|
/***/ }),
|
|
@@ -146,6 +179,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
146
179
|
\*********************************************/
|
|
147
180
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
148
181
|
|
|
182
|
+
"use strict";
|
|
149
183
|
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getRequestDetail: () => (/* binding */ getRequestDetail),\n/* harmony export */ getRequest_Params: () => (/* binding */ getRequest_Params)\n/* harmony export */ });\nvar getRequest_Params = function getRequest_Params(i) {\n return {\n number: i.quotationNumber,\n statusCode: i.status,\n productCode: i.productCode,\n from: i.creationDateFrom,\n to: i.creationDateTo\n };\n};\nvar getRequestDetail = function getRequestDetail(data) {\n var mappedCoverages = data.coverages.map(function (cov) {\n return {\n code: cov.code || null,\n name: cov.name || null,\n deductible: null,\n economicValues: [],\n coverageValues: cov.coverageValues.map(function (val) {\n return {\n value: val.value,\n type: {\n name: val.type.name,\n code: val.type.code\n }\n };\n })\n };\n });\n var request = {\n code: data.number,\n commercialStructure: null,\n creationDate: data.creationDate,\n email: data.insured.email,\n expirationDate: (data === null || data === void 0 ? void 0 : data.expirationDate) || null,\n holder: data.holder || null,\n intermediary: null,\n legalConstraint: null,\n number: data.number || null,\n paymentMethods: {\n payment: data.payment\n },\n paymentFrequency: data.payment.period || null,\n phone: data.insured.phoneNumber || null,\n product: data.product || null,\n productSegment: null,\n quotationNumber: data.quotationNumber || null,\n quotationCode: data.quotationNumber || null,\n requiresBilling: null,\n status: data.status || null,\n validity: null,\n values: {\n risks: [{\n coverages: mappedCoverages\n }]\n } || null,\n vigencyDateFrom: null,\n wordingPlan: null,\n holderPep: data.holderPep,\n holderSoi: data.holderSoi,\n insured: data.insured || null,\n questionnaires: data.questionnaires || null,\n spouse: data.spouse || null\n };\n return request;\n};\n\n//# sourceURL=webpack://sysone-api-mapper/./src/mapper/modules/request/index.js?");
|
|
150
184
|
|
|
151
185
|
/***/ }),
|
|
@@ -156,6 +190,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
156
190
|
\************************/
|
|
157
191
|
/***/ ((module) => {
|
|
158
192
|
|
|
193
|
+
"use strict";
|
|
159
194
|
module.exports = require("axios");
|
|
160
195
|
|
|
161
196
|
/***/ }),
|
|
@@ -166,6 +201,7 @@ module.exports = require("axios");
|
|
|
166
201
|
\************************/
|
|
167
202
|
/***/ ((module) => {
|
|
168
203
|
|
|
204
|
+
"use strict";
|
|
169
205
|
module.exports = require("dayjs");
|
|
170
206
|
|
|
171
207
|
/***/ }),
|
|
@@ -176,8 +212,20 @@ module.exports = require("dayjs");
|
|
|
176
212
|
\*************************************************/
|
|
177
213
|
/***/ ((module) => {
|
|
178
214
|
|
|
215
|
+
"use strict";
|
|
179
216
|
module.exports = require("dayjs/plugin/customParseFormat");
|
|
180
217
|
|
|
218
|
+
/***/ }),
|
|
219
|
+
|
|
220
|
+
/***/ "react":
|
|
221
|
+
/*!************************!*\
|
|
222
|
+
!*** external "react" ***!
|
|
223
|
+
\************************/
|
|
224
|
+
/***/ ((module) => {
|
|
225
|
+
|
|
226
|
+
"use strict";
|
|
227
|
+
module.exports = require("react");
|
|
228
|
+
|
|
181
229
|
/***/ })
|
|
182
230
|
|
|
183
231
|
/******/ });
|