@fiado/api-invoker 1.1.35 → 1.1.37
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-pagoconfiado/AccountPagoConfiadoApi.d.ts +1 -0
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.js +4 -0
- package/bin/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.d.ts +1 -0
- package/bin/tern/api/TernApi.d.ts +1 -1
- package/bin/tern/api/TernApi.js +2 -2
- package/package.json +1 -1
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +5 -0
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +1 -1
- package/src/tern/api/TernApi.ts +2 -2
|
@@ -10,4 +10,5 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
10
10
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
11
11
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
12
12
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
13
|
+
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
13
14
|
}
|
|
@@ -34,6 +34,10 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
|
|
|
34
34
|
const url = `${this.baseUrl}users/${directoryId}`;
|
|
35
35
|
return await this.httpRequest.put(url, data);
|
|
36
36
|
}
|
|
37
|
+
async updateByAccountNumber(accountNumber, data) {
|
|
38
|
+
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
39
|
+
return await this.httpRequest.put(url, data);
|
|
40
|
+
}
|
|
37
41
|
};
|
|
38
42
|
AccountPagoConfiadoApi = __decorate([
|
|
39
43
|
(0, inversify_1.injectable)(),
|
|
@@ -5,4 +5,5 @@ export interface IAccountPagoConfiadoApi {
|
|
|
5
5
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
6
6
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
7
7
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
8
|
+
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
8
9
|
}
|
|
@@ -19,7 +19,7 @@ export default class TernApi implements ITernApi {
|
|
|
19
19
|
activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
|
|
20
20
|
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
21
21
|
p2pTransfer(request: BankAccountP2pTransferRequest): Promise<any>;
|
|
22
|
-
getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean): Promise<any>;
|
|
22
|
+
getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail?: boolean, raw?: boolean): Promise<any>;
|
|
23
23
|
getCardTransactions(externalUserId: string, page: number, pageSize: number): Promise<any>;
|
|
24
24
|
getAccountTransactions(accountId: string): Promise<any>;
|
|
25
25
|
}
|
package/bin/tern/api/TernApi.js
CHANGED
|
@@ -74,9 +74,9 @@ let TernApi = class TernApi {
|
|
|
74
74
|
return await this.httpRequest.patch(url, request);
|
|
75
75
|
}
|
|
76
76
|
//transactions
|
|
77
|
-
async getTransactions(accountId, page, pageSize, startDate, endDate, detail = false) {
|
|
77
|
+
async getTransactions(accountId, page, pageSize, startDate, endDate, detail = false, raw = false) {
|
|
78
78
|
try {
|
|
79
|
-
let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}`;
|
|
79
|
+
let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}&raw=${raw}`;
|
|
80
80
|
// Verificar si pageSize es válido y agregarlo
|
|
81
81
|
if (pageSize != null) {
|
|
82
82
|
url += `&pageSize=${encodeURIComponent(pageSize)}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.37",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -30,4 +30,9 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
30
30
|
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
31
|
return await this.httpRequest.put(url, data);
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
async updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
35
|
+
const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
|
|
36
|
+
return await this.httpRequest.put(url, data);
|
|
37
|
+
}
|
|
33
38
|
}
|
|
@@ -6,6 +6,6 @@ export interface IAccountPagoConfiadoApi {
|
|
|
6
6
|
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
7
7
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
8
8
|
updateAccountBalance(accountId:string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>
|
|
9
|
-
|
|
10
9
|
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
10
|
+
updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
11
|
}
|
package/src/tern/api/TernApi.ts
CHANGED
|
@@ -95,9 +95,9 @@ export default class TernApi implements ITernApi {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
//transactions
|
|
98
|
-
async getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail: boolean = false): Promise<any> {
|
|
98
|
+
async getTransactions(accountId: string, page: number, pageSize?: number | null, startDate?: string | null, endDate?: string | null, detail: boolean = false, raw: boolean = false): Promise<any> {
|
|
99
99
|
try {
|
|
100
|
-
let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}`;
|
|
100
|
+
let url = `${this.baseUrl}users/${accountId}/v2/transactions?page=${page}&detail=${detail}&raw=${raw}`;
|
|
101
101
|
|
|
102
102
|
// Verificar si pageSize es válido y agregarlo
|
|
103
103
|
if (pageSize != null) {
|