@fiado/api-invoker 3.4.0 → 3.4.2

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.
@@ -21,7 +21,10 @@ let CirculoCreditoApi = class CirculoCreditoApi {
21
21
  }
22
22
  async reportarCuenta(request) {
23
23
  const url = `${this.baseUrl}/private/reportar/cuenta`;
24
- return await this.httpRequest.post(url, request);
24
+ const envelope = await this.httpRequest.post(url, request);
25
+ // El conector envuelve la response en ApiResponse: { code, date, data, msg }.
26
+ // Aqui desempacamos `.data` para entregar el ReportarCuentaResponse limpio.
27
+ return envelope.data;
25
28
  }
26
29
  };
27
30
  exports.CirculoCreditoApi = CirculoCreditoApi;
@@ -13,4 +13,5 @@ export declare class CreditPaymentApi implements ICreditPaymentApi {
13
13
  reverse(request: any): Promise<any>;
14
14
  getBalance(creditId: string): Promise<any>;
15
15
  getHistory(creditId: string): Promise<any>;
16
+ listFundingInstructions(partnerId: string, year: number): Promise<any>;
16
17
  }
@@ -69,6 +69,11 @@ let CreditPaymentApi = class CreditPaymentApi {
69
69
  const operationName = "creditHistory";
70
70
  return await this.httpRequest.post(url, null, { 'operationName': operationName });
71
71
  }
72
+ async listFundingInstructions(partnerId, year) {
73
+ const url = `${this.baseUrl}credit-payment/funding-instructions`;
74
+ const operationName = "privateListFundingInstructions";
75
+ return await this.httpRequest.post(url, { partnerId, year }, { 'operationName': operationName });
76
+ }
72
77
  };
73
78
  exports.CreditPaymentApi = CreditPaymentApi;
74
79
  exports.CreditPaymentApi = CreditPaymentApi = __decorate([
@@ -35,4 +35,9 @@ export interface ICreditPaymentApi {
35
35
  * Obtiene historial de transacciones de un crédito.
36
36
  */
37
37
  getHistory(creditId: string): Promise<any>;
38
+ /**
39
+ * Lista funding instructions del partner del año, filtradas SENT/CONFIRMED.
40
+ * Para conciliacion bancaria PCF en credit-worker-business.
41
+ */
42
+ listFundingInstructions(partnerId: string, year: number): Promise<any>;
38
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -13,6 +13,9 @@ export class CirculoCreditoApi implements ICirculoCreditoApi {
13
13
  request: ReportarCuentaRequest,
14
14
  ): Promise<ReportarCuentaResponse> {
15
15
  const url = `${this.baseUrl}/private/reportar/cuenta`;
16
- return await this.httpRequest.post(url, request);
16
+ const envelope = await this.httpRequest.post(url, request) as { data: ReportarCuentaResponse };
17
+ // El conector envuelve la response en ApiResponse: { code, date, data, msg }.
18
+ // Aqui desempacamos `.data` para entregar el ReportarCuentaResponse limpio.
19
+ return envelope.data;
17
20
  }
18
21
  }
@@ -64,4 +64,10 @@ export class CreditPaymentApi implements ICreditPaymentApi {
64
64
  const operationName = "creditHistory";
65
65
  return await this.httpRequest.post(url, null, { 'operationName': operationName });
66
66
  }
67
+
68
+ public async listFundingInstructions(partnerId: string, year: number): Promise<any> {
69
+ const url = `${this.baseUrl}credit-payment/funding-instructions`;
70
+ const operationName = "privateListFundingInstructions";
71
+ return await this.httpRequest.post(url, { partnerId, year }, { 'operationName': operationName });
72
+ }
67
73
  }
@@ -43,4 +43,10 @@ export interface ICreditPaymentApi {
43
43
  * Obtiene historial de transacciones de un crédito.
44
44
  */
45
45
  getHistory(creditId: string): Promise<any>;
46
+
47
+ /**
48
+ * Lista funding instructions del partner del año, filtradas SENT/CONFIRMED.
49
+ * Para conciliacion bancaria PCF en credit-worker-business.
50
+ */
51
+ listFundingInstructions(partnerId: string, year: number): Promise<any>;
46
52
  }