import { HealthNode } from '../types.cjs';
import { CollectionImpl } from "./index.cjs";
/** A Collection that another Collection reads, under its query alias. */
export interface HealthSource {
    readonly alias: string;
    /** Tells apart two sources under one alias, such as two includes. */
    readonly id?: string;
    readonly collection: CollectionImpl<any, any, any, any, any>;
    readonly kind?: HealthNode[`kind`];
}
/**
 * Build the health tree for a Collection. A base Collection is one node. A live
 * query is a node with one child per source alias, in query order, and each
 * child that is itself a live query recurses. The tree is read from current
 * state, so every node mirrors its Collection at the moment it is read.
 */
export declare function buildHealthTree(collection: CollectionImpl<any, any, any, any, any>, { alias, id, kind }?: Omit<HealthSource, `collection`>, owner?: object): HealthNode;
/**
 * A node from its own facts and its children. It has errors when it or
 * anything below it has a `failureReason` or an `error`.
 */
export declare function healthNode(owner: object, id: string | undefined, fields: Omit<HealthNode, `hasErrors`>): HealthNode;
/**
 * Every node in a health tree that shows a problem of its own, in tree order:
 * a `failureReason` or an `error`. A node whose only problems are below it is
 * not listed; its descendants are.
 */
export declare function findProblems(health: HealthNode): Array<HealthNode>;
