@fiado/api-invoker 1.3.99 → 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.
- package/bin/notificationMessages/queue/NotificationMessagePublisher.d.ts +1 -0
- package/bin/notificationMessages/queue/NotificationMessagePublisher.js +4 -0
- package/bin/notificationMessages/queue/interfaces/INotificationMessagesPublisher.d.ts +1 -0
- package/package.json +1 -1
- package/src/notificationMessages/queue/NotificationMessagePublisher.ts +6 -0
- package/src/notificationMessages/queue/interfaces/INotificationMessagesPublisher.ts +1 -0
|
@@ -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
|
+
"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",
|
|
@@ -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
|
}
|