@modernlock/common 1.0.48 → 1.0.49
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/build/events/queues.d.ts +1 -2
- package/build/events/queues.js +1 -2
- package/build/events/routing-keys.d.ts +1 -2
- package/build/events/routing-keys.js +2 -3
- package/build/events/send-notification-publisher.d.ts +25 -0
- package/build/events/{Group-notification-publisher.js → send-notification-publisher.js} +5 -5
- package/build/index.d.ts +1 -2
- package/build/index.js +1 -2
- package/package.json +1 -1
- package/build/events/Group-notification-publisher.d.ts +0 -10
- package/build/events/single-notification-publisher.d.ts +0 -10
- package/build/events/single-notification-publisher.js +0 -17
package/build/events/queues.d.ts
CHANGED
|
@@ -14,8 +14,7 @@ export declare enum Queues {
|
|
|
14
14
|
deviceCommandQueue = "deviceCommandQueue",
|
|
15
15
|
FileRemoveQeueu = "FileRemoveQeueu",
|
|
16
16
|
createLogQueue = "createLogQueue",
|
|
17
|
-
|
|
18
|
-
groupNotificationsQeueu = "groupNotificationsQeueu",
|
|
17
|
+
sendNotificationQueue = "sendNotificationQueue",
|
|
19
18
|
chatNotificationsQueue = "chatNotificationsQueue",
|
|
20
19
|
notificationAppQueue = "notificationAppQueue",
|
|
21
20
|
groupNotificationAppQueue = "groupNotificationAppQueue",
|
package/build/events/queues.js
CHANGED
|
@@ -25,8 +25,7 @@ var Queues;
|
|
|
25
25
|
// Log server queue
|
|
26
26
|
Queues["createLogQueue"] = "createLogQueue";
|
|
27
27
|
// notification service queues
|
|
28
|
-
Queues["
|
|
29
|
-
Queues["groupNotificationsQeueu"] = "groupNotificationsQeueu";
|
|
28
|
+
Queues["sendNotificationQueue"] = "sendNotificationQueue";
|
|
30
29
|
Queues["chatNotificationsQueue"] = "chatNotificationsQueue";
|
|
31
30
|
// app workers queue
|
|
32
31
|
Queues["notificationAppQueue"] = "notificationAppQueue";
|
|
@@ -17,9 +17,8 @@ export declare enum RoutingKeys {
|
|
|
17
17
|
severalUsersCreated = "severalUsers:created",
|
|
18
18
|
fileConfirmed = "file:confirmed",
|
|
19
19
|
fileRemoved = "file:removed",
|
|
20
|
-
groupNotification = "notification:groupNotification",
|
|
21
|
-
singleNotification = "notification:singleNotification",
|
|
22
20
|
chatNotification = "notification:chatNotification",
|
|
21
|
+
sendNotification = "notification:sendNotification",
|
|
23
22
|
notificationEmailWorkers = "notification:email-workers",
|
|
24
23
|
groupNotificationEmailWorkers = "groupNotification:email-workers",
|
|
25
24
|
chatNotificationEmailWorkers = "chatNotification:email-workers",
|
|
@@ -26,10 +26,9 @@ var RoutingKeys;
|
|
|
26
26
|
RoutingKeys["severalUsersCreated"] = "severalUsers:created";
|
|
27
27
|
RoutingKeys["fileConfirmed"] = "file:confirmed";
|
|
28
28
|
RoutingKeys["fileRemoved"] = "file:removed";
|
|
29
|
-
// notification service routing
|
|
30
|
-
RoutingKeys["groupNotification"] = "notification:groupNotification";
|
|
31
|
-
RoutingKeys["singleNotification"] = "notification:singleNotification";
|
|
29
|
+
// notification service routing key
|
|
32
30
|
RoutingKeys["chatNotification"] = "notification:chatNotification";
|
|
31
|
+
RoutingKeys["sendNotification"] = "notification:sendNotification";
|
|
33
32
|
// Email workers routing keys
|
|
34
33
|
RoutingKeys["notificationEmailWorkers"] = "notification:email-workers";
|
|
35
34
|
RoutingKeys["groupNotificationEmailWorkers"] = "groupNotification:email-workers";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RoutingKeys } from './routing-keys';
|
|
2
|
+
import { ExchangeTypes } from './exchange-types';
|
|
3
|
+
import { Exchanges } from './exchanges';
|
|
4
|
+
import { Producer } from './base-producer';
|
|
5
|
+
interface NotificationEvent {
|
|
6
|
+
data: {
|
|
7
|
+
userId: string;
|
|
8
|
+
isRead?: boolean;
|
|
9
|
+
level: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
title: string;
|
|
12
|
+
message: string;
|
|
13
|
+
data?: any;
|
|
14
|
+
actions?: {
|
|
15
|
+
label: string;
|
|
16
|
+
url: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare class SendNotificationPublisher extends Producer<NotificationEvent> {
|
|
21
|
+
exchange: Exchanges.mainExchange;
|
|
22
|
+
exchangeType: ExchangeTypes.direct;
|
|
23
|
+
routingKey: RoutingKeys.sendNotification;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SendNotificationPublisher = void 0;
|
|
4
|
+
const routing_keys_1 = require("./routing-keys");
|
|
4
5
|
const exchange_types_1 = require("./exchange-types");
|
|
5
6
|
const exchanges_1 = require("./exchanges");
|
|
6
|
-
const routing_keys_1 = require("./routing-keys");
|
|
7
7
|
const base_producer_1 = require("./base-producer");
|
|
8
|
-
class
|
|
8
|
+
class SendNotificationPublisher extends base_producer_1.Producer {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.exchange = exchanges_1.Exchanges.mainExchange;
|
|
12
12
|
this.exchangeType = exchange_types_1.ExchangeTypes.direct;
|
|
13
|
-
this.routingKey = routing_keys_1.RoutingKeys.
|
|
13
|
+
this.routingKey = routing_keys_1.RoutingKeys.sendNotification;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
exports.
|
|
16
|
+
exports.SendNotificationPublisher = SendNotificationPublisher;
|
|
17
17
|
;
|
package/build/index.d.ts
CHANGED
|
@@ -6,8 +6,7 @@ export * from "./events/queues";
|
|
|
6
6
|
export * from "./events/routing-keys";
|
|
7
7
|
export * from "./events/rabbitmq-wrapper";
|
|
8
8
|
export * from "./events/templates";
|
|
9
|
-
export * from "./events/
|
|
10
|
-
export * from "./events/Group-notification-publisher";
|
|
9
|
+
export * from "./events/send-notification-publisher";
|
|
11
10
|
export * from "./events/chat-notification-publisher";
|
|
12
11
|
export * from "./events/events";
|
|
13
12
|
export * from "./events/mappings";
|
package/build/index.js
CHANGED
|
@@ -22,8 +22,7 @@ __exportStar(require("./events/queues"), exports);
|
|
|
22
22
|
__exportStar(require("./events/routing-keys"), exports);
|
|
23
23
|
__exportStar(require("./events/rabbitmq-wrapper"), exports);
|
|
24
24
|
__exportStar(require("./events/templates"), exports);
|
|
25
|
-
__exportStar(require("./events/
|
|
26
|
-
__exportStar(require("./events/Group-notification-publisher"), exports);
|
|
25
|
+
__exportStar(require("./events/send-notification-publisher"), exports);
|
|
27
26
|
__exportStar(require("./events/chat-notification-publisher"), exports);
|
|
28
27
|
__exportStar(require("./events/events"), exports);
|
|
29
28
|
__exportStar(require("./events/mappings"), exports);
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExchangeTypes } from './exchange-types';
|
|
2
|
-
import { Exchanges } from './exchanges';
|
|
3
|
-
import { RoutingKeys } from "./routing-keys";
|
|
4
|
-
import { GroupNotificationEvent } from "./events";
|
|
5
|
-
import { Producer } from "./base-producer";
|
|
6
|
-
export declare class GroupNotificationPublisher extends Producer<GroupNotificationEvent> {
|
|
7
|
-
exchange: Exchanges.mainExchange;
|
|
8
|
-
exchangeType: ExchangeTypes.direct;
|
|
9
|
-
routingKey: RoutingKeys.groupNotification;
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExchangeTypes } from './exchange-types';
|
|
2
|
-
import { Exchanges } from './exchanges';
|
|
3
|
-
import { RoutingKeys } from "./routing-keys";
|
|
4
|
-
import { SingleNotificationEvent } from "./events";
|
|
5
|
-
import { Producer } from "./base-producer";
|
|
6
|
-
export declare class SingleNotificationPublisher extends Producer<SingleNotificationEvent> {
|
|
7
|
-
exchange: Exchanges.mainExchange;
|
|
8
|
-
exchangeType: ExchangeTypes.direct;
|
|
9
|
-
routingKey: RoutingKeys.singleNotification;
|
|
10
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SingleNotificationPublisher = void 0;
|
|
4
|
-
const exchange_types_1 = require("./exchange-types");
|
|
5
|
-
const exchanges_1 = require("./exchanges");
|
|
6
|
-
const routing_keys_1 = require("./routing-keys");
|
|
7
|
-
const base_producer_1 = require("./base-producer");
|
|
8
|
-
class SingleNotificationPublisher extends base_producer_1.Producer {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.exchange = exchanges_1.Exchanges.mainExchange;
|
|
12
|
-
this.exchangeType = exchange_types_1.ExchangeTypes.direct;
|
|
13
|
-
this.routingKey = routing_keys_1.RoutingKeys.singleNotification;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.SingleNotificationPublisher = SingleNotificationPublisher;
|
|
17
|
-
;
|