import type { CrawlerOptions, Page } from "notion-md-crawler"; import { Document } from "../Node.js"; import type { BaseReader } from "./type.js"; type NotionReaderOptions = Pick; /** * Notion pages are retrieved recursively and converted to Document objects. * Notion Database can also be loaded, and [the serialization method can be customized](https://github.com/TomPenguin/notion-md-crawler/tree/main). * * [Note] To use this reader, must be created the Notion integration must be created in advance * Please refer to [this document](https://www.notion.so/help/create-integrations-with-the-notion-api) for details. */ export declare class NotionReader implements BaseReader { private readonly crawl; /** * Constructor for the NotionReader class * @param {NotionReaderOptions} options - Configuration options for the reader */ constructor({ client, serializers }: NotionReaderOptions); /** * Converts Pages to an array of Document objects * @param {Page} pages - The Notion pages to convert (Return value of `loadPages`) * @returns {Document[]} An array of Document objects */ toDocuments(pages: Page[]): Document[]; /** * Loads recursively the Notion page with the specified root page ID. * @param {string} rootPageId - The root Notion page ID * @returns {Promise} A Promise that resolves to a Pages object(Convertible with the `toDocuments` method) */ loadPages(rootPageId: string): Promise; /** * Loads recursively Notion pages and converts them to an array of Document objects * @param {string} rootPageId - The root Notion page ID * @returns {Promise} A Promise that resolves to an array of Document objects */ loadData(rootPageId: string): Promise; } export {};