namespace ScadaLink.SiteEventLogging;

/// <summary>
/// Interface for recording operational events to the local SQLite event log.
/// </summary>
public interface ISiteEventLogger
{
    /// <summary>
    /// Record an event asynchronously.
    /// </summary>
    /// <param name="eventType">Category: script, alarm, deployment, connection, store_and_forward, instance_lifecycle</param>
    /// <param name="severity">Info, Warning, or Error</param>
    /// <param name="instanceId">Optional instance ID associated with the event</param>
    /// <param name="source">Source identifier, e.g., "ScriptActor:MonitorSpeed"</param>
    /// <param name="message">Human-readable event description</param>
    /// <param name="details">Optional JSON details (stack traces, compilation errors, etc.)</param>
    Task LogEventAsync(
        string eventType,
        string severity,
        string? instanceId,
        string source,
        string message,
        string? details = null);
}
