using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Models.Membership; using Umbraco.Core.Persistence; namespace Umbraco.Core.Services { public interface INotificationService : IService { /// /// Sends the notifications for the specified user regarding the specified nodes and action. /// /// /// /// /// /// /// /// void SendNotifications(IUser operatingUser, IEnumerable entities, string action, string actionName, Uri siteUri, Func<(IUser user, NotificationEmailSubjectParams subject), string> createSubject, Func<(IUser user, NotificationEmailBodyParams body, bool isHtml), string> createBody); /// /// Gets the notifications for the user /// /// /// IEnumerable GetUserNotifications(IUser user); /// /// Gets the notifications for the user based on the specified node path /// /// /// /// /// /// Notifications are inherited from the parent so any child node will also have notifications assigned based on it's parent (ancestors) /// IEnumerable GetUserNotifications(IUser user, string path); /// /// Returns the notifications for an entity /// /// /// IEnumerable GetEntityNotifications(IEntity entity); /// /// Deletes notifications by entity /// /// void DeleteNotifications(IEntity entity); /// /// Deletes notifications by user /// /// void DeleteNotifications(IUser user); /// /// Delete notifications by user and entity /// /// /// void DeleteNotifications(IUser user, IEntity entity); /// /// Sets the specific notifications for the user and entity /// /// /// /// /// /// This performs a full replace /// IEnumerable SetNotifications(IUser user, IEntity entity, string[] actions); /// /// Creates a new notification /// /// /// /// The action letter - note: this is a string for future compatibility /// Notification CreateNotification(IUser user, IEntity entity, string action); } }