using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LittleShop.DTOs;

namespace LittleShop.Services;

public interface IBotMetricsService
{
    // Metrics
    Task<BotMetricDto> RecordMetricAsync(Guid botId, CreateBotMetricDto dto);
    Task<bool> RecordMetricsBatchAsync(Guid botId, BotMetricsBatchDto dto);
    Task<IEnumerable<BotMetricDto>> GetBotMetricsAsync(Guid botId, DateTime? startDate = null, DateTime? endDate = null);
    Task<BotMetricsSummaryDto> GetMetricsSummaryAsync(Guid botId, DateTime? startDate = null, DateTime? endDate = null);
    
    // Sessions
    Task<BotSessionDto> StartSessionAsync(Guid botId, CreateBotSessionDto dto);
    Task<bool> UpdateSessionAsync(Guid sessionId, UpdateBotSessionDto dto);
    Task<BotSessionDto?> GetSessionAsync(Guid sessionId);
    Task<IEnumerable<BotSessionDto>> GetBotSessionsAsync(Guid botId, bool activeOnly = false);
    Task<BotSessionSummaryDto> GetSessionSummaryAsync(Guid botId, DateTime? startDate = null, DateTime? endDate = null);
    Task<bool> EndSessionAsync(Guid sessionId);
    Task<int> CleanupInactiveSessionsAsync(int inactiveMinutes = 30);
}