namespace Extrudex.Domain.Interfaces;

/// <summary>
/// Service interface for syncing filament usage data from printers
/// into the Extrudex database. Handles querying Moonraker printers,
/// computing derived usage metrics, and persisting updates to spools
/// and print job records.
/// </summary>
public interface IFilamentUsageSyncService
{
    /// <summary>
    /// Performs a single sync cycle: queries all active Moonraker printers,
    /// fetches their current filament usage data, and persists updates to
    /// the database.
    /// </summary>
    /// <param name="cancellationToken">Cancellation token for graceful shutdown.</param>
    /// <returns>The number of printers successfully synced.</returns>
    Task<int> SyncAllAsync(CancellationToken cancellationToken = default);
}