UNPKG

fox-block-builder

Version:

Maintainable code for loop slack-block-kit-like modal builder

197 lines (196 loc) 9.43 kB
import { Builder } from '../lib'; export declare abstract class AsUser extends Builder { /** * @description Sets the message to be sent as either the user whose auth token is being used or as the bot user associated with your app. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ asUser(boolean?: boolean): this; } export declare abstract class ClearOnClose extends Builder { /** * @description Instructs the Slack API to close all open views in the view stack when this particular view is closed. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ clearOnClose(boolean?: boolean): this; } export declare abstract class Danger extends Builder { /** * @description For a button element, this changes the color to red. For confirmation dialogs, this sets the main button in the bottom right corner to red, indicating that an action is potentially destructive. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ danger(boolean?: boolean): this; } export declare abstract class DefaultToCurrentConversation extends Builder { /** * @description Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. * * **Slack Validation Rules and Tips:** * * If initial conversations are provided, this option is ignored. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ defaultToCurrentConversation(boolean?: boolean): this; } export declare abstract class DeleteOriginal extends Builder { /** * @description Instructs the Slack API to delete the message from which the interaction originated when sending the current message. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ deleteOriginal(boolean?: boolean): this; } export declare abstract class DispatchAction extends Builder { /** * @description Instructs the Slack API to send an interaction event to your app when the element in the input block has been interacted with. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ dispatchAction(boolean?: boolean): this; } export declare abstract class DispatchActionOnCharacterEntered extends Builder { /** * @description Instructs the Slack API to dispatch an interaction payload to your app when the user enters or deletes a character in the input. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ dispatchActionOnCharacterEntered(boolean?: boolean): this; } export declare abstract class DispatchActionOnEnterPressed extends Builder { /** * @description Instructs the Slack API to dispatch an interaction payload to your app when the user presses the enter key while the input is in focus. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ dispatchActionOnEnterPressed(boolean?: boolean): this; } export declare abstract class Ephemeral extends Builder { /** * @description Instructs the Slack API to display the message only to the user who invoked the interaction payload or slash command. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ ephemeral(boolean?: boolean): this; } export declare abstract class ExcludeExternalSharedChannels extends Builder { /** * @description Excludes conversations shared with external organizations from the menu's options. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ excludeExternalSharedChannels(boolean?: boolean): this; } export declare abstract class ExcludeBotUsers extends Builder { /** * @description Excludes conversations with bot users from the menu's options. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ excludeBotUsers(boolean?: boolean): this; } export declare abstract class FocusOnLoad extends Builder { /** * @description Sets an element to have auto focus on opening the view * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ focusOnLoad(boolean?: boolean): this; } export declare abstract class IgnoreMarkdown extends Builder { /** * @description Instructs the Slack API to ignore any markdown in the text property of the message. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ ignoreMarkdown(boolean?: boolean): this; } export declare abstract class InChannel extends Builder { /** * @description Instructs the Slack API to make the message visible to everyone in the channel from which the interaction payload or slash command originated. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ inChannel(boolean?: boolean): this; } export declare abstract class Multiline extends Builder { /** * @description Sets the text input to be a larger, multi-line input for larger portions of text. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ multiline(boolean?: boolean): this; } export declare abstract class NotifyOnClose extends Builder { /** * @description Instructs the Slack API to send an interaction payload to your app when the view is closed. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ notifyOnClose(boolean?: boolean): this; } export declare abstract class Optional extends Builder { /** * @description Lets the Slack API know that inputting data in the the input is not required for the view to be successfully submitted. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ optional(boolean?: boolean): this; } export declare abstract class Primary extends Builder { /** * @description For a button element, this changes the color to green. For confirmation dialogs, this sets the main button in the bottom right corner to green, which is meant to confirm the action. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ primary(boolean?: boolean): this; } export declare abstract class ReplaceOriginal extends Builder { /** * @description Instructs the Slack API to replace the original message, from which the interaction payload originated, with the current message. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ replaceOriginal(boolean?: boolean): this; } export declare abstract class ResponseUrlEnabled extends Builder { /** * @description Instructs the Slack API to provide a response URL at view submission. * * **Slack Validation Rules and Tips:** * * Only available in views with input blocks. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ responseUrlEnabled(boolean?: boolean): this; } export declare abstract class SubmitDisabled extends Builder { /** * @description Configures the workflow step to have a disabled submit button until the user has input data into one or more inputs. * * {@link https://api.slack.com/block-kit|Open Official Slack Block Kit Documentation} * {@link https://www.blockbuilder.dev|Open Block Builder Documentation} */ submitDisabled(boolean?: boolean): this; }