using System;
using System.Collections.Generic;
namespace Jellyfin.Plugin.Herald.Notices;
///
/// Persistence for notices and acknowledgements.
///
public interface INoticeStore
{
///
/// Gets all notices, oldest first.
///
/// The notices.
IReadOnlyList GetNotices();
///
/// Gets a single notice.
///
/// The notice id.
/// The notice, or null.
Notice? GetNotice(Guid id);
///
/// Inserts or replaces a notice.
///
/// The notice.
void SaveNotice(Notice notice);
///
/// Deletes a notice together with its acknowledgements.
///
/// The notice id.
/// true if a notice was deleted.
bool DeleteNotice(Guid id);
///
/// Gets every acknowledgement of a user.
///
/// The user id.
/// The acknowledgements.
IReadOnlyList GetAcksByUser(Guid userId);
///
/// Gets the acknowledgements for one revision of a notice, oldest first.
///
/// The notice id.
/// The revision.
/// The acknowledgements.
IReadOnlyList GetAcks(Guid noticeId, int revision);
///
/// Stores an acknowledgement. An existing one for the same notice, revision and user is kept.
///
/// The acknowledgement.
void AddAck(NoticeAck ack);
}