const{Client}=require('@notionhq/client');const{NotionFaker}=require('@narkdown/notion-faker');constNOTION_API_KEY='';// Notion API KeyconstEXAMPLE_DATABASE_ID='';// Database for importing Property Scheme.constPARENT_PAGE_ID='';// Parent page to create database.constROW_COUNT=100;// ⚠️ Creating too many pages using the Notion API is a heavy task.constnotion=newClient({auth: NOTION_API_KEY});constnotionFaker=newNotionFaker();(async()=>{const{properties: scheme}=awaitnotion.databases.retrieve({database_id: EXAMPLE_DATABASE_ID,});const{id: databaseId}=awaitnotion.databases.create({parent: {page_id: PARENT_PAGE_ID,},title: notionFaker.database.title()()(),properties: notionFaker.database.properties.propertiesByScheme(scheme),icon: notionFaker.icon.emoji(),cover: notionFaker.cover()(),});for(const_ofArray.from({length: ROW_COUNT})){awaitnarkdown.pages.create({parent: {database_id: TEST_DATABASE_ID},properties: notionFaker.page.properties.propertiesByScheme(scheme),});}})();