sysone-api-mapper 1.0.1 → 1.0.3

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.
@@ -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 i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},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:()=>O,axiosInstance:()=>i,endpoints:()=>d});const r=require("axios"),i=e.n(r)().create({});var o;function E(e){return E="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},E(e)}function n(e,t,r){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T="PARTY_MODULE",_="INTERMEDIARY_MODULE",s="COMMERCIAL_STRUCTURE_MODULE",a="POLICY_MODULE",l="GET",c="POST",u="PUT",d=(n(n(n(n(n(n(n(n(n(n(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"),n(n(n(n(n(n(n(n(n(n(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"),n(n(n(n(n(n(n(n(n(n(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"),n(n(n(n(n(n(n(n(n(n(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"),n(n(n(n(n(n(n(n(n(n(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")),m=[{endpoint:d.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:l,module:T},{endpoint:d.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:c,module:T},{endpoint:d.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:l,module:T},{endpoint:d.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:l,module:T},{endpoint:d.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:l,module:T},{endpoint:d.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:l,module:T},{endpoint:d.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:l,module:T},{endpoint:d.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:l,module:T},{endpoint:d.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:l,module:T},{endpoint:d.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:l,module:T},{endpoint:d.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:l,module:T},{endpoint:d.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:l,module:T},{endpoint:d.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:u,module:T},{endpoint:d.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:u,module:T},{endpoint:d.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:u,module:T},{endpoint:d.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:l,module:T},{endpoint:d.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:u,module:T},{endpoint:d.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:l,module:T},{endpoint:d.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:l,module:T},{endpoint:d.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:l,module:T},{endpoint:d.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:c,module:T},{endpoint:d.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:u,module:T},{endpoint:d.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:l,module:T},{endpoint:d.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:u,module:T},{endpoint:d.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:u,module:T},{endpoint:d.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:l,module:T},{endpoint:d.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:l,module:T},{endpoint:d.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:l,module:T},{endpoint:d.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:l,module:T},{endpoint:d.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:l,module:T},{endpoint:d.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:l,module:T},{endpoint:d.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:l,module:T},{endpoint:d.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:u,module:T},{endpoint:d.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:l,module:T},{endpoint:d.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:l,module:T},{endpoint:d.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:l,module:T},{endpoint:d.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:l,module:T},{endpoint:d.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:l,module:T},{endpoint:d.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:l,module:T},{endpoint:d.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:l,module:T},{endpoint:d.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:l,module:T},{endpoint:d.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:l,module:T},{endpoint:d.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:l,module:T},{endpoint:d.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:l,module:T},{endpoint:d.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:u,module:T},{endpoint:d.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:l,module:T},{endpoint:d.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:l,module:T},{endpoint:d.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:l,module:T},{endpoint:d.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:l,module:T},{endpoint:d.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:l,module:_},{endpoint:d.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:l,module:_},{endpoint:d.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:l,module:_},{endpoint:d.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:l,module:_},{endpoint:d.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:c,module:_},{endpoint:d.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:c,module:_},{endpoint:d.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:c,module:_},{endpoint:d.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:u,module:_},{endpoint:d.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:l,module:s},{endpoint:d.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:c,module:s},{endpoint:d.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:l,module:s},{endpoint:d.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:l,module:s},{endpoint:d.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:u,module:s},{endpoint:d.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:u,module:s},{endpoint:d.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:l,module:a},{endpoint:d.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:l,module:a},{endpoint:d.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:l,module:a},{endpoint:d.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:l,module:a},{endpoint:d.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:l,module:a},{endpoint:d.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:l,module:a},{endpoint:d.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:l,module:a},{endpoint:d.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:l,module:a},{endpoint:d.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:l,module:a},{endpoint:d.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:l,module:a},{endpoint:d.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:l,module:a},{endpoint:d.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:l,module:a},{endpoint:d.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:l,module:a},{endpoint:d.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:l,module:a},{endpoint:d.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:l,module:a},{endpoint:d.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:l,module:a},{endpoint:d.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:c,module:a},{endpoint:d.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:u,module:a},{endpoint:d.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:l,module:a},{endpoint:d.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:l,module:a},{endpoint:d.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:l,module:a},{endpoint:d.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:l,module:a},{endpoint:d.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:l,module:a},{endpoint:d.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:l,module:a},{endpoint:d.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:l,module:a},{endpoint:d.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:l,module:a},{endpoint:d.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:l,module:a},{endpoint:d.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:l,module:a},{endpoint:d.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:u,module:a},{endpoint:d.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:l,module:a},{endpoint:d.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:u,module:a},{endpoint:d.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:l,module:a},{endpoint:d.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:u,module:a},{endpoint:d.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:c,module:a},{endpoint:d.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:u,module:a},{endpoint:d.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:u,module:a},{endpoint:d.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:u,module:a},{endpoint:d.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:l,module:a},{endpoint:d.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:l,module:a},{endpoint:d.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:l,module:a},{endpoint:d.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:l,module:a},{endpoint:d.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:l,module:a},{endpoint:d.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:l,module:_},{endpoint:d.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:c,module:"CONFIGURATOR_MODULE"}];const p=require("react");var A=e.n(p);const S=require("antd");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 R(){R=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},E="function"==typeof Symbol?Symbol:{},n=E.iterator||"@@iterator",T=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function a(e,t,r,i){var E=t&&t.prototype instanceof A?t:A,n=Object.create(E.prototype),T=new Y(i||[]);return o(n,"_invoke",{value:G(e,r,T)}),n}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=a;var c="suspendedStart",u="suspendedYield",d="executing",m="completed",p={};function A(){}function S(){}function v(){}var C={};s(C,n,(function(){return this}));var N=Object.getPrototypeOf,O=N&&N(N(U([])));O&&O!==r&&i.call(O,n)&&(C=O);var P=v.prototype=A.prototype=Object.create(C);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function h(e,t){function r(o,E,n,T){var _=l(e[o],e,E);if("throw"!==_.type){var s=_.arg,a=s.value;return a&&"object"==I(a)&&i.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,n,T)}),(function(e){r("throw",e,n,T)})):t.resolve(a).then((function(e){s.value=e,n(s)}),(function(e){return r("throw",e,n,T)}))}T(_.arg)}var E;o(this,"_invoke",{value:function(e,i){function o(){return new t((function(t,o){r(e,i,t,o)}))}return E=E?E.then(o,o):o()}})}function G(t,r,i){var o=c;return function(E,n){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===E)throw n;return{value:e,done:!0}}for(i.method=E,i.arg=n;;){var T=i.delegate;if(T){var _=f(T,i);if(_){if(_===p)continue;return _}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===c)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=d;var s=l(t,r,i);if("normal"===s.type){if(o=i.done?m:u,s.arg===p)continue;return{value:s.arg,done:i.done}}"throw"===s.type&&(o=m,i.method="throw",i.arg=s.arg)}}}function f(t,r){var i=r.method,o=t.iterator[i];if(o===e)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=e,f(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),p;var E=l(o,t.iterator,r.arg);if("throw"===E.type)return r.method="throw",r.arg=E.arg,r.delegate=null,p;var n=E.arg;return n?n.done?(r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}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 Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function U(t){if(t||""===t){var r=t[n];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,E=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return E.next=E}}throw new TypeError(I(t)+" is not iterable")}return S.prototype=v,o(P,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:S,configurable:!0}),S.displayName=s(v,_,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},t.awrap=function(e){return{__await:e}},y(h.prototype),s(h.prototype,T,(function(){return this})),t.AsyncIterator=h,t.async=function(e,r,i,o,E){void 0===E&&(E=Promise);var n=new h(a(e,r,i,o),E);return t.isGeneratorFunction(r)?n:n.next().then((function(e){return e.done?e.value:n.next()}))},y(P),s(P,_,"Generator"),s(P,n,(function(){return this})),s(P,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var i in t)r.push(i);return r.reverse(),function e(){for(;r.length;){var i=r.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},t.values=U,Y.prototype={constructor:Y,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)&&i.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(i,o){return T.type="throw",T.arg=t,r.next=i,o&&(r.method="next",r.arg=e),!!o}for(var E=this.tryEntries.length-1;E>=0;--E){var n=this.tryEntries[E],T=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var _=i.call(n,"catchLoc"),s=i.call(n,"finallyLoc");if(_&&s){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(_){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.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&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var E=o;break}}E&&("break"===e||"continue"===e)&&E.tryLoc<=t&&t<=E.finallyLoc&&(E=null);var n=E?E.completion:{};return n.type=e,n.arg=t,E?(this.method="next",this.next=E.finallyLoc,p):this.complete(n)},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),p},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),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var i=r.completion;if("throw"===i.type){var o=i.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:U(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),p}},t}function v(e,t,r,i,o,E,n){try{var T=e[E](n),_=T.value}catch(e){return void r(e)}T.done?t(_):Promise.resolve(_).then(i,o)}var C=function(e,t){try{var i={title:"",errors:[]};if(t instanceof r.AxiosError){var o,E,n=t.response,T=n.status,_=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===T}));i.title=(null==_?void 0:_.content)||n.data.message;var s=null===(E=n.data.errorMessages)||void 0===E?void 0:E.map((function(e){var t,r=null==_||null===(t=_.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)}));i.errors=s||[]}else i.title=t.message;a=i.title,l=i.errors,S.notification.error({message:"",style:{minHeight:a||l&&l.length>0?"0":"70px"},description:A().createElement(A().Fragment,null,a?A().createElement(A().Fragment,null,A().createElement("div",{style:{fontSize:"13px"}},a),A().createElement("br",null)):null,null==l?void 0:l.map((function(e,t){return A().createElement(A().Fragment,{key:"sub_error_".concat(t)},A().createElement("div",{style:{fontSize:"16px"}},"- ",e),A().createElement("br",null))})))})}catch(t){throw console.error(t),t}var a,l},N=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},O=function(){var e,t=(e=R().mark((function e(t,r){var o,E,n,T,_=arguments;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=_.length>2&&void 0!==_[2]?_[2]:null,E=m.find((function(e){return e.endpoint===t})),e.prev=2,E){e.next=5;break}throw new Error("Service does not exists");case 5:n=N(E.url,r),e.t0=E.method,e.next=e.t0===l?9:e.t0===c?13:e.t0===u?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,i.get(n,{params:o});case 11:case 15:case 19:case 23:return T=e.sent,e.abrupt("return",T.data);case 13:return e.next=15,i.post(n,o);case 17:return e.next=19,i.put(n,o);case 21:return e.next=23,i.delete(n,o);case 25:throw T=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),C(E,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(i,o){var E=e.apply(t,r);function n(e){v(E,i,o,n,T,"next",e)}function T(e){v(E,i,o,n,T,"throw",e)}n(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();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 o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},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:()=>v,axiosInstance:()=>o,endpoints:()=>d});const r=require("axios"),o=e.n(r)().create({});var i;function E(e){return E="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},E(e)}function n(e,t,r){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T="PARTY_MODULE",_="INTERMEDIARY_MODULE",s="COMMERCIAL_STRUCTURE_MODULE",a="POLICY_MODULE",l="GET",c="POST",u="PUT",d=(n(n(n(n(n(n(n(n(n(n(i={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"),n(n(n(n(n(n(n(n(n(n(i,"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"),n(n(n(n(n(n(n(n(n(n(i,"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"),n(n(n(n(n(n(n(n(n(n(i,"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"),n(n(n(n(n(n(n(n(n(n(i,"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")),m=[{endpoint:d.SEARCH_INDIVIDUALS,serviceName:"individuals",url:"party/v1/individuals",method:l,module:T},{endpoint:d.CREATE_INDIVIDUAL,serviceName:"individuals",url:"party/v1/individuals",method:c,module:T},{endpoint:d.GET_ACTIVITIES,serviceName:"activities",url:"party/v1/activities/{0}",method:l,module:T},{endpoint:d.GET_PRACTICES,serviceName:"practices",url:"party/v1/practices/{0}",method:l,module:T},{endpoint:d.GET_SECTORS,serviceName:"sectors",url:"party/v1/sectors",method:l,module:T},{endpoint:d.GET_FISCAL_CATEGORIES,serviceName:"fiscal-categories",url:"party/v1/fiscal-categories?party-type-code={0}&country-code={1}",method:l,module:T},{endpoint:d.GET_MAIL_TYPES,serviceName:"mail-types",url:"party/v1/mail-types",method:l,module:T},{endpoint:d.GET_PHONE_TYPES,serviceName:"phone-types",url:"party/v1/phone-types",method:l,module:T},{endpoint:d.GET_IDENTIFICATION_TYPES,serviceName:"identification-types",url:"party/v1/identification-types?party-type-code={0}&country-code={1}",method:l,module:T},{endpoint:d.GET_RELATIONS,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:l,module:T},{endpoint:d.GET_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:l,module:T},{endpoint:d.GET_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:l,module:T},{endpoint:d.UPDATE_NOTES,serviceName:"parties/notes",url:"party/v1/parties/{0}/notes",method:u,module:T},{endpoint:d.UPDATE_FILES,serviceName:"parties/files",url:"party/v1/parties/{0}/files",method:u,module:T},{endpoint:d.ADD_RELATION_WITH_EXISTING_PARTY,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:u,module:T},{endpoint:d.GET_RELATIONS_BY_PARTY_CODE,serviceName:"parties/relations",url:"party/v1/parties/{0}/relations",method:l,module:T},{endpoint:d.REMOVE_RELATION,serviceName:"parties/relations/disable",url:"party/v1/parties/{0}/relations/disable",method:u,module:T},{endpoint:d.GET_FILE,serviceName:"parties/file",url:"party/v1/parties/{0}/file/{1}",method:l,module:T},{endpoint:d.SEARCH_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:l,module:T},{endpoint:d.GET_ORGANIZATION_TYPES,serviceName:"organisation-types",url:"party/v1/organisation-types",method:l,module:T},{endpoint:d.CREATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations",method:c,module:T},{endpoint:d.UPDATE_ORGANIZATION,serviceName:"organisations",url:"party/v1/organisations/{0}",method:u,module:T},{endpoint:d.GET_ORGANIZATION_BY_CODE,serviceName:"organisations",url:"party/v1/organisations/{0}",method:l,module:T},{endpoint:d.ADD_RELATION_WITH_NEW_ORGANIZATION,serviceName:"organisations/relations",url:"party/v1/organisations/{0}/relations",method:u,module:T},{endpoint:d.UPDATE_PERSON,serviceName:"individuals",url:"party/v1/individuals/{0}",method:u,module:T},{endpoint:d.SEARCH_PERSON,serviceName:"individuals",url:"party/v1/individuals",method:l,module:T},{endpoint:d.GET_PERSON_BY_CODE,serviceName:"individuals",url:"party/v1/individuals/{0}",method:l,module:T},{endpoint:d.GET_GENDERS,serviceName:"genders",url:"party/v1/genders",method:l,module:T},{endpoint:d.GET_MARITAL_STATUSES,serviceName:"marital-statuses",url:"party/v1/marital-statuses",method:l,module:T},{endpoint:d.GET_WORKER_TYPES,serviceName:"worker-types",url:"party/v1/worker-types",method:l,module:T},{endpoint:d.GET_ECONOMIC_CLASSES,serviceName:"economic-classes",url:"party/v1/economic-classes",method:l,module:T},{endpoint:d.GET_RELATION_TYPES,serviceName:"relation-types",url:"party/v1/relation-types/{0}",method:l,module:T},{endpoint:d.ADD_RELATION_WITH_NEW_PERSON,serviceName:"individuals/relations",url:"party/v1/individuals/{0}/relations",method:u,module:T},{endpoint:d.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:l,module:T},{endpoint:d.GET_COUNTRIES,serviceName:"countries",url:"location/v1/countries",method:l,module:T},{endpoint:d.GET_COUNTRY_BY_CODE,serviceName:"countries",url:"location/v1/countries/{0}",method:l,module:T},{endpoint:d.GET_PROVINCES,serviceName:"countries/provinces",url:"location/v1/countries/{0}/provinces",method:l,module:T},{endpoint:d.GET_CITIES,serviceName:"provinces/cities",url:"location/v1/provinces/{0}/cities",method:l,module:T},{endpoint:d.GET_POSTAL_CODES,serviceName:"cities/postal-codes",url:"location/v1/cities/{0}/postal-codes",method:l,module:T},{endpoint:d.GET_ADDRESSES_BY_PARTY_CODE,serviceName:"party/addresses",url:"location/v1/party/{0}/addresses",method:l,module:T},{endpoint:d.GET_ADDRESS_TYPES,serviceName:"address-types",url:"location/v1/address-types",method:l,module:T},{endpoint:d.GET_PAYMENT_METHODS_BY_PARTY_CODE,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:l,module:T},{endpoint:d.GET_CREDIT_CARD_TYPES,serviceName:"credit-card-types",url:"finance/v1/credit-card-types",method:l,module:T},{endpoint:d.GET_CARD_PROVIDERS,serviceName:"card-providers",url:"finance/v1/card-providers",method:l,module:T},{endpoint:d.UPDATE_PAYMENTS,serviceName:"parties/payment-methods",url:"party/v1/parties/{0}/payment-methods",method:u,module:T},{endpoint:d.GET_BANKS,serviceName:"banks",url:"finance/v1/banks",method:l,module:T},{endpoint:d.GET_CURRENCIES,serviceName:"currencies",url:"finance/v1/currencies",method:l,module:T},{endpoint:d.GET_BANK_ACCOUNT_TYPES,serviceName:"bank-account-types",url:"finance/v1/bank-account-types",method:l,module:T},{endpoint:d.GET_BANK_BRANCHES,serviceName:"banks/branches",url:"finance/v1/banks/{0}/branches",method:l,module:T},{endpoint:d.SEARCH_INTERMEDIARIES,serviceName:"intermediary",url:"intermediary/v1/intermediary",method:l,module:_},{endpoint:d.GET_PERSON_INTERMEDIARY_BY_CODE,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual/{0}",method:l,module:_},{endpoint:d.GET_ORGANIZATION_INTERMEDIARY_BY_CODE,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation/{0}",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_GROUPS,serviceName:"intermediary-groups",url:"intermediary/v1/intermediary-groups",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_ROLES,serviceName:"intermediary-roles",url:"intermediary/v1/intermediary-roles",method:l,module:_},{endpoint:d.GET_INTERMEDIARY_STRUCTURES,serviceName:"intermediary-structures",url:"intermediary/v1/intermediary/{0}/commercial-structures",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_STATES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:l,module:_},{endpoint:d.GET_INTERMEDIARIES_TYPES,serviceName:"intermediary-types",url:"intermediary/v1/intermediary-types",method:l,module:_},{endpoint:d.CREATE_INTERMEDIARY_ASSOCIATED_WITH_PARTY,serviceName:"intermediary-party-association",url:"intermediary/v1/intermediary-party-association",method:c,module:_},{endpoint:d.CREATE_INTERMEDIARY_WITH_WITH_PERSON,serviceName:"intermediary-individual",url:"intermediary/v1/intermediary-individual",method:c,module:_},{endpoint:d.CREATE_INTERMEDIARY_WITH_WITH_ORGANIZATION,serviceName:"intermediary-organisation",url:"intermediary/v1/intermediary-organisation",method:c,module:_},{endpoint:d.UPDATE_INTERMEDIARY,serviceName:"intermediary",url:"intermediary/v1/intermediary/{0}",method:u,module:_},{endpoint:d.SEARCH_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:l,module:s},{endpoint:d.CREATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures",method:c,module:s},{endpoint:d.GET_COMMERCIAL_STRUCTURE_STATUSES,serviceName:"commercial-structure-statuses",url:"intermediary/v1/commercial-structure-statuses",method:l,module:s},{endpoint:d.GET_COMMERCIAL_STRUCTURES_BY_CODE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:l,module:s},{endpoint:d.UPDATE_COMMERCIAL_STRUCTURE,serviceName:"commercial-structures",url:"intermediary/v1/commercial-structures/{0}",method:u,module:s},{endpoint:d.UPDATE_COMMERCIAL_STRUCTURE_INTERMEDIARIES,serviceName:"commercial-structures/intermediaries",url:"intermediary/v1/commercial-structures/{0}/intermediaries",method:u,module:s},{endpoint:d.SEARCH_POLICIES,serviceName:"policies",url:"policy/v1/policies",method:l,module:a},{endpoint:d.GET_POLICY_SECTIONS,serviceName:"sections",url:"product/v1/sections",method:l,module:a},{endpoint:d.GET_POLICY_SUBSECTIONS,serviceName:"sections/subsections",url:"product/v1/sections/{0}/subsections",method:l,module:a},{endpoint:d.GET_POLICY_PROCESSES,serviceName:"policy-statuses",url:"policy/v1/policy-statuses",method:l,module:a},{endpoint:d.GET_POLICY_PRODUCTS,serviceName:"subsections/products",url:"product/v1/subsections/{0}/products",method:l,module:a},{endpoint:d.GET_VALIDITY_TYPES,serviceName:"policy-validities",url:"policy/v1/policy-validities",method:l,module:a},{endpoint:d.GET_POLICY_CARACTERS,serviceName:"wording-types",url:"product/v1/wording-types",method:l,module:a},{endpoint:d.SEARCH_POLICY_GENERAL_CONDITIONS,serviceName:"wordings",url:"/product/v1/products/{0}/wordings",method:l,module:a},{endpoint:d.GET_POLICY_TYPE_OF_DOCUMENTATION,serviceName:"file-types",url:"policy/v1/file-types",method:l,module:a},{endpoint:d.GET_PAYMENT_FREQUENCIES,serviceName:"payment-frequencies",url:"policy/v1/payment-frequencies",method:l,module:a},{endpoint:d.GET_ASSOCIATE_TERMS_CONDITION,serviceName:"terms",url:"policy/v1/policies/{0}/terms",method:l,module:a},{endpoint:d.GET_ASSOCIATE_EXPENSES,serviceName:"expenses",url:"policy/v1/policies/{0}/expenses",method:l,module:a},{endpoint:d.GET_ASSOCIATE_COVERAGE,serviceName:"coverages",url:"policy-life/v1/policies/{0}/coverages",method:l,module:a},{endpoint:d.GET_COVERAGES,serviceName:"coverages",url:"product/v1/products/{0}/coverages",method:l,module:a},{endpoint:d.GET_EXPENSEVALUES,serviceName:"expenses",url:"/product/v1/products/{0}/expenses",method:l,module:a},{endpoint:d.GET_MORTALITY_TABLE,serviceName:"mortality-tables",url:"policy-life/v1/mortality-tables",method:l,module:a},{endpoint:d.CREATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies",method:c,module:a},{endpoint:d.CREATE_POLICY_STEP2,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP3,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP4,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP5,serviceName:"policies/products",url:"policy-life/v1/policies/{0}/products",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP6,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP7,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP8,serviceName:"policies/expenses",url:"policy/v1/policies/{0}/expenses",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP9,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP10,serviceName:"policies/terms",url:"policy/v1/policies/{0}/terms",method:u,module:a},{endpoint:d.CREATE_POLICY_STEP11,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:u,module:a},{endpoint:d.GET_STEP1_DATA,serviceName:"policies",url:"policy/v1/policies/{0}",method:l,module:a},{endpoint:d.GET_STEP2_DATA,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:l,module:a},{endpoint:d.GET_STEP3_DATA,serviceName:"policies/collections",url:"policy/v1/policies/{0}/collections",method:l,module:a},{endpoint:d.GET_STEP4_DATA,serviceName:"policies/commercial-structures",url:"policy/v1/policies/{0}/commercial-structures",method:l,module:a},{endpoint:d.GET_STEP5_DATA,serviceName:"policies/products",url:"policy/v1/policies/{0}/products",method:l,module:a},{endpoint:d.GET_STEP6_DATA,serviceName:"policies/coverages",url:"policy-life/v1/policies/{0}/coverages",method:l,module:a},{endpoint:d.GET_STEP7_DATA,serviceName:"policies/insurables",url:"policy-life/v1/policies/{0}/insurables",method:l,module:a},{endpoint:d.GET_STEP9_DATA,serviceName:"policies/wordings",url:"policy/v1/policies/{0}/wordings",method:l,module:a},{endpoint:d.GET_STEP11_DATA,serviceName:"policies/documentation",url:"policy/v1/policies/{0}/documentation",method:l,module:a},{endpoint:d.GET_STEP11_FILE,serviceName:"policies/file",url:"policy/v1/policies/{0}/file/{1}",method:l,module:a},{endpoint:d.UPDATE_POLICY_STEP1,serviceName:"policies",url:"policy/v1/policies/{0}",method:u,module:a},{endpoint:d.GET_ISURED_PERSONS,serviceName:"insurables",url:"policy-life/v1/products/{0}/insurables",method:l,module:a},{endpoint:d.UPDATE_PARTY,serviceName:"parties",url:"policy/v1/parties/{0}",method:u,module:a},{endpoint:d.GET_POLICY_DETAILS,serviceName:"policies/details",url:"policy-life/v1/policies/{0}/details",method:l,module:a},{endpoint:d.UPDATE_PAYMENTS,serviceName:"policies/collections",url:"policy/v1/policies/collections",method:u,module:a},{endpoint:d.CREATE_POLICY_RISK,serviceName:"policies",url:"policy-life/v1/policies/{0}/insureds",method:c,module:a},{endpoint:d.ACTIVATE_POLICY,serviceName:"policies/activate",url:"policy-life/v1/policies/{0}/activate",method:u,module:a},{endpoint:d.COMPLETE_POLICY,serviceName:"policies/complete",url:"/policy-life/v1/policies/{0}/complete",method:u,module:a},{endpoint:d.SET_POLICY_BUILDING,serviceName:"policies/build",url:"policy-life/v1/policies/{0}/build",method:u,module:a},{endpoint:d.GET_POLICY_ROLES,serviceName:"policies/roles",url:"policy/v1/policies/{0}/roles",method:l,module:a},{endpoint:d.GET_ASSURED_LIST,serviceName:"insureds",url:"policy-life/v1/policies/{0}/insureds",method:l,module:a},{endpoint:d.GET_ADHERENTS,serviceName:"adherents",url:"policy-life/v1/adherents/{0}",method:l,module:a},{endpoint:d.GET_OWNERS,serviceName:"owners",url:"policy-life/v1/owners/{0}",method:l,module:a},{endpoint:d.GET_ADHERENTS_BY_OWNER,serviceName:"owners/adherents",url:"policy-life/v1/owners/{0}/adherents",method:l,module:a},{endpoint:d.SEARCH_ACCOUNT_OFFICERS,serviceName:"account-officers",url:"intermediary/v1/account-officers",method:l,module:_},{endpoint:d.CREATE_PRODUCT,serviceName:"configurator-product-creation",url:"policy-life/v1/products",method:c,module:"CONFIGURATOR_MODULE"}];function p(e){return p="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},p(e)}function A(){A=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},E="function"==typeof Symbol?Symbol:{},n=E.iterator||"@@iterator",T=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function a(e,t,r,o){var E=t&&t.prototype instanceof I?t:I,n=Object.create(E.prototype),T=new Y(o||[]);return i(n,"_invoke",{value:G(e,r,T)}),n}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=a;var c="suspendedStart",u="suspendedYield",d="executing",m="completed",S={};function I(){}function R(){}function v(){}var C={};s(C,n,(function(){return this}));var N=Object.getPrototypeOf,O=N&&N(N(U([])));O&&O!==r&&o.call(O,n)&&(C=O);var P=v.prototype=I.prototype=Object.create(C);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function h(e,t){function r(i,E,n,T){var _=l(e[i],e,E);if("throw"!==_.type){var s=_.arg,a=s.value;return a&&"object"==p(a)&&o.call(a,"__await")?t.resolve(a.__await).then((function(e){r("next",e,n,T)}),(function(e){r("throw",e,n,T)})):t.resolve(a).then((function(e){s.value=e,n(s)}),(function(e){return r("throw",e,n,T)}))}T(_.arg)}var E;i(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,i){r(e,o,t,i)}))}return E=E?E.then(i,i):i()}})}function G(t,r,o){var i=c;return function(E,n){if(i===d)throw Error("Generator is already running");if(i===m){if("throw"===E)throw n;return{value:e,done:!0}}for(o.method=E,o.arg=n;;){var T=o.delegate;if(T){var _=f(T,o);if(_){if(_===S)continue;return _}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(i===c)throw i=m,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);i=d;var s=l(t,r,o);if("normal"===s.type){if(i=o.done?m:u,s.arg===S)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(i=m,o.method="throw",o.arg=s.arg)}}}function f(t,r){var o=r.method,i=t.iterator[o];if(i===e)return r.delegate=null,"throw"===o&&t.iterator.return&&(r.method="return",r.arg=e,f(t,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),S;var E=l(i,t.iterator,r.arg);if("throw"===E.type)return r.method="throw",r.arg=E.arg,r.delegate=null,S;var n=E.arg;return n?n.done?(r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,S):n:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,S)}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 Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function U(t){if(t||""===t){var r=t[n];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,E=function r(){for(;++i<t.length;)if(o.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return E.next=E}}throw new TypeError(p(t)+" is not iterable")}return R.prototype=v,i(P,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:R,configurable:!0}),R.displayName=s(v,_,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===R||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,_,"GeneratorFunction")),e.prototype=Object.create(P),e},t.awrap=function(e){return{__await:e}},y(h.prototype),s(h.prototype,T,(function(){return this})),t.AsyncIterator=h,t.async=function(e,r,o,i,E){void 0===E&&(E=Promise);var n=new h(a(e,r,o,i),E);return t.isGeneratorFunction(r)?n:n.next().then((function(e){return e.done?e.value:n.next()}))},y(P),s(P,_,"Generator"),s(P,n,(function(){return this})),s(P,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var o in t)r.push(o);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=U,Y.prototype={constructor:Y,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)&&o.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 i(o,i){return T.type="throw",T.arg=t,r.next=o,i&&(r.method="next",r.arg=e),!!i}for(var E=this.tryEntries.length-1;E>=0;--E){var n=this.tryEntries[E],T=n.completion;if("root"===n.tryLoc)return i("end");if(n.tryLoc<=this.prev){var _=o.call(n,"catchLoc"),s=o.call(n,"finallyLoc");if(_&&s){if(this.prev<n.catchLoc)return i(n.catchLoc,!0);if(this.prev<n.finallyLoc)return i(n.finallyLoc)}else if(_){if(this.prev<n.catchLoc)return i(n.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return i(n.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var E=i;break}}E&&("break"===e||"continue"===e)&&E.tryLoc<=t&&t<=E.finallyLoc&&(E=null);var n=E?E.completion:{};return n.type=e,n.arg=t,E?(this.method="next",this.next=E.finallyLoc,S):this.complete(n)},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),S},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),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var i=o.arg;L(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,o){return this.delegate={iterator:U(t),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=e),S}},t}function S(e,t,r,o,i,E,n){try{var T=e[E](n),_=T.value}catch(e){return void r(e)}T.done?t(_):Promise.resolve(_).then(o,i)}var I=function(e,t){try{var o={title:"",errors:[]};if(t instanceof r.AxiosError){var i,E,n=t.response,T=n.status,_=null===(i=JSON.parse(localStorage.getItem("modules_info")).find((function(t){return t.code===e.module})))||void 0===i||null===(i=i.services)||void 0===i||null===(i=i.find((function(t){return t.name.toUpperCase()===e.serviceName.toUpperCase()&&t.httpMethod.toUpperCase()===e.method.toUpperCase()})))||void 0===i?void 0:i.errors.find((function(e){return e.httpStatus===T}));o.title=(null==_?void 0:_.content)||n.data.message;var s=null===(E=n.data.errorMessages)||void 0===E?void 0:E.map((function(e){var t,r=null==_||null===(t=_.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)}));o.errors=s||[]}else o.title=t.message}catch(t){throw console.error(t),t}},R=function(e,t){return t?e.replace(/{(\d+)}/g,(function(e,r){return t[r]?t[r]:e})):e},v=function(){var e,t=(e=A().mark((function e(t,r){var i,E,n,T,_=arguments;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=_.length>2&&void 0!==_[2]?_[2]:null,E=m.find((function(e){return e.endpoint===t})),e.prev=2,E){e.next=5;break}throw new Error("Service does not exists");case 5:n=R(E.url,r),e.t0=E.method,e.next=e.t0===l?9:e.t0===c?13:e.t0===u?17:"DELETE"===e.t0?21:25;break;case 9:return e.next=11,o.get(n,{params:i});case 11:case 15:case 19:case 23:return T=e.sent,e.abrupt("return",T.data);case 13:return e.next=15,o.post(n,i);case 17:return e.next=19,o.put(n,i);case 21:return e.next=23,o.delete(n,i);case 25:throw T=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),I(E,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(o,i){var E=e.apply(t,r);function n(e){S(E,o,i,n,T,"next",e)}function T(e){S(E,o,i,n,T,"throw",e)}n(void 0)}))});return function(e,r){return t.apply(this,arguments)}}();module.exports=t})();
package/index.js CHANGED
@@ -2,4 +2,7 @@ import { apiCall } from "./services";
2
2
  import { endpoints } from "./servicesData";
3
3
  import axiosInstance from "./axiosInstance";
4
4
 
5
+
6
+
7
+
5
8
  export { apiCall, endpoints, axiosInstance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sysone-api-mapper",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -35,5 +35,9 @@
35
35
  "type": "git",
36
36
  "url": "git+https://gitlab.sysone.com/sysone-cloud-ready/sales-platform/api-mapper/-/tree/develop?ref_type=heads"
37
37
  },
38
+ "peerDependencies": {
39
+ "react": "^18.0.0",
40
+ "react-dom": "^18.0.0"
41
+ },
38
42
  "private": false
39
43
  }
package/services.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { AxiosError } from "axios";
2
2
  import axiosInstance from "./axiosInstance";
3
3
  import { methods, services } from "./servicesData";
4
- import {
5
- openNotificationWithIcon,
6
- TYPE,
7
- } from "./src/components/notificationToast";
4
+ // import {
5
+ // openNotificationWithIcon,
6
+ // TYPE,
7
+ // } from "./src/components/notificationToast";
8
8
 
9
9
  const handleApiError = (service, e) => {
10
10
  try {
@@ -40,12 +40,12 @@ const handleApiError = (service, e) => {
40
40
  errorToDisplay.errors = subErrorTranslations || [];
41
41
  }
42
42
 
43
- openNotificationWithIcon(
44
- TYPE.ERROR,
45
- "",
46
- errorToDisplay.title,
47
- errorToDisplay.errors
48
- );
43
+ // openNotificationWithIcon(
44
+ // TYPE.ERROR,
45
+ // "",
46
+ // errorToDisplay.title,
47
+ // errorToDisplay.errors
48
+ // );
49
49
  } catch (e) {
50
50
  console.error(e);
51
51
  throw e;
@@ -1,37 +1,37 @@
1
- import React from "react";
2
- import { notification } from "antd";
1
+ // import React from "react";
2
+ // import { notification } from "antd";
3
3
 
4
- const TYPE = {
5
- SUCCESS: "success",
6
- ERROR: "error",
7
- INFO: "info",
8
- WARNING: "warning",
9
- };
4
+ // const TYPE = {
5
+ // SUCCESS: "success",
6
+ // ERROR: "error",
7
+ // INFO: "info",
8
+ // WARNING: "warning",
9
+ // };
10
10
 
11
- const openNotificationWithIcon = (type, message, description, subErrors) => {
12
- return notification[type]({
13
- message,
14
- style: {
15
- minHeight:
16
- description || (subErrors && subErrors.length > 0) ? "0" : "70px",
17
- },
18
- description: (
19
- <>
20
- {description ? (
21
- <>
22
- <div style={{ fontSize: "13px" }}>{description}</div>
23
- <br />
24
- </>
25
- ) : null}
11
+ // const openNotificationWithIcon = (type, message, description, subErrors) => {
12
+ // return notification[type]({
13
+ // message,
14
+ // style: {
15
+ // minHeight:
16
+ // description || (subErrors && subErrors.length > 0) ? "0" : "70px",
17
+ // },
18
+ // description: (
19
+ // <>
20
+ // {description ? (
21
+ // <>
22
+ // <div style={{ fontSize: "13px" }}>{description}</div>
23
+ // <br />
24
+ // </>
25
+ // ) : null}
26
26
 
27
- {subErrors?.map((e, idx) => (
28
- <React.Fragment key={`sub_error_${idx}`}>
29
- <div style={{ fontSize: "16px" }}>- {e}</div>
30
- <br />
31
- </React.Fragment>
32
- ))}
33
- </>
34
- ),
35
- });
36
- };
37
- export { openNotificationWithIcon, TYPE };
27
+ // {subErrors?.map((e, idx) => (
28
+ // <React.Fragment key={`sub_error_${idx}`}>
29
+ // <div style={{ fontSize: "16px" }}>- {e}</div>
30
+ // <br />
31
+ // </React.Fragment>
32
+ // ))}
33
+ // </>
34
+ // ),
35
+ // });
36
+ // };
37
+ // export { openNotificationWithIcon, TYPE };
@@ -0,0 +1,69 @@
1
+ import { axiosInstance } from "sysone-api-mapper";
2
+ import { getInsureds_CNP } from "./modules/policy";
3
+
4
+ export const apiMapper = async (endpointCode, tenant, routeParams, params = null) => {
5
+ try {
6
+ const configData = tenantsConfig[endpointCode]
7
+ const endpointData = configData[tenant] ?? configData.default
8
+
9
+ const url = getUrl(endpointData.url, routeParams);
10
+ let response;
11
+ switch (endpointData.method) {
12
+ case methods.GET:
13
+ response = await axiosInstance.get(url, { params });
14
+ return endpointData.responseMapper(response.data);
15
+ case methods.POST:
16
+ // aca podria ejecutarse requestMapper
17
+ response = await axiosInstance.post(url, params);
18
+ return endpointData.responseMapper(response.data);
19
+ case methods.PUT:
20
+ // aca podria ejecutarse requestMapper
21
+ response = await axiosInstance.put(url, params);
22
+ return endpointData.responseMapper(response.data);
23
+ case methods.DELETE:
24
+ response = await axiosInstance.delete(url, params);
25
+ return endpointData.responseMapper(response.data);
26
+ default:
27
+ response = null;
28
+ throw new Error(
29
+ "Request error: Method not allowed. Only use GET, POST, PUT, DELETE"
30
+ );
31
+ }
32
+ } catch (e) {
33
+ throw e;
34
+ }
35
+ };
36
+
37
+ const getUrl = (serviceUrl, routeParams) => {
38
+ if (!routeParams) return serviceUrl;
39
+ return serviceUrl.replace(/{(\d+)}/g, function (match, routeParamNumber) {
40
+ return routeParams[routeParamNumber]
41
+ ? routeParams[routeParamNumber]
42
+ : match;
43
+ });
44
+ };
45
+
46
+ const methods = {
47
+ GET: "GET",
48
+ POST: "POST",
49
+ PUT: "PUT",
50
+ DELETE: "DELETE",
51
+ };
52
+
53
+
54
+ const tenantsConfig = {
55
+ GET_INSUREDS: {
56
+ default: {
57
+ url: 'policy-life/v1/policies/{0}/insureds',
58
+ method: methods.GET,
59
+ requestMapper: null,
60
+ responseMapper: (response) => (response),
61
+ },
62
+ cnp: {
63
+ url: 'policy/v1/policy/{0}/{1}/policy-insured',
64
+ method: methods.GET,
65
+ requestMapper: null,
66
+ responseMapper: (response) => { getInsureds_CNP(response) },
67
+ },
68
+ },
69
+ }
@@ -0,0 +1,37 @@
1
+ const getInsureds_CNP = async (response) => {
2
+ const objectMapped = {
3
+ total: response.insureds.length,
4
+ totalActive: null,
5
+ values: response.insureds.map((i) => ({
6
+ code: i.code,
7
+ number: i.id,
8
+ firstName: i.firstName || i.name,
9
+ lastName: i.lastName,
10
+ type: {
11
+ code: i.role.code === "T" ? "OWNER" : "ADHERENT",
12
+ name: i.role.code === "T" ? "Titular" : "Adherente"
13
+ },
14
+ status: {
15
+ code: "ACTIVE",
16
+ name: "Activo"
17
+ },
18
+ insuredAmount: i.insuredAmount,
19
+ inclusionDate: i.entranceDate,
20
+ exclusionDate: i.cancellationDate,
21
+ identification: {
22
+ value: i.identification.number,
23
+ type: {
24
+ name: i.identification.type.name,
25
+ code: i.identification.type.code
26
+ }
27
+ }
28
+ }))
29
+ }
30
+
31
+ return objectMapped
32
+ }
33
+
34
+
35
+ export {
36
+ getInsureds_CNP
37
+ }
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Mi Package NPM</title>
8
+ </head>
9
+ <body>
10
+ <div id="root">
11
+
12
+ </div>
13
+ <script type="module" src="index.js"></script>
14
+ </body>
15
+ </html>
@@ -0,0 +1,9 @@
1
+ const root = document.getElementById("root")
2
+
3
+ const header = document.createElement("h1")
4
+ const div = document.createElement("div")
5
+
6
+ header.innerHTML = "HOLA"
7
+ div.append(header)
8
+
9
+ root.append(div)
package/src/server.js CHANGED
@@ -1,6 +1,9 @@
1
1
  const express = require("express");
2
2
  const cors = require("cors");
3
3
  require("dotenv").config();
4
+ const path = require("path");
5
+ const ReactDOM = require("react-dom")
6
+
4
7
 
5
8
  const app = express();
6
9
  const port = process.env.PORT || 3000;
@@ -10,9 +13,10 @@ app.use(cors());
10
13
  app.use(express.json());
11
14
 
12
15
  // Ruta raíz
13
- app.get("/", (req, res) => {
14
- res.json({ message: "Hello World!" });
15
- });
16
+ app.get("*", (req, res) => {
17
+ res.sendFile(path.join(__dirname, "public", "index.html"));
18
+ })
19
+
16
20
 
17
21
  // Iniciar el servidor
18
22
  app.listen(port, () => {