@fiado/api-invoker 1.2.56 → 1.2.58
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 +2 -1
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +4 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +2 -1
- package/bin/tern/api/TernApi.d.ts +1 -0
- package/bin/tern/api/TernApi.js +4 -0
- package/bin/tern/api/interfaces/ITernApi.d.ts +1 -0
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +6 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +3 -1
- package/src/tern/api/TernApi.ts +5 -0
- package/src/tern/api/interfaces/ITernApi.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
3
|
+
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
4
4
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
5
5
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
6
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
@@ -29,6 +29,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
29
29
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
30
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
31
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
32
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
32
33
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
33
34
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
34
35
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -98,6 +98,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
98
98
|
const param = includeSecondary ? `?includeSecondary=${includeSecondary}` : null;
|
|
99
99
|
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
100
100
|
}
|
|
101
|
+
async getAccountsByUserId(externalUserId) {
|
|
102
|
+
const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
|
|
103
|
+
return await this.httpRequest.get(url);
|
|
104
|
+
}
|
|
101
105
|
async generateCardsInBatch(request) {
|
|
102
106
|
const url = `${this.baseUrl}/cards/batch`;
|
|
103
107
|
return await this.httpRequest.post(url, request);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
3
3
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
@@ -22,6 +22,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
22
22
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
23
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
24
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
25
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
25
26
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
26
27
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
27
28
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -24,4 +24,5 @@ export default class TernApi implements ITernApi {
|
|
|
24
24
|
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
25
25
|
getAccountTransactions(accountId: string): Promise<any>;
|
|
26
26
|
getCardsByUserId(externalUserId: string): Promise<any>;
|
|
27
|
+
getAccountsByUserId(externalUserId: string): Promise<any>;
|
|
27
28
|
}
|
package/bin/tern/api/TernApi.js
CHANGED
|
@@ -112,6 +112,10 @@ let TernApi = class TernApi {
|
|
|
112
112
|
const url = `${this.baseUrl}users/${externalUserId}/cards`;
|
|
113
113
|
return await this.httpRequest.get(url);
|
|
114
114
|
}
|
|
115
|
+
async getAccountsByUserId(externalUserId) {
|
|
116
|
+
const url = `${this.baseUrl}users/${externalUserId}/accounts`;
|
|
117
|
+
return await this.httpRequest.get(url);
|
|
118
|
+
}
|
|
115
119
|
};
|
|
116
120
|
TernApi = __decorate([
|
|
117
121
|
(0, inversify_1.injectable)(),
|
|
@@ -20,4 +20,5 @@ export interface ITernApi {
|
|
|
20
20
|
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
21
21
|
getAccountTransactions(accountId: string): Promise<any>;
|
|
22
22
|
getCardsByUserId(externalUserId: string): Promise<any>;
|
|
23
|
+
getAccountsByUserId(externalUserId: string): Promise<any>;
|
|
23
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.58",
|
|
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.26",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -3,7 +3,7 @@ import { inject, injectable } from "inversify";
|
|
|
3
3
|
import { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
import {
|
|
5
5
|
CreateBankAccountUserRequest,
|
|
6
|
-
CreateBankAccountUserResponse,
|
|
6
|
+
CreateBankAccountUserResponse, GetBankAccountResponse,
|
|
7
7
|
GetBankAccountUserResponse,
|
|
8
8
|
UpdateBankAccountUserRequest
|
|
9
9
|
} from "@fiado/type-kit/bin/account";
|
|
@@ -139,6 +139,11 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
139
139
|
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
async getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>> {
|
|
143
|
+
const url = `${this.baseUrl}/accounts/cardholders/${externalUserId}`;
|
|
144
|
+
return await this.httpRequest.get(url);
|
|
145
|
+
}
|
|
146
|
+
|
|
142
147
|
async generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>> {
|
|
143
148
|
const url = `${this.baseUrl}/cards/batch`;
|
|
144
149
|
return await this.httpRequest.post(url, request);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreateBankAccountUserRequest,
|
|
3
|
-
CreateBankAccountUserResponse,
|
|
3
|
+
CreateBankAccountUserResponse, GetBankAccountResponse,
|
|
4
4
|
GetBankAccountUserResponse,
|
|
5
5
|
UpdateBankAccountUserRequest
|
|
6
6
|
} from "@fiado/type-kit/bin/account";
|
|
@@ -66,6 +66,8 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
66
66
|
|
|
67
67
|
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
68
68
|
|
|
69
|
+
getAccountsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountResponse[]>>;
|
|
70
|
+
|
|
69
71
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
70
72
|
|
|
71
73
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
package/src/tern/api/TernApi.ts
CHANGED
|
@@ -140,4 +140,9 @@ export default class TernApi implements ITernApi {
|
|
|
140
140
|
const url = `${this.baseUrl}users/${externalUserId}/cards`;
|
|
141
141
|
return await this.httpRequest.get(url);
|
|
142
142
|
}
|
|
143
|
+
|
|
144
|
+
async getAccountsByUserId(externalUserId: string): Promise<any> {
|
|
145
|
+
const url = `${this.baseUrl}users/${externalUserId}/accounts`;
|
|
146
|
+
return await this.httpRequest.get(url);
|
|
147
|
+
}
|
|
143
148
|
}
|