import { INotionFabricatorOptions, TBlockInput } from '@nishans/fabricator'; import { NotionOperationPluginFunction } from '@nishans/operations'; import { FilterTypes, IterateAndDeleteOptions, IterateAndGetOptions, IterateAndUpdateOptions, UpdateTypes } from '@nishans/traverser'; import { INotionCache, NotionCacheInitializerTracker, TData, TDataType } from '@nishans/types'; import { INotionCoreOptions } from '../'; /** * A class to update and control data specific stuffs * @noInheritDoc */ export default class NotionData> implements INotionCoreOptions { id: string; type: TDataType; logger: boolean; user_id: string; notion_operation_plugins: NotionOperationPluginFunction[]; space_id: string; interval: number; token: string; cache: INotionCache; cache_init_tracker: NotionCacheInitializerTracker; constructor(arg: INotionCoreOptions & { cache?: INotionCache; type: TDataType; }); protected getLastEditedProps(): { last_edited_time: number; last_edited_by_table: string; last_edited_by_id: string; }; protected updateLastEditedProps(data?: TData): { last_edited_time: number; last_edited_by_table: string; last_edited_by_id: string; }; /** * Get the cached data using the current data id */ getCachedData(): T; updateCachedData(): Promise; /** * Delete the cached data using the id */ protected deleteCachedData(): void; update(arg: U): Promise; initializeCacheForThisData(): Promise; protected deleteIterate(args: FilterTypes, options: IterateAndDeleteOptions, transform: (id: string) => TD | undefined | Promise, cb?: (id: string, data: TD, container: C) => void | Promise): Promise; protected updateIterate(args: UpdateTypes, options: IterateAndUpdateOptions, transform: (id: string) => TD | undefined | Promise, cb?: (id: string, data: TD, updated_data: RD, container: C) => any): Promise; protected getIterate(args: FilterTypes, options: IterateAndGetOptions, transform: (id: string) => RD | undefined | Promise, cb?: (id: string, data: RD, container: C) => any): Promise; getProps(): INotionFabricatorOptions; }