slackline/api/blocks

This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.

Validate Block Kit payloads (blocks.*).

Types

Identifies blocks.validate in the slackline.Call that validate returns.

pub type Validate

A message payload to validate.

pub type ValidatedMessage {
  ValidatedMessage(
    text: option.Option(String),
    blocks: option.Option(List(block.Block)),
    attachments: option.Option(List(attachment.Attachment)),
  )
}

Constructors

Values

pub fn validate() -> slackline.Call(Validate, Nil)

blocks.validate: Validates blocks, messages, and views Block Kit JSON payloads.

blocks.Validate identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/blocks/validate.

Documented errors: invalid_blocks, invalid_message, invalid_view.

pub fn validated_message_decoder() -> decode.Decoder(
  ValidatedMessage,
)

Decodes ValidatedMessage from json.

pub fn validated_message_to_json(
  it: ValidatedMessage,
) -> json.Json

Encodes ValidatedMessage as json.

✨ Search Document