@fiado/api-invoker 4.28.0 → 4.30.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.
- package/bin/transactionProcessor/api/TransactionProcessorApi.d.ts +2 -1
- package/bin/transactionProcessor/api/TransactionProcessorApi.js +7 -3
- package/bin/transactionProcessor/api/interfaces/ITransactionProcessorApi.d.ts +8 -1
- package/package.json +2 -2
- package/src/transactionProcessor/api/TransactionProcessorApi.ts +12 -3
- package/src/transactionProcessor/api/interfaces/ITransactionProcessorApi.ts +12 -0
|
@@ -2,7 +2,7 @@ import { ITransactionProcessorApi } from "./interfaces/ITransactionProcessorApi.
|
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { AuthorizeCollectorOrderRequest, AuthorizeCollectorOrderResponse, AuthorizeCollectorTransactionRequest, AuthorizeCreditCardPurchaseRequest, AuthorizeSpeiBankTransferNcRequest, AuthorizeSpeiMexBankTransferInRequest, AuthorizeRenewalPreAuthRequest, AuthorizeRenewalPreAuthResponse } from "@fiado/type-kit/bin/transactionProcessor/index.js";
|
|
4
4
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
5
|
-
import { ValidateWalletFundingRequest, ValidateWalletFundingResponse, CreditWalletFundingRequest, CreditWalletFundingResponse, ReverseWalletFundingRequest, ReverseWalletFundingResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
5
|
+
import { ValidateWalletFundingRequest, ValidateWalletFundingResponse, CreditWalletFundingRequest, CreditWalletFundingResponse, ReverseWalletFundingRequest, ReverseWalletFundingResponse, GetWalletFundingLimitRequest, GetWalletFundingLimitResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
6
6
|
type ProcessUpdateLevelRequest = import("@fiado/type-kit/bin/transactionProcessor/dtos/ProcessUpdateLevelRequest.js").default;
|
|
7
7
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
8
8
|
export default class TransactionProcessorApi implements ITransactionProcessorApi {
|
|
@@ -19,5 +19,6 @@ export default class TransactionProcessorApi implements ITransactionProcessorApi
|
|
|
19
19
|
walletFundingValidate(request: ValidateWalletFundingRequest): Promise<ApiGatewayResponse<ValidateWalletFundingResponse>>;
|
|
20
20
|
walletFundingCredit(request: CreditWalletFundingRequest): Promise<ApiGatewayResponse<CreditWalletFundingResponse>>;
|
|
21
21
|
walletFundingReverse(request: ReverseWalletFundingRequest): Promise<ApiGatewayResponse<ReverseWalletFundingResponse>>;
|
|
22
|
+
walletFundingGetLimit(request: GetWalletFundingLimitRequest): Promise<ApiGatewayResponse<GetWalletFundingLimitResponse>>;
|
|
22
23
|
}
|
|
23
24
|
export {};
|
|
@@ -46,15 +46,19 @@ let TransactionProcessorApi = class TransactionProcessorApi {
|
|
|
46
46
|
return await this.httpRequest.post(url, request);
|
|
47
47
|
}
|
|
48
48
|
async walletFundingValidate(request) {
|
|
49
|
-
const url = `${this.baseUrl}
|
|
49
|
+
const url = `${this.baseUrl}wallet-funding/validate`;
|
|
50
50
|
return await this.httpRequest.post(url, request);
|
|
51
51
|
}
|
|
52
52
|
async walletFundingCredit(request) {
|
|
53
|
-
const url = `${this.baseUrl}
|
|
53
|
+
const url = `${this.baseUrl}wallet-funding/credit`;
|
|
54
54
|
return await this.httpRequest.post(url, request);
|
|
55
55
|
}
|
|
56
56
|
async walletFundingReverse(request) {
|
|
57
|
-
const url = `${this.baseUrl}
|
|
57
|
+
const url = `${this.baseUrl}wallet-funding/reverse`;
|
|
58
|
+
return await this.httpRequest.post(url, request);
|
|
59
|
+
}
|
|
60
|
+
async walletFundingGetLimit(request) {
|
|
61
|
+
const url = `${this.baseUrl}wallet-funding/limit`;
|
|
58
62
|
return await this.httpRequest.post(url, request);
|
|
59
63
|
}
|
|
60
64
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
2
|
import { AuthorizeCollectorOrderRequest, AuthorizeCollectorOrderResponse, AuthorizeCollectorTransactionRequest, AuthorizeCreditCardPurchaseRequest, AuthorizeSpeiBankTransferNcRequest, AuthorizeSpeiMexBankTransferInRequest, AuthorizeRenewalPreAuthRequest, AuthorizeRenewalPreAuthResponse } from "@fiado/type-kit/bin/transactionProcessor/index.js";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
|
-
import { ValidateWalletFundingRequest, ValidateWalletFundingResponse, CreditWalletFundingRequest, CreditWalletFundingResponse, ReverseWalletFundingRequest, ReverseWalletFundingResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
4
|
+
import { ValidateWalletFundingRequest, ValidateWalletFundingResponse, CreditWalletFundingRequest, CreditWalletFundingResponse, ReverseWalletFundingRequest, ReverseWalletFundingResponse, GetWalletFundingLimitRequest, GetWalletFundingLimitResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
5
5
|
type ProcessUpdateLevelRequest = import("@fiado/type-kit/bin/transactionProcessor/dtos/ProcessUpdateLevelRequest.js").default;
|
|
6
6
|
export interface ITransactionProcessorApi {
|
|
7
7
|
authorizeTransaction(request: AuthorizeCreditCardPurchaseRequest): Promise<any>;
|
|
@@ -29,5 +29,12 @@ export interface ITransactionProcessorApi {
|
|
|
29
29
|
* Lo consume equality-connector ante refunds del provider.
|
|
30
30
|
*/
|
|
31
31
|
walletFundingReverse(request: ReverseWalletFundingRequest): Promise<ApiGatewayResponse<ReverseWalletFundingResponse>>;
|
|
32
|
+
/**
|
|
33
|
+
* Devuelve el cap mensual del nivel del usuario y cuanto le queda
|
|
34
|
+
* disponible este mes. Read-only — NO toca saldo, NO valida monto.
|
|
35
|
+
* Backend: POST /transaction-processor/wallet-funding/limit (privado VPC).
|
|
36
|
+
* Lo consume benefits-marketplace-business para exponer el dato al wallet-app.
|
|
37
|
+
*/
|
|
38
|
+
walletFundingGetLimit(request: GetWalletFundingLimitRequest): Promise<ApiGatewayResponse<GetWalletFundingLimitResponse>>;
|
|
32
39
|
}
|
|
33
40
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.30.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
|
"type": "module",
|
|
6
6
|
"main": "bin/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fiado/gateway-adapter": "^2.0.2",
|
|
35
35
|
"@fiado/http-client": "^2.0.1",
|
|
36
36
|
"@fiado/logger": "^1.1.3",
|
|
37
|
-
"@fiado/type-kit": "^3.
|
|
37
|
+
"@fiado/type-kit": "^3.100.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
CreditWalletFundingResponse,
|
|
19
19
|
ReverseWalletFundingRequest,
|
|
20
20
|
ReverseWalletFundingResponse,
|
|
21
|
+
GetWalletFundingLimitRequest,
|
|
22
|
+
GetWalletFundingLimitResponse,
|
|
21
23
|
} from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
22
24
|
type ProcessUpdateLevelRequest = import("@fiado/type-kit/bin/transactionProcessor/dtos/ProcessUpdateLevelRequest.js").default;
|
|
23
25
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
@@ -68,21 +70,28 @@ export default class TransactionProcessorApi implements ITransactionProcessorApi
|
|
|
68
70
|
async walletFundingValidate(
|
|
69
71
|
request: ValidateWalletFundingRequest,
|
|
70
72
|
): Promise<ApiGatewayResponse<ValidateWalletFundingResponse>> {
|
|
71
|
-
const url = `${this.baseUrl}
|
|
73
|
+
const url = `${this.baseUrl}wallet-funding/validate`;
|
|
72
74
|
return await this.httpRequest.post(url, request);
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
async walletFundingCredit(
|
|
76
78
|
request: CreditWalletFundingRequest,
|
|
77
79
|
): Promise<ApiGatewayResponse<CreditWalletFundingResponse>> {
|
|
78
|
-
const url = `${this.baseUrl}
|
|
80
|
+
const url = `${this.baseUrl}wallet-funding/credit`;
|
|
79
81
|
return await this.httpRequest.post(url, request);
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
async walletFundingReverse(
|
|
83
85
|
request: ReverseWalletFundingRequest,
|
|
84
86
|
): Promise<ApiGatewayResponse<ReverseWalletFundingResponse>> {
|
|
85
|
-
const url = `${this.baseUrl}
|
|
87
|
+
const url = `${this.baseUrl}wallet-funding/reverse`;
|
|
88
|
+
return await this.httpRequest.post(url, request);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async walletFundingGetLimit(
|
|
92
|
+
request: GetWalletFundingLimitRequest,
|
|
93
|
+
): Promise<ApiGatewayResponse<GetWalletFundingLimitResponse>> {
|
|
94
|
+
const url = `${this.baseUrl}wallet-funding/limit`;
|
|
86
95
|
return await this.httpRequest.post(url, request);
|
|
87
96
|
}
|
|
88
97
|
}
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
CreditWalletFundingResponse,
|
|
18
18
|
ReverseWalletFundingRequest,
|
|
19
19
|
ReverseWalletFundingResponse,
|
|
20
|
+
GetWalletFundingLimitRequest,
|
|
21
|
+
GetWalletFundingLimitResponse,
|
|
20
22
|
} from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
21
23
|
type ProcessUpdateLevelRequest = import("@fiado/type-kit/bin/transactionProcessor/dtos/ProcessUpdateLevelRequest.js").default;
|
|
22
24
|
|
|
@@ -62,4 +64,14 @@ export interface ITransactionProcessorApi {
|
|
|
62
64
|
walletFundingReverse(
|
|
63
65
|
request: ReverseWalletFundingRequest,
|
|
64
66
|
): Promise<ApiGatewayResponse<ReverseWalletFundingResponse>>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Devuelve el cap mensual del nivel del usuario y cuanto le queda
|
|
70
|
+
* disponible este mes. Read-only — NO toca saldo, NO valida monto.
|
|
71
|
+
* Backend: POST /transaction-processor/wallet-funding/limit (privado VPC).
|
|
72
|
+
* Lo consume benefits-marketplace-business para exponer el dato al wallet-app.
|
|
73
|
+
*/
|
|
74
|
+
walletFundingGetLimit(
|
|
75
|
+
request: GetWalletFundingLimitRequest,
|
|
76
|
+
): Promise<ApiGatewayResponse<GetWalletFundingLimitResponse>>;
|
|
65
77
|
}
|