Composition Objects and Rich Text
Generated from compiled Elixir documentation and native typespecs. Values are immutable; constructors and changes use keyword options.
Slackblocks.Objects.AreaChart
An area chart for a data visualization block.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
series— Adds data series in display order. Series names must be unique. Required.axis_config— Sets the axis categories and labels. Every series needs exactly one point per category. Required.
Types
@type t() :: %Slackblocks.Objects.AreaChart{
axis_config: Slackblocks.Objects.AxisConfig.t(),
series: [Slackblocks.Objects.DataSeries.t()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.AxisConfig
The categories and labels shared by bar, area, and line chart axes.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
categories— Adds axis categories in display order. Labels must be unique. Required.x_label— Sets the horizontal axis label. Optional;nilomits the field.y_label— Sets the vertical axis label. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.AxisConfig{
categories: [binary()],
x_label: binary() | nil,
y_label: binary() | nil
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.BarChart
A bar chart for a data visualization block.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
series— Adds data series in display order. Series names must be unique. Required.axis_config— Sets the axis categories and labels. Every series needs exactly one point per category. Required.
Types
@type t() :: %Slackblocks.Objects.BarChart{
axis_config: Slackblocks.Objects.AxisConfig.t(),
series: [Slackblocks.Objects.DataSeries.t()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.ChartSegment
One labelled segment of a pie chart.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
label— Sets the segment label. Required.value— Sets the segment's size. Must be greater than zero. Required.
Types
@type t() :: %Slackblocks.Objects.ChartSegment{label: binary(), value: number()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.ColumnSettings
Alignment and wrapping settings for one table column.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/table-block
Fields
align— Sets how cell content in the column is aligned. Optional;nilomits the field.is_wrapped— Sets whether long cell content wraps instead of being truncated. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.ColumnSettings{
align: Slackblocks.Types.column_align() | nil,
is_wrapped: boolean() | nil
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options \\ [])
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options \\ [])
@spec new!(keyword()) :: t()
Slackblocks.Objects.Confirmation
A dialog that asks users to confirm an action before it is sent.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/confirmation-dialog-object
Fields
title— Sets the dialog title. Required.text— Sets the explanatory text in the dialog body. Required.confirm— Sets the label of the button that confirms the action. Required.deny— Sets the label of the button that cancels the action. Required.style— Sets the emphasis of the confirm button. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.Confirmation{
confirm: Slackblocks.Objects.PlainText.t(),
deny: Slackblocks.Objects.PlainText.t(),
style: Slackblocks.Types.button_style() | nil,
text: Slackblocks.Types.text(),
title: Slackblocks.Objects.PlainText.t()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.ConversationFilter
Limits which conversations a conversation menu offers.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/conversation-filter-object
Fields
include— Adds conversation types to offer: im, mpim, private, or public. Optional;nilomits the field.exclude_external_shared_channels— Sets whether externally shared channels are excluded. Optional;nilomits the field.exclude_bot_users— Sets whether bot users are excluded. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.ConversationFilter{
exclude_bot_users: boolean() | nil,
exclude_external_shared_channels: boolean() | nil,
include: [binary()] | nil
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.DataPoint
One value of a chart series, keyed by axis category.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
label— Sets the axis category this point belongs to. Required.value— Sets the point's value. Required.
Types
@type t() :: %Slackblocks.Objects.DataPoint{label: binary(), value: number()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.DataSeries
A named series of chart data points.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
name— Sets the series name shown in the legend. Required.data— Adds data points in axis-category order. Required.
Types
@type t() :: %Slackblocks.Objects.DataSeries{data: [Slackblocks.Objects.DataPoint.t()], name: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.DispatchActionConfiguration
Chooses which interactions with an input send a block_actions payload.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/dispatch-action-configuration-object
Fields
trigger_actions_on— Adds the interactions that send a payload: on_enter_pressed or on_character_entered. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.DispatchActionConfiguration{trigger_actions_on: [binary()] | nil}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.FeedbackButton
One button of a feedback buttons element.
Slack reference: https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element
Fields
text— Sets the button label. Required.value— Sets the application-defined value sent in interaction payloads. Required.accessibility_label— Sets the label read by screen readers in place of the visible text. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.FeedbackButton{
accessibility_label: binary() | nil,
text: Slackblocks.Objects.PlainText.t(),
value: binary()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.InputParameter
A named value passed to a workflow trigger.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/trigger-object
Fields
name— Sets the workflow input parameter name. Required.value— Sets the value passed to the workflow input. Required.
Types
@type t() :: %Slackblocks.Objects.InputParameter{name: binary(), value: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.LineChart
A line chart for a data visualization block.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
series— Adds data series in display order. Series names must be unique. Required.axis_config— Sets the axis categories and labels. Every series needs exactly one point per category. Required.
Types
@type t() :: %Slackblocks.Objects.LineChart{
axis_config: Slackblocks.Objects.AxisConfig.t(),
series: [Slackblocks.Objects.DataSeries.t()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.MarkdownText
A mrkdwn text composition object.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/text-object
Fields
text— Sets the mrkdwn-formatted text content. Required.verbatim— Sets whether Slack leaves URLs, mentions, and channel names unlinked. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.MarkdownText{text: binary(), verbatim: boolean() | nil}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.Option
A selectable option for menus, checkboxes, radio buttons, and overflow menus.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/option-object
Fields
text— Sets the option label shown to users. Required.value— Sets the value sent in interaction payloads when this option is chosen. Required.description— Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons. Optional;nilomits the field.url— Sets a URL loaded in the user's browser when an overflow menu option is chosen. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.Option{
description: Slackblocks.Types.text() | nil,
text: Slackblocks.Types.text(),
url: binary() | nil,
value: binary()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.OptionGroup
A labelled group of options in a static select menu.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/option-group-object
Fields
label— Sets the group heading. Required.options— Adds selectable options in display order. Required.
Types
@type t() :: %Slackblocks.Objects.OptionGroup{
label: Slackblocks.Objects.PlainText.t(),
options: [Slackblocks.Objects.Option.t()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.PieChart
A pie chart for a data visualization block.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block
Fields
segments— Adds pie segments in display order. Required.
Types
@type t() :: %Slackblocks.Objects.PieChart{segments: [Slackblocks.Objects.ChartSegment.t()]}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.PlainText
A plain-text composition object.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/text-object
Fields
text— Sets the text content. Required.emoji— Sets whether emoji shortcodes such as 🎉 are rendered as emoji. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.PlainText{emoji: boolean() | nil, text: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.RawNumber
A numeric data table cell with display text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/data-table-block
Fields
value— Sets the numeric value used for sorting. Required.text— Sets the formatted text displayed for the number, such as 1,234.5. Required.
Types
@type t() :: %Slackblocks.Objects.RawNumber{text: binary(), value: number()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.RawText
An unformatted table cell.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/table-block
Fields
text— Sets the cell text. Required.
Types
@type t() :: %Slackblocks.Objects.RawText{text: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.SlackFile
A reference to an image file hosted in Slack.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/slack-file-object
Fields
id— Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL. Optional;nilomits the field.url— Sets the URL of a file hosted in Slack. Cannot be combined with an ID. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.SlackFile{id: binary() | nil, url: binary() | nil}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.SlackIcon
A Slack-provided icon, referenced by name.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/card-block
Fields
name— Sets the name of the Slack-provided icon, such as rocket. Required.
Types
@type t() :: %Slackblocks.Objects.SlackIcon{name: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.Trigger
A link trigger that starts a workflow.
Slack reference: https://docs.slack.dev/reference/block-kit/composition-objects/trigger-object
Fields
url— Sets the link trigger URL. Required.customizable_input_parameters— Adds the input values passed to the workflow's trigger. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.Objects.Trigger{
customizable_input_parameters: [Slackblocks.Objects.InputParameter.t()] | nil,
url: binary()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.UrlSource
A linked source cited by a task card.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/task-card-block
Fields
url— Sets the source URL. Required.text— Sets the source link text. Required.
Types
@type t() :: %Slackblocks.Objects.UrlSource{text: binary(), url: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.Objects.Workflow
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.
Types
@type t() :: %Slackblocks.Objects.Workflow{trigger: Slackblocks.Objects.Trigger.t()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
from_url/2
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()]) ::
{:ok, t()} | {:error, Slackblocks.ValidationError.t()}
from_url!/2
Like from_url/2, raising on invalid input.
from_url!(url, parameters \\ [])
@spec from_url!(binary(), [Slackblocks.Objects.InputParameter.t()]) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Channel
A channel mention inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
channel_id— Sets the ID of the mentioned channel. Required.style— Sets the mention style. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.Channel{
channel_id: binary(),
style: Slackblocks.RichText.Style.t() | nil
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.CodeBlock
A preformatted code block inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
elements— Adds inline rich text elements in display order. Required.border— Sets the width of the left border, in pixels. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.CodeBlock{
border: integer() | nil,
elements: [Slackblocks.Types.rich_text_section_element()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Emoji
An emoji inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
name— Sets the emoji shortcode name, without colons. Required.skin_tone— Sets the emoji skin tone, from 1 to 6. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.Emoji{name: binary(), skin_tone: integer() | nil}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Link
A hyperlink inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
url— Sets the link target. Required.text— Sets the visible link text. Slack shows the URL when omitted. Optional;nilomits the field.style— Sets the visual style. Optional;nilomits the field.unsafe— Sets whether Slack treats the link as unsafe. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.Link{
style: Slackblocks.RichText.Style.t() | nil,
text: binary() | nil,
unsafe: boolean() | nil,
url: binary()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.List
A bulleted or numbered list inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
style— Sets whether the list is bulleted or numbered. Required.elements— Adds list items, one rich text section per item. Required.indent— Sets the list's indentation level. Optional;nilomits the field.offset— Sets the number of items to skip when numbering an ordered list. Optional;nilomits the field.border— Sets the width of the left border, in pixels. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.List{
border: integer() | nil,
elements: [Slackblocks.RichText.Section.t()],
indent: integer() | nil,
offset: integer() | nil,
style: Slackblocks.Types.rich_text_list_style()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Quote
A quotation inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
elements— Adds inline rich text elements in display order. Required.border— Sets the width of the left border, in pixels. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.Quote{
border: integer() | nil,
elements: [Slackblocks.Types.rich_text_section_element()]
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Section
A paragraph of inline rich text elements.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
elements— Adds inline rich text elements in display order. Required.
Types
@type t() :: %Slackblocks.RichText.Section{elements: [Slackblocks.Types.rich_text_section_element()]}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.Style
Optional rich-text flags. Unsupported flags are rejected by their receiving field.
Types
@type t() :: %Slackblocks.RichText.Style{
bold: boolean() | nil,
client_highlight: boolean() | nil,
code: boolean() | nil,
highlight: boolean() | nil,
italic: boolean() | nil,
strike: boolean() | nil,
unlink: boolean() | nil
}
new/1
Constructs boolean style flags; nil omits a flag and false is preserved.
new(options \\ [])
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Like new/1, raising on failure.
new!(options \\ [])
@spec new!(keyword()) :: t()
Slackblocks.RichText.Text
A run of optionally styled text inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
text— Sets the text content. Required.style— Sets the visual style. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.Text{style: Slackblocks.RichText.Style.t() | nil, text: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.User
A user mention inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
user_id— Sets the ID of the mentioned user. Required.style— Sets the visual style. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.User{style: Slackblocks.RichText.Style.t() | nil, user_id: binary()}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()
Slackblocks.RichText.UserGroup
A user group mention inside rich text.
Slack reference: https://docs.slack.dev/reference/block-kit/blocks/rich-text-block
Fields
usergroup_id— Sets the ID of the mentioned user group. Required.style— Sets the visual style. Optional;nilomits the field.
Types
@type t() :: %Slackblocks.RichText.UserGroup{
style: Slackblocks.RichText.Style.t() | nil,
usergroup_id: binary()
}
change/2
Atomically replaces supplied fields; omitted fields retain their values.
change(value, options)
@spec change(
t(),
keyword()
) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
change!/2
Replaces fields or raises Slackblocks.ValidationError.
change!(value, options)
@spec change!(
t(),
keyword()
) :: t()
new/1
Constructs and validates a value. Text conveniences apply to keyword input.
new(options)
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
new!/1
Constructs a value or raises Slackblocks.ValidationError.
new!(options)
@spec new!(keyword()) :: t()