namespace OpenNest.Data; /// /// The drawing library reads and writes that saving a nest drawing to the library uses. /// is the only production implementation. /// public interface IDrawingLibraryStore : IDrawingLibrary { /// The current record, including an archived one, or null for an unknown id. Task GetAsync(Guid id, CancellationToken cancellationToken = default); /// One page of immutable revisions, newest first, or null for an unknown id. Task GetRevisionsAsync(Guid id, int offset = 0, int limit = DrawingLibraryRules.DefaultRevisionLimit, CancellationToken cancellationToken = default); /// Stores revision 1 under the caller-allocated record.Id. Task UploadAsync(DrawingLibraryRecord record, byte[] package, CancellationToken cancellationToken = default); /// Saves the next revision when is current. Task UpdatePackageAsync(Guid id, DrawingLibraryRecord record, byte[] package, int expectedRevision, CancellationToken cancellationToken = default); /// /// Saves new details and nesting settings, keeping the package, as the next revision /// when is current. /// Task UpdateMetadataAsync(Guid id, DrawingLibraryRecord record, int expectedRevision, CancellationToken cancellationToken = default); }