@fiado/api-invoker 1.4.9 → 1.5.0

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.
@@ -16,4 +16,5 @@ export declare class GroupApi implements IGroupApi {
16
16
  pageSize?: number;
17
17
  }): Promise<any>;
18
18
  members(params: GroupAddDirectoryRequest): Promise<any>;
19
+ findById(id: string): Promise<any>;
19
20
  }
@@ -61,6 +61,10 @@ let GroupApi = class GroupApi {
61
61
  const url = `${this.baseUrl}members`;
62
62
  return await this.httpRequest.post(`${url}`, params);
63
63
  }
64
+ async findById(id) {
65
+ const url = `${this.baseUrl}groups/getById/${id}`;
66
+ return await this.httpRequest.get(`${url}`);
67
+ }
64
68
  };
65
69
  exports.GroupApi = GroupApi;
66
70
  exports.GroupApi = GroupApi = __decorate([
@@ -25,4 +25,10 @@ export interface IGroupApi {
25
25
  directory: string;
26
26
  groups: GroupResponse[];
27
27
  }[]>>;
28
+ /**
29
+ * Buscar grupo por id
30
+ * @param categoryId ID del grupo.
31
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
32
+ */
33
+ findById(id: string): Promise<FiadoApiResponse<GroupResponse>>;
28
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.4.9",
3
+ "version": "1.5.0",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -62,4 +62,9 @@ export class GroupApi implements IGroupApi {
62
62
  const url = `${this.baseUrl}members`;
63
63
  return await this.httpRequest.post(`${url}`,params);
64
64
  }
65
+
66
+ async findById(id: string): Promise<any> {
67
+ const url = `${this.baseUrl}groups/getById/${id}`;
68
+ return await this.httpRequest.get(`${url}`);
69
+ }
65
70
  }
@@ -29,4 +29,12 @@ export interface IGroupApi {
29
29
  */
30
30
  getMembershipDirectoryUserList(directories:string[], pageSize:number,index?:string): Promise<FiadoApiResponse<{directory:string,groups:GroupResponse[]}[]>>;
31
31
 
32
+
33
+
34
+ /**
35
+ * Buscar grupo por id
36
+ * @param categoryId ID del grupo.
37
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
38
+ */
39
+ findById(id: string): Promise<FiadoApiResponse<GroupResponse>>;
32
40
  }