UNPKG

@notionhq/client

Version:

A simple and easy to use client for the Notion API

102 lines 2.29 kB
"use strict"; // cspell:disable-file // Note: This is a generated file. DO NOT EDIT! Object.defineProperty(exports, "__esModule", { value: true }); exports.updatePageMarkdown = exports.getPageMarkdown = exports.getPageProperty = exports.movePage = exports.updatePage = exports.getPage = exports.createPage = void 0; /** * Create a page */ exports.createPage = { method: "post", pathParams: [], queryParams: [], bodyParams: [ "parent", "properties", "icon", "cover", "content", "children", "markdown", "template", "position", ], path: () => `pages`, }; /** * Retrieve a page */ exports.getPage = { method: "get", pathParams: ["page_id"], queryParams: ["filter_properties"], bodyParams: [], path: (p) => `pages/${p.page_id}`, }; /** * Update page */ exports.updatePage = { method: "patch", pathParams: ["page_id"], queryParams: [], bodyParams: [ "archived", "properties", "icon", "cover", "is_locked", "template", "erase_content", "in_trash", "is_archived", ], path: (p) => `pages/${p.page_id}`, }; /** * Move a page */ exports.movePage = { method: "post", pathParams: ["page_id"], queryParams: [], bodyParams: ["parent"], path: (p) => `pages/${p.page_id}/move`, }; /** * Retrieve a page property item */ exports.getPageProperty = { method: "get", pathParams: ["page_id", "property_id"], queryParams: ["start_cursor", "page_size"], bodyParams: [], path: (p) => `pages/${p.page_id}/properties/${p.property_id}`, }; /** * Retrieve a page as markdown */ exports.getPageMarkdown = { method: "get", pathParams: ["page_id"], queryParams: ["include_transcript"], bodyParams: [], path: (p) => `pages/${p.page_id}/markdown`, }; /** * Update a page's content as markdown */ exports.updatePageMarkdown = { method: "patch", pathParams: ["page_id"], queryParams: [], bodyParams: [ "type", "insert_content", "replace_content_range", "update_content", "replace_content", ], path: (p) => `pages/${p.page_id}/markdown`, }; //# sourceMappingURL=pages.js.map