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/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;