namespace OpenNest.Data; /// /// Storage backend for saved nests. talks to the /// central nest server; File mode in the desktop app keeps using SaveFileDialog and /// does not go through this interface. /// public interface INestRepository { /// /// All stored nests, newest saved first. This is the full-enumeration contract for /// backup and verification; browsing uses . /// Task> ListAsync(CancellationToken cancellationToken = default); /// One bounded page of nests matching the query, filtered and ordered by the server. Task QueryAsync(NestQuery query, CancellationToken cancellationToken = default); Task GetMetadataAsync(Guid id, CancellationToken cancellationToken = default); /// Downloaded .nest archive bytes, or null when the id does not exist. Task GetFileAsync(Guid id, CancellationToken cancellationToken = default); /// Stores a new nest; returns the server-assigned record. Task UploadAsync( byte[] nestFile, NestRecord record, CancellationToken cancellationToken = default); /// Replaces the archive and metadata of an existing id, keeping the id. Task UpdateFileAsync( Guid id, byte[] nestFile, NestRecord record, CancellationToken cancellationToken = default); /// Replaces metadata only (status, made-by, comments...), leaving the archive. Task UpdateMetadataAsync( Guid id, NestRecord record, CancellationToken cancellationToken = default); Task DeleteAsync(Guid id, CancellationToken cancellationToken = default); }