@slack/bolt 3.21.4 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/App.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
[](https://codecov.io/gh/slackapi/bolt-js)
|
|
4
4
|
[](https://github.com/slackapi/bolt-js/actions/workflows/ci-build.yml)
|
|
5
5
|
|
|
6
|
-
A JavaScript framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://slack.dev/bolt-js/tutorial/getting-started) to set-up and run your first Bolt app.
|
|
6
|
+
A JavaScript framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https://tools.slack.dev/bolt-js/tutorial/getting-started) to set-up and run your first Bolt app.
|
|
7
7
|
|
|
8
|
-
Read [the documentation](https://slack.dev/bolt-js) to explore the basic and advanced concepts of Bolt for JavaScript.
|
|
8
|
+
Read [the documentation](https://tools.slack.dev/bolt-js) to explore the basic and advanced concepts of Bolt for JavaScript.
|
|
9
9
|
|
|
10
10
|
## Setup
|
|
11
11
|
|
|
@@ -80,7 +80,7 @@ Most of the app's functionality will be inside listener functions (the `fn` para
|
|
|
80
80
|
|
|
81
81
|
| Argument | Description |
|
|
82
82
|
| :---: | :--- |
|
|
83
|
-
| `payload` | Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https://api.slack.com/events-api#event_type_structure). For a block action, it will be the action from within the `actions` array. The `payload` object is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangeably. **An easy way to understand what's in a payload is to log it**, or
|
|
83
|
+
| `payload` | Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https://api.slack.com/events-api#event_type_structure). For a block action, it will be the action from within the `actions` array. The `payload` object is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangeably. **An easy way to understand what's in a payload is to log it**, or use TypeScript. |
|
|
84
84
|
| `say` | Function to send a message to the channel associated with the incoming event. This argument is only available when the listener is triggered for events that contain a `channel_id` (the most common being `message` events). `say` accepts simple strings (for plain-text messages) and objects (for messages containing blocks). `say` returns a promise that will resolve with a [`chat.postMessage` response](https://api.slack.com/methods/chat.postMessage).
|
|
85
85
|
| `ack` | Function that **must** be called to acknowledge that an incoming event was received by your app. `ack` exists for all actions, shortcuts, view, slash command and options requests. `ack` returns a promise that resolves when complete. Read more in [Acknowledging events](#acknowledging-events)
|
|
86
86
|
| `client` | Web API client that uses the token associated with that event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by the `authorize` function.
|
|
@@ -107,7 +107,7 @@ app.message(async ({ message, say }) => {
|
|
|
107
107
|
|
|
108
108
|
### Calling the Web API
|
|
109
109
|
|
|
110
|
-
In addition to the [`client` property passed to listeners](#making-things-happen), each app has a top-level `client` that can be used to call methods. Unlike the `client` passed to listeners, the top-level client must be passed a `token`. [Read the documentation](https://slack.dev/bolt-js/concepts#web-api) for more details.
|
|
110
|
+
In addition to the [`client` property passed to listeners](#making-things-happen), each app has a top-level `client` that can be used to call methods. Unlike the `client` passed to listeners, the top-level client must be passed a `token`. [Read the documentation](https://tools.slack.dev/bolt-js/concepts#web-api) for more details.
|
|
111
111
|
|
|
112
112
|
### Acknowledging events
|
|
113
113
|
|
|
@@ -129,7 +129,7 @@ Depending on the type of incoming event a listener is meant for, `ack()` should
|
|
|
129
129
|
|
|
130
130
|
## Getting Help
|
|
131
131
|
|
|
132
|
-
[The documentation](https://slack.dev/bolt-js) has more information on basic and advanced concepts for Bolt for JavaScript.
|
|
132
|
+
[The documentation](https://tools.slack.dev/bolt-js) has more information on basic and advanced concepts for Bolt for JavaScript.
|
|
133
133
|
|
|
134
134
|
If you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue:
|
|
135
135
|
|
package/dist/App.js
CHANGED
|
@@ -719,7 +719,7 @@ class App {
|
|
|
719
719
|
return undefined;
|
|
720
720
|
}
|
|
721
721
|
if (authorize === undefined && !usingOauth) {
|
|
722
|
-
throw new errors_1.AppInitializationError(`${tokenUsage} \n\nSince you have not provided a token or authorize, you might be missing one or more required oauth installer options. See https://slack.dev/bolt-js/concepts
|
|
722
|
+
throw new errors_1.AppInitializationError(`${tokenUsage} \n\nSince you have not provided a token or authorize, you might be missing one or more required oauth installer options. See https://slack.dev/bolt-js/concepts/authenticating-oauth for these required fields.\n`);
|
|
723
723
|
}
|
|
724
724
|
else if (authorize !== undefined && usingOauth) {
|
|
725
725
|
throw new errors_1.AppInitializationError(`You cannot provide both authorize and oauth installer options. ${tokenUsage}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slack/bolt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"description": "A framework for building Slack apps, fast.",
|
|
5
5
|
"author": "Slack Technologies, LLC",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"@slack/oauth": "^2.6.3",
|
|
46
46
|
"@slack/socket-mode": "^1.3.6",
|
|
47
47
|
"@slack/types": "^2.13.0",
|
|
48
|
-
"@slack/web-api": "^6.
|
|
48
|
+
"@slack/web-api": "^6.13.0",
|
|
49
49
|
"@types/express": "^4.16.1",
|
|
50
50
|
"@types/promise.allsettled": "^1.0.3",
|
|
51
51
|
"@types/tsscmp": "^1.0.0",
|
|
52
52
|
"axios": "^1.7.4",
|
|
53
|
-
"express": "^4.
|
|
53
|
+
"express": "^4.21.0",
|
|
54
54
|
"path-to-regexp": "^8.1.0",
|
|
55
55
|
"promise.allsettled": "^1.0.2",
|
|
56
56
|
"raw-body": "^2.3.3",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/chai": "^4.1.7",
|
|
61
61
|
"@types/mocha": "^10.0.1",
|
|
62
|
-
"@types/node": "22.5.
|
|
62
|
+
"@types/node": "22.5.5",
|
|
63
63
|
"@types/sinon": "^7.0.11",
|
|
64
64
|
"@typescript-eslint/eslint-plugin": "^4.4.1",
|
|
65
65
|
"@typescript-eslint/parser": "^4.4.0",
|