@stickyculture/lotion / types
- LotionLogLevel
- LotionConfig
- LotionExport
- LotionField
- LotionFieldExport
- LotionImport
- LotionConstructor
- LotionFieldType
- LotionFieldBlocks
- LotionFieldBoolean
- LotionFieldDate
- LotionFieldFiles
- LotionFieldImages
- LotionFieldIndex
- LotionFieldManual
- LotionFieldNumber
- LotionFieldOptions
- LotionFieldRelations
- LotionFieldRichText
- LotionFieldText
- LotionFieldTitle
- LotionFieldUuid
• LotionLogLevel: Object
• LotionConfig: Object
The configuration object expected by the CLI when defined in a lotion.config.js file.
• LotionExport: Object
• LotionField: Object
• LotionFieldExport: Object
• LotionImport: Object
Ƭ 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.
Ƭ LotionFieldType: LotionFieldUuid
| LotionFieldIndex
| LotionFieldTitle
| LotionFieldText
| LotionFieldRichText
| LotionFieldNumber
| LotionFieldBoolean
| LotionFieldDate
| LotionFieldFiles
| LotionFieldImages
| LotionFieldOptions
| LotionFieldRelations
| LotionFieldBlocks
| LotionFieldManual
Ƭ 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
Ƭ 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
Ƭ LotionFieldDate: "date"
Targets "Date" type page properties,
Outputs a SchemaDate
object
Ƭ LotionFieldFiles: "file"
| "files"
Targets "Files & Media" type page properties
Outputs a SchemaFile
or SchemaFile[]
value depending on plurality
See
SchemaFile
Ƭ LotionFieldImages: "image"
| "images"
See
- LotionFieldFiles
- SchemaFile
Ƭ LotionFieldIndex: "index"
Targets "ID" type page properties (unique_id
in Notion API response)
Outputs a SchemaIndex
object
See
SchemaIndex
Ƭ 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
Ƭ LotionFieldNumber: "number"
Targets "Number" type page properties
Outputs a number
value
Ƭ 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
Ƭ LotionFieldRelations: "relation"
| "relations"
Targets "Relation" type page properties
Outputs the relation page id
as string
or string[]
value depending on plurality
Ƭ 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
Ƭ 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
Ƭ 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
Ƭ LotionFieldUuid: "uuid"
Targets the id
of a Notion page
Outputs a string
value
• 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.
• SchemaFile: Object
• SchemaIndex: Object
• SchemaRichText: Object
Ƭ SchemaBlock: SchemaRichText
[]