@novu/headless
Advanced tools
Comparing version 0.18.0 to 0.19.0
@@ -19,2 +19,3 @@ "use strict"; | ||
const client_1 = require("@novu/client"); | ||
const shared_1 = require("@novu/shared"); | ||
const query_service_1 = require("./query.service"); | ||
@@ -182,3 +183,3 @@ const utils_1 = require("../utils"); | ||
if (this.socket) { | ||
this.socket.on('notification_received', (data) => { | ||
this.socket.on(shared_1.WebSocketEventEnum.RECEIVED, (data) => { | ||
if (data === null || data === void 0 ? void 0 : data.message) { | ||
@@ -194,3 +195,3 @@ this.queryClient.removeQueries(utils_1.NOTIFICATIONS_QUERY_KEY, { | ||
if (this.socket) { | ||
this.socket.off('notification_received'); | ||
this.socket.off(shared_1.WebSocketEventEnum.RECEIVED); | ||
} | ||
@@ -202,3 +203,3 @@ }; | ||
if (this.socket) { | ||
this.socket.on('unseen_count_changed', (data) => { | ||
this.socket.on(shared_1.WebSocketEventEnum.UNSEEN, (data) => { | ||
if (Number.isInteger(data === null || data === void 0 ? void 0 : data.unseenCount)) { | ||
@@ -215,3 +216,3 @@ this.queryClient.removeQueries(utils_1.NOTIFICATIONS_QUERY_KEY, { | ||
if (this.socket) { | ||
this.socket.off('unseen_count_changed'); | ||
this.socket.off(shared_1.WebSocketEventEnum.UNSEEN); | ||
} | ||
@@ -223,3 +224,3 @@ }; | ||
if (this.socket) { | ||
this.socket.on('unread_count_changed', (data) => { | ||
this.socket.on(shared_1.WebSocketEventEnum.UNREAD, (data) => { | ||
if (Number.isInteger(data === null || data === void 0 ? void 0 : data.unreadCount)) { | ||
@@ -236,3 +237,3 @@ this.queryClient.removeQueries(utils_1.NOTIFICATIONS_QUERY_KEY, { | ||
if (this.socket) { | ||
this.socket.off('unread_count_changed'); | ||
this.socket.off(shared_1.WebSocketEventEnum.UNREAD); | ||
} | ||
@@ -239,0 +240,0 @@ }; |
{ | ||
"name": "@novu/headless", | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"repository": "https://github.com/novuhq/novu", | ||
@@ -31,6 +31,6 @@ "description": "Headless client package that is a thin abstraction layer over the API client + state and socket management", | ||
"dependencies": { | ||
"@novu/client": "^0.18.0", | ||
"@novu/shared": "^0.18.0", | ||
"@novu/client": "^0.19.0", | ||
"@novu/shared": "^0.19.0", | ||
"@tanstack/query-core": "^4.15.1", | ||
"socket.io-client": "4.6.1" | ||
"socket.io-client": "4.7.2" | ||
}, | ||
@@ -51,3 +51,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "4a851773914b8a92863823220c8c4d785e20b363" | ||
"gitHead": "4b3f023925fdd91447cea65776c16a87aab3cb4a" | ||
} |
Sorry, the diff of this file is not supported yet
47544
783
+ Added@novu/client@0.19.0(transitive)
+ Added@novu/shared@0.19.0(transitive)
+ Addedengine.io-client@6.5.4(transitive)
+ Addedengine.io-parser@5.2.2(transitive)
+ Addedsocket.io-client@4.7.2(transitive)
+ Addedws@8.17.1(transitive)
- Removed@novu/client@0.18.0(transitive)
- Removed@novu/shared@0.18.0(transitive)
- Removedengine.io-client@6.4.0(transitive)
- Removedengine.io-parser@5.0.7(transitive)
- Removedsocket.io-client@4.6.1(transitive)
- Removedws@8.11.0(transitive)
Updated@novu/client@^0.19.0
Updated@novu/shared@^0.19.0
Updatedsocket.io-client@4.7.2