export type AdfParserErrorCode = "ROOT_NOT_OBJECT" | "ROOT_TYPE_MISMATCH" | "UNKNOWN_NODE_TYPE" | "NODE_NOT_OBJECT" | "MAX_DEPTH_EXCEEDED" | "MAX_NODES_EXCEEDED" | "CIRCULAR_REFERENCE" | "INVALID_HEADING_LEVEL";
export declare class AdfParserError extends Error {
    readonly code: AdfParserErrorCode;
    readonly path: string;
    constructor(code: AdfParserErrorCode, path: string, message: string);
}
export interface AdfParserOptions {
    readonly maxNodes?: number;
    readonly maxDepth?: number;
    readonly maxTextBytes?: number;
}
export interface IngestedTextRun {
    readonly text: string;
    readonly clamped: boolean;
    readonly markdownInjectionEscapes: number;
}
export type IngestedBlock = {
    readonly kind: "paragraph";
    readonly runs: readonly IngestedTextRun[];
} | {
    readonly kind: "heading";
    readonly level: 1 | 2 | 3 | 4 | 5 | 6;
    readonly runs: readonly IngestedTextRun[];
} | {
    readonly kind: "bulletList";
    readonly items: readonly IngestedBlock[];
} | {
    readonly kind: "orderedList";
    readonly items: readonly IngestedBlock[];
} | {
    readonly kind: "listItem";
    readonly content: readonly IngestedBlock[];
} | {
    readonly kind: "codeBlock";
    readonly language: string | null;
    readonly text: string;
} | {
    readonly kind: "linkRef";
    readonly displayText: string;
    readonly hrefLabel: string;
};
export interface IngestedDocument {
    readonly version: 1;
    readonly blocks: readonly IngestedBlock[];
    readonly stats: {
        readonly nodes: number;
        readonly maxDepthReached: number;
        readonly truncatedBlocks: number;
    };
}
/**
 * Parse a JSON-decoded ADF tree into an `IngestedDocument`. Throws `AdfParserError` for
 * unknown node types, malformed structure, depth-bombs, or circular references. Pure.
 */
export declare const parseAdfDocument: (raw: unknown, options?: AdfParserOptions) => IngestedDocument;
export declare const ADF_PARSER_DEFAULTS: {
    readonly maxNodes: 5000;
    readonly maxDepth: 32;
    readonly maxTextBytes: number;
};
//# sourceMappingURL=adfParser.d.ts.map