@novu/js 3.17.0 → 3.18.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.
Files changed (31) hide show
  1. package/dist/cjs/{chunk-7B52C2XE.js → chunk-A6CBLMST.js} +9 -0
  2. package/dist/cjs/{chunk-SP44ETLM.js → chunk-NR4RSYUE.js} +772 -694
  3. package/dist/cjs/{chunk-WDGG3OER.js → chunk-TLQQB5Y7.js} +217 -199
  4. package/dist/{esm/inbox-service-CGCuuYnv.d.mts → cjs/inbox-service-DSSwFYNG.d.ts} +18 -2
  5. package/dist/cjs/index.d.ts +93 -4
  6. package/dist/cjs/index.js +246 -20
  7. package/dist/cjs/internal/index.d.ts +1 -1
  8. package/dist/cjs/internal/index.js +7 -7
  9. package/dist/cjs/{novu-CmNBco-0.d.ts → novu-BQCC3vQS.d.ts} +3 -2
  10. package/dist/cjs/themes/index.d.ts +3 -3
  11. package/dist/cjs/themes/index.js +1 -1
  12. package/dist/cjs/{types-BF6zvyj6.d.ts → types-Djf8MaW9.d.ts} +2 -2
  13. package/dist/cjs/ui/index.d.ts +18 -6
  14. package/dist/cjs/ui/index.js +609 -243
  15. package/dist/esm/{chunk-BKA3HRZM.mjs → chunk-33B2GJE2.mjs} +140 -64
  16. package/dist/esm/{chunk-STZMOEWR.mjs → chunk-3LR3AF54.mjs} +9 -1
  17. package/dist/esm/{chunk-4S22IB5W.mjs → chunk-T3NTOGY3.mjs} +193 -176
  18. package/dist/{cjs/inbox-service-CGCuuYnv.d.ts → esm/inbox-service-DSSwFYNG.d.mts} +18 -2
  19. package/dist/esm/index.d.mts +93 -4
  20. package/dist/esm/index.mjs +228 -3
  21. package/dist/esm/internal/index.d.mts +1 -1
  22. package/dist/esm/internal/index.mjs +2 -2
  23. package/dist/esm/{novu-CFYEiYN8.d.mts → novu-Z0z0-IxO.d.mts} +3 -2
  24. package/dist/esm/themes/index.d.mts +3 -3
  25. package/dist/esm/themes/index.mjs +1 -1
  26. package/dist/esm/{types-CJKmgwu6.d.mts → types-BJ345m1Q.d.mts} +2 -2
  27. package/dist/esm/ui/index.d.mts +18 -6
  28. package/dist/esm/ui/index.mjs +424 -58
  29. package/dist/novu.min.js +15 -15
  30. package/dist/novu.min.js.gz +0 -0
  31. package/package.json +7 -2
@@ -1,3 +1,228 @@
1
- export { Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups } from './chunk-BKA3HRZM.mjs';
2
- export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-4S22IB5W.mjs';
3
- import './chunk-STZMOEWR.mjs';
1
+ export { NOTIFICATION_COUNT_SYNC_EVENTS, Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups } from './chunk-33B2GJE2.mjs';
2
+ export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-T3NTOGY3.mjs';
3
+ import { __privateAdd, __privateSet, __privateGet, __async, __privateWrapper, __privateMethod, __spreadProps, __spreadValues } from './chunk-3LR3AF54.mjs';
4
+
5
+ // src/telegram/telegram-subscriber-link.ts
6
+ var DEFAULT_API_URL = "https://api.novu.co";
7
+ var DEFAULT_POLL_INTERVAL_MS = 2e3;
8
+ var TELEGRAM_PROVIDER_ID = "telegram";
9
+ var _options, _state, _listeners, _pollTimer, _expiryTimer, _stopped, _generation, _TelegramSubscriberLink_instances, issueAndPoll_fn, isStale_fn, issueSubscriberLink_fn, scheduleExpiry_fn, handleExpiry_fn, startPolling_fn, checkConnection_fn, setState_fn, clearTimers_fn;
10
+ var TelegramSubscriberLink = class {
11
+ constructor(options) {
12
+ __privateAdd(this, _TelegramSubscriberLink_instances);
13
+ __privateAdd(this, _options);
14
+ __privateAdd(this, _state, {
15
+ status: "loading",
16
+ deepLinkUrl: null,
17
+ botUsername: null,
18
+ expiresAt: null,
19
+ error: null
20
+ });
21
+ __privateAdd(this, _listeners, /* @__PURE__ */ new Set());
22
+ __privateAdd(this, _pollTimer, null);
23
+ __privateAdd(this, _expiryTimer, null);
24
+ __privateAdd(this, _stopped, false);
25
+ // Bumped on every (re)issue so timers/callbacks captured by a previous link
26
+ // become stale and bail out — prevents overlapping poll loops after a
27
+ // refresh() or expiry re-issue.
28
+ __privateAdd(this, _generation, 0);
29
+ var _a, _b, _c;
30
+ __privateSet(this, _options, {
31
+ apiUrl: (_a = options.apiUrl) != null ? _a : DEFAULT_API_URL,
32
+ secretKey: options.secretKey,
33
+ integrationIdentifier: options.integrationIdentifier,
34
+ subscriberId: options.subscriberId,
35
+ pollIntervalMs: (_b = options.pollIntervalMs) != null ? _b : DEFAULT_POLL_INTERVAL_MS,
36
+ fetchFn: (_c = options.fetchFn) != null ? _c : fetch
37
+ });
38
+ }
39
+ get state() {
40
+ return __privateGet(this, _state);
41
+ }
42
+ onStateChange(listener) {
43
+ __privateGet(this, _listeners).add(listener);
44
+ return () => {
45
+ __privateGet(this, _listeners).delete(listener);
46
+ };
47
+ }
48
+ /**
49
+ * Check whether the subscriber is already connected; if not, issue a deep
50
+ * link and begin polling for connection. Call {@link stop} to cancel polling
51
+ * and timers.
52
+ */
53
+ start() {
54
+ return __async(this, null, function* () {
55
+ __privateSet(this, _stopped, false);
56
+ const generation = ++__privateWrapper(this, _generation)._;
57
+ try {
58
+ const connected = yield __privateMethod(this, _TelegramSubscriberLink_instances, checkConnection_fn).call(this);
59
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
60
+ if (connected) {
61
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, __spreadProps(__spreadValues({}, __privateGet(this, _state)), { status: "connected", error: null }));
62
+ return;
63
+ }
64
+ } catch (e) {
65
+ }
66
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
67
+ yield __privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
68
+ });
69
+ }
70
+ /** Re-issue a fresh deep link (e.g. after expiry or on-demand refresh). */
71
+ refresh() {
72
+ return __async(this, null, function* () {
73
+ __privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
74
+ __privateSet(this, _stopped, false);
75
+ yield __privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
76
+ });
77
+ }
78
+ /** Stop all polling and expiry timers. */
79
+ stop() {
80
+ __privateSet(this, _stopped, true);
81
+ __privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
82
+ }
83
+ };
84
+ _options = new WeakMap();
85
+ _state = new WeakMap();
86
+ _listeners = new WeakMap();
87
+ _pollTimer = new WeakMap();
88
+ _expiryTimer = new WeakMap();
89
+ _stopped = new WeakMap();
90
+ _generation = new WeakMap();
91
+ _TelegramSubscriberLink_instances = new WeakSet();
92
+ issueAndPoll_fn = function() {
93
+ return __async(this, null, function* () {
94
+ const generation = ++__privateWrapper(this, _generation)._;
95
+ try {
96
+ const response = yield __privateMethod(this, _TelegramSubscriberLink_instances, issueSubscriberLink_fn).call(this);
97
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
98
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, {
99
+ status: "pending",
100
+ deepLinkUrl: response.deepLinkUrl,
101
+ botUsername: response.botUsername,
102
+ expiresAt: response.expiresAt,
103
+ error: null
104
+ });
105
+ __privateMethod(this, _TelegramSubscriberLink_instances, scheduleExpiry_fn).call(this, response.expiresAt, generation);
106
+ __privateMethod(this, _TelegramSubscriberLink_instances, startPolling_fn).call(this, generation);
107
+ } catch (err) {
108
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
109
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, __spreadProps(__spreadValues({}, __privateGet(this, _state)), {
110
+ status: "pending",
111
+ error: err instanceof Error ? err : new Error(String(err))
112
+ }));
113
+ }
114
+ });
115
+ };
116
+ isStale_fn = function(generation) {
117
+ return __privateGet(this, _stopped) || generation !== __privateGet(this, _generation);
118
+ };
119
+ issueSubscriberLink_fn = function() {
120
+ return __async(this, null, function* () {
121
+ var _a, _b, _c, _d, _e;
122
+ const { apiUrl, integrationIdentifier, subscriberId, secretKey, fetchFn } = __privateGet(this, _options);
123
+ const url = `${apiUrl}/v1/integrations/channel-endpoints/link`;
124
+ const headers = { "Content-Type": "application/json" };
125
+ if (secretKey) {
126
+ headers.Authorization = `ApiKey ${secretKey}`;
127
+ }
128
+ const res = yield fetchFn(url, {
129
+ method: "POST",
130
+ headers,
131
+ body: JSON.stringify({ integrationIdentifier, subscriberId })
132
+ });
133
+ if (!res.ok) {
134
+ const body = yield res.text();
135
+ throw new Error(`Failed to issue Telegram subscriber link (HTTP ${res.status}): ${body}`);
136
+ }
137
+ const json = yield res.json();
138
+ const payload = (_a = json.data) != null ? _a : json;
139
+ return {
140
+ deepLinkUrl: payload.url,
141
+ botUsername: (_c = (_b = payload.providerMetadata) == null ? void 0 : _b.botUsername) != null ? _c : "",
142
+ expiresAt: (_e = (_d = payload.providerMetadata) == null ? void 0 : _d.expiresAt) != null ? _e : ""
143
+ };
144
+ });
145
+ };
146
+ scheduleExpiry_fn = function(expiresAt, generation) {
147
+ const expiresTs = new Date(expiresAt).getTime();
148
+ if (!Number.isFinite(expiresTs)) {
149
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, __spreadProps(__spreadValues({}, __privateGet(this, _state)), {
150
+ error: new Error(`Invalid expiresAt received: ${expiresAt}`)
151
+ }));
152
+ return;
153
+ }
154
+ const msUntilExpiry = expiresTs - Date.now();
155
+ if (msUntilExpiry <= 0) {
156
+ __privateMethod(this, _TelegramSubscriberLink_instances, handleExpiry_fn).call(this, generation);
157
+ return;
158
+ }
159
+ __privateSet(this, _expiryTimer, setTimeout(() => __privateMethod(this, _TelegramSubscriberLink_instances, handleExpiry_fn).call(this, generation), msUntilExpiry));
160
+ };
161
+ handleExpiry_fn = function(generation) {
162
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
163
+ __privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
164
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, __spreadProps(__spreadValues({}, __privateGet(this, _state)), {
165
+ status: "expired"
166
+ }));
167
+ void __privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
168
+ };
169
+ startPolling_fn = function(generation) {
170
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
171
+ const poll = () => __async(this, null, function* () {
172
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
173
+ try {
174
+ const connected = yield __privateMethod(this, _TelegramSubscriberLink_instances, checkConnection_fn).call(this);
175
+ if (__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
176
+ if (connected) {
177
+ __privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
178
+ __privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, __spreadProps(__spreadValues({}, __privateGet(this, _state)), { status: "connected", error: null }));
179
+ return;
180
+ }
181
+ } catch (e) {
182
+ }
183
+ if (!__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) {
184
+ __privateSet(this, _pollTimer, setTimeout(poll, __privateGet(this, _options).pollIntervalMs));
185
+ }
186
+ });
187
+ __privateSet(this, _pollTimer, setTimeout(poll, __privateGet(this, _options).pollIntervalMs));
188
+ };
189
+ checkConnection_fn = function() {
190
+ return __async(this, null, function* () {
191
+ var _a;
192
+ const { apiUrl, integrationIdentifier, subscriberId, secretKey, fetchFn } = __privateGet(this, _options);
193
+ const params = new URLSearchParams({
194
+ subscriberId,
195
+ integrationIdentifier,
196
+ providerId: TELEGRAM_PROVIDER_ID,
197
+ limit: "1"
198
+ });
199
+ const url = `${apiUrl}/v1/channel-endpoints?${params.toString()}`;
200
+ const headers = {};
201
+ if (secretKey) {
202
+ headers.Authorization = `ApiKey ${secretKey}`;
203
+ }
204
+ const res = yield fetchFn(url, { method: "GET", headers });
205
+ if (!res.ok) return false;
206
+ const json = yield res.json();
207
+ const endpoints = (_a = json.data) != null ? _a : json;
208
+ return Array.isArray(endpoints) && endpoints.length > 0;
209
+ });
210
+ };
211
+ setState_fn = function(next) {
212
+ __privateSet(this, _state, next);
213
+ for (const listener of __privateGet(this, _listeners)) {
214
+ listener(next);
215
+ }
216
+ };
217
+ clearTimers_fn = function() {
218
+ if (__privateGet(this, _pollTimer)) {
219
+ clearTimeout(__privateGet(this, _pollTimer));
220
+ __privateSet(this, _pollTimer, null);
221
+ }
222
+ if (__privateGet(this, _expiryTimer)) {
223
+ clearTimeout(__privateGet(this, _expiryTimer));
224
+ __privateSet(this, _expiryTimer, null);
225
+ }
226
+ };
227
+
228
+ export { TelegramSubscriberLink };
@@ -1,4 +1,4 @@
1
- import { f as Context, R as Subscriber, a8 as NovuEventEmitter, a7 as InboxService, I as InboxNotification, N as Notification } from '../inbox-service-CGCuuYnv.mjs';
1
+ import { f as Context, V as Subscriber, aa as NovuEventEmitter, a9 as InboxService, I as InboxNotification, N as Notification } from '../inbox-service-DSSwFYNG.mjs';
2
2
  import 'json-logic-js';
3
3
 
4
4
  /**
@@ -1,2 +1,2 @@
1
- export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-4S22IB5W.mjs';
2
- import '../chunk-STZMOEWR.mjs';
1
+ export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-T3NTOGY3.mjs';
2
+ import '../chunk-3LR3AF54.mjs';
@@ -1,4 +1,4 @@
1
- import { a7 as InboxService, a8 as NovuEventEmitter, a9 as Session, aa as Result, ab as ScheduleCache, K as Schedule, ac as UpdateScheduleArgs, ad as PreferencesCache, ae as ListPreferencesArgs, P as Preference, af as BasePreferenceArgs, ag as InstancePreferenceArgs, ah as ListNotificationsArgs, u as ListNotificationsResponse, I as InboxNotification, N as Notification, a as NotificationFilter, ai as FilterCountArgs, aj as FilterCountResponse, ak as FiltersCountArgs, F as FiltersCountResponse, al as BaseArgs, am as InstanceArgs, an as SnoozeArgs, G as GenerateChatOAuthUrlArgs, ao as GenerateConnectOAuthUrlArgs, L as ListChannelConnectionsArgs, C as ChannelConnectionResponse, o as GetChannelConnectionArgs, k as DeleteChannelConnectionArgs, ap as GenerateLinkUserOAuthUrlArgs, t as ListChannelEndpointsArgs, c as ChannelEndpointResponse, p as GetChannelEndpointArgs, h as CreateChannelEndpointArgs, l as DeleteChannelEndpointArgs, aq as SubscriptionsCache, R as Subscriber, v as ListSubscriptionsArgs, ar as Options, Y as TopicSubscription, q as GetSubscriptionArgs, i as CreateSubscriptionArgs, b as BaseUpdateSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, B as BaseDeleteSubscriptionArgs, r as InstanceDeleteSubscriptionArgs, M as SocketEventNames, as as EventNames, E as EventHandler, n as Events, at as ContextValue, y as NovuOptions, f as Context } from './inbox-service-CGCuuYnv.mjs';
1
+ import { a9 as InboxService, aa as NovuEventEmitter, ab as Session, ac as Result, ad as ScheduleCache, O as Schedule, ae as UpdateScheduleArgs, af as PreferencesCache, ag as ListPreferencesArgs, P as Preference, ah as BasePreferenceArgs, ai as InstancePreferenceArgs, aj as ListNotificationsArgs, w as ListNotificationsResponse, I as InboxNotification, N as Notification, a as NotificationFilter, ak as FilterCountArgs, al as FilterCountResponse, am as FiltersCountArgs, F as FiltersCountResponse, an as BaseArgs, ao as InstanceArgs, ap as SnoozeArgs, G as GenerateChatOAuthUrlArgs, aq as GenerateConnectOAuthUrlArgs, u as ListChannelConnectionsArgs, C as ChannelConnectionResponse, o as GetChannelConnectionArgs, k as DeleteChannelConnectionArgs, ar as GenerateLinkUserOAuthUrlArgs, v as ListChannelEndpointsArgs, c as ChannelEndpointResponse, p as GetChannelEndpointArgs, h as CreateChannelEndpointArgs, l as DeleteChannelEndpointArgs, L as LinkChannelEndpointArgs, t as LinkChannelEndpointResponse, as as SubscriptionsCache, V as Subscriber, x as ListSubscriptionsArgs, at as Options, _ as TopicSubscription, q as GetSubscriptionArgs, i as CreateSubscriptionArgs, b as BaseUpdateSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, B as BaseDeleteSubscriptionArgs, r as InstanceDeleteSubscriptionArgs, Q as SocketEventNames, au as EventNames, E as EventHandler, n as Events, av as ContextValue, A as NovuOptions, f as Context } from './inbox-service-DSSwFYNG.mjs';
2
2
 
3
3
  declare class BaseModule {
4
4
  #private;
@@ -49,7 +49,7 @@ declare class NotificationsCache {
49
49
  emitter: NovuEventEmitter;
50
50
  inboxService: InboxService;
51
51
  });
52
- private updateNotification;
52
+ private syncNotificationInBucket;
53
53
  private removeNotification;
54
54
  private handleNotificationEvent;
55
55
  private getAggregated;
@@ -161,6 +161,7 @@ declare class ChannelEndpoints extends BaseModule {
161
161
  get(args: GetChannelEndpointArgs): Result<ChannelEndpointResponse | null>;
162
162
  create(args: CreateChannelEndpointArgs): Result<ChannelEndpointResponse>;
163
163
  delete(args: DeleteChannelEndpointArgs): Result<void>;
164
+ link(args: LinkChannelEndpointArgs): Result<LinkChannelEndpointResponse>;
164
165
  }
165
166
 
166
167
  declare class Subscriptions extends BaseModule {
@@ -1,7 +1,7 @@
1
- import { L as InboxTheme, a6 as SubscriptionTheme } from '../types-CJKmgwu6.mjs';
2
- import '../inbox-service-CGCuuYnv.mjs';
1
+ import { L as InboxTheme, a6 as SubscriptionTheme } from '../types-BJ345m1Q.mjs';
2
+ import '../inbox-service-DSSwFYNG.mjs';
3
3
  import 'json-logic-js';
4
- import '../novu-CFYEiYN8.mjs';
4
+ import '../novu-Z0z0-IxO.mjs';
5
5
 
6
6
  declare const inboxDarkTheme: InboxTheme;
7
7
  /**
@@ -1,4 +1,4 @@
1
- import '../chunk-STZMOEWR.mjs';
1
+ import '../chunk-3LR3AF54.mjs';
2
2
 
3
3
  // src/ui/themes/dark.ts
4
4
  var inboxDarkTheme = {
@@ -1,5 +1,5 @@
1
- import { P as Preference, K as Schedule, N as Notification, Y as TopicSubscription, U as SubscriptionPreference, y as NovuOptions, a as NotificationFilter, a2 as WorkflowCriticalityEnum, Z as UnreadCount } from './inbox-service-CGCuuYnv.mjs';
2
- import { N as Novu } from './novu-CFYEiYN8.mjs';
1
+ import { P as Preference, O as Schedule, N as Notification, _ as TopicSubscription, W as SubscriptionPreference, A as NovuOptions, a as NotificationFilter, a4 as WorkflowCriticalityEnum, $ as UnreadCount } from './inbox-service-DSSwFYNG.mjs';
2
+ import { N as Novu } from './novu-Z0z0-IxO.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"];
@@ -1,12 +1,12 @@
1
- import { f as Context, a6 as ConnectionMode, a5 as WorkflowIdentifierOrId, Y as TopicSubscription, y as NovuOptions } from '../inbox-service-CGCuuYnv.mjs';
2
- export { N as Notification } from '../inbox-service-CGCuuYnv.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-CJKmgwu6.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, r as ChannelConnectButtonAppearanceCallback, s as ChannelConnectButtonAppearanceCallbackFunction, t as ChannelConnectButtonAppearanceCallbackKeys, u as ChannelConnectButtonIconKey, E as ElementStyles, I as IconRenderer, v as InboxAppearance, w as InboxAppearanceCallback, x as InboxAppearanceCallbackFunction, y as InboxAppearanceCallbackKeys, z as InboxAppearanceKey, F as InboxElements, G as InboxIconKey, H as InboxIconOverrides, J as InboxLocalization, K as InboxLocalizationKey, L as InboxTheme, M as MsTeamsLinkUserAppearanceCallback, O as MsTeamsLinkUserAppearanceCallbackFunction, Q as MsTeamsLinkUserAppearanceCallbackKeys, U as NotificationStatus, V as SlackLinkUserAppearanceCallback, W as SlackLinkUserAppearanceCallbackFunction, X as SlackLinkUserAppearanceCallbackKeys, Y as SubscriptionAppearance, Z as SubscriptionAppearanceCallback, _ as SubscriptionAppearanceCallbackFunction, $ as SubscriptionAppearanceCallbackKeys, a0 as SubscriptionAppearanceKey, a1 as SubscriptionElements, a2 as SubscriptionIconKey, a3 as SubscriptionIconOverrides, a4 as SubscriptionLocalization, a5 as SubscriptionLocalizationKey, a6 as SubscriptionTheme, a7 as Variables } from '../types-CJKmgwu6.mjs';
1
+ import { f as Context, a8 as ConnectionMode, a7 as WorkflowIdentifierOrId, _ as TopicSubscription, A as NovuOptions } from '../inbox-service-DSSwFYNG.mjs';
2
+ export { N as Notification } from '../inbox-service-DSSwFYNG.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-BJ345m1Q.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, r as ChannelConnectButtonAppearanceCallback, s as ChannelConnectButtonAppearanceCallbackFunction, t as ChannelConnectButtonAppearanceCallbackKeys, u as ChannelConnectButtonIconKey, E as ElementStyles, I as IconRenderer, v as InboxAppearance, w as InboxAppearanceCallback, x as InboxAppearanceCallbackFunction, y as InboxAppearanceCallbackKeys, z as InboxAppearanceKey, F as InboxElements, G as InboxIconKey, H as InboxIconOverrides, J as InboxLocalization, K as InboxLocalizationKey, L as InboxTheme, M as MsTeamsLinkUserAppearanceCallback, O as MsTeamsLinkUserAppearanceCallbackFunction, Q as MsTeamsLinkUserAppearanceCallbackKeys, U as NotificationStatus, V as SlackLinkUserAppearanceCallback, W as SlackLinkUserAppearanceCallbackFunction, X as SlackLinkUserAppearanceCallbackKeys, Y as SubscriptionAppearance, Z as SubscriptionAppearanceCallback, _ as SubscriptionAppearanceCallbackFunction, $ as SubscriptionAppearanceCallbackKeys, a0 as SubscriptionAppearanceKey, a1 as SubscriptionElements, a2 as SubscriptionIconKey, a3 as SubscriptionIconOverrides, a4 as SubscriptionLocalization, a5 as SubscriptionLocalizationKey, a6 as SubscriptionTheme, a7 as Variables } from '../types-BJ345m1Q.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-CFYEiYN8.mjs';
9
+ import { N as Novu } from '../novu-Z0z0-IxO.mjs';
10
10
  import 'json-logic-js';
11
11
 
12
12
  type ConnectChatProps = {
@@ -204,6 +204,17 @@ type SubscriptionPreferencesWrapperProps = {
204
204
  }) => void;
205
205
  };
206
206
 
207
+ type TelegramConnectButtonProps = {
208
+ integrationIdentifier: string;
209
+ subscriberId?: string;
210
+ onConnectSuccess?: (endpointIdentifier: string) => void;
211
+ onConnectError?: (error: unknown) => void;
212
+ onDisconnectSuccess?: () => void;
213
+ onDisconnectError?: (error: unknown) => void;
214
+ connectLabel?: string;
215
+ connectedLabel?: string;
216
+ };
217
+
207
218
  declare const novuComponents: {
208
219
  Inbox: (props: InboxProps) => solid_js.JSX.Element;
209
220
  InboxContent: (props: InboxContentProps) => solid_js.JSX.Element;
@@ -220,6 +231,7 @@ declare const novuComponents: {
220
231
  SlackConnectButton: (props: SlackConnectButtonProps) => solid_js.JSX.Element;
221
232
  MsTeamsLinkUser: (props: MsTeamsLinkUserProps) => solid_js.JSX.Element;
222
233
  MsTeamsConnectButton: (props: MsTeamsConnectButtonProps) => solid_js.JSX.Element;
234
+ TelegramConnectButton: (props: TelegramConnectButtonProps) => solid_js.JSX.Element;
223
235
  };
224
236
  type NovuComponentName = keyof typeof novuComponents;
225
237
 
@@ -248,4 +260,4 @@ declare class NovuUI {
248
260
  unmount(): void;
249
261
  }
250
262
 
251
- export { AllAppearance, AllLocalization, type BaseNovuUIOptions, BellRenderer, BodyRenderer, type ConnectChatProps, InboxPage, type InboxProps, type MsTeamsConnectButtonProps, type MsTeamsLinkUserProps, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, PreferencesSort, RouterPush, type SlackConnectButtonProps, type SlackLinkUserProps, SubjectRenderer, type SubscriptionButtonWrapperProps, type SubscriptionPreferencesWrapperProps, type SubscriptionProps, Tab };
263
+ export { AllAppearance, AllLocalization, type BaseNovuUIOptions, BellRenderer, BodyRenderer, type ConnectChatProps, InboxPage, type InboxProps, type MsTeamsConnectButtonProps, type MsTeamsLinkUserProps, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, PreferencesSort, RouterPush, type SlackConnectButtonProps, type SlackLinkUserProps, SubjectRenderer, type SubscriptionButtonWrapperProps, type SubscriptionPreferencesWrapperProps, type SubscriptionProps, Tab, type TelegramConnectButtonProps };