using DeepDrftModels.DTOs;
using DeepDrftModels.Enums;
using Models.Common;
using NetBlocks.Models;
namespace DeepDrftData;
///
/// SQL-side release service. Repository outputs entities; this service outputs DTOs via TrackConverter.
/// Backs the medium-aware release read endpoints (paged list + by-id detail) and the two metadata
/// write paths (Session hero image, Mix waveform). The entity never escapes the service layer.
///
public interface IReleaseService
{
/// Paginated releases, optionally narrowed by medium and a free-text/genre filter. The matching medium's metadata satellite is included in the result. Omit medium for all releases; omit filter for no search/genre narrowing.
Task>> GetPagedAsync(
int page, int pageSize, string? sortColumn, bool sortDescending,
ReleaseMedium? medium, ReleaseFilter? filter = null, CancellationToken cancellationToken = default);
/// Single release with both metadata navs included (nulls for non-matching media).
Task> GetByIdAsync(long id, CancellationToken cancellationToken = default);
/// The public addressing read: single release resolved by its opaque EntryKey (Phase 11 ยง3e). Both metadata navs included (nulls for non-matching media).
Task> GetByEntryKeyAsync(string entryKey, CancellationToken cancellationToken = default);
/// Track entry keys for a release. Single-entry for Session/Mix (enforced at upload); may be multiple for Cut.
Task>> GetTrackEntryKeysAsync(long releaseId, CancellationToken cancellationToken = default);
/// Find-or-create the Session satellite and set its hero image entry key. Fails when the release is not a Session.
Task SetSessionHeroImageAsync(long releaseId, string heroImageEntryKey, CancellationToken cancellationToken = default);
/// Find-or-create the Mix satellite and set its waveform entry key. Fails when the release is not a Mix.
Task SetMixWaveformAsync(long releaseId, string waveformEntryKey, CancellationToken cancellationToken = default);
}