@slack/bolt 3.21.0 → 3.21.1

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.
Files changed (2) hide show
  1. package/README.md +16 -10
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -45,29 +45,33 @@ Apps typically react to a collection of incoming events, which can correspond [E
45
45
  request, there's a method to build a listener function.
46
46
 
47
47
  ```js
48
+ // Listen for an action from a Block Kit element (buttons, select menus, date pickers, etc)
49
+ app.action(actionId, fn);
50
+
51
+ // Listen for dialog submissions
52
+ app.action({ callback_id: callbackId }, fn);
53
+
54
+ // Listen for slash commands
55
+ app.command(commandName, fn);
56
+
48
57
  // Listen for an event from the Events API
49
58
  app.event(eventType, fn);
50
59
 
60
+ // Listen for a custom step execution from a workflow
61
+ app.function(callbackId, fn)
62
+
51
63
  // Convenience method to listen to only `message` events using a string or RegExp
52
64
  app.message([pattern ,] fn);
53
65
 
54
- // Listen for an action from a Block Kit element (buttons, select menus, date pickers, etc)
55
- app.action(actionId, fn);
56
-
57
- // Listen for dialog submissions
58
- app.action({ callback_id: callbackId }, fn);
66
+ // Listen for options requests (from select menus with an external data source)
67
+ app.options(actionId, fn);
59
68
 
60
69
  // Listen for a global or message shortcuts
61
70
  app.shortcut(callbackId, fn);
62
71
 
63
- // Listen for slash commands
64
- app.command(commandName, fn);
65
-
66
72
  // Listen for view_submission modal events
67
73
  app.view(callbackId, fn);
68
74
 
69
- // Listen for options requests (from select menus with an external data source)
70
- app.options(actionId, fn);
71
75
  ```
72
76
 
73
77
  ## Making things happen
@@ -83,6 +87,8 @@ Most of the app's functionality will be inside listener functions (the `fn` para
83
87
  | `respond` | Function that responds to an incoming event **if** it contains a `response_url` (actions, shortcuts, view submissions, and slash commands). `respond` returns a promise that resolves with the results of responding using the `response_url`.
84
88
  | `context` | Event context. This object contains data about the event and the app, such as the `botId`. Middleware can add additional context before the event is passed to listeners.
85
89
  | `body` | Object that contains the entire body of the request (superset of `payload`). Some accessory data is only available outside of the payload (such as `trigger_id` and `authorizations`).
90
+ | `complete` | Function used to signal the successful completion of a custom step execution. This tells Slack to proceed with the next steps in the workflow. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.
91
+ | `fail` | Function used to signal that a custom step failed to complete. This tells Slack to stop the workflow execution. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.
86
92
 
87
93
 
88
94
  The arguments are grouped into properties of one object, so that it's easier to pick just the ones your listener needs (using
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slack/bolt",
3
- "version": "3.21.0",
3
+ "version": "3.21.1",
4
4
  "description": "A framework for building Slack apps, fast.",
5
5
  "author": "Slack Technologies, LLC",
6
6
  "license": "MIT",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@slack/logger": "^4.0.0",
45
- "@slack/oauth": "^2.6.2",
46
- "@slack/socket-mode": "^1.3.3",
45
+ "@slack/oauth": "^2.6.3",
46
+ "@slack/socket-mode": "^1.3.6",
47
47
  "@slack/types": "^2.11.0",
48
- "@slack/web-api": "^6.12.0",
48
+ "@slack/web-api": "^6.12.1",
49
49
  "@types/express": "^4.16.1",
50
50
  "@types/promise.allsettled": "^1.0.3",
51
51
  "@types/tsscmp": "^1.0.0",