Durable.Storage.Schemas.PendingInput (Durable v0.1.0-rc)

View Source

Ecto schema for pending input records.

Pending inputs represent human-in-the-loop interactions where a workflow is waiting for user input before continuing.

Summary

Functions

Creates a changeset for cancelling a pending input.

Creates a changeset for inserting a new pending input.

Creates a changeset for completing a pending input with response.

Creates a changeset for timing out a pending input.

Types

input_type()

@type input_type() :: :form | :single_choice | :multi_choice | :free_text | :approval

status()

@type status() :: :pending | :completed | :timeout | :cancelled

t()

@type t() :: %Durable.Storage.Schemas.PendingInput{
  __meta__: term(),
  completed_at: DateTime.t() | nil,
  fields: [map()] | nil,
  foreach_id: integer() | nil,
  foreach_index: integer() | nil,
  id: Ecto.UUID.t(),
  input_name: String.t(),
  input_type: input_type(),
  inserted_at: DateTime.t(),
  metadata: map() | nil,
  on_timeout: :resume | :fail,
  parallel_id: integer() | nil,
  prompt: String.t() | nil,
  response: map() | nil,
  schema: map() | nil,
  status: status(),
  step_name: String.t(),
  timeout_at: DateTime.t() | nil,
  timeout_value: term() | nil,
  updated_at: DateTime.t(),
  workflow: term(),
  workflow_id: Ecto.UUID.t()
}

Functions

cancel_changeset(pending_input)

Creates a changeset for cancelling a pending input.

changeset(pending_input, attrs)

Creates a changeset for inserting a new pending input.

complete_changeset(pending_input, response)

Creates a changeset for completing a pending input with response.

timeout_changeset(pending_input)

Creates a changeset for timing out a pending input.