import { CID } from "multiformats/cid";
import { FileContent } from "../../ipfs/index.js";
import { Links, NonEmptyPath, SoftLink, Link, UpdateCallback } from "../types.js";
import { Maybe } from "../../common/index.js";
import { DistinctivePath, Path } from "../../path.js";
import { Skeleton, SkeletonInfo, TreeInfo, TreeHeader, PutDetails } from "../protocol/public/types.js";
import BaseTree from "../base/tree.js";
import BareTree from "../bare/tree.js";
import PublicFile from "./PublicFile.js";
import PublicHistory from "./PublicHistory.js";
declare type ConstructorParams = {
    cid: Maybe<CID>;
    links: Links;
    header: TreeHeader;
};
declare type Child = PublicFile | PublicTree | BareTree;
export declare class PublicTree extends BaseTree {
    children: {
        [name: string]: Child;
    };
    cid: Maybe<CID>;
    links: Links;
    header: TreeHeader;
    history: PublicHistory;
    constructor({ links, header, cid }: ConstructorParams);
    static empty(): Promise<PublicTree>;
    static fromCID(cid: CID): Promise<PublicTree>;
    static fromInfo(info: TreeInfo, cid: CID): Promise<PublicTree>;
    static instanceOf(obj: unknown): obj is PublicTree;
    createChildTree(name: string, onUpdate: Maybe<UpdateCallback>): Promise<PublicTree>;
    createOrUpdateChildFile(content: FileContent, name: string, onUpdate: Maybe<UpdateCallback>): Promise<PublicFile>;
    putDetailed(): Promise<PutDetails>;
    updateDirectChild(child: PublicTree | PublicFile, name: string, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    removeDirectChild(name: string): this;
    getDirectChild(name: string): Promise<Child | null>;
    get(path: Path): Promise<Child | null>;
    getRecurse(skel: Skeleton, path: NonEmptyPath): Promise<SkeletonInfo | Child | null>;
    assignLink({ name, link, skeleton }: {
        name: string;
        link: Link;
        skeleton: SkeletonInfo | SoftLink;
    }): void;
    static resolveSoftLink(link: SoftLink): Promise<Child | null>;
    getLinks(): Links;
    updateLink(name: string, result: PutDetails): this;
    insertSoftLink({ name, path, username }: {
        name: string;
        path: DistinctivePath;
        username: string;
    }): this;
}
export default PublicTree;
