Skip to Content

Document Schema

Properties

type (optional)

  • Type: string
  • Value: document
  • Default: document
  • Description: Identifies this configuration as a document. While optional due to the default value, including it explicitly helps with YAML validation and clarity.
type: document

description (optional)

  • Type: string
  • Description: A detailed explanation of the document’s purpose, content structure, or use case. Useful for documentation and team collaboration.
description: "Contains the complete order details including items, pricing, and shipping information"

content (optional)

  • Type: any
  • Description: The actual data content of the document. Can be any valid YAML data structure including strings, numbers, objects, arrays, or template expressions.
content: orderId: "ORD-12345" items: - name: "Widget A" quantity: 2 price: 29.99 total: 59.98
content: ${{ myData }}

ui (optional)

  • Type: UI Schema object
  • Description: Defines how the document should be rendered in the Loopstack Studio interface. Contains two sub-properties: form for field rendering configuration, and actions for interactive buttons.

ui.form (optional)

Controls the visual presentation of document fields. Supports the following properties on the form level and on each field:

  • order - Array of field names controlling display order
  • properties - A map of field names to their UI configuration
ui: form: order: - name - description properties: name: title: Name widget: text description: title: Description widget: textarea

ui.actions (optional)

Defines interactive buttons that trigger workflow transitions. Each action is a discriminated union with a type field.

Button action (type: button):

PropertyTypeDescription
type"button"Action type identifier
transitionstringThe workflow transition ID to trigger
widgetstring (optional)Widget type for rendering
enabledWhenstring[] (optional)List of places where this button is enabled
options.labelstring (optional)Button label text
options.positionnumber (optional)Button position order
options.propsobject (optional)Additional rendering properties

Custom action (type: custom):

PropertyTypeDescription
type"custom"Action type identifier
transitionstringThe workflow transition ID to trigger
widgetstring (optional)Widget type for rendering
enabledWhenstring[] (optional)List of places where this action is enabled
options.labelstring (optional)Action label text
options.propsobject (optional)Additional rendering properties
ui: actions: - type: button widget: button transition: submit options: label: 'Submit'

tags (optional)

  • Type: array of strings or template expression
  • Description: Labels to categorize and organize documents. Tags can be static strings or dynamic template expressions that evaluate at runtime. Useful for filtering, searching, and grouping related documents.
tags: - customer-data - processed - high-priority
tags: ${{ args.categories }}

Meta Properties

meta.hidden (optional)

  • Type: boolean or template expression
  • Description: Controls whether the document is visible in the Loopstack Studio interface. When set to true, the document will be hidden from the UI but still accessible programmatically.
meta: hidden: false
meta: hidden: ${{ config.hideInternalDocs }}

meta.mimeType (optional)

  • Type: string or template expression
  • Description: Specifies the MIME type of the document content, which affects how the content is interpreted and displayed.

Supported MIME types:

  • text/plain - Plain text content
  • text/html - HTML formatted content
  • text/css - CSS stylesheets
  • text/xml - XML documents
  • text/markdown - Markdown formatted text
  • application/javascript - JavaScript code
  • application/typescript - TypeScript code
  • application/json - JSON structured data
  • application/xml - XML structured data
  • application/yaml - YAML structured data
meta: mimeType: application/json

meta.invalidate (optional)

  • Type: boolean or template expression
  • Description: When omitted or set to true, the document will be invalidated when the same document is created again in the same workflow. Invalidated documents still exist but will not be shown in the user interface. By default, invalidation is set to true.
meta: invalidate: false

meta.enableAtPlaces (optional)

  • Type: array of strings
  • Description: Specifies a whitelist of places or contexts where this document should be enabled. Only enabled documents can be edited via the interface. Documents are enabled by default at the state/place where they were created.
meta: enableAtPlaces: - dashboard - admin-panel - reports

meta.hideAtPlaces (optional)

  • Type: array of strings
  • Description: Specifies a blacklist of places or contexts where this document should be hidden.
meta: hideAtPlaces: - public-view - guest-dashboard

meta.data (optional)

  • Type: any
  • Description: Arbitrary metadata that can be attached to the document. Can hold any data structure for custom use cases.
meta: data: source: import version: 2

UI Form Element Properties

Each field in ui.form.properties supports the following configuration options:

PropertyTypeDescription
widgetstringThe input widget type (e.g., text, textarea, select)
titlestringDisplay label for the field
labelstringAlternative display label
placeholderstringPlaceholder text for input fields
helpstringHelp text displayed below the field
descriptionsstringAdditional descriptive text
rowsnumberNumber of visible rows (for textarea widgets)
indexnumberOrdering index for the field
inlinebooleanRender the field inline
inputTypestringHTML input type (e.g., email, number)
emptyValueanyDefault value when the field is empty
titleFormatstringFormat string for the field title
hiddenbooleanHide the field from the form
disabledbooleanDisable the field (non-interactive)
readonlybooleanMake the field read-only
collapsedbooleanCollapse array/object fields by default
orderstring[]Display order of nested fields
enumOptionsarray or stringOptions for select/radio widgets (array of { label, value } objects or strings)
addablebooleanAllow adding items (for array fields)
removablebooleanAllow removing items (for array fields)
movablebooleanAllow reordering items (for array fields)
acceptstringAccepted file types (for file upload widgets)
multiplebooleanAllow multiple selections or file uploads
itemsobjectUI configuration for items in array fields
propertiesobjectUI configuration for nested object fields
Last updated on