UNPKG

@pagenote/notion-database

Version:

make notion as a real-database for server

13 lines (12 loc) 866 B
import { Filter, NotionOperator, NotionRequestPropertyType, NotionResponsePropertyType, NotionTableCreatePropertiesType, ObjectType, SupportNotionTypes, UnSupportNotionTypes } from '../types/notionType'; type SupportNotionTypeResolver = { objectToProperty: (input: ObjectType) => NotionRequestPropertyType; propertyToObject: (input: NotionResponsePropertyType) => ObjectType; initPropertySchema: (filedKey: string) => NotionTableCreatePropertiesType; objectToPropertyFilter: (key: string, value: ObjectType, operator?: NotionOperator) => Filter; }; type UnSupportNotionTypeResolver = { propertyToObject: (input: NotionResponsePropertyType) => ObjectType; }; declare const ConvertNotionTypeMap: Record<SupportNotionTypes, SupportNotionTypeResolver> & Record<UnSupportNotionTypes, UnSupportNotionTypeResolver>; export default ConvertNotionTypeMap;