UNPKG

@notionhq/client

Version:

A simple and easy to use client for the Notion API

90 lines 2 kB
"use strict"; // cspell:disable-file // Note: This is a generated file. DO NOT EDIT! Object.defineProperty(exports, "__esModule", { value: true }); exports.appendBlockChildren = exports.listBlockChildren = exports.deleteBlock = exports.updateBlock = exports.getBlock = void 0; /** * Retrieve a block */ exports.getBlock = { method: "get", pathParams: ["block_id"], queryParams: [], bodyParams: [], path: (p) => `blocks/${p.block_id}`, }; /** * Update a block */ exports.updateBlock = { method: "patch", pathParams: ["block_id"], queryParams: [], bodyParams: [ "archived", "embed", "type", "in_trash", "bookmark", "image", "video", "pdf", "file", "audio", "code", "equation", "divider", "breadcrumb", "tab", "table_of_contents", "link_to_page", "table_row", "heading_1", "heading_2", "heading_3", "heading_4", "paragraph", "bulleted_list_item", "numbered_list_item", "quote", "to_do", "toggle", "template", "callout", "synced_block", "table", "column", ], path: (p) => `blocks/${p.block_id}`, }; /** * Delete a block */ exports.deleteBlock = { method: "delete", pathParams: ["block_id"], queryParams: [], bodyParams: [], path: (p) => `blocks/${p.block_id}`, }; /** * Retrieve block children */ exports.listBlockChildren = { method: "get", pathParams: ["block_id"], queryParams: ["start_cursor", "page_size"], bodyParams: [], path: (p) => `blocks/${p.block_id}/children`, }; /** * Append block children */ exports.appendBlockChildren = { method: "patch", pathParams: ["block_id"], queryParams: [], bodyParams: ["after", "children", "position"], path: (p) => `blocks/${p.block_id}/children`, }; //# sourceMappingURL=blocks.js.map