diff --git a/docs/content/reference.md b/docs/content/reference.md index 6acd3db76..c4c7a06be 100644 --- a/docs/content/reference.md +++ b/docs/content/reference.md @@ -22,7 +22,7 @@ Below is the current list of methods that accept listener functions. These metho | `app.action(actionId, fn);` | Listens for an action event from a Block Kit element, such as a user interaction with a button, select menu, or datepicker. The `actionId` identifier is a `string` that should match the unique `action_id` included when your app sends the element to a view. Note that a view can be a message, modal, or app home. Note that action elements included in an `input` block do not trigger any events. | `app.shortcut(callbackId, fn);` | Listens for global or message shortcut invocation. The `callbackId` is a `string` or `RegExp` that must match a shortcut `callback_id` specified within your app's configuration. | `app.view(callbackId, fn);` | Listens for `view_submission` and `view_closed` events. `view_submission` events are sent when a user submits a modal that your app opened. `view_closed` events are sent when a user closes the modal rather than submits it. -| `app.step(workflowStep)` | Listen and responds to workflow step events using the callbacks passed in an instance of `WorkflowStep`. Callbacks include three callbacks: `edit`, `save`, and `execute`. More information on workflow steps can be found [in the documentation](/concepts/adding-editing-steps). +| `app.step(workflowStep)` | Listen and responds to steps from apps events using the callbacks passed in an instance of `WorkflowStep`. Callbacks include three callbacks: `edit`, `save`, and `execute`. More information on steps from apps can be found [in the documentation](/concepts/adding-editing-steps). | `app.command(commandName, fn);` | Listens for slash command invocations. The `commandName` is a `string` that must match a slash command specified in your app's configuration. Slash command names should be prefaced with a `/` (ex: `/helpdesk`). | `app.options(actionId, fn);` | Listens for options requests (from select menus with an external data source). This isn't often used, and shouldn't be mistaken with `app.action`. The `actionId` identifier is a `string` that matches the unique `action_id` included when you app sends a [select with an external data source](https://api.slack.com/reference/block-kit/block-elements#external_select). @@ -162,7 +162,7 @@ Bolt includes a set of error types to make errors easier to handle, with more sp | `ReceiverMultipleAckError` | Error thrown within Receiver when your app calls `ack()` when that request has previously been acknowledged. Currently only used in the default `HTTPReceiver`. | | `ReceiverAuthenticityError` | Error thrown when your app's request signature could not be verified. The error includes information on why it failed, such as an invalid timestamp, missing headers, or invalid signing secret. | `MultipleListenerError` | Thrown when multiple errors occur when processing multiple listeners for a single event. Includes an `originals` property with an array of the individual errors. | -| `WorkflowStepInitializationError` | Error thrown when configuration options are invalid or missing when instantiating a new `WorkflowStep` instance. This could be scenarios like not including a `callback_id`, or not including a configuration object. More information on Workflow Steps [can be found in the documentation](/concepts/steps). | +| `WorkflowStepInitializationError` | Error thrown when configuration options are invalid or missing when instantiating a new `WorkflowStep` instance. This could be scenarios like not including a `callback_id`, or not including a configuration object. More information on steps from apps [can be found in the documentation](/concepts/steps). | | `UnknownError` | An error that was thrown inside the framework but does not have a specified error code. Contains an `original` property with more details. | :::info diff --git a/docs/content/steps/adding-editing-steps.md b/docs/content/steps/adding-editing-steps.md index da8330d07..0622d17a4 100644 --- a/docs/content/steps/adding-editing-steps.md +++ b/docs/content/steps/adding-editing-steps.md @@ -1,14 +1,14 @@ --- -title: Adding or editing workflow steps +title: Adding or editing steps from apps lang: en slug: /concepts/adding-editing-steps --- :::danger -Workflow Steps from Apps are a deprecated feature. +Steps from Apps are a deprecated feature. -Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom functions for Bolt](/concepts/creating-custom-functions). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. @@ -16,7 +16,7 @@ Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023 When a builder adds (or later edits) your step in their workflow, your app will receive a [`workflow_step_edit` event](https://api.slack.com/reference/workflows/workflow_step_edit). The `edit` callback in your `WorkflowStep` configuration will be run when this event is received. -Whether a builder is adding or editing a step, you need to send them a [workflow step configuration modal](https://api.slack.com/reference/workflows/configuration-view). This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the workflow step. +Whether a builder is adding or editing a step, you need to send them a [step from app configuration modal](https://api.slack.com/reference/workflows/configuration-view). This modal is where step-specific settings are chosen, and it has more restrictions than typical modals—most notably, it cannot include `title`, `submit`, or `close` properties. By default, the configuration modal's `callback_id` will be the same as the step from app. Within the `edit` callback, the `configure()` utility can be used to easily open your step's configuration modal by passing in an object with your view's `blocks`. To disable saving the configuration before certain conditions are met, pass in `submit_disabled` with a value of `true`. @@ -67,4 +67,4 @@ const ws = new WorkflowStep('add_task', { save: async ({ ack, step, update }) => {}, execute: async ({ step, complete, fail }) => {}, }); -``` \ No newline at end of file +``` diff --git a/docs/content/steps/creating-steps.md b/docs/content/steps/creating-steps.md index f8a6e0620..f39714ede 100644 --- a/docs/content/steps/creating-steps.md +++ b/docs/content/steps/creating-steps.md @@ -1,26 +1,26 @@ --- -title: Creating workflow steps +title: Creating steps from apps lang: en slug: /concepts/creating-steps --- :::danger -Workflow Steps from Apps are a deprecated feature. +Steps from Apps are a deprecated feature. -Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom functions for Bolt](/concepts/creating-custom-functions). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. ::: -To create a workflow step, Bolt provides the `WorkflowStep` class. +To create a step from app, Bolt provides the `WorkflowStep` class. When instantiating a new `WorkflowStep`, pass in the step's `callback_id` and a configuration object. -The configuration object contains three properties: `edit`, `save`, and `execute`. Each of these properties must be a single callback or an array of callbacks. All callbacks have access to a `step` object that contains information about the workflow step event. +The configuration object contains three properties: `edit`, `save`, and `execute`. Each of these properties must be a single callback or an array of callbacks. All callbacks have access to a `step` object that contains information about the step from app event. -After instantiating a `WorkflowStep`, you can pass it into `app.step()`. Behind the scenes, your app will listen and respond to the workflow step’s events using the callbacks provided in the configuration object. +After instantiating a `WorkflowStep`, you can pass it into `app.step()`. Behind the scenes, your app will listen and respond to the step’s events using the callbacks provided in the configuration object. ```javascript const { App, WorkflowStep } = require('@slack/bolt'); @@ -39,4 +39,4 @@ const ws = new WorkflowStep('add_task', { }); app.step(ws); -``` \ No newline at end of file +``` diff --git a/docs/content/steps/executing-steps.md b/docs/content/steps/executing-steps.md index c97f19693..55194cecb 100644 --- a/docs/content/steps/executing-steps.md +++ b/docs/content/steps/executing-steps.md @@ -1,22 +1,22 @@ --- -title: Executing workflow steps +title: Executing steps from apps lang: en slug: /concepts/executing-steps --- :::danger -Workflow Steps from Apps are a deprecated feature. +Steps from Apps are a deprecated feature. -Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom functions for Bolt](/concepts/creating-custom-functions). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. ::: -When your workflow step is executed by an end user, your app will receive a [`workflow_step_execute` event](https://api.slack.com/events/workflow_step_execute). The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. +When your step from app is executed by an end user, your app will receive a [`workflow_step_execute` event](https://api.slack.com/events/workflow_step_execute). The `execute` callback in your `WorkflowStep` configuration will be run when this event is received. -Using the `inputs` from the `save` callback, this is where you can make third-party API calls, save information to a database, update the user's Home tab, or decide the outputs that will be available to subsequent workflow steps by mapping values to the `outputs` object. +Using the `inputs` from the `save` callback, this is where you can make third-party API calls, save information to a database, update the user's Home tab, or decide the outputs that will be available to subsequent steps by mapping values to the `outputs` object. Within the `execute` callback, your app must either call `complete()` to indicate that the step's execution was successful, or `fail()` to indicate that the step's execution failed. @@ -38,12 +38,12 @@ const ws = new WorkflowStep('add_task', { // `await complete()` is not recommended because of the slow response of the API endpoint // which could result in not responding to the Slack Events API within the required 3 seconds // instead, use: - // complete({ outputs }).then(() => { console.log('workflow step execution complete registered'); }); + // complete({ outputs }).then(() => { console.log('step from app execution complete registered'); }); // let Slack know if something went wrong // await fail({ error: { message: "Just testing step failure!" } }); // NOTE: If you run your app with processBeforeResponse: true, use this instead: - // fail({ error: { message: "Just testing step failure!" } }).then(() => { console.log('workflow step execution failure registered'); }); + // fail({ error: { message: "Just testing step failure!" } }).then(() => { console.log('step from app execution failure registered'); }); }, }); -``` \ No newline at end of file +``` diff --git a/docs/content/steps/saving-steps.md b/docs/content/steps/saving-steps.md index 8b7f0447b..5f3e4a4ba 100644 --- a/docs/content/steps/saving-steps.md +++ b/docs/content/steps/saving-steps.md @@ -6,9 +6,9 @@ slug: /concepts/saving-steps :::danger -Workflow Steps from Apps are a deprecated feature. +Steps from Apps are a deprecated feature. -Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom functions for Bolt](/concepts/creating-custom-functions). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. @@ -18,8 +18,8 @@ After the configuration modal is opened, your app will listen for the `view_subm Within the `save` callback, the `update()` method can be used to save the builder's step configuration by passing in the following arguments: -- `inputs` is an object representing the data your app expects to receive from the user upon workflow step execution. -- `outputs` is an array of objects containing data that your app will provide upon the workflow step's completion. Outputs can then be used in subsequent steps of the workflow. +- `inputs` is an object representing the data your app expects to receive from the user upon step from app execution. +- `outputs` is an array of objects containing data that your app will provide upon the step's completion. Outputs can then be used in subsequent steps of the workflow. - `step_name` overrides the default Step name - `step_image_url` overrides the default Step image @@ -57,4 +57,4 @@ const ws = new WorkflowStep('add_task', { }, execute: async ({ step, complete, fail }) => {}, }); -``` \ No newline at end of file +``` diff --git a/docs/content/steps/steps.md b/docs/content/steps/steps.md index 54aeb1962..f344894f3 100644 --- a/docs/content/steps/steps.md +++ b/docs/content/steps/steps.md @@ -1,14 +1,14 @@ --- -title: Overview of Workflow Steps from Apps +title: Overview of steps from apps lang: en slug: /concepts/steps --- :::danger -Workflow Steps from Apps are a deprecated feature. +Steps from Apps are a deprecated feature. -Workflow Steps from Apps are different than, and not interchangable with, Slack automation workflows. We encourage those who are currently publishing Workflow Steps from Apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom functions for Bolt](/concepts/creating-custom-functions). +Steps from Apps are different than, and not interchangeable with, Slack automation workflows. We encourage those who are currently publishing steps from apps to consider the new [Slack automation features](https://api.slack.com/automation), such as [custom steps for Bolt](https://api.slack.com/automation/functions/custom-bolt). Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back) for more information. @@ -16,14 +16,14 @@ Please [read the Slack API changelog entry](https://api.slack.com/changelog/2023 --- -Workflow Steps from Apps allow your app to create and process custom workflow steps that users can add using [Workflow Builder](https://api.slack.com/workflows). +Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows). -A workflow step is made up of three distinct user events: +A step from app is made up of three distinct user events: - Adding or editing the step in a Workflow - Saving or updating the step's configuration - The end user's execution of the step -All three events must be handled for a workflow step to function. +All three events must be handled for a step from app to function. -Read more about Workflow Steps from Apps in the [API documentation](https://api.slack.com/legacy/workflows/steps). \ No newline at end of file +Read more about steps from apps in the [API documentation](https://api.slack.com/legacy/workflows/steps). diff --git a/docs/sidebars.js b/docs/sidebars.js index b82dbcdf2..1a0e35c55 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -39,7 +39,7 @@ const sidebars = { 'basic/options', 'basic/authenticating-oauth', 'basic/socket-mode' - ], + ], }, { type: 'category', @@ -78,7 +78,7 @@ const sidebars = { }, { type: 'category', - label: 'Workflow steps (Deprecated)', + label: 'Steps from apps (Deprecated)', items: [ 'steps/steps', 'steps/creating-steps', @@ -87,7 +87,7 @@ const sidebars = { 'steps/executing-steps', ], }, - {type: 'html', value: '