@fiado/api-invoker 1.3.7 → 1.3.9
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/centralPayments/CentralPaymentsConnectorApi.d.ts +3 -2
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +6 -2
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +3 -2
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +9 -2
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +5 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
-
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
5
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
@@ -28,7 +28,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
28
28
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>>;
|
|
29
29
|
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
30
30
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
31
|
-
updateCard(
|
|
31
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
32
32
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
33
33
|
createCard(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
|
|
34
34
|
replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
|
|
@@ -45,6 +45,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
45
45
|
getTransactionHistory(externalCardId: string, params: CentralPaymentsQueryParams): Promise<FiadoApiResponse<TransactionListResponse<CentralPaymentsTransactionItem>>>;
|
|
46
46
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
47
47
|
executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
|
|
48
|
+
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
48
49
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
49
50
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
50
51
|
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
@@ -77,8 +77,8 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
77
77
|
const url = `${this.baseUrl}/cards/${externalCardId}/balance`;
|
|
78
78
|
return await this.httpRequest.get(url);
|
|
79
79
|
}
|
|
80
|
-
async updateCard(
|
|
81
|
-
const url = `${this.baseUrl}/cards/${
|
|
80
|
+
async updateCard(request) {
|
|
81
|
+
const url = `${this.baseUrl}/cards/${request.cardId}`;
|
|
82
82
|
return await this.httpRequest.put(url, request);
|
|
83
83
|
}
|
|
84
84
|
async updateCardProgram(externalCardId, programId) {
|
|
@@ -149,6 +149,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
149
149
|
const url = `${this.baseUrl}/transactions/p2p/transfer`;
|
|
150
150
|
return await this.httpRequest.post(url, request);
|
|
151
151
|
}
|
|
152
|
+
async executeFinancialOperation(request) {
|
|
153
|
+
const url = `${this.baseUrl}/transactions/pocket/transfer`;
|
|
154
|
+
return await this.httpRequest.post(url, request);
|
|
155
|
+
}
|
|
152
156
|
/* ACH BANK ACCOUNTS */
|
|
153
157
|
async getCardholderACHBankAccounts(externalUserId) {
|
|
154
158
|
const url = `${this.baseUrl}/ach/bank-accounts/cardholders/${externalUserId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
3
3
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
4
4
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
@@ -21,7 +21,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
21
21
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>>;
|
|
22
22
|
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
23
23
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
24
|
-
updateCard(
|
|
24
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
25
25
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
26
26
|
createCard(request: CreateBankAccountCardRequest): Promise<FiadoApiResponse<CreateBankAccountCardResponse>>;
|
|
27
27
|
replaceCard(externalCardId: string, request: ReplaceBankAccountCardRequest): Promise<FiadoApiResponse<ReplaceBankAccountCardResponse>>;
|
|
@@ -38,6 +38,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
38
38
|
getTransactionHistory(externalCardId: string, params: CentralPaymentsQueryParams): Promise<FiadoApiResponse<TransactionListResponse<CentralPaymentsTransactionItem>>>;
|
|
39
39
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
40
40
|
executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
|
|
41
|
+
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
41
42
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
42
43
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
43
44
|
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
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.40",
|
|
17
17
|
"@fiado/http-client": "^1.0.5",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.83",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import {
|
|
3
3
|
BankAccountP2pTransferRequest,
|
|
4
|
+
BankAccountPocketTransferRequest,
|
|
5
|
+
BankAccountPocketTransferResponse,
|
|
4
6
|
CreateBankAccountUserRequest,
|
|
5
7
|
CreateBankAccountUserResponse,
|
|
6
8
|
GetBankAccountResponse,
|
|
@@ -123,8 +125,8 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
123
125
|
return await this.httpRequest.get(url);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
async updateCard(
|
|
127
|
-
const url = `${this.baseUrl}/cards/${
|
|
128
|
+
async updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>> {
|
|
129
|
+
const url = `${this.baseUrl}/cards/${request.cardId}`;
|
|
128
130
|
return await this.httpRequest.put(url, request);
|
|
129
131
|
}
|
|
130
132
|
|
|
@@ -212,6 +214,11 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
212
214
|
return await this.httpRequest.post(url, request);
|
|
213
215
|
}
|
|
214
216
|
|
|
217
|
+
async executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>> {
|
|
218
|
+
const url = `${this.baseUrl}/transactions/pocket/transfer`;
|
|
219
|
+
return await this.httpRequest.post(url, request);
|
|
220
|
+
}
|
|
221
|
+
|
|
215
222
|
/* ACH BANK ACCOUNTS */
|
|
216
223
|
async getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>> {
|
|
217
224
|
const url = `${this.baseUrl}/ach/bank-accounts/cardholders/${externalUserId}`;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BankAccountP2pTransferRequest,
|
|
3
|
+
BankAccountPocketTransferRequest,
|
|
4
|
+
BankAccountPocketTransferResponse,
|
|
3
5
|
CreateBankAccountUserRequest,
|
|
4
6
|
CreateBankAccountUserResponse,
|
|
5
7
|
GetBankAccountResponse,
|
|
@@ -66,7 +68,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
66
68
|
|
|
67
69
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
68
70
|
|
|
69
|
-
updateCard(
|
|
71
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
70
72
|
|
|
71
73
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
72
74
|
|
|
@@ -100,6 +102,8 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
100
102
|
|
|
101
103
|
executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
|
|
102
104
|
|
|
105
|
+
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
106
|
+
|
|
103
107
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
104
108
|
|
|
105
109
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|