namespace Musify.Application.Contracts
{
public interface IStreamTicketService
{
/// Null for an anonymous listener — the ticket is issued without a
/// sub claim.
/// The storage key (prefix) the ticket authorizes reading from.
/// When set, the Streaming Gateway clamps the byte range it will serve
/// for this ticket to [0, maxBytes) — used for the anonymous preview fragment.
StreamTicket IssueTicket(long? userId, string keyPrefix, long? maxBytes = null);
}
public record StreamTicket(string Token, int ExpiresInSeconds);
}