using ZB.MOM.WW.MxGateway.Contracts.Proto.Galaxy;

namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy.Browse;

/// <summary>
///     Driver-side seam between <see cref="GalaxyDiscoverer"/> and the gateway. Production
///     wraps <c>GalaxyRepositoryClient</c>; tests substitute a fake returning canned
///     <see cref="GalaxyObject"/> rows so the discoverer's translation logic can be exercised
///     without a real gRPC channel.
/// </summary>
public interface IGalaxyHierarchySource
{
    /// <summary>
    ///     Returns the full materialised Galaxy hierarchy. The gateway client pages
    ///     internally; this interface deliberately exposes only the post-paging shape so
    ///     callers don't reimplement paging.
    /// </summary>
    /// <param name="cancellationToken">Cancellation token for the operation.</param>
    /// <returns>The full materialised Galaxy object hierarchy.</returns>
    Task<IReadOnlyList<GalaxyObject>> GetHierarchyAsync(CancellationToken cancellationToken);
}
