@fiado/api-invoker 3.0.19 → 3.0.20

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.
@@ -1,6 +1,6 @@
1
1
  import { IStpServicePaymentApi } from "./interfaces/IStpServicePaymentApi";
2
2
  import { IHttpRequest } from "@fiado/http-client";
3
- import { GetCatalogParams, ServicePaymentRequest } from "@fiado/type-kit/bin/servicePayment";
3
+ import { GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse } from "@fiado/type-kit/bin/servicePayment";
4
4
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
5
5
  export default class StpServicePaymentApi implements IStpServicePaymentApi {
6
6
  private httpRequest;
@@ -17,4 +17,5 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
17
17
  getById(id: string): Promise<ApiGatewayResponse<any>>;
18
18
  getPaymentValidation(transactionNumber: string): Promise<ApiGatewayResponse<any>>;
19
19
  getCatalog(params: GetCatalogParams): Promise<ApiGatewayResponse<any>>;
20
+ verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
20
21
  }
@@ -45,6 +45,10 @@ let StpServicePaymentApi = class StpServicePaymentApi {
45
45
  }
46
46
  return await this.httpRequest.get(url);
47
47
  }
48
+ async verificateReference(request) {
49
+ const url = `${this.baseUrl}verificateReference`;
50
+ return await this.httpRequest.post(url, request);
51
+ }
48
52
  };
49
53
  StpServicePaymentApi = __decorate([
50
54
  (0, inversify_1.injectable)(),
@@ -1,4 +1,4 @@
1
- import { GetCatalogParams, ServicePaymentRequest } from "@fiado/type-kit/bin/servicePayment";
1
+ import { GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse } from "@fiado/type-kit/bin/servicePayment";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
3
  export interface IStpServicePaymentApi {
4
4
  pay(request: ServicePaymentRequest): Promise<ApiGatewayResponse<any>>;
@@ -12,4 +12,5 @@ export interface IStpServicePaymentApi {
12
12
  pageSize?: number;
13
13
  sort?: string;
14
14
  }): Promise<ApiGatewayResponse<any>>;
15
+ verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.0.19",
3
+ "version": "3.0.20",
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",
@@ -16,7 +16,7 @@
16
16
  "@fiado/gateway-adapter": "^1.1.50",
17
17
  "@fiado/http-client": "^1.0.7",
18
18
  "@fiado/logger": "^1.0.3",
19
- "@fiado/type-kit": "^3.0.21",
19
+ "@fiado/type-kit": "^3.0.23",
20
20
  "dotenv": "^16.4.7",
21
21
  "inversify": "^6.2.2",
22
22
  "reflect-metadata": "^0.2.2"
@@ -1,7 +1,7 @@
1
1
  import {IStpServicePaymentApi} from "./interfaces/IStpServicePaymentApi";
2
2
  import {inject, injectable} from "inversify";
3
3
  import {IHttpRequest} from "@fiado/http-client";
4
- import {GetCatalogParams, ServicePaymentRequest} from "@fiado/type-kit/bin/servicePayment";
4
+ import {GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse} from "@fiado/type-kit/bin/servicePayment";
5
5
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
6
6
 
7
7
  @injectable()
@@ -42,4 +42,9 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
42
42
  }
43
43
  return await this.httpRequest.get(url);
44
44
  }
45
+
46
+ async verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>> {
47
+ const url = `${this.baseUrl}verificateReference`;
48
+ return await this.httpRequest.post(url, request);
49
+ }
45
50
  }
@@ -1,4 +1,4 @@
1
- import {GetCatalogParams, ServicePaymentRequest} from "@fiado/type-kit/bin/servicePayment";
1
+ import {GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse} from "@fiado/type-kit/bin/servicePayment";
2
2
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
3
3
 
4
4
  export interface IStpServicePaymentApi {
@@ -13,4 +13,6 @@ export interface IStpServicePaymentApi {
13
13
  getById(id: string): Promise<ApiGatewayResponse<any>>;
14
14
 
15
15
  getSTPTransactionDownload(params: {date: string,index?:string,pageSize?:number, sort?:string}): Promise<ApiGatewayResponse<any>>;
16
+
17
+ verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
16
18
  }