@novu/js 3.11.0-rc.1 → 3.12.0-rc.1

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 (32) hide show
  1. package/dist/cjs/{chunk-VWSQDNZX.js → chunk-OZV3TKWX.js} +6 -0
  2. package/dist/cjs/{chunk-TROJWAJA.js → chunk-SZEUW4CB.js} +1070 -309
  3. package/dist/cjs/index.d.ts +5 -4
  4. package/dist/cjs/index.js +26 -14
  5. package/dist/cjs/internal/index.d.ts +8 -2
  6. package/dist/cjs/internal/index.js +8 -4
  7. package/dist/{esm/novu-DY-mm8Og.d.mts → cjs/novu-BVtCFUxa.d.ts} +398 -203
  8. package/dist/cjs/themes/index.d.ts +11 -5
  9. package/dist/cjs/themes/index.js +17 -1
  10. package/dist/{esm/types-BM_9Xx5Z.d.mts → cjs/types-D-9ozWeQ.d.ts} +20 -1
  11. package/dist/cjs/types-Rjzg7eo3.d.ts +836 -0
  12. package/dist/cjs/ui/index.d.ts +74 -7
  13. package/dist/cjs/ui/index.js +1786 -261
  14. package/dist/esm/{chunk-D4W52D4A.mjs → chunk-IA6ISHOP.mjs} +1068 -310
  15. package/dist/esm/{chunk-RZWQYM3H.mjs → chunk-RO3GDYAG.mjs} +6 -1
  16. package/dist/esm/index.d.mts +5 -4
  17. package/dist/esm/index.mjs +2 -2
  18. package/dist/esm/internal/index.d.mts +8 -2
  19. package/dist/esm/internal/index.mjs +1 -1
  20. package/dist/{cjs/novu-ThMWeiRt.d.ts → esm/novu-YP3PwsQR.d.mts} +398 -203
  21. package/dist/esm/themes/index.d.mts +11 -5
  22. package/dist/esm/themes/index.mjs +16 -2
  23. package/dist/{cjs/types-BM_9Xx5Z.d.ts → esm/types-D-9ozWeQ.d.mts} +20 -1
  24. package/dist/esm/types-DmMJ1GiR.d.mts +836 -0
  25. package/dist/esm/ui/index.d.mts +74 -7
  26. package/dist/esm/ui/index.mjs +1783 -257
  27. package/dist/index.css +1 -1
  28. package/dist/novu.min.js +12 -12
  29. package/dist/novu.min.js.gz +0 -0
  30. package/package.json +18 -17
  31. package/dist/cjs/types-BjANCN3c.d.ts +0 -537
  32. package/dist/esm/types-C5eX1GmB.d.mts +0 -537
@@ -27,6 +27,11 @@ function buildSubscriber({
27
27
  return { subscriberId: "" };
28
28
  }
29
29
 
30
+ // src/ui/internal/buildSubscriptionIdentifier.ts
31
+ function buildSubscriptionIdentifier({ topicKey, subscriberId }) {
32
+ return `tk_${topicKey}:si_${subscriberId}`;
33
+ }
34
+
30
35
  // src/ui/internal/parseMarkdown.tsx
31
36
  var parseMarkdownIntoTokens = (text) => {
32
37
  const tokens = [];
@@ -59,4 +64,4 @@ var parseMarkdownIntoTokens = (text) => {
59
64
  return tokens;
60
65
  };
61
66
 
62
- export { buildContextKey, buildSubscriber, parseMarkdownIntoTokens };
67
+ export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, parseMarkdownIntoTokens };
@@ -1,7 +1,8 @@
1
- import { N as Notification } from './novu-DY-mm8Og.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-DY-mm8Og.mjs';
3
- import { S as SeverityLevelEnum, N as NotificationFilter } from './types-BM_9Xx5Z.mjs';
4
- export { C as ChannelPreference, a as ChannelType, b as Context, D as DaySchedule, c as DefaultSchedule, I as InboxNotification, d as NotificationStatus, e as NovuError, f as NovuOptions, P as PreferenceLevel, g as PreferencesResponse, h as StandardNovuOptions, i as Subscriber, T as TimeRange, U as UnreadCount, W as WebSocketEvent, j as WeeklySchedule, k as WorkflowCriticalityEnum } from './types-BM_9Xx5Z.mjs';
1
+ export * from 'json-logic-js';
2
+ import { N as Notification } from './novu-YP3PwsQR.mjs';
3
+ export { B as BaseDeleteSubscriptionArgs, e as BaseUpdateSubscriptionArgs, C as CreateSubscriptionArgs, D as DeleteSubscriptionArgs, E as EventHandler, a as Events, F as FiltersCountResponse, G as GetSubscriptionArgs, I as InstanceDeleteSubscriptionArgs, f as InstanceUpdateSubscriptionArgs, i as ListNotificationsResponse, L as ListSubscriptionsArgs, b as Novu, j as Preference, P as PreferenceFilter, k as Schedule, S as SocketEventNames, g as SubscriptionPreference, T as TopicSubscription, U as UpdateSubscriptionArgs, h as UpdateSubscriptionPreferenceArgs, W as WorkflowFilter, c as WorkflowGroupFilter, d as WorkflowIdentifierOrId } from './novu-YP3PwsQR.mjs';
4
+ import { S as SeverityLevelEnum, N as NotificationFilter } from './types-D-9ozWeQ.mjs';
5
+ export { C as ChannelPreference, a as ChannelType, b as Context, D as DaySchedule, c as DefaultSchedule, I as InboxNotification, d as NotificationStatus, k 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-D-9ozWeQ.mjs';
5
6
 
6
7
  declare const areTagsEqual: (tags1?: string[], tags2?: string[]) => boolean;
7
8
  declare const areSeveritiesEqual: (el1?: SeverityLevelEnum | SeverityLevelEnum[], el2?: SeverityLevelEnum | SeverityLevelEnum[]) => boolean;
@@ -1,3 +1,3 @@
1
- export { ChannelType, NotificationStatus, Novu, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter } from './chunk-D4W52D4A.mjs';
2
- import './chunk-RZWQYM3H.mjs';
1
+ export { ChannelType, NotificationStatus, Novu, NovuError, PreferenceLevel, SeverityLevelEnum, SubscriptionPreference, TopicSubscription, WebSocketEvent, WorkflowCriticalityEnum, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter } from './chunk-IA6ISHOP.mjs';
2
+ import './chunk-RO3GDYAG.mjs';
3
3
  import './chunk-STZMOEWR.mjs';
@@ -1,4 +1,5 @@
1
- import { b as Context, i as Subscriber } from '../types-BM_9Xx5Z.mjs';
1
+ import { b as Context, h as Subscriber } from '../types-D-9ozWeQ.mjs';
2
+ import 'json-logic-js';
2
3
 
3
4
  /**
4
5
  * Builds a compact, stable string key from context objects by extracting only type:id pairs.
@@ -19,10 +20,15 @@ declare function buildSubscriber({ subscriberId, subscriber, }: {
19
20
  subscriber: Subscriber | string | undefined;
20
21
  }): Subscriber;
21
22
 
23
+ declare function buildSubscriptionIdentifier({ topicKey, subscriberId }: {
24
+ topicKey: string;
25
+ subscriberId?: string;
26
+ }): string;
27
+
22
28
  interface Token {
23
29
  type: 'bold' | 'text';
24
30
  content: string;
25
31
  }
26
32
  declare const parseMarkdownIntoTokens: (text: string) => Token[];
27
33
 
28
- export { type Token, buildContextKey, buildSubscriber, parseMarkdownIntoTokens };
34
+ export { type Token, buildContextKey, buildSubscriber, buildSubscriptionIdentifier, parseMarkdownIntoTokens };
@@ -1,2 +1,2 @@
1
- export { buildContextKey, buildSubscriber, parseMarkdownIntoTokens } from '../chunk-RZWQYM3H.mjs';
1
+ export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, parseMarkdownIntoTokens } from '../chunk-RO3GDYAG.mjs';
2
2
  import '../chunk-STZMOEWR.mjs';