notion-page-tree
Version:
Recursively fetch nested Notion pages from the root page/database/block node.
7 lines (6 loc) • 392 B
TypeScript
import { GetBlockResponseWithMetadata } from '../../types';
export declare type RichTextItemResponse = Extract<GetBlockResponseWithMetadata, {
type: 'paragraph';
}>['paragraph']['rich_text'][0];
export declare const flattenRichText: (richTextItemResponse: RichTextItemResponse[]) => string;
export declare const extractPlainTextFromBlock: (block: GetBlockResponseWithMetadata) => string;