UNPKG

ngx-notion

Version:
101 lines (100 loc) 2.48 kB
export declare enum BlockType { Paragraph = "paragraph", Heading1 = "heading_1", Heading2 = "heading_2", Heading3 = "heading_3", BulletedListItem = "bulleted_list_item", NumberedListItem = "numbered_list_item", ToDo = "to_do", Toggle = "toggle", ChildPage = "child_page", ChildDatabase = "child_database", Embed = "embed", Image = "image", Video = "video", File = "file", Pdf = "pdf", Bookmark = "bookmark", Callout = "callout", Quote = "quote", Equation = "equation", Divider = "divider", TableOfContents = "table_of_contents", Column = "column", ColumnList = "column_list", LinkPreview = "link_preview", SyncedBlock = "synced_block", Template = "template", LinkToPage = "link_to_page", Table = "table", TableRow = "table_row", Unsupported = "unsupported" } export declare enum ColorType { 'default' = 0, 'gray' = 1, 'brown' = 2, 'orange' = 3, 'yellow' = 4, 'green' = 5, 'blue' = 6, 'purple' = 7, 'pink' = 8, 'red' = 9, 'gray_background' = 10, 'brown_background' = 11, 'orange_background' = 12, 'yellow_background' = 13, 'green_background' = 14, 'blue_background' = 15, 'purple_background' = 16, 'pink_background' = 17, 'red_background' = 18 } export interface Block { id: string; object: 'block'; created_time: string; created_by: { object: 'user'; id: 'cb38e95d-00cf-4e7e-adce-974f4a44a547'; }; last_edited_time: string; last_edited_by: { object: 'user'; id: 'e79a0b74-3aba-4149-9f74-0bb5791a6ee6'; }; has_children: boolean; type: BlockType; archived: boolean; index: number; blocks: Block[]; [key: string]: any; } export interface RichTextAnnotations { bold: boolean; italic: boolean; strikethrough: boolean; underline: boolean; code: boolean; color: ColorType; } export interface BlockObjectType { type: BlockType; to_do: { rich_text: [ { type: 'text' | 'mention' | 'equation'; text: { content: string; link: string | null; }; annotations: RichTextAnnotations; plain_text: string; href: string | null; } ]; color: ColorType; children: BlockObjectType[]; }; }