@fiado/api-invoker 1.1.12 → 1.1.13
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 +2 -1
- package/bin/account-fiadoinc/AccountFiadoIncApi.js +4 -0
- package/bin/account-fiadoinc/interfaces/IAccountFiadoIncApi.d.ts +2 -1
- package/bin/account-fiadosa/AccountFiadoSAApi.d.ts +2 -1
- package/bin/account-fiadosa/AccountFiadoSAApi.js +4 -0
- package/bin/account-fiadosa/interfaces/IAccountFiadoSAApi.d.ts +2 -1
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.d.ts +2 -1
- package/bin/account-pagoconfiado/AccountPagoConfiadoApi.js +4 -0
- package/bin/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.d.ts +2 -1
- package/package.json +2 -2
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +6 -1
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +3 -0
- package/src/account-fiadosa/AccountFiadoSAApi.ts +6 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +3 -1
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +6 -1
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAccountFiadoIncApi } from "./interfaces/IAccountFiadoIncApi";
|
|
2
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, ExecuteP2pOperationRequest, ExecutePocketOperationRequest, GetAccountResponse, GetPocketBalanceResponse } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, ExecuteP2pOperationRequest, ExecutePocketOperationRequest, GetAccountResponse, GetPocketBalanceResponse } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
5
5
|
import { OperationEnum } from "@fiado/type-kit/bin/transaction";
|
|
@@ -15,4 +15,5 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
15
15
|
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
16
16
|
executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
17
17
|
deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>;
|
|
18
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
18
19
|
}
|
|
@@ -50,6 +50,10 @@ let AccountFiadoIncApi = class AccountFiadoIncApi {
|
|
|
50
50
|
const url = `${this.baseUrl}pockets/${pocketId}`;
|
|
51
51
|
return await this.httpRequest.delete(url);
|
|
52
52
|
}
|
|
53
|
+
async update(directoryId, data) {
|
|
54
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
55
|
+
return await this.httpRequest.put(url, data);
|
|
56
|
+
}
|
|
53
57
|
};
|
|
54
58
|
AccountFiadoIncApi = __decorate([
|
|
55
59
|
(0, inversify_1.injectable)(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, ExecuteP2pOperationRequest, ExecutePocketOperationRequest, GetAccountResponse, GetPocketBalanceResponse } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, ExecuteP2pOperationRequest, ExecutePocketOperationRequest, GetAccountResponse, GetPocketBalanceResponse } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
3
|
import { OperationEnum } from "@fiado/type-kit/bin/transaction";
|
|
4
4
|
export interface IAccountFiadoIncApi {
|
|
@@ -10,4 +10,5 @@ export interface IAccountFiadoIncApi {
|
|
|
10
10
|
executePocketTransaction(pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
11
11
|
executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
12
12
|
deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>;
|
|
13
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
13
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
-
import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { IHttpRequest } from "@fiado/http-client";
|
|
5
5
|
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
@@ -8,4 +8,5 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
9
|
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
10
10
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
11
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
11
12
|
}
|
|
@@ -26,6 +26,10 @@ let AccountFiadoSAApi = class AccountFiadoSAApi {
|
|
|
26
26
|
const url = `${this.baseUrl}users/${directoryId}`;
|
|
27
27
|
return await this.httpRequest.get(url);
|
|
28
28
|
}
|
|
29
|
+
async update(directoryId, data) {
|
|
30
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
+
return await this.httpRequest.put(url, data);
|
|
32
|
+
}
|
|
29
33
|
};
|
|
30
34
|
AccountFiadoSAApi = __decorate([
|
|
31
35
|
(0, inversify_1.injectable)(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
3
|
export interface IAccountFiadoSAApi {
|
|
4
4
|
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
5
5
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
6
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
6
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAccountPagoConfiadoApi } from "./interfaces/IAccountPagoConfiadoApi";
|
|
2
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { IHttpRequest } from "@fiado/http-client";
|
|
5
5
|
export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
@@ -9,4 +9,5 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
9
9
|
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
10
10
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
11
11
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
12
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
12
13
|
}
|
|
@@ -30,6 +30,10 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
|
|
|
30
30
|
const url = `${this.baseUrl}${accountId}/balance`;
|
|
31
31
|
return await this.httpRequest.put(url, params);
|
|
32
32
|
}
|
|
33
|
+
async update(directoryId, data) {
|
|
34
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
35
|
+
return await this.httpRequest.put(url, data);
|
|
36
|
+
}
|
|
33
37
|
};
|
|
34
38
|
AccountPagoConfiadoApi = __decorate([
|
|
35
39
|
(0, inversify_1.injectable)(),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
1
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
3
|
export interface IAccountPagoConfiadoApi {
|
|
4
4
|
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
|
|
5
5
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
6
6
|
updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
|
|
7
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
7
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.32",
|
|
17
17
|
"@fiado/http-client": "^1.0.2",
|
|
18
18
|
"@fiado/logger": "^1.0.2",
|
|
19
|
-
"@fiado/type-kit": "^1.2.
|
|
19
|
+
"@fiado/type-kit": "^1.2.30",
|
|
20
20
|
"dotenv": "^16.4.5",
|
|
21
21
|
"inversify": "^6.0.2",
|
|
22
22
|
"reflect-metadata": "^0.2.1",
|
|
@@ -2,7 +2,7 @@ import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
|
|
|
2
2
|
import {
|
|
3
3
|
AccountCreateRequest,
|
|
4
4
|
AccountCreateResponse,
|
|
5
|
-
AccountUpdateBalanceRequest, ExecuteP2pOperationRequest,
|
|
5
|
+
AccountUpdateBalanceRequest, AccountUpdateRequest, ExecuteP2pOperationRequest,
|
|
6
6
|
ExecutePocketOperationRequest,
|
|
7
7
|
GetAccountResponse,
|
|
8
8
|
GetPocketBalanceResponse
|
|
@@ -58,4 +58,9 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
|
58
58
|
const url = `${this.baseUrl}pockets/${pocketId}`;
|
|
59
59
|
return await this.httpRequest.delete(url);
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
63
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
64
|
+
return await this.httpRequest.put(url, data);
|
|
65
|
+
}
|
|
61
66
|
}
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AccountCreateRequest,
|
|
3
3
|
AccountCreateResponse,
|
|
4
4
|
AccountUpdateBalanceRequest,
|
|
5
|
+
AccountUpdateRequest,
|
|
5
6
|
ExecuteP2pOperationRequest,
|
|
6
7
|
ExecutePocketOperationRequest,
|
|
7
8
|
GetAccountResponse,
|
|
@@ -27,4 +28,6 @@ export interface IAccountFiadoIncApi {
|
|
|
27
28
|
executeP2pTransaction(request: ExecuteP2pOperationRequest): Promise<ApiGatewayResponse<any>>;
|
|
28
29
|
|
|
29
30
|
deletePocket(pocketId: string): Promise<ApiGatewayResponse<void>>
|
|
31
|
+
|
|
32
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
30
33
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {IAccountFiadoSAApi} from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
-
import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
3
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
4
|
import {inject, injectable} from "inversify";
|
|
5
5
|
import {IHttpRequest} from "@fiado/http-client";
|
|
@@ -20,4 +20,9 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
|
20
20
|
const url = `${this.baseUrl}users/${directoryId}`;
|
|
21
21
|
return await this.httpRequest.get(url);
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
25
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
|
+
return await this.httpRequest.put(url, data);
|
|
27
|
+
}
|
|
23
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
1
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
2
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,4 +7,6 @@ export interface IAccountFiadoSAApi {
|
|
|
7
7
|
|
|
8
8
|
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
9
|
|
|
10
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
|
+
|
|
10
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {IAccountPagoConfiadoApi} from "./interfaces/IAccountPagoConfiadoApi";
|
|
2
|
-
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
3
3
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
4
|
import {inject, injectable} from "inversify";
|
|
5
5
|
import {IHttpRequest} from "@fiado/http-client";
|
|
@@ -25,4 +25,9 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
|
|
|
25
25
|
const url = `${this.baseUrl}${accountId}/balance`;
|
|
26
26
|
return await this.httpRequest.put(url,params);
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
30
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
+
return await this.httpRequest.put(url, data);
|
|
32
|
+
}
|
|
28
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
1
|
+
import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse} from "@fiado/type-kit/bin/account";
|
|
2
2
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -6,4 +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
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
9
11
|
}
|