@fiado/api-invoker 1.3.91 → 1.3.93

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.
@@ -171,7 +171,7 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
171
171
  }
172
172
  async executeFinancialOperationReversal(request) {
173
173
  const url = `${this.baseUrl}/transactions/reversal`;
174
- return await this.httpRequest.post(url, request);
174
+ return await this.httpRequest.delete(url, request);
175
175
  }
176
176
  /** PROCESSOR TRANSACTIONS **/
177
177
  async executeFinancialOperationCompletion(request) {
@@ -36,10 +36,10 @@ let TransactionApi = class TransactionApi {
36
36
  }
37
37
  async getTransactionsByDirectoryIdAndSource(params) {
38
38
  let queryParams = [];
39
- if (!params.index) {
39
+ if (params.index) {
40
40
  queryParams.push(`index=${params.index}`);
41
41
  }
42
- if (!params.pageSize) {
42
+ if (params.pageSize) {
43
43
  queryParams.push(`pageSize=${params.pageSize}`);
44
44
  }
45
45
  const url = `${this.baseUrl}trx/transactions/${params.source}/${params.directoryId}?${queryParams.join('&')}`;
@@ -47,10 +47,10 @@ let TransactionApi = class TransactionApi {
47
47
  }
48
48
  async getFiadoTxByDirectoryAndBetweenDates(params) {
49
49
  let queryParams = [];
50
- if (!params.index) {
50
+ if (params.index) {
51
51
  queryParams.push(`index=${params.index}`);
52
52
  }
53
- if (!params.pageSize) {
53
+ if (params.pageSize) {
54
54
  queryParams.push(`pageSize=${params.pageSize}`);
55
55
  }
56
56
  queryParams.push(`startDate=${params.startDate}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.91",
3
+ "version": "1.3.93",
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",
@@ -255,7 +255,7 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
255
255
 
256
256
  async executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse[]>> {
257
257
  const url = `${this.baseUrl}/transactions/reversal`;
258
- return await this.httpRequest.post(url, request);
258
+ return await this.httpRequest.delete(url, request);
259
259
  }
260
260
 
261
261
  /** PROCESSOR TRANSACTIONS **/
@@ -3,7 +3,6 @@ import { IHttpRequest } from "@fiado/http-client";
3
3
  import { ITransactionApi } from "./interfaces/ITransactionApi";
4
4
  import { TransactionGetResponse, TransactionSourceEnum } from "@fiado/type-kit/bin/transaction";
5
5
  import { Provider } from "@fiado/type-kit/bin/provider";
6
- import { ApiGatewayResponse } from "@fiado/gateway-adapter";
7
6
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
8
7
 
9
8
 
@@ -18,6 +17,7 @@ export default class TransactionApi implements ITransactionApi {
18
17
  async getActivityProblemsByStatus(status: string, index?:string, pageSize?:number): Promise<any> {
19
18
 
20
19
  let queryParams = [];
20
+
21
21
  if (index) {
22
22
  queryParams.push(`index=${index}`);
23
23
  }
@@ -40,11 +40,12 @@ export default class TransactionApi implements ITransactionApi {
40
40
  async getTransactionsByDirectoryIdAndSource(params: { directoryId: string; source: TransactionSourceEnum; index?: string; pageSize?: number; }): Promise<any> {
41
41
 
42
42
  let queryParams = [];
43
- if (!params.index) {
43
+
44
+ if (params.index) {
44
45
  queryParams.push(`index=${params.index}`);
45
46
  }
46
47
 
47
- if (!params.pageSize) {
48
+ if (params.pageSize) {
48
49
  queryParams.push(`pageSize=${params.pageSize}`);
49
50
  }
50
51
 
@@ -54,11 +55,12 @@ export default class TransactionApi implements ITransactionApi {
54
55
  async getFiadoTxByDirectoryAndBetweenDates(params: { directoryId: string; targetOrSource: string; startDate: string; endDate: string; index?: string; pageSize?: number; }): Promise<any> {
55
56
 
56
57
  let queryParams = [];
57
- if (!params.index) {
58
+
59
+ if (params.index) {
58
60
  queryParams.push(`index=${params.index}`);
59
61
  }
60
62
 
61
- if (!params.pageSize) {
63
+ if (params.pageSize) {
62
64
  queryParams.push(`pageSize=${params.pageSize}`);
63
65
  }
64
66