Components and utilities
Signatures come from GHC; descriptions come from compiled Haddock comments. Import Slackblocks or the defining public module. Checked values encode with Aeson; field records must be built first.
Black
Slack attachment color #000000.
Slackblocks.Helpers.Black :: Slackblocks.Helpers.NamedColor
Blue
Slack attachment color #0000ff.
Slackblocks.Helpers.Blue :: Slackblocks.Helpers.NamedColor
BuilderBlocks
A block list wrapped in a blocks object.
Slackblocks.Helpers.BuilderBlocks ::
[Slackblocks.Models.Block] -> Slackblocks.Helpers.BuilderPayload
BuilderHome
A checked App Home view.
Slackblocks.Helpers.BuilderHome ::
Slackblocks.Models.HomeTabView
-> Slackblocks.Helpers.BuilderPayload
BuilderJSON
An explicit unchecked application object; modeled support does not rely on this escape hatch.
Slackblocks.Helpers.BuilderJSON ::
Data.Map.Strict.Map Data.Text.Text Data.Aeson.Value
-> Slackblocks.Helpers.BuilderPayload
BuilderMessage
A complete checked Web API message.
Slackblocks.Helpers.BuilderMessage ::
Slackblocks.Models.MessagePayload
-> Slackblocks.Helpers.BuilderPayload
BuilderModal
A checked modal view.
Slackblocks.Helpers.BuilderModal ::
Slackblocks.Models.ModalView -> Slackblocks.Helpers.BuilderPayload
BuilderPayload
Explicit Builder input shapes. BuilderJSON is a deliberate opaque-object
escape hatch; it is not validation or typed support for a Block Kit feature.
type Slackblocks.Helpers.BuilderPayload :: *
BuilderResponse
A checked interaction response.
Slackblocks.Helpers.BuilderResponse ::
Slackblocks.Models.MessageResponse
-> Slackblocks.Helpers.BuilderPayload
BuilderWebhook
A checked incoming-webhook payload.
Slackblocks.Helpers.BuilderWebhook ::
Slackblocks.Models.WebhookMessage
-> Slackblocks.Helpers.BuilderPayload
Color
Valid attachment color. Use colorText with an attachment's color field.
type Slackblocks.Helpers.Color :: *
Danger
Slack attachment color danger.
Slackblocks.Helpers.Danger :: Slackblocks.Helpers.NamedColor
Good
Slack attachment color good.
Slackblocks.Helpers.Good :: Slackblocks.Helpers.NamedColor
Green
Slack attachment color #00ff00.
Slackblocks.Helpers.Green :: Slackblocks.Helpers.NamedColor
NamedColor
Named attachment colors, including Slack semantic good, warning and danger values.
type Slackblocks.Helpers.NamedColor :: *
Orange
Slack attachment color #ff8800.
Slackblocks.Helpers.Orange :: Slackblocks.Helpers.NamedColor
PaginatorOptions
Page numbers start at one. Navigation adds up to two blocks; the receiving message or view checks total counts after expansion. No fields encode directly.
Slackblocks.Helpers.PaginatorOptions ::
Data.Text.Text
-> Integer
-> Integer
-> Data.Text.Text
-> Data.Text.Text
-> Bool
-> Maybe Data.Text.Text
-> Slackblocks.Helpers.PaginatorOptions
type Slackblocks.Helpers.PaginatorOptions :: *
Purple
Slack attachment color #8800ff.
Slackblocks.Helpers.Purple :: Slackblocks.Helpers.NamedColor
Red
Slack attachment color #ff0000.
Slackblocks.Helpers.Red :: Slackblocks.Helpers.NamedColor
Warning
Slack attachment color warning.
Slackblocks.Helpers.Warning :: Slackblocks.Helpers.NamedColor
Yellow
Slack attachment color #ffff00.
Slackblocks.Helpers.Yellow :: Slackblocks.Helpers.NamedColor
accordion
Expand checked collapsible sections, preserving their order.
Slackblocks.Helpers.accordion ::
[Slackblocks.Models.ContainerBlock]
-> Slackblocks.Validation.Result [Slackblocks.Models.Block]
accordionSection
Construction input for a collapsible container, initially collapsed. Edit
ordinary container fields, then call buildContainerBlock. No ID is invented.
Slackblocks.Helpers.accordionSection ::
Slackblocks.Models.PlainText
-> [Slackblocks.Models.Block]
-> Slackblocks.Models.ContainerBlockFields
blockKitBuilderURL
Percent-encode UTF-8 JSON and an optional team as a single path segment. Makes no network request; rendering in Slack is a separate acceptance step.
Slackblocks.Helpers.blockKitBuilderURL ::
Slackblocks.Helpers.BuilderPayload
-> Maybe Data.Text.Text -> Data.Text.Text
colorText
Return the exact Slack color string for a checked color.
Slackblocks.Helpers.colorText ::
Slackblocks.Helpers.Color -> Data.Text.Text
hexColor
Six ASCII hexadecimal digits, with optional #. Letter case is preserved.
Slackblocks.Helpers.hexColor ::
Data.Text.Text
-> Slackblocks.Validation.Result Slackblocks.Helpers.Color
namedColor
Resolve a named attachment color without network access.
Slackblocks.Helpers.namedColor ::
Slackblocks.Helpers.NamedColor -> Slackblocks.Helpers.Color
paginate
Select a one-based page, add navigation and optionally its indicator. Reject empty content, invalid page/size and empty action prefix.
Slackblocks.Helpers.paginate ::
Slackblocks.Helpers.PaginatorOptions
-> [Slackblocks.Models.Block]
-> Slackblocks.Validation.Result [Slackblocks.Models.Block]
paginator
Defaults: first page, five content blocks, Previous/Next and page indicator.
Slackblocks.Helpers.paginator ::
Data.Text.Text -> Slackblocks.Helpers.PaginatorOptions
paginatorActionIdPrefix
Nonempty prefix; navigation action IDs append .previous or .next.
Slackblocks.Helpers.paginatorActionIdPrefix ::
Slackblocks.Helpers.PaginatorOptions -> Data.Text.Text
paginatorBlockId
Optional actions-block ID; absent by default.
Slackblocks.Helpers.paginatorBlockId ::
Slackblocks.Helpers.PaginatorOptions -> Maybe Data.Text.Text
paginatorNextText
Next-button label; defaults to Next.
Slackblocks.Helpers.paginatorNextText ::
Slackblocks.Helpers.PaginatorOptions -> Data.Text.Text
paginatorPage
One-based requested page; defaults to 1.
Slackblocks.Helpers.paginatorPage ::
Slackblocks.Helpers.PaginatorOptions -> Integer
paginatorPageSize
Positive number of content blocks per page; defaults to 5.
Slackblocks.Helpers.paginatorPageSize ::
Slackblocks.Helpers.PaginatorOptions -> Integer
paginatorPreviousText
Previous-button label; defaults to Previous.
Slackblocks.Helpers.paginatorPreviousText ::
Slackblocks.Helpers.PaginatorOptions -> Data.Text.Text
paginatorShowPageIndicator
Include a context block with the page number; defaults to True.
Slackblocks.Helpers.paginatorShowPageIndicator ::
Slackblocks.Helpers.PaginatorOptions -> Bool
rgbColor
Construct a lowercase hexadecimal color; each exact integer channel must be in 0..255.
Slackblocks.Helpers.rgbColor ::
Integer
-> Integer
-> Integer
-> Slackblocks.Validation.Result Slackblocks.Helpers.Color
workflowFromURL
Build a workflow's trigger and optional customizable parameters. This does not call Slack or add restrictions beyond the shared trigger contract.
Slackblocks.Helpers.workflowFromURL ::
Data.Text.Text
-> [Slackblocks.Models.InputParameter]
-> Slackblocks.Validation.Result Slackblocks.Models.Workflow