Skip to main content

Composition Objects

This page documents the Ruby API for composition objects. Values use keyword-only construction, validate before freezing, and serialize to Slack JSON.

AreaChart​

An area chart for a data visualization block.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: series, axis_config.

def self.new: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> AreaChart
ParameterDescription
seriesAdds data series in display order. Series names must be unique.
axis_configSets the axis categories and labels. Every series needs exactly one point per category.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: AreaChart

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: AreaChart, AxisConfig, DataSeries

.[]

Keyword-only alias for .new.

def self.[]: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> AreaChart

Returns: AreaChart

Related types: AreaChart, AxisConfig, DataSeries

series​

Adds data series in display order. Series names must be unique. Wire key: series.

def series: () -> Array[DataSeries]

Returns: Array[DataSeries]

Related types: DataSeries

axis_config​

Sets the axis categories and labels. Every series needs exactly one point per category. Wire key: axis_config.

def axis_config: () -> AxisConfig

Returns: AxisConfig

Related types: AxisConfig

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> AreaChart

Returns: AreaChart

Related types: AreaChart

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

AxisConfig​

The categories and labels shared by bar, area, and line chart axes.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: categories.

def self.new: (categories: Array[String], ?x_label: (String)?, ?y_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> AxisConfig
ParameterDescription
categoriesAdds axis categories in display order. Labels must be unique.
x_labelSets the horizontal axis label.
y_labelSets the vertical axis label.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: AxisConfig

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: AxisConfig

.[]​

Keyword-only alias for .new.

def self.[]: (categories: Array[String], ?x_label: (String)?, ?y_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> AxisConfig

Returns: AxisConfig

Related types: AxisConfig

categories​

Adds axis categories in display order. Labels must be unique. Wire key: categories.

def categories: () -> Array[String]

Returns: Array[String]

x_label​

Sets the horizontal axis label. Wire key: x_label.

def x_label: () -> (String)?

Returns: (String)?

y_label​

Sets the vertical axis label. Wire key: y_label.

def y_label: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> AxisConfig

Returns: AxisConfig

Related types: AxisConfig

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

BarChart​

A bar chart for a data visualization block.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: series, axis_config.

def self.new: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> BarChart
ParameterDescription
seriesAdds data series in display order. Series names must be unique.
axis_configSets the axis categories and labels. Every series needs exactly one point per category.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: BarChart

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: AxisConfig, BarChart, DataSeries

.[]​

Keyword-only alias for .new.

def self.[]: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> BarChart

Returns: BarChart

Related types: AxisConfig, BarChart, DataSeries

series​

Adds data series in display order. Series names must be unique. Wire key: series.

def series: () -> Array[DataSeries]

Returns: Array[DataSeries]

Related types: DataSeries

axis_config​

Sets the axis categories and labels. Every series needs exactly one point per category. Wire key: axis_config.

def axis_config: () -> AxisConfig

Returns: AxisConfig

Related types: AxisConfig

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> BarChart

Returns: BarChart

Related types: BarChart

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Chart​

A chart that can be displayed by a data visualization block.

ChartSegment​

One labelled segment of a pie chart.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: label, value.

def self.new: (label: String, value: Integer | Float, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChartSegment
ParameterDescription
labelSets the segment label.
valueSets the segment's size. Must be greater than zero.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ChartSegment

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ChartSegment

.[]​

Keyword-only alias for .new.

def self.[]: (label: String, value: Integer | Float, ?additional_fields: Hash[String | Symbol, untyped]?) -> ChartSegment

Returns: ChartSegment

Related types: ChartSegment

label​

Sets the segment label. Wire key: label.

def label: () -> String

Returns: String

value​

Sets the segment's size. Must be greater than zero. Wire key: value.

def value: () -> Integer | Float

Returns: Integer | Float

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ChartSegment

Returns: ChartSegment

Related types: ChartSegment

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ColumnAlign​

Horizontal alignment for table columns. Pass the wire symbol to constructor keywords.

ConstantSlack valueMeaning
LEFT:leftAlign cell content to the left.
CENTER:centerCenter cell content.
RIGHT:rightAlign cell content to the right.

ColumnSettings​

Alignment and wrapping settings for one table column.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?align: (:left | :center | :right)?, ?is_wrapped: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ColumnSettings
ParameterDescription
alignSets how cell content in the column is aligned.
is_wrappedSets whether long cell content wraps instead of being truncated.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ColumnSettings

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ColumnSettings

.[]​

Keyword-only alias for .new.

def self.[]: (?align: (:left | :center | :right)?, ?is_wrapped: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ColumnSettings

Returns: ColumnSettings

Related types: ColumnSettings

align​

Sets how cell content in the column is aligned. Wire key: align.

def align: () -> (:left | :center | :right)?

Returns: (:left | :center | :right)?

is_wrapped​

Sets whether long cell content wraps instead of being truncated. Wire key: is_wrapped.

def is_wrapped: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ColumnSettings

Returns: ColumnSettings

Related types: ColumnSettings

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Confirmation​

A dialog that asks users to confirm an action before it is sent.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: title, text, confirm, deny.

def self.new: (title: String | PlainText, text: String | Text, confirm: String | PlainText, deny: String | PlainText, ?style: (:primary | :danger)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Confirmation
ParameterDescription
titleSets the dialog title.
textSets the explanatory text in the dialog body.
confirmSets the label of the button that confirms the action.
denySets the label of the button that cancels the action.
styleSets the emphasis of the confirm button.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: Confirmation

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Confirmation, PlainText, Text

.[]​

Keyword-only alias for .new.

def self.[]: (title: String | PlainText, text: String | Text, confirm: String | PlainText, deny: String | PlainText, ?style: (:primary | :danger)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Confirmation

Returns: Confirmation

Related types: Confirmation, PlainText, Text

title​

Sets the dialog title. Wire key: title.

def title: () -> PlainText

Returns: PlainText

Related types: PlainText

text​

Sets the explanatory text in the dialog body. Wire key: text.

def text: () -> Text

Returns: Text

Related types: Text

confirm​

Sets the label of the button that confirms the action. Wire key: confirm.

def confirm: () -> PlainText

Returns: PlainText

Related types: PlainText

deny​

Sets the label of the button that cancels the action. Wire key: deny.

def deny: () -> PlainText

Returns: PlainText

Related types: PlainText

style​

Sets the emphasis of the confirm button. Wire key: style.

def style: () -> (:primary | :danger)?

Returns: (:primary | :danger)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> Confirmation

Returns: Confirmation

Related types: Confirmation

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

ConversationFilter​

Limits which conversations a conversation menu offers.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?include: (Array[String])?, ?exclude_external_shared_channels: (bool)?, ?exclude_bot_users: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationFilter
ParameterDescription
includeAdds conversation types to offer: im, mpim, private, or public.
exclude_external_shared_channelsSets whether externally shared channels are excluded.
exclude_bot_usersSets whether bot users are excluded.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: ConversationFilter

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ConversationFilter

.[]​

Keyword-only alias for .new.

def self.[]: (?include: (Array[String])?, ?exclude_external_shared_channels: (bool)?, ?exclude_bot_users: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> ConversationFilter

Returns: ConversationFilter

Related types: ConversationFilter

include​

Adds conversation types to offer: im, mpim, private, or public. Wire key: include.

def include: () -> (Array[String])?

Returns: (Array[String])?

exclude_external_shared_channels​

Sets whether externally shared channels are excluded. Wire key: exclude_external_shared_channels.

def exclude_external_shared_channels: () -> (bool)?

Returns: (bool)?

exclude_bot_users​

Sets whether bot users are excluded. Wire key: exclude_bot_users.

def exclude_bot_users: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> ConversationFilter

Returns: ConversationFilter

Related types: ConversationFilter

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

DataPoint​

One value of a chart series, keyed by axis category.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: label, value.

def self.new: (label: String, value: Integer | Float, ?additional_fields: Hash[String | Symbol, untyped]?) -> DataPoint
ParameterDescription
labelSets the axis category this point belongs to.
valueSets the point's value.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: DataPoint

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DataPoint

.[]​

Keyword-only alias for .new.

def self.[]: (label: String, value: Integer | Float, ?additional_fields: Hash[String | Symbol, untyped]?) -> DataPoint

Returns: DataPoint

Related types: DataPoint

label​

Sets the axis category this point belongs to. Wire key: label.

def label: () -> String

Returns: String

value​

Sets the point's value. Wire key: value.

def value: () -> Integer | Float

Returns: Integer | Float

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> DataPoint

Returns: DataPoint

Related types: DataPoint

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

DataSeries​

A named series of chart data points.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: name, data.

def self.new: (name: String, data: Array[DataPoint], ?additional_fields: Hash[String | Symbol, untyped]?) -> DataSeries
ParameterDescription
nameSets the series name shown in the legend.
dataAdds data points in axis-category order.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: DataSeries

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DataPoint, DataSeries

.[]​

Keyword-only alias for .new.

def self.[]: (name: String, data: Array[DataPoint], ?additional_fields: Hash[String | Symbol, untyped]?) -> DataSeries

Returns: DataSeries

Related types: DataPoint, DataSeries

name​

Sets the series name shown in the legend. Wire key: name.

def name: () -> String

Returns: String

data​

Adds data points in axis-category order. Wire key: data.

def data: () -> Array[DataPoint]

Returns: Array[DataPoint]

Related types: DataPoint

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> DataSeries

Returns: DataSeries

Related types: DataSeries

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

DispatchActionConfiguration​

Chooses which interactions with an input send a block_actions payload.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?trigger_actions_on: (Array[String])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DispatchActionConfiguration
ParameterDescription
trigger_actions_onAdds the interactions that send a payload: on_enter_pressed or on_character_entered.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: DispatchActionConfiguration

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: DispatchActionConfiguration

.[]​

Keyword-only alias for .new.

def self.[]: (?trigger_actions_on: (Array[String])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> DispatchActionConfiguration

Returns: DispatchActionConfiguration

Related types: DispatchActionConfiguration

trigger_actions_on​

Adds the interactions that send a payload: on_enter_pressed or on_character_entered. Wire key: trigger_actions_on.

def trigger_actions_on: () -> (Array[String])?

Returns: (Array[String])?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> DispatchActionConfiguration

Returns: DispatchActionConfiguration

Related types: DispatchActionConfiguration

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

FeedbackButton​

One button of a feedback buttons element.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text, value.

def self.new: (text: String | PlainText, value: String, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FeedbackButton
ParameterDescription
textSets the button label.
valueSets the application-defined value sent in interaction payloads.
accessibility_labelSets the label read by screen readers in place of the visible text.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: FeedbackButton

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: FeedbackButton, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String | PlainText, value: String, ?accessibility_label: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> FeedbackButton

Returns: FeedbackButton

Related types: FeedbackButton, PlainText

text​

Sets the button label. Wire key: text.

def text: () -> PlainText

Returns: PlainText

Related types: PlainText

value​

Sets the application-defined value sent in interaction payloads. Wire key: value.

def value: () -> String

Returns: String

accessibility_label​

Sets the label read by screen readers in place of the visible text. Wire key: accessibility_label.

def accessibility_label: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> FeedbackButton

Returns: FeedbackButton

Related types: FeedbackButton

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

InputParameter​

A named value passed to a workflow trigger.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: name, value.

def self.new: (name: String, value: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> InputParameter
ParameterDescription
nameSets the workflow input parameter name.
valueSets the value passed to the workflow input.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: InputParameter

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: InputParameter

.[]​

Keyword-only alias for .new.

def self.[]: (name: String, value: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> InputParameter

Returns: InputParameter

Related types: InputParameter

name​

Sets the workflow input parameter name. Wire key: name.

def name: () -> String

Returns: String

value​

Sets the value passed to the workflow input. Wire key: value.

def value: () -> String

Returns: String

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> InputParameter

Returns: InputParameter

Related types: InputParameter

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

LineChart​

A line chart for a data visualization block.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: series, axis_config.

def self.new: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> LineChart
ParameterDescription
seriesAdds data series in display order. Series names must be unique.
axis_configSets the axis categories and labels. Every series needs exactly one point per category.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: LineChart

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: AxisConfig, DataSeries, LineChart

.[]​

Keyword-only alias for .new.

def self.[]: (series: Array[DataSeries], axis_config: AxisConfig, ?additional_fields: Hash[String | Symbol, untyped]?) -> LineChart

Returns: LineChart

Related types: AxisConfig, DataSeries, LineChart

series​

Adds data series in display order. Series names must be unique. Wire key: series.

def series: () -> Array[DataSeries]

Returns: Array[DataSeries]

Related types: DataSeries

axis_config​

Sets the axis categories and labels. Every series needs exactly one point per category. Wire key: axis_config.

def axis_config: () -> AxisConfig

Returns: AxisConfig

Related types: AxisConfig

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> LineChart

Returns: LineChart

Related types: LineChart

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

MarkdownText​

A mrkdwn text composition object.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String, ?verbatim: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> MarkdownText
ParameterDescription
textSets the mrkdwn-formatted text content.
verbatimSets whether Slack leaves URLs, mentions, and channel names unlinked.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: MarkdownText

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: MarkdownText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String, ?verbatim: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> MarkdownText

Returns: MarkdownText

Related types: MarkdownText

text​

Sets the mrkdwn-formatted text content. Wire key: text.

def text: () -> String

Returns: String

verbatim​

Sets whether Slack leaves URLs, mentions, and channel names unlinked. Wire key: verbatim.

def verbatim: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> MarkdownText

Returns: MarkdownText

Related types: MarkdownText

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Option​

A selectable option for menus, checkboxes, radio buttons, and overflow menus.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text, value.

def self.new: (text: String | Text, value: String, ?description: (String | Text)?, ?url: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Option
ParameterDescription
textSets the option label shown to users.
valueSets the value sent in interaction payloads when this option is chosen.
descriptionSets supporting text shown below the label. Only rendered by checkboxes and radio buttons.
urlSets a URL loaded in the user's browser when an overflow menu option is chosen.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: Option

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Option, Text

.[]​

Keyword-only alias for .new.

def self.[]: (text: String | Text, value: String, ?description: (String | Text)?, ?url: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Option

Returns: Option

Related types: Option, Text

text​

Sets the option label shown to users. Wire key: text.

def text: () -> Text

Returns: Text

Related types: Text

value​

Sets the value sent in interaction payloads when this option is chosen. Wire key: value.

def value: () -> String

Returns: String

description​

Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons. Wire key: description.

def description: () -> (Text)?

Returns: (Text)?

Related types: Text

url​

Sets a URL loaded in the user's browser when an overflow menu option is chosen. Wire key: url.

def url: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> Option

Returns: Option

Related types: Option

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

OptionGroup​

A labelled group of options in a static select menu.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: label, options.

def self.new: (label: String | PlainText, options: Array[Option], ?additional_fields: Hash[String | Symbol, untyped]?) -> OptionGroup
ParameterDescription
labelSets the group heading.
optionsAdds selectable options in display order.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: OptionGroup

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Option, OptionGroup, PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (label: String | PlainText, options: Array[Option], ?additional_fields: Hash[String | Symbol, untyped]?) -> OptionGroup

Returns: OptionGroup

Related types: Option, OptionGroup, PlainText

label​

Sets the group heading. Wire key: label.

def label: () -> PlainText

Returns: PlainText

Related types: PlainText

options​

Adds selectable options in display order. Wire key: options.

def options: () -> Array[Option]

Returns: Array[Option]

Related types: Option

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> OptionGroup

Returns: OptionGroup

Related types: OptionGroup

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

PieChart​

A pie chart for a data visualization block.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: segments.

def self.new: (segments: Array[ChartSegment], ?additional_fields: Hash[String | Symbol, untyped]?) -> PieChart
ParameterDescription
segmentsAdds pie segments in display order.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: PieChart

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: ChartSegment, PieChart

.[]​

Keyword-only alias for .new.

def self.[]: (segments: Array[ChartSegment], ?additional_fields: Hash[String | Symbol, untyped]?) -> PieChart

Returns: PieChart

Related types: ChartSegment, PieChart

segments​

Adds pie segments in display order. Wire key: segments.

def segments: () -> Array[ChartSegment]

Returns: Array[ChartSegment]

Related types: ChartSegment

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> PieChart

Returns: PieChart

Related types: PieChart

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

PlainText​

A plain-text composition object.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String, ?emoji: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> PlainText
ParameterDescription
textSets the text content.
emojiSets whether emoji shortcodes such as 🎉 are rendered as emoji.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: PlainText

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: PlainText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String, ?emoji: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> PlainText

Returns: PlainText

Related types: PlainText

text​

Sets the text content. Wire key: text.

def text: () -> String

Returns: String

emoji​

Sets whether emoji shortcodes such as 🎉 are rendered as emoji. Wire key: emoji.

def emoji: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> PlainText

Returns: PlainText

Related types: PlainText

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RawNumber​

A numeric data table cell with display text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: value, text.

def self.new: (value: Integer | Float, text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> RawNumber
ParameterDescription
valueSets the numeric value used for sorting.
textSets the formatted text displayed for the number, such as 1,234.5.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RawNumber

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RawNumber

.[]​

Keyword-only alias for .new.

def self.[]: (value: Integer | Float, text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> RawNumber

Returns: RawNumber

Related types: RawNumber

value​

Sets the numeric value used for sorting. Wire key: value.

def value: () -> Integer | Float

Returns: Integer | Float

text​

Sets the formatted text displayed for the number, such as 1,234.5. Wire key: text.

def text: () -> String

Returns: String

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RawNumber

Returns: RawNumber

Related types: RawNumber

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RawText​

An unformatted table cell.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> RawText
ParameterDescription
textSets the cell text.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RawText

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RawText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> RawText

Returns: RawText

Related types: RawText

text​

Sets the cell text. Wire key: text.

def text: () -> String

Returns: String

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RawText

Returns: RawText

Related types: RawText

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextBlockElement​

A top-level element of a rich text block: a section, list, preformatted block, or quote.

RichTextChannel​

A channel mention inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: channel_id.

def self.new: (channel_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextChannel
ParameterDescription
channel_idSets the ID of the mentioned channel.
styleSets the mention style.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextChannel

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextChannel, RichTextStyle

.[]​

Keyword-only alias for .new.

def self.[]: (channel_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextChannel

Returns: RichTextChannel

Related types: RichTextChannel, RichTextStyle

channel_id​

Sets the ID of the mentioned channel. Wire key: channel_id.

def channel_id: () -> String

Returns: String

style​

Sets the mention style. Wire key: style.

def style: () -> (RichTextStyle)?

Returns: (RichTextStyle)?

Related types: RichTextStyle

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextChannel

Returns: RichTextChannel

Related types: RichTextChannel

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextCodeBlock​

A preformatted code block inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: elements.

def self.new: (elements: Array[RichTextSectionElement], ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextCodeBlock
ParameterDescription
elementsAdds inline rich text elements in display order.
borderSets the width of the left border, in pixels.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextCodeBlock

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextCodeBlock, RichTextSectionElement

.[]​

Keyword-only alias for .new.

def self.[]: (elements: Array[RichTextSectionElement], ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextCodeBlock

Returns: RichTextCodeBlock

Related types: RichTextCodeBlock, RichTextSectionElement

elements​

Adds inline rich text elements in display order. Wire key: elements.

def elements: () -> Array[RichTextSectionElement]

Returns: Array[RichTextSectionElement]

Related types: RichTextSectionElement

border​

Sets the width of the left border, in pixels. Wire key: border.

def border: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextCodeBlock

Returns: RichTextCodeBlock

Related types: RichTextCodeBlock

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextEmoji​

An emoji inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: name.

def self.new: (name: String, ?skin_tone: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextEmoji
ParameterDescription
nameSets the emoji shortcode name, without colons.
skin_toneSets the emoji skin tone, from 1 to 6.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextEmoji

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextEmoji

.[]​

Keyword-only alias for .new.

def self.[]: (name: String, ?skin_tone: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextEmoji

Returns: RichTextEmoji

Related types: RichTextEmoji

name​

Sets the emoji shortcode name, without colons. Wire key: name.

def name: () -> String

Returns: String

skin_tone​

Sets the emoji skin tone, from 1 to 6. Wire key: skin_tone.

def skin_tone: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextEmoji

Returns: RichTextEmoji

Related types: RichTextEmoji

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

A hyperlink inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: url.

def self.new: (url: String, ?text: (String)?, ?style: (RichTextStyle)?, ?unsafe: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextLink
ParameterDescription
urlSets the link target.
textSets the visible link text. Slack shows the URL when omitted.
styleSets the visual style.
unsafeSets whether Slack treats the link as unsafe.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextLink

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextLink, RichTextStyle

.[]​

Keyword-only alias for .new.

def self.[]: (url: String, ?text: (String)?, ?style: (RichTextStyle)?, ?unsafe: (bool)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextLink

Returns: RichTextLink

Related types: RichTextLink, RichTextStyle

url​

Sets the link target. Wire key: url.

def url: () -> String

Returns: String

text​

Sets the visible link text. Slack shows the URL when omitted. Wire key: text.

def text: () -> (String)?

Returns: (String)?

style​

Sets the visual style. Wire key: style.

def style: () -> (RichTextStyle)?

Returns: (RichTextStyle)?

Related types: RichTextStyle

unsafe​

Sets whether Slack treats the link as unsafe. Wire key: unsafe.

def unsafe: () -> (bool)?

Returns: (bool)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextLink

Returns: RichTextLink

Related types: RichTextLink

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextList​

A bulleted or numbered list inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: style, elements.

def self.new: (style: :bullet | :ordered, elements: Array[RichTextSection], ?indent: (Integer)?, ?offset: (Integer)?, ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextList
ParameterDescription
styleSets whether the list is bulleted or numbered.
elementsAdds list items, one rich text section per item.
indentSets the list's indentation level.
offsetSets the number of items to skip when numbering an ordered list.
borderSets the width of the left border, in pixels.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextList

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextList, RichTextSection

.[]​

Keyword-only alias for .new.

def self.[]: (style: :bullet | :ordered, elements: Array[RichTextSection], ?indent: (Integer)?, ?offset: (Integer)?, ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextList

Returns: RichTextList

Related types: RichTextList, RichTextSection

style​

Sets whether the list is bulleted or numbered. Wire key: style.

def style: () -> :bullet | :ordered

Returns: :bullet | :ordered

elements​

Adds list items, one rich text section per item. Wire key: elements.

def elements: () -> Array[RichTextSection]

Returns: Array[RichTextSection]

Related types: RichTextSection

indent​

Sets the list's indentation level. Wire key: indent.

def indent: () -> (Integer)?

Returns: (Integer)?

offset​

Sets the number of items to skip when numbering an ordered list. Wire key: offset.

def offset: () -> (Integer)?

Returns: (Integer)?

border​

Sets the width of the left border, in pixels. Wire key: border.

def border: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextList

Returns: RichTextList

Related types: RichTextList

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextListStyle​

Marker styles for rich text lists. Pass the wire symbol to constructor keywords.

ConstantSlack valueMeaning
BULLET:bulletAn unordered, bulleted list.
ORDERED:orderedA numbered list.

RichTextQuote​

A quotation inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: elements.

def self.new: (elements: Array[RichTextSectionElement], ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextQuote
ParameterDescription
elementsAdds inline rich text elements in display order.
borderSets the width of the left border, in pixels.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextQuote

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextQuote, RichTextSectionElement

.[]​

Keyword-only alias for .new.

def self.[]: (elements: Array[RichTextSectionElement], ?border: (Integer)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextQuote

Returns: RichTextQuote

Related types: RichTextQuote, RichTextSectionElement

elements​

Adds inline rich text elements in display order. Wire key: elements.

def elements: () -> Array[RichTextSectionElement]

Returns: Array[RichTextSectionElement]

Related types: RichTextSectionElement

border​

Sets the width of the left border, in pixels. Wire key: border.

def border: () -> (Integer)?

Returns: (Integer)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextQuote

Returns: RichTextQuote

Related types: RichTextQuote

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextSection​

A paragraph of inline rich text elements.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: elements.

def self.new: (elements: Array[RichTextSectionElement], ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextSection
ParameterDescription
elementsAdds inline rich text elements in display order.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextSection

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextSection, RichTextSectionElement

.[]​

Keyword-only alias for .new.

def self.[]: (elements: Array[RichTextSectionElement], ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextSection

Returns: RichTextSection

Related types: RichTextSection, RichTextSectionElement

elements​

Adds inline rich text elements in display order. Wire key: elements.

def elements: () -> Array[RichTextSectionElement]

Returns: Array[RichTextSectionElement]

Related types: RichTextSectionElement

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextSection

Returns: RichTextSection

Related types: RichTextSection

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextSectionElement​

An inline rich text element: text, a link, an emoji, or a channel, user, or user group mention.

RichTextStyle​

Immutable rich text style flags. The owning rich text element limits which flags may be set.

.new​

Create a style with permitted boolean flags.

def self.new: (?bold: bool?, ?client_highlight: bool?, ?code: bool?, ?highlight: bool?, ?italic: bool?, ?strike: bool?, ?unlink: bool?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextStyle
ParameterDescription
boldOptional style flag.
client_highlightOptional style flag.
codeOptional style flag.
highlightOptional style flag.
italicOptional style flag.
strikeOptional style flag.
unlinkOptional style flag.

Returns: RichTextStyle

Related types: RichTextStyle

.[]​

Keyword-only alias for .new.

def self.[]: (?bold: bool?, ?client_highlight: bool?, ?code: bool?, ?highlight: bool?, ?italic: bool?, ?strike: bool?, ?unlink: bool?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextStyle

Returns: RichTextStyle

Related types: RichTextStyle

bold​

Read the optional style flag.

def bold: () -> bool?

Returns: bool?

client_highlight​

Read the optional style flag.

def client_highlight: () -> bool?

Returns: bool?

code​

Read the optional style flag.

def code: () -> bool?

Returns: bool?

highlight​

Read the optional style flag.

def highlight: () -> bool?

Returns: bool?

italic​

Read the optional style flag.

def italic: () -> bool?

Returns: bool?

strike​

Read the optional style flag.

def strike: () -> bool?

Returns: bool?

Read the optional style flag.

def unlink: () -> bool?

Returns: bool?

additional_fields​

Return frozen extension style fields.

def additional_fields: () -> Hash[String, untyped]

with​

Return a validated style with changed keywords.

def with: (**untyped changes) -> RichTextStyle

Related types: RichTextStyle

to_h​

Return structural style members.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a detached wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Return JSON for this style.

def to_json: (?untyped options) -> String

RichTextText​

A run of optionally styled text inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: text.

def self.new: (text: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextText
ParameterDescription
textSets the text content.
styleSets the visual style.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextText

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextStyle, RichTextText

.[]​

Keyword-only alias for .new.

def self.[]: (text: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextText

Returns: RichTextText

Related types: RichTextStyle, RichTextText

text​

Sets the text content. Wire key: text.

def text: () -> String

Returns: String

style​

Sets the visual style. Wire key: style.

def style: () -> (RichTextStyle)?

Returns: (RichTextStyle)?

Related types: RichTextStyle

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextText

Returns: RichTextText

Related types: RichTextText

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextUser​

A user mention inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: user_id.

def self.new: (user_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextUser
ParameterDescription
user_idSets the ID of the mentioned user.
styleSets the visual style.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextUser

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextStyle, RichTextUser

.[]​

Keyword-only alias for .new.

def self.[]: (user_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextUser

Returns: RichTextUser

Related types: RichTextStyle, RichTextUser

user_id​

Sets the ID of the mentioned user. Wire key: user_id.

def user_id: () -> String

Returns: String

style​

Sets the visual style. Wire key: style.

def style: () -> (RichTextStyle)?

Returns: (RichTextStyle)?

Related types: RichTextStyle

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextUser

Returns: RichTextUser

Related types: RichTextUser

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

RichTextUserGroup​

A user group mention inside rich text.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: user_group_id.

def self.new: (user_group_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextUserGroup
ParameterDescription
user_group_idSets the ID of the mentioned user group.
styleSets the visual style.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: RichTextUserGroup

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: RichTextStyle, RichTextUserGroup

.[]​

Keyword-only alias for .new.

def self.[]: (user_group_id: String, ?style: (RichTextStyle)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> RichTextUserGroup

Returns: RichTextUserGroup

Related types: RichTextStyle, RichTextUserGroup

user_group_id​

Sets the ID of the mentioned user group. Wire key: usergroup_id.

def user_group_id: () -> String

Returns: String

style​

Sets the visual style. Wire key: style.

def style: () -> (RichTextStyle)?

Returns: (RichTextStyle)?

Related types: RichTextStyle

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> RichTextUserGroup

Returns: RichTextUserGroup

Related types: RichTextUserGroup

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

SlackFile​

A reference to an image file hosted in Slack.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments.

def self.new: (?id: (String)?, ?url: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> SlackFile
ParameterDescription
idSets the ID of a file previously uploaded to Slack. Cannot be combined with a URL.
urlSets the URL of a file hosted in Slack. Cannot be combined with an ID.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: SlackFile

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: SlackFile

.[]​

Keyword-only alias for .new.

def self.[]: (?id: (String)?, ?url: (String)?, ?additional_fields: Hash[String | Symbol, untyped]?) -> SlackFile

Returns: SlackFile

Related types: SlackFile

id​

Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL. Wire key: id.

def id: () -> (String)?

Returns: (String)?

url​

Sets the URL of a file hosted in Slack. Cannot be combined with an ID. Wire key: url.

def url: () -> (String)?

Returns: (String)?

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> SlackFile

Returns: SlackFile

Related types: SlackFile

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

SlackIcon​

A Slack-provided icon, referenced by name.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: name.

def self.new: (name: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> SlackIcon
ParameterDescription
nameSets the name of the Slack-provided icon, such as rocket.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: SlackIcon

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: SlackIcon

.[]​

Keyword-only alias for .new.

def self.[]: (name: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> SlackIcon

Returns: SlackIcon

Related types: SlackIcon

name​

Sets the name of the Slack-provided icon, such as rocket. Wire key: name.

def name: () -> String

Returns: String

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> SlackIcon

Returns: SlackIcon

Related types: SlackIcon

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Text​

A Slack text composition object: plain text or mrkdwn.

Trigger​

A link trigger that starts a workflow.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: url.

def self.new: (url: String, ?customizable_input_parameters: (Array[InputParameter])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Trigger
ParameterDescription
urlSets the link trigger URL.
customizable_input_parametersAdds the input values passed to the workflow's trigger.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: Trigger

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: InputParameter, Trigger

.[]​

Keyword-only alias for .new.

def self.[]: (url: String, ?customizable_input_parameters: (Array[InputParameter])?, ?additional_fields: Hash[String | Symbol, untyped]?) -> Trigger

Returns: Trigger

Related types: InputParameter, Trigger

url​

Sets the link trigger URL. Wire key: url.

def url: () -> String

Returns: String

customizable_input_parameters​

Adds the input values passed to the workflow's trigger. Wire key: customizable_input_parameters.

def customizable_input_parameters: () -> (Array[InputParameter])?

Returns: (Array[InputParameter])?

Related types: InputParameter

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> Trigger

Returns: Trigger

Related types: Trigger

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

UrlSource​

A linked source cited by a task card.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: url, text.

def self.new: (url: String, text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> UrlSource
ParameterDescription
urlSets the source URL.
textSets the source link text.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: UrlSource

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: UrlSource

.[]​

Keyword-only alias for .new.

def self.[]: (url: String, text: String, ?additional_fields: Hash[String | Symbol, untyped]?) -> UrlSource

Returns: UrlSource

Related types: UrlSource

url​

Sets the source URL. Wire key: url.

def url: () -> String

Returns: String

text​

Sets the source link text. Wire key: text.

def text: () -> String

Returns: String

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> UrlSource

Returns: UrlSource

Related types: UrlSource

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String

Workflow​

The workflow started by a workflow button.

See the Slack reference.

.new​

Construct an immutable, validated value with keyword arguments. Required keywords: trigger.

def self.new: (trigger: Trigger, ?additional_fields: Hash[String | Symbol, untyped]?) -> Workflow
ParameterDescription
triggerSets the link trigger that starts the workflow.
additional_fieldsJSON-compatible extension fields that do not replace modeled wire keys.

Returns: Workflow

ThrowsWhen
ValidationErrorA field or cross-field Slack rule fails.

Related types: Trigger, Workflow

.[]​

Keyword-only alias for .new.

def self.[]: (trigger: Trigger, ?additional_fields: Hash[String | Symbol, untyped]?) -> Workflow

Returns: Workflow

Related types: Trigger, Workflow

trigger​

Sets the link trigger that starts the workflow. Wire key: trigger.

def trigger: () -> Trigger

Returns: Trigger

Related types: Trigger

additional_fields​

Return frozen extension fields with normalized string keys.

def additional_fields: () -> Hash[String, untyped]

with​

Return a newly validated value with changed keywords.

def with: (**untyped changes) -> Workflow

Returns: Workflow

Related types: Workflow

to_h​

Return structural Ruby members, including additional_fields. Nested members remain frozen.

def to_h: () -> Hash[Symbol, untyped]

as_json​

Return a fresh, detached Slack wire Hash.

def as_json: (?untyped options) -> Hash[String, untyped]

to_json​

Encode the Slack wire payload as JSON.

def to_json: (?untyped options) -> String