UNPKG

@grouparoo/core

Version:
26 lines (25 loc) 784 B
export interface NotifierMessagePayload { subject: string; body: string; cta?: string; ctaLink?: string; } export declare abstract class Notifier { from: string; messageLimit: number; /** * Generate the notification via `buildNotification` and store it * Also check if there are any notifications to remove with `pruneNotifications` */ run(): Promise<void>; /** * Generate the notification to store (or null) */ abstract buildNotification(): Promise<NotifierMessagePayload>; storeOrUpdateNotification(notificationPayload: NotifierMessagePayload): Promise<void>; /** * Remove all notifications from this notifier */ clearNotifications(): Promise<number>; pruneNotifications(): Promise<void>; }