import { TBlockCreateInput, TBlockInput } from '@nishans/fabricator'; import { FilterType, FilterTypes, UpdateType, UpdateTypes } from '@nishans/traverser'; import { IPage, TBlock } from '@nishans/types'; import { IBlockMap, INotionCoreOptions } from '../../'; import PageBlock from './PageBlock'; /** * A class to represent Page type block of Notion * @noInheritDoc */ export default class Page extends PageBlock>> { constructor(arg: INotionCoreOptions); /** * Batch add multiple block as contents * @param contents array of options for configuring each content * @returns Array of newly created block content objects */ createBlocks(contents: TBlockCreateInput[]): Promise; getBlock(arg?: FilterType): Promise; /** * Get all the blocks of the page as an object * @returns An array of block object */ getBlocks(args?: FilterTypes, multiple?: boolean): Promise; updateBlock(arg: UpdateType): Promise; updateBlocks(args: UpdateTypes, multiple?: boolean): Promise; /** * Delete a single block from a page * @param arg id string or a predicate acting as a filter */ deleteBlock(arg?: FilterType): Promise; /** * Delete multiple blocks from a page * @param arg array of ids or a predicate acting as a filter */ deleteBlocks(args?: FilterTypes, multiple?: boolean): Promise; }