using GreenHome.Domain;
namespace GreenHome.Application;
///
/// Service for managing AI queries and their history
///
public interface IAIQueryService
{
///
/// Saves an AI query to the database
///
Task SaveQueryAsync(AIQuery query, CancellationToken cancellationToken = default);
///
/// Gets AI query history for a specific device
///
Task> GetDeviceQueriesAsync(int deviceId, int take = 50, CancellationToken cancellationToken = default);
///
/// Gets AI query history for a specific user
///
Task> GetUserQueriesAsync(int userId, int take = 50, CancellationToken cancellationToken = default);
///
/// Gets total token usage for a device
///
Task GetDeviceTotalTokensAsync(int deviceId, CancellationToken cancellationToken = default);
///
/// Gets total token usage for a user
///
Task GetUserTotalTokensAsync(int userId, CancellationToken cancellationToken = default);
///
/// Gets AI query statistics (totals, averages, today's usage)
///
Task GetStatsAsync(CancellationToken cancellationToken = default);
}