payload-plugin-newsletter 0.20.6 → 0.21.0
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/CHANGELOG.md +71 -0
- package/README.md +35 -18
- package/dist/admin.d.ts +3 -1
- package/dist/admin.js +157 -2
- package/dist/collections.cjs +131 -2
- package/dist/collections.cjs.map +1 -1
- package/dist/collections.js +131 -2
- package/dist/collections.js.map +1 -1
- package/dist/server.d.ts +6 -29
- package/dist/server.js +616 -133
- package/dist/types.d.cts +8 -30
- package/dist/types.d.ts +8 -30
- package/dist/utils.cjs +2 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +2 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/server.d.ts
CHANGED
|
@@ -182,6 +182,11 @@ interface BroadcastProvider$1 {
|
|
|
182
182
|
validateConfiguration(): Promise<boolean>;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
interface EmailWrapperOptions {
|
|
186
|
+
preheader?: string;
|
|
187
|
+
subject?: string;
|
|
188
|
+
documentData?: Record<string, any>;
|
|
189
|
+
}
|
|
185
190
|
interface BroadcastCustomizations {
|
|
186
191
|
additionalFields?: Field[];
|
|
187
192
|
customBlocks?: Block[];
|
|
@@ -226,10 +231,7 @@ interface BroadcastCustomizations {
|
|
|
226
231
|
* Custom wrapper function for preview content
|
|
227
232
|
* Receives the converted HTML and should return wrapped HTML
|
|
228
233
|
*/
|
|
229
|
-
customWrapper?: (content: string, options?:
|
|
230
|
-
subject?: string;
|
|
231
|
-
preheader?: string;
|
|
232
|
-
}) => string | Promise<string>;
|
|
234
|
+
customWrapper?: (content: string, options?: EmailWrapperOptions) => string | Promise<string>;
|
|
233
235
|
/**
|
|
234
236
|
* Custom preview component to replace the default one entirely
|
|
235
237
|
* If provided, this component will be used instead of the default EmailPreview
|
|
@@ -347,7 +349,6 @@ interface NewsletterPluginConfig {
|
|
|
347
349
|
afterSubscribe?: (args: AfterSubscribeArgs) => void | Promise<void>;
|
|
348
350
|
beforeUnsubscribe?: (args: BeforeUnsubscribeArgs) => void | Promise<void>;
|
|
349
351
|
afterUnsubscribe?: (args: AfterUnsubscribeArgs) => void | Promise<void>;
|
|
350
|
-
afterUnsubscribeSync?: (args: AfterUnsubscribeSyncArgs) => void | Promise<void>;
|
|
351
352
|
};
|
|
352
353
|
/**
|
|
353
354
|
* UI component overrides
|
|
@@ -413,26 +414,6 @@ interface NewsletterPluginConfig {
|
|
|
413
414
|
createMarkdownField?: boolean;
|
|
414
415
|
};
|
|
415
416
|
};
|
|
416
|
-
/**
|
|
417
|
-
* Unsubscribe sync configuration
|
|
418
|
-
*/
|
|
419
|
-
unsubscribeSync?: {
|
|
420
|
-
/**
|
|
421
|
-
* Enable sync of unsubscribes from email service to Payload
|
|
422
|
-
* @default false
|
|
423
|
-
*/
|
|
424
|
-
enabled?: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* Cron schedule for sync job (e.g., '0 * * * *' for hourly)
|
|
427
|
-
* If not provided, job must be triggered manually
|
|
428
|
-
*/
|
|
429
|
-
schedule?: string;
|
|
430
|
-
/**
|
|
431
|
-
* Queue name for the sync job
|
|
432
|
-
* @default 'newsletter-sync'
|
|
433
|
-
*/
|
|
434
|
-
queue?: string;
|
|
435
|
-
};
|
|
436
417
|
/**
|
|
437
418
|
* Newsletter management configuration
|
|
438
419
|
*/
|
|
@@ -642,10 +623,6 @@ interface AfterUnsubscribeArgs {
|
|
|
642
623
|
doc: Subscriber;
|
|
643
624
|
req: any;
|
|
644
625
|
}
|
|
645
|
-
interface AfterUnsubscribeSyncArgs {
|
|
646
|
-
req: any;
|
|
647
|
-
syncedCount: number;
|
|
648
|
-
}
|
|
649
626
|
interface SurveyQuestion {
|
|
650
627
|
id: string;
|
|
651
628
|
question: string;
|