@coopenomics/notifications 2026.4.27-2 → 2026.4.30-7

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/index.d.ts CHANGED
@@ -1,99 +1,7 @@
1
+ import { C as ChannelConfig, a as ChannelsConfig, P as PreferencesConfig, B as BaseWorkflowPayload, N as NovuOrigin, W as WorkflowStep, b as WorkflowDefinition, c as NovuWorkflowData } from './shared/notifications.d7ceb56f.js';
2
+ export { i as Types } from './shared/notifications.d7ceb56f.js';
1
3
  import { z } from 'zod';
2
4
 
3
- interface ChannelConfig {
4
- enabled: boolean;
5
- readOnly?: boolean;
6
- }
7
- interface ChannelsConfig {
8
- email: ChannelConfig;
9
- sms: ChannelConfig;
10
- in_app: ChannelConfig;
11
- push: ChannelConfig;
12
- chat: ChannelConfig;
13
- }
14
- interface PreferencesConfig {
15
- user: {
16
- all: ChannelConfig;
17
- channels: ChannelsConfig;
18
- };
19
- workflow: {
20
- all: ChannelConfig;
21
- channels: ChannelsConfig;
22
- };
23
- }
24
- interface StepControlValues {
25
- subject?: string;
26
- body?: string;
27
- title?: string;
28
- content?: string;
29
- avatar?: string;
30
- editorType?: 'html' | 'text';
31
- [key: string]: any;
32
- }
33
- interface WorkflowStep {
34
- name: string;
35
- type: 'email' | 'sms' | 'in_app' | 'push' | 'chat' | 'delay' | 'digest';
36
- controlValues: StepControlValues;
37
- }
38
- interface BaseWorkflowPayload {
39
- [key: string]: any;
40
- }
41
- interface PayloadSchema {
42
- type: string;
43
- properties: Record<string, any>;
44
- required: string[];
45
- }
46
- type NovuOrigin = 'novu-cloud' | 'novu-cloud-v1' | 'external';
47
- interface WorkflowDefinition<T extends BaseWorkflowPayload = BaseWorkflowPayload> {
48
- name: string;
49
- workflowId: string;
50
- description?: string;
51
- payloadSchema: PayloadSchema;
52
- steps: WorkflowStep[];
53
- preferences: PreferencesConfig;
54
- origin?: NovuOrigin;
55
- tags?: string[];
56
- payloadZodSchema: z.ZodSchema<T>;
57
- }
58
- interface NovuWorkflowData {
59
- name: string;
60
- workflowId: string;
61
- description?: string;
62
- payloadSchema: PayloadSchema;
63
- steps: WorkflowStep[];
64
- preferences: PreferencesConfig;
65
- origin?: NovuOrigin;
66
- tags?: string[];
67
- }
68
- interface WorkflowTriggerData<T extends BaseWorkflowPayload> {
69
- workflowId: string;
70
- subscriberId: string;
71
- payload: T;
72
- actor?: {
73
- subscriberId: string;
74
- email?: string;
75
- };
76
- }
77
- type WorkflowStepType = WorkflowStep['type'];
78
- type ChannelType = keyof ChannelsConfig;
79
-
80
- type index$o_BaseWorkflowPayload = BaseWorkflowPayload;
81
- type index$o_ChannelConfig = ChannelConfig;
82
- type index$o_ChannelType = ChannelType;
83
- type index$o_ChannelsConfig = ChannelsConfig;
84
- type index$o_NovuOrigin = NovuOrigin;
85
- type index$o_NovuWorkflowData = NovuWorkflowData;
86
- type index$o_PayloadSchema = PayloadSchema;
87
- type index$o_PreferencesConfig = PreferencesConfig;
88
- type index$o_StepControlValues = StepControlValues;
89
- type index$o_WorkflowDefinition<T extends BaseWorkflowPayload = BaseWorkflowPayload> = WorkflowDefinition<T>;
90
- type index$o_WorkflowStep = WorkflowStep;
91
- type index$o_WorkflowStepType = WorkflowStepType;
92
- type index$o_WorkflowTriggerData<T extends BaseWorkflowPayload> = WorkflowTriggerData<T>;
93
- declare namespace index$o {
94
- export type { index$o_BaseWorkflowPayload as BaseWorkflowPayload, index$o_ChannelConfig as ChannelConfig, index$o_ChannelType as ChannelType, index$o_ChannelsConfig as ChannelsConfig, index$o_NovuOrigin as NovuOrigin, index$o_NovuWorkflowData as NovuWorkflowData, index$o_PayloadSchema as PayloadSchema, index$o_PreferencesConfig as PreferencesConfig, index$o_StepControlValues as StepControlValues, index$o_WorkflowDefinition as WorkflowDefinition, index$o_WorkflowStep as WorkflowStep, index$o_WorkflowStepType as WorkflowStepType, index$o_WorkflowTriggerData as WorkflowTriggerData };
95
- }
96
-
97
5
  declare const createChannelConfig: (enabled: boolean, readOnly?: boolean) => ChannelConfig;
98
6
  declare const createDefaultChannelsConfig: () => ChannelsConfig;
99
7
  declare const createDefaultPreferences: () => PreferencesConfig;
@@ -181,16 +89,16 @@ declare const newAgendaItemPayloadSchema: z.ZodObject<{
181
89
  decision_id: z.ZodString;
182
90
  agendaUrl: z.ZodOptional<z.ZodString>;
183
91
  }, "strip", z.ZodTypeAny, {
184
- coopname: string;
185
92
  coopShortName: string;
93
+ coopname: string;
186
94
  itemTitle: string;
187
95
  itemDescription: string;
188
96
  authorName: string;
189
97
  decision_id: string;
190
98
  agendaUrl?: string | undefined;
191
99
  }, {
192
- coopname: string;
193
100
  coopShortName: string;
101
+ coopname: string;
194
102
  itemTitle: string;
195
103
  itemDescription: string;
196
104
  authorName: string;
@@ -275,15 +183,15 @@ declare const decisionApprovedPayloadSchema: z.ZodObject<{
275
183
  decision_id: z.ZodString;
276
184
  decisionUrl: z.ZodOptional<z.ZodString>;
277
185
  }, "strip", z.ZodTypeAny, {
186
+ userName: string;
278
187
  coopname: string;
279
188
  decision_id: string;
280
- userName: string;
281
189
  decisionTitle: string;
282
190
  decisionUrl?: string | undefined;
283
191
  }, {
192
+ userName: string;
284
193
  coopname: string;
285
194
  decision_id: string;
286
- userName: string;
287
195
  decisionTitle: string;
288
196
  decisionUrl?: string | undefined;
289
197
  }>;
@@ -343,15 +251,15 @@ declare const paymentCancelledPayloadSchema: z.ZodObject<{
343
251
  userName: string;
344
252
  paymentAmount: string;
345
253
  paymentCurrency: string;
346
- paymentDate: string;
347
254
  paymentId: string;
255
+ paymentDate: string;
348
256
  paymentUrl?: string | undefined;
349
257
  }, {
350
258
  userName: string;
351
259
  paymentAmount: string;
352
260
  paymentCurrency: string;
353
- paymentDate: string;
354
261
  paymentId: string;
262
+ paymentDate: string;
355
263
  paymentUrl?: string | undefined;
356
264
  }>;
357
265
  type IPayload$g = z.infer<typeof paymentCancelledPayloadSchema>;
@@ -382,20 +290,20 @@ declare const meetInitialPayloadSchema: z.ZodObject<{
382
290
  meetId: number;
383
291
  meetDate: string;
384
292
  meetTime: string;
293
+ meetUrl: string;
385
294
  meetEndDate: string;
386
295
  meetEndTime: string;
387
296
  timezone: string;
388
- meetUrl: string;
389
297
  details?: string | undefined;
390
298
  }, {
391
299
  coopShortName: string;
392
300
  meetId: number;
393
301
  meetDate: string;
394
302
  meetTime: string;
303
+ meetUrl: string;
395
304
  meetEndDate: string;
396
305
  meetEndTime: string;
397
306
  timezone: string;
398
- meetUrl: string;
399
307
  details?: string | undefined;
400
308
  }>;
401
309
  type IPayload$f = z.infer<typeof meetInitialPayloadSchema>;
@@ -424,16 +332,16 @@ declare const meetReminderStartPayloadSchema: z.ZodObject<{
424
332
  meetId: number;
425
333
  meetDate: string;
426
334
  meetTime: string;
427
- meetUrl: string;
428
335
  timeDescription: string;
336
+ meetUrl: string;
429
337
  details?: string | undefined;
430
338
  }, {
431
339
  coopShortName: string;
432
340
  meetId: number;
433
341
  meetDate: string;
434
342
  meetTime: string;
435
- meetUrl: string;
436
343
  timeDescription: string;
344
+ meetUrl: string;
437
345
  details?: string | undefined;
438
346
  }>;
439
347
  type IPayload$e = z.infer<typeof meetReminderStartPayloadSchema>;
@@ -460,18 +368,18 @@ declare const meetStartedPayloadSchema: z.ZodObject<{
460
368
  }, "strip", z.ZodTypeAny, {
461
369
  coopShortName: string;
462
370
  meetId: number;
371
+ meetUrl: string;
463
372
  meetEndDate: string;
464
373
  meetEndTime: string;
465
374
  timezone: string;
466
- meetUrl: string;
467
375
  details?: string | undefined;
468
376
  }, {
469
377
  coopShortName: string;
470
378
  meetId: number;
379
+ meetUrl: string;
471
380
  meetEndDate: string;
472
381
  meetEndTime: string;
473
382
  timezone: string;
474
- meetUrl: string;
475
383
  details?: string | undefined;
476
384
  }>;
477
385
  type IPayload$d = z.infer<typeof meetStartedPayloadSchema>;
@@ -498,19 +406,19 @@ declare const meetReminderEndPayloadSchema: z.ZodObject<{
498
406
  }, "strip", z.ZodTypeAny, {
499
407
  coopShortName: string;
500
408
  meetId: number;
409
+ timeDescription: string;
410
+ meetUrl: string;
501
411
  meetEndDate: string;
502
412
  meetEndTime: string;
503
413
  timezone: string;
504
- meetUrl: string;
505
- timeDescription: string;
506
414
  }, {
507
415
  coopShortName: string;
508
416
  meetId: number;
417
+ timeDescription: string;
418
+ meetUrl: string;
509
419
  meetEndDate: string;
510
420
  meetEndTime: string;
511
421
  timezone: string;
512
- meetUrl: string;
513
- timeDescription: string;
514
422
  }>;
515
423
  type IPayload$c = z.infer<typeof meetReminderEndPayloadSchema>;
516
424
  interface IWorkflow$c extends BaseWorkflowPayload, IPayload$c {
@@ -539,19 +447,19 @@ declare const meetRestartPayloadSchema: z.ZodObject<{
539
447
  meetId: number;
540
448
  meetDate: string;
541
449
  meetTime: string;
450
+ meetUrl: string;
542
451
  meetEndDate: string;
543
452
  meetEndTime: string;
544
453
  timezone: string;
545
- meetUrl: string;
546
454
  }, {
547
455
  coopShortName: string;
548
456
  meetId: number;
549
457
  meetDate: string;
550
458
  meetTime: string;
459
+ meetUrl: string;
551
460
  meetEndDate: string;
552
461
  meetEndTime: string;
553
462
  timezone: string;
554
- meetUrl: string;
555
463
  }>;
556
464
  type IPayload$b = z.infer<typeof meetRestartPayloadSchema>;
557
465
  interface IWorkflow$b extends BaseWorkflowPayload, IPayload$b {
@@ -610,17 +518,17 @@ declare const approvalResponsePayloadSchema: z.ZodObject<{
610
518
  coopShortName: z.ZodString;
611
519
  approvalUrl: z.ZodOptional<z.ZodString>;
612
520
  }, "strip", z.ZodTypeAny, {
613
- coopname: string;
614
521
  coopShortName: string;
615
522
  userName: string;
523
+ coopname: string;
616
524
  approvalStatus: "approved" | "declined";
617
525
  approvalStatusText: string;
618
526
  approvalId: string;
619
527
  approvalUrl?: string | undefined;
620
528
  }, {
621
- coopname: string;
622
529
  coopShortName: string;
623
530
  userName: string;
531
+ coopname: string;
624
532
  approvalStatus: "approved" | "declined";
625
533
  approvalStatusText: string;
626
534
  approvalId: string;
@@ -648,19 +556,19 @@ declare const newInitialPaymentRequestPayloadSchema: z.ZodObject<{
648
556
  coopname: z.ZodString;
649
557
  paymentUrl: z.ZodOptional<z.ZodString>;
650
558
  }, "strip", z.ZodTypeAny, {
559
+ paymentAmount: string;
560
+ paymentCurrency: string;
651
561
  coopname: string;
652
562
  chairmanName: string;
653
563
  participantName: string;
654
- paymentAmount: string;
655
- paymentCurrency: string;
656
564
  paymentType: string;
657
565
  paymentUrl?: string | undefined;
658
566
  }, {
567
+ paymentAmount: string;
568
+ paymentCurrency: string;
659
569
  coopname: string;
660
570
  chairmanName: string;
661
571
  participantName: string;
662
- paymentAmount: string;
663
- paymentCurrency: string;
664
572
  paymentType: string;
665
573
  paymentUrl?: string | undefined;
666
574
  }>;
@@ -686,19 +594,19 @@ declare const newDepositPaymentRequestPayloadSchema: z.ZodObject<{
686
594
  coopname: z.ZodString;
687
595
  paymentUrl: z.ZodOptional<z.ZodString>;
688
596
  }, "strip", z.ZodTypeAny, {
597
+ paymentAmount: string;
598
+ paymentCurrency: string;
689
599
  coopname: string;
690
600
  chairmanName: string;
691
601
  participantName: string;
692
- paymentAmount: string;
693
- paymentCurrency: string;
694
602
  paymentType: string;
695
603
  paymentUrl?: string | undefined;
696
604
  }, {
605
+ paymentAmount: string;
606
+ paymentCurrency: string;
697
607
  coopname: string;
698
608
  chairmanName: string;
699
609
  participantName: string;
700
- paymentAmount: string;
701
- paymentCurrency: string;
702
610
  paymentType: string;
703
611
  paymentUrl?: string | undefined;
704
612
  }>;
@@ -809,16 +717,16 @@ declare const decisionExpiredPayloadSchema: z.ZodObject<{
809
717
  short_abbr: z.ZodString;
810
718
  name: z.ZodString;
811
719
  }, "strip", z.ZodTypeAny, {
720
+ userName: string;
812
721
  coopname: string;
813
722
  decision_id: string;
814
- userName: string;
815
723
  decisionTitle: string;
816
724
  short_abbr: string;
817
725
  name: string;
818
726
  }, {
727
+ userName: string;
819
728
  coopname: string;
820
729
  decision_id: string;
821
- userName: string;
822
730
  decisionTitle: string;
823
731
  short_abbr: string;
824
732
  name: string;
@@ -976,4 +884,4 @@ declare namespace index {
976
884
  };
977
885
  }
978
886
 
979
- export { index$o as Types, WorkflowBuilder, index as Workflows, createChannelConfig, createDefaultChannelsConfig, createDefaultPreferences, createEmailStep, createInAppStep, createPushStep, createSmsStep };
887
+ export { WorkflowBuilder, index as Workflows, createChannelConfig, createDefaultChannelsConfig, createDefaultPreferences, createEmailStep, createInAppStep, createPushStep, createSmsStep };