motionlink-cli
Version:
Making it easy to use Notion as a Content Management system for personal websites, portfolios, blogs, business homepages, and other kinds of static websites.
30 lines (29 loc) • 1.11 kB
TypeScript
import { GetBlockResponse, GetDatabaseResponse, GetPageResponse } from '@notionhq/client/build/src/api-endpoints';
import { Token } from '../models/app_models';
import { SortsParams } from '../models/config_models';
export default class NotionService {
getDatabase(args: {
withId: string;
withToken: Token;
}): Promise<GetDatabaseResponse>;
queryForDatabasePages(args: {
databaseId: string;
withToken: Token;
takeOnly?: number;
sort?: SortsParams;
filter?: object;
}): AsyncGenerator<GetPageResponse, void, undefined>;
getPageBlocks(args: {
pageId: string;
withToken: Token;
}): AsyncGenerator<GetBlockResponse, void, undefined>;
getBlockChildren(args: {
blockId: string;
withToken: Token;
}): AsyncGenerator<GetBlockResponse, void, undefined>;
private initNotionClient;
private static _instance;
static get instance(): NotionService;
static setMockedInstance(instance: NotionService): void;
}
export declare function resultOf<T>(notionCall: () => Promise<T>): Promise<T>;