import { ActiveRecord, Pagination, QuerySort } from '@oinone/kunlun-engine';
import { ExpressionRunParam } from '@oinone/kunlun-expression';
import { IQueryPageResult } from '@oinone/kunlun-service';
import { OioTreeNode } from '@oinone/kunlun-vue-ui-common';
import { CardCascaderItemData, TreeData, TreeNodeMetadata } from '../../typing';
declare type ResponseBody = {
    label: string;
    metadataKey: string;
    value: string;
    isLeaf: boolean;
};
export interface TreeNodeResponseBody {
    label: string;
    value: string;
    key: string;
    parentKeys: string[];
    metadataKey: string;
    isLeaf: boolean;
}
export interface TreeFetchChildrenOptions {
    disableSelfReferences?: boolean;
    selfFilter?: string;
    filter?: string;
    selfDomain?: string;
    domain?: string;
    selfSort?: {
        orders: QuerySort[];
    };
    sort?: {
        orders: QuerySort[];
    };
    expressionParameters?: ExpressionRunParam;
}
export declare class TreeService {
    /**
     * 获取下一个需要查询的元数据定义
     * @param node 当前选中节点
     */
    static getNextMetadata<V extends TreeData = TreeData>(node: OioTreeNode<V>): {
        isRoot: boolean;
        nextMetadata: TreeNodeMetadata | undefined;
    };
    static fetchChildren(node: OioTreeNode<TreeData | CardCascaderItemData>, options?: TreeFetchChildrenOptions): Promise<IQueryPageResult<ResponseBody>>;
    static fetchAll(metadataList: TreeNodeMetadata[], options?: {
        expressionParameters?: ExpressionRunParam;
    }): Promise<TreeNodeResponseBody[]>;
    static fetchExpandEndLevel(metadataList: TreeNodeMetadata[], options?: {
        expressionParameters?: ExpressionRunParam;
    }): Promise<TreeNodeResponseBody[]>;
    static queryKeywords4Tree(keywords: string, metadataList: TreeNodeMetadata[], options?: {
        expressionParameters?: ExpressionRunParam;
    }): Promise<TreeNodeResponseBody[]>;
    static queryKeywords4InnerSelfTree(keywords: string, node: OioTreeNode<CardCascaderItemData>): Promise<TreeNodeResponseBody[]>;
    static reverselyQuery(values: ActiveRecord[], metadataList: TreeNodeMetadata[], options?: {
        expressionParameters?: ExpressionRunParam;
    }): Promise<TreeNodeResponseBody[]>;
    static reverselyQueryWithSize(values: ActiveRecord[], metadataList: TreeNodeMetadata[], options?: {
        pageSize?: number;
        expressionParameters?: ExpressionRunParam;
        disabledIsLeaf?: boolean;
    }): Promise<TreeNodeResponseBody[]>;
    static convertTreeByResponseBody<V extends TreeData = TreeData>(treeDefinition: TreeNodeMetadata, list: TreeNodeResponseBody[], options: {
        defaultPagination?: Pagination;
        generatorKey?(item: TreeNodeResponseBody, value: V): string;
        computeNodeTitle(value: V): string;
    }): {
        nodes: OioTreeNode<V>[];
        expandedKeys: string[];
    };
}
export {};
