SlackTextBlock#

pydantic model safir.slack.blockkit.SlackTextBlock#

A component of a Slack message with a heading and a text body.

If the formatted output is longer than 3000 characters, it will be truncated to avoid the strict uppper limit imposed by Slack.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "SlackTextBlock",
   "description": "A component of a Slack message with a heading and a text body.\n\nIf the formatted output is longer than 3000 characters, it will be\ntruncated to avoid the strict uppper limit imposed by Slack.",
   "type": "object",
   "properties": {
      "heading": {
         "title": "Heading",
         "type": "string"
      },
      "text": {
         "title": "Text",
         "type": "string"
      }
   },
   "required": [
      "heading",
      "text"
   ]
}

Fields:
field heading: str [Required]#

Heading of the field (shown in bold).

field text: str [Required]#

Text of the field as normal text.

This is always marked as vertabim, so channel mentions or @-mentions of users will not be treated as special.

to_slack()#

Convert to a Slack Block Kit block.

Returns:

A Slack Block Kit block suitable for including in the fields or text section of a blocks element.

Return type:

dict

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.