sysone-api-mapper 1.0.81 → 1.0.83

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sysone-api-mapper",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "Paquete mapper para portal de productores",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -583,6 +583,37 @@ const quotationModule = {
583
583
  }
584
584
  },
585
585
 
586
+ GET_QUOTATION_REPORT: {
587
+ default: {
588
+ url: '{0}/v1/quotations/{1}/report',
589
+ method: methods.GET,
590
+ requestMapper: (request) => ({
591
+ mappedParams: request,
592
+ headers: {
593
+ "Content-Type": "application/pdf",
594
+ },
595
+ responseType: "arraybuffer"
596
+ }),
597
+ responseMapper: (response) => {
598
+ if (response instanceof ArrayBuffer) {
599
+ return response;
600
+ }
601
+ return response;
602
+ }
603
+ },
604
+ cnp: {
605
+ url: '/quotation/v1/quotations/{0}/report',
606
+ method: methods.GET,
607
+ requestMapper: (request) => ({
608
+ mappedParams: request,
609
+ headers: {
610
+ "Content-Type": "application/json", // CNP devuelve JSON con base64
611
+ },
612
+ }),
613
+ responseMapper: (response) => response
614
+ }
615
+ },
616
+
586
617
  POST_CREATE_QUOTATION_STANDARD_PLAN: {
587
618
  default: {
588
619
  url: 'quotation/v1/quotations',