@fiado/api-invoker 1.2.78 → 1.2.80
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/account-fiadosa/AccountFiadoSAApi.d.ts +2 -1
- package/bin/account-fiadosa/AccountFiadoSAApi.js +1 -1
- package/bin/account-fiadosa/interfaces/IAccountFiadoSAApi.d.ts +2 -1
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.d.ts +2 -1
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.js +1 -1
- package/bin/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.d.ts +2 -1
- package/bin/centralPayments/CentralPaymentsConnectorApi.d.ts +7 -0
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +22 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +7 -0
- package/bin/tern/api/interfaces/ITernApi.d.ts +2 -2
- package/package.json +2 -2
- package/src/account-fiadosa/AccountFiadoSAApi.ts +2 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +2 -1
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +2 -1
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +2 -1
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +32 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +11 -1
- package/src/tern/api/interfaces/ITernApi.ts +3 -2
|
@@ -2,12 +2,13 @@ import { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
|
|
|
2
2
|
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { IHttpRequest } from "@fiado/http-client";
|
|
5
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
6
|
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
6
7
|
private httpRequest;
|
|
7
8
|
private readonly baseUrl;
|
|
8
9
|
constructor(httpRequest: IHttpRequest);
|
|
9
10
|
cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
10
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
11
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
11
12
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
12
13
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
13
14
|
updateSpeiTransferRequest(transactionNumber: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>>;
|
|
@@ -22,7 +22,7 @@ let AccountFiadoSAApi = class AccountFiadoSAApi {
|
|
|
22
22
|
const url = `${this.baseUrl}/cancel`;
|
|
23
23
|
return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
|
|
24
24
|
}
|
|
25
|
-
async createAccount(data) {
|
|
25
|
+
async createAccount(provider, data) {
|
|
26
26
|
const url = `${this.baseUrl}`;
|
|
27
27
|
return await this.httpRequest.post(url, data);
|
|
28
28
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
3
4
|
export interface IAccountFiadoSAApi {
|
|
4
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
5
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
5
6
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
6
7
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
7
8
|
cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
@@ -2,12 +2,13 @@ import { IAccountPagoConfiadoApi } from "./interfaces/IAccountPagoConfiadoApi";
|
|
|
2
2
|
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { IHttpRequest } from "@fiado/http-client";
|
|
5
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
6
|
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
6
7
|
private httpRequest;
|
|
7
8
|
private readonly baseUrl;
|
|
8
9
|
constructor(httpRequest: IHttpRequest);
|
|
9
10
|
cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
|
|
10
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
11
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
11
12
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
12
13
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
13
14
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
@@ -22,7 +22,7 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
|
|
|
22
22
|
const url = `${this.baseUrl}/cancel`;
|
|
23
23
|
return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
|
|
24
24
|
}
|
|
25
|
-
async createAccount(data) {
|
|
25
|
+
async createAccount(provider, data) {
|
|
26
26
|
const url = `${this.baseUrl}`;
|
|
27
27
|
return await this.httpRequest.post(url, data);
|
|
28
28
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
3
4
|
export interface IAccountPagoConfiadoApi {
|
|
4
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
5
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
5
6
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
6
7
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
7
8
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
@@ -7,6 +7,8 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
|
|
|
7
7
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
8
8
|
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
9
9
|
import { ProviderDocumentUploadRequest } from "@fiado/type-kit/bin/provider";
|
|
10
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
11
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
10
12
|
export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi {
|
|
11
13
|
private readonly httpRequest;
|
|
12
14
|
private readonly _invokerUtils;
|
|
@@ -39,4 +41,9 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
39
41
|
getStatementDocument(statementId: string): Promise<FiadoApiResponse<StatementDocumentResponse>>;
|
|
40
42
|
getTransactionHistory(externalCardId: string, params: CentralPaymentsQueryParams): Promise<FiadoApiResponse<TransactionListResponse<CentralPaymentsTransactionItem>>>;
|
|
41
43
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
44
|
+
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
45
|
+
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
46
|
+
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
47
|
+
deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
|
|
48
|
+
verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
42
49
|
}
|
|
@@ -137,6 +137,28 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
137
137
|
const url = `${this.baseUrl}/transactions/${externalTransactionId}`;
|
|
138
138
|
return await this.httpRequest.get(url);
|
|
139
139
|
}
|
|
140
|
+
/* ACH BANK ACCOUNTS */
|
|
141
|
+
async getCardholderACHBankAccounts(externalUserId) {
|
|
142
|
+
const url = `${this.baseUrl}/bank-accounts/cardholder/${externalUserId}`;
|
|
143
|
+
return await this.httpRequest.get(url);
|
|
144
|
+
}
|
|
145
|
+
async createCardholderACHBankAccount(externalUserId, request) {
|
|
146
|
+
const url = `${this.baseUrl}/bank-accounts/cardholder/${externalUserId}`;
|
|
147
|
+
return await this.httpRequest.post(url, request);
|
|
148
|
+
}
|
|
149
|
+
async getACHBankAccountDetail(bankAccountId) {
|
|
150
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
151
|
+
return await this.httpRequest.get(url);
|
|
152
|
+
}
|
|
153
|
+
async deleteACHBankAccount(bankAccountId) {
|
|
154
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
155
|
+
return await this.httpRequest.delete(url);
|
|
156
|
+
}
|
|
157
|
+
async verifyACHBankAccount(bankAccountId, request) {
|
|
158
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
159
|
+
// TODO FALTA DEFINIR EL BODY
|
|
160
|
+
return await this.httpRequest.put(url, request);
|
|
161
|
+
}
|
|
140
162
|
};
|
|
141
163
|
exports.CentralPaymentsConnectorApi = CentralPaymentsConnectorApi;
|
|
142
164
|
exports.CentralPaymentsConnectorApi = CentralPaymentsConnectorApi = __decorate([
|
|
@@ -4,6 +4,8 @@ import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBa
|
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
5
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
6
6
|
import { ProviderDocumentUploadRequest } from "@fiado/type-kit/bin/provider";
|
|
7
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
8
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
7
9
|
export interface ICentralPaymentsConnectorApi {
|
|
8
10
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
9
11
|
createCardholder(request: CreateBankAccountUserRequest): Promise<FiadoApiResponse<CreateBankAccountUserResponse>>;
|
|
@@ -32,4 +34,9 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
32
34
|
getStatementDocument(statementId: string): Promise<FiadoApiResponse<StatementDocumentResponse>>;
|
|
33
35
|
getTransactionHistory(externalCardId: string, params: CentralPaymentsQueryParams): Promise<FiadoApiResponse<TransactionListResponse<CentralPaymentsTransactionItem>>>;
|
|
34
36
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
37
|
+
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
38
|
+
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
39
|
+
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
40
|
+
deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
|
|
41
|
+
verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
35
42
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateBankAccountRequest, CreateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { GetBankAccountUserRequest } from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
|
|
3
3
|
import { GetBankAccountRequest } from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
|
|
4
|
-
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
4
|
+
import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
5
5
|
export interface ITernApi {
|
|
6
6
|
getUser(request: GetBankAccountUserRequest): Promise<any>;
|
|
7
7
|
getAccount(request: GetBankAccountRequest): Promise<any>;
|
|
@@ -11,7 +11,7 @@ export interface ITernApi {
|
|
|
11
11
|
getCardsById(externalCardId: string): Promise<any>;
|
|
12
12
|
createCard(request: CreateBankAccountCardRequest): Promise<any>;
|
|
13
13
|
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
14
|
-
changePin(request: UpdateBankAccountCardRequest): Promise<
|
|
14
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<UpdateBankAccountCardResponse>;
|
|
15
15
|
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
16
16
|
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
17
17
|
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.80",
|
|
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.4",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.44",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -3,6 +3,7 @@ import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetA
|
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { inject, injectable } from "inversify";
|
|
5
5
|
import { IHttpRequest } from "@fiado/http-client";
|
|
6
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
6
7
|
|
|
7
8
|
@injectable()
|
|
8
9
|
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
@@ -16,7 +17,7 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
|
16
17
|
return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
|
+
async createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
21
|
const url = `${this.baseUrl}`;
|
|
21
22
|
return await this.httpRequest.post(url, data);
|
|
22
23
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export interface IAccountFiadoSAApi {
|
|
6
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
8
|
|
|
8
9
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
10
|
|
|
@@ -3,6 +3,7 @@ import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest
|
|
|
3
3
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
4
|
import {inject, injectable} from "inversify";
|
|
5
5
|
import {IHttpRequest} from "@fiado/http-client";
|
|
6
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
6
7
|
|
|
7
8
|
@injectable()
|
|
8
9
|
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
@@ -15,7 +16,7 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
15
16
|
return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
19
|
+
async createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
|
|
19
20
|
const url = `${this.baseUrl}`;
|
|
20
21
|
return await this.httpRequest.post(url, data);
|
|
21
22
|
}
|
|
@@ -6,10 +6,11 @@ import {
|
|
|
6
6
|
GetAccountResponse
|
|
7
7
|
} from "@fiado/type-kit/bin/account";
|
|
8
8
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
9
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
export interface IAccountPagoConfiadoApi {
|
|
12
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
13
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
13
14
|
|
|
14
15
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
15
16
|
|
|
@@ -18,7 +18,9 @@ import {
|
|
|
18
18
|
ActivateBankAccountCardResponse,
|
|
19
19
|
CardBatchRequest,
|
|
20
20
|
CardBatchResponse,
|
|
21
|
-
CardStatementListResponse,
|
|
21
|
+
CardStatementListResponse,
|
|
22
|
+
CreateBankAccountCardRequest,
|
|
23
|
+
CreateBankAccountCardResponse,
|
|
22
24
|
GetBankAccountCardBalanceResponse,
|
|
23
25
|
GetBankAccountCardResponse,
|
|
24
26
|
StatementDocumentResponse,
|
|
@@ -33,6 +35,8 @@ import {
|
|
|
33
35
|
} from "@fiado/type-kit/bin/transaction";
|
|
34
36
|
import {InvokerUtils} from "../utils/InvokerUtils";
|
|
35
37
|
import {ProviderDocumentUploadRequest} from "@fiado/type-kit/bin/provider";
|
|
38
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
39
|
+
import {CreateExternalBankAccountRequest, CreateExternalBankAccountResponse} from "@fiado/type-kit/bin/bankAccount";
|
|
36
40
|
|
|
37
41
|
@injectable()
|
|
38
42
|
export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi {
|
|
@@ -187,4 +191,31 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
187
191
|
const url = `${this.baseUrl}/transactions/${externalTransactionId}`;
|
|
188
192
|
return await this.httpRequest.get(url);
|
|
189
193
|
}
|
|
194
|
+
|
|
195
|
+
/* ACH BANK ACCOUNTS */
|
|
196
|
+
async getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>> {
|
|
197
|
+
const url = `${this.baseUrl}/bank-accounts/cardholder/${externalUserId}`;
|
|
198
|
+
return await this.httpRequest.get(url);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>> {
|
|
202
|
+
const url = `${this.baseUrl}/bank-accounts/cardholder/${externalUserId}`;
|
|
203
|
+
return await this.httpRequest.post(url, request);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>> {
|
|
207
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
208
|
+
return await this.httpRequest.get(url);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
async deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>> {
|
|
212
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
213
|
+
return await this.httpRequest.delete(url);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
async verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>> {
|
|
217
|
+
const url = `${this.baseUrl}/bank-accounts/${bankAccountId}`;
|
|
218
|
+
// TODO FALTA DEFINIR EL BODY
|
|
219
|
+
return await this.httpRequest.put(url, request);
|
|
220
|
+
}
|
|
190
221
|
}
|
|
@@ -31,6 +31,8 @@ import {
|
|
|
31
31
|
TransactionListResponse
|
|
32
32
|
} from "@fiado/type-kit/bin/transaction";
|
|
33
33
|
import {ProviderDocumentUploadRequest} from "@fiado/type-kit/bin/provider";
|
|
34
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
35
|
+
import {CreateExternalBankAccountRequest, CreateExternalBankAccountResponse} from "@fiado/type-kit/bin/bankAccount";
|
|
34
36
|
|
|
35
37
|
export interface ICentralPaymentsConnectorApi {
|
|
36
38
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
@@ -87,5 +89,13 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
87
89
|
|
|
88
90
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
93
|
+
|
|
94
|
+
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
95
|
+
|
|
96
|
+
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
97
|
+
|
|
98
|
+
deleteACHBankAccount(bankAccountId: string): Promise<FiadoApiResponse<null>>;
|
|
99
|
+
|
|
100
|
+
verifyACHBankAccount(bankAccountId: string, request: any): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
91
101
|
}
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
ActivateBankAccountCardRequest,
|
|
6
6
|
AssignCardRequest,
|
|
7
7
|
CreateBankAccountCardRequest,
|
|
8
|
-
UpdateBankAccountCardRequest
|
|
8
|
+
UpdateBankAccountCardRequest,
|
|
9
|
+
UpdateBankAccountCardResponse
|
|
9
10
|
} from "@fiado/type-kit/bin/card";
|
|
10
11
|
|
|
11
12
|
export interface ITernApi {
|
|
@@ -25,7 +26,7 @@ export interface ITernApi {
|
|
|
25
26
|
|
|
26
27
|
blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
27
28
|
|
|
28
|
-
changePin(request: UpdateBankAccountCardRequest): Promise<
|
|
29
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<UpdateBankAccountCardResponse>;
|
|
29
30
|
|
|
30
31
|
updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
|
|
31
32
|
|