@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.
- package/dist/cjs/{chunk-7B52C2XE.js → chunk-A6CBLMST.js} +9 -0
- package/dist/cjs/{chunk-SP44ETLM.js → chunk-NR4RSYUE.js} +772 -694
- package/dist/cjs/{chunk-WDGG3OER.js → chunk-TLQQB5Y7.js} +217 -199
- package/dist/{esm/inbox-service-CGCuuYnv.d.mts → cjs/inbox-service-DSSwFYNG.d.ts} +18 -2
- package/dist/cjs/index.d.ts +93 -4
- package/dist/cjs/index.js +246 -20
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/cjs/internal/index.js +7 -7
- package/dist/cjs/{novu-CmNBco-0.d.ts → novu-BQCC3vQS.d.ts} +3 -2
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/cjs/themes/index.js +1 -1
- package/dist/cjs/{types-BF6zvyj6.d.ts → types-Djf8MaW9.d.ts} +2 -2
- package/dist/cjs/ui/index.d.ts +18 -6
- package/dist/cjs/ui/index.js +609 -243
- package/dist/esm/{chunk-BKA3HRZM.mjs → chunk-33B2GJE2.mjs} +140 -64
- package/dist/esm/{chunk-STZMOEWR.mjs → chunk-3LR3AF54.mjs} +9 -1
- package/dist/esm/{chunk-4S22IB5W.mjs → chunk-T3NTOGY3.mjs} +193 -176
- package/dist/{cjs/inbox-service-CGCuuYnv.d.ts → esm/inbox-service-DSSwFYNG.d.mts} +18 -2
- package/dist/esm/index.d.mts +93 -4
- package/dist/esm/index.mjs +228 -3
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/esm/internal/index.mjs +2 -2
- package/dist/esm/{novu-CFYEiYN8.d.mts → novu-Z0z0-IxO.d.mts} +3 -2
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/esm/themes/index.mjs +1 -1
- package/dist/esm/{types-CJKmgwu6.d.mts → types-BJ345m1Q.d.mts} +2 -2
- package/dist/esm/ui/index.d.mts +18 -6
- package/dist/esm/ui/index.mjs +424 -58
- package/dist/novu.min.js +15 -15
- package/dist/novu.min.js.gz +0 -0
- package/package.json +7 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from 'json-logic-js';
|
|
2
|
-
import { S as SeverityLevelEnum, T as TagsFilter, N as Notification, a as NotificationFilter } from './inbox-service-
|
|
3
|
-
export { B as BaseDeleteSubscriptionArgs, b as BaseUpdateSubscriptionArgs, C as ChannelConnectionResponse, c as ChannelEndpointResponse, d as ChannelPreference, e as ChannelType, f as Context, g as CreateChannelConnectionArgs, h as CreateChannelEndpointArgs, i as CreateSubscriptionArgs, D as DaySchedule, j as DefaultSchedule, k as DeleteChannelConnectionArgs, l as DeleteChannelEndpointArgs, m as DeleteSubscriptionArgs, E as EventHandler, n as Events, F as FiltersCountResponse, G as GenerateChatOAuthUrlArgs, o as GetChannelConnectionArgs, p as GetChannelEndpointArgs, q as GetSubscriptionArgs, I as InboxNotification, r as InstanceDeleteSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, L as
|
|
4
|
-
export { N as Novu } from './novu-
|
|
2
|
+
import { S as SeverityLevelEnum, T as TagsFilter, N as Notification, a as NotificationFilter } from './inbox-service-DSSwFYNG.js';
|
|
3
|
+
export { B as BaseDeleteSubscriptionArgs, b as BaseUpdateSubscriptionArgs, C as ChannelConnectionResponse, c as ChannelEndpointResponse, d as ChannelPreference, e as ChannelType, f as Context, g as CreateChannelConnectionArgs, h as CreateChannelEndpointArgs, i as CreateSubscriptionArgs, D as DaySchedule, j as DefaultSchedule, k as DeleteChannelConnectionArgs, l as DeleteChannelEndpointArgs, m as DeleteSubscriptionArgs, E as EventHandler, n as Events, F as FiltersCountResponse, G as GenerateChatOAuthUrlArgs, o as GetChannelConnectionArgs, p as GetChannelEndpointArgs, q as GetSubscriptionArgs, I as InboxNotification, r as InstanceDeleteSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, L as LinkChannelEndpointArgs, t as LinkChannelEndpointResponse, u as ListChannelConnectionsArgs, v as ListChannelEndpointsArgs, w as ListNotificationsResponse, x as ListSubscriptionsArgs, y as NotificationStatus, z as NovuError, A as NovuOptions, H as NovuSocketOptions, P as Preference, J as PreferenceFilter, K as PreferenceLevel, M as PreferencesResponse, O as Schedule, Q as SocketEventNames, R as SocketTypeOption, U as StandardNovuOptions, V as Subscriber, W as SubscriptionPreference, X as TagsFilterAndForm, Y as TagsFilterOrGroup, Z as TimeRange, _ as TopicSubscription, $ as UnreadCount, a0 as UpdateSubscriptionArgs, a1 as UpdateSubscriptionPreferenceArgs, a2 as WebSocketEvent, a3 as WeeklySchedule, a4 as WorkflowCriticalityEnum, a5 as WorkflowFilter, a6 as WorkflowGroupFilter, a7 as WorkflowIdentifierOrId } from './inbox-service-DSSwFYNG.js';
|
|
4
|
+
export { N as Novu } from './novu-BQCC3vQS.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Normalizes inbox tag filters to CNF: `string[][]` where each inner array is one OR-group.
|
|
@@ -31,4 +31,93 @@ declare function checkNotificationDataFilter(notificationData: Notification['dat
|
|
|
31
31
|
*/
|
|
32
32
|
declare function checkNotificationMatchesFilter(notification: Notification, filter: NotificationFilter): boolean;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
declare const NOTIFICATION_COUNT_SYNC_EVENTS: readonly ["notification.read.resolved", "notification.unread.resolved", "notification.seen.resolved", "notification.archive.resolved", "notification.unarchive.resolved", "notification.snooze.resolved", "notification.unsnooze.resolved", "notification.delete.resolved", "notifications.read_all.resolved", "notifications.seen_all.resolved", "notifications.archive_all.resolved", "notifications.archive_all_read.resolved", "notifications.delete_all.resolved"];
|
|
35
|
+
|
|
36
|
+
type TelegramSubscriberLinkStatus = 'loading' | 'pending' | 'connected' | 'expired';
|
|
37
|
+
type TelegramSubscriberLinkResponse = {
|
|
38
|
+
deepLinkUrl: string;
|
|
39
|
+
botUsername: string;
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
};
|
|
42
|
+
type TelegramSubscriberLinkOptions = {
|
|
43
|
+
/**
|
|
44
|
+
* Base URL of the Novu API (or your backend proxy).
|
|
45
|
+
* Defaults to `https://api.novu.co`.
|
|
46
|
+
*/
|
|
47
|
+
apiUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Novu server-side secret key (`Authorization: ApiKey <key>`).
|
|
50
|
+
* Required when calling the Novu API directly.
|
|
51
|
+
* Omit when routing through a backend proxy that injects its own auth.
|
|
52
|
+
*/
|
|
53
|
+
secretKey?: string;
|
|
54
|
+
/** Integration identifier (the `identifier` field on the Telegram integration, not `_id`). */
|
|
55
|
+
integrationIdentifier: string;
|
|
56
|
+
/** External subscriber ID to link to the Telegram chat. */
|
|
57
|
+
subscriberId: string;
|
|
58
|
+
/**
|
|
59
|
+
* Polling interval in milliseconds to check for connection confirmation.
|
|
60
|
+
* Defaults to `2000` (2 seconds).
|
|
61
|
+
*/
|
|
62
|
+
pollIntervalMs?: number;
|
|
63
|
+
/**
|
|
64
|
+
* Custom fetch function. Defaults to the global `fetch`.
|
|
65
|
+
* Useful for injecting auth headers in a backend-proxy scenario.
|
|
66
|
+
*/
|
|
67
|
+
fetchFn?: typeof fetch;
|
|
68
|
+
};
|
|
69
|
+
type TelegramSubscriberLinkState = {
|
|
70
|
+
status: TelegramSubscriberLinkStatus;
|
|
71
|
+
deepLinkUrl: string | null;
|
|
72
|
+
botUsername: string | null;
|
|
73
|
+
expiresAt: string | null;
|
|
74
|
+
error: Error | null;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type StateListener = (state: TelegramSubscriberLinkState) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Framework-agnostic helper that manages the full Telegram subscriber-link
|
|
80
|
+
* lifecycle: issue a deep link, poll for the subscriber's `/start` tap, and
|
|
81
|
+
* re-issue automatically when the 10-minute code expires.
|
|
82
|
+
*
|
|
83
|
+
* **Important:** The subscriber-link endpoint requires `INTEGRATION_WRITE`
|
|
84
|
+
* permission and must be called from a trusted server or via a backend proxy —
|
|
85
|
+
* never directly from an untrusted browser with end-user credentials.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { TelegramSubscriberLink } from '@novu/js';
|
|
90
|
+
*
|
|
91
|
+
* const link = new TelegramSubscriberLink({
|
|
92
|
+
* secretKey: process.env.NOVU_SECRET_KEY,
|
|
93
|
+
* integrationIdentifier: '<telegram-integration-identifier>',
|
|
94
|
+
* subscriberId: 'user-42',
|
|
95
|
+
* });
|
|
96
|
+
*
|
|
97
|
+
* link.onStateChange((state) => {
|
|
98
|
+
* console.log(state.status, state.deepLinkUrl);
|
|
99
|
+
* });
|
|
100
|
+
*
|
|
101
|
+
* await link.start();
|
|
102
|
+
* // … later …
|
|
103
|
+
* link.stop();
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
declare class TelegramSubscriberLink {
|
|
107
|
+
#private;
|
|
108
|
+
constructor(options: TelegramSubscriberLinkOptions);
|
|
109
|
+
get state(): Readonly<TelegramSubscriberLinkState>;
|
|
110
|
+
onStateChange(listener: StateListener): () => void;
|
|
111
|
+
/**
|
|
112
|
+
* Check whether the subscriber is already connected; if not, issue a deep
|
|
113
|
+
* link and begin polling for connection. Call {@link stop} to cancel polling
|
|
114
|
+
* and timers.
|
|
115
|
+
*/
|
|
116
|
+
start(): Promise<void>;
|
|
117
|
+
/** Re-issue a fresh deep link (e.g. after expiry or on-demand refresh). */
|
|
118
|
+
refresh(): Promise<void>;
|
|
119
|
+
/** Stop all polling and expiry timers. */
|
|
120
|
+
stop(): void;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { NOTIFICATION_COUNT_SYNC_EVENTS, Notification, NotificationFilter, SeverityLevelEnum, TagsFilter, TelegramSubscriberLink, type TelegramSubscriberLinkOptions, type TelegramSubscriberLinkResponse, type TelegramSubscriberLinkState, type TelegramSubscriberLinkStatus, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups };
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,72 +1,298 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
|
|
3
|
+
var chunkNR4RSYUE_js = require('./chunk-NR4RSYUE.js');
|
|
4
|
+
var chunkTLQQB5Y7_js = require('./chunk-TLQQB5Y7.js');
|
|
5
|
+
var chunkA6CBLMST_js = require('./chunk-A6CBLMST.js');
|
|
7
6
|
|
|
7
|
+
// src/telegram/telegram-subscriber-link.ts
|
|
8
|
+
var DEFAULT_API_URL = "https://api.novu.co";
|
|
9
|
+
var DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
10
|
+
var TELEGRAM_PROVIDER_ID = "telegram";
|
|
11
|
+
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;
|
|
12
|
+
var TelegramSubscriberLink = class {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
chunkA6CBLMST_js.__privateAdd(this, _TelegramSubscriberLink_instances);
|
|
15
|
+
chunkA6CBLMST_js.__privateAdd(this, _options);
|
|
16
|
+
chunkA6CBLMST_js.__privateAdd(this, _state, {
|
|
17
|
+
status: "loading",
|
|
18
|
+
deepLinkUrl: null,
|
|
19
|
+
botUsername: null,
|
|
20
|
+
expiresAt: null,
|
|
21
|
+
error: null
|
|
22
|
+
});
|
|
23
|
+
chunkA6CBLMST_js.__privateAdd(this, _listeners, /* @__PURE__ */ new Set());
|
|
24
|
+
chunkA6CBLMST_js.__privateAdd(this, _pollTimer, null);
|
|
25
|
+
chunkA6CBLMST_js.__privateAdd(this, _expiryTimer, null);
|
|
26
|
+
chunkA6CBLMST_js.__privateAdd(this, _stopped, false);
|
|
27
|
+
// Bumped on every (re)issue so timers/callbacks captured by a previous link
|
|
28
|
+
// become stale and bail out — prevents overlapping poll loops after a
|
|
29
|
+
// refresh() or expiry re-issue.
|
|
30
|
+
chunkA6CBLMST_js.__privateAdd(this, _generation, 0);
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
chunkA6CBLMST_js.__privateSet(this, _options, {
|
|
33
|
+
apiUrl: (_a = options.apiUrl) != null ? _a : DEFAULT_API_URL,
|
|
34
|
+
secretKey: options.secretKey,
|
|
35
|
+
integrationIdentifier: options.integrationIdentifier,
|
|
36
|
+
subscriberId: options.subscriberId,
|
|
37
|
+
pollIntervalMs: (_b = options.pollIntervalMs) != null ? _b : DEFAULT_POLL_INTERVAL_MS,
|
|
38
|
+
fetchFn: (_c = options.fetchFn) != null ? _c : fetch
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
get state() {
|
|
42
|
+
return chunkA6CBLMST_js.__privateGet(this, _state);
|
|
43
|
+
}
|
|
44
|
+
onStateChange(listener) {
|
|
45
|
+
chunkA6CBLMST_js.__privateGet(this, _listeners).add(listener);
|
|
46
|
+
return () => {
|
|
47
|
+
chunkA6CBLMST_js.__privateGet(this, _listeners).delete(listener);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check whether the subscriber is already connected; if not, issue a deep
|
|
52
|
+
* link and begin polling for connection. Call {@link stop} to cancel polling
|
|
53
|
+
* and timers.
|
|
54
|
+
*/
|
|
55
|
+
start() {
|
|
56
|
+
return chunkA6CBLMST_js.__async(this, null, function* () {
|
|
57
|
+
chunkA6CBLMST_js.__privateSet(this, _stopped, false);
|
|
58
|
+
const generation = ++chunkA6CBLMST_js.__privateWrapper(this, _generation)._;
|
|
59
|
+
try {
|
|
60
|
+
const connected = yield chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, checkConnection_fn).call(this);
|
|
61
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
62
|
+
if (connected) {
|
|
63
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, chunkA6CBLMST_js.__spreadProps(chunkA6CBLMST_js.__spreadValues({}, chunkA6CBLMST_js.__privateGet(this, _state)), { status: "connected", error: null }));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
} catch (e) {
|
|
67
|
+
}
|
|
68
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
69
|
+
yield chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/** Re-issue a fresh deep link (e.g. after expiry or on-demand refresh). */
|
|
73
|
+
refresh() {
|
|
74
|
+
return chunkA6CBLMST_js.__async(this, null, function* () {
|
|
75
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
|
|
76
|
+
chunkA6CBLMST_js.__privateSet(this, _stopped, false);
|
|
77
|
+
yield chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Stop all polling and expiry timers. */
|
|
81
|
+
stop() {
|
|
82
|
+
chunkA6CBLMST_js.__privateSet(this, _stopped, true);
|
|
83
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
_options = new WeakMap();
|
|
87
|
+
_state = new WeakMap();
|
|
88
|
+
_listeners = new WeakMap();
|
|
89
|
+
_pollTimer = new WeakMap();
|
|
90
|
+
_expiryTimer = new WeakMap();
|
|
91
|
+
_stopped = new WeakMap();
|
|
92
|
+
_generation = new WeakMap();
|
|
93
|
+
_TelegramSubscriberLink_instances = new WeakSet();
|
|
94
|
+
issueAndPoll_fn = function() {
|
|
95
|
+
return chunkA6CBLMST_js.__async(this, null, function* () {
|
|
96
|
+
const generation = ++chunkA6CBLMST_js.__privateWrapper(this, _generation)._;
|
|
97
|
+
try {
|
|
98
|
+
const response = yield chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, issueSubscriberLink_fn).call(this);
|
|
99
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
100
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, {
|
|
101
|
+
status: "pending",
|
|
102
|
+
deepLinkUrl: response.deepLinkUrl,
|
|
103
|
+
botUsername: response.botUsername,
|
|
104
|
+
expiresAt: response.expiresAt,
|
|
105
|
+
error: null
|
|
106
|
+
});
|
|
107
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, scheduleExpiry_fn).call(this, response.expiresAt, generation);
|
|
108
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, startPolling_fn).call(this, generation);
|
|
109
|
+
} catch (err) {
|
|
110
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
111
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, chunkA6CBLMST_js.__spreadProps(chunkA6CBLMST_js.__spreadValues({}, chunkA6CBLMST_js.__privateGet(this, _state)), {
|
|
112
|
+
status: "pending",
|
|
113
|
+
error: err instanceof Error ? err : new Error(String(err))
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
isStale_fn = function(generation) {
|
|
119
|
+
return chunkA6CBLMST_js.__privateGet(this, _stopped) || generation !== chunkA6CBLMST_js.__privateGet(this, _generation);
|
|
120
|
+
};
|
|
121
|
+
issueSubscriberLink_fn = function() {
|
|
122
|
+
return chunkA6CBLMST_js.__async(this, null, function* () {
|
|
123
|
+
var _a, _b, _c, _d, _e;
|
|
124
|
+
const { apiUrl, integrationIdentifier, subscriberId, secretKey, fetchFn } = chunkA6CBLMST_js.__privateGet(this, _options);
|
|
125
|
+
const url = `${apiUrl}/v1/integrations/channel-endpoints/link`;
|
|
126
|
+
const headers = { "Content-Type": "application/json" };
|
|
127
|
+
if (secretKey) {
|
|
128
|
+
headers.Authorization = `ApiKey ${secretKey}`;
|
|
129
|
+
}
|
|
130
|
+
const res = yield fetchFn(url, {
|
|
131
|
+
method: "POST",
|
|
132
|
+
headers,
|
|
133
|
+
body: JSON.stringify({ integrationIdentifier, subscriberId })
|
|
134
|
+
});
|
|
135
|
+
if (!res.ok) {
|
|
136
|
+
const body = yield res.text();
|
|
137
|
+
throw new Error(`Failed to issue Telegram subscriber link (HTTP ${res.status}): ${body}`);
|
|
138
|
+
}
|
|
139
|
+
const json = yield res.json();
|
|
140
|
+
const payload = (_a = json.data) != null ? _a : json;
|
|
141
|
+
return {
|
|
142
|
+
deepLinkUrl: payload.url,
|
|
143
|
+
botUsername: (_c = (_b = payload.providerMetadata) == null ? void 0 : _b.botUsername) != null ? _c : "",
|
|
144
|
+
expiresAt: (_e = (_d = payload.providerMetadata) == null ? void 0 : _d.expiresAt) != null ? _e : ""
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
scheduleExpiry_fn = function(expiresAt, generation) {
|
|
149
|
+
const expiresTs = new Date(expiresAt).getTime();
|
|
150
|
+
if (!Number.isFinite(expiresTs)) {
|
|
151
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, chunkA6CBLMST_js.__spreadProps(chunkA6CBLMST_js.__spreadValues({}, chunkA6CBLMST_js.__privateGet(this, _state)), {
|
|
152
|
+
error: new Error(`Invalid expiresAt received: ${expiresAt}`)
|
|
153
|
+
}));
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const msUntilExpiry = expiresTs - Date.now();
|
|
157
|
+
if (msUntilExpiry <= 0) {
|
|
158
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, handleExpiry_fn).call(this, generation);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
chunkA6CBLMST_js.__privateSet(this, _expiryTimer, setTimeout(() => chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, handleExpiry_fn).call(this, generation), msUntilExpiry));
|
|
162
|
+
};
|
|
163
|
+
handleExpiry_fn = function(generation) {
|
|
164
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
165
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
|
|
166
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, chunkA6CBLMST_js.__spreadProps(chunkA6CBLMST_js.__spreadValues({}, chunkA6CBLMST_js.__privateGet(this, _state)), {
|
|
167
|
+
status: "expired"
|
|
168
|
+
}));
|
|
169
|
+
void chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, issueAndPoll_fn).call(this);
|
|
170
|
+
};
|
|
171
|
+
startPolling_fn = function(generation) {
|
|
172
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
173
|
+
const poll = () => chunkA6CBLMST_js.__async(this, null, function* () {
|
|
174
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
175
|
+
try {
|
|
176
|
+
const connected = yield chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, checkConnection_fn).call(this);
|
|
177
|
+
if (chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) return;
|
|
178
|
+
if (connected) {
|
|
179
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, clearTimers_fn).call(this);
|
|
180
|
+
chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, setState_fn).call(this, chunkA6CBLMST_js.__spreadProps(chunkA6CBLMST_js.__spreadValues({}, chunkA6CBLMST_js.__privateGet(this, _state)), { status: "connected", error: null }));
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
} catch (e) {
|
|
184
|
+
}
|
|
185
|
+
if (!chunkA6CBLMST_js.__privateMethod(this, _TelegramSubscriberLink_instances, isStale_fn).call(this, generation)) {
|
|
186
|
+
chunkA6CBLMST_js.__privateSet(this, _pollTimer, setTimeout(poll, chunkA6CBLMST_js.__privateGet(this, _options).pollIntervalMs));
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
chunkA6CBLMST_js.__privateSet(this, _pollTimer, setTimeout(poll, chunkA6CBLMST_js.__privateGet(this, _options).pollIntervalMs));
|
|
190
|
+
};
|
|
191
|
+
checkConnection_fn = function() {
|
|
192
|
+
return chunkA6CBLMST_js.__async(this, null, function* () {
|
|
193
|
+
var _a;
|
|
194
|
+
const { apiUrl, integrationIdentifier, subscriberId, secretKey, fetchFn } = chunkA6CBLMST_js.__privateGet(this, _options);
|
|
195
|
+
const params = new URLSearchParams({
|
|
196
|
+
subscriberId,
|
|
197
|
+
integrationIdentifier,
|
|
198
|
+
providerId: TELEGRAM_PROVIDER_ID,
|
|
199
|
+
limit: "1"
|
|
200
|
+
});
|
|
201
|
+
const url = `${apiUrl}/v1/channel-endpoints?${params.toString()}`;
|
|
202
|
+
const headers = {};
|
|
203
|
+
if (secretKey) {
|
|
204
|
+
headers.Authorization = `ApiKey ${secretKey}`;
|
|
205
|
+
}
|
|
206
|
+
const res = yield fetchFn(url, { method: "GET", headers });
|
|
207
|
+
if (!res.ok) return false;
|
|
208
|
+
const json = yield res.json();
|
|
209
|
+
const endpoints = (_a = json.data) != null ? _a : json;
|
|
210
|
+
return Array.isArray(endpoints) && endpoints.length > 0;
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
setState_fn = function(next) {
|
|
214
|
+
chunkA6CBLMST_js.__privateSet(this, _state, next);
|
|
215
|
+
for (const listener of chunkA6CBLMST_js.__privateGet(this, _listeners)) {
|
|
216
|
+
listener(next);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
clearTimers_fn = function() {
|
|
220
|
+
if (chunkA6CBLMST_js.__privateGet(this, _pollTimer)) {
|
|
221
|
+
clearTimeout(chunkA6CBLMST_js.__privateGet(this, _pollTimer));
|
|
222
|
+
chunkA6CBLMST_js.__privateSet(this, _pollTimer, null);
|
|
223
|
+
}
|
|
224
|
+
if (chunkA6CBLMST_js.__privateGet(this, _expiryTimer)) {
|
|
225
|
+
clearTimeout(chunkA6CBLMST_js.__privateGet(this, _expiryTimer));
|
|
226
|
+
chunkA6CBLMST_js.__privateSet(this, _expiryTimer, null);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
8
229
|
|
|
230
|
+
Object.defineProperty(exports, "NOTIFICATION_COUNT_SYNC_EVENTS", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () { return chunkNR4RSYUE_js.NOTIFICATION_COUNT_SYNC_EVENTS; }
|
|
233
|
+
});
|
|
9
234
|
Object.defineProperty(exports, "Novu", {
|
|
10
235
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
236
|
+
get: function () { return chunkNR4RSYUE_js.Novu; }
|
|
12
237
|
});
|
|
13
238
|
Object.defineProperty(exports, "SubscriptionPreference", {
|
|
14
239
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
240
|
+
get: function () { return chunkNR4RSYUE_js.SubscriptionPreference; }
|
|
16
241
|
});
|
|
17
242
|
Object.defineProperty(exports, "TopicSubscription", {
|
|
18
243
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
244
|
+
get: function () { return chunkNR4RSYUE_js.TopicSubscription; }
|
|
20
245
|
});
|
|
21
246
|
Object.defineProperty(exports, "areSeveritiesEqual", {
|
|
22
247
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
248
|
+
get: function () { return chunkNR4RSYUE_js.areSeveritiesEqual; }
|
|
24
249
|
});
|
|
25
250
|
Object.defineProperty(exports, "areTagsEqual", {
|
|
26
251
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
252
|
+
get: function () { return chunkNR4RSYUE_js.areTagsEqual; }
|
|
28
253
|
});
|
|
29
254
|
Object.defineProperty(exports, "checkNotificationDataFilter", {
|
|
30
255
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
256
|
+
get: function () { return chunkNR4RSYUE_js.checkNotificationDataFilter; }
|
|
32
257
|
});
|
|
33
258
|
Object.defineProperty(exports, "checkNotificationMatchesFilter", {
|
|
34
259
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
260
|
+
get: function () { return chunkNR4RSYUE_js.checkNotificationMatchesFilter; }
|
|
36
261
|
});
|
|
37
262
|
Object.defineProperty(exports, "isSameFilter", {
|
|
38
263
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
264
|
+
get: function () { return chunkNR4RSYUE_js.isSameFilter; }
|
|
40
265
|
});
|
|
41
266
|
Object.defineProperty(exports, "normalizeTagGroups", {
|
|
42
267
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunkNR4RSYUE_js.normalizeTagGroups; }
|
|
44
269
|
});
|
|
45
270
|
Object.defineProperty(exports, "ChannelType", {
|
|
46
271
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunkTLQQB5Y7_js.ChannelType; }
|
|
48
273
|
});
|
|
49
274
|
Object.defineProperty(exports, "NotificationStatus", {
|
|
50
275
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
276
|
+
get: function () { return chunkTLQQB5Y7_js.NotificationStatus; }
|
|
52
277
|
});
|
|
53
278
|
Object.defineProperty(exports, "NovuError", {
|
|
54
279
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunkTLQQB5Y7_js.NovuError; }
|
|
56
281
|
});
|
|
57
282
|
Object.defineProperty(exports, "PreferenceLevel", {
|
|
58
283
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunkTLQQB5Y7_js.PreferenceLevel; }
|
|
60
285
|
});
|
|
61
286
|
Object.defineProperty(exports, "SeverityLevelEnum", {
|
|
62
287
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
288
|
+
get: function () { return chunkTLQQB5Y7_js.SeverityLevelEnum; }
|
|
64
289
|
});
|
|
65
290
|
Object.defineProperty(exports, "WebSocketEvent", {
|
|
66
291
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
292
|
+
get: function () { return chunkTLQQB5Y7_js.WebSocketEvent; }
|
|
68
293
|
});
|
|
69
294
|
Object.defineProperty(exports, "WorkflowCriticalityEnum", {
|
|
70
295
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
296
|
+
get: function () { return chunkTLQQB5Y7_js.WorkflowCriticalityEnum; }
|
|
72
297
|
});
|
|
298
|
+
exports.TelegramSubscriberLink = TelegramSubscriberLink;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as Context,
|
|
1
|
+
import { f as Context, V as Subscriber, aa as NovuEventEmitter, a9 as InboxService, I as InboxNotification, N as Notification } from '../inbox-service-DSSwFYNG.js';
|
|
2
2
|
import 'json-logic-js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkTLQQB5Y7_js = require('../chunk-TLQQB5Y7.js');
|
|
4
|
+
require('../chunk-A6CBLMST.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "buildContextKey", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkTLQQB5Y7_js.buildContextKey; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "buildSubscriber", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkTLQQB5Y7_js.buildSubscriber; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "buildSubscriptionIdentifier", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkTLQQB5Y7_js.buildSubscriptionIdentifier; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "createNotification", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkTLQQB5Y7_js.createNotification; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "parseMarkdownIntoTokens", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkTLQQB5Y7_js.parseMarkdownIntoTokens; }
|
|
27
27
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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.js';
|
|
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
|
|
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-
|
|
2
|
-
import '../inbox-service-
|
|
1
|
+
import { L as InboxTheme, a6 as SubscriptionTheme } from '../types-Djf8MaW9.js';
|
|
2
|
+
import '../inbox-service-DSSwFYNG.js';
|
|
3
3
|
import 'json-logic-js';
|
|
4
|
-
import '../novu-
|
|
4
|
+
import '../novu-BQCC3vQS.js';
|
|
5
5
|
|
|
6
6
|
declare const inboxDarkTheme: InboxTheme;
|
|
7
7
|
/**
|
package/dist/cjs/themes/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Preference,
|
|
2
|
-
import { N as Novu } from './novu-
|
|
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.js';
|
|
2
|
+
import { N as Novu } from './novu-BQCC3vQS.js';
|
|
3
3
|
|
|
4
4
|
declare const commonAppearanceKeys: readonly ["root", "button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "collapsible", "tooltipContent", "tooltipTrigger"];
|
|
5
5
|
declare const inboxAppearanceKeys: readonly ["bellIcon", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "datePicker", "datePickerGrid", "datePickerGridRow", "datePickerGridCell", "datePickerGridCellTrigger", "datePickerTrigger", "datePickerGridHeader", "datePickerControl", "datePickerControlPrevTrigger", "datePickerControlNextTrigger", "datePickerControlPrevTrigger__icon", "datePickerControlNextTrigger__icon", "datePickerCalendar", "datePickerHeaderMonth", "datePickerCalendarDay__button", "timePicker", "timePicker__hourSelect", "timePicker__minuteSelect", "timePicker__periodSelect", "timePicker__separator", "timePickerHour__input", "timePickerMinute__input", "snoozeDatePicker", "snoozeDatePicker__actions", "snoozeDatePickerCancel__button", "snoozeDatePickerApply__button", "snoozeDatePicker__timePickerContainer", "snoozeDatePicker__timePickerLabel", "back__button", "skeletonText", "skeletonAvatar", "skeletonSwitch", "skeletonSwitchThumb", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNoticeOverlay", "notificationListEmptyNoticeIcon", "notificationListEmptyNotice", "notificationList__skeleton", "notificationList__skeletonContent", "notificationList__skeletonItem", "notificationList__skeletonAvatar", "notificationList__skeletonText", "notificationListNewNotificationsNotice__button", "notification", "severityHigh__notification", "severityMedium__notification", "severityLow__notification", "notificationBar", "severityHigh__notificationBar", "severityMedium__notificationBar", "severityLow__notificationBar", "notificationContent", "notificationTextContainer", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationSubject__em", "notificationBody", "notificationBody__strong", "notificationBody__em", "notificationBodyContainer", "notificationImage", "notificationImageLoadingFallback", "notificationDate", "notificationDateActionsContainer", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationSnooze__button", "notificationUnsnooze__button", "notificationRead__icon", "notificationUnread__icon", "notificationArchive__icon", "notificationUnarchive__icon", "notificationSnooze__icon", "notificationUnsnooze__icon", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "inboxStatus__dropdownItem__icon", "inboxStatus__dropdownItemCheck__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__icon", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelHeader", "workflowLabelHeaderContainer", "workflowLabelIcon", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "workflowDescription", "preferencesGroupContainer", "preferencesGroupHeader", "preferencesGroupLabelContainer", "preferencesGroupLabelIcon", "preferencesGroupLabel", "preferencesGroupActionsContainer", "preferencesGroupActionsContainerRight__icon", "preferencesGroupBody", "preferencesGroupChannels", "preferencesGroupInfo", "preferencesGroupInfoIcon", "preferencesGroupWorkflows", "channelContainer", "channelIconContainer", "channel__icon", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__back__button__icon", "preferencesHeader__title", "preferencesHeader__icon", "preferencesListEmptyNoticeContainer", "preferencesListEmptyNotice", "preferencesList__skeleton", "preferencesList__skeletonContent", "preferencesList__skeletonItem", "preferencesList__skeletonIcon", "preferencesList__skeletonSwitch", "preferencesList__skeletonSwitchThumb", "preferencesList__skeletonText", "scheduleContainer", "scheduleHeader", "scheduleLabelContainer", "scheduleLabelScheduleIcon", "scheduleLabelInfoIcon", "scheduleLabel", "scheduleActionsContainer", "scheduleActionsContainerRight", "scheduleBody", "scheduleDescription", "scheduleTable", "scheduleTableHeader", "scheduleHeaderColumn", "scheduleTableBody", "scheduleBodyRow", "scheduleBodyColumn", "scheduleInfoContainer", "scheduleInfoIcon", "scheduleInfo", "dayScheduleCopyTitle", "dayScheduleCopyIcon", "dayScheduleCopySelectAll", "dayScheduleCopyDay", "dayScheduleCopyFooterContainer", "dayScheduleCopy__dropdownTrigger", "dayScheduleCopy__dropdownContent", "timeSelect__dropdownTrigger", "timeSelect__time", "timeSelect__dropdownContent", "timeSelect__dropdownItem", "timeSelect__dropdownItemLabel", "timeSelect__dropdownItemLabelContainer", "timeSelect__dropdownItemCheck__icon", "notificationSnooze__dropdownContent", "notificationSnooze__dropdownItem", "notificationSnooze__dropdownItem__icon", "notificationSnoozeCustomTime_popoverContent", "notificationDeliveredAt__badge", "notificationDeliveredAt__icon", "notificationSnoozedUntil__icon", "strong", "em"];
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { f as Context,
|
|
2
|
-
export { N as Notification } from '../inbox-service-
|
|
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-
|
|
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-
|
|
1
|
+
import { f as Context, a8 as ConnectionMode, a7 as WorkflowIdentifierOrId, _ as TopicSubscription, A as NovuOptions } from '../inbox-service-DSSwFYNG.js';
|
|
2
|
+
export { N as Notification } from '../inbox-service-DSSwFYNG.js';
|
|
3
|
+
import { B as BellRenderer, N as NotificationClickHandler, a as NotificationActionClickHandler, b as NotificationRenderer, A as AvatarRenderer, S as SubjectRenderer, c as BodyRenderer, D as DefaultActionsRenderer, C as CustomActionsRenderer, d as 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-Djf8MaW9.js';
|
|
4
|
+
export { j as AllAppearanceCallbackFunction, k as AllAppearanceCallbackKeys, l as AllAppearanceKey, m as AllElements, n as AllIconKey, o as AllIconOverrides, p as AllLocalizationKey, q as AllTheme, 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-Djf8MaW9.js';
|
|
5
5
|
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
6
6
|
import * as solid_js from 'solid-js';
|
|
7
7
|
import { ComponentProps } from 'solid-js';
|
|
8
8
|
import { MountableElement } from 'solid-js/web';
|
|
9
|
-
import { N as Novu } from '../novu-
|
|
9
|
+
import { N as Novu } from '../novu-BQCC3vQS.js';
|
|
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 };
|