namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Deployment;

/// <summary>
/// Central→site reply: fresh fetch tokens for the gap (instances the node is missing or has at
/// a stale revision), orphan names to log (present locally but no longer deployed centrally),
/// and the base URL to fetch from.
/// </summary>
public record ReconcileSiteResponse(
    IReadOnlyList<ReconcileGapItem> Gap,
    IReadOnlyList<string> OrphanNames,
    string CentralFetchBaseUrl);

/// <summary>
/// One instance the node must (re)fetch, with a freshly-minted short-TTL token.
/// </summary>
public record ReconcileGapItem(
    string InstanceUniqueName,
    string DeploymentId,
    string RevisionHash,
    bool IsEnabled,
    string FetchToken);
