marianoguerra/slack/blocks does not have a README file
impl Show for BlockParseErrorpub(all) struct AlertBlock {
block_id : String?
text : TextObject?
level : String?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) enum BlockElement {
Button(ButtonElement)
WorkflowButton(WorkflowButtonElement)
Image(ImageElement)
Select(SelectElement)
Picker(PickerElement)
Options(OptionsElement)
PlainTextInput(PlainTextInputElement)
RichTextInput(RichTextInputElement)
Text(TextObject)
Unknown(type_~ : String, raw~ : Json)
} derive(Eq, Debug)pub(all) struct ButtonElement {
text : TextObject?
action_id : String?
url : String?
value : String?
style : String?
confirm : ConfirmationDialogObject?
accessibility_label : String?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct CardBlock {
block_id : String?
hero_image : BlockElement?
icon : BlockElement?
slack_icon : Json?
title : TextObject?
subtitle : TextObject?
body : TextObject?
subtext : TextObject?
actions : Array[BlockElement]?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct ConfirmationDialogObject {
title : TextObject?
text : TextObject?
confirm : TextObject?
deny : TextObject?
style : String?
extra : Map[String, Json]
} derive(Eq, Debug)fn ConfirmationDialogObject::validate(self : ConfirmationDialogObject) -> Unit raise BlockParseErrorfn ConversationFilterObject::new(include_? : Array[String], exclude_external_shared_channels? : Bool, exclude_bot_users? : Bool) -> ConversationFilterObjectpub(all) struct HeaderBlock {
block_id : String?
text : TextObject?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct ImageBlock {
block_id : String?
image_url : String?
slack_file : SlackFileObject?
alt_text : String?
title : TextObject?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct ImageElement {
image_url : String?
slack_file : SlackFileObject?
alt_text : String?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct InputBlock {
block_id : String?
label : TextObject?
element : BlockElement?
hint : TextObject?
optional : Bool?
dispatch_action : Bool?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) enum LayoutBlock {
Section(SectionBlock)
Divider(DividerBlock)
Image(ImageBlock)
Actions(ActionsBlock)
Context(ContextBlock)
Input(InputBlock)
Header(HeaderBlock)
File(FileBlock)
Video(VideoBlock)
Markdown(MarkdownBlock)
RichText(RichTextBlock)
Call(CallBlock)
Alert(AlertBlock)
Card(CardBlock)
Carousel(CarouselBlock)
ContextActions(ContextActionsBlock)
Table(TableBlock)
TaskCard(TaskCardBlock)
ShareShortcut(ShareShortcutBlock)
Unknown(type_~ : String, raw~ : Json)
} derive(Eq, Debug)pub(all) struct OptionGroupObject {
label : TextObject
options : Array[OptionObject]
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct OptionObject {
text : TextObject
value : String?
description : TextObject?
url : String?
extra : Map[String, Json]
} derive(Eq, Debug)fn OptionObject::new(text : TextObject, value? : String, description? : TextObject, url? : String) -> OptionObjectpub(all) struct OptionsElement {
kind : OptionsKind
action_id : String?
options : Array[OptionObject]?
initial_option : OptionObject?
initial_options : Array[OptionObject]?
confirm : ConfirmationDialogObject?
focus_on_load : Bool?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct PickerElement {
kind : PickerKind
action_id : String?
placeholder : TextObject?
confirm : ConfirmationDialogObject?
focus_on_load : Bool?
initial_date : String?
initial_time : String?
initial_date_time : Int?
timezone : String?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct PlainTextInputElement {
action_id : String?
placeholder : TextObject?
initial_value : String?
multiline : Bool?
min_length : Int?
max_length : Int?
dispatch_action_config : DispatchActionConfigObject?
focus_on_load : Bool?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) enum RichTextBlockElement {
Section(elements~ : Array[RichTextItem], extra~ : Map[String, Json])
List(style~ : String?, indent~ : Int?, offset~ : Int?, border~ : Int?, elements~ : Array[RichTextBlockElement], extra~ : Map[String, Json])
Preformatted(border~ : Int?, elements~ : Array[RichTextItem], extra~ : Map[String, Json])
Quote(border~ : Int?, elements~ : Array[RichTextItem], extra~ : Map[String, Json])
Unknown(type_~ : String, raw~ : Json)
} derive(Eq, Debug)pub(all) struct RichTextInputElement {
action_id : String?
placeholder : TextObject?
initial_value : Json?
dispatch_action_config : DispatchActionConfigObject?
focus_on_load : Bool?
min_lines : Int?
max_lines : Int?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) enum RichTextItem {
Text(text~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Link(url~ : String?, text~ : String?, unsafe_~ : Bool?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Emoji(name~ : String?, unicode~ : String?, skin_tone~ : Int?, style~ : RichTextStyle?, extra~ : Map[String, Json])
User(user_id~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
UserGroup(usergroup_id~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Channel(channel_id~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Team(team_id~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Broadcast(range~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Color(value~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Date(timestamp~ : Int?, format~ : String?, url~ : String?, fallback~ : String?, style~ : RichTextStyle?, extra~ : Map[String, Json])
Unknown(type_~ : String, raw~ : Json)
} derive(Eq, Debug)pub(all) struct SectionBlock {
block_id : String?
text : TextObject?
fields : Array[TextObject]?
accessory : BlockElement?
expand : Bool?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct SelectElement {
kind : SelectKind
action_id : String?
placeholder : TextObject?
confirm : ConfirmationDialogObject?
focus_on_load : Bool?
options : Array[OptionObject]?
option_groups : Array[OptionGroupObject]?
initial_option : OptionObject?
initial_options : Array[OptionObject]?
initial_user : String?
initial_users : Array[String]?
initial_conversation : String?
initial_conversations : Array[String]?
initial_channel : String?
initial_channels : Array[String]?
min_query_length : Int?
max_selected_items : Int?
default_to_current_conversation : Bool?
response_url_enabled : Bool?
filter : ConversationFilterObject?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct ShareShortcutBlock {
block_id : String?
function_trigger_id : String?
app_id : String?
is_workflow_app : Bool?
sales_home_workflow_app_type : Int?
app_collaborators : Array[String]?
button_label : String?
title : String?
description : String?
bot_user_id : String?
url : String?
owning_team_id : String?
workflow_id : String?
developer_trace_id : String?
trigger_type : String?
trigger_subtype : String?
share_url : String?
extra : Map[String, Json]
} derive(Eq, Debug)pub(all) struct VideoBlock {
block_id : String?
video_url : String?
thumbnail_url : String?
alt_text : String?
title : TextObject?
title_url : String?
author_name : String?
provider_name : String?
provider_icon_url : String?
description : TextObject?
extra : Map[String, Json]
} derive(Eq, Debug)fn button(text : String, action_id? : String, value? : String, url? : String, style? : String, confirm? : ConfirmationDialogObject, accessibility_label? : String) -> BlockElementfn channels_select(action_id? : String, placeholder? : TextObject, initial_channel? : String, response_url_enabled? : Bool) -> BlockElementfn checkboxes(options : Array[OptionObject], action_id? : String, initial_options? : Array[OptionObject]) -> BlockElementfn confirm(title? : String, text? : String, confirm_label? : String, deny_label? : String, style? : String) -> ConfirmationDialogObjectfn conversations_select(action_id? : String, placeholder? : TextObject, initial_conversation? : String, default_to_current_conversation? : Bool, filter? : ConversationFilterObject, response_url_enabled? : Bool) -> BlockElementfn datepicker(action_id? : String, placeholder? : TextObject, initial_date? : String) -> BlockElementfn external_select(action_id? : String, placeholder? : TextObject, min_query_length? : Int, initial_option? : OptionObject) -> BlockElementfn image(image_url : String, alt_text : String, title? : TextObject, block_id? : String) -> LayoutBlockfn input(label : TextObject, element : BlockElement, hint? : TextObject, optional? : Bool, dispatch_action? : Bool, block_id? : String) -> LayoutBlockfn multi_conversations_select(action_id? : String, placeholder? : TextObject, initial_conversations? : Array[String], default_to_current_conversation? : Bool, filter? : ConversationFilterObject, max_selected_items? : Int) -> BlockElementfn multi_static_select(options : Array[OptionObject], action_id? : String, placeholder? : TextObject, initial_options? : Array[OptionObject], max_selected_items? : Int) -> BlockElementfn multi_users_select(action_id? : String, placeholder? : TextObject, initial_users? : Array[String], max_selected_items? : Int) -> BlockElementfn overflow(options : Array[OptionObject], action_id? : String, confirm? : ConfirmationDialogObject) -> BlockElementfn parse_message_blocks(message : Json, policy? : UnknownPolicy) -> Array[LayoutBlock]? raise BlockParseErrorfn plain_text_input(action_id? : String, placeholder? : TextObject, initial_value? : String, multiline? : Bool, min_length? : Int, max_length? : Int) -> BlockElementfn radio_buttons(options : Array[OptionObject], action_id? : String, initial_option? : OptionObject) -> BlockElementfn section(text? : TextObject, fields? : Array[TextObject], accessory? : BlockElement, block_id? : String, expand? : Bool) -> LayoutBlockfn static_select(options : Array[OptionObject], action_id? : String, placeholder? : TextObject, initial_option? : OptionObject, confirm? : ConfirmationDialogObject) -> BlockElementfn timepicker(action_id? : String, placeholder? : TextObject, initial_time? : String, timezone? : String) -> BlockElementfn users_select(action_id? : String, placeholder? : TextObject, initial_user? : String) -> BlockElementSlack Web API client: typed requests for the core method families, a generic call for the rest, Block Kit, cursor pagination, rate-limit tiers and request-signature verification. No dependencies; runs on every backend.