sysone-api-mapper 1.0.202 → 1.0.204
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.
|
@@ -79,16 +79,17 @@ const apiMapper = async (endpointCode, tenant, routeParams, params = null, addit
|
|
|
79
79
|
return endpointData.responseMapper(response);
|
|
80
80
|
}
|
|
81
81
|
case endpointsConfig_1.methods.POST: {
|
|
82
|
-
const { mappedPostParams, mappedBody, headers: requestHeaders } = endpointData.requestMapper(params);
|
|
82
|
+
const { mappedPostParams, mappedBody, responseType, headers: requestHeaders, } = endpointData.requestMapper(params);
|
|
83
83
|
const response = await axiosInstance_1.default.post(url, mappedBody, {
|
|
84
84
|
...axiosConfig,
|
|
85
85
|
params: mappedPostParams,
|
|
86
|
+
responseType,
|
|
86
87
|
headers: {
|
|
87
88
|
...axiosConfig.headers,
|
|
88
89
|
...requestHeaders,
|
|
89
90
|
},
|
|
90
91
|
});
|
|
91
|
-
return endpointData.responseMapper(response.data);
|
|
92
|
+
return endpointData.responseMapper(responseType ? response : response.data);
|
|
92
93
|
}
|
|
93
94
|
case endpointsConfig_1.methods.PUT: {
|
|
94
95
|
const { mappedParams, mappedBody, headers: requestHeaders, ...otherOptions } = endpointData.requestMapper(params);
|
|
@@ -1025,7 +1025,7 @@ const policyModule = {
|
|
|
1025
1025
|
},
|
|
1026
1026
|
POST_POLICY_CERTIFICATE: {
|
|
1027
1027
|
default: {
|
|
1028
|
-
url: 'policy-life/v1/policies/{
|
|
1028
|
+
url: 'policy-life/v1/policies/{0}/certificate',
|
|
1029
1029
|
method: exports.methods.POST,
|
|
1030
1030
|
requestMapper: (params) => ({
|
|
1031
1031
|
mappedBody: params,
|