@coopenomics/notifications 2026.4.30 → 2026.5.8-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.
- package/build.config.ts +6 -0
- package/dist/index.cjs +14 -3147
- package/dist/index.d.cts +29 -121
- package/dist/index.d.mts +29 -121
- package/dist/index.d.ts +29 -121
- package/dist/index.mjs +5 -3138
- package/dist/shared/notifications.3e0dd08c.mjs +3138 -0
- package/dist/shared/notifications.8406132d.cjs +3149 -0
- package/dist/shared/notifications.d7ceb56f.d.cts +98 -0
- package/dist/shared/notifications.d7ceb56f.d.mts +98 -0
- package/dist/shared/notifications.d7ceb56f.d.ts +98 -0
- package/dist/sync/sync-runner.cjs +7288 -0
- package/dist/sync/sync-runner.d.cts +48 -0
- package/dist/sync/sync-runner.d.mts +48 -0
- package/dist/sync/sync-runner.d.ts +48 -0
- package/dist/sync/sync-runner.mjs +7273 -0
- package/package.json +6 -6
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;
|
|
@@ -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, {
|
|
278
|
-
userName: string;
|
|
279
186
|
coopname: string;
|
|
280
187
|
decision_id: string;
|
|
188
|
+
userName: string;
|
|
281
189
|
decisionTitle: string;
|
|
282
190
|
decisionUrl?: string | undefined;
|
|
283
191
|
}, {
|
|
284
|
-
userName: string;
|
|
285
192
|
coopname: string;
|
|
286
193
|
decision_id: string;
|
|
194
|
+
userName: string;
|
|
287
195
|
decisionTitle: string;
|
|
288
196
|
decisionUrl?: string | undefined;
|
|
289
197
|
}>;
|
|
@@ -380,22 +288,22 @@ declare const meetInitialPayloadSchema: z.ZodObject<{
|
|
|
380
288
|
}, "strip", z.ZodTypeAny, {
|
|
381
289
|
coopShortName: string;
|
|
382
290
|
meetId: number;
|
|
291
|
+
meetDate: string;
|
|
292
|
+
meetTime: string;
|
|
383
293
|
meetEndDate: string;
|
|
384
294
|
meetEndTime: string;
|
|
385
295
|
timezone: string;
|
|
386
296
|
meetUrl: string;
|
|
387
|
-
meetDate: string;
|
|
388
|
-
meetTime: string;
|
|
389
297
|
details?: string | undefined;
|
|
390
298
|
}, {
|
|
391
299
|
coopShortName: string;
|
|
392
300
|
meetId: number;
|
|
301
|
+
meetDate: string;
|
|
302
|
+
meetTime: string;
|
|
393
303
|
meetEndDate: string;
|
|
394
304
|
meetEndTime: string;
|
|
395
305
|
timezone: string;
|
|
396
306
|
meetUrl: string;
|
|
397
|
-
meetDate: string;
|
|
398
|
-
meetTime: string;
|
|
399
307
|
details?: string | undefined;
|
|
400
308
|
}>;
|
|
401
309
|
type IPayload$f = z.infer<typeof meetInitialPayloadSchema>;
|
|
@@ -422,18 +330,18 @@ declare const meetReminderStartPayloadSchema: z.ZodObject<{
|
|
|
422
330
|
}, "strip", z.ZodTypeAny, {
|
|
423
331
|
coopShortName: string;
|
|
424
332
|
meetId: number;
|
|
425
|
-
meetUrl: string;
|
|
426
|
-
timeDescription: string;
|
|
427
333
|
meetDate: string;
|
|
428
334
|
meetTime: string;
|
|
335
|
+
meetUrl: string;
|
|
336
|
+
timeDescription: string;
|
|
429
337
|
details?: string | undefined;
|
|
430
338
|
}, {
|
|
431
339
|
coopShortName: string;
|
|
432
340
|
meetId: number;
|
|
433
|
-
meetUrl: string;
|
|
434
|
-
timeDescription: string;
|
|
435
341
|
meetDate: string;
|
|
436
342
|
meetTime: string;
|
|
343
|
+
meetUrl: string;
|
|
344
|
+
timeDescription: string;
|
|
437
345
|
details?: string | undefined;
|
|
438
346
|
}>;
|
|
439
347
|
type IPayload$e = z.infer<typeof meetReminderStartPayloadSchema>;
|
|
@@ -537,21 +445,21 @@ declare const meetRestartPayloadSchema: z.ZodObject<{
|
|
|
537
445
|
}, "strip", z.ZodTypeAny, {
|
|
538
446
|
coopShortName: string;
|
|
539
447
|
meetId: number;
|
|
448
|
+
meetDate: string;
|
|
449
|
+
meetTime: string;
|
|
540
450
|
meetEndDate: string;
|
|
541
451
|
meetEndTime: string;
|
|
542
452
|
timezone: string;
|
|
543
453
|
meetUrl: string;
|
|
544
|
-
meetDate: string;
|
|
545
|
-
meetTime: string;
|
|
546
454
|
}, {
|
|
547
455
|
coopShortName: string;
|
|
548
456
|
meetId: number;
|
|
457
|
+
meetDate: string;
|
|
458
|
+
meetTime: string;
|
|
549
459
|
meetEndDate: string;
|
|
550
460
|
meetEndTime: string;
|
|
551
461
|
timezone: string;
|
|
552
462
|
meetUrl: string;
|
|
553
|
-
meetDate: string;
|
|
554
|
-
meetTime: 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
|
-
userName: string;
|
|
614
521
|
coopname: string;
|
|
615
522
|
coopShortName: string;
|
|
523
|
+
userName: string;
|
|
616
524
|
approvalStatus: "approved" | "declined";
|
|
617
525
|
approvalStatusText: string;
|
|
618
526
|
approvalId: string;
|
|
619
527
|
approvalUrl?: string | undefined;
|
|
620
528
|
}, {
|
|
621
|
-
userName: string;
|
|
622
529
|
coopname: string;
|
|
623
530
|
coopShortName: string;
|
|
531
|
+
userName: string;
|
|
624
532
|
approvalStatus: "approved" | "declined";
|
|
625
533
|
approvalStatusText: string;
|
|
626
534
|
approvalId: string;
|
|
@@ -649,18 +557,18 @@ declare const newInitialPaymentRequestPayloadSchema: z.ZodObject<{
|
|
|
649
557
|
paymentUrl: z.ZodOptional<z.ZodString>;
|
|
650
558
|
}, "strip", z.ZodTypeAny, {
|
|
651
559
|
coopname: string;
|
|
652
|
-
chairmanName: string;
|
|
653
|
-
participantName: string;
|
|
654
560
|
paymentAmount: string;
|
|
655
561
|
paymentCurrency: string;
|
|
562
|
+
chairmanName: string;
|
|
563
|
+
participantName: string;
|
|
656
564
|
paymentType: string;
|
|
657
565
|
paymentUrl?: string | undefined;
|
|
658
566
|
}, {
|
|
659
567
|
coopname: string;
|
|
660
|
-
chairmanName: string;
|
|
661
|
-
participantName: string;
|
|
662
568
|
paymentAmount: string;
|
|
663
569
|
paymentCurrency: string;
|
|
570
|
+
chairmanName: string;
|
|
571
|
+
participantName: string;
|
|
664
572
|
paymentType: string;
|
|
665
573
|
paymentUrl?: string | undefined;
|
|
666
574
|
}>;
|
|
@@ -687,18 +595,18 @@ declare const newDepositPaymentRequestPayloadSchema: z.ZodObject<{
|
|
|
687
595
|
paymentUrl: z.ZodOptional<z.ZodString>;
|
|
688
596
|
}, "strip", z.ZodTypeAny, {
|
|
689
597
|
coopname: string;
|
|
690
|
-
chairmanName: string;
|
|
691
|
-
participantName: string;
|
|
692
598
|
paymentAmount: string;
|
|
693
599
|
paymentCurrency: string;
|
|
600
|
+
chairmanName: string;
|
|
601
|
+
participantName: string;
|
|
694
602
|
paymentType: string;
|
|
695
603
|
paymentUrl?: string | undefined;
|
|
696
604
|
}, {
|
|
697
605
|
coopname: string;
|
|
698
|
-
chairmanName: string;
|
|
699
|
-
participantName: string;
|
|
700
606
|
paymentAmount: string;
|
|
701
607
|
paymentCurrency: string;
|
|
608
|
+
chairmanName: string;
|
|
609
|
+
participantName: 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, {
|
|
812
|
-
userName: string;
|
|
813
720
|
coopname: string;
|
|
814
721
|
decision_id: string;
|
|
722
|
+
userName: string;
|
|
815
723
|
decisionTitle: string;
|
|
816
724
|
short_abbr: string;
|
|
817
725
|
name: string;
|
|
818
726
|
}, {
|
|
819
|
-
userName: string;
|
|
820
727
|
coopname: string;
|
|
821
728
|
decision_id: string;
|
|
729
|
+
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 {
|
|
887
|
+
export { WorkflowBuilder, index as Workflows, createChannelConfig, createDefaultChannelsConfig, createDefaultPreferences, createEmailStep, createInAppStep, createPushStep, createSmsStep };
|