Package Exports
- slack-utility
- slack-utility/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (slack-utility) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
slack-utility
.d8888. db .d8b. .o88b. db dD db db d888888b d888888b db d888888b d888888b db db
88' YP 88 d8' `8b d8P Y8 88 ,8P' 88 88 `~~88~~' `88' 88 `88' `~~88~~' `8b d8'
`8bo. 88 88ooo88 8P 88,8P 88 88 88 88 88 88 88 `8bd8'
`Y8b. 88 88~~~88 8b 88`8b C8888D 88 88 88 88 88 88 88 88
db 8D 88booo. 88 88 Y8b d8 88 `88. 88b d88 88 .88. 88booo. .88. 88 88
`8888Y' Y88888P YP YP `Y88P' YP YD ~Y8888P' YP Y888888P Y88888P Y888888P YP YP Installation
npm install slack-utilityor
yarn add slack-utilityDirectories
This package export 3 main objects
actions: A collection of general purpose actions to be trigger by slash commands, interactivity, events or input actions.slackBuilder: A collection of helper functions to build different components of slack blocks messages.slackUtils: A collection of function to perform a call to the slack API with this package context or retrieving context information from a slack request.
Usage
import { slackUtils, slackBuilder, actions } from 'slack-utility'const { slackUtils, slackBuilder, actions } = require('slack-utility');Actions
app_home_opened: Trigger when a user open the app home. (if enable in slack app configuration)build_call_from_abi:delete_msg: Action triggered when a user click on the delete button.error: Trigger when an error occur. (can be trigger by any action)query_all_events:query_contract_calls:query_contract_events:query_contract_for_env:query_event_details:send_call_from_abi:settings_abis:settings_abis_add:settings_apiKeys:settings_apiKeys_add:settings_app:settings_command:settings_commands_add:settings_contracts:settings_contracts_add:settings_networks:settings_networks_add:settings_signers:settings_signers_add:settings_save: General purpose action to save the settings. (can be trigger by any settings action)settings_validate: General purpose action to validate the settings. (can be trigger by any settings action)settings: Trigger when a user click on the settings button or use /settings command.update_msg:
SlackBuilder
addDeleteButton: Return a slack button to delete a message when provided with a action message block and message id.addRefreshButton: Return a slack button to refresh a message when provided with a action message block and message id.addSettingButton: Return a slack button to open the settings when provided with a action message block.buildLinkSlackButton: Return a link button to open a link in the browser.buildEtherscanLinkSlackButton: Return a link button to open a blockchain explorer link in the browser.buildSimpleSlackButton: Return a simple slack button to trigger an action.buildSimpleSlackHeaderMsg: Return a simple slack header message. (only 1 per message)buildSimpleSlackOptions: Return options for a select menu.buildSimpleSlackOption: Return a simple option for a select menu.buildSimpleSectionMsg: Return a simple slack section message. (most used for text)buildSimpleSlackSelection: Return a simple select menu.buildSlackActionMsg: Return the action message block. (used to add buttons to a message)buildSlackContractSelection: Return a select menu to select a contract. (build from the env pass to the function)buildSlackNetworkSelection: Return a select menu to select a network. (build from the env pass to the function)buildSlackNumberInput: Return a number input.buildSlackPlainTextInput: Return a plain text input.buildSlackDatePicker: Return a date picker.buildSlackDateTimePicker: Return a date & time picker.buildSlackInput: Return a input block.buildSlackModal: Return a modal view.buildSlackMultilineInput: Return a multiline input.buildSlackTimePicker: Return a time picker.buildSlackUrlInput: Return a url input.
SlackUtils
actionsLoop:callerSettings:commandsLoop:retrieveEnvironment:retrieveTeamSettings:retrieveUserSettings:setupContractAndNetwork:setupContractNetworkAndSigner:setupNetwork:slackEndpoint:slackDeleteMessage:slackOpenView:slackPostEphemeralMessage:slackPostMessage:slackPostWaitMessage:slackPublishView:slackPushView:slackUpdateMessage:slackUpdateView:
Directory Tree
slack-utility/
│ .eslintrc.js
│ .npmignore
│ .prettierignore
│ .prettierrc
│ awesome-readme.config.js
│ CONTRIBUTING.md
│ LICENSE
│ package-lock.json
│ package.json
│ README.md
│ tsconfig.json
│ tslint.json
└─── src/
│ index.ts
│ README.md
│ types.ts
│ utils.ts
└─── actions/
└─── slackBuilder/
└─── slackUtils/