Database
Defined in: src/models/database.model.ts:18
Database model class with helper methods.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Database(
data):Database
Defined in: src/models/database.model.ts:19
Parameters
Section titled “Parameters”{ file: { expiry_time: string; url: string; }; type: "file"; } | { file_upload: { id: string; }; type: "file_upload"; } | { external: { url: string; }; type: "external"; } | null = ...
created_by
Section titled “created_by”{ avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; } = userSchema
created_time
Section titled “created_time”string = notionDateStringSchema
data_sources
Section titled “data_sources”object[] = ...
description
Section titled “description”({ annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; plain_text: string; text: { content: string; link: { url: string; } | null; }; type: "text"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; mention: { database: { id: string; }; type: "database"; } | { date: { end: string | null; start: string; time_zone?: string | null; }; type: "date"; } | { link_preview: { url: string; }; type: "link_preview"; } | { page: { id: string; }; type: "page"; } | { template_mention: { template_mention_date: "today" | "now"; type: "template_mention_date"; } | { template_mention_user: "me"; type: "template_mention_user"; }; type: "template_mention"; } | { type: "user"; user: { avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: …; workspace: …; } | { type: …; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: …; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }; }; plain_text: string; type: "mention"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; equation: { expression: string; }; href: string | null; plain_text: string; type: "equation"; })[] = richTextSchema
{ file: { expiry_time: string; url: string; }; type: "file"; } | { file_upload: { id: string; }; type: "file_upload"; } | { external: { url: string; }; type: "external"; } | { emoji: string; type: "emoji"; } | { icon: { color?: "blue" | "brown" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "yellow" | "lightgray"; name: string; }; type: "icon"; } | { custom_emoji: { id: string; name?: string; url?: string; }; type: "custom_emoji"; } | null = ...
string = ...
in_trash
Section titled “in_trash”boolean = ...
is_inline
Section titled “is_inline”boolean = ...
is_locked?
Section titled “is_locked?”boolean = ...
last_edited_by
Section titled “last_edited_by”{ avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; } = userSchema
last_edited_time
Section titled “last_edited_time”string = notionDateStringSchema
object
Section titled “object”"database" = ...
parent
Section titled “parent”{ database_id: string; type: "database_id"; } | { data_source_id: string; database_id: string; type: "data_source_id"; } | { page_id: string; type: "page_id"; } | { type: "workspace"; workspace: true; } | { block_id: string; type: "block_id"; } | { agent_id: string; type: "agent_id"; } = parentSchema
public_url
Section titled “public_url”string | null = ...
({ annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; plain_text: string; text: { content: string; link: { url: string; } | null; }; type: "text"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; mention: { database: { id: string; }; type: "database"; } | { date: { end: string | null; start: string; time_zone?: string | null; }; type: "date"; } | { link_preview: { url: string; }; type: "link_preview"; } | { page: { id: string; }; type: "page"; } | { template_mention: { template_mention_date: "today" | "now"; type: "template_mention_date"; } | { template_mention_user: "me"; type: "template_mention_user"; }; type: "template_mention"; } | { type: "user"; user: { avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: …; workspace: …; } | { type: …; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: …; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }; }; plain_text: string; type: "mention"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; equation: { expression: string; }; href: string | null; plain_text: string; type: "equation"; })[] = richTextSchema
string = ...
Returns
Section titled “Returns”Database
Overrides
Section titled “Overrides”BaseModel<NotionDatabase>.constructor
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get cover(): {
file: {expiry_time:string;url:string; };type:"file"; } | {file_upload: {id:string; };type:"file_upload"; } | {external: {url:string; };type:"external"; } |null
Defined in: src/models/database.model.ts:96
Returns the database cover image.
Returns
Section titled “Returns”{ file: { expiry_time: string; url: string; }; type: "file"; } | { file_upload: { id: string; }; type: "file_upload"; } | { external: { url: string; }; type: "external"; } | null
createdBy
Section titled “createdBy”Get Signature
Section titled “Get Signature”get createdBy(): {
avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }
Defined in: src/models/database.model.ts:54
Returns the user who created the database.
Returns
Section titled “Returns”{ avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }
createdTime
Section titled “createdTime”Get Signature
Section titled “Get Signature”get createdTime():
Date
Defined in: src/models/database.model.ts:47
Returns the created time as a Date object.
Returns
Section titled “Returns”Date
dataSources
Section titled “dataSources”Get Signature
Section titled “Get Signature”get dataSources():
object[]
Defined in: src/models/database.model.ts:40
Returns the data sources array.
Returns
Section titled “Returns”object[]
description
Section titled “description”Get Signature
Section titled “Get Signature”get description(): ({
annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;plain_text:string;text: {content:string;link: {url:string; } |null; };type:"text"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;mention: {database: {id:string; };type:"database"; } | {date: {end:string|null;start:string;time_zone?:string|null; };type:"date"; } | {link_preview: {url:string; };type:"link_preview"; } | {page: {id:string; };type:"page"; } | {template_mention: {template_mention_date:"today"|"now";type:"template_mention_date"; } | {template_mention_user:"me";type:"template_mention_user"; };type:"template_mention"; } | {type:"user";user: {avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }; };plain_text:string;type:"mention"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };equation: {expression:string; };href:string|null;plain_text:string;type:"equation"; })[]
Defined in: src/models/database.model.ts:82
Returns the database description as rich text array.
Returns
Section titled “Returns”({ annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; plain_text: string; text: { content: string; link: { url: string; } | null; }; type: "text"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; mention: { database: { id: string; }; type: "database"; } | { date: { end: string | null; start: string; time_zone?: string | null; }; type: "date"; } | { link_preview: { url: string; }; type: "link_preview"; } | { page: { id: string; }; type: "page"; } | { template_mention: { template_mention_date: "today" | "now"; type: "template_mention_date"; } | { template_mention_user: "me"; type: "template_mention_user"; }; type: "template_mention"; } | { type: "user"; user: { avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }; }; plain_text: string; type: "mention"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; equation: { expression: string; }; href: string | null; plain_text: string; type: "equation"; })[]
Get Signature
Section titled “Get Signature”get icon(): {
file: {expiry_time:string;url:string; };type:"file"; } | {file_upload: {id:string; };type:"file_upload"; } | {external: {url:string; };type:"external"; } | {emoji:string;type:"emoji"; } | {icon: {color?:"blue"|"brown"|"gray"|"green"|"orange"|"pink"|"purple"|"red"|"yellow"|"lightgray";name:string; };type:"icon"; } | {custom_emoji: {id:string;name?:string;url?:string; };type:"custom_emoji"; } |null
Defined in: src/models/database.model.ts:89
Returns the database icon (file, emoji, native icon, or custom emoji).
Returns
Section titled “Returns”{ file: { expiry_time: string; url: string; }; type: "file"; } | { file_upload: { id: string; }; type: "file_upload"; } | { external: { url: string; }; type: "external"; } | { emoji: string; type: "emoji"; } | { icon: { color?: "blue" | "brown" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "yellow" | "lightgray"; name: string; }; type: "icon"; } | { custom_emoji: { id: string; name?: string; url?: string; }; type: "custom_emoji"; } | null
Get Signature
Section titled “Get Signature”get id():
string
Defined in: src/models/database.model.ts:33
Returns the database ID.
Returns
Section titled “Returns”string
Overrides
Section titled “Overrides”inTrash
Section titled “inTrash”Get Signature
Section titled “Get Signature”get inTrash():
boolean
Defined in: src/models/database.model.ts:117
Returns whether the database is in trash.
Returns
Section titled “Returns”boolean
isInline
Section titled “isInline”Get Signature
Section titled “Get Signature”get isInline():
boolean
Defined in: src/models/database.model.ts:124
Returns whether the database is inline.
Returns
Section titled “Returns”boolean
isLocked
Section titled “isLocked”Get Signature
Section titled “Get Signature”get isLocked():
boolean
Defined in: src/models/database.model.ts:131
Returns whether the database is locked from editing.
Returns
Section titled “Returns”boolean
lastEditedBy
Section titled “lastEditedBy”Get Signature
Section titled “Get Signature”get lastEditedBy(): {
avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }
Defined in: src/models/database.model.ts:68
Returns the user who last edited the database.
Returns
Section titled “Returns”{ avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }
lastEditedTime
Section titled “lastEditedTime”Get Signature
Section titled “Get Signature”get lastEditedTime():
Date
Defined in: src/models/database.model.ts:61
Returns the last edited time as a Date object.
Returns
Section titled “Returns”Date
object
Section titled “object”Get Signature
Section titled “Get Signature”get object():
"database"
Defined in: src/models/database.model.ts:26
Returns “database” - the object type.
Returns
Section titled “Returns”"database"
Overrides
Section titled “Overrides”parent
Section titled “parent”Get Signature
Section titled “Get Signature”get parent(): {
database_id:string;type:"database_id"; } | {data_source_id:string;database_id:string;type:"data_source_id"; } | {page_id:string;type:"page_id"; } | {type:"workspace";workspace:true; } | {block_id:string;type:"block_id"; } | {agent_id:string;type:"agent_id"; }
Defined in: src/models/database.model.ts:103
Returns the parent object.
Returns
Section titled “Returns”{ database_id: string; type: "database_id"; } | { data_source_id: string; database_id: string; type: "data_source_id"; } | { page_id: string; type: "page_id"; } | { type: "workspace"; workspace: true; } | { block_id: string; type: "block_id"; } | { agent_id: string; type: "agent_id"; }
publicUrl
Section titled “publicUrl”Get Signature
Section titled “Get Signature”get publicUrl():
string|null
Defined in: src/models/database.model.ts:138
Returns the public URL if published, otherwise null.
Returns
Section titled “Returns”string | null
Get Signature
Section titled “Get Signature”get title(): ({
annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;plain_text:string;text: {content:string;link: {url:string; } |null; };type:"text"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;mention: {database: {id:string; };type:"database"; } | {date: {end:string|null;start:string;time_zone?:string|null; };type:"date"; } | {link_preview: {url:string; };type:"link_preview"; } | {page: {id:string; };type:"page"; } | {template_mention: {template_mention_date:"today"|"now";type:"template_mention_date"; } | {template_mention_user:"me";type:"template_mention_user"; };type:"template_mention"; } | {type:"user";user: {avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }; };plain_text:string;type:"mention"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };equation: {expression:string; };href:string|null;plain_text:string;type:"equation"; })[]
Defined in: src/models/database.model.ts:75
Returns the database title as rich text array.
Returns
Section titled “Returns”({ annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; plain_text: string; text: { content: string; link: { url: string; } | null; }; type: "text"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; href: string | null; mention: { database: { id: string; }; type: "database"; } | { date: { end: string | null; start: string; time_zone?: string | null; }; type: "date"; } | { link_preview: { url: string; }; type: "link_preview"; } | { page: { id: string; }; type: "page"; } | { template_mention: { template_mention_date: "today" | "now"; type: "template_mention_date"; } | { template_mention_user: "me"; type: "template_mention_user"; }; type: "template_mention"; } | { type: "user"; user: { avatar_url?: string | null; id: string; name?: string; object: "user"; person: { email: string; email_verified?: boolean; }; type: "person"; } | { avatar_url?: string | null; bot: { owner: { type: "workspace"; workspace: true; } | { type: "user"; }; workspace_id?: string; workspace_limits?: { max_file_upload_size_in_bytes: number; }; workspace_name?: string | null; }; id: string; name?: string; object: "user"; type: "bot"; } | { id: string; object: "user"; }; }; plain_text: string; type: "mention"; } | { annotations: { bold: boolean; code: boolean; color: "default" | "blue" | "blue_background" | "brown" | "brown_background" | "gray" | "gray_background" | "green" | "green_background" | "orange" | "orange_background" | "pink" | "pink_background" | "purple" | "purple_background" | "red" | "red_background" | "yellow" | "yellow_background"; italic: boolean; strikethrough: boolean; underline: boolean; }; equation: { expression: string; }; href: string | null; plain_text: string; type: "equation"; })[]
Get Signature
Section titled “Get Signature”get url():
string
Defined in: src/models/database.model.ts:110
Returns the Notion URL of the database.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”getDescription()
Section titled “getDescription()”getDescription():
string
Defined in: src/models/database.model.ts:152
Extracts the plain text description from the database.
Returns
Section titled “Returns”string
getTitle()
Section titled “getTitle()”getTitle():
string
Defined in: src/models/database.model.ts:145
Extracts the plain text title from the database.
Returns
Section titled “Returns”string
hasPageParent()
Section titled “hasPageParent()”hasPageParent():
boolean
Defined in: src/models/database.model.ts:166
Checks if the parent is a page.
Returns
Section titled “Returns”boolean
hasWorkspaceParent()
Section titled “hasWorkspaceParent()”hasWorkspaceParent():
boolean
Defined in: src/models/database.model.ts:173
Checks if the parent is a workspace.
Returns
Section titled “Returns”boolean
isFullPage()
Section titled “isFullPage()”isFullPage():
boolean
Defined in: src/models/database.model.ts:159
Checks if the database is a full page (not inline).
Returns
Section titled “Returns”boolean
toJSON()
Section titled “toJSON()”toJSON():
object
Defined in: src/models/base.model.ts:20
Returns the raw validated data as a plain object.
Returns
Section titled “Returns”object
cover: {
file: {expiry_time:string;url:string; };type:"file"; } | {file_upload: {id:string; };type:"file_upload"; } | {external: {url:string; };type:"external"; } |null
created_by
Section titled “created_by”created_by: {
avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; } =userSchema
created_time
Section titled “created_time”created_time:
string=notionDateStringSchema
data_sources
Section titled “data_sources”data_sources:
object[]
description
Section titled “description”description: ({
annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;plain_text:string;text: {content:string;link: {url:string; } |null; };type:"text"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;mention: {database: {id:string; };type:"database"; } | {date: {end:string|null;start:string;time_zone?:string|null; };type:"date"; } | {link_preview: {url:string; };type:"link_preview"; } | {page: {id:string; };type:"page"; } | {template_mention: {template_mention_date:"today"|"now";type:"template_mention_date"; } | {template_mention_user:"me";type:"template_mention_user"; };type:"template_mention"; } | {type:"user";user: {avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type: …;workspace: …; } | {type: …; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes: …; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }; };plain_text:string;type:"mention"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };equation: {expression:string; };href:string|null;plain_text:string;type:"equation"; })[] =richTextSchema
icon: {
file: {expiry_time:string;url:string; };type:"file"; } | {file_upload: {id:string; };type:"file_upload"; } | {external: {url:string; };type:"external"; } | {emoji:string;type:"emoji"; } | {icon: {color?:"blue"|"brown"|"gray"|"green"|"orange"|"pink"|"purple"|"red"|"yellow"|"lightgray";name:string; };type:"icon"; } | {custom_emoji: {id:string;name?:string;url?:string; };type:"custom_emoji"; } |null
id:
string
in_trash
Section titled “in_trash”in_trash:
boolean
is_inline
Section titled “is_inline”is_inline:
boolean
is_locked?
Section titled “is_locked?”
optionalis_locked?:boolean
last_edited_by
Section titled “last_edited_by”last_edited_by: {
avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type:"workspace";workspace:true; } | {type:"user"; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes:number; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; } =userSchema
last_edited_time
Section titled “last_edited_time”last_edited_time:
string=notionDateStringSchema
object
Section titled “object”object:
"database"
parent
Section titled “parent”parent: {
database_id:string;type:"database_id"; } | {data_source_id:string;database_id:string;type:"data_source_id"; } | {page_id:string;type:"page_id"; } | {type:"workspace";workspace:true; } | {block_id:string;type:"block_id"; } | {agent_id:string;type:"agent_id"; } =parentSchema
public_url
Section titled “public_url”public_url:
string|null
title: ({
annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;plain_text:string;text: {content:string;link: {url:string; } |null; };type:"text"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };href:string|null;mention: {database: {id:string; };type:"database"; } | {date: {end:string|null;start:string;time_zone?:string|null; };type:"date"; } | {link_preview: {url:string; };type:"link_preview"; } | {page: {id:string; };type:"page"; } | {template_mention: {template_mention_date:"today"|"now";type:"template_mention_date"; } | {template_mention_user:"me";type:"template_mention_user"; };type:"template_mention"; } | {type:"user";user: {avatar_url?:string|null;id:string;name?:string;object:"user";person: {string;email_verified?:boolean; };type:"person"; } | {avatar_url?:string|null;bot: {owner: {type: …;workspace: …; } | {type: …; };workspace_id?:string;workspace_limits?: {max_file_upload_size_in_bytes: …; };workspace_name?:string|null; };id:string;name?:string;object:"user";type:"bot"; } | {id:string;object:"user"; }; };plain_text:string;type:"mention"; } | {annotations: {bold:boolean;code:boolean;color:"default"|"blue"|"blue_background"|"brown"|"brown_background"|"gray"|"gray_background"|"green"|"green_background"|"orange"|"orange_background"|"pink"|"pink_background"|"purple"|"purple_background"|"red"|"red_background"|"yellow"|"yellow_background";italic:boolean;strikethrough:boolean;underline:boolean; };equation: {expression:string; };href:string|null;plain_text:string;type:"equation"; })[] =richTextSchema
url:
string