using System; using System.Collections.Generic; using System.Threading.Tasks; using SharedLibraryCore.Alerts; using SharedLibraryCore.Database.Models; namespace SharedLibraryCore.Interfaces; public interface IAlertManager { /// /// Initializes the manager /// /// Task Initialize(); /// /// Get all the alerts for given client /// /// client to retrieve alerts for /// IEnumerable RetrieveAlerts(EFClient client); /// /// Trigger a new alert /// /// Alert to trigger void AddAlert(Alert.AlertState alert); /// /// Marks an alert as read and removes it from the manager /// /// Id of the alert to mark as read void MarkAlertAsRead(Guid alertId); /// /// Mark all alerts intended for the given recipientId as read /// /// Identifier of the recipient void MarkAllAlertsAsRead(int recipientId); /// /// Registers a static (persistent) event source eg datastore that /// gets initialized at startup /// /// Source action void RegisterStaticAlertSource(Func>> alertSource); /// /// Fires when an alert has been consumed (dimissed) /// EventHandler OnAlertConsumed { get; set; } }