namespace PlaylistShared.Services;

public interface IYandexMusicService
{
    Task<string> CreatePlaylistAsync(string userId, string title);
    Task AddTrackToPlaylistAsync(string userId, string yandexPlaylistId, string trackId);
    Task RemoveTrackFromPlaylistAsync(string userId, string yandexPlaylistId, string trackId);
    Task<List<YandexTrackInfo>> GetPlaylistTracksAsync(string userId, string yandexPlaylistId);
    Task<YandexPlaylistInfo> GetPlaylistInfoAsync(string userId, string yandexPlaylistId);
    Task<string?> RefreshUserTokenAsync(string userId);
}

public record YandexTrackInfo(string Id, string Title, string? Artist, string? AlbumTitle, int DurationMs);
public record YandexPlaylistInfo(string Kind, string Title, int TrackCount);