@novu/js 3.13.0 → 3.14.1-rc.4ba98f00f2
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/README.md +41 -0
- package/dist/cjs/{chunk-BDYEMGVY.js → chunk-YYT2PAWE.js} +84 -33
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/{esm/novu-Dnzb16Le.d.mts → cjs/novu-Dz_wNJko.d.ts} +1 -1
- package/dist/{esm/novu-event-emitter-BFZmnC3B.d.mts → cjs/novu-event-emitter-DlsghVpg.d.ts} +24 -8
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/cjs/{types-BxUhsMdy.d.ts → types-kZC7YyfT.d.ts} +2 -2
- package/dist/cjs/ui/index.d.ts +5 -5
- package/dist/cjs/ui/index.js +9 -9
- package/dist/esm/{chunk-QFTC4N7O.mjs → chunk-DKGB4NJ7.mjs} +84 -33
- package/dist/esm/index.d.mts +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/{cjs/novu-D_YIntb9.d.ts → esm/novu-C7T9MOUL.d.mts} +1 -1
- package/dist/{cjs/novu-event-emitter-BFZmnC3B.d.ts → esm/novu-event-emitter-DlsghVpg.d.mts} +24 -8
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/esm/{types-DxJq-5Sy.d.mts → types-ChYSuHwX.d.mts} +2 -2
- package/dist/esm/ui/index.d.mts +5 -5
- package/dist/esm/ui/index.mjs +2 -2
- package/dist/novu.min.js +12 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,3 +81,44 @@ const novu = new Novu({
|
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
> Note: When HMAC encryption is enabled and `context` is provided, the `contextHash` is required. The hash is order-independent, so `{a:1, b:2}` produces the same hash as `{b:2, a:1}`.
|
|
84
|
+
|
|
85
|
+
## Socket Options
|
|
86
|
+
|
|
87
|
+
You can provide custom socket configuration options using the `socketOptions` parameter. These options will be merged with the default socket configuration when initializing the WebSocket connection.
|
|
88
|
+
|
|
89
|
+
### Socket Type
|
|
90
|
+
|
|
91
|
+
By default, the socket type is determined automatically based on the `socketUrl`. You can explicitly set the socket type using the `socketType` option:
|
|
92
|
+
|
|
93
|
+
- `'cloud'` — uses PartySocket (default for Novu Cloud URLs)
|
|
94
|
+
- `'self-hosted'` — uses socket.io (default for custom/self-hosted URLs)
|
|
95
|
+
|
|
96
|
+
This is useful when proxying Novu Cloud through your own domain, where the URL no longer matches a known Novu Cloud URL but PartySocket is still required, or conversely when you need socket.io behavior with a custom URL.
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
const novu = new Novu({
|
|
100
|
+
applicationIdentifier: 'YOUR_NOVU_APPLICATION_IDENTIFIER',
|
|
101
|
+
subscriber: 'YOUR_INTERNAL_SUBSCRIBER_ID',
|
|
102
|
+
socketUrl: 'wss://your-proxy.example.com/novu-socket',
|
|
103
|
+
socketOptions: {
|
|
104
|
+
socketType: 'cloud',
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Custom socket.io Options
|
|
110
|
+
|
|
111
|
+
When using socket.io (`socketType: 'self-hosted'` or a non-Cloud URL), you can pass any socket.io-client options:
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
const novu = new Novu({
|
|
115
|
+
applicationIdentifier: 'YOUR_NOVU_APPLICATION_IDENTIFIER',
|
|
116
|
+
subscriber: 'YOUR_INTERNAL_SUBSCRIBER_ID',
|
|
117
|
+
socketOptions: {
|
|
118
|
+
reconnectionDelay: 5000,
|
|
119
|
+
timeout: 20000,
|
|
120
|
+
path: '/my-custom-path',
|
|
121
|
+
// ... other socket.io-client options
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
```
|
|
@@ -47,7 +47,7 @@ var areDataEqual = (data1, data2) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
var isSameFilter = (filter1, filter2) => {
|
|
50
|
-
return areDataEqual(filter1.data, filter2.data) && areTagsEqual(filter1.tags, filter2.tags) && filter1.read === filter2.read && filter1.archived === filter2.archived && filter1.snoozed === filter2.snoozed && filter1.seen === filter2.seen && areSeveritiesEqual(filter1.severity, filter2.severity);
|
|
50
|
+
return areDataEqual(filter1.data, filter2.data) && areTagsEqual(filter1.tags, filter2.tags) && filter1.read === filter2.read && filter1.archived === filter2.archived && filter1.snoozed === filter2.snoozed && filter1.seen === filter2.seen && areSeveritiesEqual(filter1.severity, filter2.severity) && filter1.createdGte === filter2.createdGte && filter1.createdLte === filter2.createdLte;
|
|
51
51
|
};
|
|
52
52
|
function checkNotificationDataFilter(notificationData, filterData) {
|
|
53
53
|
if (!filterData || Object.keys(filterData).length === 0) {
|
|
@@ -99,8 +99,25 @@ function checkBasicFilters(notification, filter) {
|
|
|
99
99
|
}
|
|
100
100
|
return true;
|
|
101
101
|
}
|
|
102
|
+
function checkNotificationTimeframeFilter(notificationCreatedAt, createdGte, createdLte) {
|
|
103
|
+
if (!createdGte && !createdLte) {
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
const createdAtDate = new Date(notificationCreatedAt).getTime();
|
|
107
|
+
if (createdGte) {
|
|
108
|
+
if (createdAtDate < createdGte) {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (createdLte) {
|
|
113
|
+
if (createdAtDate > createdLte) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
102
119
|
function checkNotificationMatchesFilter(notification, filter) {
|
|
103
|
-
return checkBasicFilters(notification, filter) && checkNotificationTagFilter(notification.tags, filter.tags) && checkNotificationDataFilter(notification.data, filter.data);
|
|
120
|
+
return checkBasicFilters(notification, filter) && checkNotificationTagFilter(notification.tags, filter.tags) && checkNotificationDataFilter(notification.data, filter.data) && checkNotificationTimeframeFilter(notification.createdAt, filter.createdGte, filter.createdLte);
|
|
104
121
|
}
|
|
105
122
|
|
|
106
123
|
// src/subscriptions/subscription.ts
|
|
@@ -594,7 +611,7 @@ var SubscriptionsCache = class {
|
|
|
594
611
|
if (!subscriptions) continue;
|
|
595
612
|
let hasUpdates = false;
|
|
596
613
|
const updatedSubscriptions = subscriptions.map((subscription) => {
|
|
597
|
-
const subscriptionPreferences = preferencesBySubscription.get(subscription.
|
|
614
|
+
const subscriptionPreferences = preferencesBySubscription.get(subscription.identifier);
|
|
598
615
|
if (subscriptionPreferences) {
|
|
599
616
|
hasUpdates = true;
|
|
600
617
|
return this.createUpdatedSubscription(subscription, subscriptionPreferences);
|
|
@@ -612,7 +629,7 @@ var SubscriptionsCache = class {
|
|
|
612
629
|
for (const key of allItemKeys) {
|
|
613
630
|
const subscription = chunk7B52C2XE_js.__privateGet(this, _itemCache).get(key);
|
|
614
631
|
if (!subscription) continue;
|
|
615
|
-
const subscriptionPreferences = preferencesBySubscription.get(subscription.
|
|
632
|
+
const subscriptionPreferences = preferencesBySubscription.get(subscription.identifier);
|
|
616
633
|
if (subscriptionPreferences) {
|
|
617
634
|
const updatedSubscription = this.createUpdatedSubscription(subscription, subscriptionPreferences);
|
|
618
635
|
chunk7B52C2XE_js.__privateGet(this, _itemCache).set(key, updatedSubscription);
|
|
@@ -883,24 +900,18 @@ _contextKey = new WeakMap();
|
|
|
883
900
|
|
|
884
901
|
// src/api/http-client.ts
|
|
885
902
|
var DEFAULT_API_VERSION = "v1";
|
|
886
|
-
var DEFAULT_CLIENT_VERSION = `${"@novu/js"}@${"3.
|
|
903
|
+
var DEFAULT_CLIENT_VERSION = `${"@novu/js"}@${"3.14.1-rc.4ba98f00f2"}`;
|
|
887
904
|
var HttpClient = class {
|
|
888
905
|
constructor(options = {}) {
|
|
889
906
|
// Environment variable for local development that overrides the default API endpoint without affecting the Inbox DX
|
|
890
907
|
this.DEFAULT_BACKEND_URL = typeof window !== "undefined" && window.NOVU_LOCAL_BACKEND_URL || "https://api.novu.co";
|
|
891
|
-
const {
|
|
892
|
-
apiVersion = DEFAULT_API_VERSION,
|
|
893
|
-
apiUrl = this.DEFAULT_BACKEND_URL,
|
|
894
|
-
userAgent = DEFAULT_CLIENT_VERSION,
|
|
895
|
-
headers = {}
|
|
896
|
-
} = options || {};
|
|
908
|
+
const { apiVersion = DEFAULT_API_VERSION, apiUrl = this.DEFAULT_BACKEND_URL, headers = {} } = options || {};
|
|
897
909
|
this.apiVersion = apiVersion;
|
|
898
910
|
this.apiUrl = `${apiUrl}/${apiVersion}`;
|
|
899
911
|
this.headers = chunk7B52C2XE_js.__spreadValues({
|
|
900
912
|
"Novu-API-Version": "2024-06-26",
|
|
901
913
|
"Novu-Client-Version": DEFAULT_CLIENT_VERSION,
|
|
902
|
-
"Content-Type": "application/json"
|
|
903
|
-
"User-Agent": userAgent
|
|
914
|
+
"Content-Type": "application/json"
|
|
904
915
|
}, headers);
|
|
905
916
|
}
|
|
906
917
|
setAuthorizationToken(token) {
|
|
@@ -1043,7 +1054,9 @@ var InboxService = class {
|
|
|
1043
1054
|
snoozed,
|
|
1044
1055
|
seen: seen2,
|
|
1045
1056
|
data,
|
|
1046
|
-
severity
|
|
1057
|
+
severity,
|
|
1058
|
+
createdGte,
|
|
1059
|
+
createdLte
|
|
1047
1060
|
}) {
|
|
1048
1061
|
const searchParams = new URLSearchParams(`limit=${limit}`);
|
|
1049
1062
|
if (after) {
|
|
@@ -1079,6 +1092,12 @@ var InboxService = class {
|
|
|
1079
1092
|
} else if (severity) {
|
|
1080
1093
|
searchParams.append("severity", severity);
|
|
1081
1094
|
}
|
|
1095
|
+
if (createdGte) {
|
|
1096
|
+
searchParams.append("createdGte", `${createdGte}`);
|
|
1097
|
+
}
|
|
1098
|
+
if (createdLte) {
|
|
1099
|
+
searchParams.append("createdLte", `${createdLte}`);
|
|
1100
|
+
}
|
|
1082
1101
|
return chunk7B52C2XE_js.__privateGet(this, _httpClient).get(INBOX_NOTIFICATIONS_ROUTE, searchParams, false);
|
|
1083
1102
|
}
|
|
1084
1103
|
count({
|
|
@@ -1317,8 +1336,10 @@ var excludeEmpty = ({
|
|
|
1317
1336
|
severity,
|
|
1318
1337
|
limit,
|
|
1319
1338
|
offset,
|
|
1320
|
-
after
|
|
1321
|
-
|
|
1339
|
+
after,
|
|
1340
|
+
createdGte,
|
|
1341
|
+
createdLte
|
|
1342
|
+
}) => Object.entries({ tags, data, read: read2, archived, snoozed, seen: seen2, severity, limit, offset, after, createdGte, createdLte }).filter(([_, value]) => value !== null && value !== void 0 && !(Array.isArray(value) && value.length === 0)).reduce((acc, [key, value]) => {
|
|
1322
1343
|
acc[key] = value;
|
|
1323
1344
|
return acc;
|
|
1324
1345
|
}, {});
|
|
@@ -1332,9 +1353,13 @@ var getCacheKey = ({
|
|
|
1332
1353
|
severity,
|
|
1333
1354
|
limit,
|
|
1334
1355
|
offset,
|
|
1335
|
-
after
|
|
1356
|
+
after,
|
|
1357
|
+
createdGte,
|
|
1358
|
+
createdLte
|
|
1336
1359
|
}) => {
|
|
1337
|
-
return JSON.stringify(
|
|
1360
|
+
return JSON.stringify(
|
|
1361
|
+
excludeEmpty({ tags, data, read: read2, archived, snoozed, seen: seen2, severity, limit, offset, after, createdGte, createdLte })
|
|
1362
|
+
);
|
|
1338
1363
|
};
|
|
1339
1364
|
var getFilterKey = ({
|
|
1340
1365
|
tags,
|
|
@@ -1343,9 +1368,11 @@ var getFilterKey = ({
|
|
|
1343
1368
|
archived,
|
|
1344
1369
|
snoozed,
|
|
1345
1370
|
seen: seen2,
|
|
1346
|
-
severity
|
|
1371
|
+
severity,
|
|
1372
|
+
createdGte,
|
|
1373
|
+
createdLte
|
|
1347
1374
|
}) => {
|
|
1348
|
-
return JSON.stringify(excludeEmpty({ tags, data, read: read2, archived, snoozed, seen: seen2, severity }));
|
|
1375
|
+
return JSON.stringify(excludeEmpty({ tags, data, read: read2, archived, snoozed, seen: seen2, severity, createdGte, createdLte }));
|
|
1349
1376
|
};
|
|
1350
1377
|
var getFilter = (key) => {
|
|
1351
1378
|
return JSON.parse(key);
|
|
@@ -1531,7 +1558,9 @@ var NotificationsCache = class {
|
|
|
1531
1558
|
snoozed: args.snoozed,
|
|
1532
1559
|
archived: args.archived,
|
|
1533
1560
|
seen: args.seen,
|
|
1534
|
-
severity: args.severity
|
|
1561
|
+
severity: args.severity,
|
|
1562
|
+
createdGte: args.createdGte,
|
|
1563
|
+
createdLte: args.createdLte
|
|
1535
1564
|
});
|
|
1536
1565
|
}
|
|
1537
1566
|
}
|
|
@@ -2769,10 +2798,11 @@ var mapToNotification = ({
|
|
|
2769
2798
|
severity
|
|
2770
2799
|
});
|
|
2771
2800
|
};
|
|
2772
|
-
var _token, _emitter10, _partySocket, _socketUrl, _notificationReceived, _unseenCountChanged, _unreadCountChanged, _handleMessage, _PartySocketClient_instances, initializeSocket_fn, handleConnectSocket_fn, handleDisconnectSocket_fn;
|
|
2801
|
+
var _token, _emitter10, _partySocket, _socketUrl, _socketOptions, _notificationReceived, _unseenCountChanged, _unreadCountChanged, _handleMessage, _PartySocketClient_instances, initializeSocket_fn, handleConnectSocket_fn, handleDisconnectSocket_fn;
|
|
2773
2802
|
var PartySocketClient = class extends BaseModule {
|
|
2774
2803
|
constructor({
|
|
2775
2804
|
socketUrl,
|
|
2805
|
+
socketOptions,
|
|
2776
2806
|
inboxServiceInstance,
|
|
2777
2807
|
eventEmitterInstance
|
|
2778
2808
|
}) {
|
|
@@ -2785,6 +2815,7 @@ var PartySocketClient = class extends BaseModule {
|
|
|
2785
2815
|
chunk7B52C2XE_js.__privateAdd(this, _emitter10);
|
|
2786
2816
|
chunk7B52C2XE_js.__privateAdd(this, _partySocket);
|
|
2787
2817
|
chunk7B52C2XE_js.__privateAdd(this, _socketUrl);
|
|
2818
|
+
chunk7B52C2XE_js.__privateAdd(this, _socketOptions);
|
|
2788
2819
|
chunk7B52C2XE_js.__privateAdd(this, _notificationReceived, (event) => {
|
|
2789
2820
|
try {
|
|
2790
2821
|
const data = JSON.parse(event.data);
|
|
@@ -2839,6 +2870,7 @@ var PartySocketClient = class extends BaseModule {
|
|
|
2839
2870
|
});
|
|
2840
2871
|
chunk7B52C2XE_js.__privateSet(this, _emitter10, eventEmitterInstance);
|
|
2841
2872
|
chunk7B52C2XE_js.__privateSet(this, _socketUrl, socketUrl != null ? socketUrl : PRODUCTION_SOCKET_URL);
|
|
2873
|
+
chunk7B52C2XE_js.__privateSet(this, _socketOptions, socketOptions);
|
|
2842
2874
|
}
|
|
2843
2875
|
onSessionSuccess({ token }) {
|
|
2844
2876
|
chunk7B52C2XE_js.__privateSet(this, _token, token);
|
|
@@ -2867,6 +2899,7 @@ _token = new WeakMap();
|
|
|
2867
2899
|
_emitter10 = new WeakMap();
|
|
2868
2900
|
_partySocket = new WeakMap();
|
|
2869
2901
|
_socketUrl = new WeakMap();
|
|
2902
|
+
_socketOptions = new WeakMap();
|
|
2870
2903
|
_notificationReceived = new WeakMap();
|
|
2871
2904
|
_unseenCountChanged = new WeakMap();
|
|
2872
2905
|
_unreadCountChanged = new WeakMap();
|
|
@@ -2881,7 +2914,7 @@ initializeSocket_fn = function() {
|
|
|
2881
2914
|
chunk7B52C2XE_js.__privateGet(this, _emitter10).emit("socket.connect.pending", { args });
|
|
2882
2915
|
const url = new URL(chunk7B52C2XE_js.__privateGet(this, _socketUrl));
|
|
2883
2916
|
url.searchParams.set("token", chunk7B52C2XE_js.__privateGet(this, _token));
|
|
2884
|
-
chunk7B52C2XE_js.__privateSet(this, _partySocket, new partysocket.WebSocket(url.toString()));
|
|
2917
|
+
chunk7B52C2XE_js.__privateSet(this, _partySocket, new partysocket.WebSocket(url.toString(), void 0, chunk7B52C2XE_js.__privateGet(this, _socketOptions)));
|
|
2885
2918
|
chunk7B52C2XE_js.__privateGet(this, _partySocket).addEventListener("open", () => {
|
|
2886
2919
|
chunk7B52C2XE_js.__privateGet(this, _emitter10).emit("socket.connect.resolved", { args });
|
|
2887
2920
|
});
|
|
@@ -3004,10 +3037,11 @@ var mapToNotification2 = ({
|
|
|
3004
3037
|
severity
|
|
3005
3038
|
});
|
|
3006
3039
|
};
|
|
3007
|
-
var _token2, _emitter11, _socketIo, _socketUrl2, _notificationReceived2, _unseenCountChanged2, _unreadCountChanged2, _Socket_instances, initializeSocket_fn2, handleConnectSocket_fn2, handleDisconnectSocket_fn2;
|
|
3040
|
+
var _token2, _emitter11, _socketIo, _socketUrl2, _socketOptions2, _notificationReceived2, _unseenCountChanged2, _unreadCountChanged2, _Socket_instances, initializeSocket_fn2, handleConnectSocket_fn2, handleDisconnectSocket_fn2;
|
|
3008
3041
|
var Socket = class extends BaseModule {
|
|
3009
3042
|
constructor({
|
|
3010
3043
|
socketUrl,
|
|
3044
|
+
socketOptions,
|
|
3011
3045
|
inboxServiceInstance,
|
|
3012
3046
|
eventEmitterInstance
|
|
3013
3047
|
}) {
|
|
@@ -3020,6 +3054,7 @@ var Socket = class extends BaseModule {
|
|
|
3020
3054
|
chunk7B52C2XE_js.__privateAdd(this, _emitter11);
|
|
3021
3055
|
chunk7B52C2XE_js.__privateAdd(this, _socketIo);
|
|
3022
3056
|
chunk7B52C2XE_js.__privateAdd(this, _socketUrl2);
|
|
3057
|
+
chunk7B52C2XE_js.__privateAdd(this, _socketOptions2);
|
|
3023
3058
|
chunk7B52C2XE_js.__privateAdd(this, _notificationReceived2, ({ message }) => {
|
|
3024
3059
|
chunk7B52C2XE_js.__privateGet(this, _emitter11).emit(NOTIFICATION_RECEIVED2, {
|
|
3025
3060
|
result: new chunkCCAUG7YI_js.Notification(mapToNotification2(message), chunk7B52C2XE_js.__privateGet(this, _emitter11), this._inboxService)
|
|
@@ -3037,6 +3072,7 @@ var Socket = class extends BaseModule {
|
|
|
3037
3072
|
});
|
|
3038
3073
|
chunk7B52C2XE_js.__privateSet(this, _emitter11, eventEmitterInstance);
|
|
3039
3074
|
chunk7B52C2XE_js.__privateSet(this, _socketUrl2, socketUrl != null ? socketUrl : PRODUCTION_SOCKET_URL2);
|
|
3075
|
+
chunk7B52C2XE_js.__privateSet(this, _socketOptions2, socketOptions);
|
|
3040
3076
|
}
|
|
3041
3077
|
onSessionSuccess({ token }) {
|
|
3042
3078
|
chunk7B52C2XE_js.__privateSet(this, _token2, token);
|
|
@@ -3065,34 +3101,35 @@ _token2 = new WeakMap();
|
|
|
3065
3101
|
_emitter11 = new WeakMap();
|
|
3066
3102
|
_socketIo = new WeakMap();
|
|
3067
3103
|
_socketUrl2 = new WeakMap();
|
|
3104
|
+
_socketOptions2 = new WeakMap();
|
|
3068
3105
|
_notificationReceived2 = new WeakMap();
|
|
3069
3106
|
_unseenCountChanged2 = new WeakMap();
|
|
3070
3107
|
_unreadCountChanged2 = new WeakMap();
|
|
3071
3108
|
_Socket_instances = new WeakSet();
|
|
3072
3109
|
initializeSocket_fn2 = function() {
|
|
3073
3110
|
return chunk7B52C2XE_js.__async(this, null, function* () {
|
|
3074
|
-
var _a, _b, _c;
|
|
3111
|
+
var _a, _b, _c, _d;
|
|
3075
3112
|
if (chunk7B52C2XE_js.__privateGet(this, _socketIo)) {
|
|
3076
3113
|
return;
|
|
3077
3114
|
}
|
|
3078
3115
|
const args = { socketUrl: chunk7B52C2XE_js.__privateGet(this, _socketUrl2) };
|
|
3079
3116
|
chunk7B52C2XE_js.__privateGet(this, _emitter11).emit("socket.connect.pending", { args });
|
|
3080
|
-
chunk7B52C2XE_js.__privateSet(this, _socketIo, io__default.default(chunk7B52C2XE_js.__privateGet(this, _socketUrl2), {
|
|
3117
|
+
chunk7B52C2XE_js.__privateSet(this, _socketIo, io__default.default(chunk7B52C2XE_js.__privateGet(this, _socketUrl2), chunk7B52C2XE_js.__spreadValues({
|
|
3081
3118
|
reconnectionDelayMax: 1e4,
|
|
3082
3119
|
transports: ["websocket"],
|
|
3083
3120
|
query: {
|
|
3084
3121
|
token: `${chunk7B52C2XE_js.__privateGet(this, _token2)}`
|
|
3085
3122
|
}
|
|
3086
|
-
}));
|
|
3123
|
+
}, (_a = chunk7B52C2XE_js.__privateGet(this, _socketOptions2)) != null ? _a : {})));
|
|
3087
3124
|
chunk7B52C2XE_js.__privateGet(this, _socketIo).on("connect", () => {
|
|
3088
3125
|
chunk7B52C2XE_js.__privateGet(this, _emitter11).emit("socket.connect.resolved", { args });
|
|
3089
3126
|
});
|
|
3090
3127
|
chunk7B52C2XE_js.__privateGet(this, _socketIo).on("connect_error", (error) => {
|
|
3091
3128
|
chunk7B52C2XE_js.__privateGet(this, _emitter11).emit("socket.connect.resolved", { args, error });
|
|
3092
3129
|
});
|
|
3093
|
-
(
|
|
3094
|
-
(
|
|
3095
|
-
(
|
|
3130
|
+
(_b = chunk7B52C2XE_js.__privateGet(this, _socketIo)) == null ? void 0 : _b.on("notification_received" /* RECEIVED */, chunk7B52C2XE_js.__privateGet(this, _notificationReceived2));
|
|
3131
|
+
(_c = chunk7B52C2XE_js.__privateGet(this, _socketIo)) == null ? void 0 : _c.on("unseen_count_changed" /* UNSEEN */, chunk7B52C2XE_js.__privateGet(this, _unseenCountChanged2));
|
|
3132
|
+
(_d = chunk7B52C2XE_js.__privateGet(this, _socketIo)) == null ? void 0 : _d.on("unread_count_changed" /* UNREAD */, chunk7B52C2XE_js.__privateGet(this, _unreadCountChanged2));
|
|
3096
3133
|
});
|
|
3097
3134
|
};
|
|
3098
3135
|
handleConnectSocket_fn2 = function() {
|
|
@@ -3130,6 +3167,10 @@ var URL_TRANSFORMATIONS = {
|
|
|
3130
3167
|
"https://ws.novu.co": PRODUCTION_SOCKET_URL,
|
|
3131
3168
|
"https://dev.ws.novu.co": "wss://socket.novu-staging.co"
|
|
3132
3169
|
};
|
|
3170
|
+
var SOCKET_TYPE_OPTION_MAP = {
|
|
3171
|
+
cloud: "partysocket" /* PARTY_SOCKET */,
|
|
3172
|
+
"self-hosted": "socket.io" /* SOCKET_IO */
|
|
3173
|
+
};
|
|
3133
3174
|
function transformSocketUrl(socketUrl) {
|
|
3134
3175
|
if (!socketUrl) return PRODUCTION_SOCKET_URL;
|
|
3135
3176
|
return URL_TRANSFORMATIONS[socketUrl] || socketUrl;
|
|
@@ -3137,17 +3178,26 @@ function transformSocketUrl(socketUrl) {
|
|
|
3137
3178
|
function shouldUsePartySocket(socketUrl) {
|
|
3138
3179
|
return !socketUrl || PARTY_SOCKET_URLS.includes(socketUrl);
|
|
3139
3180
|
}
|
|
3181
|
+
function resolveSocketType(socketUrl, explicitType) {
|
|
3182
|
+
if (explicitType) {
|
|
3183
|
+
return SOCKET_TYPE_OPTION_MAP[explicitType];
|
|
3184
|
+
}
|
|
3185
|
+
return shouldUsePartySocket(socketUrl) ? "partysocket" /* PARTY_SOCKET */ : "socket.io" /* SOCKET_IO */;
|
|
3186
|
+
}
|
|
3140
3187
|
function createSocket({
|
|
3141
3188
|
socketUrl,
|
|
3189
|
+
socketOptions,
|
|
3142
3190
|
inboxServiceInstance,
|
|
3143
3191
|
eventEmitterInstance
|
|
3144
3192
|
}) {
|
|
3145
3193
|
const transformedSocketUrl = transformSocketUrl(socketUrl);
|
|
3146
|
-
const
|
|
3194
|
+
const _a = socketOptions || {}, { socketType: explicitSocketType } = _a, restSocketOptions = chunk7B52C2XE_js.__objRest(_a, ["socketType"]);
|
|
3195
|
+
const socketType = resolveSocketType(transformedSocketUrl, explicitSocketType);
|
|
3147
3196
|
switch (socketType) {
|
|
3148
3197
|
case "partysocket" /* PARTY_SOCKET */:
|
|
3149
3198
|
return new PartySocketClient({
|
|
3150
3199
|
socketUrl: transformedSocketUrl,
|
|
3200
|
+
socketOptions: restSocketOptions,
|
|
3151
3201
|
inboxServiceInstance,
|
|
3152
3202
|
eventEmitterInstance
|
|
3153
3203
|
});
|
|
@@ -3155,6 +3205,7 @@ function createSocket({
|
|
|
3155
3205
|
default:
|
|
3156
3206
|
return new Socket({
|
|
3157
3207
|
socketUrl: transformedSocketUrl,
|
|
3208
|
+
socketOptions: restSocketOptions,
|
|
3158
3209
|
inboxServiceInstance,
|
|
3159
3210
|
eventEmitterInstance
|
|
3160
3211
|
});
|
|
@@ -3172,8 +3223,7 @@ var Novu = class {
|
|
|
3172
3223
|
var _a, _b, _c;
|
|
3173
3224
|
chunk7B52C2XE_js.__privateSet(this, _options2, options);
|
|
3174
3225
|
chunk7B52C2XE_js.__privateSet(this, _inboxService6, new InboxService({
|
|
3175
|
-
apiUrl: options.apiUrl || options.backendUrl
|
|
3176
|
-
userAgent: options.__userAgent
|
|
3226
|
+
apiUrl: options.apiUrl || options.backendUrl
|
|
3177
3227
|
}));
|
|
3178
3228
|
chunk7B52C2XE_js.__privateSet(this, _emitter12, new NovuEventEmitter());
|
|
3179
3229
|
const subscriber = chunkCCAUG7YI_js.buildSubscriber({ subscriberId: options.subscriberId, subscriber: options.subscriber });
|
|
@@ -3210,6 +3260,7 @@ var Novu = class {
|
|
|
3210
3260
|
});
|
|
3211
3261
|
this.socket = createSocket({
|
|
3212
3262
|
socketUrl: options.socketUrl,
|
|
3263
|
+
socketOptions: options.socketOptions,
|
|
3213
3264
|
eventEmitterInstance: chunk7B52C2XE_js.__privateGet(this, _emitter12),
|
|
3214
3265
|
inboxServiceInstance: chunk7B52C2XE_js.__privateGet(this, _inboxService6)
|
|
3215
3266
|
});
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from 'json-logic-js';
|
|
2
|
-
import { S as SeverityLevelEnum, N as NotificationFilter, a as Notification } from './novu-event-emitter-
|
|
3
|
-
export { B as BaseDeleteSubscriptionArgs, f as BaseUpdateSubscriptionArgs, j as ChannelPreference, k as ChannelType, l as Context, C as CreateSubscriptionArgs, m as DaySchedule, n as DefaultSchedule, D as DeleteSubscriptionArgs, E as EventHandler, b as Events, F as FiltersCountResponse, G as GetSubscriptionArgs, o as InboxNotification, I as InstanceDeleteSubscriptionArgs, g as InstanceUpdateSubscriptionArgs, p as ListNotificationsResponse, L as ListSubscriptionsArgs, q as NotificationStatus,
|
|
4
|
-
export { N as Novu } from './novu-
|
|
2
|
+
import { S as SeverityLevelEnum, N as NotificationFilter, a as Notification } from './novu-event-emitter-DlsghVpg.js';
|
|
3
|
+
export { B as BaseDeleteSubscriptionArgs, f as BaseUpdateSubscriptionArgs, j as ChannelPreference, k as ChannelType, l as Context, C as CreateSubscriptionArgs, m as DaySchedule, n as DefaultSchedule, D as DeleteSubscriptionArgs, E as EventHandler, b as Events, F as FiltersCountResponse, G as GetSubscriptionArgs, o as InboxNotification, I as InstanceDeleteSubscriptionArgs, g as InstanceUpdateSubscriptionArgs, p as ListNotificationsResponse, L as ListSubscriptionsArgs, q as NotificationStatus, O as NovuError, r as NovuOptions, s as NovuSocketOptions, t as Preference, P as PreferenceFilter, u as PreferenceLevel, v as PreferencesResponse, w as Schedule, c as SocketEventNames, x as SocketTypeOption, y as StandardNovuOptions, z as Subscriber, h as SubscriptionPreference, A as TimeRange, T as TopicSubscription, H as UnreadCount, U as UpdateSubscriptionArgs, i as UpdateSubscriptionPreferenceArgs, J as WebSocketEvent, K as WeeklySchedule, M as WorkflowCriticalityEnum, W as WorkflowFilter, d as WorkflowGroupFilter, e as WorkflowIdentifierOrId } from './novu-event-emitter-DlsghVpg.js';
|
|
4
|
+
export { N as Novu } from './novu-Dz_wNJko.js';
|
|
5
5
|
|
|
6
6
|
declare const areTagsEqual: (tags1?: string[], tags2?: string[]) => boolean;
|
|
7
7
|
declare const areSeveritiesEqual: (el1?: SeverityLevelEnum | SeverityLevelEnum[], el2?: SeverityLevelEnum | SeverityLevelEnum[]) => boolean;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYYT2PAWE_js = require('./chunk-YYT2PAWE.js');
|
|
4
4
|
var chunkCCAUG7YI_js = require('./chunk-CCAUG7YI.js');
|
|
5
5
|
require('./chunk-7B52C2XE.js');
|
|
6
6
|
|
|
@@ -8,35 +8,35 @@ require('./chunk-7B52C2XE.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "Novu", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkYYT2PAWE_js.Novu; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "SubscriptionPreference", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkYYT2PAWE_js.SubscriptionPreference; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "TopicSubscription", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkYYT2PAWE_js.TopicSubscription; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "areSeveritiesEqual", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkYYT2PAWE_js.areSeveritiesEqual; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "areTagsEqual", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkYYT2PAWE_js.areTagsEqual; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "checkNotificationDataFilter", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkYYT2PAWE_js.checkNotificationDataFilter; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "checkNotificationMatchesFilter", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkYYT2PAWE_js.checkNotificationMatchesFilter; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "isSameFilter", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkYYT2PAWE_js.isSameFilter; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "ChannelType", {
|
|
42
42
|
enumerable: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Context,
|
|
1
|
+
import { l as Context, z as Subscriber, R as NovuEventEmitter, Q as InboxService, o as InboxNotification, a as Notification } from '../novu-event-emitter-DlsghVpg.js';
|
|
2
2
|
import 'json-logic-js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as InboxService, R as NovuEventEmitter, V as Session, X as Result, Y as ScheduleCache, w as Schedule, Z as UpdateScheduleArgs, _ as PreferencesCache, $ as ListPreferencesArgs, t as Preference, a0 as BasePreferenceArgs, a1 as InstancePreferenceArgs, a2 as ListNotificationsArgs, p as ListNotificationsResponse, o as InboxNotification, a as Notification, N as NotificationFilter, a3 as FilterCountArgs, a4 as FilterCountResponse, a5 as FiltersCountArgs, F as FiltersCountResponse, a6 as BaseArgs, a7 as InstanceArgs, a8 as SnoozeArgs, a9 as SubscriptionsCache, z as Subscriber, L as ListSubscriptionsArgs, aa as Options, T as TopicSubscription, G as GetSubscriptionArgs, C as CreateSubscriptionArgs, f as BaseUpdateSubscriptionArgs, g as InstanceUpdateSubscriptionArgs, B as BaseDeleteSubscriptionArgs, I as InstanceDeleteSubscriptionArgs, c as SocketEventNames, ab as EventNames, E as EventHandler, b as Events, ac as ContextValue, r as NovuOptions, l as Context } from './novu-event-emitter-DlsghVpg.js';
|
|
2
2
|
|
|
3
3
|
declare class BaseModule {
|
|
4
4
|
#private;
|
|
@@ -3,10 +3,6 @@ import { RulesLogic } from 'json-logic-js';
|
|
|
3
3
|
type HttpClientOptions = {
|
|
4
4
|
apiVersion?: string;
|
|
5
5
|
apiUrl?: string;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated User-Agent header is not reliable in browsers. Use Novu-Client-Version instead.
|
|
8
|
-
*/
|
|
9
|
-
userAgent?: string;
|
|
10
6
|
headers?: Record<string, string>;
|
|
11
7
|
};
|
|
12
8
|
|
|
@@ -159,6 +155,11 @@ declare enum WebSocketEvent {
|
|
|
159
155
|
UNREAD = "unread_count_changed",
|
|
160
156
|
UNSEEN = "unseen_count_changed"
|
|
161
157
|
}
|
|
158
|
+
type SocketTypeOption = 'cloud' | 'self-hosted';
|
|
159
|
+
type NovuSocketOptions = {
|
|
160
|
+
socketType?: SocketTypeOption;
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
};
|
|
162
163
|
declare enum SeverityLevelEnum {
|
|
163
164
|
HIGH = "high",
|
|
164
165
|
MEDIUM = "medium",
|
|
@@ -252,6 +253,8 @@ type NotificationFilter = {
|
|
|
252
253
|
seen?: boolean;
|
|
253
254
|
data?: Record<string, unknown>;
|
|
254
255
|
severity?: SeverityLevelEnum | SeverityLevelEnum[];
|
|
256
|
+
createdGte?: number;
|
|
257
|
+
createdLte?: number;
|
|
255
258
|
};
|
|
256
259
|
type ChannelPreference = {
|
|
257
260
|
email?: boolean;
|
|
@@ -332,13 +335,18 @@ type KeylessNovuOptions = {} & {
|
|
|
332
335
|
type StandardNovuOptions = {
|
|
333
336
|
/** @deprecated Use apiUrl instead */
|
|
334
337
|
backendUrl?: string;
|
|
335
|
-
/** @internal Should be used internally for testing purposes */
|
|
336
|
-
__userAgent?: string;
|
|
337
338
|
applicationIdentifier: string;
|
|
338
339
|
subscriberHash?: string;
|
|
339
340
|
contextHash?: string;
|
|
340
341
|
apiUrl?: string;
|
|
341
342
|
socketUrl?: string;
|
|
343
|
+
/**
|
|
344
|
+
* Custom socket configuration options. These options will be merged with the default socket configuration.
|
|
345
|
+
* Use `socketType` to explicitly select the socket implementation: `'cloud'` for PartySocket or `'self-hosted'` for socket.io.
|
|
346
|
+
* For socket.io-client connections, supports all socket.io-client options (e.g., `path`, `reconnectionDelay`, `timeout`, etc.).
|
|
347
|
+
* For PartySocket connections, options are applied to the WebSocket instance.
|
|
348
|
+
*/
|
|
349
|
+
socketOptions?: NovuSocketOptions;
|
|
342
350
|
useCache?: boolean;
|
|
343
351
|
defaultSchedule?: DefaultSchedule;
|
|
344
352
|
context?: Context;
|
|
@@ -461,7 +469,7 @@ declare class InboxService {
|
|
|
461
469
|
defaultSchedule?: DefaultSchedule;
|
|
462
470
|
context?: Context;
|
|
463
471
|
}): Promise<Session>;
|
|
464
|
-
fetchNotifications({ after, archived, limit, offset, read, tags, snoozed, seen, data, severity, }: {
|
|
472
|
+
fetchNotifications({ after, archived, limit, offset, read, tags, snoozed, seen, data, severity, createdGte, createdLte, }: {
|
|
465
473
|
tags?: string[];
|
|
466
474
|
read?: boolean;
|
|
467
475
|
archived?: boolean;
|
|
@@ -472,6 +480,8 @@ declare class InboxService {
|
|
|
472
480
|
offset?: number;
|
|
473
481
|
data?: Record<string, unknown>;
|
|
474
482
|
severity?: SeverityLevelEnum | SeverityLevelEnum[];
|
|
483
|
+
createdGte?: number;
|
|
484
|
+
createdLte?: number;
|
|
475
485
|
}): Promise<{
|
|
476
486
|
data: InboxNotification[];
|
|
477
487
|
hasMore: boolean;
|
|
@@ -652,6 +662,8 @@ type ListNotificationsArgs = {
|
|
|
652
662
|
after?: string;
|
|
653
663
|
offset?: number;
|
|
654
664
|
useCache?: boolean;
|
|
665
|
+
createdGte?: number;
|
|
666
|
+
createdLte?: number;
|
|
655
667
|
};
|
|
656
668
|
type ListNotificationsResponse = {
|
|
657
669
|
notifications: Notification[];
|
|
@@ -666,6 +678,8 @@ type FilterCountArgs = {
|
|
|
666
678
|
snoozed?: boolean;
|
|
667
679
|
seen?: boolean;
|
|
668
680
|
severity?: SeverityLevelEnum | SeverityLevelEnum[];
|
|
681
|
+
createdGte?: number;
|
|
682
|
+
createdLte?: number;
|
|
669
683
|
};
|
|
670
684
|
type FiltersCountArgs = {
|
|
671
685
|
filters: Array<{
|
|
@@ -676,6 +690,8 @@ type FiltersCountArgs = {
|
|
|
676
690
|
seen?: boolean;
|
|
677
691
|
data?: Record<string, unknown>;
|
|
678
692
|
severity?: SeverityLevelEnum | SeverityLevelEnum[];
|
|
693
|
+
createdGte?: number;
|
|
694
|
+
createdLte?: number;
|
|
679
695
|
}>;
|
|
680
696
|
};
|
|
681
697
|
type CountArgs = undefined | FilterCountArgs | FiltersCountArgs;
|
|
@@ -849,4 +865,4 @@ declare class NovuEventEmitter {
|
|
|
849
865
|
emit<Key extends EventNames>(type: Key, event?: Events[Key]): void;
|
|
850
866
|
}
|
|
851
867
|
|
|
852
|
-
export { type
|
|
868
|
+
export { type ListPreferencesArgs as $, type TimeRange as A, type BaseDeleteSubscriptionArgs as B, type CreateSubscriptionArgs as C, type DeleteSubscriptionArgs as D, type EventHandler as E, type FiltersCountResponse as F, type GetSubscriptionArgs as G, type UnreadCount as H, type InstanceDeleteSubscriptionArgs as I, WebSocketEvent as J, type WeeklySchedule as K, type ListSubscriptionsArgs as L, WorkflowCriticalityEnum as M, type NotificationFilter as N, NovuError as O, type PreferenceFilter as P, InboxService as Q, NovuEventEmitter as R, SeverityLevelEnum as S, TopicSubscription as T, type UpdateSubscriptionArgs as U, type Session as V, type WorkflowFilter as W, type Result as X, ScheduleCache as Y, type UpdateScheduleArgs as Z, PreferencesCache as _, Notification as a, type BasePreferenceArgs as a0, type InstancePreferenceArgs as a1, type ListNotificationsArgs as a2, type FilterCountArgs as a3, type FilterCountResponse as a4, type FiltersCountArgs as a5, type BaseArgs as a6, type InstanceArgs as a7, type SnoozeArgs as a8, SubscriptionsCache as a9, type Options as aa, type EventNames as ab, type ContextValue as ac, type Events as b, type SocketEventNames as c, type WorkflowGroupFilter as d, type WorkflowIdentifierOrId as e, type BaseUpdateSubscriptionArgs as f, type InstanceUpdateSubscriptionArgs as g, SubscriptionPreference as h, type UpdateSubscriptionPreferenceArgs as i, type ChannelPreference as j, ChannelType as k, type Context as l, type DaySchedule as m, type DefaultSchedule as n, type InboxNotification as o, type ListNotificationsResponse as p, NotificationStatus as q, type NovuOptions as r, type NovuSocketOptions as s, Preference as t, PreferenceLevel as u, type PreferencesResponse as v, Schedule as w, type SocketTypeOption as x, type StandardNovuOptions as y, type Subscriber as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as InboxTheme, Y as SubscriptionTheme } from '../types-
|
|
2
|
-
import '../novu-event-emitter-
|
|
1
|
+
import { G as InboxTheme, Y as SubscriptionTheme } from '../types-kZC7YyfT.js';
|
|
2
|
+
import '../novu-event-emitter-DlsghVpg.js';
|
|
3
3
|
import 'json-logic-js';
|
|
4
|
-
import '../novu-
|
|
4
|
+
import '../novu-Dz_wNJko.js';
|
|
5
5
|
|
|
6
6
|
declare const inboxDarkTheme: InboxTheme;
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Notification,
|
|
2
|
-
import { N as Novu } from './novu-
|
|
1
|
+
import { a as Notification, H as UnreadCount, N as NotificationFilter, t as Preference, w as Schedule, T as TopicSubscription, h as SubscriptionPreference, M as WorkflowCriticalityEnum, r as NovuOptions } from './novu-event-emitter-DlsghVpg.js';
|
|
2
|
+
import { N as Novu } from './novu-Dz_wNJko.js';
|
|
3
3
|
|
|
4
4
|
declare const commonAppearanceKeys: readonly ["root", "button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "collapsible", "tooltipContent", "tooltipTrigger"];
|
|
5
5
|
declare const inboxAppearanceKeys: readonly ["bellIcon", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "datePicker", "datePickerGrid", "datePickerGridRow", "datePickerGridCell", "datePickerGridCellTrigger", "datePickerTrigger", "datePickerGridHeader", "datePickerControl", "datePickerControlPrevTrigger", "datePickerControlNextTrigger", "datePickerControlPrevTrigger__icon", "datePickerControlNextTrigger__icon", "datePickerCalendar", "datePickerHeaderMonth", "datePickerCalendarDay__button", "timePicker", "timePicker__hourSelect", "timePicker__minuteSelect", "timePicker__periodSelect", "timePicker__separator", "timePickerHour__input", "timePickerMinute__input", "snoozeDatePicker", "snoozeDatePicker__actions", "snoozeDatePickerCancel__button", "snoozeDatePickerApply__button", "snoozeDatePicker__timePickerContainer", "snoozeDatePicker__timePickerLabel", "back__button", "skeletonText", "skeletonAvatar", "skeletonSwitch", "skeletonSwitchThumb", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNoticeOverlay", "notificationListEmptyNoticeIcon", "notificationListEmptyNotice", "notificationList__skeleton", "notificationList__skeletonContent", "notificationList__skeletonItem", "notificationList__skeletonAvatar", "notificationList__skeletonText", "notificationListNewNotificationsNotice__button", "notification", "severityHigh__notification", "severityMedium__notification", "severityLow__notification", "notificationBar", "severityHigh__notificationBar", "severityMedium__notificationBar", "severityLow__notificationBar", "notificationContent", "notificationTextContainer", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationSubject__em", "notificationBody", "notificationBody__strong", "notificationBody__em", "notificationBodyContainer", "notificationImage", "notificationImageLoadingFallback", "notificationDate", "notificationDateActionsContainer", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationSnooze__button", "notificationUnsnooze__button", "notificationRead__icon", "notificationUnread__icon", "notificationArchive__icon", "notificationUnarchive__icon", "notificationSnooze__icon", "notificationUnsnooze__icon", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "inboxStatus__dropdownItem__icon", "inboxStatus__dropdownItemCheck__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__icon", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelHeader", "workflowLabelHeaderContainer", "workflowLabelIcon", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "workflowDescription", "preferencesGroupContainer", "preferencesGroupHeader", "preferencesGroupLabelContainer", "preferencesGroupLabelIcon", "preferencesGroupLabel", "preferencesGroupActionsContainer", "preferencesGroupActionsContainerRight__icon", "preferencesGroupBody", "preferencesGroupChannels", "preferencesGroupInfo", "preferencesGroupInfoIcon", "preferencesGroupWorkflows", "channelContainer", "channelIconContainer", "channel__icon", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__back__button__icon", "preferencesHeader__title", "preferencesHeader__icon", "preferencesListEmptyNoticeContainer", "preferencesListEmptyNotice", "preferencesList__skeleton", "preferencesList__skeletonContent", "preferencesList__skeletonItem", "preferencesList__skeletonIcon", "preferencesList__skeletonSwitch", "preferencesList__skeletonSwitchThumb", "preferencesList__skeletonText", "scheduleContainer", "scheduleHeader", "scheduleLabelContainer", "scheduleLabelScheduleIcon", "scheduleLabelInfoIcon", "scheduleLabel", "scheduleActionsContainer", "scheduleActionsContainerRight", "scheduleBody", "scheduleDescription", "scheduleTable", "scheduleTableHeader", "scheduleHeaderColumn", "scheduleTableBody", "scheduleBodyRow", "scheduleBodyColumn", "scheduleInfoContainer", "scheduleInfoIcon", "scheduleInfo", "dayScheduleCopyTitle", "dayScheduleCopyIcon", "dayScheduleCopySelectAll", "dayScheduleCopyDay", "dayScheduleCopyFooterContainer", "dayScheduleCopy__dropdownTrigger", "dayScheduleCopy__dropdownContent", "timeSelect__dropdownTrigger", "timeSelect__time", "timeSelect__dropdownContent", "timeSelect__dropdownItem", "timeSelect__dropdownItemLabel", "timeSelect__dropdownItemLabelContainer", "timeSelect__dropdownItemCheck__icon", "notificationSnooze__dropdownContent", "notificationSnooze__dropdownItem", "notificationSnooze__dropdownItem__icon", "notificationSnoozeCustomTime_popoverContent", "notificationDeliveredAt__badge", "notificationDeliveredAt__icon", "notificationSnoozedUntil__icon", "strong", "em"];
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { T as TopicSubscription, e as WorkflowIdentifierOrId, r as NovuOptions } from '../novu-event-emitter-
|
|
2
|
-
export { a as Notification } from '../novu-event-emitter-
|
|
3
|
-
import { B as BellRenderer, N as NotificationClickHandler, a as NotificationActionClickHandler, b as NotificationRenderer, A as AvatarRenderer, S as SubjectRenderer, c as BodyRenderer, D as DefaultActionsRenderer, C as CustomActionsRenderer, d as NovuProviderProps, e as BaseNovuProviderProps, f as AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-
|
|
4
|
-
export { j as AllAppearanceCallbackFunction, k as AllAppearanceCallbackKeys, l as AllAppearanceKey, m as AllElements, n as AllIconKey, o as AllIconOverrides, p as AllLocalizationKey, q as AllTheme, E as ElementStyles, I as IconRenderer, r as InboxAppearance, s as InboxAppearanceCallback, t as InboxAppearanceCallbackFunction, u as InboxAppearanceCallbackKeys, v as InboxAppearanceKey, w as InboxElements, x as InboxIconKey, y as InboxIconOverrides, z as InboxLocalization, F as InboxLocalizationKey, G as InboxTheme, H as NotificationStatus, J as SubscriptionAppearance, K as SubscriptionAppearanceCallback, L as SubscriptionAppearanceCallbackFunction, M as SubscriptionAppearanceCallbackKeys, O as SubscriptionAppearanceKey, Q as SubscriptionElements, U as SubscriptionIconKey, V as SubscriptionIconOverrides, W as SubscriptionLocalization, X as SubscriptionLocalizationKey, Y as SubscriptionTheme, Z as Variables } from '../types-
|
|
1
|
+
import { T as TopicSubscription, e as WorkflowIdentifierOrId, r as NovuOptions } from '../novu-event-emitter-DlsghVpg.js';
|
|
2
|
+
export { a as Notification } from '../novu-event-emitter-DlsghVpg.js';
|
|
3
|
+
import { B as BellRenderer, N as NotificationClickHandler, a as NotificationActionClickHandler, b as NotificationRenderer, A as AvatarRenderer, S as SubjectRenderer, c as BodyRenderer, D as DefaultActionsRenderer, C as CustomActionsRenderer, d as NovuProviderProps, e as BaseNovuProviderProps, f as AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-kZC7YyfT.js';
|
|
4
|
+
export { j as AllAppearanceCallbackFunction, k as AllAppearanceCallbackKeys, l as AllAppearanceKey, m as AllElements, n as AllIconKey, o as AllIconOverrides, p as AllLocalizationKey, q as AllTheme, E as ElementStyles, I as IconRenderer, r as InboxAppearance, s as InboxAppearanceCallback, t as InboxAppearanceCallbackFunction, u as InboxAppearanceCallbackKeys, v as InboxAppearanceKey, w as InboxElements, x as InboxIconKey, y as InboxIconOverrides, z as InboxLocalization, F as InboxLocalizationKey, G as InboxTheme, H as NotificationStatus, J as SubscriptionAppearance, K as SubscriptionAppearanceCallback, L as SubscriptionAppearanceCallbackFunction, M as SubscriptionAppearanceCallbackKeys, O as SubscriptionAppearanceKey, Q as SubscriptionElements, U as SubscriptionIconKey, V as SubscriptionIconOverrides, W as SubscriptionLocalization, X as SubscriptionLocalizationKey, Y as SubscriptionTheme, Z as Variables } from '../types-kZC7YyfT.js';
|
|
5
5
|
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
6
6
|
import * as solid_js from 'solid-js';
|
|
7
7
|
import { ComponentProps } from 'solid-js';
|
|
8
8
|
import { MountableElement } from 'solid-js/web';
|
|
9
|
-
import { N as Novu } from '../novu-
|
|
9
|
+
import { N as Novu } from '../novu-Dz_wNJko.js';
|
|
10
10
|
import 'json-logic-js';
|
|
11
11
|
|
|
12
12
|
type NotificationRendererProps = {
|