using Managing.Domain.Synth.Models;

namespace Managing.Application.Abstractions.Services;

/// <summary>
/// Interface for communicating with the Synth API
/// </summary>
public interface ISynthApiClient
{
    /// <summary>
    /// Fetches the current leaderboard from Synth API
    /// </summary>
    /// <param name="config">Synth configuration containing API key and settings</param>
    /// <returns>List of miners with their rankings and stats</returns>
    Task<List<MinerInfo>> GetLeaderboardAsync(SynthConfiguration config);

    /// <summary>
    /// Fetches historical leaderboard data from Synth API for a specific time range
    /// </summary>
    /// <param name="startTime">Start time for historical data (ISO 8601 format)</param>
    /// <param name="endTime">End time for historical data (ISO 8601 format)</param>
    /// <param name="config">Synth configuration containing API key and settings</param>
    /// <returns>List of miners with their historical rankings and stats</returns>
    Task<List<MinerInfo>> GetHistoricalLeaderboardAsync(DateTime startTime, DateTime endTime, SynthConfiguration config);
    
    /// <summary>
    /// Fetches latest predictions from specified miners
    /// </summary>
    /// <param name="minerUids">List of miner UIDs to get predictions from</param>
    /// <param name="asset">Asset symbol (e.g., "BTC", "ETH")</param>
    /// <param name="timeIncrement">Time interval in seconds between each prediction point</param>
    /// <param name="timeLength">Total prediction time length in seconds</param>
    /// <param name="config">Synth configuration containing API key and settings</param>
    /// <returns>List of predictions from the specified miners</returns>
    Task<List<MinerPrediction>> GetMinerPredictionsAsync(
        List<int> minerUids,
        string asset,
        int timeIncrement,
        int timeLength,
        SynthConfiguration config);

    /// <summary>
    /// Fetches historical predictions from specified miners for a specific time point
    /// </summary>
    /// <param name="minerUids">List of miner UIDs to get predictions from</param>
    /// <param name="asset">Asset symbol (e.g., "BTC", "ETH")</param>
    /// <param name="startTime">Start time for historical predictions (when the prediction was made)</param>
    /// <param name="timeIncrement">Time interval in seconds between each prediction point</param>
    /// <param name="timeLength">Total prediction time length in seconds</param>
    /// <param name="config">Synth configuration containing API key and settings</param>
    /// <returns>List of historical predictions from the specified miners</returns>
    Task<List<MinerPrediction>> GetHistoricalMinerPredictionsAsync(
        List<int> minerUids,
        string asset,
        DateTime startTime,
        int timeIncrement,
        int timeLength,
        SynthConfiguration config);
} 