@fiado/api-invoker 1.3.98 → 1.4.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.
@@ -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
  }
@@ -9,4 +9,5 @@ export default class NotificationMessagePublisher implements INotificationMessag
9
9
  private readonly NOTIFICATION_MESSAGES_URL;
10
10
  publish(message: NotificationQueueMessageRequest): Promise<void>;
11
11
  getTemplateById(templateId: string): Promise<FiadoApiResponse<NotificationTemplate>>;
12
+ deleteByDirectoryId(directoryId: string): Promise<void>;
12
13
  }
@@ -38,6 +38,10 @@ let NotificationMessagePublisher = class NotificationMessagePublisher {
38
38
  const url = `${this.NOTIFICATION_MESSAGES_URL}notification-messages/private/templates/${templateId}`;
39
39
  return await this.httpRequest.get(`${url}`);
40
40
  }
41
+ async deleteByDirectoryId(directoryId) {
42
+ const url = `${this.NOTIFICATION_MESSAGES_URL}notification-messages/private/directory/${directoryId}`;
43
+ return await this.httpRequest.delete(`${url}`);
44
+ }
41
45
  };
42
46
  NotificationMessagePublisher = __decorate([
43
47
  (0, inversify_1.injectable)(),
@@ -3,4 +3,5 @@ import { NotificationQueueMessageRequest, NotificationTemplate } from "@fiado/ty
3
3
  export interface INotificationMessagesPublisher {
4
4
  publish(message: NotificationQueueMessageRequest): Promise<void>;
5
5
  getTemplateById(templateId: string): Promise<FiadoApiResponse<NotificationTemplate>>;
6
+ deleteByDirectoryId(directoryId: string): Promise<void>;
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.98",
3
+ "version": "1.4.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",
@@ -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
  }
@@ -12,6 +12,7 @@ export default class NotificationMessagePublisher implements INotificationMessag
12
12
  @inject("IHttpRequest") private httpRequest: IHttpRequest
13
13
  ) {}
14
14
 
15
+
15
16
  private readonly NOTIFICATION_MESSAGES_QUEUE = process.env.NOTIFICATION_MESSAGES_QUEUE
16
17
  private readonly NOTIFICATION_MESSAGES_URL = process.env.NOTIFICATION_MESSAGES_URL;
17
18
 
@@ -33,4 +34,9 @@ export default class NotificationMessagePublisher implements INotificationMessag
33
34
  const url = `${this.NOTIFICATION_MESSAGES_URL}notification-messages/private/templates/${templateId}`;
34
35
  return await this.httpRequest.get(`${url}`);
35
36
  }
37
+
38
+ async deleteByDirectoryId(directoryId: string): Promise<void> {
39
+ const url = `${this.NOTIFICATION_MESSAGES_URL}notification-messages/private/directory/${directoryId}`;
40
+ return await this.httpRequest.delete(`${url}`);
41
+ }
36
42
  }
@@ -4,4 +4,5 @@ import {NotificationQueueMessageRequest, NotificationTemplate} from "@fiado/type
4
4
  export interface INotificationMessagesPublisher {
5
5
  publish(message: NotificationQueueMessageRequest): Promise<void>;
6
6
  getTemplateById(templateId: string): Promise<FiadoApiResponse<NotificationTemplate>>;
7
+ deleteByDirectoryId(directoryId: string): Promise<void>;
7
8
  }