using ScadaLink.Commons.Entities.Notifications; namespace ScadaLink.Commons.Interfaces.Repositories; public interface INotificationRepository { // NotificationList /// Gets a notification list by ID. /// The notification list ID. /// Cancellation token. /// The notification list, or null if not found. Task GetNotificationListByIdAsync(int id, CancellationToken cancellationToken = default); /// Gets all notification lists. /// Cancellation token. /// A read-only list of notification lists. Task> GetAllNotificationListsAsync(CancellationToken cancellationToken = default); /// Gets a notification list by name. /// The notification list name. /// Cancellation token. /// The notification list, or null if not found. Task GetListByNameAsync(string name, CancellationToken cancellationToken = default); /// Adds a new notification list. /// The notification list to add. /// Cancellation token. Task AddNotificationListAsync(NotificationList list, CancellationToken cancellationToken = default); /// Updates an existing notification list. /// The notification list to update. /// Cancellation token. Task UpdateNotificationListAsync(NotificationList list, CancellationToken cancellationToken = default); /// Deletes a notification list by ID. /// The notification list ID. /// Cancellation token. Task DeleteNotificationListAsync(int id, CancellationToken cancellationToken = default); // NotificationRecipient /// Gets a notification recipient by ID. /// The recipient ID. /// Cancellation token. /// The notification recipient, or null if not found. Task GetRecipientByIdAsync(int id, CancellationToken cancellationToken = default); /// Gets all recipients in a notification list. /// The notification list ID. /// Cancellation token. /// A read-only list of recipients. Task> GetRecipientsByListIdAsync(int notificationListId, CancellationToken cancellationToken = default); /// Adds a new notification recipient. /// The recipient to add. /// Cancellation token. Task AddRecipientAsync(NotificationRecipient recipient, CancellationToken cancellationToken = default); /// Updates an existing notification recipient. /// The recipient to update. /// Cancellation token. Task UpdateRecipientAsync(NotificationRecipient recipient, CancellationToken cancellationToken = default); /// Deletes a notification recipient by ID. /// The recipient ID. /// Cancellation token. Task DeleteRecipientAsync(int id, CancellationToken cancellationToken = default); // SmtpConfiguration /// Gets an SMTP configuration by ID. /// The SMTP configuration ID. /// Cancellation token. /// The SMTP configuration, or null if not found. Task GetSmtpConfigurationByIdAsync(int id, CancellationToken cancellationToken = default); /// Gets all SMTP configurations. /// Cancellation token. /// A read-only list of SMTP configurations. Task> GetAllSmtpConfigurationsAsync(CancellationToken cancellationToken = default); /// Adds a new SMTP configuration. /// The SMTP configuration to add. /// Cancellation token. Task AddSmtpConfigurationAsync(SmtpConfiguration configuration, CancellationToken cancellationToken = default); /// Updates an existing SMTP configuration. /// The SMTP configuration to update. /// Cancellation token. Task UpdateSmtpConfigurationAsync(SmtpConfiguration configuration, CancellationToken cancellationToken = default); /// Deletes an SMTP configuration by ID. /// The SMTP configuration ID. /// Cancellation token. Task DeleteSmtpConfigurationAsync(int id, CancellationToken cancellationToken = default); /// Saves pending changes to the repository. /// Cancellation token. /// The number of entities saved. Task SaveChangesAsync(CancellationToken cancellationToken = default); }