@novu/js 3.9.3 → 3.10.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-NNAQCY65.js → chunk-TWUFZL5G.js} +578 -151
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/{esm/novu-BOlS1PMv.d.mts → cjs/novu--9_BeIj6.d.ts} +120 -36
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/{esm/types-C9c_ID-G.d.mts → cjs/types-CvebLpsG.d.ts} +97 -5
- package/dist/{esm/types-CbmZeAf8.d.mts → cjs/types-DKMAoSfo.d.ts} +27 -1
- package/dist/cjs/ui/index.d.ts +6 -5
- package/dist/cjs/ui/index.js +1444 -310
- package/dist/esm/{chunk-BVGEE3EB.mjs → chunk-OMH4MVCZ.mjs} +578 -151
- package/dist/esm/index.d.mts +4 -4
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/{cjs/novu-Db46nHZP.d.ts → esm/novu-C2DJGZ4P.d.mts} +120 -36
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/{cjs/types-B-VuVpSW.d.ts → esm/types-Ba0J3oyA.d.mts} +97 -5
- package/dist/{cjs/types-CbmZeAf8.d.ts → esm/types-DKMAoSfo.d.mts} +27 -1
- package/dist/esm/ui/index.d.mts +6 -5
- package/dist/esm/ui/index.mjs +1426 -311
- package/dist/index.css +1 -1
- package/dist/novu.min.js +12 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +1 -1
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as Notification } from './novu-
|
|
2
|
-
export { E as EventHandler, a as Events, F as FiltersCountResponse, L as ListNotificationsResponse, b as Novu, P as Preference, S as SocketEventNames } from './novu-
|
|
3
|
-
import { S as SeverityLevelEnum, N as NotificationFilter } from './types-
|
|
4
|
-
export { C as ChannelPreference, a as ChannelType, I as InboxNotification,
|
|
1
|
+
import { N as Notification } from './novu-C2DJGZ4P.mjs';
|
|
2
|
+
export { E as EventHandler, a as Events, F as FiltersCountResponse, L as ListNotificationsResponse, b as Novu, P as Preference, c as Schedule, S as SocketEventNames } from './novu-C2DJGZ4P.mjs';
|
|
3
|
+
import { S as SeverityLevelEnum, N as NotificationFilter } from './types-DKMAoSfo.mjs';
|
|
4
|
+
export { C as ChannelPreference, a as ChannelType, D as DaySchedule, b as DefaultSchedule, I as InboxNotification, c as NotificationStatus, d as NovuError, e as NovuOptions, P as PreferenceLevel, f as PreferencesResponse, g as StandardNovuOptions, h as Subscriber, T as TimeRange, U as UnreadCount, W as WebSocketEvent, i as WeeklySchedule, j as WorkflowCriticalityEnum } from './types-DKMAoSfo.mjs';
|
|
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/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ChannelType, NotificationStatus, Novu, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter } from './chunk-
|
|
1
|
+
export { ChannelType, NotificationStatus, Novu, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter } from './chunk-OMH4MVCZ.mjs';
|
|
2
2
|
import './chunk-QOD7NZ77.mjs';
|
|
3
3
|
import './chunk-STZMOEWR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SeverityLevelEnum,
|
|
1
|
+
import { i as WeeklySchedule, S as SeverityLevelEnum, j as WorkflowCriticalityEnum, C as ChannelPreference, k as Session, R as Result, P as PreferenceLevel, l as Workflow, m as Prettify, h as Subscriber, b as DefaultSchedule, I as InboxNotification, N as NotificationFilter, A as ActionTypeEnum, f as PreferencesResponse, W as WebSocketEvent, e as NovuOptions } from './types-DKMAoSfo.mjs';
|
|
2
2
|
|
|
3
3
|
type HttpClientOptions = {
|
|
4
4
|
apiVersion?: string;
|
|
@@ -21,6 +21,10 @@ type InstancePreferenceArgs = {
|
|
|
21
21
|
channels: ChannelPreference;
|
|
22
22
|
};
|
|
23
23
|
type UpdatePreferenceArgs = BasePreferenceArgs | InstancePreferenceArgs;
|
|
24
|
+
type UpdateScheduleArgs = {
|
|
25
|
+
isEnabled?: boolean;
|
|
26
|
+
weeklySchedule?: WeeklySchedule;
|
|
27
|
+
};
|
|
24
28
|
|
|
25
29
|
declare class PreferencesCache {
|
|
26
30
|
#private;
|
|
@@ -28,6 +32,8 @@ declare class PreferencesCache {
|
|
|
28
32
|
emitterInstance: NovuEventEmitter;
|
|
29
33
|
});
|
|
30
34
|
private updatePreference;
|
|
35
|
+
private updatePreferenceSchedule;
|
|
36
|
+
private handleScheduleEvent;
|
|
31
37
|
private handlePreferenceEvent;
|
|
32
38
|
has(args: ListPreferencesArgs): boolean;
|
|
33
39
|
set(args: ListPreferencesArgs, data: Preference[]): void;
|
|
@@ -35,17 +41,91 @@ declare class PreferencesCache {
|
|
|
35
41
|
clearAll(): void;
|
|
36
42
|
}
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
declare class BaseModule {
|
|
45
|
+
#private;
|
|
46
|
+
protected _inboxService: InboxService;
|
|
47
|
+
protected _emitter: NovuEventEmitter;
|
|
48
|
+
constructor({ inboxServiceInstance, eventEmitterInstance, }: {
|
|
49
|
+
inboxServiceInstance: InboxService;
|
|
50
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
51
|
+
});
|
|
52
|
+
protected onSessionSuccess(_: Session): void;
|
|
53
|
+
protected onSessionError(_: unknown): void;
|
|
54
|
+
callWithSession<T>(fn: () => Result<T>): Result<T>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type ScheduleLike = Partial<Pick<Schedule, 'isEnabled' | 'weeklySchedule'>>;
|
|
58
|
+
declare class Schedule {
|
|
59
|
+
#private;
|
|
60
|
+
readonly isEnabled: boolean | undefined;
|
|
61
|
+
readonly weeklySchedule: WeeklySchedule | undefined;
|
|
62
|
+
constructor(schedule: ScheduleLike, { emitterInstance, inboxServiceInstance, cache, useCache, }: {
|
|
63
|
+
emitterInstance: NovuEventEmitter;
|
|
64
|
+
inboxServiceInstance: InboxService;
|
|
65
|
+
cache: ScheduleCache;
|
|
66
|
+
useCache: boolean;
|
|
67
|
+
});
|
|
68
|
+
update(args: UpdateScheduleArgs): Result<Schedule>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class PreferenceSchedule extends BaseModule {
|
|
72
|
+
#private;
|
|
73
|
+
readonly cache: ScheduleCache;
|
|
74
|
+
constructor({ cache, useCache, inboxServiceInstance, eventEmitterInstance, }: {
|
|
75
|
+
cache: ScheduleCache;
|
|
76
|
+
useCache: boolean;
|
|
77
|
+
inboxServiceInstance: InboxService;
|
|
78
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
79
|
+
});
|
|
80
|
+
get(): Result<Schedule>;
|
|
81
|
+
update(args: UpdateScheduleArgs): Result<Schedule>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare class Preferences extends BaseModule {
|
|
85
|
+
#private;
|
|
86
|
+
readonly cache: PreferencesCache;
|
|
87
|
+
readonly scheduleCache: ScheduleCache;
|
|
88
|
+
readonly schedule: PreferenceSchedule;
|
|
89
|
+
constructor({ useCache, inboxServiceInstance, eventEmitterInstance, }: {
|
|
90
|
+
useCache: boolean;
|
|
91
|
+
inboxServiceInstance: InboxService;
|
|
92
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
93
|
+
});
|
|
94
|
+
list(args?: ListPreferencesArgs): Result<Preference[]>;
|
|
95
|
+
update(args: BasePreferenceArgs): Result<Preference>;
|
|
96
|
+
update(args: InstancePreferenceArgs): Result<Preference>;
|
|
97
|
+
bulkUpdate(args: Array<BasePreferenceArgs>): Result<Preference[]>;
|
|
98
|
+
bulkUpdate(args: Array<InstancePreferenceArgs>): Result<Preference[]>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class ScheduleCache {
|
|
102
|
+
#private;
|
|
103
|
+
constructor({ emitterInstance }: {
|
|
104
|
+
emitterInstance: NovuEventEmitter;
|
|
105
|
+
});
|
|
106
|
+
private updateScheduleInCache;
|
|
107
|
+
private handleScheduleEvent;
|
|
108
|
+
has(): boolean;
|
|
109
|
+
set(data: Schedule): void;
|
|
110
|
+
getAll(): Schedule | undefined;
|
|
111
|
+
clearAll(): void;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
type PreferenceLike = Pick<Preference, 'level' | 'enabled' | 'channels' | 'workflow'> & {
|
|
115
|
+
schedule?: ScheduleLike;
|
|
116
|
+
};
|
|
39
117
|
declare class Preference {
|
|
40
118
|
#private;
|
|
41
119
|
readonly level: PreferenceLevel;
|
|
42
120
|
readonly enabled: boolean;
|
|
43
121
|
readonly channels: ChannelPreference;
|
|
44
122
|
readonly workflow?: Workflow;
|
|
45
|
-
|
|
123
|
+
schedule: Schedule;
|
|
124
|
+
constructor(preference: PreferenceLike, { emitterInstance, inboxServiceInstance, cache, scheduleCache, useCache, }: {
|
|
46
125
|
emitterInstance: NovuEventEmitter;
|
|
47
126
|
inboxServiceInstance: InboxService;
|
|
48
127
|
cache: PreferencesCache;
|
|
128
|
+
scheduleCache: ScheduleCache;
|
|
49
129
|
useCache: boolean;
|
|
50
130
|
});
|
|
51
131
|
update({ channels, channelPreferences, }: Prettify<Pick<UpdatePreferenceArgs, 'channels'> & {
|
|
@@ -59,10 +139,11 @@ declare class InboxService {
|
|
|
59
139
|
#private;
|
|
60
140
|
isSessionInitialized: boolean;
|
|
61
141
|
constructor(options?: InboxServiceOptions);
|
|
62
|
-
initializeSession({ applicationIdentifier, subscriberHash, subscriber, }: {
|
|
142
|
+
initializeSession({ applicationIdentifier, subscriberHash, subscriber, defaultSchedule, }: {
|
|
63
143
|
applicationIdentifier?: string;
|
|
64
144
|
subscriberHash?: string;
|
|
65
145
|
subscriber?: Subscriber;
|
|
146
|
+
defaultSchedule?: DefaultSchedule;
|
|
66
147
|
}): Promise<Session>;
|
|
67
148
|
fetchNotifications({ after, archived, limit, offset, read, tags, snoozed, seen, data, severity, }: {
|
|
68
149
|
tags?: string[];
|
|
@@ -114,6 +195,11 @@ declare class InboxService {
|
|
|
114
195
|
tags?: string[];
|
|
115
196
|
data?: Record<string, unknown>;
|
|
116
197
|
}): Promise<void>;
|
|
198
|
+
delete(notificationId: string): Promise<void>;
|
|
199
|
+
deleteAll({ tags, data }: {
|
|
200
|
+
tags?: string[];
|
|
201
|
+
data?: Record<string, unknown>;
|
|
202
|
+
}): Promise<void>;
|
|
117
203
|
markAsSeen({ notificationIds, tags, data, }: {
|
|
118
204
|
notificationIds?: string[];
|
|
119
205
|
tags?: string[];
|
|
@@ -136,12 +222,18 @@ declare class InboxService {
|
|
|
136
222
|
bulkUpdatePreferences(preferences: Array<{
|
|
137
223
|
workflowId: string;
|
|
138
224
|
} & ChannelPreference>): Promise<PreferencesResponse[]>;
|
|
139
|
-
updateGlobalPreferences(
|
|
225
|
+
updateGlobalPreferences(preferences: ChannelPreference & {
|
|
226
|
+
schedule?: {
|
|
227
|
+
isEnabled?: boolean;
|
|
228
|
+
weeklySchedule?: WeeklySchedule;
|
|
229
|
+
};
|
|
230
|
+
}): Promise<PreferencesResponse>;
|
|
140
231
|
updateWorkflowPreferences({ workflowId, channels, }: {
|
|
141
232
|
workflowId: string;
|
|
142
233
|
channels: ChannelPreference;
|
|
143
234
|
}): Promise<PreferencesResponse>;
|
|
144
|
-
|
|
235
|
+
fetchGlobalPreferences(): Promise<PreferencesResponse>;
|
|
236
|
+
triggerHelloWorldEvent(): Promise<unknown>;
|
|
145
237
|
}
|
|
146
238
|
|
|
147
239
|
declare class Notification implements Pick<NovuEventEmitter, 'on'>, InboxNotification {
|
|
@@ -176,6 +268,7 @@ declare class Notification implements Pick<NovuEventEmitter, 'on'>, InboxNotific
|
|
|
176
268
|
seen(): Result<Notification>;
|
|
177
269
|
archive(): Result<Notification>;
|
|
178
270
|
unarchive(): Result<Notification>;
|
|
271
|
+
delete(): Result<void>;
|
|
179
272
|
snooze(snoozeUntil: string): Result<Notification>;
|
|
180
273
|
unsnooze(): Result<Notification>;
|
|
181
274
|
completePrimary(): Result<Notification>;
|
|
@@ -190,19 +283,6 @@ declare class Notification implements Pick<NovuEventEmitter, 'on'>, InboxNotific
|
|
|
190
283
|
off<Key extends EventNames>(eventName: Key, listener: EventHandler<Events[Key]>): void;
|
|
191
284
|
}
|
|
192
285
|
|
|
193
|
-
declare class BaseModule {
|
|
194
|
-
#private;
|
|
195
|
-
protected _inboxService: InboxService;
|
|
196
|
-
protected _emitter: NovuEventEmitter;
|
|
197
|
-
constructor({ inboxServiceInstance, eventEmitterInstance, }: {
|
|
198
|
-
inboxServiceInstance: InboxService;
|
|
199
|
-
eventEmitterInstance: NovuEventEmitter;
|
|
200
|
-
});
|
|
201
|
-
protected onSessionSuccess(_: Session): void;
|
|
202
|
-
protected onSessionError(_: unknown): void;
|
|
203
|
-
callWithSession<T>(fn: () => Result<T>): Result<T>;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
286
|
declare class NotificationsCache {
|
|
207
287
|
#private;
|
|
208
288
|
constructor({ emitter }: {
|
|
@@ -285,6 +365,7 @@ type ReadArgs = BaseArgs | InstanceArgs;
|
|
|
285
365
|
type UnreadArgs = BaseArgs | InstanceArgs;
|
|
286
366
|
type ArchivedArgs = BaseArgs | InstanceArgs;
|
|
287
367
|
type UnarchivedArgs = BaseArgs | InstanceArgs;
|
|
368
|
+
type DeletedArgs = BaseArgs | InstanceArgs;
|
|
288
369
|
type SeenArgs = BaseArgs | InstanceArgs;
|
|
289
370
|
type SnoozeArgs = (BaseArgs | InstanceArgs) & {
|
|
290
371
|
snoozeUntil: string;
|
|
@@ -315,6 +396,8 @@ declare class Notifications extends BaseModule {
|
|
|
315
396
|
archive(args: InstanceArgs): Result<Notification>;
|
|
316
397
|
unarchive(args: BaseArgs): Result<Notification>;
|
|
317
398
|
unarchive(args: InstanceArgs): Result<Notification>;
|
|
399
|
+
delete(args: BaseArgs): Result<void>;
|
|
400
|
+
delete(args: InstanceArgs): Result<void>;
|
|
318
401
|
snooze(args: SnoozeArgs): Result<Notification>;
|
|
319
402
|
unsnooze(args: BaseArgs): Result<Notification>;
|
|
320
403
|
unsnooze(args: InstanceArgs): Result<Notification>;
|
|
@@ -344,6 +427,10 @@ declare class Notifications extends BaseModule {
|
|
|
344
427
|
tags?: string[];
|
|
345
428
|
data?: Record<string, unknown>;
|
|
346
429
|
}): Result<void>;
|
|
430
|
+
deleteAll({ tags, data, }?: {
|
|
431
|
+
tags?: NotificationFilter['tags'];
|
|
432
|
+
data?: Record<string, unknown>;
|
|
433
|
+
}): Result<void>;
|
|
347
434
|
clearCache({ filter }?: {
|
|
348
435
|
filter?: NotificationFilter;
|
|
349
436
|
}): void;
|
|
@@ -357,6 +444,7 @@ type InitializeSessionArgs = KeylessInitializeSessionArgs | {
|
|
|
357
444
|
applicationIdentifier: string;
|
|
358
445
|
subscriber: Subscriber;
|
|
359
446
|
subscriberHash?: string;
|
|
447
|
+
defaultSchedule?: DefaultSchedule;
|
|
360
448
|
};
|
|
361
449
|
|
|
362
450
|
type NovuPendingEvent<A, D = undefined> = {
|
|
@@ -380,6 +468,7 @@ type NotificationUnreadEvents = BaseEvents<'notification.unread', UnreadArgs, No
|
|
|
380
468
|
type NotificationSeenEvents = BaseEvents<'notification.seen', SeenArgs, Notification>;
|
|
381
469
|
type NotificationArchiveEvents = BaseEvents<'notification.archive', ArchivedArgs, Notification>;
|
|
382
470
|
type NotificationUnarchiveEvents = BaseEvents<'notification.unarchive', UnarchivedArgs, Notification>;
|
|
471
|
+
type NotificationDeleteEvents = BaseEvents<'notification.delete', DeletedArgs, void>;
|
|
383
472
|
type NotificationSnoozeEvents = BaseEvents<'notification.snooze', SnoozeArgs, Notification>;
|
|
384
473
|
type NotificationUnsnoozeEvents = BaseEvents<'notification.unsnooze', UnsnoozeArgs, Notification>;
|
|
385
474
|
type NotificationCompleteActionEvents = BaseEvents<'notification.complete_action', CompleteArgs, Notification>;
|
|
@@ -402,9 +491,15 @@ type NotificationsReadArchivedAllEvents = BaseEvents<'notifications.archive_all_
|
|
|
402
491
|
tags?: string[];
|
|
403
492
|
data?: Record<string, unknown>;
|
|
404
493
|
}, Notification[]>;
|
|
494
|
+
type NotificationsDeletedAllEvents = BaseEvents<'notifications.delete_all', {
|
|
495
|
+
tags?: string[];
|
|
496
|
+
data?: Record<string, unknown>;
|
|
497
|
+
}, Notification[]>;
|
|
405
498
|
type PreferencesFetchEvents = BaseEvents<'preferences.list', ListPreferencesArgs, Preference[]>;
|
|
406
499
|
type PreferenceUpdateEvents = BaseEvents<'preference.update', UpdatePreferenceArgs, Preference>;
|
|
407
500
|
type PreferencesBulkUpdateEvents = BaseEvents<'preferences.bulk_update', Array<UpdatePreferenceArgs>, Preference[]>;
|
|
501
|
+
type PreferenceScheduleGetEvents = BaseEvents<'preference.schedule.get', undefined, Schedule>;
|
|
502
|
+
type PreferenceScheduleUpdateEvents = BaseEvents<'preference.schedule.update', UpdateScheduleArgs, Schedule>;
|
|
408
503
|
type SocketConnectEvents = BaseEvents<'socket.connect', {
|
|
409
504
|
socketUrl: string;
|
|
410
505
|
}, undefined>;
|
|
@@ -447,7 +542,11 @@ type Events = SessionInitializeEvents & NotificationsFetchEvents & {
|
|
|
447
542
|
'preferences.list.updated': {
|
|
448
543
|
data: Preference[];
|
|
449
544
|
};
|
|
450
|
-
} & PreferenceUpdateEvents & PreferencesBulkUpdateEvents &
|
|
545
|
+
} & PreferenceUpdateEvents & PreferencesBulkUpdateEvents & PreferenceScheduleGetEvents & PreferenceScheduleUpdateEvents & {
|
|
546
|
+
'preference.schedule.get.updated': {
|
|
547
|
+
data: Schedule;
|
|
548
|
+
};
|
|
549
|
+
} & SocketConnectEvents & SocketEvents & NotificationReadEvents & NotificationUnreadEvents & NotificationSeenEvents & NotificationArchiveEvents & NotificationUnarchiveEvents & NotificationDeleteEvents & NotificationSnoozeEvents & NotificationUnsnoozeEvents & NotificationCompleteActionEvents & NotificationRevertActionEvents & NotificationsReadAllEvents & NotificationsSeenAllEvents & NotificationsArchivedAllEvents & NotificationsReadArchivedAllEvents & NotificationsDeletedAllEvents;
|
|
451
550
|
type EventNames = keyof Events;
|
|
452
551
|
type SocketEventNames = keyof SocketEvents;
|
|
453
552
|
type EventHandler<T = unknown> = (event: T) => void;
|
|
@@ -460,21 +559,6 @@ declare class NovuEventEmitter {
|
|
|
460
559
|
emit<Key extends EventNames>(type: Key, event?: Events[Key]): void;
|
|
461
560
|
}
|
|
462
561
|
|
|
463
|
-
declare class Preferences extends BaseModule {
|
|
464
|
-
#private;
|
|
465
|
-
readonly cache: PreferencesCache;
|
|
466
|
-
constructor({ useCache, inboxServiceInstance, eventEmitterInstance, }: {
|
|
467
|
-
useCache: boolean;
|
|
468
|
-
inboxServiceInstance: InboxService;
|
|
469
|
-
eventEmitterInstance: NovuEventEmitter;
|
|
470
|
-
});
|
|
471
|
-
list(args?: ListPreferencesArgs): Result<Preference[]>;
|
|
472
|
-
update(args: BasePreferenceArgs): Result<Preference>;
|
|
473
|
-
update(args: InstancePreferenceArgs): Result<Preference>;
|
|
474
|
-
bulkUpdate(args: Array<BasePreferenceArgs>): Result<Preference[]>;
|
|
475
|
-
bulkUpdate(args: Array<InstancePreferenceArgs>): Result<Preference[]>;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
562
|
interface BaseSocketInterface {
|
|
479
563
|
isSocketEvent(eventName: string): eventName is SocketEventNames;
|
|
480
564
|
connect(): Result<void>;
|
|
@@ -501,4 +585,4 @@ declare class Novu implements Pick<NovuEventEmitter, 'on'> {
|
|
|
501
585
|
}): Promise<void>;
|
|
502
586
|
}
|
|
503
587
|
|
|
504
|
-
export { type EventHandler as E, type FiltersCountResponse as F, type ListNotificationsResponse as L, Notification as N, Preference as P, type SocketEventNames as S, type Events as a, Novu as b };
|
|
588
|
+
export { type EventHandler as E, type FiltersCountResponse as F, type ListNotificationsResponse as L, Notification as N, Preference as P, type SocketEventNames as S, type Events as a, Novu as b, Schedule as c };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../
|
|
3
|
-
import '../
|
|
1
|
+
import { r as Theme } from '../types-Ba0J3oyA.mjs';
|
|
2
|
+
import '../types-DKMAoSfo.mjs';
|
|
3
|
+
import '../novu-C2DJGZ4P.mjs';
|
|
4
4
|
|
|
5
5
|
declare const dark: Theme;
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as
|
|
2
|
-
import {
|
|
1
|
+
import { U as UnreadCount, N as NotificationFilter, j as WorkflowCriticalityEnum, e as NovuOptions } from './types-DKMAoSfo.mjs';
|
|
2
|
+
import { N as Notification, P as Preference, c as Schedule, b as Novu } from './novu-C2DJGZ4P.mjs';
|
|
3
3
|
|
|
4
|
-
declare const appearanceKeys: readonly ["button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "collapsible", "tooltipContent", "tooltipTrigger", "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", "root", "bellIcon", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "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", "notificationBody", "notificationBody__strong", "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", "notificationSnooze__dropdownContent", "notificationSnooze__dropdownItem", "notificationSnooze__dropdownItem__icon", "notificationSnoozeCustomTime_popoverContent", "notificationDeliveredAt__badge", "notificationDeliveredAt__icon", "notificationSnoozedUntil__icon", "strong"];
|
|
4
|
+
declare const appearanceKeys: readonly ["button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "collapsible", "tooltipContent", "tooltipTrigger", "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", "root", "bellIcon", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "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", "notificationBody", "notificationBody__strong", "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"];
|
|
5
5
|
|
|
6
6
|
declare const defaultLocalization: {
|
|
7
7
|
readonly locale: "en-US";
|
|
@@ -30,6 +30,24 @@ declare const defaultLocalization: {
|
|
|
30
30
|
readonly 'preferences.title': "Preferences";
|
|
31
31
|
readonly 'preferences.emptyNotice': "No notification specific preferences yet.";
|
|
32
32
|
readonly 'preferences.global': "Global Preferences";
|
|
33
|
+
readonly 'preferences.schedule.title': "Schedule";
|
|
34
|
+
readonly 'preferences.schedule.description': "Allow notifications between:";
|
|
35
|
+
readonly 'preferences.schedule.headerInfo': "Set your schedule. Notifications to external channels will pause outside the schedule. In-app and critical notifications are always delivered.";
|
|
36
|
+
readonly 'preferences.schedule.info': "Critical and In-app notifications still reach you outside your schedule.";
|
|
37
|
+
readonly 'preferences.schedule.days': "Days";
|
|
38
|
+
readonly 'preferences.schedule.from': "From";
|
|
39
|
+
readonly 'preferences.schedule.to': "To";
|
|
40
|
+
readonly 'preferences.schedule.copyTimesTo': "Copy times to";
|
|
41
|
+
readonly 'preferences.schedule.sunday': "Sunday";
|
|
42
|
+
readonly 'preferences.schedule.monday': "Monday";
|
|
43
|
+
readonly 'preferences.schedule.tuesday': "Tuesday";
|
|
44
|
+
readonly 'preferences.schedule.wednesday': "Wednesday";
|
|
45
|
+
readonly 'preferences.schedule.thursday': "Thursday";
|
|
46
|
+
readonly 'preferences.schedule.friday': "Friday";
|
|
47
|
+
readonly 'preferences.schedule.saturday': "Saturday";
|
|
48
|
+
readonly 'preferences.schedule.dayScheduleCopy.title': "Copy times to:";
|
|
49
|
+
readonly 'preferences.schedule.dayScheduleCopy.selectAll': "Select all";
|
|
50
|
+
readonly 'preferences.schedule.dayScheduleCopy.apply': "Apply";
|
|
33
51
|
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
34
52
|
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
35
53
|
readonly 'preferences.group.info': "Applies to all notifications under this group.";
|
|
@@ -235,6 +253,78 @@ type AppearanceCallback = {
|
|
|
235
253
|
preferences: Preference[];
|
|
236
254
|
};
|
|
237
255
|
}) => string;
|
|
256
|
+
scheduleContainer: (context: {
|
|
257
|
+
schedule?: Schedule;
|
|
258
|
+
}) => string;
|
|
259
|
+
scheduleHeader: (context: {
|
|
260
|
+
schedule?: Schedule;
|
|
261
|
+
}) => string;
|
|
262
|
+
scheduleLabelContainer: (context: {
|
|
263
|
+
schedule?: Schedule;
|
|
264
|
+
}) => string;
|
|
265
|
+
scheduleLabelScheduleIcon: (context: {
|
|
266
|
+
schedule?: Schedule;
|
|
267
|
+
}) => string;
|
|
268
|
+
scheduleLabelInfoIcon: (context: {
|
|
269
|
+
schedule?: Schedule;
|
|
270
|
+
}) => string;
|
|
271
|
+
scheduleLabel: (context: {
|
|
272
|
+
schedule?: Schedule;
|
|
273
|
+
}) => string;
|
|
274
|
+
scheduleActionsContainer: (context: {
|
|
275
|
+
schedule?: Schedule;
|
|
276
|
+
}) => string;
|
|
277
|
+
scheduleActionsContainerRight: (context: {
|
|
278
|
+
schedule?: Schedule;
|
|
279
|
+
}) => string;
|
|
280
|
+
scheduleBody: (context: {
|
|
281
|
+
schedule?: Schedule;
|
|
282
|
+
}) => string;
|
|
283
|
+
scheduleDescription: (context: {
|
|
284
|
+
schedule?: Schedule;
|
|
285
|
+
}) => string;
|
|
286
|
+
scheduleTable: (context: {
|
|
287
|
+
schedule?: Schedule;
|
|
288
|
+
}) => string;
|
|
289
|
+
scheduleTableHeader: (context: {
|
|
290
|
+
schedule?: Schedule;
|
|
291
|
+
}) => string;
|
|
292
|
+
scheduleHeaderColumn: (context: {
|
|
293
|
+
schedule?: Schedule;
|
|
294
|
+
}) => string;
|
|
295
|
+
scheduleTableBody: (context: {
|
|
296
|
+
schedule?: Schedule;
|
|
297
|
+
}) => string;
|
|
298
|
+
scheduleBodyRow: (context: {
|
|
299
|
+
schedule?: Schedule;
|
|
300
|
+
}) => string;
|
|
301
|
+
scheduleBodyColumn: (context: {
|
|
302
|
+
schedule?: Schedule;
|
|
303
|
+
}) => string;
|
|
304
|
+
scheduleInfoContainer: (context: {
|
|
305
|
+
schedule?: Schedule;
|
|
306
|
+
}) => string;
|
|
307
|
+
scheduleInfoIcon: (context: {
|
|
308
|
+
schedule?: Schedule;
|
|
309
|
+
}) => string;
|
|
310
|
+
scheduleInfo: (context: {
|
|
311
|
+
schedule?: Schedule;
|
|
312
|
+
}) => string;
|
|
313
|
+
dayScheduleCopyTitle: (context: {
|
|
314
|
+
schedule?: Schedule;
|
|
315
|
+
}) => string;
|
|
316
|
+
dayScheduleCopyIcon: (context: {
|
|
317
|
+
schedule?: Schedule;
|
|
318
|
+
}) => string;
|
|
319
|
+
dayScheduleCopySelectAll: (context: {
|
|
320
|
+
schedule?: Schedule;
|
|
321
|
+
}) => string;
|
|
322
|
+
dayScheduleCopyDay: (context: {
|
|
323
|
+
schedule?: Schedule;
|
|
324
|
+
}) => string;
|
|
325
|
+
dayScheduleCopyFooterContainer: (context: {
|
|
326
|
+
schedule?: Schedule;
|
|
327
|
+
}) => string;
|
|
238
328
|
preferencesGroupContainer: (context: {
|
|
239
329
|
preferenceGroup: {
|
|
240
330
|
name: string;
|
|
@@ -391,7 +481,7 @@ type Elements = Partial<{
|
|
|
391
481
|
} & {
|
|
392
482
|
[K in Extract<AppearanceKey, AppearanceCallbackKeys>]: ElementStyles | AppearanceCallbackFunction<K>;
|
|
393
483
|
}>;
|
|
394
|
-
type IconKey = 'bell' | 'clock' | 'arrowDropDown' | 'dots' | 'markAsRead' | 'cogs' | 'trash' | 'markAsArchived' | 'markAsArchivedRead' | 'markAsUnread' | 'markAsUnarchived' | 'unsnooze' | 'arrowRight' | 'arrowLeft' | 'unread' | 'sms' | 'inApp' | 'email' | 'push' | 'chat' | 'check' | 'arrowDown' | 'routeFill' | 'info' | 'nodeTree';
|
|
484
|
+
type IconKey = 'bell' | 'clock' | 'arrowDropDown' | 'dots' | 'markAsRead' | 'cogs' | 'trash' | 'markAsArchived' | 'markAsArchivedRead' | 'markAsUnread' | 'markAsUnarchived' | 'unsnooze' | 'arrowRight' | 'arrowLeft' | 'unread' | 'sms' | 'inApp' | 'email' | 'push' | 'chat' | 'check' | 'arrowDown' | 'routeFill' | 'info' | 'nodeTree' | 'calendarSchedule' | 'copy';
|
|
395
485
|
type IconRenderer = (el: HTMLDivElement, props: {
|
|
396
486
|
class?: string;
|
|
397
487
|
}) => () => void;
|
|
@@ -415,6 +505,7 @@ type BaseNovuProviderProps = {
|
|
|
415
505
|
tabs?: Array<Tab>;
|
|
416
506
|
preferencesFilter?: PreferencesFilter;
|
|
417
507
|
preferenceGroups?: PreferenceGroups;
|
|
508
|
+
preferencesSort?: PreferencesSort;
|
|
418
509
|
routerPush?: RouterPush;
|
|
419
510
|
novu?: Novu;
|
|
420
511
|
};
|
|
@@ -431,6 +522,7 @@ declare enum NotificationStatus {
|
|
|
431
522
|
type PreferencesFilter = Pick<NotificationFilter, 'tags' | 'severity'> & {
|
|
432
523
|
criticality?: WorkflowCriticalityEnum;
|
|
433
524
|
};
|
|
525
|
+
type PreferencesSort = (a: Preference, b: Preference) => number;
|
|
434
526
|
type PreferenceFilterFunction = (args: {
|
|
435
527
|
preferences: Preference[];
|
|
436
528
|
}) => Preference[];
|
|
@@ -442,4 +534,4 @@ type PreferenceGroups = Array<{
|
|
|
442
534
|
filter: PreferenceGroupFilter;
|
|
443
535
|
}>;
|
|
444
536
|
|
|
445
|
-
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type IconKey as I, type Localization as L, type NotificationClickHandler as N, type PreferencesFilter as P, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type Variables as V, type NotificationActionClickHandler as a, type NotificationRenderer as b, type BodyRenderer as c, type NovuProviderProps as d, type BaseNovuProviderProps as e, type Appearance as f, type PreferenceGroups as g, type
|
|
537
|
+
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type IconKey as I, type Localization as L, type NotificationClickHandler as N, type PreferencesFilter as P, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type Variables as V, type NotificationActionClickHandler as a, type NotificationRenderer as b, type BodyRenderer as c, type NovuProviderProps as d, type BaseNovuProviderProps as e, type Appearance as f, type PreferenceGroups as g, type PreferencesSort as h, type AppearanceCallback as i, type AppearanceCallbackFunction as j, type AppearanceCallbackKeys as k, type AppearanceKey as l, type Elements as m, type IconOverrides as n, type IconRenderer as o, type LocalizationKey as p, NotificationStatus as q, type Theme as r };
|
|
@@ -137,12 +137,37 @@ type ChannelPreference = {
|
|
|
137
137
|
chat?: boolean;
|
|
138
138
|
push?: boolean;
|
|
139
139
|
};
|
|
140
|
+
type TimeRange = {
|
|
141
|
+
start: string;
|
|
142
|
+
end: string;
|
|
143
|
+
};
|
|
144
|
+
type DaySchedule = {
|
|
145
|
+
isEnabled: boolean;
|
|
146
|
+
hours?: Array<TimeRange>;
|
|
147
|
+
};
|
|
148
|
+
type WeeklySchedule = {
|
|
149
|
+
monday?: DaySchedule;
|
|
150
|
+
tuesday?: DaySchedule;
|
|
151
|
+
wednesday?: DaySchedule;
|
|
152
|
+
thursday?: DaySchedule;
|
|
153
|
+
friday?: DaySchedule;
|
|
154
|
+
saturday?: DaySchedule;
|
|
155
|
+
sunday?: DaySchedule;
|
|
156
|
+
};
|
|
157
|
+
type DefaultSchedule = {
|
|
158
|
+
isEnabled?: boolean;
|
|
159
|
+
weeklySchedule?: WeeklySchedule;
|
|
160
|
+
};
|
|
140
161
|
type PreferencesResponse = {
|
|
141
162
|
level: PreferenceLevel;
|
|
142
163
|
enabled: boolean;
|
|
143
164
|
channels: ChannelPreference;
|
|
144
165
|
overrides?: IPreferenceOverride[];
|
|
145
166
|
workflow?: Workflow;
|
|
167
|
+
schedule?: {
|
|
168
|
+
isEnabled: boolean;
|
|
169
|
+
weeklySchedule?: WeeklySchedule;
|
|
170
|
+
};
|
|
146
171
|
};
|
|
147
172
|
declare enum PreferenceOverrideSourceEnum {
|
|
148
173
|
SUBSCRIBER = "subscriber",
|
|
@@ -170,6 +195,7 @@ type StandardNovuOptions = {
|
|
|
170
195
|
apiUrl?: string;
|
|
171
196
|
socketUrl?: string;
|
|
172
197
|
useCache?: boolean;
|
|
198
|
+
defaultSchedule?: DefaultSchedule;
|
|
173
199
|
} & ({
|
|
174
200
|
/** @deprecated Use subscriber prop instead */
|
|
175
201
|
subscriberId: string;
|
|
@@ -183,4 +209,4 @@ type Prettify<T> = {
|
|
|
183
209
|
[K in keyof T]: T[K];
|
|
184
210
|
} & {};
|
|
185
211
|
|
|
186
|
-
export { ActionTypeEnum as A, type ChannelPreference as C, type InboxNotification as I, type NotificationFilter as N, PreferenceLevel as P, type Result as R, SeverityLevelEnum as S, type UnreadCount as U, WebSocketEvent as W, ChannelType as a,
|
|
212
|
+
export { ActionTypeEnum as A, type ChannelPreference as C, type DaySchedule as D, type InboxNotification as I, type NotificationFilter as N, PreferenceLevel as P, type Result as R, SeverityLevelEnum as S, type TimeRange as T, type UnreadCount as U, WebSocketEvent as W, ChannelType as a, type DefaultSchedule as b, NotificationStatus as c, NovuError as d, type NovuOptions as e, type PreferencesResponse as f, type StandardNovuOptions as g, type Subscriber as h, type WeeklySchedule as i, WorkflowCriticalityEnum as j, type Session as k, type Workflow as l, type Prettify as m };
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { N as Notification } from '../novu-
|
|
2
|
-
import {
|
|
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 Appearance, L as Localization, T as Tab, P as PreferencesFilter, g as PreferenceGroups, R as RouterPush } from '../types-
|
|
4
|
-
export {
|
|
1
|
+
export { N as Notification } from '../novu-C2DJGZ4P.mjs';
|
|
2
|
+
import { e as NovuOptions } from '../types-DKMAoSfo.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 NovuProviderProps, e as BaseNovuProviderProps, f as Appearance, L as Localization, T as Tab, P as PreferencesFilter, g as PreferenceGroups, h as PreferencesSort, R as RouterPush } from '../types-Ba0J3oyA.mjs';
|
|
4
|
+
export { i as AppearanceCallback, j as AppearanceCallbackFunction, k as AppearanceCallbackKeys, l as AppearanceKey, E as ElementStyles, m as Elements, I as IconKey, n as IconOverrides, o as IconRenderer, p as LocalizationKey, q as NotificationStatus, r as Theme, V as Variables } from '../types-Ba0J3oyA.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';
|
|
@@ -81,9 +81,10 @@ declare class NovuUI {
|
|
|
81
81
|
updateTabs(tabs?: Array<Tab>): void;
|
|
82
82
|
updatePreferencesFilter(preferencesFilter?: PreferencesFilter): void;
|
|
83
83
|
updatePreferenceGroups(preferenceGroups?: PreferenceGroups): void;
|
|
84
|
+
updatePreferencesSort(preferencesSort?: PreferencesSort): void;
|
|
84
85
|
updateRouterPush(routerPush?: RouterPush): void;
|
|
85
86
|
updateContainer(container?: Node | string | null): void;
|
|
86
87
|
unmount(): void;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
export { Appearance, type BaseNovuUIOptions, BellRenderer, BodyRenderer, InboxPage, type InboxProps, Localization, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, RouterPush, SubjectRenderer, Tab };
|
|
90
|
+
export { Appearance, type BaseNovuUIOptions, BellRenderer, BodyRenderer, InboxPage, type InboxProps, Localization, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, PreferencesSort, RouterPush, SubjectRenderer, Tab };
|