using Newtonsoft.Json.Linq;
using OF_DL.Enumerations;
using ArchivedEntities = OF_DL.Models.Entities.Archived;
using MessageEntities = OF_DL.Models.Entities.Messages;
using PostEntities = OF_DL.Models.Entities.Posts;
using PurchasedEntities = OF_DL.Models.Entities.Purchased;
using StreamEntities = OF_DL.Models.Entities.Streams;
using UserEntities = OF_DL.Models.Entities.Users;

namespace OF_DL.Services;

public interface IAPIService
{
    Task<string> GetDecryptionKeyCDM(Dictionary<string, string> drmHeaders, string licenceURL, string pssh);
    Task<DateTime> GetDRMMPDLastModified(string mpdUrl, string policy, string signature, string kvp);
    Task<string> GetDRMMPDPSSH(string mpdUrl, string policy, string signature, string kvp);
    Task<Dictionary<string, long>?> GetLists(string endpoint);
    Task<List<string>?> GetListUsers(string endpoint);

    Task<Dictionary<long, string>?> GetMedia(MediaType mediatype, string endpoint, string? username, string folder,
        List<long> paid_post_ids);

    Task<PurchasedEntities.PaidPostCollection> GetPaidPosts(string endpoint, string folder, string username,
        List<long> paid_post_ids,
        IStatusReporter statusReporter);

    Task<PostEntities.PostCollection> GetPosts(string endpoint, string folder, List<long> paid_post_ids,
        IStatusReporter statusReporter);

    Task<PostEntities.SinglePostCollection> GetPost(string endpoint, string folder);

    Task<StreamEntities.StreamsCollection> GetStreams(string endpoint, string folder, List<long> paid_post_ids,
        IStatusReporter statusReporter);

    Task<ArchivedEntities.ArchivedCollection> GetArchived(string endpoint, string folder,
        IStatusReporter statusReporter);

    Task<MessageEntities.MessageCollection> GetMessages(string endpoint, string folder, IStatusReporter statusReporter);

    Task<PurchasedEntities.PaidMessageCollection> GetPaidMessages(string endpoint, string folder, string username,
        IStatusReporter statusReporter);

    Task<PurchasedEntities.SinglePaidMessageCollection> GetPaidMessage(string endpoint, string folder);
    Task<Dictionary<string, long>> GetPurchasedTabUsers(string endpoint, Dictionary<string, long> users);

    Task<List<PurchasedEntities.PurchasedTabCollection>> GetPurchasedTab(string endpoint, string folder,
        Dictionary<string, long> users);

    Task<UserEntities.User?> GetUserInfo(string endpoint);
    Task<JObject?> GetUserInfoById(string endpoint);
    Dictionary<string, string> GetDynamicHeaders(string path, string queryParam);
    Task<Dictionary<string, long>?> GetActiveSubscriptions(string endpoint, bool includeRestrictedSubscriptions);
    Task<Dictionary<string, long>?> GetExpiredSubscriptions(string endpoint, bool includeRestrictedSubscriptions);
    Task<string> GetDecryptionKeyOFDL(Dictionary<string, string> drmHeaders, string licenceURL, string pssh);
}
