@fiado/api-invoker 1.0.76 → 1.0.77
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-fiadoinc/AccountFiadoIncApi.d.ts +1 -0
- package/bin/account-fiadoinc/AccountFiadoIncApi.js +4 -0
- package/bin/account-fiadoinc/interfaces/IAccountFiadoIncApi.d.ts +1 -0
- package/package.json +1 -1
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +5 -0
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +2 -0
|
@@ -11,5 +11,6 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
11
11
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
12
12
|
getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
13
13
|
updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>>;
|
|
14
|
+
getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
14
15
|
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
15
16
|
}
|
|
@@ -34,6 +34,10 @@ let AccountFiadoIncApi = class AccountFiadoIncApi {
|
|
|
34
34
|
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
35
35
|
return await this.httpRequest.put(url, request);
|
|
36
36
|
}
|
|
37
|
+
async getPocketBalanceById(pocketId) {
|
|
38
|
+
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
39
|
+
return await this.httpRequest.get(url);
|
|
40
|
+
}
|
|
37
41
|
async executePocketTransaction(pocketId, operation, request) {
|
|
38
42
|
const url = `${this.baseUrl}/pockets/${pocketId}/${operation}`;
|
|
39
43
|
return await this.httpRequest.post(url, request);
|
|
@@ -6,5 +6,6 @@ export interface IAccountFiadoIncApi {
|
|
|
6
6
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
7
7
|
getPocketBalance(directoryId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
8
8
|
updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>>;
|
|
9
|
+
getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
9
10
|
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
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",
|
|
@@ -39,6 +39,11 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
39
39
|
return await this.httpRequest.put(url, request);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
async getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>> {
|
|
43
|
+
const url = `${this.baseUrl}/pockets/${pocketId}/balance`;
|
|
44
|
+
return await this.httpRequest.get(url);
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
async executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>> {
|
|
43
48
|
const url = `${this.baseUrl}/pockets/${pocketId}/${operation}`;
|
|
44
49
|
return await this.httpRequest.post(url, request);
|
|
@@ -19,5 +19,7 @@ export interface IAccountFiadoIncApi {
|
|
|
19
19
|
|
|
20
20
|
updatePocketBalance(pocketId: string, request: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<null>>;
|
|
21
21
|
|
|
22
|
+
getPocketBalanceById(pocketId: string): Promise<ApiGatewayResponse<GetPocketBalanceResponse>>;
|
|
23
|
+
|
|
22
24
|
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
23
25
|
}
|