using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Services;
using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.Services;
///
/// CentralUI facade that projects the per-site health reports' name-keyed
/// connection statuses onto a connection-id → map for
/// the design DataConnections page. Reuses the existing health transport — the
/// 's
/// already-aggregated SiteHealthReport.DataConnectionStatuses — and resolves
/// each report's connection NAME key back to a DataConnection.Id within the
/// report's own site, so the page can render a live badge per connection node.
///
public interface IConnectionHealthQueryService
{
///
/// Returns a snapshot of connection-id → latest known
/// across every configured site. A site with no health report yet (or a
/// heartbeat-only state) contributes no entries; a report referencing a
/// connection name that does not match any configured connection is skipped.
/// Callers treat a missing key as "unknown" rather than a failure.
///
/// Cancellation token.
/// A task resolving to the connection-id → health map.
Task> GetConnectionHealthAsync(
CancellationToken ct = default);
}