@fiado/api-invoker 3.5.0 → 3.6.0

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.
@@ -30,4 +30,5 @@ export default class MulticommServicePaymentApi implements IMulticommServicePaym
30
30
  includeDisabled?: boolean;
31
31
  }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
32
32
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
33
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
33
34
  }
@@ -76,6 +76,10 @@ let MulticommServicePaymentApi = class MulticommServicePaymentApi {
76
76
  const url = `${this.baseUrl}/pay/standard`;
77
77
  return await this.httpRequest.post(url, request);
78
78
  }
79
+ async consultStandard(transactionNumber) {
80
+ const url = `${this.baseUrl}/pay/standard/transactions/${encodeURIComponent(transactionNumber)}`;
81
+ return await this.httpRequest.get(url);
82
+ }
79
83
  };
80
84
  MulticommServicePaymentApi = __decorate([
81
85
  (0, inversify_1.injectable)(),
@@ -25,4 +25,5 @@ export interface IMulticommServicePaymentApi {
25
25
  includeDisabled?: boolean;
26
26
  }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
27
27
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
28
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
28
29
  }
@@ -26,4 +26,5 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
26
26
  includeDisabled?: boolean;
27
27
  }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
28
28
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
29
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
29
30
  }
@@ -76,6 +76,10 @@ let StpServicePaymentApi = class StpServicePaymentApi {
76
76
  const url = `${this.baseUrl}/pay/standard`;
77
77
  return await this.httpRequest.post(url, request);
78
78
  }
79
+ async consultStandard(transactionNumber) {
80
+ const url = `${this.baseUrl}/pay/standard/transactions/${encodeURIComponent(transactionNumber)}`;
81
+ return await this.httpRequest.get(url);
82
+ }
79
83
  };
80
84
  StpServicePaymentApi = __decorate([
81
85
  (0, inversify_1.injectable)(),
@@ -21,4 +21,5 @@ export interface IStpServicePaymentApi {
21
21
  includeDisabled?: boolean;
22
22
  }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
23
23
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
24
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
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",
@@ -77,4 +77,9 @@ export default class MulticommServicePaymentApi implements IMulticommServicePaym
77
77
  const url = `${this.baseUrl}/pay/standard`;
78
78
  return await this.httpRequest.post(url, request);
79
79
  }
80
+
81
+ async consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>> {
82
+ const url = `${this.baseUrl}/pay/standard/transactions/${encodeURIComponent(transactionNumber)}`;
83
+ return await this.httpRequest.get(url);
84
+ }
80
85
  }
@@ -27,4 +27,10 @@ export interface IMulticommServicePaymentApi {
27
27
  // Agregado en v3.5.0 (Fase 2) — consume POST /pay/standard del conector con DTO estandarizado.
28
28
  // Lo invoca el PaymentRouter de benefits-marketplace-business.
29
29
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
30
+
31
+ // Agregado en v3.6.0 (Fase 2.5) — consume GET /pay/standard/transactions/{transactionNumber}
32
+ // del conector. Devuelve el estado actual mapeado a BenefitPaymentResponse (el conector
33
+ // hace el mapping legacy → estándar internamente). Usado por el cron de timeout
34
+ // reconciliation del marketplace para consultar transacciones async sin ver shapes legacy.
35
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
30
36
  }
@@ -77,4 +77,9 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
77
77
  const url = `${this.baseUrl}/pay/standard`;
78
78
  return await this.httpRequest.post(url, request);
79
79
  }
80
+
81
+ async consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>> {
82
+ const url = `${this.baseUrl}/pay/standard/transactions/${encodeURIComponent(transactionNumber)}`;
83
+ return await this.httpRequest.get(url);
84
+ }
80
85
  }
@@ -27,4 +27,10 @@ export interface IStpServicePaymentApi {
27
27
  // Agregado en v3.5.0 (Fase 2) — consume POST /pay/standard del conector con DTO estandarizado.
28
28
  // Lo invoca el PaymentRouter de benefits-marketplace-business.
29
29
  payStandard(request: BenefitPaymentRequest): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
30
+
31
+ // Agregado en v3.6.0 (Fase 2.5) — consume GET /pay/standard/transactions/{transactionNumber}
32
+ // del conector. Devuelve el estado actual mapeado a BenefitPaymentResponse (el conector
33
+ // hace el mapping legacy → estándar internamente). Usado por el cron de timeout
34
+ // reconciliation del marketplace para consultar transacciones async sin ver shapes legacy.
35
+ consultStandard(transactionNumber: string): Promise<ApiGatewayResponse<BenefitPaymentResponse>>;
30
36
  }