@fiado/api-invoker 1.0.28 → 1.0.30
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/container.config.js +2 -0
- package/bin/pomelo/api/PomeloApi.d.ts +4 -5
- package/bin/pomelo/api/interfaces/IPomeloApi.d.ts +4 -5
- package/package.json +1 -1
- package/src/address/AddressApi.ts +0 -1
- package/src/container.config.ts +2 -0
- package/src/pomelo/api/PomeloApi.ts +4 -5
- package/src/pomelo/api/interfaces/IPomeloApi.ts +4 -5
package/bin/container.config.js
CHANGED
|
@@ -10,9 +10,11 @@ const identity_1 = require("./identity");
|
|
|
10
10
|
const NotificationMessagePublisher_1 = __importDefault(require("./notificationMessages/queue/NotificationMessagePublisher"));
|
|
11
11
|
const TernApi_1 = __importDefault(require("./tern/api/TernApi"));
|
|
12
12
|
const PomeloApi_1 = __importDefault(require("./pomelo/api/PomeloApi"));
|
|
13
|
+
const address_1 = require("./address");
|
|
13
14
|
exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
|
|
14
15
|
bind("IDirectoryApi").to(directory_1.DirectoryApi);
|
|
15
16
|
bind("IIdentityApi").to(identity_1.IdentityApi);
|
|
17
|
+
bind("IAddressApi").to(address_1.AddressApi);
|
|
16
18
|
bind("ITernApi").to(TernApi_1.default);
|
|
17
19
|
bind("IPomeloApi").to(PomeloApi_1.default);
|
|
18
20
|
bind("INotificationMessagesPublisher").to(NotificationMessagePublisher_1.default);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IPomeloApi } from "./interfaces/IPomeloApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CreateBankAccountUserRequest,
|
|
4
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
+
import { CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
5
4
|
export default class PomeloApi implements IPomeloApi {
|
|
6
5
|
private httpRequest;
|
|
7
6
|
private readonly baseUrl;
|
|
8
7
|
constructor(httpRequest: IHttpRequest);
|
|
9
|
-
createUser(request: CreateBankAccountUserRequest): Promise<
|
|
10
|
-
getUserById(externalUserId: string): Promise<
|
|
11
|
-
updateUser(object: UpdateBankAccountUserRequest): Promise<
|
|
8
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
9
|
+
getUserById(externalUserId: string): Promise<any>;
|
|
10
|
+
updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
|
|
12
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CreateBankAccountUserRequest,
|
|
2
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
1
|
+
import { CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
3
2
|
export interface IPomeloApi {
|
|
4
|
-
updateUser(object: UpdateBankAccountUserRequest): Promise<
|
|
5
|
-
getUserById(externalUserId: string): Promise<
|
|
6
|
-
createUser(request: CreateBankAccountUserRequest): Promise<
|
|
3
|
+
updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
|
|
4
|
+
getUserById(externalUserId: string): Promise<any>;
|
|
5
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
7
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
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",
|
|
@@ -7,7 +7,6 @@ import { IAddressApi } from "./interfaces/IAddressApi";
|
|
|
7
7
|
@injectable()
|
|
8
8
|
export class AddressApi implements IAddressApi {
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
private readonly baseUrl = process.env.ADDRESS_LAMBDA_URL || "";
|
|
12
11
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
13
12
|
|
package/src/container.config.ts
CHANGED
|
@@ -7,10 +7,12 @@ import {ITernApi} from "./tern";
|
|
|
7
7
|
import TernApi from "./tern/api/TernApi";
|
|
8
8
|
import { IPomeloApi } from "./pomelo";
|
|
9
9
|
import PomeloApi from "./pomelo/api/PomeloApi";
|
|
10
|
+
import { AddressApi, IAddressApi } from "./address";
|
|
10
11
|
|
|
11
12
|
export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
|
|
12
13
|
bind<IDirectoryApi>("IDirectoryApi").to(DirectoryApi);
|
|
13
14
|
bind<IIdentityApi>("IIdentityApi").to(IdentityApi);
|
|
15
|
+
bind<IAddressApi>("IAddressApi").to(AddressApi);
|
|
14
16
|
bind<ITernApi>("ITernApi").to(TernApi);
|
|
15
17
|
bind<IPomeloApi>("IPomeloApi").to(PomeloApi);
|
|
16
18
|
bind<INotificationMessagesPublisher>("INotificationMessagesPublisher").to(NotificationMessagePublisher);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {IPomeloApi } from "./interfaces/IPomeloApi";
|
|
2
2
|
import {inject, injectable} from "inversify";
|
|
3
3
|
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import {CreateBankAccountUserRequest,
|
|
5
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
4
|
+
import {CreateBankAccountUserRequest, UpdateBankAccountUserRequest} from "@fiado/type-kit/bin/account";
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
@injectable()
|
|
@@ -16,17 +15,17 @@ export default class PomeloApi implements IPomeloApi {
|
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
//USER
|
|
19
|
-
async createUser(request: CreateBankAccountUserRequest): Promise<
|
|
18
|
+
async createUser(request: CreateBankAccountUserRequest): Promise<any> {
|
|
20
19
|
const url: string = `${this.baseUrl}users/create`;
|
|
21
20
|
return await this.httpRequest.post(url, request);
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
public async getUserById(externalUserId: string): Promise<
|
|
23
|
+
public async getUserById(externalUserId: string): Promise<any> {
|
|
25
24
|
const url: string = `${this.baseUrl}users/${externalUserId}`;
|
|
26
25
|
return await this.httpRequest.get(url);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
public async updateUser(object: UpdateBankAccountUserRequest): Promise<
|
|
28
|
+
public async updateUser(object: UpdateBankAccountUserRequest): Promise<any> {
|
|
30
29
|
const url: string = `${this.baseUrl}/users/${object.id}`;
|
|
31
30
|
return await this.httpRequest.put(url, object);
|
|
32
31
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserRequest, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse} from "@fiado/type-kit/bin/account";
|
|
2
|
-
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
2
|
|
|
4
3
|
export interface IPomeloApi {
|
|
5
|
-
|
|
6
|
-
updateUser(object: UpdateBankAccountUserRequest): Promise<
|
|
7
|
-
getUserById(externalUserId: string): Promise<
|
|
8
|
-
createUser(request: CreateBankAccountUserRequest): Promise<
|
|
4
|
+
|
|
5
|
+
updateUser(object: UpdateBankAccountUserRequest): Promise<any>
|
|
6
|
+
getUserById(externalUserId: string): Promise<any>
|
|
7
|
+
createUser(request: CreateBankAccountUserRequest): Promise<any>;
|
|
9
8
|
}
|