Skip to Content
DocumentationReferenceDocument YAML Schema

Document YAML Schema

Document YAML files define how documents are rendered in the Loopstack Studio interface.

Top-Level Properties

type (optional)

type: document

Identifies this configuration as a document. Default: document.

description (optional)

description: 'Contains structured meeting notes with action items'

tags (optional)

Labels for categorizing and filtering documents:

tags: - meeting-notes - processed

ui

Defines how the document renders in the UI.

UI Widgets

Form Widget

ui: widgets: - widget: form options: order: [date, summary, participants, actionItems] properties: date: title: Date summary: title: Summary widget: textarea participants: title: Participants collapsed: true items: title: Participant actionItems: title: Action Items collapsed: true items: title: Action Item actions: - type: button transition: confirm label: 'Confirm'

Form Field Properties

PropertyTypeDescription
widgetstringWidget type (see below)
labelstringField label
titlestringSection title
descriptionstringField description
placeholderstringPlaceholder text
helpstringHelp text below the field
rowsnumberVisible rows (for textarea)
inlinebooleanDisplay field inline
readonlybooleanMake field read-only
hiddenbooleanHide the field
disabledbooleanDisable interaction
collapsedbooleanCollapse arrays/objects by default
fixedbooleanFixed field
orderstring[]Display order of nested fields
enumOptionsarrayOptions for select/radio widgets
itemsobjectUI config for array items
propertiesobjectUI config for nested object fields

Widget Types

WidgetDescription
textSingle-line text input (default)
textareaMulti-line text area
selectDropdown select
radioRadio button group
checkboxCheckbox
switchToggle switch
sliderNumeric slider
code-viewCode editor with syntax highlighting

enumOptions

For select and radio widgets:

language: title: Language widget: select enumOptions: - label: Python value: python - label: JavaScript value: javascript

Or as simple strings:

enumOptions: - python - javascript - java

Actions

Buttons that trigger wait: true transitions:

actions: - type: button transition: confirm # Must match the method name label: 'Confirm' - type: button transition: reject label: 'Reject'

Meta Properties

Meta properties are set via the options parameter of this.documentStore.save():

await this.documentStore.save(MyDocument, content, { id: 'doc-1', meta: { hidden: true, }, });
PropertyTypeDescription
hiddenbooleanHide from the UI
mimeTypestringContent MIME type
enableAtPlacesstring[]Places where the document is editable
hideAtPlacesstring[]Places where the document is hidden
invalidatebooleanMark document as invalidated
levelstringSeverity level: debug, info, warning, error
dataanyArbitrary metadata

Supported MIME Types

text/plain, text/html, text/markdown, text/css, text/xml, application/json, application/javascript, application/typescript, application/yaml, application/xml

Complete Example

type: document description: 'Generated code file' tags: - code - generated ui: widgets: - widget: form options: order: [filename, description, code] properties: filename: title: File Name readonly: true description: title: Description readonly: true widget: textarea code: title: Code widget: code-view actions: - type: button transition: confirm label: 'Accept'
Last updated on