@fiado/api-invoker 1.0.8 → 1.0.10

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.
@@ -4,7 +4,5 @@ export declare class DirectoryApi implements IDirectoryApi {
4
4
  private httpRequest;
5
5
  private readonly baseUrl;
6
6
  constructor(httpRequest: IHttpRequest);
7
- getByIds(ids: string[]): Promise<Array<{
8
- [key: string]: any;
9
- }>>;
7
+ getByIds(ids: string[]): Promise<Array<any>>;
10
8
  }
@@ -30,7 +30,7 @@ let DirectoryApi = class DirectoryApi {
30
30
  }
31
31
  const url = `${this.baseUrl}?${ids.map(id => `directoryId=${encodeURIComponent(id)}`).join('&')}`;
32
32
  const operationName = "getUserInfoByIds";
33
- return await this.httpRequest.post(`${url}`, {}, { 'operationName': operationName });
33
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
34
34
  }
35
35
  };
36
36
  exports.DirectoryApi = DirectoryApi;
@@ -9,7 +9,5 @@ export interface IDirectoryApi {
9
9
  * Puede devolver un arreglo vacío si no se encuentran coincidencias.
10
10
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
11
11
  */
12
- getByIds(ids: string[]): Promise<Array<{
13
- [key: string]: any;
14
- }>>;
12
+ getByIds(ids: string[]): Promise<Array<any>>;
15
13
  }
@@ -9,7 +9,5 @@ export interface IIdentityApi {
9
9
  * Puede devolver un arreglo vacío si no se encuentran coincidencias.
10
10
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
11
11
  */
12
- getPeopleByIds(ids: string[]): Promise<Array<{
13
- [key: string]: any;
14
- }>>;
12
+ getPeopleByIds(ids: string[]): Promise<Array<any>>;
15
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
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",
@@ -2,7 +2,7 @@ import { inject, injectable } from "inversify";
2
2
  import { IDirectoryApi } from "./interfaces/IDirectoryApi";
3
3
  import { IHttpRequest } from "@fiado/http-client";
4
4
  import dotenv from 'dotenv';
5
- dotenv.config();
5
+ dotenv.config();
6
6
 
7
7
  @injectable()
8
8
  export class DirectoryApi implements IDirectoryApi {
@@ -11,7 +11,7 @@ export class DirectoryApi implements IDirectoryApi {
11
11
 
12
12
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
13
13
 
14
- public async getByIds(ids: string[]): Promise<Array<{ [key: string]: any }>> {
14
+ public async getByIds(ids: string[]): Promise<Array<any>> {
15
15
 
16
16
  if (ids.length === 0) {
17
17
  throw new Error("At least one directory ID is required.")
@@ -20,6 +20,6 @@ export class DirectoryApi implements IDirectoryApi {
20
20
  const url = `${this.baseUrl}?${ids.map(id => `directoryId=${encodeURIComponent(id)}`).join('&')}`;
21
21
  const operationName = "getUserInfoByIds";
22
22
 
23
- return await this.httpRequest.post(`${url}`, {}, { 'operationName': operationName } );
23
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
24
24
  }
25
25
  }
@@ -10,5 +10,5 @@ export interface IDirectoryApi {
10
10
  * Puede devolver un arreglo vacío si no se encuentran coincidencias.
11
11
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
12
12
  */
13
- getByIds(ids: string[]): Promise<Array<{[key: string]: any}>>;
13
+ getByIds(ids: string[]): Promise<Array<any>>;
14
14
  }
@@ -10,5 +10,5 @@ export interface IIdentityApi {
10
10
  * Puede devolver un arreglo vacío si no se encuentran coincidencias.
11
11
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
12
12
  */
13
- getPeopleByIds(ids: string[]): Promise<Array<{[key: string]: any}>>;
13
+ getPeopleByIds(ids: string[]): Promise<Array<any>>;
14
14
  }