@fiado/api-invoker 1.0.28 → 1.0.29

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.
@@ -1,12 +1,11 @@
1
1
  import { IPomeloApi } from "./interfaces/IPomeloApi";
2
2
  import { IHttpRequest } from "@fiado/http-client";
3
- import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse } from "@fiado/type-kit/bin/account";
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<ApiGatewayResponse<CreateBankAccountUserResponse>>;
10
- getUserById(externalUserId: string): Promise<ApiGatewayResponse<GetBankAccountUserResponse>>;
11
- updateUser(object: UpdateBankAccountUserRequest): Promise<ApiGatewayResponse<UpdateBankAccountUserResponse>>;
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, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse } from "@fiado/type-kit/bin/account";
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<ApiGatewayResponse<UpdateBankAccountUserResponse>>;
5
- getUserById(externalUserId: string): Promise<ApiGatewayResponse<GetBankAccountUserResponse>>;
6
- createUser(request: CreateBankAccountUserRequest): Promise<ApiGatewayResponse<CreateBankAccountUserResponse>>;
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.28",
3
+ "version": "1.0.29",
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",
@@ -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, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest, UpdateBankAccountUserResponse} from "@fiado/type-kit/bin/account";
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<ApiGatewayResponse<CreateBankAccountUserResponse>> {
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<ApiGatewayResponse<GetBankAccountUserResponse>> {
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<ApiGatewayResponse<UpdateBankAccountUserResponse>> {
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<ApiGatewayResponse<UpdateBankAccountUserResponse>>
7
- getUserById(externalUserId: string): Promise<ApiGatewayResponse<GetBankAccountUserResponse>>
8
- createUser(request: CreateBankAccountUserRequest): Promise<ApiGatewayResponse<CreateBankAccountUserResponse>>;
4
+
5
+ updateUser(object: UpdateBankAccountUserRequest): Promise<any>
6
+ getUserById(externalUserId: string): Promise<any>
7
+ createUser(request: CreateBankAccountUserRequest): Promise<any>;
9
8
  }