fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
63 lines • 2.97 kB
JavaScript
;
/* eslint-disable max-len */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Blocks = exports.Section = exports.Input = exports.Header = exports.Divider = void 0;
const divider_1 = require("./divider");
const header_1 = require("./header");
const input_1 = require("./input");
const section_1 = require("./section");
/**
* Functions here do not use arrow functions stored in variables for IDE color compatibility.
*/
/**
* @param {Object} [params] Parameters passed to the constructor.
* @param {string} [params.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process.
*
* {@link https://api.slack.com/reference/block-kit/blocks#divider|View in Slack API Documentation}
*/
function Divider(params) {
return new divider_1.DividerBuilder(params);
}
exports.Divider = Divider;
/**
* @param {Object} [params] Parameters passed to the constructor.
* @param {string} [params.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process.
* @param {string} [params.text] Sets the text to be displayed in the header block.
*
* {@link https://api.slack.com/reference/block-kit/blocks#header|View in Slack API Documentation}
*/
function Header(params) {
return new header_1.HeaderBuilder(params);
}
exports.Header = Header;
/**
* @param {Object} [params] Parameters passed to the constructor.
* @param {string} [params.blockId] Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process.
* @param {string} [params.label] Sets the label to be displayed above the input.
* @param {string} [params.hint] Sets the hint to be displayed under the input.
*
* {@link https://api.slack.com/reference/block-kit/blocks#input|View in Slack API Documentation}
*/
function Input(params) {
return new input_1.InputBuilder(params);
}
exports.Input = Input;
/**
* @param {Object} [params] Parameters passed to the constructor.
* @param {string} [params.blockId] Sets a string to be an identifier for the block, that will be available in interaction payloadsSets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process.
* @param {string} [params.text] Sets the text to be displayed in the section block.
*
* {@link https://api.slack.com/reference/block-kit/blocks#section|View in Slack API Documentation}
*/
function Section(params) {
return new section_1.SectionBuilder(params);
}
exports.Section = Section;
const blocks = {
Divider,
Header,
Input,
Section,
};
exports.Blocks = blocks;
//# sourceMappingURL=index.js.map