@coopenomics/notifications 2026.4.30-3 → 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/build.config.ts +6 -0
- package/dist/index.cjs +14 -3147
- package/dist/index.d.cts +45 -137
- package/dist/index.d.mts +45 -137
- package/dist/index.d.ts +45 -137
- 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.mts
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.mjs';
|
|
2
|
+
export { i as Types } from './shared/notifications.d7ceb56f.mjs';
|
|
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,20 +89,20 @@ declare const newAgendaItemPayloadSchema: z.ZodObject<{
|
|
|
181
89
|
decision_id: z.ZodString;
|
|
182
90
|
agendaUrl: z.ZodOptional<z.ZodString>;
|
|
183
91
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
-
authorName: string;
|
|
185
|
-
coopname: string;
|
|
186
92
|
coopShortName: string;
|
|
187
|
-
|
|
93
|
+
coopname: string;
|
|
188
94
|
itemTitle: string;
|
|
189
95
|
itemDescription: string;
|
|
96
|
+
authorName: string;
|
|
97
|
+
decision_id: string;
|
|
190
98
|
agendaUrl?: string | undefined;
|
|
191
99
|
}, {
|
|
192
|
-
authorName: string;
|
|
193
|
-
coopname: string;
|
|
194
100
|
coopShortName: string;
|
|
195
|
-
|
|
101
|
+
coopname: string;
|
|
196
102
|
itemTitle: string;
|
|
197
103
|
itemDescription: string;
|
|
104
|
+
authorName: string;
|
|
105
|
+
decision_id: string;
|
|
198
106
|
agendaUrl?: string | undefined;
|
|
199
107
|
}>;
|
|
200
108
|
type IPayload$l = z.infer<typeof newAgendaItemPayloadSchema>;
|
|
@@ -239,19 +147,19 @@ declare const approvalRequestPayloadSchema: z.ZodObject<{
|
|
|
239
147
|
approval_hash: z.ZodString;
|
|
240
148
|
approvalUrl: z.ZodOptional<z.ZodString>;
|
|
241
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
coopname: string;
|
|
151
|
+
authorName: string;
|
|
242
152
|
chairmanName: string;
|
|
243
153
|
requestTitle: string;
|
|
244
154
|
requestDescription: string;
|
|
245
|
-
authorName: string;
|
|
246
|
-
coopname: string;
|
|
247
155
|
approval_hash: string;
|
|
248
156
|
approvalUrl?: string | undefined;
|
|
249
157
|
}, {
|
|
158
|
+
coopname: string;
|
|
159
|
+
authorName: string;
|
|
250
160
|
chairmanName: string;
|
|
251
161
|
requestTitle: string;
|
|
252
162
|
requestDescription: string;
|
|
253
|
-
authorName: string;
|
|
254
|
-
coopname: string;
|
|
255
163
|
approval_hash: string;
|
|
256
164
|
approvalUrl?: string | undefined;
|
|
257
165
|
}>;
|
|
@@ -275,16 +183,16 @@ declare const decisionApprovedPayloadSchema: z.ZodObject<{
|
|
|
275
183
|
decision_id: z.ZodString;
|
|
276
184
|
decisionUrl: z.ZodOptional<z.ZodString>;
|
|
277
185
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
coopname: string;
|
|
279
186
|
userName: string;
|
|
280
|
-
|
|
187
|
+
coopname: string;
|
|
281
188
|
decision_id: string;
|
|
189
|
+
decisionTitle: string;
|
|
282
190
|
decisionUrl?: string | undefined;
|
|
283
191
|
}, {
|
|
284
|
-
coopname: string;
|
|
285
192
|
userName: string;
|
|
286
|
-
|
|
193
|
+
coopname: string;
|
|
287
194
|
decision_id: string;
|
|
195
|
+
decisionTitle: string;
|
|
288
196
|
decisionUrl?: string | undefined;
|
|
289
197
|
}>;
|
|
290
198
|
type IPayload$i = z.infer<typeof decisionApprovedPayloadSchema>;
|
|
@@ -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
|
-
userName: string;
|
|
615
521
|
coopShortName: string;
|
|
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
|
-
userName: string;
|
|
623
529
|
coopShortName: string;
|
|
530
|
+
userName: string;
|
|
531
|
+
coopname: string;
|
|
624
532
|
approvalStatus: "approved" | "declined";
|
|
625
533
|
approvalStatusText: string;
|
|
626
534
|
approvalId: string;
|
|
@@ -648,18 +556,18 @@ declare const newInitialPaymentRequestPayloadSchema: z.ZodObject<{
|
|
|
648
556
|
coopname: z.ZodString;
|
|
649
557
|
paymentUrl: z.ZodOptional<z.ZodString>;
|
|
650
558
|
}, "strip", z.ZodTypeAny, {
|
|
651
|
-
chairmanName: string;
|
|
652
|
-
coopname: string;
|
|
653
559
|
paymentAmount: string;
|
|
654
560
|
paymentCurrency: string;
|
|
561
|
+
coopname: string;
|
|
562
|
+
chairmanName: string;
|
|
655
563
|
participantName: string;
|
|
656
564
|
paymentType: string;
|
|
657
565
|
paymentUrl?: string | undefined;
|
|
658
566
|
}, {
|
|
659
|
-
chairmanName: string;
|
|
660
|
-
coopname: string;
|
|
661
567
|
paymentAmount: string;
|
|
662
568
|
paymentCurrency: string;
|
|
569
|
+
coopname: string;
|
|
570
|
+
chairmanName: string;
|
|
663
571
|
participantName: string;
|
|
664
572
|
paymentType: string;
|
|
665
573
|
paymentUrl?: string | undefined;
|
|
@@ -686,18 +594,18 @@ declare const newDepositPaymentRequestPayloadSchema: z.ZodObject<{
|
|
|
686
594
|
coopname: z.ZodString;
|
|
687
595
|
paymentUrl: z.ZodOptional<z.ZodString>;
|
|
688
596
|
}, "strip", z.ZodTypeAny, {
|
|
689
|
-
chairmanName: string;
|
|
690
|
-
coopname: string;
|
|
691
597
|
paymentAmount: string;
|
|
692
598
|
paymentCurrency: string;
|
|
599
|
+
coopname: string;
|
|
600
|
+
chairmanName: string;
|
|
693
601
|
participantName: string;
|
|
694
602
|
paymentType: string;
|
|
695
603
|
paymentUrl?: string | undefined;
|
|
696
604
|
}, {
|
|
697
|
-
chairmanName: string;
|
|
698
|
-
coopname: string;
|
|
699
605
|
paymentAmount: string;
|
|
700
606
|
paymentCurrency: string;
|
|
607
|
+
coopname: string;
|
|
608
|
+
chairmanName: string;
|
|
701
609
|
participantName: string;
|
|
702
610
|
paymentType: string;
|
|
703
611
|
paymentUrl?: string | undefined;
|
|
@@ -809,17 +717,17 @@ declare const decisionExpiredPayloadSchema: z.ZodObject<{
|
|
|
809
717
|
short_abbr: z.ZodString;
|
|
810
718
|
name: z.ZodString;
|
|
811
719
|
}, "strip", z.ZodTypeAny, {
|
|
812
|
-
coopname: string;
|
|
813
720
|
userName: string;
|
|
814
|
-
|
|
721
|
+
coopname: string;
|
|
815
722
|
decision_id: string;
|
|
723
|
+
decisionTitle: string;
|
|
816
724
|
short_abbr: string;
|
|
817
725
|
name: string;
|
|
818
726
|
}, {
|
|
819
|
-
coopname: string;
|
|
820
727
|
userName: string;
|
|
821
|
-
|
|
728
|
+
coopname: string;
|
|
822
729
|
decision_id: string;
|
|
730
|
+
decisionTitle: string;
|
|
823
731
|
short_abbr: string;
|
|
824
732
|
name: string;
|
|
825
733
|
}>;
|
|
@@ -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 };
|