File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed
packages/types/src/block-kit Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,17 @@ export interface Block {
4444 * {@link https://api.slack.com/reference/block-kit/blocks Blocks reference}.
4545 */
4646export type KnownBlock =
47- | ImageBlock
48- | ContextBlock
4947 | ActionsBlock
48+ | ContextBlock
5049 | DividerBlock
51- | SectionBlock
52- | InputBlock
5350 | FileBlock
5451 | HeaderBlock
55- | VideoBlock
56- | RichTextBlock ;
52+ | ImageBlock
53+ | InputBlock
54+ | MarkdownBlock
55+ | RichTextBlock
56+ | SectionBlock
57+ | VideoBlock ;
5758
5859/**
5960 * A helper union type of all known Blocks as well as the generic {@link Block} interface. A full list of known blocks
@@ -245,6 +246,23 @@ export interface InputBlock extends Block {
245246 dispatch_action ?: boolean ;
246247}
247248
249+ /**
250+ * @description This block can be used with AI apps when you expect a markdown response from an LLM that can get lost in
251+ * translation rendering in Slack. Providing it in a markdown block leaves the translating to Slack to ensure your message
252+ * appears as intended. Note that passing a single block may result in multiple blocks after translation.
253+ * @see {@link https://api.slack.com/reference/block-kit/blocks#markdown Markdown block reference }
254+ */
255+ export interface MarkdownBlock extends Block {
256+ /**
257+ * @description The type of block. For a markdown block, `type` is always `input`.
258+ */
259+ type : 'markdown' ;
260+ /**
261+ * @description The standard markdown-formatted text. Limit 12,000 characters max.
262+ */
263+ text : string ;
264+ }
265+
248266/**
249267 * A helper union type of all Block Elements that can be used in a {@link RichTextBlock}.
250268 * @see {@link https://api.slack.com/reference/block-kit/blocks#rich_text Rich text block reference }.
You can’t perform that action at this time.
0 commit comments