@fiado/api-invoker 1.1.6 → 1.1.7
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/group/GroupApi.d.ts
CHANGED
package/bin/group/GroupApi.js
CHANGED
|
@@ -24,6 +24,10 @@ let GroupApi = class GroupApi {
|
|
|
24
24
|
this.httpRequest = httpRequest;
|
|
25
25
|
this.baseUrl = process.env.FIADO_GROUP_LAMBDA_URL || "";
|
|
26
26
|
}
|
|
27
|
+
async findByCategory(categoryId) {
|
|
28
|
+
const url = `${this.baseUrl}groups/categories/${categoryId}`;
|
|
29
|
+
return await this.httpRequest.get(`${url}`);
|
|
30
|
+
}
|
|
27
31
|
async members(params) {
|
|
28
32
|
const url = `${this.baseUrl}members`;
|
|
29
33
|
return await this.httpRequest.post(`${url}`, params);
|
|
@@ -9,4 +9,10 @@ export interface IGroupApi {
|
|
|
9
9
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
10
10
|
*/
|
|
11
11
|
members(params: GroupAddDirectoryRequest): Promise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Buscar grupos por categoria.
|
|
14
|
+
* @param categoryId ID de la categoria.
|
|
15
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
16
|
+
*/
|
|
17
|
+
findByCategory(categoryId: string): Promise<any>;
|
|
12
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
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",
|
package/src/group/GroupApi.ts
CHANGED
|
@@ -12,6 +12,12 @@ export class GroupApi implements IGroupApi {
|
|
|
12
12
|
private readonly baseUrl = process.env.FIADO_GROUP_LAMBDA_URL || "";
|
|
13
13
|
|
|
14
14
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
|
+
async findByCategory(categoryId: string): Promise<any> {
|
|
17
|
+
const url = `${this.baseUrl}groups/categories/${categoryId}`;
|
|
18
|
+
return await this.httpRequest.get(`${url}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
async members(params: GroupAddDirectoryRequest): Promise<any> {
|
|
16
22
|
const url = `${this.baseUrl}members`;
|
|
17
23
|
return await this.httpRequest.post(`${url}`,params);
|
|
@@ -12,4 +12,12 @@ export interface IGroupApi {
|
|
|
12
12
|
*/
|
|
13
13
|
members(params: GroupAddDirectoryRequest): Promise<any>;
|
|
14
14
|
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Buscar grupos por categoria.
|
|
18
|
+
* @param categoryId ID de la categoria.
|
|
19
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
20
|
+
*/
|
|
21
|
+
findByCategory(categoryId: string): Promise<any>;
|
|
22
|
+
|
|
15
23
|
}
|