using DeepDrftModels.DTOs;
using DeepDrftModels.Enums;
using Models.Common;
using NetBlocks.Models;
namespace DeepDrftManager.Services;
///
/// CMS-side release operations for the Manager host. Mirrors : every
/// read and write goes over HTTP to DeepDrftAPI's api/release family, which is the single
/// authority over both the SQL metadata store and the binary vault. The Manager holds no in-process
/// data layer.
///
public interface ICmsReleaseService
{
///
/// Fetch a page of releases from GET api/release, optionally filtered to one
/// . The matching medium's metadata satellite is populated on each row;
/// the others are null. Null medium returns all releases unfiltered.
///
Task>> GetPagedAsync(
ReleaseMedium? medium,
int page, int pageSize, string? sortColumn, bool sortDescending,
CancellationToken ct = default);
///
/// Fetch a single release with both metadata navs from GET api/release/{id} (nulls for the
/// non-matching medium). A 404 returns a passing result with a null value.
///
Task> GetByIdAsync(long id, CancellationToken ct = default);
///
/// Upload a Session hero image via POST api/release/{id}/session/hero-image (multipart).
/// The server stores it in the image vault and sets SessionMetadata.HeroImageEntryKey.
/// Maps a 404 to a "Release not found." failure; relays 4xx validation text as-is.
///
Task UploadSessionHeroImageAsync(
long releaseId,
Stream imageStream,
string fileName,
string contentType,
CancellationToken ct = default);
///
/// Trigger high-resolution waveform generation for a Mix via
/// POST api/release/{id}/mix/waveform (no body). The server fetches the mix audio from its
/// own vault, computes the datum, stores it, and sets MixMetadata.WaveformEntryKey. Maps a
/// 404 to a "Mix audio not found." failure.
///
Task GenerateMixWaveformAsync(long releaseId, CancellationToken ct = default);
}