@novu/js 3.14.1 → 3.15.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/dist/cjs/{chunk-LESVJBPO.js → chunk-C23LCEUU.js} +245 -69
- package/dist/cjs/{chunk-CCAUG7YI.js → chunk-YPTYVCVE.js} +15 -15
- package/dist/cjs/index.d.ts +10 -5
- package/dist/cjs/index.js +21 -17
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/cjs/internal/index.js +6 -6
- package/dist/{esm/novu-C7T9MOUL.d.mts → cjs/novu-CI_mzxvm.d.ts} +3 -3
- package/dist/{esm/novu-event-emitter-DlsghVpg.d.mts → cjs/novu-event-emitter-D9AphR7g.d.ts} +39 -17
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/cjs/{types-kZC7YyfT.d.ts → types-DXbz7pFA.d.ts} +7 -4
- package/dist/cjs/ui/index.d.ts +5 -5
- package/dist/cjs/ui/index.js +66 -54
- package/dist/esm/{chunk-W4JUMCRN.mjs → chunk-3WBJEI4O.mjs} +15 -15
- package/dist/esm/{chunk-JK4KFZIA.mjs → chunk-DXONCY42.mjs} +197 -22
- package/dist/esm/index.d.mts +10 -5
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/esm/internal/index.mjs +1 -1
- package/dist/{cjs/novu-Dz_wNJko.d.ts → esm/novu-DTGsXJjv.d.mts} +3 -3
- package/dist/{cjs/novu-event-emitter-DlsghVpg.d.ts → esm/novu-event-emitter-D9AphR7g.d.mts} +39 -17
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/esm/{types-ChYSuHwX.d.mts → types-zMKIpsOL.d.mts} +7 -4
- package/dist/esm/ui/index.d.mts +5 -5
- package/dist/esm/ui/index.mjs +59 -47
- package/dist/novu.min.js +16 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NovuError, buildSubscriber, buildContextKey,
|
|
1
|
+
import { NovuError, buildSubscriber, buildContextKey, Notification, read, unread, seen, archive, unarchive, deleteNotification, snooze, unsnooze, completeAction, revertAction, readAll, seenAll, archiveAll, archiveAllRead, deleteAll, buildSubscriptionIdentifier, createNotification } from './chunk-3WBJEI4O.mjs';
|
|
2
2
|
import { __privateAdd, __privateSet, __spreadValues, __privateGet, __async, __spreadProps, __objRest, __privateMethod } from './chunk-STZMOEWR.mjs';
|
|
3
3
|
import mitt from 'mitt';
|
|
4
4
|
import 'event-target-polyfill';
|
|
@@ -18,8 +18,145 @@ var arrayValuesEqual = (arr1, arr2) => {
|
|
|
18
18
|
}
|
|
19
19
|
return arr1.every((value, index) => value === arr2[index]);
|
|
20
20
|
};
|
|
21
|
+
var MAX_TAG_GROUPS = 30;
|
|
22
|
+
var MAX_TAGS_PER_GROUP = 100;
|
|
23
|
+
var MAX_TOTAL_TAGS = 200;
|
|
24
|
+
var TagsFilterValidationError = class extends Error {
|
|
25
|
+
constructor(message) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.name = "TagsFilterValidationError";
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function validateOrGroupStrings(group, maxLen) {
|
|
31
|
+
if (group.length > maxLen) {
|
|
32
|
+
throw new TagsFilterValidationError(`At most ${maxLen} tags are allowed in a single OR-group`);
|
|
33
|
+
}
|
|
34
|
+
for (const t of group) {
|
|
35
|
+
if (typeof t !== "string") {
|
|
36
|
+
throw new TagsFilterValidationError("Tags must be strings");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return group;
|
|
40
|
+
}
|
|
41
|
+
function normalizeTagGroupsFromObject(obj) {
|
|
42
|
+
const keys = Object.keys(obj);
|
|
43
|
+
const hasOr = Object.prototype.hasOwnProperty.call(obj, "or");
|
|
44
|
+
const hasAnd = Object.prototype.hasOwnProperty.call(obj, "and");
|
|
45
|
+
if (hasOr && hasAnd) {
|
|
46
|
+
throw new TagsFilterValidationError('Tags filter cannot have both "or" and "and"');
|
|
47
|
+
}
|
|
48
|
+
if (hasOr) {
|
|
49
|
+
if (keys.length !== 1) {
|
|
50
|
+
throw new TagsFilterValidationError("Invalid tags filter object");
|
|
51
|
+
}
|
|
52
|
+
const orVal = obj["or"];
|
|
53
|
+
if (!Array.isArray(orVal)) {
|
|
54
|
+
throw new TagsFilterValidationError('"or" must be an array of strings');
|
|
55
|
+
}
|
|
56
|
+
if (orVal.length === 0) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
const group = validateOrGroupStrings(orVal, MAX_TAGS_PER_GROUP);
|
|
60
|
+
return [group];
|
|
61
|
+
}
|
|
62
|
+
if (hasAnd) {
|
|
63
|
+
if (keys.length !== 1) {
|
|
64
|
+
throw new TagsFilterValidationError("Invalid tags filter object");
|
|
65
|
+
}
|
|
66
|
+
const andVal = obj["and"];
|
|
67
|
+
if (!Array.isArray(andVal)) {
|
|
68
|
+
throw new TagsFilterValidationError('"and" must be an array');
|
|
69
|
+
}
|
|
70
|
+
if (andVal.length === 0) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
if (andVal.length > MAX_TAG_GROUPS) {
|
|
74
|
+
throw new TagsFilterValidationError(`At most ${MAX_TAG_GROUPS} tag groups are allowed`);
|
|
75
|
+
}
|
|
76
|
+
const groups = [];
|
|
77
|
+
let total = 0;
|
|
78
|
+
for (const item of andVal) {
|
|
79
|
+
if (typeof item !== "object" || item === null || Array.isArray(item)) {
|
|
80
|
+
throw new TagsFilterValidationError('Each "and" entry must be an object { or: string[] }');
|
|
81
|
+
}
|
|
82
|
+
const itemKeys = Object.keys(item);
|
|
83
|
+
if (itemKeys.length !== 1 || !Object.prototype.hasOwnProperty.call(item, "or")) {
|
|
84
|
+
throw new TagsFilterValidationError('Each "and" entry must be { or: string[] }');
|
|
85
|
+
}
|
|
86
|
+
const innerOr = item.or;
|
|
87
|
+
if (!Array.isArray(innerOr)) {
|
|
88
|
+
throw new TagsFilterValidationError('"or" must be an array of strings');
|
|
89
|
+
}
|
|
90
|
+
if (innerOr.length === 0) {
|
|
91
|
+
throw new TagsFilterValidationError("Each tag group must be a non-empty array of strings");
|
|
92
|
+
}
|
|
93
|
+
const group = validateOrGroupStrings(innerOr, MAX_TAGS_PER_GROUP);
|
|
94
|
+
total += group.length;
|
|
95
|
+
groups.push(group);
|
|
96
|
+
}
|
|
97
|
+
if (total > MAX_TOTAL_TAGS) {
|
|
98
|
+
throw new TagsFilterValidationError(`At most ${MAX_TOTAL_TAGS} total tag values are allowed`);
|
|
99
|
+
}
|
|
100
|
+
return groups;
|
|
101
|
+
}
|
|
102
|
+
throw new TagsFilterValidationError('Tags filter object must have "or" or "and"');
|
|
103
|
+
}
|
|
104
|
+
function normalizeTagGroups(tags) {
|
|
105
|
+
if (tags === void 0) {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
if (tags === null) {
|
|
109
|
+
throw new TagsFilterValidationError("Tags must be an array or object");
|
|
110
|
+
}
|
|
111
|
+
if (typeof tags === "object" && !Array.isArray(tags)) {
|
|
112
|
+
return normalizeTagGroupsFromObject(tags);
|
|
113
|
+
}
|
|
114
|
+
if (!Array.isArray(tags)) {
|
|
115
|
+
throw new TagsFilterValidationError("Tags must be an array or object");
|
|
116
|
+
}
|
|
117
|
+
if (tags.length === 0) {
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
if (Array.isArray(tags[0])) {
|
|
121
|
+
throw new TagsFilterValidationError(
|
|
122
|
+
"Nested tag arrays are not supported; use { and: [{ or: string[] }, ...] } for multiple OR-groups"
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const flat = tags;
|
|
126
|
+
if (flat.length > MAX_TAGS_PER_GROUP) {
|
|
127
|
+
throw new TagsFilterValidationError(`At most ${MAX_TAGS_PER_GROUP} tags are allowed in a single OR-group`);
|
|
128
|
+
}
|
|
129
|
+
for (const t of flat) {
|
|
130
|
+
if (typeof t !== "string") {
|
|
131
|
+
throw new TagsFilterValidationError("Tags must be strings");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return [flat];
|
|
135
|
+
}
|
|
136
|
+
function tagsFilterComparableString(tags) {
|
|
137
|
+
if (tags === void 0) {
|
|
138
|
+
return "";
|
|
139
|
+
}
|
|
140
|
+
const groups = normalizeTagGroups(tags);
|
|
141
|
+
if (groups.length === 0) {
|
|
142
|
+
return "";
|
|
143
|
+
}
|
|
144
|
+
const sortedGroups = Array.from(
|
|
145
|
+
new Map(
|
|
146
|
+
groups.map((group) => {
|
|
147
|
+
const canonicalGroup = Array.from(new Set(group)).sort((a, b) => a.localeCompare(b));
|
|
148
|
+
return [JSON.stringify(canonicalGroup), canonicalGroup];
|
|
149
|
+
})
|
|
150
|
+
).values()
|
|
151
|
+
).sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b)));
|
|
152
|
+
return JSON.stringify(sortedGroups);
|
|
153
|
+
}
|
|
21
154
|
var areTagsEqual = (tags1, tags2) => {
|
|
22
|
-
|
|
155
|
+
try {
|
|
156
|
+
return tagsFilterComparableString(tags1) === tagsFilterComparableString(tags2);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
23
160
|
};
|
|
24
161
|
var areSeveritiesEqual = (el1, el2) => {
|
|
25
162
|
const severity1 = Array.isArray(el1) ? el1 : el1 ? [el1] : [];
|
|
@@ -69,13 +206,19 @@ function checkNotificationDataFilter(notificationData, filterData) {
|
|
|
69
206
|
});
|
|
70
207
|
}
|
|
71
208
|
function checkNotificationTagFilter(notificationTags, filterTags) {
|
|
72
|
-
|
|
209
|
+
let groups;
|
|
210
|
+
try {
|
|
211
|
+
groups = normalizeTagGroups(filterTags);
|
|
212
|
+
} catch (e) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
if (groups.length === 0) {
|
|
73
216
|
return true;
|
|
74
217
|
}
|
|
75
218
|
if (!notificationTags || notificationTags.length === 0) {
|
|
76
219
|
return false;
|
|
77
220
|
}
|
|
78
|
-
return
|
|
221
|
+
return groups.every((group) => group.some((tag) => notificationTags.includes(tag)));
|
|
79
222
|
}
|
|
80
223
|
function checkBasicFilters(notification, filter) {
|
|
81
224
|
if (filter.read !== void 0 && notification.isRead !== filter.read) {
|
|
@@ -199,7 +342,7 @@ _useCache = new WeakMap();
|
|
|
199
342
|
_isStale = new WeakMap();
|
|
200
343
|
|
|
201
344
|
// src/subscriptions/helpers.ts
|
|
202
|
-
var listSubscriptions = (_0) => __async(
|
|
345
|
+
var listSubscriptions = (_0) => __async(null, [_0], function* ({
|
|
203
346
|
emitter,
|
|
204
347
|
apiService,
|
|
205
348
|
cache,
|
|
@@ -227,7 +370,7 @@ var listSubscriptions = (_0) => __async(void 0, [_0], function* ({
|
|
|
227
370
|
return { error: new NovuError("Failed to fetch subscriptions", error) };
|
|
228
371
|
}
|
|
229
372
|
});
|
|
230
|
-
var getSubscription = (_0) => __async(
|
|
373
|
+
var getSubscription = (_0) => __async(null, [_0], function* ({
|
|
231
374
|
emitter,
|
|
232
375
|
apiService,
|
|
233
376
|
cache,
|
|
@@ -257,7 +400,7 @@ var getSubscription = (_0) => __async(void 0, [_0], function* ({
|
|
|
257
400
|
return { error: new NovuError("Failed to fetch subscription", error) };
|
|
258
401
|
}
|
|
259
402
|
});
|
|
260
|
-
var createSubscription = (_0) => __async(
|
|
403
|
+
var createSubscription = (_0) => __async(null, [_0], function* ({
|
|
261
404
|
emitter,
|
|
262
405
|
apiService,
|
|
263
406
|
cache,
|
|
@@ -288,7 +431,7 @@ var createSubscription = (_0) => __async(void 0, [_0], function* ({
|
|
|
288
431
|
return { error: new NovuError("Failed to create subscription", error) };
|
|
289
432
|
}
|
|
290
433
|
});
|
|
291
|
-
var updateSubscription = (_0) => __async(
|
|
434
|
+
var updateSubscription = (_0) => __async(null, [_0], function* ({
|
|
292
435
|
emitter,
|
|
293
436
|
apiService,
|
|
294
437
|
cache,
|
|
@@ -315,7 +458,7 @@ var updateSubscription = (_0) => __async(void 0, [_0], function* ({
|
|
|
315
458
|
return { error: new NovuError("Failed to update subscription", error) };
|
|
316
459
|
}
|
|
317
460
|
});
|
|
318
|
-
var updateSubscriptionPreference = (_0) => __async(
|
|
461
|
+
var updateSubscriptionPreference = (_0) => __async(null, [_0], function* ({
|
|
319
462
|
emitter,
|
|
320
463
|
apiService,
|
|
321
464
|
cache,
|
|
@@ -354,7 +497,7 @@ var updateSubscriptionPreference = (_0) => __async(void 0, [_0], function* ({
|
|
|
354
497
|
return { error: new NovuError("Failed to update subscription", error) };
|
|
355
498
|
}
|
|
356
499
|
});
|
|
357
|
-
var bulkUpdateSubscriptionPreference = (_0) => __async(
|
|
500
|
+
var bulkUpdateSubscriptionPreference = (_0) => __async(null, [_0], function* ({
|
|
358
501
|
emitter,
|
|
359
502
|
apiService,
|
|
360
503
|
cache,
|
|
@@ -391,7 +534,7 @@ var bulkUpdateSubscriptionPreference = (_0) => __async(void 0, [_0], function* (
|
|
|
391
534
|
return { error: new NovuError("Failed to bulk update subscription preferences", error) };
|
|
392
535
|
}
|
|
393
536
|
});
|
|
394
|
-
var deleteSubscription = (_0) => __async(
|
|
537
|
+
var deleteSubscription = (_0) => __async(null, [_0], function* ({
|
|
395
538
|
emitter,
|
|
396
539
|
apiService,
|
|
397
540
|
args
|
|
@@ -893,7 +1036,7 @@ _contextKey = new WeakMap();
|
|
|
893
1036
|
|
|
894
1037
|
// src/api/http-client.ts
|
|
895
1038
|
var DEFAULT_API_VERSION = "v1";
|
|
896
|
-
var DEFAULT_CLIENT_VERSION = `${"@novu/js"}@${"3.
|
|
1039
|
+
var DEFAULT_CLIENT_VERSION = `${"@novu/js"}@${"3.15.0"}`;
|
|
897
1040
|
var HttpClient = class {
|
|
898
1041
|
constructor(options = {}) {
|
|
899
1042
|
// Environment variable for local development that overrides the default API endpoint without affecting the Inbox DX
|
|
@@ -1007,6 +1150,39 @@ function combineUrl(...args) {
|
|
|
1007
1150
|
// src/api/inbox-service.ts
|
|
1008
1151
|
var INBOX_ROUTE = "/inbox";
|
|
1009
1152
|
var INBOX_NOTIFICATIONS_ROUTE = `${INBOX_ROUTE}/notifications`;
|
|
1153
|
+
function appendTagsToSearchParams(searchParams, tags) {
|
|
1154
|
+
if (tags === void 0) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
if (Array.isArray(tags)) {
|
|
1158
|
+
if (tags.length === 0) {
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
for (const tag of tags) {
|
|
1162
|
+
searchParams.append("tags[]", tag);
|
|
1163
|
+
}
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
if ("or" in tags) {
|
|
1167
|
+
if (tags.or.length === 0) {
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
for (const tag of tags.or) {
|
|
1171
|
+
searchParams.append("tags[]", tag);
|
|
1172
|
+
}
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
if ("and" in tags) {
|
|
1176
|
+
if (tags.and.length === 0) {
|
|
1177
|
+
return;
|
|
1178
|
+
}
|
|
1179
|
+
tags.and.forEach((group, groupIndex) => {
|
|
1180
|
+
for (const tag of group.or) {
|
|
1181
|
+
searchParams.append(`tags[${groupIndex}][]`, tag);
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1010
1186
|
var _httpClient;
|
|
1011
1187
|
var InboxService = class {
|
|
1012
1188
|
constructor(options = {}) {
|
|
@@ -1058,11 +1234,7 @@ var InboxService = class {
|
|
|
1058
1234
|
if (offset) {
|
|
1059
1235
|
searchParams.append("offset", `${offset}`);
|
|
1060
1236
|
}
|
|
1061
|
-
|
|
1062
|
-
for (const tag of tags) {
|
|
1063
|
-
searchParams.append("tags[]", tag);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1237
|
+
appendTagsToSearchParams(searchParams, tags);
|
|
1066
1238
|
if (read2 !== void 0) {
|
|
1067
1239
|
searchParams.append("read", `${read2}`);
|
|
1068
1240
|
}
|
|
@@ -1890,7 +2062,10 @@ var Notifications = class extends BaseModule {
|
|
|
1890
2062
|
});
|
|
1891
2063
|
}
|
|
1892
2064
|
archiveAllRead() {
|
|
1893
|
-
return __async(this, arguments, function* ({
|
|
2065
|
+
return __async(this, arguments, function* ({
|
|
2066
|
+
tags,
|
|
2067
|
+
data
|
|
2068
|
+
} = {}) {
|
|
1894
2069
|
return this.callWithSession(
|
|
1895
2070
|
() => __async(this, null, function* () {
|
|
1896
2071
|
return archiveAllRead({
|
|
@@ -2035,7 +2210,7 @@ _scheduleCache = new WeakMap();
|
|
|
2035
2210
|
_useCache7 = new WeakMap();
|
|
2036
2211
|
|
|
2037
2212
|
// src/preferences/helpers.ts
|
|
2038
|
-
var updatePreference = (_0) => __async(
|
|
2213
|
+
var updatePreference = (_0) => __async(null, [_0], function* ({
|
|
2039
2214
|
emitter,
|
|
2040
2215
|
apiService,
|
|
2041
2216
|
cache,
|
|
@@ -2083,7 +2258,7 @@ var updatePreference = (_0) => __async(void 0, [_0], function* ({
|
|
|
2083
2258
|
return { error: new NovuError("Failed to update preference", error) };
|
|
2084
2259
|
}
|
|
2085
2260
|
});
|
|
2086
|
-
var bulkUpdatePreference = (_0) => __async(
|
|
2261
|
+
var bulkUpdatePreference = (_0) => __async(null, [_0], function* ({
|
|
2087
2262
|
emitter,
|
|
2088
2263
|
apiService,
|
|
2089
2264
|
cache,
|
|
@@ -2176,7 +2351,7 @@ var optimisticUpdateWorkflowPreferences = ({
|
|
|
2176
2351
|
}
|
|
2177
2352
|
});
|
|
2178
2353
|
};
|
|
2179
|
-
var updateSchedule = (_0) => __async(
|
|
2354
|
+
var updateSchedule = (_0) => __async(null, [_0], function* ({
|
|
2180
2355
|
emitter,
|
|
2181
2356
|
apiService,
|
|
2182
2357
|
cache,
|
|
@@ -3341,4 +3516,4 @@ _session = new WeakMap();
|
|
|
3341
3516
|
_inboxService6 = new WeakMap();
|
|
3342
3517
|
_options2 = new WeakMap();
|
|
3343
3518
|
|
|
3344
|
-
export { DEFAULT_API_VERSION, Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, checkNotificationTagFilter, isBrowser, isSameFilter };
|
|
3519
|
+
export { DEFAULT_API_VERSION, Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, checkNotificationTagFilter, isBrowser, isSameFilter, normalizeTagGroups };
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export * from 'json-logic-js';
|
|
2
|
-
import { S as SeverityLevelEnum, N as
|
|
3
|
-
export { B as BaseDeleteSubscriptionArgs,
|
|
4
|
-
export { N as Novu } from './novu-
|
|
2
|
+
import { S as SeverityLevelEnum, T as TagsFilter, N as Notification, a as NotificationFilter } from './novu-event-emitter-D9AphR7g.mjs';
|
|
3
|
+
export { B as BaseDeleteSubscriptionArgs, b as BaseUpdateSubscriptionArgs, C as ChannelPreference, c as ChannelType, d as Context, e as CreateSubscriptionArgs, D as DaySchedule, f as DefaultSchedule, g as DeleteSubscriptionArgs, E as EventHandler, h as Events, F as FiltersCountResponse, G as GetSubscriptionArgs, I as InboxNotification, i as InstanceDeleteSubscriptionArgs, j as InstanceUpdateSubscriptionArgs, L as ListNotificationsResponse, k as ListSubscriptionsArgs, l as NotificationStatus, m as NovuError, n as NovuOptions, o as NovuSocketOptions, P as Preference, p as PreferenceFilter, q as PreferenceLevel, r as PreferencesResponse, s as Schedule, t as SocketEventNames, u as SocketTypeOption, v as StandardNovuOptions, w as Subscriber, x as SubscriptionPreference, y as TagsFilterAndForm, z as TagsFilterOrGroup, A as TimeRange, H as TopicSubscription, U as UnreadCount, J as UpdateSubscriptionArgs, K as UpdateSubscriptionPreferenceArgs, W as WebSocketEvent, M as WeeklySchedule, O as WorkflowCriticalityEnum, Q as WorkflowFilter, R as WorkflowGroupFilter, V as WorkflowIdentifierOrId } from './novu-event-emitter-D9AphR7g.mjs';
|
|
4
|
+
export { N as Novu } from './novu-DTGsXJjv.mjs';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes inbox tag filters to CNF: `string[][]` where each inner array is one OR-group.
|
|
8
|
+
* A flat list `['a','b']` is normalized to one OR-group `[['a','b']]`. Empty input → `[]` (no tag filter).
|
|
9
|
+
*/
|
|
10
|
+
declare function normalizeTagGroups(tags: TagsFilter | undefined): string[][];
|
|
11
|
+
declare const areTagsEqual: (tags1?: TagsFilter, tags2?: TagsFilter) => boolean;
|
|
7
12
|
declare const areSeveritiesEqual: (el1?: SeverityLevelEnum | SeverityLevelEnum[], el2?: SeverityLevelEnum | SeverityLevelEnum[]) => boolean;
|
|
8
13
|
declare const isSameFilter: (filter1: NotificationFilter, filter2: NotificationFilter) => boolean;
|
|
9
14
|
declare function checkNotificationDataFilter(notificationData: Notification['data'], filterData: NotificationFilter['data']): boolean;
|
|
@@ -13,4 +18,4 @@ declare function checkNotificationDataFilter(notificationData: Notification['dat
|
|
|
13
18
|
*/
|
|
14
19
|
declare function checkNotificationMatchesFilter(notification: Notification, filter: NotificationFilter): boolean;
|
|
15
20
|
|
|
16
|
-
export { Notification, NotificationFilter, SeverityLevelEnum, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter };
|
|
21
|
+
export { Notification, NotificationFilter, SeverityLevelEnum, TagsFilter, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter } from './chunk-
|
|
2
|
-
export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-
|
|
1
|
+
export { Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups } from './chunk-DXONCY42.mjs';
|
|
2
|
+
export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-3WBJEI4O.mjs';
|
|
3
3
|
import './chunk-STZMOEWR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as Context, w as Subscriber, Y as NovuEventEmitter, X as InboxService, I as InboxNotification, N as Notification } from '../novu-event-emitter-D9AphR7g.mjs';
|
|
2
2
|
import 'json-logic-js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-
|
|
1
|
+
export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-3WBJEI4O.mjs';
|
|
2
2
|
import '../chunk-STZMOEWR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { X as InboxService, Y as NovuEventEmitter, Z as Session, _ as Result, $ as ScheduleCache, s as Schedule, a0 as UpdateScheduleArgs, a1 as PreferencesCache, a2 as ListPreferencesArgs, P as Preference, a3 as BasePreferenceArgs, a4 as InstancePreferenceArgs, a5 as ListNotificationsArgs, L as ListNotificationsResponse, I as InboxNotification, N as Notification, a as NotificationFilter, a6 as FilterCountArgs, a7 as FilterCountResponse, a8 as FiltersCountArgs, F as FiltersCountResponse, a9 as BaseArgs, aa as InstanceArgs, ab as SnoozeArgs, ac as SubscriptionsCache, w as Subscriber, k as ListSubscriptionsArgs, ad as Options, H as TopicSubscription, G as GetSubscriptionArgs, e as CreateSubscriptionArgs, b as BaseUpdateSubscriptionArgs, j as InstanceUpdateSubscriptionArgs, B as BaseDeleteSubscriptionArgs, i as InstanceDeleteSubscriptionArgs, t as SocketEventNames, ae as EventNames, E as EventHandler, h as Events, af as ContextValue, n as NovuOptions, d as Context } from './novu-event-emitter-D9AphR7g.mjs';
|
|
2
2
|
|
|
3
3
|
declare class BaseModule {
|
|
4
4
|
#private;
|
|
@@ -116,8 +116,8 @@ declare class Notifications extends BaseModule {
|
|
|
116
116
|
tags?: NotificationFilter['tags'];
|
|
117
117
|
data?: Record<string, unknown>;
|
|
118
118
|
}): Result<void>;
|
|
119
|
-
archiveAllRead({ tags, data }?: {
|
|
120
|
-
tags?:
|
|
119
|
+
archiveAllRead({ tags, data, }?: {
|
|
120
|
+
tags?: NotificationFilter['tags'];
|
|
121
121
|
data?: Record<string, unknown>;
|
|
122
122
|
}): Result<void>;
|
|
123
123
|
deleteAll({ tags, data, }?: {
|
|
@@ -219,6 +219,28 @@ type Workflow = {
|
|
|
219
219
|
tags?: string[];
|
|
220
220
|
severity: SeverityLevelEnum;
|
|
221
221
|
};
|
|
222
|
+
type TagsFilterOrGroup = {
|
|
223
|
+
or: string[];
|
|
224
|
+
};
|
|
225
|
+
type TagsFilterAndForm = {
|
|
226
|
+
and: TagsFilterOrGroup[];
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Inbox tag filter: a **single** OR-group as `string[]` or `{ or: string[] }`, or **multiple** OR-groups (AND of OR) as `{ and: [{ or: string[] }, ...] }`.
|
|
230
|
+
*
|
|
231
|
+
* @example Single OR-group — match notifications tagged `promo` **or** `sale`
|
|
232
|
+
* ```ts
|
|
233
|
+
* const tags: TagsFilter = ['promo', 'sale'];
|
|
234
|
+
* ```
|
|
235
|
+
*
|
|
236
|
+
* @example AND of OR-groups — match (`urgent` **or** `critical`) **and** (`billing`)
|
|
237
|
+
* ```ts
|
|
238
|
+
* const tags: TagsFilter = {
|
|
239
|
+
* and: [{ or: ['urgent', 'critical'] }, { or: ['billing'] }],
|
|
240
|
+
* };
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
type TagsFilter = string[] | TagsFilterOrGroup | TagsFilterAndForm;
|
|
222
244
|
type InboxNotification = {
|
|
223
245
|
id: string;
|
|
224
246
|
transactionId: string;
|
|
@@ -246,7 +268,7 @@ type InboxNotification = {
|
|
|
246
268
|
severity: SeverityLevelEnum;
|
|
247
269
|
};
|
|
248
270
|
type NotificationFilter = {
|
|
249
|
-
tags?:
|
|
271
|
+
tags?: TagsFilter;
|
|
250
272
|
read?: boolean;
|
|
251
273
|
archived?: boolean;
|
|
252
274
|
snoozed?: boolean;
|
|
@@ -470,7 +492,7 @@ declare class InboxService {
|
|
|
470
492
|
context?: Context;
|
|
471
493
|
}): Promise<Session>;
|
|
472
494
|
fetchNotifications({ after, archived, limit, offset, read, tags, snoozed, seen, data, severity, createdGte, createdLte, }: {
|
|
473
|
-
tags?:
|
|
495
|
+
tags?: TagsFilter;
|
|
474
496
|
read?: boolean;
|
|
475
497
|
archived?: boolean;
|
|
476
498
|
snoozed?: boolean;
|
|
@@ -489,7 +511,7 @@ declare class InboxService {
|
|
|
489
511
|
}>;
|
|
490
512
|
count({ filters, }: {
|
|
491
513
|
filters: Array<{
|
|
492
|
-
tags?:
|
|
514
|
+
tags?: TagsFilter;
|
|
493
515
|
read?: boolean;
|
|
494
516
|
archived?: boolean;
|
|
495
517
|
snoozed?: boolean;
|
|
@@ -510,25 +532,25 @@ declare class InboxService {
|
|
|
510
532
|
snooze(notificationId: string, snoozeUntil: string): Promise<InboxNotification>;
|
|
511
533
|
unsnooze(notificationId: string): Promise<InboxNotification>;
|
|
512
534
|
readAll({ tags, data }: {
|
|
513
|
-
tags?:
|
|
535
|
+
tags?: TagsFilter;
|
|
514
536
|
data?: Record<string, unknown>;
|
|
515
537
|
}): Promise<void>;
|
|
516
538
|
archiveAll({ tags, data }: {
|
|
517
|
-
tags?:
|
|
539
|
+
tags?: TagsFilter;
|
|
518
540
|
data?: Record<string, unknown>;
|
|
519
541
|
}): Promise<void>;
|
|
520
542
|
archiveAllRead({ tags, data }: {
|
|
521
|
-
tags?:
|
|
543
|
+
tags?: TagsFilter;
|
|
522
544
|
data?: Record<string, unknown>;
|
|
523
545
|
}): Promise<void>;
|
|
524
546
|
delete(notificationId: string): Promise<void>;
|
|
525
547
|
deleteAll({ tags, data }: {
|
|
526
|
-
tags?:
|
|
548
|
+
tags?: TagsFilter;
|
|
527
549
|
data?: Record<string, unknown>;
|
|
528
550
|
}): Promise<void>;
|
|
529
551
|
markAsSeen({ notificationIds, tags, data, }: {
|
|
530
552
|
notificationIds?: string[];
|
|
531
|
-
tags?:
|
|
553
|
+
tags?: TagsFilter;
|
|
532
554
|
data?: Record<string, unknown>;
|
|
533
555
|
}): Promise<void>;
|
|
534
556
|
seen(notificationId: string): Promise<void>;
|
|
@@ -651,7 +673,7 @@ declare class Notification implements Pick<NovuEventEmitter, 'on'>, InboxNotific
|
|
|
651
673
|
}
|
|
652
674
|
|
|
653
675
|
type ListNotificationsArgs = {
|
|
654
|
-
tags?:
|
|
676
|
+
tags?: TagsFilter;
|
|
655
677
|
read?: boolean;
|
|
656
678
|
data?: Record<string, unknown>;
|
|
657
679
|
archived?: boolean;
|
|
@@ -671,7 +693,7 @@ type ListNotificationsResponse = {
|
|
|
671
693
|
filter: NotificationFilter;
|
|
672
694
|
};
|
|
673
695
|
type FilterCountArgs = {
|
|
674
|
-
tags?:
|
|
696
|
+
tags?: TagsFilter;
|
|
675
697
|
data?: Record<string, unknown>;
|
|
676
698
|
read?: boolean;
|
|
677
699
|
archived?: boolean;
|
|
@@ -683,7 +705,7 @@ type FilterCountArgs = {
|
|
|
683
705
|
};
|
|
684
706
|
type FiltersCountArgs = {
|
|
685
707
|
filters: Array<{
|
|
686
|
-
tags?:
|
|
708
|
+
tags?: TagsFilter;
|
|
687
709
|
read?: boolean;
|
|
688
710
|
archived?: boolean;
|
|
689
711
|
snoozed?: boolean;
|
|
@@ -764,25 +786,25 @@ type NotificationUnsnoozeEvents = BaseEvents<'notification.unsnooze', UnsnoozeAr
|
|
|
764
786
|
type NotificationCompleteActionEvents = BaseEvents<'notification.complete_action', CompleteArgs, Notification>;
|
|
765
787
|
type NotificationRevertActionEvents = BaseEvents<'notification.revert_action', RevertArgs, Notification>;
|
|
766
788
|
type NotificationsReadAllEvents = BaseEvents<'notifications.read_all', {
|
|
767
|
-
tags?:
|
|
789
|
+
tags?: TagsFilter;
|
|
768
790
|
data?: Record<string, unknown>;
|
|
769
791
|
}, Notification[]>;
|
|
770
792
|
type NotificationsSeenAllEvents = BaseEvents<'notifications.seen_all', {
|
|
771
793
|
notificationIds: string[];
|
|
772
794
|
} | {
|
|
773
|
-
tags?:
|
|
795
|
+
tags?: TagsFilter;
|
|
774
796
|
data?: Record<string, unknown>;
|
|
775
797
|
} | {}, Notification[]>;
|
|
776
798
|
type NotificationsArchivedAllEvents = BaseEvents<'notifications.archive_all', {
|
|
777
|
-
tags?:
|
|
799
|
+
tags?: TagsFilter;
|
|
778
800
|
data?: Record<string, unknown>;
|
|
779
801
|
}, Notification[]>;
|
|
780
802
|
type NotificationsReadArchivedAllEvents = BaseEvents<'notifications.archive_all_read', {
|
|
781
|
-
tags?:
|
|
803
|
+
tags?: TagsFilter;
|
|
782
804
|
data?: Record<string, unknown>;
|
|
783
805
|
}, Notification[]>;
|
|
784
806
|
type NotificationsDeletedAllEvents = BaseEvents<'notifications.delete_all', {
|
|
785
|
-
tags?:
|
|
807
|
+
tags?: TagsFilter;
|
|
786
808
|
data?: Record<string, unknown>;
|
|
787
809
|
}, Notification[]>;
|
|
788
810
|
type PreferencesFetchEvents = BaseEvents<'preferences.list', ListPreferencesArgs, Preference[]>;
|
|
@@ -865,4 +887,4 @@ declare class NovuEventEmitter {
|
|
|
865
887
|
emit<Key extends EventNames>(type: Key, event?: Events[Key]): void;
|
|
866
888
|
}
|
|
867
889
|
|
|
868
|
-
export {
|
|
890
|
+
export { ScheduleCache as $, type TimeRange as A, type BaseDeleteSubscriptionArgs as B, type ChannelPreference as C, type DaySchedule as D, type EventHandler as E, type FiltersCountResponse as F, type GetSubscriptionArgs as G, TopicSubscription as H, type InboxNotification as I, type UpdateSubscriptionArgs as J, type UpdateSubscriptionPreferenceArgs as K, type ListNotificationsResponse as L, type WeeklySchedule as M, Notification as N, WorkflowCriticalityEnum as O, Preference as P, type WorkflowFilter as Q, type WorkflowGroupFilter as R, SeverityLevelEnum as S, type TagsFilter as T, type UnreadCount as U, type WorkflowIdentifierOrId as V, WebSocketEvent as W, InboxService as X, NovuEventEmitter as Y, type Session as Z, type Result as _, type NotificationFilter as a, type UpdateScheduleArgs as a0, PreferencesCache as a1, type ListPreferencesArgs as a2, type BasePreferenceArgs as a3, type InstancePreferenceArgs as a4, type ListNotificationsArgs as a5, type FilterCountArgs as a6, type FilterCountResponse as a7, type FiltersCountArgs as a8, type BaseArgs as a9, type InstanceArgs as aa, type SnoozeArgs as ab, SubscriptionsCache as ac, type Options as ad, type EventNames as ae, type ContextValue as af, type BaseUpdateSubscriptionArgs as b, ChannelType as c, type Context as d, type CreateSubscriptionArgs as e, type DefaultSchedule as f, type DeleteSubscriptionArgs as g, type Events as h, type InstanceDeleteSubscriptionArgs as i, type InstanceUpdateSubscriptionArgs as j, type ListSubscriptionsArgs as k, NotificationStatus as l, NovuError as m, type NovuOptions as n, type NovuSocketOptions as o, type PreferenceFilter as p, PreferenceLevel as q, type PreferencesResponse as r, Schedule as s, type SocketEventNames as t, type SocketTypeOption as u, type StandardNovuOptions as v, type Subscriber as w, SubscriptionPreference as x, type TagsFilterAndForm as y, type TagsFilterOrGroup 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-zMKIpsOL.mjs';
|
|
2
|
+
import '../novu-event-emitter-D9AphR7g.mjs';
|
|
3
3
|
import 'json-logic-js';
|
|
4
|
-
import '../novu-
|
|
4
|
+
import '../novu-DTGsXJjv.mjs';
|
|
5
5
|
|
|
6
6
|
declare const inboxDarkTheme: InboxTheme;
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { N as Novu } from './novu-
|
|
1
|
+
import { P as Preference, s as Schedule, N as Notification, H as TopicSubscription, x as SubscriptionPreference, n as NovuOptions, a as NotificationFilter, O as WorkflowCriticalityEnum, U as UnreadCount } from './novu-event-emitter-D9AphR7g.mjs';
|
|
2
|
+
import { N as Novu } from './novu-DTGsXJjv.mjs';
|
|
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"];
|
|
@@ -818,7 +818,10 @@ declare enum NotificationStatus {
|
|
|
818
818
|
ARCHIVED = "archived",
|
|
819
819
|
SNOOZED = "snoozed"
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
/** Preferences list API accepts a flat OR tag list only (not CNF). */
|
|
822
|
+
type PreferencesFilter = {
|
|
823
|
+
tags?: string[];
|
|
824
|
+
severity?: NotificationFilter['severity'];
|
|
822
825
|
criticality?: WorkflowCriticalityEnum;
|
|
823
826
|
};
|
|
824
827
|
type PreferencesSort = (a: Preference, b: Preference) => number;
|
|
@@ -833,4 +836,4 @@ type PreferenceGroups = Array<{
|
|
|
833
836
|
filter: PreferenceGroupFilter;
|
|
834
837
|
}>;
|
|
835
838
|
|
|
836
|
-
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type InboxLocalizationKey as F, type InboxTheme as G, NotificationStatus as H, type IconRenderer as I, type SubscriptionAppearance as J, type SubscriptionAppearanceCallback as K, type SubscriptionAppearanceCallbackFunction as L, type SubscriptionAppearanceCallbackKeys as M, type NotificationClickHandler as N, type SubscriptionAppearanceKey as O, type PreferencesFilter as P, type SubscriptionElements as Q, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type SubscriptionIconKey as U, type SubscriptionIconOverrides as V, type SubscriptionLocalization as W, type SubscriptionLocalizationKey as X, type SubscriptionTheme as Y, type Variables as Z, type NotificationActionClickHandler as a, type NotificationRenderer as b, type BodyRenderer as c, type
|
|
839
|
+
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type InboxLocalizationKey as F, type InboxTheme as G, NotificationStatus as H, type IconRenderer as I, type SubscriptionAppearance as J, type SubscriptionAppearanceCallback as K, type SubscriptionAppearanceCallbackFunction as L, type SubscriptionAppearanceCallbackKeys as M, type NotificationClickHandler as N, type SubscriptionAppearanceKey as O, type PreferencesFilter as P, type SubscriptionElements as Q, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type SubscriptionIconKey as U, type SubscriptionIconOverrides as V, type SubscriptionLocalization as W, type SubscriptionLocalizationKey as X, type SubscriptionTheme as Y, type Variables as Z, type NotificationActionClickHandler as a, type NotificationRenderer as b, type BodyRenderer as c, type BaseNovuProviderProps as d, type NovuProviderProps as e, type AllAppearance as f, type AllLocalization as g, type PreferenceGroups as h, type PreferencesSort as i, type AllAppearanceCallbackFunction as j, type AllAppearanceCallbackKeys as k, type AllAppearanceKey as l, type AllElements as m, type AllIconKey as n, type AllIconOverrides as o, type AllLocalizationKey as p, type AllTheme as q, type InboxAppearance as r, type InboxAppearanceCallback as s, type InboxAppearanceCallbackFunction as t, type InboxAppearanceCallbackKeys as u, type InboxAppearanceKey as v, type InboxElements as w, type InboxIconKey as x, type InboxIconOverrides as y, type InboxLocalization as z };
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
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
|
|
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 { V as WorkflowIdentifierOrId, H as TopicSubscription, n as NovuOptions } from '../novu-event-emitter-D9AphR7g.mjs';
|
|
2
|
+
export { N as Notification } from '../novu-event-emitter-D9AphR7g.mjs';
|
|
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 BaseNovuProviderProps, e as NovuProviderProps, f as AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-zMKIpsOL.mjs';
|
|
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-zMKIpsOL.mjs';
|
|
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-DTGsXJjv.mjs';
|
|
10
10
|
import 'json-logic-js';
|
|
11
11
|
|
|
12
12
|
type NotificationRendererProps = {
|