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
| Parameter | Description |
|---|---|
series | Adds data series in display order. Series names must be unique. |
axis_config | Sets the axis categories and labels. Every series needs exactly one point per category. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: AreaChart
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
categories | Adds axis categories in display order. Labels must be unique. |
x_label | Sets the horizontal axis label. |
y_label | Sets the vertical axis label. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: AxisConfig
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
series | Adds data series in display order. Series names must be unique. |
axis_config | Sets the axis categories and labels. Every series needs exactly one point per category. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: BarChart
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
label | Sets the segment label. |
value | Sets the segment's size. Must be greater than zero. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: ChartSegment
| Throws | When |
|---|---|
ValidationError | A 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.
| Constant | Slack value | Meaning |
|---|---|---|
LEFT | :left | Align cell content to the left. |
CENTER | :center | Center cell content. |
RIGHT | :right | Align 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
| Parameter | Description |
|---|---|
align | Sets how cell content in the column is aligned. |
is_wrapped | Sets whether long cell content wraps instead of being truncated. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: ColumnSettings
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
title | Sets the dialog title. |
text | Sets the explanatory text in the dialog body. |
confirm | Sets the label of the button that confirms the action. |
deny | Sets the label of the button that cancels the action. |
style | Sets the emphasis of the confirm button. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: Confirmation
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
include | Adds conversation types to offer: im, mpim, private, or public. |
exclude_external_shared_channels | Sets whether externally shared channels are excluded. |
exclude_bot_users | Sets whether bot users are excluded. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: ConversationFilter
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
label | Sets the axis category this point belongs to. |
value | Sets the point's value. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: DataPoint
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
name | Sets the series name shown in the legend. |
data | Adds data points in axis-category order. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: DataSeries
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
trigger_actions_on | Adds the interactions that send a payload: on_enter_pressed or on_character_entered. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: DispatchActionConfiguration
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
text | Sets the button label. |
value | Sets the application-defined value sent in interaction payloads. |
accessibility_label | Sets the label read by screen readers in place of the visible text. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: FeedbackButton
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
name | Sets the workflow input parameter name. |
value | Sets the value passed to the workflow input. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: InputParameter
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
series | Adds data series in display order. Series names must be unique. |
axis_config | Sets the axis categories and labels. Every series needs exactly one point per category. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: LineChart
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
text | Sets the mrkdwn-formatted text content. |
verbatim | Sets whether Slack leaves URLs, mentions, and channel names unlinked. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: MarkdownText
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
text | Sets the option label shown to users. |
value | Sets the value sent in interaction payloads when this option is chosen. |
description | Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons. |
url | Sets a URL loaded in the user's browser when an overflow menu option is chosen. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: Option
| Throws | When |
|---|---|
ValidationError | A field or cross-field Slack rule fails. |
.[]
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
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
| Parameter | Description |
|---|---|
label | Sets the group heading. |
options | Adds selectable options in display order. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: OptionGroup
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
segments | Adds pie segments in display order. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: PieChart
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
text | Sets the text content. |
emoji | Sets whether emoji shortcodes such as 🎉 are rendered as emoji. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: PlainText
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
value | Sets the numeric value used for sorting. |
text | Sets the formatted text displayed for the number, such as 1,234.5. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RawNumber
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
text | Sets the cell text. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RawText
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
channel_id | Sets the ID of the mentioned channel. |
style | Sets the mention style. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextChannel
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
elements | Adds inline rich text elements in display order. |
border | Sets the width of the left border, in pixels. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextCodeBlock
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
name | Sets the emoji shortcode name, without colons. |
skin_tone | Sets the emoji skin tone, from 1 to 6. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextEmoji
| Throws | When |
|---|---|
ValidationError | A 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
RichTextLink
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
| Parameter | Description |
|---|---|
url | Sets the link target. |
text | Sets the visible link text. Slack shows the URL when omitted. |
style | Sets the visual style. |
unsafe | Sets whether Slack treats the link as unsafe. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextLink
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
style | Sets whether the list is bulleted or numbered. |
elements | Adds list items, one rich text section per item. |
indent | Sets the list's indentation level. |
offset | Sets the number of items to skip when numbering an ordered list. |
border | Sets the width of the left border, in pixels. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextList
| Throws | When |
|---|---|
ValidationError | A 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.
| Constant | Slack value | Meaning |
|---|---|---|
BULLET | :bullet | An unordered, bulleted list. |
ORDERED | :ordered | A 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
| Parameter | Description |
|---|---|
elements | Adds inline rich text elements in display order. |
border | Sets the width of the left border, in pixels. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextQuote
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
elements | Adds inline rich text elements in display order. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextSection
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
bold | Optional style flag. |
client_highlight | Optional style flag. |
code | Optional style flag. |
highlight | Optional style flag. |
italic | Optional style flag. |
strike | Optional style flag. |
unlink | Optional 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?
unlink
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
| Parameter | Description |
|---|---|
text | Sets the text content. |
style | Sets the visual style. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextText
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
user_id | Sets the ID of the mentioned user. |
style | Sets the visual style. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextUser
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
user_group_id | Sets the ID of the mentioned user group. |
style | Sets the visual style. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: RichTextUserGroup
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
id | Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL. |
url | Sets the URL of a file hosted in Slack. Cannot be combined with an ID. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: SlackFile
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
name | Sets the name of the Slack-provided icon, such as rocket. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: SlackIcon
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
url | Sets the link trigger URL. |
customizable_input_parameters | Adds the input values passed to the workflow's trigger. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: Trigger
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
url | Sets the source URL. |
text | Sets the source link text. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: UrlSource
| Throws | When |
|---|---|
ValidationError | A 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
| Parameter | Description |
|---|---|
trigger | Sets the link trigger that starts the workflow. |
additional_fields | JSON-compatible extension fields that do not replace modeled wire keys. |
Returns: Workflow
| Throws | When |
|---|---|
ValidationError | A 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