cover
constcover:object
Defined in: src/helpers/file.helpers.ts:165
Helpers that create cover image objects.
Type Declaration
Section titled “Type Declaration”external
Section titled “external”external: (
url) =>ExternalRef=externalCover
Create an external cover image object.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”ExternalRef
Example
Section titled “Example”cover.external('https://example.com/banner.jpg')fileUpload
Section titled “fileUpload”fileUpload: (
id) =>FileUploadRef=fileUploadCover
Create a file-upload cover image object.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”FileUploadRef
Example
Section titled “Example”cover.fileUpload('upload-id')Example
Section titled “Example”import { cover } from '@visus-io/notion-sdk-ts';
notion.pages.create({ parent: { page_id: 'page-id' }, cover: cover.external('https://example.com/banner.jpg'), // ...});