using StellaOps.Feedser.Models;

namespace StellaOps.Feedser.Storage.Mongo.Advisories;

public interface IAdvisoryStore
{
    Task UpsertAsync(Advisory advisory, CancellationToken cancellationToken);

    Task<Advisory?> FindAsync(string advisoryKey, CancellationToken cancellationToken);

    Task<IReadOnlyList<Advisory>> GetRecentAsync(int limit, CancellationToken cancellationToken);

    IAsyncEnumerable<Advisory> StreamAsync(CancellationToken cancellationToken);
}
