@fiado/api-invoker 1.3.17 → 1.3.19
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/interfaces/ICardApi.d.ts +3 -4
- 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/interfaces/ICardApi.ts +3 -4
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +14 -0
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +8 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
4
3
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
4
|
export interface ICardApi {
|
|
6
|
-
getByDirectoryId(provider: Provider, directoryId: string
|
|
7
|
-
getById(id: string,
|
|
8
|
-
getByExternalId(
|
|
5
|
+
getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
6
|
+
getById(provider: Provider, id: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
7
|
+
getByExternalId(provider: Provider, externalId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
9
8
|
findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>>;
|
|
10
9
|
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>;
|
|
11
10
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
@@ -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.19",
|
|
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.1",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
4
3
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
4
|
|
|
6
5
|
export interface ICardApi {
|
|
7
6
|
|
|
8
|
-
getByDirectoryId(provider: Provider, directoryId: string
|
|
7
|
+
getByDirectoryId(provider: Provider, directoryId: string): Promise<ApiGatewayResponse<CardResponse>>
|
|
9
8
|
|
|
10
|
-
getById(id: string,
|
|
9
|
+
getById(provider: Provider, id: string, onlyDb?: boolean): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
10
|
|
|
12
|
-
getByExternalId(
|
|
11
|
+
getByExternalId(provider: Provider, externalId: string): Promise<ApiGatewayResponse<CardResponse>>;
|
|
13
12
|
|
|
14
13
|
findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>>;
|
|
15
14
|
|
|
@@ -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>>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
-
export interface ICognitoApi {
|
|
3
|
-
/**
|
|
4
|
-
* Healthcheck for the cognito-connector
|
|
5
|
-
*/
|
|
6
|
-
healthcheck(): Promise<HealthcheckResponse>;
|
|
7
|
-
/**
|
|
8
|
-
* Create a new user in Cognito
|
|
9
|
-
*/
|
|
10
|
-
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Confirm sign-up for a user in Cognito
|
|
13
|
-
*/
|
|
14
|
-
signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Sign in a user
|
|
17
|
-
*/
|
|
18
|
-
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Sign out a user
|
|
21
|
-
*/
|
|
22
|
-
signOut(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Change a user's password
|
|
25
|
-
*/
|
|
26
|
-
changePassword(request: ChangePasswordRequest): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve user details
|
|
29
|
-
*/
|
|
30
|
-
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
31
|
-
/**
|
|
32
|
-
* Refresh a user's tokens
|
|
33
|
-
*/
|
|
34
|
-
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Respond to an auth challenge
|
|
37
|
-
*/
|
|
38
|
-
respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* Reset a user's password
|
|
41
|
-
*/
|
|
42
|
-
resetPassword(request: SetPasswordRequest): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export interface HealthcheckResponse {
|
|
45
|
-
status: string;
|
|
46
|
-
}
|