import { BlockNoteEditor, PartialBlock } from "@blocknote/core";
import type { JSONSchema7 } from "json-schema";
import { RebaseTool } from "../../../prosemirror/rebaseTool.js";
import { Result } from "../../../streamTool/streamTool.js";
/**
 * Factory function to create a StreamTool that adds blocks to the document.
 */
export declare function createAddBlocksTool<T>(config: {
    /**
     * The description of the tool
     */
    description: string;
    /**
     * The schema of the tool
     */
    schema: {
        block: JSONSchema7["items"];
        $defs?: JSONSchema7["$defs"];
    } | ((editor: BlockNoteEditor<any, any, any>) => {
        block: JSONSchema7["items"];
        $defs?: JSONSchema7["$defs"];
    });
    /**
     * A function that can validate a block
     */
    validateBlock: (block: any, editor: BlockNoteEditor<any, any, any>) => Result<T>;
    /**
     * The rebaseTool is used to get a projection of the document that
     * the JSON Tool Calls will be applied to. By using the rebaseTool we can
     * apply operations to a "projected" document, and then map them (rebase) to the actual document
     *
     * This is to:
     * - apply operations without suggestion-marks to an editor that has suggestions in it
     *  (the projection should have the suggestions applied)
     * - apply operations from a format that doesn't support all Block features (e.g.: markdown)
     *   (the projection should be the the BlockNote document without the unsupported features)
     */
    rebaseTool: (id: string, editor: BlockNoteEditor<any, any, any>) => Promise<RebaseTool>;
    /**
     * Converts the operation from `AddBlocksToolCall<T>` to `AddBlocksToolCall<PartialBlock<any, any, any>>`
     *
     * When using these factories to create a tool for a different format (e.g.: HTML / MD),
     * the `toJSONToolCall` function is used to convert the operation to a format that we can execute
     */
    toJSONToolCall: (editor: BlockNoteEditor<any, any, any>, chunk: {
        operation: AddBlocksToolCall<T>;
        isUpdateToPreviousOperation: boolean;
        isPossiblyPartial: boolean;
    }) => Promise<AddBlocksToolCall<PartialBlock<any, any, any>> | undefined>;
}): (editor: BlockNoteEditor<any, any, any>, options: {
    idsSuffixed: boolean;
    withDelays: boolean;
    onBlockUpdate?: (blockId: string) => void;
}) => import("../../../streamTool/streamTool.js").StreamTool<AddBlocksToolCall<T>>;
export type AddBlocksToolCall<T> = {
    type: "add";
    referenceId: string;
    position: "before" | "after";
    blocks: T[];
};
