sysone-api-mapper 1.0.21 → 1.0.22
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 +1 -1
- package/package.json +1 -1
- package/src/mapper/Mapper.js +92 -72
- package/api-mapper/README.md +0 -93
package/config/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{apiCall:()=>A,apiMapper:()=>re,axiosInstance:()=>n,endpoints:()=>E});const r=require("axios"),n=e.n(r)().create({});var o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u="PARTY_MODULE",l="INTERMEDIARY_MODULE",c="COMMERCIAL_STRUCTURE_MODULE",s="POLICY_MODULE",d="GET",p="POST",m="PUT",E=(a(a(a(a(a(a(a(a(a(a(o={GET_ACTIVITIES:"GET_ACTIVITIES",GET_PRACTICES:"GET_PRACTICES",SEARCH_INDIVIDUALS:"SEARCH_INDIVIDUALS",CREATE_INDIVIDUAL:"CREATE_INDIVIDUAL",GET_IDENTIFICATION_TYPES:"GET_IDENTIFICATION_TYPES",GET_RELATIONS:"GET_RELATIONS",GET_NOTES:"GET_NOTES",GET_FILES:"GET_FILES",GET_SECTORS:"GET_SECTORS",GET_FISCAL_CATEGORIES:"GET_FISCAL_CATEGORIES",GET_MAIL_TYPES:"GET_MAIL_TYPES",GET_PHONE_TYPES:"GET_PHONE_TYPES",UPDATE_NOTES:"UPDATE_NOTES",UPDATE_FILES:"UPDATE_FILES",ADD_RELATION_WITH_EXISTING_PARTY:"ADD_RELATION_WITH_EXISTING_PARTY",GET_RELATIONS_BY_PARTY_CODE:"GET_RELATIONS_BY_PARTY_CODE",REMOVE_RELATION:"REMOVE_RELATION",GET_FILE:"GET_FILE",GET_ORGANIZATION_TYPES:"GET_ORGANIZATION_TYPES",SEARCH_ORGANIZATION:"SEARCH_ORGANIZATION",CREATE_ORGANIZATION:"CREATE_ORGANIZATION",GET_ORGANIZATION_BY_CODE:"GET_ORGANIZATION_BY_CODE",UPDATE_ORGANIZATION:"UPDATE_ORGANIZATION",ADD_RELATION_WITH_NEW_ORGANIZATION:"ADD_RELATION_WITH_NEW_ORGANIZATION",GET_PERSON_BY_CODE:"GET_PERSON_BY_CODE",GET_GENDERS:"GET_GENDERS",GET_MARITAL_STATUSES:"GET_MARITAL_STATUSES",GET_WORKER_TYPES:"GET_WORKER_TYPES",GET_ECONOMIC_CLASSES:"GET_ECONOMIC_CLASSES",SEARCH_PERSON:"SEARCH_PERSON",UPDATE_PERSON:"UPDATE_PERSON",GET_RELATION_TYPES:"GET_RELATION_TYPES",ADD_RELATION_WITH_NEW_PERSON:"ADD_RELATION_WITH_NEW_PERSON",GET_POLICY_PROCESSES:"GET_POLICY_PROCESSES",GET_COUNTRIES:"GET_COUNTRIES",GET_COUNTRY_BY_CODE:"GET_COUNTRY_BY_CODE",GET_PROVINCES:"GET_PROVINCES",GET_CITIES:"GET_CITIES",GET_POSTAL_CODES:"GET_POSTAL_CODES",GET_ADDRESSES_BY_PARTY_CODE:"GET_ADDRESSES_BY_PARTY_CODE",GET_ADDRESS_TYPES:"GET_ADDRESS_TYPES",GET_PAYMENT_METHODS_BY_PARTY_CODE:"GET_PAYMENT_METHODS_BY_PARTY_CODE",GET_CREDIT_CARD_TYPES:"GET_CREDIT_CARD_TYPES",GET_CARD_PROVIDERS:"GET_CARD_PROVIDERS",UPDATE_PAYMENTS:"UPDATE_PAYMENTS",GET_BANKS:"GET_BANKS",GET_CURRENCIES:"GET_CURRENCIES",GET_BANK_ACCOUNT_TYPES:"GET_BANK_ACCOUNT_TYPES",GET_BANK_BRANCHES:"GET_BANK_BRANCHES",GET_PERSON_INTERMEDIARY_BY_CODE:"GET_PERSON_INTERMEDIARY_BY_CODE",GET_ORGANIZATION_INTERMEDIARY_BY_CODE:"GET_ORGANIZATION_INTERMEDIARY_BY_CODE",GET_INTERMEDIARIES_GROUPS:"GET_INTERMEDIARIES_GROUPS",GET_INTERMEDIARIES_ROLES:"GET_INTERMEDIARIES_ROLES",GET_INTERMEDIARY_STRUCTURES:"GET_INTERMEDIARY_STRUCTURES",SEARCH_INTERMEDIARIES:"SEARCH_INTERMEDIARIES",SEARCH_ACCOUNT_OFFICERS:"SEARCH_ACCOUNT_OFFICERS",GET_INTERMEDIARIES_STATES:"GET_INTERMEDIARIES_STATES",GET_INTERMEDIARIES_TYPES:"GET_INTERMEDIARIES_TYPES",CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY:"CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY",CREATE_INTERMEDIARY_WITH_WITH_PERSON:"CREATE_INTERMEDIARY_WITH_WITH_PERSON",CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION:"CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION",UPDATE_INTERMEDIARY:"UPDATE_INTERMEDIARY",CREATE_COMMERCIAL_STRUCTURE:"CREATE_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURE_STATUSES:"GET_COMMERCIAL_STRUCTURE_STATUSES",SEARCH_COMMERCIAL_STRUCTURE:"SEARCH_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURES_BY_CODE:"GET_COMMERCIAL_STRUCTURES_BY_CODE",UPDATE_COMMERCIAL_STRUCTURE:"UPDATE_COMMERCIAL_STRUCTURE",UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES:"UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES",GET_POLICY_SECTIONS:"GET_POLICY_SECTIONS",GET_POLICY_SUBSECTIONS:"GET_POLICY_SUBSECTIONS"},"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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")),v=[{endpoint:E.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:p,module:u},{endpoint:E.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:d,module:u},{endpoint:E.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:d,module:u},{endpoint:E.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:d,module:u},{endpoint:E.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:d,module:u},{endpoint:E.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:d,module:u},{endpoint:E.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:d,module:u},{endpoint:E.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:d,module:u},{endpoint:E.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:m,module:u},{endpoint:E.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:m,module:u},{endpoint:E.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:m,module:u},{endpoint:E.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:m,module:u},{endpoint:E.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:d,module:u},{endpoint:E.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:d,module:u},{endpoint:E.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:d,module:u},{endpoint:E.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:p,module:u},{endpoint:E.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:m,module:u},{endpoint:E.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:m,module:u},{endpoint:E.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:m,module:u},{endpoint:E.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:d,module:u},{endpoint:E.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:d,module:u},{endpoint:E.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:d,module:u},{endpoint:E.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:d,module:u},{endpoint:E.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:d,module:u},{endpoint:E.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:m,module:u},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:u},{endpoint:E.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:d,module:u},{endpoint:E.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:d,module:u},{endpoint:E.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:d,module:u},{endpoint:E.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:d,module:u},{endpoint:E.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:d,module:u},{endpoint:E.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:d,module:u},{endpoint:E.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:d,module:u},{endpoint:E.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:d,module:u},{endpoint:E.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:d,module:u},{endpoint:E.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:d,module:u},{endpoint:E.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:m,module:u},{endpoint:E.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:d,module:u},{endpoint:E.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:d,module:u},{endpoint:E.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:d,module:u},{endpoint:E.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:d,module:u},{endpoint:E.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:d,module:l},{endpoint:E.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:d,module:l},{endpoint:E.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:d,module:l},{endpoint:E.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:d,module:l},{endpoint:E.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:p,module:l},{endpoint:E.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:m,module:l},{endpoint:E.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:d,module:c},{endpoint:E.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:p,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:d,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:m,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:m,module:c},{endpoint:E.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:d,module:s},{endpoint:E.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:d,module:s},{endpoint:E.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:d,module:s},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:s},{endpoint:E.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:d,module:s},{endpoint:E.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:d,module:s},{endpoint:E.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:d,module:s},{endpoint:E.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:d,module:s},{endpoint:E.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:d,module:s},{endpoint:E.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:d,module:s},{endpoint:E.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:d,module:s},{endpoint:E.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:d,module:s},{endpoint:E.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:d,module:s},{endpoint:E.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:d,module:s},{endpoint:E.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:d,module:s},{endpoint:E.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:p,module:s},{endpoint:E.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:m,module:s},{endpoint:E.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:d,module:s},{endpoint:E.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:d,module:s},{endpoint:E.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:d,module:s},{endpoint:E.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:d,module:s},{endpoint:E.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:d,module:s},{endpoint:E.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:d,module:s},{endpoint:E.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:d,module:s},{endpoint:E.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:d,module:s},{endpoint:E.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:m,module:s},{endpoint:E.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:d,module:s},{endpoint:E.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:m,module:s},{endpoint:E.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:d,module:s},{endpoint:E.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:p,module:s},{endpoint:E.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:m,module:s},{endpoint:E.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:m,module:s},{endpoint:E.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:m,module:s},{endpoint:E.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:d,module:s},{endpoint:E.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:d,module:s},{endpoint:E.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:d,module:s},{endpoint:E.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:d,module:s},{endpoint:E.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:d,module:l},{endpoint:E.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:p,module:"CONFIGURATOR_MODULE"}];function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof T?t:T,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",y={};function T(){}function _(){}function A(){}var N={};c(N,a,(function(){return this}));var S=Object.getPrototypeOf,I=S&&S(S(G([])));I&&I!==r&&n.call(I,a)&&(N=I);var O=A.prototype=T.prototype=Object.create(N);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==h(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,t.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[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(h(t)+" is not iterable")}return _.prototype=A,o(O,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:_,configurable:!0}),_.displayName=c(A,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var T=function(e,t){try{var n={title:"",errors:[]};if(t instanceof r.AxiosError){var o,i,a=t.response,u=a.status,l=null===(o=JSON.parse(localStorage.getItem("modules_info")).find((function(t){return t.code===e.module})))||void 0===o||null===(o=o.services)||void 0===o||null===(o=o.find((function(t){return t.name.toUpperCase()===e.serviceName.toUpperCase()&&t.httpMethod.toUpperCase()===e.method.toUpperCase()})))||void 0===o?void 0:o.errors.find((function(e){return e.httpStatus===u}));n.title=(null==l?void 0:l.content)||a.data.message;var c=null===(i=a.data.errorMessages)||void 0===i?void 0:i.map((function(e){var t,r=null==l||null===(t=l.subErrors)||void 0===t?void 0:t.find((function(t){return t.errorType===e.fieldError&&t.fieldName===e.fieldName}));return(null==r?void 0:r.content)||(null==e?void 0:e.error)}));n.errors=c||[]}else n.title=t.message}catch(t){throw console.error(t),t}},_=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},A=function(){var e,t=(e=f().mark((function e(t,r){var o,i,a,u,l=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>2&&void 0!==l[2]?l[2]:null,i=v.find((function(e){return e.endpoint===t})),e.prev=2,i){e.next=5;break}throw new Error("Service does not exists");case 5:a=_(i.url,r),e.t0=i.method,e.next=e.t0===d?9:e.t0===p?13:e.t0===m?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,n.get(a,{params:o});case 11:case 15:case 19:case 23:return u=e.sent,e.abrupt("return",u.data);case 13:return e.next=15,n.post(a,o);case 17:return e.next=19,n.put(a,o);case 21:return e.next=23,n.delete(a,o);case 25:throw u=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 27:e.next=33;break;case 29:throw e.prev=29,e.t1=e.catch(2),T(i,e.t1),e.t1;case 33:case"end":return e.stop()}}),e,null,[[2,29]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,I=A&&A(A(G([])));I&&I!==r&&n.call(I,a)&&(_=I);var O=T.prototype=f.prototype=Object.create(_);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==N(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(N(t)+" is not iterable")}return y.prototype=T,o(O,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function I(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var O=function(){var e,t=(e=S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={values:null==t||null===(r=t.claims)||void 0===r?void 0:r.map((function(e){return{claimNumber:e.claimNumber.toString(),policyNumber:e.policyNumber,creationDate:e.claimDate,status:{name:e.status,code:"N/A"}}}))},e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();const g=require("moment");var R=e.n(g);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){P=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(G([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(C(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function D(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){D(i,n,o,a,u,"next",e)}function u(e){D(i,n,o,a,u,"throw",e)}a(void 0)}))}}var b=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:t.insureds.length,totalActive:null,values:t.insureds.map((function(e){return{code:e.code,number:e.id,firstName:e.firstName||e.name,lastName:e.lastName,type:{code:"T"===e.role.code?"OWNER":"ADHERENT",name:"T"===e.role.code?"Titular":"Adherente"},status:{code:"ACTIVE",name:"Activo"},insuredAmount:e.insuredAmount,inclusionDate:e.entranceDate,exclusionDate:e.cancellationDate,identification:{value:e.identification.number,type:{name:e.identification.type.name,code:e.identification.type.code}}}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.endorsements.map((function(e){return{number:e.number,validityFrom:e.dateFrom?R()(e.dateFrom,"DD/MM/YYYY").toISOString():null,validityTo:e.dateTo?R()(e.dateTo,"DD/MM/YYYY").toISOString():null,activeDate:"N/A",type:{code:"N/A",name:e.detail,group:{code:"N/A",name:"N/A"}}}})),total:t.endorsements.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.policies.map((function(e){var t,r,n,o,i,a,u,l,c,s;return{number:e.number,validityFrom:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,validityTo:"N/A",ingress:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,holder:{name:(null===(t=e.holder)||void 0===t?void 0:t.name)||(null===(r=e.holder)||void 0===r?void 0:r.firstName),identifications:{values:[{value:(null===(n=e.holder)||void 0===n||null===(n=n.identification)||void 0===n?void 0:n.number)||null,type:{name:(null===(o=e.holder)||void 0===o||null===(o=o.identification)||void 0===o||null===(o=o.type)||void 0===o?void 0:o.name)||null,code:(null===(i=e.holder)||void 0===i||null===(i=i.identification)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.code)||null},default:!0}]}},code:"N/A",alias:"N/A",product:{code:(null===(a=e.section)||void 0===a?void 0:a.code.toString())||null,name:(null===(u=e.section)||void 0===u?void 0:u.name)||null,subsection:{name:"N/A",code:"N/A",section:{name:(null===(l=e.section)||void 0===l?void 0:l.name)||null,code:(null===(c=e.section)||void 0===c?void 0:c.code)||null}}},process:{name:(null===(s=e.status)||void 0===s?void 0:s.name)||null,code:"N/A"}}})),total:t.totalRecord||null},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==x(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(x(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function j(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function q(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){j(i,n,o,a,u,"next",e)}function u(e){j(i,n,o,a,u,"throw",e)}a(void 0)}))}}var k=function(){var e=q(U().mark((function e(t){var r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={quotations:t.quotations.map((function(e){var t,r;return{code:e.quotationNumber||null,creationDate:"N/A",email:"N/A",expirationDate:"N/A",number:e.activityCode||null,paymentFrequency:{name:"N/A",code:"N/A"},product:{code:(null===(t=e.productCode)||void 0===t?void 0:t.toString())||null,name:"N/A",subsection:{code:"N/A",name:"N/A",section:{code:(null===(r=e.sectionCode)||void 0===r?void 0:r.toString())||null,name:"N/A"}},version:0},status:{code:"N/A",name:"N/A"}}})),total:t.quotations.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=q(U().mark((function e(t){var r,n,o,i;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={code:(null===(r=t.quotationNumber)||void 0===r?void 0:r.toString())||null,number:t.activityCode||0,creationDate:t.vigencyDateFrom||null,expirationDate:t.vigencyDateTo||null,validity:{code:"N/A",name:"N/A",months:"N/A"},status:{code:"N/A",name:"N/A"},paymentFrequency:{name:"N/A",code:"N/A",months:0},email:"N/A",phone:"N/A",intermediary:{code:"N/A",name:"N/A",roles:{}},commercialStructure:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:"N/A",name:"N/A",licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"},group:{name:"N/A",code:"N/A"}}]}},product:{name:"N/A",code:(null==t||null===(n=t.productCode)||void 0===n?void 0:n.toString())||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:"N/A",code:(null==t||null===(o=t.sectionCode)||void 0===o?void 0:o.toString())||null,type:{name:"N/A",code:"N/A"},category:{name:"N/A",code:"N/A"}}},status:{code:"N/A",name:"N/A"},currency:{name:"N/A",code:"N/A",mnemonic:"N/A",symbol:"N/A"}},productSegment:{coverages:[],expenses:[],name:"N/A",code:"N/A",version:0,description:"N/A"},values:{risks:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:{name:"N/A",code:"N/A"},value:0}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{},adherents:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:"N/A",code:"N/A"}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{}}]}],expenses:[{type:{name:"N/A",code:"N/A"},value:0}],groupedEconomicValues:[{type:{name:"N/A",code:"N/A"},value:0}],commercialAgreement:{}}},e.abrupt("return",i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),B=function(e){return e?{sectionCode:17,paymentTypeCode:mapPaymentFrequency(e.paymentFrequencyCode),productCode:mapProductCode(e.productCode),provinceCode:1}:null},H=function(e){var t,r;return e?{sectionCode:17,paymentTypeCode:mapPaymentFrequency(e.paymentFrequencyCode),productCode:mapProductCode(e.productCode),provinceCode:1,birthdate:null===(t=e.risks[0])||void 0===t?void 0:t.birthDate,insuredAmount:(null===(r=e.risks[0])||void 0===r||null===(r=r.coverages[0])||void 0===r||null===(r=r.values.find((function(e){return"INSURED_AMOUNT"===e.code})))||void 0===r?void 0:r.value)||0}:null},V=function(){var e=q(U().mark((function e(t){var r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.activities.map((function(e){return{code:e.code,name:e.name}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W="GET",Z="POST",K={GET_ACTIVITY:{default:{url:"party/v1/sectors",method:W,source:"https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/activity",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return V(e)}}},GET_CLAIMS:{default:{url:"claim/v1/claims",method:W,source:"https://apidoc.sysone.com/claim/v1/open-api.html",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"claim/v1/claim",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",requestMapper:null,responseMapper:function(e){return O(e)}}},GET_ENDORSEMENTS:{default:{url:"policy/v1/policies/{0}/endorsements",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/endorsements",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return G(e)}}},GET_INSUREDS:{default:{url:"policy-life/v1/policies/{0}/insureds",method:W,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/policy-insured",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds",requestMapper:function(e){return{mappedParams:(t=e,{code:t.number||void 0,name:t.firstName||void 0})};var t},responseMapper:function(e){return b(e)}}},GET_POLICIES:{default:{url:"policy/v1/policies",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",requestMapper:function(e){return{mappedParams:(t=e,{sort:"TomadorCodigo",orderType:"desc",pageNumber:t.page||1,pageSize:t.pageSize||10,allPolicies:null})};var t},responseMapper:function(e){return w(e)}}},GET_POLICY_HOME_COLLECTIVE_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_HOME_INDIVIDUAL_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_POLICY_LIFE_COLLECTIVE_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_LIFE_INDIVIDUAL_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_QUOTATION_BY_CODE:{default:{url:"quotation/v1/quotations/{0}",method:W,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan/{0}",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number",requestMapper:function(e){return{mappedParams:getQuotationByCode_Request(e)}},responseMapper:function(e){return F(e)}}},GET_QUOTATIONS:{default:{url:"quotation/v1/quotations",method:W,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-variable-plan",requestMapper:function(e){return{mappedParams:getQuotations_Request(e)}},responseMapper:function(e){return k(e)}}},GET_PAYMENT_METHODS:{},POST_INSURED_UPDATE:{default:{url:"policy-life/v1/policies/{0}/insureds",method:Z,requestMapper:null,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post",responseMapper:function(e){return e}},cnp:{url:"v1/policy-collective/{0}/{1}/insureds",method:Z,requestMapper:null,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds",responseMapper:function(e){return{salary:"string"==typeof(t=e).salary?t.salary:String(t.salary),identification:"string"==typeof t.identification?t.identification:String(t.identification)};var t}}},POST_CREATE_QUOTATION_STANDARD_PLAN:{default:{url:"quotation/v1/quotations",method:Z,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan",method:Z,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan",requestMapper:function(e){return{mappedBody:B(e)}},responseMapper:function(e){return e}}},POST_CREATE_QUOTATION_VARIABLE_PLAN:{default:{url:"quotation/v1/quotations",method:Z,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:Z,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan",requestMapper:function(e){return{mappedBody:H(e)}},responseMapper:function(e){return e}}},CREATE_INSURED:{}};function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Q(){Q=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==X(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(X(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function ee(e,t,r){return(t=function(e){var t=function(e){if("object"!=X(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te={default:{baseURL:"https://app-dev.sysone.com/",headers:ee(ee(ee({},"X-Tenant","sysone"),"X-User","sysone"),"X-Api-Key","PYRxE7iBUFCFcDmTwIFGEkvSMzJ88hSU4uWG0DL0ebk1CYVamsa6phIlsECQQMqkM0XXtZ5K1L85cyr3MgkIhtjlIh4niBsagiVRjzIaqNKxSU2N8Y7KaZLItDB2oDTc")},cnp:{baseURL:"http://api-test.cnp.com.ar/",headers:ee(ee(ee(ee({},"X-Chanel","cnp"),"X-Agent","299"),"X-Client","cnp"),"Ocp-Apim-Subscription-Key","5e0a100bd5804b058fc119729177cefd")}},re=function(){var e,t=(e=Q().mark((function e(t,r,o){var i,a,u,l,c,s,d,p,m,E,v,h,f,y=arguments;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=y.length>3&&void 0!==y[3]?y[3]:null,e.prev=1,l=K[t]){e.next=5;break}throw new Error("Endpoint no configurado: ".concat(t));case 5:c=null!==(a=l[r])&&void 0!==a?a:l.default,s=J(J({},null!==(u=te[r])&&void 0!==u?u:te.default),{},{validateStatus:function(e){return e<500}}),d=ne(c.url,o),e.t0=c.method,e.next=e.t0===W?11:e.t0===Z?17:"PUT"===e.t0?23:"DELETE"===e.t0?27:31;break;case 11:return m=c.requestMapper(i),E=m.mappedParams,e.next=15,n.get(d,J(J({},s),{},{params:E}));case 15:case 21:case 25:case 29:return p=e.sent,e.abrupt("return",c.responseMapper(p.data));case 17:return m=c.requestMapper(i),h=(v=m).mappedPostParams,f=v.mappedBody,e.next=21,n.post(d,f,J(J({},s),{},{params:h}));case 23:return e.next=25,n.put(d,i);case 27:return e.next=29,n.delete(d,i);case 31:throw p=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 33:e.next=38;break;case 35:throw e.prev=35,e.t1=e.catch(1),e.t1;case 38:case"end":return e.stop()}}),e,null,[[1,35]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){$(i,n,o,a,u,"next",e)}function u(e){$(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),ne=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e};module.exports=t})();
|
|
2
|
+
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{apiCall:()=>A,apiMapper:()=>re,axiosInstance:()=>n,endpoints:()=>E});const r=require("axios"),n=e.n(r)().create({});var o;function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var u="PARTY_MODULE",l="INTERMEDIARY_MODULE",c="COMMERCIAL_STRUCTURE_MODULE",s="POLICY_MODULE",d="GET",p="POST",m="PUT",E=(a(a(a(a(a(a(a(a(a(a(o={GET_ACTIVITIES:"GET_ACTIVITIES",GET_PRACTICES:"GET_PRACTICES",SEARCH_INDIVIDUALS:"SEARCH_INDIVIDUALS",CREATE_INDIVIDUAL:"CREATE_INDIVIDUAL",GET_IDENTIFICATION_TYPES:"GET_IDENTIFICATION_TYPES",GET_RELATIONS:"GET_RELATIONS",GET_NOTES:"GET_NOTES",GET_FILES:"GET_FILES",GET_SECTORS:"GET_SECTORS",GET_FISCAL_CATEGORIES:"GET_FISCAL_CATEGORIES",GET_MAIL_TYPES:"GET_MAIL_TYPES",GET_PHONE_TYPES:"GET_PHONE_TYPES",UPDATE_NOTES:"UPDATE_NOTES",UPDATE_FILES:"UPDATE_FILES",ADD_RELATION_WITH_EXISTING_PARTY:"ADD_RELATION_WITH_EXISTING_PARTY",GET_RELATIONS_BY_PARTY_CODE:"GET_RELATIONS_BY_PARTY_CODE",REMOVE_RELATION:"REMOVE_RELATION",GET_FILE:"GET_FILE",GET_ORGANIZATION_TYPES:"GET_ORGANIZATION_TYPES",SEARCH_ORGANIZATION:"SEARCH_ORGANIZATION",CREATE_ORGANIZATION:"CREATE_ORGANIZATION",GET_ORGANIZATION_BY_CODE:"GET_ORGANIZATION_BY_CODE",UPDATE_ORGANIZATION:"UPDATE_ORGANIZATION",ADD_RELATION_WITH_NEW_ORGANIZATION:"ADD_RELATION_WITH_NEW_ORGANIZATION",GET_PERSON_BY_CODE:"GET_PERSON_BY_CODE",GET_GENDERS:"GET_GENDERS",GET_MARITAL_STATUSES:"GET_MARITAL_STATUSES",GET_WORKER_TYPES:"GET_WORKER_TYPES",GET_ECONOMIC_CLASSES:"GET_ECONOMIC_CLASSES",SEARCH_PERSON:"SEARCH_PERSON",UPDATE_PERSON:"UPDATE_PERSON",GET_RELATION_TYPES:"GET_RELATION_TYPES",ADD_RELATION_WITH_NEW_PERSON:"ADD_RELATION_WITH_NEW_PERSON",GET_POLICY_PROCESSES:"GET_POLICY_PROCESSES",GET_COUNTRIES:"GET_COUNTRIES",GET_COUNTRY_BY_CODE:"GET_COUNTRY_BY_CODE",GET_PROVINCES:"GET_PROVINCES",GET_CITIES:"GET_CITIES",GET_POSTAL_CODES:"GET_POSTAL_CODES",GET_ADDRESSES_BY_PARTY_CODE:"GET_ADDRESSES_BY_PARTY_CODE",GET_ADDRESS_TYPES:"GET_ADDRESS_TYPES",GET_PAYMENT_METHODS_BY_PARTY_CODE:"GET_PAYMENT_METHODS_BY_PARTY_CODE",GET_CREDIT_CARD_TYPES:"GET_CREDIT_CARD_TYPES",GET_CARD_PROVIDERS:"GET_CARD_PROVIDERS",UPDATE_PAYMENTS:"UPDATE_PAYMENTS",GET_BANKS:"GET_BANKS",GET_CURRENCIES:"GET_CURRENCIES",GET_BANK_ACCOUNT_TYPES:"GET_BANK_ACCOUNT_TYPES",GET_BANK_BRANCHES:"GET_BANK_BRANCHES",GET_PERSON_INTERMEDIARY_BY_CODE:"GET_PERSON_INTERMEDIARY_BY_CODE",GET_ORGANIZATION_INTERMEDIARY_BY_CODE:"GET_ORGANIZATION_INTERMEDIARY_BY_CODE",GET_INTERMEDIARIES_GROUPS:"GET_INTERMEDIARIES_GROUPS",GET_INTERMEDIARIES_ROLES:"GET_INTERMEDIARIES_ROLES",GET_INTERMEDIARY_STRUCTURES:"GET_INTERMEDIARY_STRUCTURES",SEARCH_INTERMEDIARIES:"SEARCH_INTERMEDIARIES",SEARCH_ACCOUNT_OFFICERS:"SEARCH_ACCOUNT_OFFICERS",GET_INTERMEDIARIES_STATES:"GET_INTERMEDIARIES_STATES",GET_INTERMEDIARIES_TYPES:"GET_INTERMEDIARIES_TYPES",CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY:"CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY",CREATE_INTERMEDIARY_WITH_WITH_PERSON:"CREATE_INTERMEDIARY_WITH_WITH_PERSON",CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION:"CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION",UPDATE_INTERMEDIARY:"UPDATE_INTERMEDIARY",CREATE_COMMERCIAL_STRUCTURE:"CREATE_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURE_STATUSES:"GET_COMMERCIAL_STRUCTURE_STATUSES",SEARCH_COMMERCIAL_STRUCTURE:"SEARCH_COMMERCIAL_STRUCTURE",GET_COMMERCIAL_STRUCTURES_BY_CODE:"GET_COMMERCIAL_STRUCTURES_BY_CODE",UPDATE_COMMERCIAL_STRUCTURE:"UPDATE_COMMERCIAL_STRUCTURE",UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES:"UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES",GET_POLICY_SECTIONS:"GET_POLICY_SECTIONS",GET_POLICY_SUBSECTIONS:"GET_POLICY_SUBSECTIONS"},"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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"),a(a(a(a(a(a(a(a(a(a(o,"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")),v=[{endpoint:E.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:p,module:u},{endpoint:E.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:d,module:u},{endpoint:E.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:d,module:u},{endpoint:E.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:d,module:u},{endpoint:E.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:d,module:u},{endpoint:E.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:d,module:u},{endpoint:E.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:d,module:u},{endpoint:E.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:d,module:u},{endpoint:E.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:d,module:u},{endpoint:E.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:m,module:u},{endpoint:E.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:m,module:u},{endpoint:E.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:m,module:u},{endpoint:E.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:d,module:u},{endpoint:E.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:m,module:u},{endpoint:E.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:d,module:u},{endpoint:E.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:d,module:u},{endpoint:E.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:d,module:u},{endpoint:E.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:p,module:u},{endpoint:E.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:m,module:u},{endpoint:E.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:m,module:u},{endpoint:E.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:m,module:u},{endpoint:E.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:d,module:u},{endpoint:E.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:d,module:u},{endpoint:E.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:d,module:u},{endpoint:E.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:d,module:u},{endpoint:E.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:d,module:u},{endpoint:E.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:d,module:u},{endpoint:E.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:d,module:u},{endpoint:E.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:m,module:u},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:u},{endpoint:E.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:d,module:u},{endpoint:E.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:d,module:u},{endpoint:E.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:d,module:u},{endpoint:E.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:d,module:u},{endpoint:E.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:d,module:u},{endpoint:E.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:d,module:u},{endpoint:E.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:d,module:u},{endpoint:E.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:d,module:u},{endpoint:E.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:d,module:u},{endpoint:E.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:d,module:u},{endpoint:E.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:m,module:u},{endpoint:E.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:d,module:u},{endpoint:E.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:d,module:u},{endpoint:E.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:d,module:u},{endpoint:E.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:d,module:u},{endpoint:E.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:d,module:l},{endpoint:E.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:d,module:l},{endpoint:E.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:d,module:l},{endpoint:E.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:l},{endpoint:E.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:d,module:l},{endpoint:E.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:p,module:l},{endpoint:E.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:p,module:l},{endpoint:E.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:m,module:l},{endpoint:E.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:d,module:c},{endpoint:E.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:p,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:d,module:c},{endpoint:E.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:d,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:m,module:c},{endpoint:E.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:m,module:c},{endpoint:E.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:d,module:s},{endpoint:E.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:d,module:s},{endpoint:E.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:d,module:s},{endpoint:E.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:d,module:s},{endpoint:E.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:d,module:s},{endpoint:E.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:d,module:s},{endpoint:E.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:d,module:s},{endpoint:E.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:d,module:s},{endpoint:E.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:d,module:s},{endpoint:E.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:d,module:s},{endpoint:E.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:d,module:s},{endpoint:E.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:d,module:s},{endpoint:E.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:d,module:s},{endpoint:E.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:d,module:s},{endpoint:E.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:d,module:s},{endpoint:E.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:p,module:s},{endpoint:E.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:m,module:s},{endpoint:E.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:m,module:s},{endpoint:E.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:d,module:s},{endpoint:E.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:d,module:s},{endpoint:E.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:d,module:s},{endpoint:E.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:d,module:s},{endpoint:E.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:d,module:s},{endpoint:E.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:d,module:s},{endpoint:E.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:d,module:s},{endpoint:E.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:d,module:s},{endpoint:E.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:d,module:s},{endpoint:E.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:m,module:s},{endpoint:E.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:d,module:s},{endpoint:E.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:m,module:s},{endpoint:E.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:d,module:s},{endpoint:E.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:m,module:s},{endpoint:E.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:p,module:s},{endpoint:E.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:m,module:s},{endpoint:E.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:m,module:s},{endpoint:E.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:m,module:s},{endpoint:E.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:d,module:s},{endpoint:E.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:d,module:s},{endpoint:E.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:d,module:s},{endpoint:E.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:d,module:s},{endpoint:E.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:d,module:s},{endpoint:E.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:d,module:l},{endpoint:E.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:p,module:"CONFIGURATOR_MODULE"}];function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof T?t:T,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",y={};function T(){}function _(){}function A(){}var N={};c(N,a,(function(){return this}));var S=Object.getPrototypeOf,I=S&&S(S(G([])));I&&I!==r&&n.call(I,a)&&(N=I);var O=A.prototype=T.prototype=Object.create(N);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==h(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(o,t.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[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(h(t)+" is not iterable")}return _.prototype=A,o(O,"constructor",{value:A,configurable:!0}),o(A,"constructor",{value:_,configurable:!0}),_.displayName=c(A,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var T=function(e,t){try{var n={title:"",errors:[]};if(t instanceof r.AxiosError){var o,i,a=t.response,u=a.status,l=null===(o=JSON.parse(localStorage.getItem("modules_info")).find((function(t){return t.code===e.module})))||void 0===o||null===(o=o.services)||void 0===o||null===(o=o.find((function(t){return t.name.toUpperCase()===e.serviceName.toUpperCase()&&t.httpMethod.toUpperCase()===e.method.toUpperCase()})))||void 0===o?void 0:o.errors.find((function(e){return e.httpStatus===u}));n.title=(null==l?void 0:l.content)||a.data.message;var c=null===(i=a.data.errorMessages)||void 0===i?void 0:i.map((function(e){var t,r=null==l||null===(t=l.subErrors)||void 0===t?void 0:t.find((function(t){return t.errorType===e.fieldError&&t.fieldName===e.fieldName}));return(null==r?void 0:r.content)||(null==e?void 0:e.error)}));n.errors=c||[]}else n.title=t.message}catch(t){throw console.error(t),t}},_=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},A=function(){var e,t=(e=f().mark((function e(t,r){var o,i,a,u,l=arguments;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=l.length>2&&void 0!==l[2]?l[2]:null,i=v.find((function(e){return e.endpoint===t})),e.prev=2,i){e.next=5;break}throw new Error("Service does not exists");case 5:a=_(i.url,r),e.t0=i.method,e.next=e.t0===d?9:e.t0===p?13:e.t0===m?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,n.get(a,{params:o});case 11:case 15:case 19:case 23:return u=e.sent,e.abrupt("return",u.data);case 13:return e.next=15,n.post(a,o);case 17:return e.next=19,n.put(a,o);case 21:return e.next=23,n.delete(a,o);case 25:throw u=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 27:e.next=33;break;case 29:throw e.prev=29,e.t1=e.catch(2),T(i,e.t1),e.t1;case 33:case"end":return e.stop()}}),e,null,[[2,29]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:C(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,I=A&&A(A(G([])));I&&I!==r&&n.call(I,a)&&(_=I);var O=T.prototype=f.prototype=Object.create(_);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==N(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function C(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=P(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(N(t)+" is not iterable")}return y.prototype=T,o(O,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},g(R.prototype),c(R.prototype,u,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new R(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(O),c(O,l,"Generator"),c(O,a,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function I(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}var O=function(){var e,t=(e=S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={values:null==t||null===(r=t.claims)||void 0===r?void 0:r.map((function(e){return{claimNumber:e.claimNumber.toString(),policyNumber:e.policyNumber,creationDate:e.claimDate,status:{name:e.status,code:"N/A"}}}))},e.abrupt("return",n);case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){I(i,n,o,a,u,"next",e)}function u(e){I(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();const g=require("moment");var R=e.n(g);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function P(){P=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new b(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(G([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==C(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function G(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(C(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,b.prototype={constructor:b,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function D(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){D(i,n,o,a,u,"next",e)}function u(e){D(i,n,o,a,u,"throw",e)}a(void 0)}))}}var b=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={total:t.insureds.length,totalActive:null,values:t.insureds.map((function(e){return{code:e.code,number:e.id,firstName:e.firstName||e.name,lastName:e.lastName,type:{code:"T"===e.role.code?"OWNER":"ADHERENT",name:"T"===e.role.code?"Titular":"Adherente"},status:{code:"ACTIVE",name:"Activo"},insuredAmount:e.insuredAmount,inclusionDate:e.entranceDate,exclusionDate:e.cancellationDate,identification:{value:e.identification.number,type:{name:e.identification.type.name,code:e.identification.type.code}}}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.endorsements.map((function(e){return{number:e.number,validityFrom:e.dateFrom?R()(e.dateFrom,"DD/MM/YYYY").toISOString():null,validityTo:e.dateTo?R()(e.dateTo,"DD/MM/YYYY").toISOString():null,activeDate:"N/A",type:{code:"N/A",name:e.detail,group:{code:"N/A",name:"N/A"}}}})),total:t.endorsements.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=L(P().mark((function e(t){var r;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.policies.map((function(e){var t,r,n,o,i,a,u,l,c,s;return{number:e.number,validityFrom:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,validityTo:"N/A",ingress:e.issueDate?R()(e.issueDate,"DD/MM/YYYY").toISOString():null,holder:{name:(null===(t=e.holder)||void 0===t?void 0:t.name)||(null===(r=e.holder)||void 0===r?void 0:r.firstName),identifications:{values:[{value:(null===(n=e.holder)||void 0===n||null===(n=n.identification)||void 0===n?void 0:n.number)||null,type:{name:(null===(o=e.holder)||void 0===o||null===(o=o.identification)||void 0===o||null===(o=o.type)||void 0===o?void 0:o.name)||null,code:(null===(i=e.holder)||void 0===i||null===(i=i.identification)||void 0===i||null===(i=i.type)||void 0===i?void 0:i.code)||null},default:!0}]}},code:"N/A",alias:"N/A",product:{code:(null===(a=e.section)||void 0===a?void 0:a.code.toString())||null,name:(null===(u=e.section)||void 0===u?void 0:u.name)||null,subsection:{name:"N/A",code:"N/A",section:{name:(null===(l=e.section)||void 0===l?void 0:l.name)||null,code:(null===(c=e.section)||void 0===c?void 0:c.code)||null}}},process:{name:(null===(s=e.status)||void 0===s?void 0:s.name)||null,code:"N/A"}}})),total:t.totalRecord||null},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=L(P().mark((function e(t){var r,n,o,i,a,u,l,c,s,d,p,m,E,v,h,f,y,T,_,A,N,S,I,O,g,C,D,L,b,G,w,Y;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y={policyData:{number:(null==t?void 0:t.number)||null,alias:"N/A",currency:{name:(null==t||null===(r=t.currency)||void 0===r?void 0:r.name)||null,code:(null==t||null===(n=t.currency)||void 0===n?void 0:n.code)||null,mnemonic:"N/A",symbol:(null==t||null===(o=t.currency)||void 0===o?void 0:o.symbol)||null},validity:{type:{name:(null==t||null===(i=t.currency)||void 0===i?void 0:i.name)||null,code:(null==t||null===(a=t.currency)||void 0===a?void 0:a.code)||null,months:"N/A"},dateFrom:null!=t&&t.vigencyDateFrom?R()(t.vigencyDateFrom,"YYYY/MM/DD").toISOString():null,dateTo:null!=t&&t.vigencyDateTo?R()(t.vigencyDateTo,"YYYY/MM/DD").toISOString():null},creationDate:null!=t&&t.issueDate?R()(t.issueDate,"YYYY/MM/DD").toISOString():null,renewable:!0,process:{name:(null==t||null===(u=t.status)||void 0===u?void 0:u.name)||null,code:"N/A"}},roleData:{holder:{partyCode:(null==t||null===(l=t.holder)||void 0===l?void 0:l.code)||null,name:null!=t&&null!==(c=t.holder)&&void 0!==c&&c.firstName&&null!=t&&null!==(s=t.holder)&&void 0!==s&&s.lastName?"".concat(t.holder.firstName," ").concat(t.holder.lastName):(null==t||null===(d=t.holder)||void 0===d?void 0:d.name)||null,identification:{value:(null==t||null===(p=t.holder)||void 0===p||null===(p=p.identification)||void 0===p?void 0:p.number)||null,type:{code:(null==t||null===(m=t.holder)||void 0===m||null===(m=m.identification)||void 0===m||null===(m=m.type)||void 0===m?void 0:m.code)||null,name:(null==t||null===(E=t.holder)||void 0===E||null===(E=E.identification)||void 0===E||null===(E=E.type)||void 0===E?void 0:E.name)||null}}},contacts:[{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}],legalResponsible:{partyCode:"N/A",name:"N/A",identification:{value:"N/A",type:{name:"N/A",code:"N/A"}}}},collectionData:{holderDistribution:0,insuredDistribution:0,paymentFrequency:{name:(null==t||null===(v=t.paymentMethod)||void 0===v||null===(v=v.periodicity)||void 0===v?void 0:v.name)||null,code:"N/A"},paymentMethodData:{cashMethodData:"CASH"===(null==t||null===(h=t.paymentMethod)||void 0===h?void 0:h.name)?{values:[{code:"N/A",name:(null==t||null===(f=t.currency)||void 0===f?void 0:f.name)||null}]}:null,bankAccountData:"CBU"===(null==t||null===(y=t.paymentMethod)||void 0===y?void 0:y.name)?{values:[{code:"BA-1",number:"1",cbu:(null==t||null===(T=t.paymentMethod)||void 0===T?void 0:T.bankAccountNumber)||null,alias:"N/A",currency:{code:"N/A",name:(null==t||null===(_=t.currency)||void 0===_?void 0:_.name)||null},bankBranch:{name:"N/A",code:"N/A",bank:{name:"N/A",code:"N/A"}},bankAccountType:{name:"N/A",code:"N/A"}}]}:null,creditCardData:"CREDIT"===(null==t||null===(A=t.paymentMethod)||void 0===A?void 0:A.name)?{values:[{code:"N/A",ownerName:"N/A",cardType:{name:"N/A",code:"N/A"},cardProvider:{name:"N/A",code:"N/A"},number:"N/A",securityCode:"N/A",dateTo:"N/A"}]}:null}},commercialStructureData:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:(null==t||null===(N=t.intermediary)||void 0===N||null===(N=N.code)||void 0===N?void 0:N.toString())||null,name:(null==t||null===(S=t.intermediary)||void 0===S?void 0:S.name)||null,licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"}}]}},productData:{name:(null==t||null===(I=t.product)||void 0===I?void 0:I.name)||null,code:(null==t||null===(O=t.product)||void 0===O?void 0:O.code)||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:(null==t||null===(g=t.section)||void 0===g?void 0:g.name)||null,code:(null==t||null===(C=t.section)||void 0===C?void 0:C.code)||null}},status:{name:(null==t||null===(D=t.status)||void 0===D?void 0:D.name)||null,code:"N/A"}},coverageData:{coverages:(null==t||null===(L=t.insured)||void 0===L||null===(L=L.coverages)||void 0===L?void 0:L.map((function(e){return{coverage:{name:(null==e?void 0:e.name)||null,code:"N/A",calculatorType:{name:"N/A",code:"N/A"},type:{name:"N/A",code:"N/A"}},values:[{type:{name:"N/A",code:"N/A"},maxValue:"N/A",minValue:"N/A"}],mortalityTable:{name:"N/A",code:"N/A"},ageType:{name:"N/A",code:"N/A"}}})))||[]},expenseData:{values:[]},wordingData:{wordings:[]},termData:{values:[]},documentationData:{files:[],comments:"N/A"},endorsementData:{number:(null==t?void 0:t.endorsementNumber)||0,validityFrom:"N/A",validityTo:"N/A",type:{name:"N/A",code:"N/A"}},insurableData:{minimumQuantityInsured:0,estimatedDeadline:(null==t||null===(b=t.insured)||void 0===b?void 0:b.entranceDate)||null,minimumAge:0,maximumAge:0,maximumQuantityInsuredByEvent:0,maximumAmountToIndemnify:"N/A",insurables:null!=t&&t.insured?[{type:{name:(null==t||null===(G=t.insured)||void 0===G||null===(G=G.type)||void 0===G?void 0:G.name)||null,code:(null==t||null===(w=t.insured)||void 0===w||null===(w=w.type)||void 0===w?void 0:w.code)||null},wording:"N/A",minimumEntryAge:0,maximumEntryAge:0,endingAgePrincipalCoverage:0,endingAgeAditionalCoverage:0}]:null}},e.abrupt("return",Y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function U(){U=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==x(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(x(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function j(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function q(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){j(i,n,o,a,u,"next",e)}function u(e){j(i,n,o,a,u,"throw",e)}a(void 0)}))}}var k=function(){var e=q(U().mark((function e(t){var r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={quotations:t.quotations.map((function(e){var t,r;return{code:e.quotationNumber||null,creationDate:"N/A",email:"N/A",expirationDate:"N/A",number:e.activityCode||null,paymentFrequency:{name:"N/A",code:"N/A"},product:{code:(null===(t=e.productCode)||void 0===t?void 0:t.toString())||null,name:"N/A",subsection:{code:"N/A",name:"N/A",section:{code:(null===(r=e.sectionCode)||void 0===r?void 0:r.toString())||null,name:"N/A"}},version:0},status:{code:"N/A",name:"N/A"}}})),total:t.quotations.length},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=q(U().mark((function e(t){var r,n,o,i;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={code:(null===(r=t.quotationNumber)||void 0===r?void 0:r.toString())||null,number:t.activityCode||0,creationDate:t.vigencyDateFrom||null,expirationDate:t.vigencyDateTo||null,validity:{code:"N/A",name:"N/A",months:"N/A"},status:{code:"N/A",name:"N/A"},paymentFrequency:{name:"N/A",code:"N/A",months:0},email:"N/A",phone:"N/A",intermediary:{code:"N/A",name:"N/A",roles:{}},commercialStructure:{data:{name:"N/A",code:"N/A",version:0,description:"N/A",status:{name:"N/A",code:"N/A"}},intermediaries:{values:[{code:"N/A",name:"N/A",licence:"N/A",role:{name:"N/A",code:"N/A"},status:{name:"N/A",code:"N/A"},group:{name:"N/A",code:"N/A"}}]}},product:{name:"N/A",code:(null==t||null===(n=t.productCode)||void 0===n?void 0:n.toString())||null,version:0,subsection:{name:"N/A",code:"N/A",section:{name:"N/A",code:(null==t||null===(o=t.sectionCode)||void 0===o?void 0:o.toString())||null,type:{name:"N/A",code:"N/A"},category:{name:"N/A",code:"N/A"}}},status:{code:"N/A",name:"N/A"},currency:{name:"N/A",code:"N/A",mnemonic:"N/A",symbol:"N/A"}},productSegment:{coverages:[],expenses:[],name:"N/A",code:"N/A",version:0,description:"N/A"},values:{risks:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:{name:"N/A",code:"N/A"},value:0}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{},adherents:[{code:"N/A",coverages:[{code:"N/A",name:"N/A",deductible:{name:"N/A",code:"N/A",value:0,appliedValue:0},economicValues:[{type:"N/A",code:"N/A"}],coverageValues:[{type:{name:"N/A",code:"N/A"},value:0}]}],data:{}}]}],expenses:[{type:{name:"N/A",code:"N/A"},value:0}],groupedEconomicValues:[{type:{name:"N/A",code:"N/A"},value:0}],commercialAgreement:{}}},e.abrupt("return",i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),B=function(e){return e?{sectionCode:17,paymentTypeCode:mapPaymentFrequency(e.paymentFrequencyCode),productCode:mapProductCode(e.productCode),provinceCode:1}:null},H=function(e){var t,r;return e?{sectionCode:17,paymentTypeCode:mapPaymentFrequency(e.paymentFrequencyCode),productCode:mapProductCode(e.productCode),provinceCode:1,birthdate:null===(t=e.risks[0])||void 0===t?void 0:t.birthDate,insuredAmount:(null===(r=e.risks[0])||void 0===r||null===(r=r.coverages[0])||void 0===r||null===(r=r.values.find((function(e){return"INSURED_AMOUNT"===e.code})))||void 0===r?void 0:r.value)||0}:null},V=function(){var e=q(U().mark((function e(t){var r;return U().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={values:t.activities.map((function(e){return{code:e.code,name:e.name}}))},e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W="GET",Z="POST",K={GET_ACTIVITY:{default:{url:"party/v1/sectors",method:W,source:"https://apidoc.sysone.com/party/v1/open-api.html#/paths/~1v1~1sectors/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/activity",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-activity",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return V(e)}}},GET_CLAIMS:{default:{url:"claim/v1/claims",method:W,source:"https://apidoc.sysone.com/claim/v1/open-api.html",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"claim/v1/claim",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=claim-api&operation=get-v1-claim-pagenumber-pagenumber-pagesize-pagesize",requestMapper:null,responseMapper:function(e){return O(e)}}},GET_ENDORSEMENTS:{default:{url:"policy/v1/policies/{0}/endorsements",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1endorsements/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/endorsements",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-endorsements",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return G(e)}}},GET_INSUREDS:{default:{url:"policy-life/v1/policies/{0}/insureds",method:W,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy/{0}/{1}/policy-insured",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-policy-number-section-code-insureds",requestMapper:function(e){return{mappedParams:(t=e,{code:t.number||void 0,name:t.firstName||void 0})};var t},responseMapper:function(e){return b(e)}}},GET_POLICIES:{default:{url:"policy/v1/policies",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-pagenumber-pagenumber-sort-sort-ordertype-ordertype-pagesize-p",requestMapper:function(e){return{mappedParams:(t=e,{sort:"TomadorCodigo",orderType:"desc",pageNumber:t.page||1,pageSize:t.pageSize||10,allPolicies:null})};var t},responseMapper:function(e){return w(e)}}},GET_POLICY_HOME_COLLECTIVE_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_HOME_INDIVIDUAL_DETAIL:{default:{url:"policy-home/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_POLICY_LIFE_COLLECTIVE_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return M(e)}}},GET_POLICY_LIFE_INDIVIDUAL_DETAIL:{default:{url:"policy-life/v1/policies/{0}/details",method:W,source:"https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"policy/v1/policy-individual/{0}/{1}/detail",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=get-v1-policy-individual-policy-number-section-code-detail",requestMapper:function(e){return{mappedParams:{}}},responseMapper:function(e){return Y(e)}}},GET_QUOTATION_BY_CODE:{default:{url:"quotation/v1/quotations/{0}",method:W,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations~1%7Bcode%7D/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan/{0}",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-standard-plan-number",requestMapper:function(e){return{mappedParams:getQuotationByCode_Request(e)}},responseMapper:function(e){return F(e)}}},GET_QUOTATIONS:{default:{url:"quotation/v1/quotations",method:W,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/get",requestMapper:function(e){return{mappedParams:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:W,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=get-v1-quotation-variable-plan",requestMapper:function(e){return{mappedParams:getQuotations_Request(e)}},responseMapper:function(e){return k(e)}}},GET_PAYMENT_METHODS:{},POST_INSURED_UPDATE:{default:{url:"policy-life/v1/policies/{0}/insureds",method:Z,requestMapper:null,source:"https://apidoc.sysone.com/policy-life/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1insureds/post",responseMapper:function(e){return e}},cnp:{url:"v1/policy-collective/{0}/{1}/insureds",method:Z,requestMapper:null,source:"https://developers-test.cnp.com.ar/api-details#api=policy-api&operation=post-v1-policy-collective-policy-number-section-code-insureds",responseMapper:function(e){return{salary:"string"==typeof(t=e).salary?t.salary:String(t.salary),identification:"string"==typeof t.identification?t.identification:String(t.identification)};var t}}},POST_CREATE_QUOTATION_STANDARD_PLAN:{default:{url:"quotation/v1/quotations",method:Z,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/standard-plan",method:Z,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-standard-plan",requestMapper:function(e){return{mappedBody:B(e)}},responseMapper:function(e){return e}}},POST_CREATE_QUOTATION_VARIABLE_PLAN:{default:{url:"quotation/v1/quotations",method:Z,source:"https://apidoc.sysone.com/quotation/v1/open-api.html#/paths/~1v1~1quotations/post",requestMapper:function(e){return{mappedBody:e}},responseMapper:function(e){return e}},cnp:{url:"quotation/v1/quotation/variable-plan",method:Z,source:"https://developers-test.cnp.com.ar/api-details#api=quotation-api&operation=post-v1-quotation-variable-plan",requestMapper:function(e){return{mappedBody:H(e)}},responseMapper:function(e){return e}}},CREATE_INSURED:{}};function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function Q(){Q=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),u=new D(n||[]);return o(a,"_invoke",{value:g(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",m="suspendedYield",E="executing",v="completed",h={};function f(){}function y(){}function T(){}var _={};c(_,a,(function(){return this}));var A=Object.getPrototypeOf,N=A&&A(A(L([])));N&&N!==r&&n.call(N,a)&&(_=N);var S=T.prototype=f.prototype=Object.create(_);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,s=c.value;return s&&"object"==X(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function g(t,r,n){var o=p;return function(i,a){if(o===E)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var l=R(u,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var c=d(t,r,n);if("normal"===c.type){if(o=n.done?v:m,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=v,n.method="throw",n.arg=c.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(X(t)+" is not iterable")}return y.prototype=T,o(S,"constructor",{value:T,configurable:!0}),o(T,"constructor",{value:y,configurable:!0}),y.displayName=c(T,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,T):(e.__proto__=T,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},I(O.prototype),c(O.prototype,u,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},I(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=L,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $(e,t,r,n,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void r(e)}u.done?t(l):Promise.resolve(l).then(n,o)}function ee(e,t,r){return(t=function(e){var t=function(e){if("object"!=X(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te={default:{baseURL:"https://app-dev.sysone.com/",headers:ee(ee(ee({},"X-Tenant","sysone"),"X-User","sysone"),"X-Api-Key","PYRxE7iBUFCFcDmTwIFGEkvSMzJ88hSU4uWG0DL0ebk1CYVamsa6phIlsECQQMqkM0XXtZ5K1L85cyr3MgkIhtjlIh4niBsagiVRjzIaqNKxSU2N8Y7KaZLItDB2oDTc")},cnp:{baseURL:"http://api-test.cnp.com.ar/",headers:ee(ee(ee(ee({},"X-Chanel","cnp"),"X-Agent","299"),"X-Client","cnp"),"Ocp-Apim-Subscription-Key","5e0a100bd5804b058fc119729177cefd")}},re=function(){var e,t=(e=Q().mark((function e(t,r,o){var i,a,u,l,c,s,d,p,m,E,v,h,f=arguments;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=f.length>3&&void 0!==f[3]?f[3]:null,e.prev=1,u=K[t]){e.next=5;break}throw new Error("Endpoint no configurado: ".concat(t));case 5:l=null!==(a=u[r])&&void 0!==a?a:u.default,c="sysone"===r||"cnp"===r?te[r]:J(J({},te.default),{},{headers:J(J({},te.default.headers),{},ee(ee({},"X-Tenant",r),"X-User",r))}),c=J(J({},c),{},{validateStatus:function(e){return e<500}}),s=ne(l.url,o),e.t0=l.method,e.next=e.t0===W?12:e.t0===Z?18:"PUT"===e.t0?24:"DELETE"===e.t0?28:32;break;case 12:return p=l.requestMapper(i),m=p.mappedParams,e.next=16,n.get(s,J(J({},c),{},{params:m}));case 16:case 22:case 26:case 30:return d=e.sent,e.abrupt("return",l.responseMapper(d.data));case 18:return p=l.requestMapper(i),v=(E=p).mappedPostParams,h=E.mappedBody,e.next=22,n.post(s,h,J(J({},c),{},{params:v}));case 24:return e.next=26,n.put(s,i);case 28:return e.next=30,n.delete(s,i);case 32:throw d=null,new Error("Request error: Method not allowed. Only use GET, POST, PUT, DELETE");case 34:e.next=39;break;case 36:throw e.prev=36,e.t1=e.catch(1),e.t1;case 39:case"end":return e.stop()}}),e,null,[[1,36]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){$(i,n,o,a,u,"next",e)}function u(e){$(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e,r,n){return t.apply(this,arguments)}}(),ne=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e};module.exports=t})();
|
package/package.json
CHANGED
package/src/mapper/Mapper.js
CHANGED
|
@@ -1,86 +1,106 @@
|
|
|
1
1
|
import axiosInstance from "../../axiosInstance";
|
|
2
2
|
import { methods, tenantsConfig } from "./endpointsConfig";
|
|
3
3
|
|
|
4
|
-
// Momentaneo para probar CNP -
|
|
4
|
+
// Momentaneo para probar CNP -
|
|
5
5
|
const configs = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
default: {
|
|
7
|
+
baseURL: "https://app-dev.sysone.com/",
|
|
8
|
+
headers: {
|
|
9
|
+
["X-Tenant"]: "sysone",
|
|
10
|
+
["X-User"]: "sysone",
|
|
11
|
+
["X-Api-Key"]:
|
|
12
|
+
"PYRxE7iBUFCFcDmTwIFGEkvSMzJ88hSU4uWG0DL0ebk1CYVamsa6phIlsECQQMqkM0XXtZ5K1L85cyr3MgkIhtjlIh4niBsagiVRjzIaqNKxSU2N8Y7KaZLItDB2oDTc",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
cnp: {
|
|
16
|
+
baseURL: "http://api-test.cnp.com.ar/",
|
|
17
|
+
headers: {
|
|
18
|
+
["X-Chanel"]: "cnp",
|
|
19
|
+
["X-Agent"]: "299",
|
|
20
|
+
["X-Client"]: "cnp",
|
|
21
|
+
["Ocp-Apim-Subscription-Key"]: "5e0a100bd5804b058fc119729177cefd",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
export const apiMapper = async (
|
|
27
|
+
endpointCode,
|
|
28
|
+
tenant,
|
|
29
|
+
routeParams,
|
|
30
|
+
params = null
|
|
31
|
+
) => {
|
|
32
|
+
try {
|
|
33
|
+
const configData = tenantsConfig[endpointCode];
|
|
34
|
+
if (!configData)
|
|
35
|
+
throw new Error(`Endpoint no configurado: ${endpointCode}`);
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const configData = tenantsConfig[endpointCode];
|
|
30
|
-
if (!configData) throw new Error(`Endpoint no configurado: ${endpointCode}`);
|
|
37
|
+
const endpointData = configData[tenant] ?? configData.default;
|
|
38
|
+
let config;
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
if (tenant === "sysone" || tenant === "cnp") {
|
|
41
|
+
config = configs[tenant];
|
|
42
|
+
} else {
|
|
43
|
+
// Para cualquier otro tenant, usar config default pero sobreescribir X-Tenant y X-User
|
|
44
|
+
config = {
|
|
45
|
+
...configs.default,
|
|
46
|
+
headers: {
|
|
47
|
+
...configs.default.headers,
|
|
48
|
+
["X-Tenant"]: tenant,
|
|
49
|
+
["X-User"]: tenant,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
37
53
|
|
|
38
|
-
|
|
54
|
+
config = {
|
|
55
|
+
...config,
|
|
56
|
+
validateStatus: (status) => status < 500,
|
|
57
|
+
};
|
|
39
58
|
|
|
40
|
-
|
|
41
|
-
let request;
|
|
59
|
+
const url = getUrl(endpointData.url, routeParams);
|
|
42
60
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
let response;
|
|
62
|
+
let request;
|
|
63
|
+
|
|
64
|
+
switch (endpointData.method) {
|
|
65
|
+
case methods.GET:
|
|
66
|
+
request = endpointData.requestMapper(params);
|
|
67
|
+
let { mappedParams } = request;
|
|
68
|
+
response = await axiosInstance.get(url, {
|
|
69
|
+
...config,
|
|
70
|
+
params: mappedParams,
|
|
71
|
+
});
|
|
72
|
+
return endpointData.responseMapper(response.data);
|
|
73
|
+
case methods.POST:
|
|
74
|
+
request = endpointData.requestMapper(params);
|
|
75
|
+
const { mappedPostParams, mappedBody } = request;
|
|
76
|
+
response = await axiosInstance.post(url, mappedBody, {
|
|
77
|
+
...config,
|
|
78
|
+
params: mappedPostParams,
|
|
79
|
+
});
|
|
80
|
+
return endpointData.responseMapper(response.data);
|
|
81
|
+
case methods.PUT:
|
|
82
|
+
// aca podria ejecutarse requestMapper
|
|
83
|
+
response = await axiosInstance.put(url, params);
|
|
84
|
+
return endpointData.responseMapper(response.data);
|
|
85
|
+
case methods.DELETE:
|
|
86
|
+
response = await axiosInstance.delete(url, params);
|
|
87
|
+
return endpointData.responseMapper(response.data);
|
|
88
|
+
default:
|
|
89
|
+
response = null;
|
|
90
|
+
throw new Error(
|
|
91
|
+
"Request error: Method not allowed. Only use GET, POST, PUT, DELETE"
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
} catch (e) {
|
|
95
|
+
throw e;
|
|
96
|
+
}
|
|
77
97
|
};
|
|
78
98
|
|
|
79
99
|
const getUrl = (serviceUrl, routeParams) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
100
|
+
if (!routeParams) return serviceUrl;
|
|
101
|
+
return serviceUrl.replace(/{(\d+)}/g, function (match, routeParamNumber) {
|
|
102
|
+
return routeParams[routeParamNumber]
|
|
103
|
+
? routeParams[routeParamNumber]
|
|
104
|
+
: match;
|
|
105
|
+
});
|
|
106
|
+
};
|
package/api-mapper/README.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# api-mapper
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Getting started
|
|
6
|
-
|
|
7
|
-
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
8
|
-
|
|
9
|
-
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
10
|
-
|
|
11
|
-
## Add your files
|
|
12
|
-
|
|
13
|
-
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
14
|
-
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
cd existing_repo
|
|
18
|
-
git remote add origin https://gitlab.sysone.com/sysone-cloud-ready/sales-platform/api-mapper.git
|
|
19
|
-
git branch -M main
|
|
20
|
-
git push -uf origin main
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Integrate with your tools
|
|
24
|
-
|
|
25
|
-
- [ ] [Set up project integrations](https://gitlab.sysone.com/sysone-cloud-ready/sales-platform/api-mapper/-/settings/integrations)
|
|
26
|
-
|
|
27
|
-
## Collaborate with your team
|
|
28
|
-
|
|
29
|
-
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
|
30
|
-
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
31
|
-
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
32
|
-
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
33
|
-
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
|
34
|
-
|
|
35
|
-
## Test and Deploy
|
|
36
|
-
|
|
37
|
-
Use the built-in continuous integration in GitLab.
|
|
38
|
-
|
|
39
|
-
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
|
|
40
|
-
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
41
|
-
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
42
|
-
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
43
|
-
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
44
|
-
|
|
45
|
-
***
|
|
46
|
-
|
|
47
|
-
# Editing this README
|
|
48
|
-
|
|
49
|
-
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
50
|
-
|
|
51
|
-
## Suggestions for a good README
|
|
52
|
-
|
|
53
|
-
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
54
|
-
|
|
55
|
-
## Name
|
|
56
|
-
Choose a self-explaining name for your project.
|
|
57
|
-
|
|
58
|
-
## Description
|
|
59
|
-
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
60
|
-
|
|
61
|
-
## Badges
|
|
62
|
-
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
63
|
-
|
|
64
|
-
## Visuals
|
|
65
|
-
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
66
|
-
|
|
67
|
-
## Installation
|
|
68
|
-
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
72
|
-
|
|
73
|
-
## Support
|
|
74
|
-
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
75
|
-
|
|
76
|
-
## Roadmap
|
|
77
|
-
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
78
|
-
|
|
79
|
-
## Contributing
|
|
80
|
-
State if you are open to contributions and what your requirements are for accepting them.
|
|
81
|
-
|
|
82
|
-
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
83
|
-
|
|
84
|
-
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
85
|
-
|
|
86
|
-
## Authors and acknowledgment
|
|
87
|
-
Show your appreciation to those who have contributed to the project.
|
|
88
|
-
|
|
89
|
-
## License
|
|
90
|
-
For open source projects, say how it is licensed.
|
|
91
|
-
|
|
92
|
-
## Project status
|
|
93
|
-
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|