@fiado/api-invoker 1.2.79 → 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/centralPayments/CentralPaymentsConnectorApi.d.ts +7 -0
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +22 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +7 -0
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +32 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +11 -1
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
|
@@ -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
|
}
|
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"
|
|
@@ -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
|
}
|
|
@@ -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
|
-
}
|