All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.slack.api.model.kotlin_extension.block.dsl.LayoutBlockDsl.kt Maven / Gradle / Ivy

There is a newer version: 1.43.0
Show newest version
package com.slack.api.model.kotlin_extension.block.dsl

import com.slack.api.model.kotlin_extension.block.*

// same name with the object + "Dsl" suffix
@BlockLayoutBuilder
interface LayoutBlockDsl {
    /**
     * A section is one of the most flexible blocks available - it can be used as a simple text block, in combination
     * with text fields, or side-by-side with any of the available block elements.
     *
     * @see Section documentation
     */
    fun section(builder: SectionBlockBuilder.() -> Unit)

    /**
     * A header is a plain-text block that displays in a larger, bold font.
     * Use it to delineate between different groups of content in your app's surfaces.
     *
     * @see Header documentation
     */
    fun header(builder: HeaderBlockBuilder.() -> Unit)

    /**
     * A content divider, like an 
, to split up different blocks inside of a message. The divider block is nice * and neat, requiring only a type. * * @see Divider documentation */ fun divider(blockId: String? = null) /** * A block that is used to hold interactive elements. * * @see Actions documentation */ fun actions(builder: ActionsBlockBuilder.() -> Unit) /** * Displays message context, which can include both images and text. * * @see Context documentation */ fun context(builder: ContextBlockBuilder.() -> Unit) /** * Displays a remote file. This implementation uses a type-safe enum for the origin of the file source. * * @see File documentation */ fun file(externalId: String? = null, blockId: String? = null, source: FileSource? = null) /** * Displays a remote file. This implementation uses a string field for the origin of the file source in the * event the type-safe enum is out-of-date. * * @see File documentation */ fun file(externalId: String? = null, blockId: String? = null, source: String? = null) /** * A simple image block, designed to make those cat photos really pop. * * @see Image documentation */ fun image(builder: ImageBlockBuilder.() -> Unit) /** * A block that collects information from users - it can hold a plain-text input element, a select menu element, a multi-select menu element, or a datepicker. * * @see Input documentation * @see Using modals guide */ fun input(builder: InputBlockBuilder.() -> Unit) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy