using System.Threading.Tasks; using Content.Server.Database; using Content.Shared.Administration.Notes; using Content.Shared.Database; using Robust.Shared.Player; namespace Content.Server.Administration.Notes; public interface IAdminNotesManager { event Action? NoteAdded; event Action? NoteModified; event Action? NoteDeleted; bool CanCreate(ICommonSession admin); bool CanDelete(ICommonSession admin); bool CanEdit(ICommonSession admin); bool CanView(ICommonSession admin); Task OpenEui(ICommonSession admin, Guid notedPlayer); Task OpenUserNotesEui(ICommonSession player); Task AddAdminRemark(ICommonSession createdBy, Guid player, NoteType type, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime); Task DeleteAdminRemark(int noteId, NoteType type, ICommonSession deletedBy); Task ModifyAdminRemark(int noteId, NoteType type, ICommonSession editedBy, string message, NoteSeverity? severity, bool secret, DateTime? expiryTime); /// /// Queries the database and retrieves all notes, secret and visible /// /// Desired player's /// ALL non-deleted notes, secret or not Task> GetAllAdminRemarks(Guid player); /// /// Queries the database and retrieves the notes a player should see /// /// Desired player's /// All player-visible notes Task> GetVisibleRemarks(Guid player); /// /// Queries the database and retrieves watchlists that may have been placed on the player /// /// Desired player's /// Active watchlists Task> GetActiveWatchlists(Guid player); /// /// Queries the database and retrieves new messages a player has gotten /// /// Desired player's /// All unread messages Task> GetNewMessages(Guid player); /// /// Mark an admin message as being seen by the target player. /// /// The database ID of the admin message. /// /// If true, the message is "permanently dismissed" and will not be shown to the player again when they join. /// Task MarkMessageAsSeen(int id, bool dismissedToo); }