@fiado/api-invoker 1.3.97 → 1.3.99

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.
@@ -11,4 +11,5 @@ export declare class DeviceApi implements IDeviceApi {
11
11
  directoryId: string;
12
12
  status: string;
13
13
  }): Promise<void>;
14
+ deleteDevicesByDirectoryId(directoryId: string): Promise<void>;
14
15
  }
@@ -36,6 +36,10 @@ let DeviceApi = class DeviceApi {
36
36
  const url = `${this.baseUrl}devices/directories/${params.directoryId}?status=${params.status}`;
37
37
  return await this.httpRequest.get(url);
38
38
  }
39
+ async deleteDevicesByDirectoryId(directoryId) {
40
+ const url = `${this.baseUrl}devices/delete/directory/${directoryId}`;
41
+ return await this.httpRequest.delete(url);
42
+ }
39
43
  };
40
44
  exports.DeviceApi = DeviceApi;
41
45
  exports.DeviceApi = DeviceApi = __decorate([
@@ -27,4 +27,11 @@ export interface IDeviceApi {
27
27
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
28
28
  */
29
29
  getById(id: string): Promise<void>;
30
+ /**
31
+ * Eliminar todos los dispositivos por id de directorio
32
+ * @param value valor del parametro.
33
+ * @returns Una promesa que resuelve a void.
34
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
35
+ */
36
+ deleteDevicesByDirectoryId(directoryId: string): Promise<void>;
30
37
  }
@@ -7,7 +7,7 @@ export declare class DirectoryApi implements IDirectoryApi {
7
7
  private httpRequest;
8
8
  private readonly baseUrl;
9
9
  constructor(httpRequest: IHttpRequest);
10
- getDirectoryByPeopleId(peopleIds: string[]): Promise<any>;
10
+ getDirectoriesByPeopleId(peopleIds: string[]): Promise<any>;
11
11
  deleteDirectory(directoryId: string): Promise<void>;
12
12
  validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
13
13
  getByIds(ids: string[]): Promise<any>;
@@ -24,7 +24,7 @@ let DirectoryApi = class DirectoryApi {
24
24
  this.httpRequest = httpRequest;
25
25
  this.baseUrl = process.env.DIRECTORY_LAMBDA_URL || "";
26
26
  }
27
- async getDirectoryByPeopleId(peopleIds) {
27
+ async getDirectoriesByPeopleId(peopleIds) {
28
28
  if (peopleIds.length === 0) {
29
29
  throw new Error("At least one directory ID is required.");
30
30
  }
@@ -52,4 +52,6 @@ export interface IDirectoryApi {
52
52
  updateStatus(directoryId: string, status: Status): Promise<void>;
53
53
  getByPeopleId(peopleId: string): Promise<any>;
54
54
  validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
55
+ deleteDirectory(directoryId: string): Promise<void>;
56
+ getDirectoriesByPeopleId(peopleIds: string[]): Promise<any>;
55
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.97",
3
+ "version": "1.3.99",
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",
@@ -25,4 +25,9 @@ export class DeviceApi implements IDeviceApi {
25
25
  return await this.httpRequest.get(url);
26
26
  }
27
27
 
28
+ async deleteDevicesByDirectoryId(directoryId: string): Promise<void> {
29
+ const url = `${this.baseUrl}devices/delete/directory/${directoryId}`;
30
+ return await this.httpRequest.delete(url);
31
+ }
32
+
28
33
  }
@@ -29,4 +29,13 @@ export interface IDeviceApi {
29
29
  */
30
30
  getById(id: string): Promise<void>;
31
31
 
32
+
33
+ /**
34
+ * Eliminar todos los dispositivos por id de directorio
35
+ * @param value valor del parametro.
36
+ * @returns Una promesa que resuelve a void.
37
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
38
+ */
39
+ deleteDevicesByDirectoryId(directoryId: string): Promise<void>;
40
+
32
41
  }
@@ -16,7 +16,7 @@ export class DirectoryApi implements IDirectoryApi {
16
16
  }
17
17
 
18
18
 
19
- public async getDirectoryByPeopleId(peopleIds: string[]): Promise<any> {
19
+ public async getDirectoriesByPeopleId(peopleIds: string[]): Promise<any> {
20
20
 
21
21
  if (peopleIds.length === 0) {
22
22
  throw new Error("At least one directory ID is required.")
@@ -65,5 +65,9 @@ export interface IDirectoryApi {
65
65
 
66
66
  validateSecretNumber(directoryId: string, secretNumber: string): Promise<void>;
67
67
 
68
+ deleteDirectory(directoryId: string): Promise<void>;
69
+
70
+ getDirectoriesByPeopleId(peopleIds: string[]): Promise<any>;
71
+
68
72
 
69
73
  }