@fiado/api-invoker 1.3.18 → 1.3.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.
- package/bin/card/CardApi.d.ts +1 -1
- package/bin/card/CardApi.js +2 -2
- package/bin/card/interfaces/ICardApi.d.ts +1 -1
- package/bin/centralPayments/CentralPaymentsConnectorApi.d.ts +4 -2
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +8 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +4 -2
- package/package.json +2 -2
- package/src/card/CardApi.ts +2 -2
- package/src/card/interfaces/ICardApi.ts +1 -1
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +14 -0
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +8 -0
package/bin/card/CardApi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class CardApi implements ICardApi {
|
|
|
7
7
|
private httpRequest;
|
|
8
8
|
private readonly baseUrl;
|
|
9
9
|
constructor(httpRequest: IHttpRequest);
|
|
10
|
-
getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
10
|
+
getByDirectoryId(provider: Provider, directoryId: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
11
|
getById(provider: Provider, id: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
12
12
|
getByExternalId(provider: Provider, externalId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
13
13
|
evaluateAccountLevelUpdate(directoryId: string): Promise<void>;
|
package/bin/card/CardApi.js
CHANGED
|
@@ -19,8 +19,8 @@ let CardApi = class CardApi {
|
|
|
19
19
|
this.httpRequest = httpRequest;
|
|
20
20
|
this.baseUrl = process.env.CARD_LAMBDA_URL || "";
|
|
21
21
|
}
|
|
22
|
-
async getByDirectoryId(provider, directoryId) {
|
|
23
|
-
const url = `${this.baseUrl}${provider}/${directoryId}/find`;
|
|
22
|
+
async getByDirectoryId(provider, directoryId, onlyDb = false) {
|
|
23
|
+
const url = `${this.baseUrl}${provider}/${directoryId}/find?onlyDb=${onlyDb}`;
|
|
24
24
|
return await this.httpRequest.get(url);
|
|
25
25
|
}
|
|
26
26
|
async getById(provider, id, onlyDb = false) {
|
|
@@ -2,7 +2,7 @@ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
|
2
2
|
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
3
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
4
4
|
export interface ICardApi {
|
|
5
|
-
getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
5
|
+
getByDirectoryId(provider: Provider, directoryId: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
6
6
|
getById(provider: Provider, id: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
7
7
|
getByExternalId(provider: Provider, externalId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
8
8
|
findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>>;
|
|
@@ -5,9 +5,9 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
|
|
|
5
5
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
6
6
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
7
7
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, ReplaceBankAccountCardRequest, ReplaceBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
8
|
-
import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
8
|
+
import { AchTransactionRequest, AchTransactionResponse, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
9
9
|
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
10
|
-
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
10
|
+
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, ProviderTransactionReversalRequest, ProviderTransactionReversalResponse, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
11
11
|
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
12
12
|
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
13
13
|
export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi {
|
|
@@ -46,6 +46,8 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
46
46
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
47
47
|
executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
|
|
48
48
|
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
49
|
+
executeAchTransaction(request: AchTransactionRequest): Promise<FiadoApiResponse<AchTransactionResponse>>;
|
|
50
|
+
executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
|
|
49
51
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
50
52
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
51
53
|
getACHBankAccountDetail(bankAccountId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse>>;
|
|
@@ -153,6 +153,14 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
153
153
|
const url = `${this.baseUrl}/transactions/pocket/transfer`;
|
|
154
154
|
return await this.httpRequest.post(url, request);
|
|
155
155
|
}
|
|
156
|
+
async executeAchTransaction(request) {
|
|
157
|
+
const url = `${this.baseUrl}/transactions/ach/transfer`;
|
|
158
|
+
return await this.httpRequest.post(url, request);
|
|
159
|
+
}
|
|
160
|
+
async executeFinancialOperationReversal(request) {
|
|
161
|
+
const url = `${this.baseUrl}/transactions/reversal`;
|
|
162
|
+
return await this.httpRequest.post(url, request);
|
|
163
|
+
}
|
|
156
164
|
/* ACH BANK ACCOUNTS */
|
|
157
165
|
async getCardholderACHBankAccounts(externalUserId) {
|
|
158
166
|
const url = `${this.baseUrl}/ach/bank-accounts/cardholders/${externalUserId}`;
|
|
@@ -4,9 +4,9 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
|
|
|
4
4
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
5
5
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
6
6
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, ReplaceBankAccountCardRequest, ReplaceBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
7
|
-
import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
7
|
+
import { AchTransactionRequest, AchTransactionResponse, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
8
8
|
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
9
|
-
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
9
|
+
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, ProviderTransactionReversalRequest, ProviderTransactionReversalResponse, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
10
10
|
export interface ICentralPaymentsConnectorApi {
|
|
11
11
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
12
12
|
createCardholder(request: CreateBankAccountUserRequest): Promise<FiadoApiResponse<CreateBankAccountUserResponse>>;
|
|
@@ -39,6 +39,8 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
39
39
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
40
40
|
executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
|
|
41
41
|
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
42
|
+
executeAchTransaction(request: AchTransactionRequest): Promise<FiadoApiResponse<AchTransactionResponse>>;
|
|
43
|
+
executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
|
|
42
44
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
43
45
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|
|
44
46
|
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.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.40",
|
|
17
17
|
"@fiado/http-client": "^1.0.5",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.
|
|
19
|
+
"@fiado/type-kit": "^1.9.2",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
package/src/card/CardApi.ts
CHANGED
|
@@ -13,9 +13,9 @@ export class CardApi implements ICardApi {
|
|
|
13
13
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
async getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>> {
|
|
16
|
+
async getByDirectoryId(provider: Provider, directoryId: string, onlyDb: boolean = false): Promise<ApiGatewayResponse<CardResponse>> {
|
|
17
17
|
|
|
18
|
-
const url = `${this.baseUrl}${provider}/${directoryId}/find`;
|
|
18
|
+
const url = `${this.baseUrl}${provider}/${directoryId}/find?onlyDb=${onlyDb}`;
|
|
19
19
|
return await this.httpRequest.get(url);
|
|
20
20
|
|
|
21
21
|
}
|
|
@@ -4,7 +4,7 @@ import { Provider } from "@fiado/type-kit/bin/provider";
|
|
|
4
4
|
|
|
5
5
|
export interface ICardApi {
|
|
6
6
|
|
|
7
|
-
getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>>
|
|
7
|
+
getByDirectoryId(provider: Provider, directoryId: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>
|
|
8
8
|
|
|
9
9
|
getById(provider: Provider, id: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
10
10
|
|
|
@@ -31,6 +31,8 @@ import {
|
|
|
31
31
|
UpdateBankAccountCardResponse
|
|
32
32
|
} from "@fiado/type-kit/bin/card";
|
|
33
33
|
import {
|
|
34
|
+
AchTransactionRequest,
|
|
35
|
+
AchTransactionResponse,
|
|
34
36
|
HealthcheckResponse,
|
|
35
37
|
OOWQuestionsResponse,
|
|
36
38
|
SubmitOOWQuestionAnswersRequest
|
|
@@ -39,6 +41,8 @@ import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@
|
|
|
39
41
|
import {
|
|
40
42
|
CentralPaymentsQueryParams,
|
|
41
43
|
CentralPaymentsTransactionItem,
|
|
44
|
+
ProviderTransactionReversalRequest,
|
|
45
|
+
ProviderTransactionReversalResponse,
|
|
42
46
|
TransactionListResponse
|
|
43
47
|
} from "@fiado/type-kit/bin/transaction";
|
|
44
48
|
import { inject, injectable } from "inversify";
|
|
@@ -219,6 +223,16 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
219
223
|
return await this.httpRequest.post(url, request);
|
|
220
224
|
}
|
|
221
225
|
|
|
226
|
+
async executeAchTransaction(request: AchTransactionRequest): Promise<FiadoApiResponse<AchTransactionResponse>> {
|
|
227
|
+
const url = `${this.baseUrl}/transactions/ach/transfer`;
|
|
228
|
+
return await this.httpRequest.post(url, request);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
async executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>> {
|
|
232
|
+
const url = `${this.baseUrl}/transactions/reversal`;
|
|
233
|
+
return await this.httpRequest.post(url, request);
|
|
234
|
+
}
|
|
235
|
+
|
|
222
236
|
/* ACH BANK ACCOUNTS */
|
|
223
237
|
async getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>> {
|
|
224
238
|
const url = `${this.baseUrl}/ach/bank-accounts/cardholders/${externalUserId}`;
|
|
@@ -30,6 +30,8 @@ import {
|
|
|
30
30
|
UpdateBankAccountCardResponse
|
|
31
31
|
} from "@fiado/type-kit/bin/card";
|
|
32
32
|
import {
|
|
33
|
+
AchTransactionRequest,
|
|
34
|
+
AchTransactionResponse,
|
|
33
35
|
HealthcheckResponse,
|
|
34
36
|
OOWQuestionsResponse,
|
|
35
37
|
SubmitOOWQuestionAnswersRequest
|
|
@@ -38,6 +40,8 @@ import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@
|
|
|
38
40
|
import {
|
|
39
41
|
CentralPaymentsQueryParams,
|
|
40
42
|
CentralPaymentsTransactionItem,
|
|
43
|
+
ProviderTransactionReversalRequest,
|
|
44
|
+
ProviderTransactionReversalResponse,
|
|
41
45
|
TransactionListResponse
|
|
42
46
|
} from "@fiado/type-kit/bin/transaction";
|
|
43
47
|
|
|
@@ -104,6 +108,10 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
104
108
|
|
|
105
109
|
executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
|
|
106
110
|
|
|
111
|
+
executeAchTransaction(request: AchTransactionRequest): Promise<FiadoApiResponse<AchTransactionResponse>>;
|
|
112
|
+
|
|
113
|
+
executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
|
|
114
|
+
|
|
107
115
|
getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
|
|
108
116
|
|
|
109
117
|
createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
|