@novu/js 3.11.0 → 3.12.0-rc.2

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-QQNKEWGC.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 +1785 -260
  14. package/dist/esm/{chunk-UM35OVAD.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 +1782 -256
  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
@@ -1,7 +1,13 @@
1
- import { r as Theme } from '../types-C5eX1GmB.mjs';
2
- import '../types-BM_9Xx5Z.mjs';
3
- import '../novu-DY-mm8Og.mjs';
1
+ import { G as InboxTheme, Y as SubscriptionTheme } from '../types-DmMJ1GiR.mjs';
2
+ import '../novu-YP3PwsQR.mjs';
3
+ import '../types-D-9ozWeQ.mjs';
4
+ import 'json-logic-js';
4
5
 
5
- declare const dark: Theme;
6
+ declare const inboxDarkTheme: InboxTheme;
7
+ /**
8
+ * @deprecated Use inboxDarkTheme instead
9
+ */
10
+ declare const dark: InboxTheme;
11
+ declare const subscriptionDarkTheme: SubscriptionTheme;
6
12
 
7
- export { dark };
13
+ export { dark, inboxDarkTheme, subscriptionDarkTheme };
@@ -1,7 +1,7 @@
1
1
  import '../chunk-STZMOEWR.mjs';
2
2
 
3
3
  // src/ui/themes/dark.ts
4
- var dark = {
4
+ var inboxDarkTheme = {
5
5
  variables: {
6
6
  colorNeutral: "white",
7
7
  colorBackground: "#1A1A1A",
@@ -23,5 +23,19 @@ var dark = {
23
23
  bellSeverityGlow: "nt-bg-severity-none-alpha-300 before:nt-bg-severity-none-alpha-300"
24
24
  }
25
25
  };
26
+ var dark = inboxDarkTheme;
27
+ var subscriptionDarkTheme = {
28
+ variables: {
29
+ colorNeutral: "white",
30
+ colorBackground: "#1A1A1A",
31
+ colorForeground: "#EDEDEF",
32
+ colorSecondary: "#383838",
33
+ colorSecondaryForeground: "#EDEDEF",
34
+ colorShadow: "black",
35
+ colorRing: "#E1E4EA",
36
+ colorStripes: "#FF8447"
37
+ },
38
+ elements: {}
39
+ };
26
40
 
27
- export { dark };
41
+ export { dark, inboxDarkTheme, subscriptionDarkTheme };
@@ -1,3 +1,5 @@
1
+ import { RulesLogic } from 'json-logic-js';
2
+
1
3
  declare class NovuError extends Error {
2
4
  originalError: Error;
3
5
  constructor(message: string, originalError: unknown);
@@ -167,6 +169,8 @@ type Context = Partial<Record<string, ContextValue>>;
167
169
  type PreferencesResponse = {
168
170
  level: PreferenceLevel;
169
171
  enabled: boolean;
172
+ condition?: RulesLogic;
173
+ subscriptionId?: string;
170
174
  channels: ChannelPreference;
171
175
  overrides?: IPreferenceOverride[];
172
176
  workflow?: Workflow;
@@ -184,6 +188,20 @@ type IPreferenceOverride = {
184
188
  channel: ChannelType;
185
189
  source: PreferenceOverrideSourceEnum;
186
190
  };
191
+ type SubscriptionPreferenceResponse = Omit<PreferencesResponse, 'subscriptionId' | 'workflow' | 'schedule' | 'level' | 'channels'> & {
192
+ subscriptionId: string;
193
+ workflow: Workflow;
194
+ };
195
+ type SubscriptionResponse = {
196
+ id: string;
197
+ identifier: string;
198
+ name?: string;
199
+ preferences: Array<SubscriptionPreferenceResponse>;
200
+ };
201
+ type Options = {
202
+ refetch?: boolean;
203
+ useCache?: boolean;
204
+ };
187
205
  type Result<D = undefined, E = NovuError> = Promise<{
188
206
  data?: D;
189
207
  error?: E;
@@ -216,5 +234,6 @@ type NovuOptions = KeylessNovuOptions | StandardNovuOptions;
216
234
  type Prettify<T> = {
217
235
  [K in keyof T]: T[K];
218
236
  } & {};
237
+ type NonEmptyArray<T> = [T, ...T[]];
219
238
 
220
- 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 Context as b, type DefaultSchedule as c, NotificationStatus as d, NovuError as e, type NovuOptions as f, type PreferencesResponse as g, type StandardNovuOptions as h, type Subscriber as i, type WeeklySchedule as j, WorkflowCriticalityEnum as k, type Session as l, type Workflow as m, type Prettify as n, type ContextValue as o };
239
+ export { ActionTypeEnum as A, type ChannelPreference as C, type DaySchedule as D, type InboxNotification as I, type NotificationFilter as N, type Options as O, 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 Context as b, type DefaultSchedule as c, NotificationStatus 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, NovuError as k, type NonEmptyArray as l, type Session as m, type Workflow as n, type Prettify as o, type SubscriptionPreferenceResponse as p, type SubscriptionResponse as q, type ContextValue as r };