Slackblocks.Objects.Workflow (slackblocks v2.8.0)

View Source

The workflow started by a workflow button.

Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/workflow-object

Fields

  • trigger — Sets the link trigger that starts the workflow. Required.

Summary

Functions

Atomically replaces supplied fields; omitted fields retain their values.

Builds a workflow trigger URL with a list of Slackblocks.Objects.InputParameter values (empty by default).

Like from_url/2, raising on invalid input.

Constructs and validates a value. Text conveniences apply to keyword input.

Constructs a value or raises Slackblocks.ValidationError.

Types

t()

@type t() :: %Slackblocks.Objects.Workflow{trigger: Slackblocks.Objects.Trigger.t()}

Functions

change(value, options)

@spec change(
  t(),
  keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}

Atomically replaces supplied fields; omitted fields retain their values.

change!(value, options)

@spec change!(
  t(),
  keyword()
) :: t()

Replaces fields or raises Slackblocks.ValidationError.

from_url(url, parameters \\ [])

@spec from_url(binary(), [Slackblocks.Objects.InputParameter.t()]) ::
  {:ok, t()} | {:error, Slackblocks.ValidationError.t()}

Builds a workflow trigger URL with a list of Slackblocks.Objects.InputParameter values (empty by default).

from_url!(url, parameters \\ [])

@spec from_url!(binary(), [Slackblocks.Objects.InputParameter.t()]) :: t()

Like from_url/2, raising on invalid input.

new(options)

@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}

Constructs and validates a value. Text conveniences apply to keyword input.

new!(options)

@spec new!(keyword()) :: t()

Constructs a value or raises Slackblocks.ValidationError.