using StellaOps.AirGap.Controller.Domain; using StellaOps.AirGap.Controller.Services; using StellaOps.AirGap.Time.Models; namespace StellaOps.AirGap.Controller.Endpoints.Contracts; public sealed record AirGapStatusResponse( string TenantId, bool Sealed, string? PolicyHash, TimeAnchor TimeAnchor, StalenessEvaluation Staleness, long DriftSeconds, long SecondsRemaining, DateTimeOffset LastTransitionAt, DateTimeOffset EvaluatedAt) { public static AirGapStatusResponse FromStatus(AirGapStatus status) => new( status.State.TenantId, status.State.Sealed, status.State.PolicyHash, status.State.TimeAnchor, status.Staleness, status.Staleness.AgeSeconds, status.Staleness.SecondsRemaining, status.State.LastTransitionAt, status.EvaluatedAt); }