sysone-api-mapper 1.0.27 → 1.0.29
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/axiosInstance.js
CHANGED
|
@@ -2,4 +2,9 @@ import axios from "axios";
|
|
|
2
2
|
|
|
3
3
|
const axiosInstance = axios.create({});
|
|
4
4
|
|
|
5
|
+
axiosInstance.interceptors.request.use(config => {
|
|
6
|
+
config.headers['X-Origin'] = config.headers['X-Origin'] || 'sysone-api-mapper-global';
|
|
7
|
+
return config;
|
|
8
|
+
});
|
|
9
|
+
|
|
5
10
|
export default axiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/package.json
CHANGED
package/src/mapper/Mapper.js
CHANGED
|
@@ -18,6 +18,7 @@ const configs = {
|
|
|
18
18
|
["X-Tenant"]: API_MAPPER.default.headers["X-Tenant"],
|
|
19
19
|
["X-User"]: API_MAPPER.default.headers["X-User"],
|
|
20
20
|
["X-Api-Key"]: API_MAPPER.default.headers["X-Api-Key"],
|
|
21
|
+
["X-Origin"]: "sysone-api-mapper"
|
|
21
22
|
},
|
|
22
23
|
},
|
|
23
24
|
cnp: {
|
|
@@ -26,8 +27,8 @@ const configs = {
|
|
|
26
27
|
["X-Channel"]: API_MAPPER.cnp.headers["X-Chanel"],
|
|
27
28
|
["X-Agent"]: API_MAPPER.cnp.headers["X-Agent"],
|
|
28
29
|
["X-Client"]: API_MAPPER.cnp.headers["X-Client"],
|
|
29
|
-
["Ocp-Apim-Subscription-Key"]:
|
|
30
|
-
|
|
30
|
+
["Ocp-Apim-Subscription-Key"]: API_MAPPER.cnp.headers["Ocp-Apim-Subscription-Key"],
|
|
31
|
+
["X-Origin"]: "sysone-api-mapper"
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// import { methods } from "./mapper";
|
|
2
2
|
import { getClaims_CNP } from "./modules/claim";
|
|
3
|
+
import { getModules, getModules_Request } from "./modules/general";
|
|
3
4
|
import { getEndorsements_CNP, getEndorsements_Request, getInsureds_CNP, getInsureds_CNP_Request, getPolicies_CNP, getPolicies_CNP_Request, getPolicyCollectiveDetail_CNP, getPolicyCollectiveDetail_Request, getPolicyDetail_CNP, getPolicyIndividualDetail_Request, postInsureds_CNP } from "./modules/policy";
|
|
4
5
|
import { getActivityList, getQuotationByCode, getQuotationByCode_Request, getQuotations_Request, getQuotationsList, quotationStandardPlanCreationMapped, quotationVariablePlanCreationMapped } from "./modules/quotation";
|
|
5
6
|
|
|
@@ -11,6 +12,23 @@ export const methods = {
|
|
|
11
12
|
};
|
|
12
13
|
export const tenantsConfig = {
|
|
13
14
|
// ------------ GET ------------------------------
|
|
15
|
+
//------------ CONFIGS ---------------------------
|
|
16
|
+
GET_MODULES: {
|
|
17
|
+
default: {
|
|
18
|
+
url: 'ui-configuration/v1/platforms/link-one/modules',
|
|
19
|
+
method: methods.GET,
|
|
20
|
+
requestMapper: (request) => ({ mappedParams: request }),
|
|
21
|
+
responseMapper: (response) => response,
|
|
22
|
+
},
|
|
23
|
+
cnp: {
|
|
24
|
+
url: 'ui-configuration/v1/modules',
|
|
25
|
+
method: methods.GET,
|
|
26
|
+
requestMapper: request => ({ mappedParams: getModules_Request(request) }),
|
|
27
|
+
responseMapper: (response) => response,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
//------------------------------------------------
|
|
14
32
|
GET_ACTIVITY: {
|
|
15
33
|
default: {
|
|
16
34
|
url: 'party/v1/sectors',
|