Code on GitHub Slack Platform Home

@slack/types

Interfaces

Action

Fields

Name Type
action_id string
type string

ActionsBlock

Fields

Name Type
elements (Button | Overflow | Datepicker | Select | RadioButtons | Checkboxes | Action)[]
type 'actions'

AttachmentAction

Fields

Name Type
confirm Confirmation
data_source 'static' | 'channels' | 'conversations' | 'users' | 'external'
id string
min_query_length number
name string
option_groups object
options OptionField[]
selected_options OptionField[]
style 'default' | 'primary' | 'danger'
text string
type 'button' | 'select'
url string
value string

Block

Fields

Name Type
block_id string
type string

Button

Fields

Name Type
confirm Confirm
style 'danger' | 'primary'
text PlainTextElement
type 'button'
url string
value string

CallUserExternal

Fields

Name Type
avatar_url string
display_name string
external_id string

CallUserSlack

Fields

Name Type
slack_id string

ChannelsSelect

Fields

Name Type
confirm Confirm
initial_channel string
placeholder PlainTextElement
type 'channels_select'

Checkboxes

Fields

Name Type
confirm Confirm
initial_options Option[]
options Option[]
type 'checkboxes'

Confirm

Fields

Name Type
confirm PlainTextElement
deny PlainTextElement
style 'primary' | 'danger'
text PlainTextElement | MrkdwnElement
title PlainTextElement

Confirmation

Fields

Name Type
dismiss_text string
ok_text string
text string
title string

ContextBlock

Fields

Name Type
elements (ImageElement | PlainTextElement | MrkdwnElement)[]
type 'context'

ConversationsSelect

Fields

Name Type
confirm Confirm
default_to_current_conversation boolean
filter object
initial_conversation string
placeholder PlainTextElement
response_url_enabled boolean
type 'conversations_select'

Datepicker

Fields

Name Type
confirm Confirm
initial_date string
placeholder PlainTextElement
type 'datepicker'

Dialog

Fields

Name Type
callback_id string
elements object
notify_on_cancel boolean
state string
submit_label string
title string

DividerBlock

Fields

Name Type
type 'divider'

ExternalSelect

Fields

Name Type
confirm Confirm
initial_option Option
min_query_length number
placeholder PlainTextElement
type 'external_select'

FileBlock

Fields

Name Type
external_id string
source string
type 'file'

HeaderBlock

Fields

Name Type
text PlainTextElement
type 'header'

ImageBlock

Fields

Name Type
alt_text string
image_url string
title PlainTextElement
type 'image'

ImageElement

Fields

Name Type
alt_text string
image_url string
type 'image'

InputBlock

Fields

Name Type
element Select | MultiSelect | Datepicker | PlainTextInput | RadioButtons | Checkboxes
hint PlainTextElement
label PlainTextElement
optional boolean
type 'input'

LinkUnfurls

MessageAttachment

Fields

Name Type
actions AttachmentAction[]
author_icon string
author_link string
author_name string
blocks (KnownBlock | Block)[]
callback_id string
color 'good' | 'warning' | 'danger' | string
fallback string
fields object
footer_icon string
footer string
image_url string
mrkdwn_in ('pretext' | 'text' | 'fields')[]
pretext string
text string
thumb_url string
title_link string
title string
ts string

MrkdwnElement

Fields

Name Type
text string
type 'mrkdwn'
verbatim boolean

MultiChannelsSelect

Fields

Name Type
confirm Confirm
initial_channels string[]
max_selected_items number
placeholder PlainTextElement
type 'multi_channels_select'

MultiConversationsSelect

Fields

Name Type
confirm Confirm
default_to_current_conversation boolean
filter object
initial_conversations string[]
max_selected_items number
placeholder PlainTextElement
type 'multi_conversations_select'

MultiExternalSelect

Fields

Name Type
confirm Confirm
initial_options Option[]
max_selected_items number
min_query_length number
placeholder PlainTextElement
type 'multi_external_select'

MultiStaticSelect

Fields

Name Type
confirm Confirm
initial_options Option[]
max_selected_items number
option_groups object
options Option[]
placeholder PlainTextElement
type 'multi_static_select'

MultiUsersSelect

Fields

Name Type
confirm Confirm
initial_users string[]
max_selected_items number
placeholder PlainTextElement
type 'multi_users_select'

Option_2

Fields

Name Type
description PlainTextElement
text PlainTextElement | MrkdwnElement
url string
value string

OptionField

Fields

Name Type
description string
text string
value string

Overflow

Fields

Name Type
confirm Confirm
options Option[]
type 'overflow'

PlainTextElement

Fields

Name Type
emoji boolean
text string
type 'plain_text'

PlainTextInput

Fields

Name Type
initial_value string
max_length number
min_length number
multiline boolean
placeholder PlainTextElement
type 'plain_text_input'

RadioButtons

Fields

Name Type
confirm Confirm
initial_option Option
options Option[]
type 'radio_buttons'

SectionBlock

Fields

Name Type
accessory Button | Overflow | Datepicker | Select | MultiSelect | Action | ImageElement | RadioButtons | Checkboxes
fields (PlainTextElement | MrkdwnElement)[]
text PlainTextElement | MrkdwnElement
type 'section'

SelectOption

Fields

Name Type
label string
value string

StaticSelect

Fields

Name Type
confirm Confirm
initial_option Option
option_groups object
options Option[]
placeholder PlainTextElement
type 'static_select'

UsersSelect

Fields

Name Type
confirm Confirm
initial_user string
placeholder PlainTextElement
type 'users_select'

View

Fields

Name Type
blocks (KnownBlock | Block)[]
callback_id string
clear_on_close boolean
close PlainTextElement
external_id string
notify_on_close boolean
private_metadata string
submit_disabled boolean
submit PlainTextElement
title PlainTextElement
type 'home' | 'modal' | 'workflow_step'

Type Aliases

CallUser

CallUserExternal

One of:

KnownBlock

ContextBlock | ActionsBlock | DividerBlock | SectionBlock | InputBlock | FileBlock | HeaderBlock

One of:

MultiSelect

MultiStaticSelect | MultiConversationsSelect | MultiChannelsSelect | MultiExternalSelect

One of:

Select

StaticSelect | ConversationsSelect | ChannelsSelect | ExternalSelect

One of: