import { FlagsConfig, SfdxCommand } from '@salesforce/command';
import { OutputFlags } from '@oclif/parser';
export declare class PackageVersionDisplayAncestryCommand extends SfdxCommand {
    static readonly description: any;
    static readonly longDescription: any;
    static readonly help: any;
    static readonly showProgress = false;
    static readonly varargs = false;
    static readonly orgType: string;
    static readonly requiresDevhubUsername = true;
    static readonly SELECT_ALL_ROOTS = "SELECT SubscriberPackageVersionId FROM Package2Version";
    static readonly SELECT_ROOT_INFO = "SELECT MajorVersion, MinorVersion, PatchVersion, BuildNumber FROM Package2Version";
    static readonly SELECT_CHILD_INFO = "SELECT SubscriberPackageVersionId, MajorVersion, MinorVersion, PatchVersion, BuildNumber FROM Package2Version";
    static readonly SELECT_PARENT_INFO = "SELECT AncestorId, MajorVersion, MinorVersion, PatchVersion, BuildNumber FROM Package2Version";
    static readonly SELECT_PACKAGE_CONTAINER_OPTIONS = "SELECT ContainerOptions FROM Package2";
    static readonly SELECT_PACKAGE_VERSION_CONTAINER_OPTIONS = "SELECT Package2ContainerOptions FROM SubscriberPackageVersion";
    releasedOnlyFilter: string;
    static readonly flagsConfig: FlagsConfig;
    run(): Promise<unknown>;
    /**
     * Finds the ancestry of the given package.
     *  <p>This was separated out from the run() method so that unit testing could actually be done. This is admittedly a bit of a hack, but I think every other command does it too?
     *  // TODO: Maybe some CLI whiz could make this not be needed
     *  </p>
     *
     * @param username - username of the org
     * @param flags - the flags passed in
     * @private
     */
    protected _findAncestry(username: string, flags: OutputFlags<any>): any;
    /**
     * Builds the bottom-up view from a leaf.
     *
     * @param nodeId - the 04t of this node
     * @param connection - the connection object
     */
    private ancestorsFromLeaf;
    /**
     * Makes this tree from starting root this is so that we can be given a package Id and then create the forest of versions
     *
     * @param connection
     * @param rootId the subscriber package version id for this root version.
     */
    private exploreTreeFromRoot;
    /**
     * Creates the fancy NPM-LS unicode tree output
     * Idea from: https://github.com/substack/node-archy
     *
     * @param forest
     */
    private createUnicodeTreeOutput;
    /**
     * Builds the unicode output of this tree.
     *  <p>
     *      Root is handled differently, to make it look better / stand out as the root.
     *      This complicates the code flow somewhat.
     *  </p>
     *
     * @param node - current node
     * @param parent - the parent of the current node
     * @param prefix - the current prefix, so that we 'indent' far enough
     */
    private unicodeOutputTraversal;
    /**
     * Builds a node line in DOT, of the form nodeID [label="MAJOR.MINOR.PATCH"]
     *
     * @param currentNode
     */
    private static buildDotNode;
    /**
     * Builds an edge line in DOT, of the form fromNode -- toNode
     *
     * @param fromNode
     * @param toNode
     */
    private static buildDotEdge;
    /**
     * Runs a single query, and returns a promise with the results
     *
     * @param connection
     * @param query
     */
    private executeQuery;
    /**
     * Building {Major}.{Minor}.{Patch}.{BuildNumber} is done in many places, so centralize.
     *
     * @param node
     */
    private static buildVersionOutput;
}
/**
 * A treenode used to create the package version history for the JSON output.
 */
export declare class TreeNode {
    data: PackageInformation;
    children: TreeNode[];
    constructor(data: PackageInformation);
    /**
     * Adds a child to this node
     *
     * @param child
     */
    addChild(child: TreeNode): void;
}
/**
 * This is the 'data' part of TreeNode, a collection of useful version information.
 */
declare class PackageInformation {
    SubscriberPackageVersionId: string;
    MajorVersion: string;
    MinorVersion: string;
    PatchVersion: string;
    BuildNumber: string;
    depthCounter: number;
    constructor(SubscriberPackageVersionId: string, MajorVersion: string, MinorVersion: string, PatchVersion: string, BuildNumber: string, depthCounter?: number);
}
export {};
