import { Client } from '@notionhq/client'; import { GetPageResponse, GetDatabaseResponse, GetBlockResponse, QueryDatabaseResponse } from '@notionhq/client/build/src/api-endpoints'; import { normalizeBlockType } from './fetcher/utils'; export interface RequestParameters { client: Client; entry_id?: string; entry_key?: string; entry_type?: string; } export declare type NormalizedEntryType = ReturnType; export declare type SubTreeEntity = SubTreeCommons & (Page | Database | Block); export interface SubTreeCommons { id: string; depth: number; blockContentPlainText: string; parent?: string; children: (string | SubTreeEntity)[]; } export declare type FlatEntity = FlatCommons & (Page | Database | Block); export interface FlatCommons { id: string; depth: number; blockContentPlainText: string; parent?: string; children: string[]; } export declare type Entity = Commons & (Page | Database | Block); export interface Commons { id: string; depth: number; blockContentPlainText: string; parent?: Entity; children: Entity[]; } export declare type GetPageResponseWithMetadata = Extract; export interface Page { type: 'page'; metadata: Extract; } export declare type QueryDatabaseResponseWithProperties = Extract; export declare type GetDatabaseResponseWithMetadata = Extract; export interface Database { type: 'database'; metadata: Extract; } export declare type GetBlockResponseWithMetadata = Extract; export interface Block { type: 'block'; metadata: Extract; }