Skip to content

Latest commit

 

History

History
363 lines (197 loc) · 9.52 KB

types.md

File metadata and controls

363 lines (197 loc) · 9.52 KB

@stickyculture/lotion / types

Module: types

Table of contents

Interfaces

Configuration

Fields

Schema

Configuration

LotionLogLevel: Object

Defined in

src/types.ts:16

LotionConfig: Object

The configuration object expected by the CLI when defined in a lotion.config.js file.

Defined in

src/types.ts:282

LotionExport: Object

Defined in

src/types.ts:273

LotionField: Object

Defined in

src/types.ts:169

LotionFieldExport: Object

Defined in

src/types.ts:203

LotionImport: Object

Defined in

src/types.ts:213

LotionConstructor

Ƭ LotionConstructor: Pick<LotionConfig, "contentDir" | "outputFiles" | "logLevel"> & { basePath?: string ; export?: LotionConfig["export"] & { token: string } ; import: LotionConfig["import"] & { token: string } }

The constructor object expected by the Lotion class when used programmatically.

Defined in

src/types.ts:311


LotionFieldType

Ƭ LotionFieldType: LotionFieldUuid | LotionFieldIndex | LotionFieldTitle | LotionFieldText | LotionFieldRichText | LotionFieldNumber | LotionFieldBoolean | LotionFieldDate | LotionFieldFiles | LotionFieldImages | LotionFieldOptions | LotionFieldRelations | LotionFieldBlocks | LotionFieldManual

Defined in

src/types.ts:150

Fields

LotionFieldBlocks

Ƭ LotionFieldBlocks: "blocks"

Targets the child "Blocks" of a Page object

Outputs a SchemaBlock[] value of all rich text content within the Page

Note: this field type only supports first-level rich text content and will ignore further nested content such as tables or linked pages

See

  • SchemaBlock
  • SchemaRichText

Defined in

src/types.ts:137


LotionFieldBoolean

Ƭ LotionFieldBoolean: "boolean"

Targets "Checkbox" type page properties (checkbox in Notion API response) Can also be used for "Formula" type page properties that output a boolean value

Outputs a boolean value

Defined in

src/types.ts:84


LotionFieldDate

Ƭ LotionFieldDate: "date"

Targets "Date" type page properties,

Outputs a SchemaDate object

Defined in

src/types.ts:92


LotionFieldFiles

Ƭ LotionFieldFiles: "file" | "files"

Targets "Files & Media" type page properties

Outputs a SchemaFile or SchemaFile[] value depending on plurality

See

SchemaFile

Defined in

src/types.ts:101


LotionFieldImages

Ƭ LotionFieldImages: "image" | "images"

See

  • LotionFieldFiles
  • SchemaFile

Defined in

src/types.ts:108


LotionFieldIndex

Ƭ LotionFieldIndex: "index"

Targets "ID" type page properties (unique_id in Notion API response)

Outputs a SchemaIndex object

See

SchemaIndex

Defined in

src/types.ts:38


LotionFieldManual

Ƭ LotionFieldManual: "manual"

Targets any Notion field. When imported, the field will be output as-is from the Notion API. When exported, the field data must be configured to match the Notion API's expected format.

Outputs a BlockObjectRequest value

Defined in

src/types.ts:145


LotionFieldNumber

Ƭ LotionFieldNumber: "number"

Targets "Number" type page properties

Outputs a number value

Defined in

src/types.ts:75


LotionFieldOptions

Ƭ LotionFieldOptions: "option" | "options"

Targets "Select" and "Multi Select" type page properties. Can also be used for comma-separated strings such as those generated by "Formula" type page properties.

Outputs a string or string[] value depending on plurality

Defined in

src/types.ts:117


LotionFieldRelations

Ƭ LotionFieldRelations: "relation" | "relations"

Targets "Relation" type page properties

Outputs the relation page id as string or string[] value depending on plurality

Defined in

src/types.ts:125


LotionFieldRichText

Ƭ LotionFieldRichText: "richText"

Targets "Text" type page properties. Can also be used for "Formula" type page properties that output a string value

Output a SchemaRichText array from the API's rich_text array.

See

SchemaRichText

Defined in

src/types.ts:67


LotionFieldText

Ƭ LotionFieldText: "text"

Targets "Text" type page properties. Can also be used for "Formula" type page properties that output a string value

Output a joined plaintext string from the API's rich_text array

Defined in

src/types.ts:57


LotionFieldTitle

Ƭ LotionFieldTitle: "title"

Targets the "Title" type page property (title in Notion API response)

Ouputs a string value

Note: value is used as an identifier in log output when defined

Defined in

src/types.ts:48


LotionFieldUuid

Ƭ LotionFieldUuid: "uuid"

Targets the id of a Notion page

Outputs a string value

Defined in

src/types.ts:29

Schema

SchemaDate: Object

A date range object in UTC time. The end value may be null if the date is singular or the range is open-ended.

Defined in

src/types.ts:350

SchemaFile: Object

Defined in

src/types.ts:329

SchemaIndex: Object

Defined in

src/types.ts:340

SchemaRichText: Object

Defined in

src/types.ts:320

SchemaBlock

Ƭ SchemaBlock: SchemaRichText[]

Defined in

src/types.ts:358