import { ICollectionViewPageInput, ICollectionViewPageUpdateInput, IPageCreateInput, IPageUpdateInput } from '@nishans/fabricator'; import { NotionPermissions } from '@nishans/permissions'; import { FilterType, FilterTypes, UpdateType, UpdateTypes } from '@nishans/traverser'; import { ICollection, ICollectionViewPage, IPage, ISpace, ISpaceView, TPage } from '@nishans/types'; import { INotionCoreOptions, IPageMap, ISpaceUpdateInput } from '../'; import Data from './Data'; import SpaceView from './SpaceView'; /** * A class to represent space of Notion * @noInheritDoc */ export default class Space extends Data { space_view: ISpaceView; Permissions: InstanceType; constructor(arg: INotionCoreOptions); /** * Get the space view associated with the space * @returns The associated space view object */ getSpaceView(): SpaceView; /** * Delete the current workspace */ delete(): Promise; createRootPages(contents: (ICollectionViewPageInput | IPageCreateInput)[]): Promise; getRootPage(arg?: FilterType): Promise; getRootPages(args?: FilterTypes, multiple?: boolean): Promise; /** * Update a singular root page in the space * @param id id of the root page to update * @param opt object to configure root page */ updateRootPage(arg: UpdateType): Promise; /** * Update multiple root pages located in the space * @param arg Array of tuple, id and object to configure each root page * @param multiple whether multiple root pages should be deleted */ updateRootPages(args: UpdateTypes, multiple?: boolean): Promise; /** * Delete a single root page from the space * @param arg Criteria to filter the page to be deleted */ deleteRootPage(arg?: FilterType): Promise; /** * Delete multiple root_pages or root_collection_view_pages from the space * @param arg Criteria to filter the pages to be deleted * @param multiple whether or not multiple root pages should be deleted */ deleteRootPages(args?: FilterTypes, multiple?: boolean): Promise; }