import { Client } from "@notionhq/client"; export declare const NOTION_API_VERSION: "2026-03-11"; export declare const NOTION_LIMITS: Readonly<{ richTextCharacters: 2000; directChildrenPerRequest: 100; totalBlocksPerRequest: 1000; payloadBytes: 500000; maximumDepth: 64; }>; export interface NotionRequest { method: "GET" | "POST" | "PATCH"; path: string; headers: Readonly>; body?: Record; } export interface NotionTransportResponse { status: number; data: T; headers?: Readonly>; } export interface NotionTransport { request(request: NotionRequest): Promise>; } export interface NotionBlock { id: string; type: string; has_children?: boolean; in_trash?: boolean; [key: string]: unknown; } export interface CompleteNotionBlock extends NotionBlock { children: CompleteNotionBlock[]; } export interface CompleteBlockTree { rootId: string; blocks: CompleteNotionBlock[]; blockCount: number; snapshotLastEditedTime?: string; canonicalHash: string; } export interface NotionAppendBlock { object: "block"; type: string; [key: string]: unknown; } export declare class NotionLifecycleError extends Error { readonly code: string; readonly status?: number | undefined; constructor(code: string, message: string, status?: number | undefined); } export interface NotionRetryOptions { maxAttempts?: number; maxRetryAfterSeconds?: number; sleep?: (milliseconds: number) => Promise; reconcile?: () => Promise; } export interface AppendPreflightOptions { enforceDirectChildLimit?: boolean; } export declare function notionHeaders(): Readonly>; export declare function createOfficialNotionClient(token: string): Client; export declare function createNotionHttpTransport(token: string, fetchImpl?: typeof fetch): NotionTransport; export declare function readCompleteBlockTree(transport: NotionTransport, rootId: string): Promise; export declare function splitRichText(value: string): string[]; export declare function createParagraphBlocks(value: string): NotionAppendBlock[]; export declare function preflightAppendPayload(blocks: NotionAppendBlock[], options?: AppendPreflightOptions): void; export declare function appendBlockChunks(transport: NotionTransport, parentId: string, blocks: NotionAppendBlock[], options?: NotionRetryOptions): Promise; export declare function trashBlock(transport: NotionTransport, blockId: string, options?: NotionRetryOptions): Promise; export declare function onboardingPageLockKey(clientFolderId: string, canonicalTitle: string): string; export declare function assertManagedRegionSupported(blocks: CompleteNotionBlock[], region: { startIndex: number; endIndex: number; }, supported?: Set): void; export declare function resolveNotionToken(env: Record, config: { notion?: { token?: string; }; }): string; export declare function preflightNotionCapabilities(transport: NotionTransport, parentId: string): Promise<{ ok: true; parentId: string; capabilities: string[]; }>;