Squidie.Runs.SpecPreview (squidie v0.3.0)

Copy Markdown View Source

Read-only execution-style preview for a runtime-authored workflow spec.

Preview values are intended for visual editors and host tooling that need to inspect sample payload behavior before publishing or starting a durable run.

Summary

Functions

Converts a spec execution preview to a plain map for JSON encoding.

Types

preview_node()

@type preview_node() :: %{
  id: String.t(),
  step: atom(),
  action: atom() | String.t() | nil,
  status: :completed | :failed | :unsupported | :validation_error,
  input: map(),
  output: map() | nil,
  error: map() | nil,
  debug: map()
}

t()

@type t() :: %Squidie.Runs.SpecPreview{
  definition_version: String.t() | nil,
  errors: [map()],
  nodes: [preview_node()],
  run_id: nil,
  status: :completed | :failed | :blocked | :invalid,
  trigger: atom() | nil,
  workflow: module()
}

Functions

to_map(preview)

@spec to_map(t()) :: map()

Converts a spec execution preview to a plain map for JSON encoding.