sysone-api-mapper 1.0.82 → 1.0.84
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/package.json
CHANGED
|
@@ -589,24 +589,30 @@ const quotationModule = {
|
|
|
589
589
|
method: methods.GET,
|
|
590
590
|
requestMapper: (request) => ({
|
|
591
591
|
mappedParams: request,
|
|
592
|
-
headers: {
|
|
593
|
-
"Content-Type": "application/pdf",
|
|
594
|
-
},
|
|
595
592
|
responseType: "arraybuffer"
|
|
596
593
|
}),
|
|
597
|
-
responseMapper: (response) =>
|
|
594
|
+
responseMapper: (response) => {
|
|
595
|
+
if (response?.data instanceof ArrayBuffer) {
|
|
596
|
+
return response.data;
|
|
597
|
+
}
|
|
598
|
+
if (response instanceof ArrayBuffer) {
|
|
599
|
+
return response;
|
|
600
|
+
}
|
|
601
|
+
return response;
|
|
602
|
+
}
|
|
598
603
|
},
|
|
599
604
|
cnp: {
|
|
600
605
|
url: '/quotation/v1/quotations/{0}/report',
|
|
601
606
|
method: methods.GET,
|
|
602
607
|
requestMapper: (request) => ({
|
|
603
608
|
mappedParams: request,
|
|
604
|
-
headers: {
|
|
605
|
-
"Content-Type": "application/pdf",
|
|
606
|
-
},
|
|
607
|
-
responseType: "arraybuffer"
|
|
608
609
|
}),
|
|
609
|
-
responseMapper: (response) =>
|
|
610
|
+
responseMapper: (response) => {
|
|
611
|
+
if (response?.data) {
|
|
612
|
+
return response.data;
|
|
613
|
+
}
|
|
614
|
+
return response;
|
|
615
|
+
}
|
|
610
616
|
}
|
|
611
617
|
},
|
|
612
618
|
|