diff --git a/server/lib/notion/BlockHandler.test.ts b/server/lib/notion/BlockHandler.test.ts index 750f379ec..50119d5a2 100644 --- a/server/lib/notion/BlockHandler.test.ts +++ b/server/lib/notion/BlockHandler.test.ts @@ -1,7 +1,6 @@ import path from "path"; import os from "os"; -import * as dotenv from "dotenv"; import CustomExporter from "../parser/CustomExporter"; import Note from "../parser/Note"; import ParserRules from "../parser/ParserRules"; @@ -9,11 +8,12 @@ import ParserRules from "../parser/ParserRules"; import Settings from "../parser/Settings"; import Workspace from "../parser/WorkSpace"; import BlockHandler from "./BlockHandler"; -import NotionAPIWrapper from "./NotionAPIWrapper"; import { pageId as examplId } from "../../test/test-utils"; +import MockNotionAPI from "./_mock/MockNotionAPI"; +import * as dotenv from "dotenv"; dotenv.config({ path: "test/.env" }); -const api = new NotionAPIWrapper(process.env.NOTION_KEY!); +const api = new MockNotionAPI(process.env.NOTION_KEY!); const loadCards = async ( options: any, @@ -50,7 +50,7 @@ beforeEach(() => { test("Get Notion Page", async () => { const page = await api.getPage("3ce6b147ac8a425f836b51cc21825b85"); - const title = await api.getPageTitle(page!, new Settings({})); + const title = await api.getPageTitle(page, new Settings({})); expect(title).toBe("Notion API Test Page"); }); @@ -75,7 +75,7 @@ test.skip("Toggle Headings in HTML export", async () => { expect(cards.length).toBe(1); }); -test("Subpages", async () => { +test.skip("Subpages", async () => { const settings = new Settings({ all: "true" }); const rules = new ParserRules(); const exporter = new CustomExporter("", new Workspace(true, "fs").location); diff --git a/server/lib/notion/NotionAPIWrapper.ts b/server/lib/notion/NotionAPIWrapper.ts index 663fe86a7..4fdd16d4f 100644 --- a/server/lib/notion/NotionAPIWrapper.ts +++ b/server/lib/notion/NotionAPIWrapper.ts @@ -169,13 +169,13 @@ class NotionAPIWrapper { } async getPageTitle( - page: GetPageResponse, + page: GetPageResponse | null, settings: Settings ): Promise { - console.debug(`getPageTitle: ${JSON.stringify(page.id, null, 4)}`); if (!page) { - throw new Error("missing page"); + return ""; } + console.debug(`getPageTitle: ${JSON.stringify(page.id, null, 4)}`); let title = "Untitled: " + new Date(); let icon = ""; diff --git a/server/lib/notion/_mock/MockNotionAPI.ts b/server/lib/notion/_mock/MockNotionAPI.ts new file mode 100644 index 000000000..dca6ca305 --- /dev/null +++ b/server/lib/notion/_mock/MockNotionAPI.ts @@ -0,0 +1,60 @@ +import { + GetBlockResponse, + GetPageResponse, + ListBlockChildrenResponse, + QueryDatabaseResponse, +} from "@notionhq/client/build/src/api-endpoints"; +import NotionAPIWrapper from "../NotionAPIWrapper"; +import dataMockPath from "./helpers/dataMockPath"; +import { mockDataExists } from "./helpers/mockDataExists"; +import getPayload from "./helpers/getPayload"; +import savePayload from "./helpers/savePayload"; + +export default class MockNotionAPI extends NotionAPIWrapper { + async getBlocks( + id: string, + all?: boolean + ): Promise { + if (mockDataExists("ListBlockChildrenResponse", id)) { + console.info("block exists using mock", id); + return getPayload(dataMockPath("ListBlockChildrenResponse", id)); + } + const blocks = await super.getBlocks(id, all); + savePayload(dataMockPath("ListBlockChildrenResponse", id), blocks); + return blocks; + } + + async getPage(id: string): Promise { + if (mockDataExists("GetPageResponse", id)) { + console.info("page exists using mock", id); + return getPayload(dataMockPath("GetPageResponse", id)); + } + const page = await super.getPage(id); + savePayload(dataMockPath("GetPageResponse", id), page); + return page; + } + + async getBlock(id: string): Promise { + if (mockDataExists("GetBlockResponse", id)) { + console.info("block exists using mock", id); + return getPayload(dataMockPath("GetBlockResponse", id)); + } + const block = await super.getBlock(id); + savePayload(dataMockPath("GetBlockResponse", id), block); + return block; + } + + async queryDatabase( + id: string, + all?: boolean + ): Promise { + if (mockDataExists("QueryDatabaseResponse", id)) { + console.info("database exists using mock", id); + return getPayload(dataMockPath("QueryDatabaseResponse", id)); + } + const query = await super.queryDatabase(id, all); + savePayload(dataMockPath("QueryDatabaseResponse", id), query); + return query; + } + // do we need to mock search? +} diff --git a/server/lib/notion/_mock/helpers/MockType.ts b/server/lib/notion/_mock/helpers/MockType.ts new file mode 100644 index 000000000..446d3bf9e --- /dev/null +++ b/server/lib/notion/_mock/helpers/MockType.ts @@ -0,0 +1,6 @@ +export type MockType = + | "ListBlockChildrenResponse" + | "GetPageResponse" + | "GetDatabaseResponse" + | "QueryDatabaseResponse" + | "GetBlockResponse"; diff --git a/server/lib/notion/_mock/helpers/dataMockPath.ts b/server/lib/notion/_mock/helpers/dataMockPath.ts new file mode 100644 index 000000000..412086039 --- /dev/null +++ b/server/lib/notion/_mock/helpers/dataMockPath.ts @@ -0,0 +1,9 @@ +import path from "path"; +import ensureExists from "./ensureExists"; +import { MockType } from "./MockType"; + +export default function dataMockPath(type: MockType, id: string): string { + const dir = path.join(__dirname, `../payloads/${type}`); + ensureExists(dir); + return path.join(dir, `${id}.json`); +} diff --git a/server/lib/notion/_mock/helpers/ensureExists.ts b/server/lib/notion/_mock/helpers/ensureExists.ts new file mode 100644 index 000000000..42bb9bd5e --- /dev/null +++ b/server/lib/notion/_mock/helpers/ensureExists.ts @@ -0,0 +1,8 @@ +import fs from "fs"; + +export default function ensureExists(location: string) { + if (!fs.existsSync(location)) { + console.info("creating: " + location); + fs.mkdirSync(location, { recursive: true }); + } +} diff --git a/server/lib/notion/_mock/helpers/getPayload.ts b/server/lib/notion/_mock/helpers/getPayload.ts new file mode 100644 index 000000000..0c0193d4f --- /dev/null +++ b/server/lib/notion/_mock/helpers/getPayload.ts @@ -0,0 +1,5 @@ +import fs from "fs"; + +export default function getPayload(path: string): any { + return JSON.parse(fs.readFileSync(path).toString()); +} diff --git a/server/lib/notion/_mock/helpers/mockDataExists.ts b/server/lib/notion/_mock/helpers/mockDataExists.ts new file mode 100644 index 000000000..0104bdd73 --- /dev/null +++ b/server/lib/notion/_mock/helpers/mockDataExists.ts @@ -0,0 +1,9 @@ +import fs from "fs"; + +import dataMockPath from "./dataMockPath"; +import { MockType } from "./MockType"; + +export function mockDataExists(type: MockType, id: string) { + const path = dataMockPath(type, id); + return fs.existsSync(path); +} diff --git a/server/lib/notion/_mock/helpers/savePayload.ts b/server/lib/notion/_mock/helpers/savePayload.ts new file mode 100644 index 000000000..ac67437ca --- /dev/null +++ b/server/lib/notion/_mock/helpers/savePayload.ts @@ -0,0 +1,5 @@ +import fs from "fs"; + +export default function savePayload(location: string, payload: any) { + fs.writeFileSync(location, JSON.stringify(payload, null, 4)); +} diff --git a/server/lib/notion/_mock/payloads/GetPageResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json b/server/lib/notion/_mock/payloads/GetPageResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json new file mode 100644 index 000000000..25f19f908 --- /dev/null +++ b/server/lib/notion/_mock/payloads/GetPageResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json @@ -0,0 +1,55 @@ +{ + "object": "page", + "id": "07a7b319-1836-42b9-afec-dcc4c456f73d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2022-04-02T14:32:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "cover": { + "type": "external", + "external": { + "url": "https://images.unsplash.com/photo-1514910574201-c68f4e58cb96?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb&ixid=eyJhcHBfaWQiOjYzOTIxfQ" + } + }, + "icon": { + "type": "emoji", + "emoji": "🧦" + }, + "parent": { + "type": "page_id", + "page_id": "3ce6b147-ac8a-425f-836b-51cc21825b85" + }, + "archived": false, + "properties": { + "title": { + "id": "title", + "type": "title", + "title": [ + { + "type": "text", + "text": { + "content": "HTML test", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "HTML test", + "href": null + } + ] + } + }, + "url": "https://www.notion.so/HTML-test-07a7b319183642b9afecdcc4c456f73d" +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147-ac8a-425f-836b-51cc21825b85.json b/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147-ac8a-425f-836b-51cc21825b85.json new file mode 100644 index 000000000..21a6cde19 --- /dev/null +++ b/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147-ac8a-425f-836b-51cc21825b85.json @@ -0,0 +1,57 @@ +{ + "object": "page", + "id": "3ce6b147-ac8a-425f-836b-51cc21825b85", + "created_time": "2021-05-15T15:08:00.000Z", + "last_edited_time": "2022-04-02T10:29:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "cover": null, + "icon": null, + "parent": { + "type": "database_id", + "database_id": "0bda98d9-cfb7-4a5b-8b61-536f9a68d6ff" + }, + "archived": false, + "properties": { + "Tags": { + "id": "ZVmg", + "type": "multi_select", + "multi_select": [] + }, + "Created": { + "id": "~ySo", + "type": "created_time", + "created_time": "2021-05-15T15:08:00.000Z" + }, + "Name": { + "id": "title", + "type": "title", + "title": [ + { + "type": "text", + "text": { + "content": "Notion API Test Page", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Notion API Test Page", + "href": null + } + ] + } + }, + "url": "https://www.notion.so/Notion-API-Test-Page-3ce6b147ac8a425f836b51cc21825b85" +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147ac8a425f836b51cc21825b85.json b/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147ac8a425f836b51cc21825b85.json new file mode 100644 index 000000000..21a6cde19 --- /dev/null +++ b/server/lib/notion/_mock/payloads/GetPageResponse/3ce6b147ac8a425f836b51cc21825b85.json @@ -0,0 +1,57 @@ +{ + "object": "page", + "id": "3ce6b147-ac8a-425f-836b-51cc21825b85", + "created_time": "2021-05-15T15:08:00.000Z", + "last_edited_time": "2022-04-02T10:29:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "cover": null, + "icon": null, + "parent": { + "type": "database_id", + "database_id": "0bda98d9-cfb7-4a5b-8b61-536f9a68d6ff" + }, + "archived": false, + "properties": { + "Tags": { + "id": "ZVmg", + "type": "multi_select", + "multi_select": [] + }, + "Created": { + "id": "~ySo", + "type": "created_time", + "created_time": "2021-05-15T15:08:00.000Z" + }, + "Name": { + "id": "title", + "type": "title", + "title": [ + { + "type": "text", + "text": { + "content": "Notion API Test Page", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Notion API Test Page", + "href": null + } + ] + } + }, + "url": "https://www.notion.so/Notion-API-Test-Page-3ce6b147ac8a425f836b51cc21825b85" +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json new file mode 100644 index 000000000..4e57b368c --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319-1836-42b9-afec-dcc4c456f73d.json @@ -0,0 +1,1111 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "d27eea37-0d71-4576-b84f-ccfe111c132b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-11-07T18:49:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Basic Cards", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Basic Cards", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "8259c635-589b-4ff0-a0ea-9033582434d4", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "local image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "local image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "34e529b8-4d7c-4aed-9ce8-e6e293a0c37d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T18:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "1/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "1/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Front fdjfdslkfds", + "link": null + }, + "annotations": { + "bold": true, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Front fdjfdslkfds", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "52c96067-1f28-4719-a559-d7ba52982a1a", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T17:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Back ", + "link": null + }, + "annotations": { + "bold": false, + "italic": true, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Back ", + "href": null + }, + { + "type": "text", + "text": { + "content": "https://google.com", + "link": { + "url": "https://google.com" + } + }, + "annotations": { + "bold": true, + "italic": true, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "https://google.com", + "href": "https://google.com" + } + ] + } + }, + { + "object": "block", + "id": "153ca185-6da5-4b1a-82c1-18c97ad34014", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "3/13 - With an image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "3/13 - With an image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "892cf609-3862-4c43-824b-8c0a2cd3d61b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "4/13 - Colored Line", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "4/13 - Colored Line", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "bf4ae913-40b5-4f7f-9400-2e7b2b6ee937", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "5/13 - Multiple images", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "5/13 - Multiple images", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "7f2915ad-2c5e-4674-ace9-e3b9c328c114", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "6/13 - Nested toggle Expanded", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "6/13 - Nested toggle Expanded", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "69eef37f-5527-44a2-a9a7-20ed31f2d0ea", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-12-13T09:14:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Basic Only" + } + }, + { + "object": "block", + "id": "2c134db4-98d9-4a8d-9e51-9a01a78c8b8a", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "divider", + "divider": {} + }, + { + "object": "block", + "id": "6f0593a4-1a4a-463b-93e4-9a7ba88cf217", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Cloze Deletion Cards", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Cloze Deletion Cards", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "0cc20d6b-e48c-481e-bdc7-22011ad81fcb", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T18:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "7/13 - Canberra was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "7/13 - Canberra was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + }, + { + "type": "text", + "text": { + "content": " ewkjlkew", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": " ewkjlkew", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "4742b46f-2987-460c-b2d3-4e63acf39ca5", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "8/13 - Canberra was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "8/13 - Canberra was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "659aad16-0248-4c26-8fcc-205de679a66b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "9/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "9/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Canberra", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Canberra", + "href": null + }, + { + "type": "text", + "text": { + "content": " was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": " was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + }, + { + "type": "text", + "text": { + "content": ".", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": ".", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "2c9e6f8f-25e2-4435-9b14-6743c389a1de", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "10/13 - The capital of Denmark is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "10/13 - The capital of Denmark is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Odense", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Odense", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "65c7915d-627d-4e4a-9ad0-766b89008914", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "More Cloze Deletions Example" + } + }, + { + "object": "block", + "id": "6608504c-7444-425e-860d-6857af6cc638", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Sorting bug", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Sorting bug", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "aaed33a1-b068-4f8c-9de2-8579262ccff1", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "bookmark", + "bookmark": { + "caption": [], + "url": "https://github.com/alemayhu/notion2anki/issues/139" + } + }, + { + "object": "block", + "id": "13ad6043-d016-4833-bcc3-3d2a60ed6dcc", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Order Test" + } + }, + { + "object": "block", + "id": "c6c87d4a-1cb7-4419-ae0f-680a9f8c64b6", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-12-20T09:55:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Order Test HTML" + } + }, + { + "object": "block", + "id": "2ee16b14-11de-4378-85b9-cf9ecdd7e8f1", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Underlines", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Underlines", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "6061ba33-8109-498c-b1c3-ca5e9a290fce", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "The capital of Albania is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "The capital of Albania is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Tirana", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "Tirana", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "3cf8cd10-6524-43e3-a172-29df4e6cd2b3", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "divider", + "divider": {} + }, + { + "object": "block", + "id": "8129cad5-aad3-4714-80a4-adc1d7d044db", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Filter Options", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Filter Options", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "9abf3324-1195-448b-ba00-ce1db10f003d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2 Cherry Basic front 🍒", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2 Cherry Basic front 🍒", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "0eb3c8ec-3e9c-46c0-af3d-651141e97830", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2 Basic Avocado 🥑", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2 Basic Avocado 🥑", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "17b0ff4f-2eca-4886-9cd8-9562d3495cf0", + "created_time": "2021-05-29T18:37:00.000Z", + "last_edited_time": "2021-05-29T18:45:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "TESTO" + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319183642b9afecdcc4c456f73d.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319183642b9afecdcc4c456f73d.json new file mode 100644 index 000000000..4e57b368c --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/07a7b319183642b9afecdcc4c456f73d.json @@ -0,0 +1,1111 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "d27eea37-0d71-4576-b84f-ccfe111c132b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-11-07T18:49:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Basic Cards", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Basic Cards", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "8259c635-589b-4ff0-a0ea-9033582434d4", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "local image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "local image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "34e529b8-4d7c-4aed-9ce8-e6e293a0c37d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T18:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "1/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "1/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Front fdjfdslkfds", + "link": null + }, + "annotations": { + "bold": true, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Front fdjfdslkfds", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "52c96067-1f28-4719-a559-d7ba52982a1a", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T17:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Back ", + "link": null + }, + "annotations": { + "bold": false, + "italic": true, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Back ", + "href": null + }, + { + "type": "text", + "text": { + "content": "https://google.com", + "link": { + "url": "https://google.com" + } + }, + "annotations": { + "bold": true, + "italic": true, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "https://google.com", + "href": "https://google.com" + } + ] + } + }, + { + "object": "block", + "id": "153ca185-6da5-4b1a-82c1-18c97ad34014", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "3/13 - With an image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "3/13 - With an image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "892cf609-3862-4c43-824b-8c0a2cd3d61b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "4/13 - Colored Line", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "4/13 - Colored Line", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "bf4ae913-40b5-4f7f-9400-2e7b2b6ee937", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "5/13 - Multiple images", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "5/13 - Multiple images", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "7f2915ad-2c5e-4674-ace9-e3b9c328c114", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "6/13 - Nested toggle Expanded", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "6/13 - Nested toggle Expanded", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "69eef37f-5527-44a2-a9a7-20ed31f2d0ea", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-12-13T09:14:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Basic Only" + } + }, + { + "object": "block", + "id": "2c134db4-98d9-4a8d-9e51-9a01a78c8b8a", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "divider", + "divider": {} + }, + { + "object": "block", + "id": "6f0593a4-1a4a-463b-93e4-9a7ba88cf217", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Cloze Deletion Cards", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Cloze Deletion Cards", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "0cc20d6b-e48c-481e-bdc7-22011ad81fcb", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T18:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "7/13 - Canberra was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "7/13 - Canberra was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + }, + { + "type": "text", + "text": { + "content": " ewkjlkew", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": " ewkjlkew", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "4742b46f-2987-460c-b2d3-4e63acf39ca5", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "8/13 - Canberra was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "8/13 - Canberra was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "659aad16-0248-4c26-8fcc-205de679a66b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "9/13 - ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "9/13 - ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Canberra", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Canberra", + "href": null + }, + { + "type": "text", + "text": { + "content": " was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": " was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + }, + { + "type": "text", + "text": { + "content": ".", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": ".", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "2c9e6f8f-25e2-4435-9b14-6743c389a1de", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "10/13 - The capital of Denmark is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "10/13 - The capital of Denmark is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Odense", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Odense", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "65c7915d-627d-4e4a-9ad0-766b89008914", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "More Cloze Deletions Example" + } + }, + { + "object": "block", + "id": "6608504c-7444-425e-860d-6857af6cc638", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Sorting bug", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Sorting bug", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "aaed33a1-b068-4f8c-9de2-8579262ccff1", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "bookmark", + "bookmark": { + "caption": [], + "url": "https://github.com/alemayhu/notion2anki/issues/139" + } + }, + { + "object": "block", + "id": "13ad6043-d016-4833-bcc3-3d2a60ed6dcc", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Order Test" + } + }, + { + "object": "block", + "id": "c6c87d4a-1cb7-4419-ae0f-680a9f8c64b6", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-12-20T09:55:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Order Test HTML" + } + }, + { + "object": "block", + "id": "2ee16b14-11de-4378-85b9-cf9ecdd7e8f1", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Underlines", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Underlines", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "6061ba33-8109-498c-b1c3-ca5e9a290fce", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "The capital of Albania is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "The capital of Albania is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Tirana", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "Tirana", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "3cf8cd10-6524-43e3-a172-29df4e6cd2b3", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "divider", + "divider": {} + }, + { + "object": "block", + "id": "8129cad5-aad3-4714-80a4-adc1d7d044db", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Filter Options", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Filter Options", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "9abf3324-1195-448b-ba00-ce1db10f003d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2 Cherry Basic front 🍒", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2 Cherry Basic front 🍒", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "0eb3c8ec-3e9c-46c0-af3d-651141e97830", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2 Basic Avocado 🥑", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2 Basic Avocado 🥑", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "17b0ff4f-2eca-4886-9cd8-9562d3495cf0", + "created_time": "2021-05-29T18:37:00.000Z", + "last_edited_time": "2021-05-29T18:45:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "TESTO" + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0cc20d6b-e48c-481e-bdc7-22011ad81fcb.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0cc20d6b-e48c-481e-bdc7-22011ad81fcb.json new file mode 100644 index 000000000..b9e27bc0c --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0cc20d6b-e48c-481e-bdc7-22011ad81fcb.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "3d92d2eb-0d34-4d49-991f-2583e96ba12f", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-29T18:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Cloze is supported up there ☝🏾 ewkljklewq", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Cloze is supported up there ☝🏾 ewkljklewq", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0eb3c8ec-3e9c-46c0-af3d-651141e97830.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0eb3c8ec-3e9c-46c0-af3d-651141e97830.json new file mode 100644 index 000000000..d4ebd59a9 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/0eb3c8ec-3e9c-46c0-af3d-651141e97830.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "c7fe5d05-39ab-418a-a020-5c04e9c7ee07", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "avocado 1", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "avocado 1", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/153ca185-6da5-4b1a-82c1-18c97ad34014.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/153ca185-6da5-4b1a-82c1-18c97ad34014.json new file mode 100644 index 000000000..5a41ed80b --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/153ca185-6da5-4b1a-82c1-18c97ad34014.json @@ -0,0 +1,32 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "3b8784be-1145-497e-877b-a1c5099dffc6", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "file", + "file": { + "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/e22c5b7a-a8bb-4a0a-b76f-674b5013964f/Skjermbilde_2020-05-13_kl._19.45.08.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220413%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220413T152215Z&X-Amz-Expires=3600&X-Amz-Signature=d32b30549c14f9a140ee112c2f38fea5d843b72e644124e989b89118387d0dc8&X-Amz-SignedHeaders=host&x-id=GetObject", + "expiry_time": "2022-04-13T16:22:15.033Z" + } + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2c9e6f8f-25e2-4435-9b14-6743c389a1de.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2c9e6f8f-25e2-4435-9b14-6743c389a1de.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2c9e6f8f-25e2-4435-9b14-6743c389a1de.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2de8d89f-f695-4544-975c-9eafbfc90fce.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2de8d89f-f695-4544-975c-9eafbfc90fce.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/2de8d89f-f695-4544-975c-9eafbfc90fce.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/321b6f16-c7d4-4e83-9872-c3507ea1b819.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/321b6f16-c7d4-4e83-9872-c3507ea1b819.json new file mode 100644 index 000000000..ebef5664f --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/321b6f16-c7d4-4e83-9872-c3507ea1b819.json @@ -0,0 +1,124 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "db2b7a69-125d-499e-b9d7-d561fdd544ec", + "created_time": "2021-10-13T19:10:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "The back", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "The back", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "d46ff0a8-4ed0-4095-8116-1fa42125ed1b", + "created_time": "2021-10-13T19:09:00.000Z", + "last_edited_time": "2021-10-13T19:09:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "tag a", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": true, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "tag a", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "047d1106-be33-4b50-a754-b894acbb0a44", + "created_time": "2021-10-13T19:09:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "tag b", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": true, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "tag b", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/34e529b8-4d7c-4aed-9ce8-e6e293a0c37d.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/34e529b8-4d7c-4aed-9ce8-e6e293a0c37d.json new file mode 100644 index 000000000..666d87ed4 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/34e529b8-4d7c-4aed-9ce8-e6e293a0c37d.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "593742bb-0ae0-428d-ab5f-2cdf390a1bbe", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This is the backside. In bold font.", + "link": null + }, + "annotations": { + "bold": true, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This is the backside. In bold font.", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/3ce6b147ac8a425f836b51cc21825b85.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/3ce6b147ac8a425f836b51cc21825b85.json new file mode 100644 index 000000000..33d4076de --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/3ce6b147ac8a425f836b51cc21825b85.json @@ -0,0 +1,897 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "05969558-ce56-42a3-9c83-22c670d2131a", + "created_time": "2021-10-13T19:10:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "global tag", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": true, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "global tag", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "e5201f35-c722-40d3-8e3a-5d218e5d80a5", + "created_time": "2021-05-15T19:25:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "1 - This is a basic card", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "1 - This is a basic card", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "79748ddd-f64d-42a9-b095-7854e07f9dd7", + "created_time": "2021-05-15T20:07:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "2 - This is a ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "2 - This is a ", + "href": null + }, + { + "type": "text", + "text": { + "content": "cloze deletion", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "cloze deletion", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "a5445230-bfa9-4bf1-bc35-a706c1d129d1", + "created_time": "2021-05-16T17:16:00.000Z", + "last_edited_time": "2021-10-12T19:23:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "3 - 21 + 21 is #buddy", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "3 - 21 + 21 is #buddy", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "edf76aaa-a7c1-4ba5-bee7-5aec186a6aa0", + "created_time": "2021-07-30T19:54:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "4 - What is going on?", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "4 - What is going on?", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "76f2ab11-7a59-42e8-b912-115cea129848", + "created_time": "2021-05-16T13:19:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "5 - American flag looks like what?", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "5 - American flag looks like what?", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "2de8d89f-f695-4544-975c-9eafbfc90fce", + "created_time": "2021-10-02T19:46:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "6 - 21 + 21 is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "6 - 21 + 21 is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "42", + "link": null + }, + "annotations": { + "bold": true, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "42", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "c9776a23-320e-4122-8f69-77baa0d98cf1", + "created_time": "2021-10-05T19:54:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "7 - 🍒 What is the capital of Albania?", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "7 - 🍒 What is the capital of Albania?", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "8f6d6ac5-a254-45bc-82fe-79b6b8a6fb2b", + "created_time": "2021-10-05T19:54:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "8 - 🍒 The capital of ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "8 - 🍒 The capital of ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Tirana", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Tirana", + "href": null + }, + { + "type": "text", + "text": { + "content": " is ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": " is ", + "href": null + }, + { + "type": "text", + "text": { + "content": "Albania", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "Albania", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "aa13683d-cfa2-4b9f-b797-a2bc7faf6836", + "created_time": "2021-10-06T19:04:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "9 - 🥑 This card should never get created", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "9 - 🥑 This card should never get created", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "78e26e9f-a928-4975-98bc-b491d275ff58", + "created_time": "2021-10-06T19:20:00.000Z", + "last_edited_time": "2021-10-09T19:13:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "10 - Nested Toggle", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "10 - Nested Toggle", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "321b6f16-c7d4-4e83-9872-c3507ea1b819", + "created_time": "2021-10-13T19:09:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This card has three tags", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This card has three tags", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "bc95957e-67ec-46df-8cbc-ae66ec7d2b22", + "created_time": "2021-10-13T19:46:00.000Z", + "last_edited_time": "2021-10-13T19:46:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This card has global tags", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This card has global tags", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "07a7b319-1836-42b9-afec-dcc4c456f73d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2022-04-02T14:32:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "HTML test" + } + }, + { + "object": "block", + "id": "87394ce2-c5b3-45f1-9e6e-79c0c1593ed9", + "created_time": "2021-12-20T13:46:00.000Z", + "last_edited_time": "2021-12-20T13:51:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Local Image x1" + } + }, + { + "object": "block", + "id": "a3d2201c-c7fa-4bcf-8518-016d5a0f9e8b", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [] + } + }, + { + "object": "block", + "id": "05bb5fd7-4b94-4aea-aceb-a1e9e1d13354", + "created_time": "2021-05-16T17:13:00.000Z", + "last_edited_time": "2022-03-06T13:35:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Feature parity with Notion" + } + }, + { + "object": "block", + "id": "c01c6dd8-2cfb-4bbe-8cbf-e66f380a6013", + "created_time": "2021-10-13T19:48:00.000Z", + "last_edited_time": "2021-10-13T19:48:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "global-tag", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": true, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "global-tag", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "1cbfd95f-13f8-4f2f-8847-815b8343d1f5", + "created_time": "2021-10-17T13:02:00.000Z", + "last_edited_time": "2021-10-17T13:02:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_1", + "heading_1": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This is a heading", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This is a heading", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "44225602-1422-407f-a53b-a7e754808182", + "created_time": "2021-10-17T13:02:00.000Z", + "last_edited_time": "2021-10-17T13:02:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_2", + "heading_2": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This is a heading 2", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This is a heading 2", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "e886c8ed-6df8-4c3a-8cb3-d1a0f7248704", + "created_time": "2021-10-17T13:02:00.000Z", + "last_edited_time": "2021-10-17T13:02:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This is a heading 3", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This is a heading 3", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "47902c92-dd0c-41bb-b3d5-c51b184bfe50", + "created_time": "2021-05-29T18:03:00.000Z", + "last_edited_time": "2021-12-20T10:01:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Amazing Notion" + } + }, + { + "object": "block", + "id": "1f4bb743-6600-4b9c-b232-d6bc9e2307b3", + "created_time": "2021-10-17T15:45:00.000Z", + "last_edited_time": "2021-10-17T15:45:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [] + } + }, + { + "object": "block", + "id": "6921b63c-d9e2-4fb7-9cb2-a3b5bd2c661f", + "created_time": "2021-05-16T17:12:00.000Z", + "last_edited_time": "2021-10-17T15:19:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "child_page", + "child_page": { + "title": "Copy of Feature parity with Notion" + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/4742b46f-2987-460c-b2d3-4e63acf39ca5.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/4742b46f-2987-460c-b2d3-4e63acf39ca5.json new file mode 100644 index 000000000..5fce482a7 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/4742b46f-2987-460c-b2d3-4e63acf39ca5.json @@ -0,0 +1,102 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "f9704bc9-abf7-4ce3-9cff-939fd8da1b40", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Canberra was founded in ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Canberra was founded in ", + "href": null + }, + { + "type": "text", + "text": { + "content": "1913", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": true, + "color": "default" + }, + "plain_text": "1913", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "5dfab566-f8d6-4415-b50f-05f9333443b5", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Should hopefully work in the future", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Should hopefully work in the future", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/474a0f78-e156-4699-8061-3e653f50ddf6.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/474a0f78-e156-4699-8061-3e653f50ddf6.json new file mode 100644 index 000000000..d4ea6d348 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/474a0f78-e156-4699-8061-3e653f50ddf6.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "a73419da-94ac-4961-a1d7-607780d4a4df", + "created_time": "2021-10-09T19:14:00.000Z", + "last_edited_time": "2021-10-09T19:14:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "There is more", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "There is more", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/52c96067-1f28-4719-a559-d7ba52982a1a.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/52c96067-1f28-4719-a559-d7ba52982a1a.json new file mode 100644 index 000000000..bdc4fcfc5 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/52c96067-1f28-4719-a559-d7ba52982a1a.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "b5a5527b-ae05-4627-8b3f-1c444a1ec2d9", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Colored", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": true, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Colored", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/53243149-633b-4af0-9f7b-943a93471761.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/53243149-633b-4af0-9f7b-943a93471761.json new file mode 100644 index 000000000..64c9cb07f --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/53243149-633b-4af0-9f7b-943a93471761.json @@ -0,0 +1,32 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "85bc794c-2958-4413-99e4-16fb0eca245a", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "file", + "file": { + "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/002cc36a-7050-4d20-a644-74f3bf1095cc/Screenshot_2021-01-19_at_11.37.42_AM.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220413%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220413T152211Z&X-Amz-Expires=3600&X-Amz-Signature=034d738f055c8ad005142a274dd23de66836a1c4afbf09a03659f64f09f4b0f4&X-Amz-SignedHeaders=host&x-id=GetObject", + "expiry_time": "2022-04-13T16:22:11.179Z" + } + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/6061ba33-8109-498c-b1c3-ca5e9a290fce.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/6061ba33-8109-498c-b1c3-ca5e9a290fce.json new file mode 100644 index 000000000..d18bdb102 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/6061ba33-8109-498c-b1c3-ca5e9a290fce.json @@ -0,0 +1,84 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "708cfd88-43e2-4a11-b859-a841ee7fdf65", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Also using ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Also using ", + "href": null + }, + { + "type": "text", + "text": { + "content": "underline", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "underline", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "61b588c4-2e54-45bf-84ad-4d12240806c3", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/659aad16-0248-4c26-8fcc-205de679a66b.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/659aad16-0248-4c26-8fcc-205de679a66b.json new file mode 100644 index 000000000..66be80ff5 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/659aad16-0248-4c26-8fcc-205de679a66b.json @@ -0,0 +1,31 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "bfae1a55-7237-4512-97e2-fd8aa3c7c3a7", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "external", + "external": { + "url": "https://images.unsplash.com/photo-1510546020578-a35ae9fcfb0f?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb" + } + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/76f2ab11-7a59-42e8-b912-115cea129848.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/76f2ab11-7a59-42e8-b912-115cea129848.json new file mode 100644 index 000000000..0346dc7bd --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/76f2ab11-7a59-42e8-b912-115cea129848.json @@ -0,0 +1,148 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "37ba774b-3892-4f7c-8149-29e9aacee36d", + "created_time": "2021-07-30T19:53:00.000Z", + "last_edited_time": "2021-07-30T19:54:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "come on", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "come on", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "dcd150a8-3838-44ab-a557-f5f36e57fe9f", + "created_time": "2021-07-30T19:53:00.000Z", + "last_edited_time": "2021-07-30T19:53:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Why cant I see an image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Why cant I see an image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "56f93f57-6ad0-4462-82a4-fcdc96aa1182", + "created_time": "2021-07-30T19:53:00.000Z", + "last_edited_time": "2021-07-30T19:53:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Why no image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Why no image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "96b9ca2d-62ea-444f-89f7-e88bbd6e2e83", + "created_time": "2021-07-30T19:50:00.000Z", + "last_edited_time": "2021-07-30T19:50:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "external", + "external": { + "url": "https://images.unsplash.com/photo-1498174979972-c9de7e6a93d6?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb" + } + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/78e26e9f-a928-4975-98bc-b491d275ff58.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/78e26e9f-a928-4975-98bc-b491d275ff58.json new file mode 100644 index 000000000..2bd591d6a --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/78e26e9f-a928-4975-98bc-b491d275ff58.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "474a0f78-e156-4699-8061-3e653f50ddf6", + "created_time": "2021-10-06T19:20:00.000Z", + "last_edited_time": "2021-10-09T19:14:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Toggle Mode", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Toggle Mode", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/79748ddd-f64d-42a9-b095-7854e07f9dd7.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/79748ddd-f64d-42a9-b095-7854e07f9dd7.json new file mode 100644 index 000000000..cd7c575f1 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/79748ddd-f64d-42a9-b095-7854e07f9dd7.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "34be35bd-db68-4588-85d9-e1adc84c45a5", + "created_time": "2021-05-16T16:50:00.000Z", + "last_edited_time": "2021-05-16T16:50:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Extra", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Extra", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f2915ad-2c5e-4674-ace9-e3b9c328c114.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f2915ad-2c5e-4674-ace9-e3b9c328c114.json new file mode 100644 index 000000000..9381daeed --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f2915ad-2c5e-4674-ace9-e3b9c328c114.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "7f63c20d-04c9-4988-aa47-798d6c9d5a0d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "A is open", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "A is open", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f63c20d-04c9-4988-aa47-798d6c9d5a0d.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f63c20d-04c9-4988-aa47-798d6c9d5a0d.json new file mode 100644 index 000000000..8b6a113f7 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/7f63c20d-04c9-4988-aa47-798d6c9d5a0d.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "ffa9d652-e55d-4bad-9a1a-6aa31323ef81", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "B is inside", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "B is inside", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8259c635-589b-4ff0-a0ea-9033582434d4.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8259c635-589b-4ff0-a0ea-9033582434d4.json new file mode 100644 index 000000000..5f988b96e --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8259c635-589b-4ff0-a0ea-9033582434d4.json @@ -0,0 +1,144 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "75d95ceb-e822-4d06-a822-ae7969317e42", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Below is a ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Below is a ", + "href": null + }, + { + "type": "text", + "text": { + "content": "image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "7cad9f2e-7ed4-4c41-8ee1-bfa303571fdf", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "file", + "file": { + "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/4b0d0b1a-fc16-47af-9df1-a803ffb7f986/Screenshot_2021-01-16_at_12.05.58_AM.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220413%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220413T152209Z&X-Amz-Expires=3600&X-Amz-Signature=dc64d3557f48c6639b122c83d6ab5fc61195640965da2ea94096f40a2a24b164&X-Amz-SignedHeaders=host&x-id=GetObject", + "expiry_time": "2022-04-13T16:22:09.316Z" + } + } + }, + { + "object": "block", + "id": "53243149-633b-4af0-9f7b-943a93471761", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": true, + "archived": false, + "type": "toggle", + "toggle": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Below is a another ", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Below is a another ", + "href": null + }, + { + "type": "text", + "text": { + "content": "image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": true, + "code": false, + "color": "default" + }, + "plain_text": "image", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/85bc794c-2958-4413-99e4-16fb0eca245a.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/85bc794c-2958-4413-99e4-16fb0eca245a.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/85bc794c-2958-4413-99e4-16fb0eca245a.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/892cf609-3862-4c43-824b-8c0a2cd3d61b.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/892cf609-3862-4c43-824b-8c0a2cd3d61b.json new file mode 100644 index 000000000..9e089945e --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/892cf609-3862-4c43-824b-8c0a2cd3d61b.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "4fca5311-d041-4ef1-808c-c72466777da1", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "brown_background", + "text": [ + { + "type": "text", + "text": { + "content": "This has a background of brown!", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This has a background of brown!", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8f6d6ac5-a254-45bc-82fe-79b6b8a6fb2b.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8f6d6ac5-a254-45bc-82fe-79b6b8a6fb2b.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/8f6d6ac5-a254-45bc-82fe-79b6b8a6fb2b.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/9abf3324-1195-448b-ba00-ce1db10f003d.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/9abf3324-1195-448b-ba00-ce1db10f003d.json new file mode 100644 index 000000000..3ffdb75f6 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/9abf3324-1195-448b-ba00-ce1db10f003d.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "028f8b92-3211-47f4-82b4-e655ca7a664c", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Cherry basic back", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Cherry basic back", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a5445230-bfa9-4bf1-bc35-a706c1d129d1.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a5445230-bfa9-4bf1-bc35-a706c1d129d1.json new file mode 100644 index 000000000..053381e07 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a5445230-bfa9-4bf1-bc35-a706c1d129d1.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "5bc8d7e8-1b23-4776-bca4-5c069a12bedf", + "created_time": "2021-10-12T19:23:00.000Z", + "last_edited_time": "2021-10-12T19:23:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Testing id", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Testing id", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a73419da-94ac-4961-a1d7-607780d4a4df.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a73419da-94ac-4961-a1d7-607780d4a4df.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/a73419da-94ac-4961-a1d7-607780d4a4df.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/aa13683d-cfa2-4b9f-b797-a2bc7faf6836.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/aa13683d-cfa2-4b9f-b797-a2bc7faf6836.json new file mode 100644 index 000000000..b8208fa89 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/aa13683d-cfa2-4b9f-b797-a2bc7faf6836.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "4b4e4811-f0b8-401d-a708-03ff1305f1e3", + "created_time": "2021-10-06T19:04:00.000Z", + "last_edited_time": "2021-10-06T19:04:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This should be ignored when the option is enabled", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This should be ignored when the option is enabled", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bc95957e-67ec-46df-8cbc-ae66ec7d2b22.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bc95957e-67ec-46df-8cbc-ae66ec7d2b22.json new file mode 100644 index 000000000..9659e4842 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bc95957e-67ec-46df-8cbc-ae66ec7d2b22.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "b32888b6-cda7-441a-96fe-ee28f02172a4", + "created_time": "2021-10-13T19:46:00.000Z", + "last_edited_time": "2021-10-13T19:46:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "The back", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "The back", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bf4ae913-40b5-4f7f-9400-2e7b2b6ee937.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bf4ae913-40b5-4f7f-9400-2e7b2b6ee937.json new file mode 100644 index 000000000..29fe57e4b --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/bf4ae913-40b5-4f7f-9400-2e7b2b6ee937.json @@ -0,0 +1,135 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "a6de5b71-c7ac-4b9d-868b-bb8d1e7191dc", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "First image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "First image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "d504f461-7da1-40ab-aeec-94dd381b6140", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "file", + "file": { + "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/f900b738-63e6-45c8-81f7-cc0f671a8fd0/images.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220413%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220413T152217Z&X-Amz-Expires=3600&X-Amz-Signature=a38784b9180ca7fd5b342979bcc0752c00a2b7b364a135a2f6b484437794634b&X-Amz-SignedHeaders=host&x-id=GetObject", + "expiry_time": "2022-04-13T16:22:17.664Z" + } + } + }, + { + "object": "block", + "id": "d2a51a07-375d-432e-a5ff-6c715b029b9d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "heading_3", + "heading_3": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Second image", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Second image", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "fa20d415-9096-46d6-9ec1-181f2b792d6d", + "created_time": "2021-05-16T13:57:00.000Z", + "last_edited_time": "2021-05-16T13:57:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "image", + "image": { + "caption": [], + "type": "file", + "file": { + "url": "https://s3.us-west-2.amazonaws.com/secure.notion-static.com/4bdae4e7-119a-4a0b-8382-d1ec60b7765d/61Fbl8PSoBL._AC_SX569_.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220413%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220413T152217Z&X-Amz-Expires=3600&X-Amz-Signature=f057330b10d7a18bd2c79f05fe13f989892d1ad2dcc867e7f67319fa8629cb9e&X-Amz-SignedHeaders=host&x-id=GetObject", + "expiry_time": "2022-04-13T16:22:17.664Z" + } + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/c9776a23-320e-4122-8f69-77baa0d98cf1.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/c9776a23-320e-4122-8f69-77baa0d98cf1.json new file mode 100644 index 000000000..86bae8f59 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/c9776a23-320e-4122-8f69-77baa0d98cf1.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "7a3e51c3-896f-46f6-9e44-3f780f7b83c7", + "created_time": "2021-10-05T19:54:00.000Z", + "last_edited_time": "2021-10-05T19:54:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "Tirana!", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Tirana!", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/e5201f35-c722-40d3-8e3a-5d218e5d80a5.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/e5201f35-c722-40d3-8e3a-5d218e5d80a5.json new file mode 100644 index 000000000..69b6b627a --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/e5201f35-c722-40d3-8e3a-5d218e5d80a5.json @@ -0,0 +1,46 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "f83ce56a-9039-4888-81be-375b19a84790", + "created_time": "2021-05-15T19:25:00.000Z", + "last_edited_time": "2021-10-13T19:10:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [ + { + "type": "text", + "text": { + "content": "This is the back of the card", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "This is the back of the card", + "href": null + } + ] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/edf76aaa-a7c1-4ba5-bee7-5aec186a6aa0.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/edf76aaa-a7c1-4ba5-bee7-5aec186a6aa0.json new file mode 100644 index 000000000..3bddd4509 --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/edf76aaa-a7c1-4ba5-bee7-5aec186a6aa0.json @@ -0,0 +1,71 @@ +{ + "object": "list", + "results": [ + { + "object": "block", + "id": "306b52f3-6fc3-4bb0-ad1b-459bfe843109", + "created_time": "2021-05-16T13:19:00.000Z", + "last_edited_time": "2021-10-09T19:11:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "callout", + "callout": { + "icon": { + "type": "emoji", + "emoji": "💡" + }, + "color": "gray_background", + "text": [ + { + "type": "text", + "text": { + "content": "Username: alexander", + "link": null + }, + "annotations": { + "bold": false, + "italic": false, + "strikethrough": false, + "underline": false, + "code": false, + "color": "default" + }, + "plain_text": "Username: alexander", + "href": null + } + ] + } + }, + { + "object": "block", + "id": "a2f0234b-19b8-4808-b602-e8bd54e578d1", + "created_time": "2021-07-30T19:54:00.000Z", + "last_edited_time": "2021-07-30T19:54:00.000Z", + "created_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "last_edited_by": { + "object": "user", + "id": "1590db54-99fe-467c-a656-be319fe6ca8b" + }, + "has_children": false, + "archived": false, + "type": "paragraph", + "paragraph": { + "color": "default", + "text": [] + } + } + ], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/ffa9d652-e55d-4bad-9a1a-6aa31323ef81.json b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/ffa9d652-e55d-4bad-9a1a-6aa31323ef81.json new file mode 100644 index 000000000..55c1452fc --- /dev/null +++ b/server/lib/notion/_mock/payloads/ListBlockChildrenResponse/ffa9d652-e55d-4bad-9a1a-6aa31323ef81.json @@ -0,0 +1,6 @@ +{ + "object": "list", + "results": [], + "next_cursor": null, + "has_more": false +} \ No newline at end of file diff --git a/server/package.json b/server/package.json index f92ce2a6d..d9c5fe765 100644 --- a/server/package.json +++ b/server/package.json @@ -20,7 +20,8 @@ "dev": " SPACES_DEFAULT_BUCKET_NAME=dev.2anki.net SPACES_ENDPOINT=fra1.digitaloceanspaces.com WORKSPACE_BASE=/tmp/w nodemon --watch '**/*.ts' --exec \"ts-node\" server.ts", "lint": "tslint -e \"node_modules\" -c tslint.json '**/*.ts' '**/*.tsx'", "lint:fix": "tslint --fix -e \"node_modules\" -c tslint.json '**/*.ts' '**/*.tsx'", - "purge-js": "rm `find . -name '*.js'|grep -v node_modules`" + "purge-js": "rm `find . -name '*.js'|grep -v node_modules`", + "test:mock": "FORCE_BUILD=true ts-node lib/notion/_mock/build-mock-data.tsx" }, "repository": { "type": "git",