sysone-api-mapper 1.0.26 → 1.0.28
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;
|
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
|
};
|
|
@@ -93,7 +93,7 @@ export const tenantsConfig = {
|
|
|
93
93
|
},
|
|
94
94
|
GET_POLICY_HOME_COLLECTIVE_DETAIL: {
|
|
95
95
|
default: {
|
|
96
|
-
url: 'policy-home/v1/
|
|
96
|
+
url: 'policy-home/v1/policies/{0}/details',
|
|
97
97
|
method: methods.GET,
|
|
98
98
|
source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
|
|
99
99
|
requestMapper: (request) => ({ mappedParams: request }),
|
|
@@ -109,7 +109,7 @@ export const tenantsConfig = {
|
|
|
109
109
|
},
|
|
110
110
|
GET_POLICY_HOME_INDIVIDUAL_DETAIL: {
|
|
111
111
|
default: {
|
|
112
|
-
url: 'policy-home/v1/
|
|
112
|
+
url: 'policy-home/v1/policies/{0}/details',
|
|
113
113
|
method: methods.GET,
|
|
114
114
|
source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
|
|
115
115
|
requestMapper: (request) => ({ mappedParams: request }),
|
|
@@ -125,7 +125,7 @@ export const tenantsConfig = {
|
|
|
125
125
|
},
|
|
126
126
|
GET_POLICY_LIFE_COLLECTIVE_DETAIL: {
|
|
127
127
|
default: {
|
|
128
|
-
url: 'policy-life/v1/
|
|
128
|
+
url: 'policy-life/v1/policies/{0}/details',
|
|
129
129
|
method: methods.GET,
|
|
130
130
|
source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
|
|
131
131
|
requestMapper: (request) => ({ mappedParams: request }),
|
|
@@ -141,7 +141,7 @@ export const tenantsConfig = {
|
|
|
141
141
|
},
|
|
142
142
|
GET_POLICY_LIFE_INDIVIDUAL_DETAIL: {
|
|
143
143
|
default: {
|
|
144
|
-
url: 'policy-life/v1/
|
|
144
|
+
url: 'policy-life/v1/policies/{0}/details',
|
|
145
145
|
method: methods.GET,
|
|
146
146
|
source: 'https://apidoc.sysone.com/policy/v1/open-api.html#/paths/~1v1~1policies~1%7Bcode%7D~1details/get',
|
|
147
147
|
requestMapper: (request) => ({ mappedParams: request }),
|