diff --git a/docs/content/basic/action-respond.md b/docs/content/basic/action-respond.md
deleted file mode 100644
index 958471935..000000000
--- a/docs/content/basic/action-respond.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: Responding to actions
-lang: en
-slug: /concepts/action-respond
----
-
-There are two main ways to respond to actions. The first (and most common) way is to use the `say` function. The `say` function sends a message back to the conversation where the incoming request took place.
-
-The second way to respond to actions is using `respond()`, which is a simple utility to use the `response_url` associated with an action.
-
-```javascript
-// Your middleware will be called every time an interactive component with the action_id âapprove_buttonâ is triggered
-app.action('approve_button', async ({ ack, say }) => {
- // Acknowledge action request
- await ack();
- await say('Request approved ð');
-});
-```
-
-
-
-Using `respond()`
-
-
-Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass a JSON object with a new message payload that will be published back to the source of the original interaction with optional properties like `response_type` (which has a value of `in_channel` or `ephemeral`), `replace_original`, and `delete_original`.
-
-```javascript
-// Listens to actions triggered with action_id of âuser_selectâ
-app.action('user_select', async ({ action, ack, respond }) => {
- await ack();
- if (action.type === 'users_select') {
- await respond(`You selected <@${action.selected_user}>`);
- }
-});
-```
-
diff --git a/docs/content/basic/event-listening.md b/docs/content/basic/event-listening.md
deleted file mode 100644
index b71ad2298..000000000
--- a/docs/content/basic/event-listening.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-title: Listening to events
-lang: en
-slug: /concepts/event-listening
----
-
-You can listen to [any Events API event](https://api.slack.com/events) using the `event()` method after subscribing to it in your app configuration. This allows your app to take action when something happens in Slack, like a user reacting to a message or joining a channel.
-
-The `event()` method requires an `eventType` of type string.
-
-```javascript
-const welcomeChannelId = 'C12345';
-
-// When a user joins the team, send a message in a predefined channel asking them to introduce themselves
-app.event('team_join', async ({ event, client, logger }) => {
- try {
- // Call chat.postMessage with the built-in client
- const result = await client.chat.postMessage({
- channel: welcomeChannelId,
- text: `Welcome to the team, <@${event.user.id}>! ð You can introduce yourself in this channel.`
- });
- logger.info(result);
- }
- catch (error) {
- logger.error(error);
- }
-});
-```
-
-
-
-Filtering on message subtypes
-
-
-A `message()` listener is equivalent to `event('message')`
-
-You can filter on subtypes of events by using the built-in `subtype()` middleware. Common message subtypes like `message_changed` and `message_replied` can be found [on the message event page](https://api.slack.com/events/message#message_subtypes).
-
-```javascript
-// Import subtype from the package
-const { App, subtype } = require('@slack/bolt');
-
-// Matches all message changes from users
-app.message(subtype('message_changed'), ({ event, logger }) => {
- // This if statement is required in TypeScript code
- if (event.subtype === 'message_changed'
- && !event.message.subtype
- && !event.previous_message.subtype) {
- logger.info(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`);
- }
-});
-```
-
\ No newline at end of file
diff --git a/docs/content/basic/message-listening.md b/docs/content/basic/message-listening.md
deleted file mode 100644
index 8a8b6f479..000000000
--- a/docs/content/basic/message-listening.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-title: Listening to messages
-lang: en
-slug: /concepts/message-listening
----
-
-To listen to messages that [your app has access to receive](https://api.slack.com/messaging/retrieving#permissions), you can use the `message()` method which filters out events that arenât of type `message`.
-
-`message()` accepts an optional `pattern` parameter of type `string` or `RegExp` object which filters out any messages that donât match the pattern.
-
-```javascript
-// This will match any message that contains ð
-app.message(':wave:', async ({ message, say }) => {
- // Handle only newly posted messages here
- if (message.subtype === undefined
- || message.subtype === 'bot_message'
- || message.subtype === 'file_share'
- || message.subtype === 'thread_broadcast') {
- await say(`Hello, <@${message.user}>`);
- }
-});
-```
-
-
-
-Using a RegExp pattern
-
-
-A RegExp pattern can be used instead of a string for more granular matching.
-
-All of the results of the RegExp match will be in `context.matches`.
-
-```javascript
-app.message(/^(hi|hello|hey).*/, async ({ context, say }) => {
- // RegExp matches are inside of context.matches
- const greeting = context.matches[0];
-
- await say(`${greeting}, how are you?`);
-});
-```
-
\ No newline at end of file
diff --git a/docs/content/basic/acknowledge.md b/docs/content/concepts/acknowledge.md
similarity index 100%
rename from docs/content/basic/acknowledge.md
rename to docs/content/concepts/acknowledge.md
diff --git a/docs/content/basic/action-listening.md b/docs/content/concepts/actions.md
similarity index 53%
rename from docs/content/basic/action-listening.md
rename to docs/content/concepts/actions.md
index e61b50c32..d64cfc780 100644
--- a/docs/content/basic/action-listening.md
+++ b/docs/content/concepts/actions.md
@@ -1,21 +1,17 @@
---
-title: Listening to actions
+title: Listening & responding to actions
lang: en
-slug: /concepts/action-listening
+slug: /concepts/actions
---
-Your app can listen to user actions like button clicks, and menu selects, using the `action` method.
+Your app can listen and respond to user actions like button clicks, and menu selects, using the `action` method.
+
+## Listening to actions
Actions can be filtered on an `action_id` of type string or RegExp object. `action_id`s act as unique identifiers for interactive components on the Slack platform.
Youâll notice in all `action()` examples, `ack()` is used. It is required to call the `ack()` function within an action listener to acknowledge that the request was received from Slack. This is discussed in the [acknowledging requests section](/concepts/acknowledge).
-:::info
-
-Since v2, message shortcuts (previously message actions) now use the `shortcut()` method instead of the `action()` method. View the [migration guide for V2](/tutorial/migration-v2) to learn about the changes.
-
-:::
-
View more information about the `block_actions` payload within the [relevant API documentation page](https://api.slack.com/reference/interaction-payloads). To access the full payload of a view from within a listener, reference the `body` argument within your callback function.
```javascript
@@ -26,10 +22,7 @@ app.action('approve_button', async ({ ack }) => {
});
```
-
-
-Listening to actions using a constraint object
-
+### Listening to actions using a constraint object
You can use a constraints object to listen to `callback_id`s, `block_id`s, and `action_id`s (or any combination of them). Constraints in the object can be of type string or RegExp object.
@@ -56,4 +49,32 @@ app.action({ action_id: 'select_user', block_id: 'assign_ticket' },
});
```
-
\ No newline at end of file
+## Responding to actions
+
+There are two main ways to respond to actions. The first (and most common) way is to use the `say` function. The `say` function sends a message back to the conversation where the incoming request took place.
+
+The second way to respond to actions is using `respond()`, which is a simple utility to use the `response_url` associated with an action.
+
+```javascript
+// Your middleware will be called every time an interactive component with the action_id âapprove_buttonâ is triggered
+app.action('approve_button', async ({ ack, say }) => {
+ // Acknowledge action request
+ await ack();
+ await say('Request approved ð');
+});
+```
+
+
+### Using the `respond()` utility
+
+Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass a JSON object with a new message payload that will be published back to the source of the original interaction with optional properties like `response_type` (which has a value of `in_channel` or `ephemeral`), `replace_original`, and `delete_original`.
+
+```javascript
+// Listens to actions triggered with action_id of âuser_selectâ
+app.action('user_select', async ({ action, ack, respond }) => {
+ await ack();
+ if (action.type === 'users_select') {
+ await respond(`You selected <@${action.selected_user}>`);
+ }
+});
+```
\ No newline at end of file
diff --git a/docs/content/basic/authenticating-oauth.md b/docs/content/concepts/authenticating-oauth.md
similarity index 100%
rename from docs/content/basic/authenticating-oauth.md
rename to docs/content/concepts/authenticating-oauth.md
diff --git a/docs/content/advanced/authorization.md b/docs/content/concepts/authorization.md
similarity index 100%
rename from docs/content/advanced/authorization.md
rename to docs/content/concepts/authorization.md
diff --git a/docs/content/basic/commands.md b/docs/content/concepts/commands.md
similarity index 93%
rename from docs/content/basic/commands.md
rename to docs/content/concepts/commands.md
index c16d8ad89..9a173efdf 100644
--- a/docs/content/basic/commands.md
+++ b/docs/content/concepts/commands.md
@@ -1,5 +1,5 @@
---
-title: Listening and responding to commands
+title: Listening & responding to commands
lang: en
slug: /concepts/commands
---
@@ -14,7 +14,7 @@ If you use `command()` multiple times with overlapping RegExp matches, _all_ mat
Commands must be acknowledged with `ack()` to inform Slack your app has received the request.
-There are two ways to respond to slash commands. The first way is to use `say()`, which accepts a string or JSON payload. The second is `respond()` which is a utility for the `response_url`. These are explained in more depth in the [responding to actions](/concepts/action-respond) section.
+There are two ways to respond to slash commands. The first way is to use `say()`, which accepts a string or JSON payload. The second is `respond()` which is a utility for the `response_url`. These are explained in more depth in the [responding to actions](/concepts/actions) section.
When configuring commands within your app configuration, you'll continue to append `/slack/events` to your request URL.
diff --git a/docs/content/advanced/context.md b/docs/content/concepts/context.md
similarity index 100%
rename from docs/content/advanced/context.md
rename to docs/content/concepts/context.md
diff --git a/docs/content/basic/creating-modals.md b/docs/content/concepts/creating-modals.md
similarity index 100%
rename from docs/content/basic/creating-modals.md
rename to docs/content/concepts/creating-modals.md
diff --git a/docs/content/advanced/custom-routes.md b/docs/content/concepts/custom-routes.md
similarity index 100%
rename from docs/content/advanced/custom-routes.md
rename to docs/content/concepts/custom-routes.md
diff --git a/docs/content/basic/custom-steps.md b/docs/content/concepts/custom-steps.md
similarity index 97%
rename from docs/content/basic/custom-steps.md
rename to docs/content/concepts/custom-steps.md
index 495745551..f54c01cd1 100644
--- a/docs/content/basic/custom-steps.md
+++ b/docs/content/concepts/custom-steps.md
@@ -1,5 +1,5 @@
---
-title: Listening and responding to custom steps
+title: Custom Steps
lang: en
slug: /concepts/custom-steps
---
@@ -64,11 +64,11 @@ Example app manifest definition
---
-### Listening to custom step interactivity events
+## Listening to custom step interactivity events
Your app's custom steps may create interactivity points for users, for example: Post a message with a button
-If such interaction points originate from a custom step execution, the events sent to your app representing the end-user interaction with these points are considered to be _function-scoped interactivity events_. These interactivity events can be handled by your app using the same concepts we covered earlier, such as [Listening to actions](/concepts/action-listening).
+If such interaction points originate from a custom step execution, the events sent to your app representing the end-user interaction with these points are considered to be _function-scoped interactivity events_. These interactivity events can be handled by your app using the same concepts we covered earlier, such as [Listening to actions](/concepts/actions).
_function-scoped interactivity events_ will contain data related to the custom step (`function_executed` event) they were spawned from, such as custom step `inputs` and access to `complete()` and `fail()` listener arguments.
diff --git a/docs/content/advanced/deferring-initialization.md b/docs/content/concepts/deferring-initialization.md
similarity index 100%
rename from docs/content/advanced/deferring-initialization.md
rename to docs/content/concepts/deferring-initialization.md
diff --git a/docs/content/advanced/error-handling.md b/docs/content/concepts/error-handling.md
similarity index 100%
rename from docs/content/advanced/error-handling.md
rename to docs/content/concepts/error-handling.md
diff --git a/docs/content/concepts/event-listening.md b/docs/content/concepts/event-listening.md
new file mode 100644
index 000000000..92d4025c7
--- /dev/null
+++ b/docs/content/concepts/event-listening.md
@@ -0,0 +1,28 @@
+---
+title: Listening to events
+lang: en
+slug: /concepts/event-listening
+---
+
+You can listen to any [Events API event](https://api.slack.com/events) using the `event()` method after subscribing to it in your app configuration. This allows your app to take action when something happens in Slack, like a user reacting to a message or joining a channel.
+
+The `event()` method requires an `eventType` of type string.
+
+```javascript
+const welcomeChannelId = 'C12345';
+
+// When a user joins the team, send a message in a predefined channel asking them to introduce themselves
+app.event('team_join', async ({ event, client, logger }) => {
+ try {
+ // Call chat.postMessage with the built-in client
+ const result = await client.chat.postMessage({
+ channel: welcomeChannelId,
+ text: `Welcome to the team, <@${event.user.id}>! ð You can introduce yourself in this channel.`
+ });
+ logger.info(result);
+ }
+ catch (error) {
+ logger.error(error);
+ }
+});
+```
\ No newline at end of file
diff --git a/docs/content/advanced/global-middleware.md b/docs/content/concepts/global-middleware.md
similarity index 100%
rename from docs/content/advanced/global-middleware.md
rename to docs/content/concepts/global-middleware.md
diff --git a/docs/content/advanced/listener-middleware.md b/docs/content/concepts/listener-middleware.md
similarity index 100%
rename from docs/content/advanced/listener-middleware.md
rename to docs/content/concepts/listener-middleware.md
diff --git a/docs/content/advanced/logging.md b/docs/content/concepts/logging.md
similarity index 100%
rename from docs/content/advanced/logging.md
rename to docs/content/concepts/logging.md
diff --git a/docs/content/concepts/message-listening.md b/docs/content/concepts/message-listening.md
new file mode 100644
index 000000000..77b2b2914
--- /dev/null
+++ b/docs/content/concepts/message-listening.md
@@ -0,0 +1,56 @@
+---
+title: Listening to messages
+lang: en
+slug: /concepts/message-listening
+---
+
+To listen to messages that [your app has access to receive](https://api.slack.com/messaging/retrieving#permissions), you can use the `message()` method which filters out events that arenât of type `message` .A `message()` listener is equivalent to `event('message')`
+
+The `message()` listener accepts an optional `pattern` parameter of type `string` or `RegExp` object which filters out any messages that donât match the pattern.
+
+```javascript
+// This will match any message that contains ð
+app.message(':wave:', async ({ message, say }) => {
+ // Handle only newly posted messages here
+ if (message.subtype === undefined
+ || message.subtype === 'bot_message'
+ || message.subtype === 'file_share'
+ || message.subtype === 'thread_broadcast') {
+ await say(`Hello, <@${message.user}>`);
+ }
+});
+```
+
+## Using a RegExp pattern {#using-regexp}
+
+A RegExp pattern can be used instead of a string for more granular matching.
+
+All of the results of the RegExp match will be in `context.matches`.
+
+```javascript
+app.message(/^(hi|hello|hey).*/, async ({ context, say }) => {
+ // RegExp matches are inside of context.matches
+ const greeting = context.matches[0];
+
+ await say(`${greeting}, how are you?`);
+});
+```
+
+## Filtering on event subtypes {#filtering-event-subtypes}
+
+You can filter on subtypes of events by using the built-in `subtype()` middleware. Common message subtypes like `message_changed` and `message_replied` can be found [on the message event page](https://api.slack.com/events/message#message_subtypes).
+
+```javascript
+// Import subtype from the package
+const { App, subtype } = require('@slack/bolt');
+
+// Matches all message changes from users
+app.message(subtype('message_changed'), ({ event, logger }) => {
+ // This if statement is required in TypeScript code
+ if (event.subtype === 'message_changed'
+ && !event.message.subtype
+ && !event.previous_message.subtype) {
+ logger.info(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`);
+ }
+});
+```
diff --git a/docs/content/basic/message-sending.md b/docs/content/concepts/message-sending.md
similarity index 100%
rename from docs/content/basic/message-sending.md
rename to docs/content/concepts/message-sending.md
diff --git a/docs/content/basic/publishing-views.md b/docs/content/concepts/publishing-views.md
similarity index 100%
rename from docs/content/basic/publishing-views.md
rename to docs/content/concepts/publishing-views.md
diff --git a/docs/content/advanced/receiver.md b/docs/content/concepts/receiver.md
similarity index 100%
rename from docs/content/advanced/receiver.md
rename to docs/content/concepts/receiver.md
diff --git a/docs/content/basic/options.md b/docs/content/concepts/select-menu-options.md
similarity index 91%
rename from docs/content/basic/options.md
rename to docs/content/concepts/select-menu-options.md
index 475e554e5..6589cd3d4 100644
--- a/docs/content/basic/options.md
+++ b/docs/content/concepts/select-menu-options.md
@@ -1,10 +1,10 @@
---
-title: Listening and responding to options
+title: Listening & responding to select menu options
lang: en
slug: /concepts/options
---
-The `options()` method listens for incoming option request payloads from Slack. [Similar to `action()`](/concepts/action-listening),
+The `options()` method listens for incoming option request payloads from Slack. [Similar to `action()`](/concepts/actions),
an `action_id` or constraints object is required.
While it's recommended to use `action_id` for `external_select` menus, dialogs do not yet support Block Kit so you'll have to
diff --git a/docs/content/basic/shortcuts.md b/docs/content/concepts/shortcuts.md
similarity index 99%
rename from docs/content/basic/shortcuts.md
rename to docs/content/concepts/shortcuts.md
index 4ff2bcf6c..0c57d792e 100644
--- a/docs/content/basic/shortcuts.md
+++ b/docs/content/concepts/shortcuts.md
@@ -1,5 +1,5 @@
---
-title: Listening and responding to shortcuts
+title: Listening & responding to shortcuts
lang: en
slug: /concepts/shortcuts
---
diff --git a/docs/content/basic/socket-mode.md b/docs/content/concepts/socket-mode.md
similarity index 100%
rename from docs/content/basic/socket-mode.md
rename to docs/content/concepts/socket-mode.md
diff --git a/docs/content/advanced/token-rotation.md b/docs/content/concepts/token-rotation.md
similarity index 100%
rename from docs/content/advanced/token-rotation.md
rename to docs/content/concepts/token-rotation.md
diff --git a/docs/content/basic/updating-pushing-views.md b/docs/content/concepts/updating-pushing-views.md
similarity index 98%
rename from docs/content/basic/updating-pushing-views.md
rename to docs/content/concepts/updating-pushing-views.md
index 485678af1..3ccf4f14a 100644
--- a/docs/content/basic/updating-pushing-views.md
+++ b/docs/content/concepts/updating-pushing-views.md
@@ -1,5 +1,5 @@
---
-title: Updating and pushing views
+title: Updating & pushing views
lang: en
slug: /concepts/updating-pushing-views
---
diff --git a/docs/content/basic/view-submissions.md b/docs/content/concepts/view-submissions.md
similarity index 100%
rename from docs/content/basic/view-submissions.md
rename to docs/content/concepts/view-submissions.md
diff --git a/docs/content/basic/web-api.md b/docs/content/concepts/web-api.md
similarity index 96%
rename from docs/content/basic/web-api.md
rename to docs/content/concepts/web-api.md
index c6c2f27cd..0e1b3cdbe 100644
--- a/docs/content/basic/web-api.md
+++ b/docs/content/concepts/web-api.md
@@ -4,7 +4,7 @@ lang: en
slug: /concepts/web-api
---
-You can call [any Web API method](https://api.slack.com/methods) using the [`WebClient`](https://tools.slack.dev/node-slack-sdk/web-api) provided to your app's listeners as `client`. This uses either the token that initialized your app **or** the token that is returned from the [`authorize`](/concepts/authorization) function for the incoming event. The built-in [OAuth support](/concepts/authenticating-oauth) handles the second case by default.
+You can call any [Web API method](https://api.slack.com/methods) using the [`WebClient`](https://tools.slack.dev/node-slack-sdk/web-api) provided to your app's listeners as `client`. This uses either the token that initialized your app **or** the token that is returned from the [`authorize`](/concepts/authorization) function for the incoming event. The built-in [OAuth support](/concepts/authenticating-oauth) handles the second case by default.
Your Bolt app also has a top-level `app.client` which you can manually pass the `token` parameter. If the incoming request is not authorized or you're calling a method from outside of a listener, use the top-level `app.client`.
diff --git a/docs/content/getting-started.md b/docs/content/getting-started.mdx
similarity index 68%
rename from docs/content/getting-started.md
rename to docs/content/getting-started.mdx
index be5d6f037..af9bfa0a7 100644
--- a/docs/content/getting-started.md
+++ b/docs/content/getting-started.mdx
@@ -1,6 +1,6 @@
---
title: Getting started with Bolt for JavaScript
-sidebar_label: Getting started
+sidebar_label: Getting Started
---
This guide is meant to walk you through getting up and running with a Slack app using Bolt for JavaScript. Along the way, weâll create a new Slack app, set up your local environment, and develop an app that listens and responds to messages from a Slack workspace.
@@ -40,7 +40,7 @@ We're going to use bot and app tokens for this guide.
1. Navigate to the **OAuth & Permissions** on the left sidebar and scroll down to the **Bot Token Scopes** section. Click **Add an OAuth Scope**.
-2. For now, we'll just add one scope: [`chat:write`](https://api.slack.com/scopes/chat:write). This grants your app the permission to post messages in channels it's a member of.
+2. For now, we'll just add one scope: [`chat:write`](https://api.slack.com/scopes/chat:write). This scope grants your app the permission to post messages in channels it's a member of.
3. Scroll up to the top of the OAuth & Permissions page and click **Install App to Workspace**. You'll be led through Slack's OAuth UI, where you should allow your app to be installed to your development workspace.
@@ -72,6 +72,7 @@ Youâll be prompted with a series of questions to describe your new project (yo
Before we install the Bolt for JavaScript package to your new project, let's save the **bot token** and **Signing Secret** that were generated when you configured your app.
1. **Copy your Signing Secret from the Basic Information page** and then store it in a new environment variable. The following example works on Linux and macOS; but [similar commands are available on Windows](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153).
+
```shell
export SLACK_SIGNING_SECRET=
```
@@ -126,15 +127,19 @@ Your app should let you know that it's up and running. ð
## Setting up events {#setting-up-events}
Your app behaves similarly to people on your team â it can post messages, add emoji reactions, and listen and respond to events.
-To listen for events happening in a Slack workspace (like when a message is posted or when a reaction is posted to a message) you'll use the [Events API to subscribe to event types](https://api.slack.com/events-api). For this guide, we are going to be using [Socket Mode](https://api.slack.com/apis/connections/socket), our recommended option for those just getting started and building something for their team.
+To listen for events happening in a Slack workspace (like when a message is posted or when a reaction is posted to a message) you'll use the [Events API to subscribe to event types](https://api.slack.com/events-api).
-:::tip
+For those just starting, we recommend using [Socket Mode](https://api.slack.com/apis/connections/socket). Socket Mode allows your app to use the Events API and interactive features without exposing a public HTTP Request URL. This can be helpful during development, or if you're receiving requests from behind a firewall.
-Socket Mode lets apps use the Events API and interactive components without exposing a public HTTP endpoint. This can be helpful during development, or if you're receiving requests from behind a firewall. HTTP is more useful for apps being deployed to hosting environments (like [AWS](/deployments/aws-lambda) or [Heroku](/deployments/heroku)), or apps intended for distribution via the Slack App Directory. To continue this setting up guide with HTTP, head over [here](/tutorial/getting-started-http#setting-up-events-with-http).
+That being said, you're welcome to set up an app with a public HTTP Request URL. HTTP is more useful for apps being deployed to hosting environments (like [AWS](/deployments/aws-lambda) or [Heroku](/deployments/heroku) to stably respond within a large corporate Slack workspaces/organization, or apps intended for distribution via the Slack Martketplace.
-:::
+We've provided instructions for both ways in this guide.
-Okay, let's enable Socket Mode:
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
1. Head to your app's configuration page (click on the app [from your app management page](https://api.slack.com/apps)). Navigate to **Socket Mode** on the left side menu and toggle to enable.
@@ -144,6 +149,23 @@ Finally, it's time to tell Slack what events we'd like to listen for. Under **Ev
When an event occurs, Slack will send your app information about the event, like the user that triggered it and the channel it occurred in. Your app will process the details and can respond accordingly.
+
+
+
+1. Go back to your app configuration page (click on the app from your [app management page](https://api.slack.com/apps)). Click **Event Subscriptions** on the left sidebar. Toggle the switch labeled **Enable Events**.
+
+2. Add your Request URL. Slack will send HTTP POST requests corresponding to events to this [Request URL](https://api.slack.com/apis/connections/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls) endpoint. Bolt uses the `/slack/events` path to listen to all incoming requests (whether shortcuts, events, or interactivity payloads). When configuring your Request URL within your app configuration, you'll append `/slack/events`, e.g. `https:///slack/events`. ð¡
+
+:::info
+
+For local development, you can use a proxy service like [ngrok](https://ngrok.com/) to create a public URL and tunnel requests to your development environment. Refer to [ngrok's getting started guide](https://ngrok.com/docs#getting-started-expose) on how to create this tunnel.
+
+:::
+
+
+
+
+
Scroll down to **Subscribe to Bot Events**. There are four events related to messages:
- [`message.channels`](https://api.slack.com/events/message.channels) listens for messages in public channels that your app is added to
@@ -153,13 +175,17 @@ Scroll down to **Subscribe to Bot Events**. There are four events related to mes
If you want your bot to listen to messages from everywhere it is added to, choose all four message events. After youâve selected the events you want your bot to listen to, click the green **Save Changes** button.
+
+
+
+
Back in your project, make sure to store the `xapp` token you saved earlier in your environment.
```shell
export SLACK_APP_TOKEN=xapp-
```
-Make a simple change to your Bolt initialization code and restart the app.
+Change your Bolt initialization code and restart the app.
```javascript
// Initializes your app in socket mode with your app token and signing secret
@@ -171,6 +197,14 @@ const app = new App({
});
```
+
+
+
+Carry on!
+
+
+
+
---
## Listening and responding to a message {#listening-and-responding-to-a-message}
@@ -178,6 +212,10 @@ Your app is now ready for some logic. Let's start by using the `message()` metho
The following example listens and responds to all messages in channels/DMs where your app has been added that contain the word "hello":
+
+
+
+
```javascript
const { App } = require('@slack/bolt');
@@ -205,6 +243,34 @@ app.message('hello', async ({ message, say }) => {
})();
```
+
+
+
+```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET,
+});
+
+// Listens to incoming messages that contain "hello"
+app.message('hello', async ({ message, say }) => {
+ // say() sends a message to the channel where the event was triggered
+ await say(`Hey there <@${message.user}>!`);
+});
+
+(async () => {
+ // Start your app
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
If you restart your app, so long as your bot user has been added to the channel/DM, when you send any message that contains "hello", it will respond.
This is a basic example, but it gives you a place to start customizing your app based on your own goals. Let's try something a little more interactive by sending a button rather than plain text.
@@ -215,11 +281,22 @@ This is a basic example, but it gives you a place to start customizing your app
To use features like buttons, select menus, datepickers, modals, and shortcuts, youâll need to enable interactivity. Head over to **Interactivity & Shortcuts** in your app configuration.
-:::tip
-You'll notice that with Socket Mode on, basic interactivity is enabled for us by default, so no further action here is needed. If you're using HTTP, you'll need to supply a [Request URL](https://api.slack.com/apis/connections/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls) for Slack to send events to.
+
+
+
+With Socket Mode on, basic interactivity is enabled for us by default, so no further action here is needed
+
+
+
+
+Similar to events, you'll need to specify a Request URL for Slack to send the action (such as *user clicked a button*).
-:::
+
+By default, Bolt uses the same endpoint for interactive components that it uses for events, so use the same request URL as above (in the example, it was `https://8e8ec2d7.ngrok.io/slack/events`). Press the **Save Changes** button in the lower right hand corner, and that's it. Your app is set up to handle interactivity!
+
+
+
When interactivity is enabled, interactions with shortcuts, modals, or interactive components (such as buttons, select menus, and datepickers) will be sent to your app as events.
@@ -229,6 +306,9 @@ Now, letâs go back to your appâs code and add logic to handle those events:
Below, the code from the last section is modified to send a message containing a button rather than just a string:
+
+
+
```javascript
const { App } = require('@slack/bolt');
@@ -275,6 +355,53 @@ app.message('hello', async ({ message, say }) => {
})();
```
+
+
+
+```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET
+});
+
+// Listens to incoming messages that contain "hello"
+app.message('hello', async ({ message, say }) => {
+ // say() sends a message to the channel where the event was triggered
+ await say({
+ blocks: [
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": `Hey there <@${message.user}>!`
+ },
+ "accessory": {
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Click Me"
+ },
+ "action_id": "button_click"
+ }
+ }
+ ],
+ text: `Hey there <@${message.user}>!`
+ });
+});
+
+(async () => {
+ // Start your app
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
The value inside of `say()` is now an object that contains an array of `blocks`. Blocks are the building components of a Slack message and can range from text to images to datepickers. In this case, your app will respond with a section block that includes a button as an accessory. Since we're using `blocks`, the `text` is a fallback for notifications and accessibility.
You'll notice in the button `accessory` object, there is an `action_id`. This will act as a unique identifier for the button so your app can specify what action it wants to respond to.
@@ -289,23 +416,79 @@ Now, if you restart your app and say "hello" in a channel your app is in, you'll
Let's add a handler to send a followup message when someone clicks the button:
+
+
+
```js reference
https://github.com/slackapi/bolt-js-getting-started-app/blob/main/app.js
```
+
+
+
+ ```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET
+});
+
+// Listens to incoming messages that contain "hello"
+app.message('hello', async ({ message, say }) => {
+ // say() sends a message to the channel where the event was triggered
+ await say({
+ blocks: [
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": `Hey there <@${message.user}>!`
+ },
+ "accessory": {
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Click Me"
+ },
+ "action_id": "button_click"
+ }
+ }
+ ],
+ text: `Hey there <@${message.user}>!`
+ });
+});
+
+app.action('button_click', async ({ body, ack, say }) => {
+ // Acknowledge the action
+ await ack();
+ await say(`<@${body.user.id}> clicked the button`);
+});
+
+(async () => {
+ // Start your app
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
You can see that we used `app.action()` to listen for the `action_id` that we named `sample_button`. If you restart your app and click the button, you'll see a new message from your app that says you clicked the button.
---
## Next steps {#next-steps}
-You just built your first [Bolt for JavaScript app](https://github.com/slackapi/bolt-js-getting-started-app) with Socket Mode! ð
+You just built your first [Bolt for JavaScript app](https://github.com/slackapi/bolt-js-getting-started-app)! ð
Now that you have a basic app up and running, you can start exploring how to make your Bolt app stand out. Here are some ideas about what to explore next:
-* Read through the basic concepts pages to learn about the different methods and features your Bolt app has access to.
+* Read through the concepts pages to learn about the different methods and features your Bolt app has access to.
* Explore the different events your bot can listen to with the [`events()`](/concepts/event-listening) method. All of the events are listed [on the API site](https://api.slack.com/events).
* Bolt allows you to [call Web API methods](/concepts/web-api) with the client attached to your app. There are [over 200 methods](https://api.slack.com/methods) on our API site.
-* Learn more about the different token types [on our API site](https://api.slack.com/docs/token-types). Your app may need different tokens depending on the actions you want it to perform. For apps that do not use Socket Mode, typically only a bot (`xoxb`) token is required. For example of this, see [Getting Started with HTTP](/tutorial/getting-started-http).
\ No newline at end of file
+* Learn more about the different token types [on our API site](https://api.slack.com/docs/token-types). Your app may need different tokens depending on the actions you want it to perform.
\ No newline at end of file
diff --git a/docs/content/advanced/conversation-store.md b/docs/content/legacy/conversation-store.md
similarity index 100%
rename from docs/content/advanced/conversation-store.md
rename to docs/content/legacy/conversation-store.md
diff --git a/docs/content/tutorial/hubot-migration.md b/docs/content/legacy/hubot-migration.md
similarity index 99%
rename from docs/content/tutorial/hubot-migration.md
rename to docs/content/legacy/hubot-migration.md
index 3f2ef5b2e..2aa2a1c33 100644
--- a/docs/content/tutorial/hubot-migration.md
+++ b/docs/content/legacy/hubot-migration.md
@@ -1,15 +1,13 @@
---
title: Migrating apps from Hubot to Bolt for JavaScript
-slug: hubot-migration
+slug: /tutorial/hubot-migration
lang: en
-layout: tutorial
---
Bolt was created to reduce the time and complexity it takes to build Slack apps. It provides Slack developers a single interface to build using modern features and best practices. This guide is meant to step you through the process of migrating your app from using [Hubot](https://hubot.github.com/docs/) to Bolt for JavaScript.
If you already have an [app with a bot user](https://api.slack.com/bot-users#getting-started) or if youâre looking for code samples that translate Hubot code to Bolt for JavaScript code, you may find it valuable to start by reading through the [example script in the Bolt for JavaScript repository](https://github.com/slackapi/bolt-js/blob/master/examples/hubot-example/script.js).
-
---
### Setting the stage {#setting-the-stage}
diff --git a/docs/content/legacy/steps-from-apps.md b/docs/content/legacy/steps-from-apps.md
new file mode 100644
index 000000000..659786c2d
--- /dev/null
+++ b/docs/content/legacy/steps-from-apps.md
@@ -0,0 +1,198 @@
+---
+title: Steps from Apps
+lang: en
+slug: /concepts/steps-from-apps
+---
+
+:::danger
+
+Steps from Apps is a deprecated feature.
+
+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.
+
+:::
+
+Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows).
+
+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 step from app to function.
+
+Read more about steps from apps in the [API documentation](https://api.slack.com/legacy/workflows/steps).
+
+---
+
+## Creating steps from apps
+
+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 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 stepâs events using the callbacks provided in the configuration object.
+
+```javascript
+const { App, WorkflowStep } = require('@slack/bolt');
+
+// Initiate the Bolt app as you normally would
+const app = new App({
+ signingSecret: process.env.SLACK_SIGNING_SECRET,
+ token: process.env.SLACK_BOT_TOKEN,
+});
+
+// Create a new WorkflowStep instance
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {},
+});
+
+app.step(ws);
+```
+
+## Adding or editing steps from apps
+
+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 [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`.
+
+To learn more about opening configuration modals, [read the documentation](https://api.slack.com/workflows/steps#handle_config_view).
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {
+ await ack();
+
+ const blocks = [
+ {
+ type: 'input',
+ block_id: 'task_name_input',
+ element: {
+ type: 'plain_text_input',
+ action_id: 'name',
+ placeholder: {
+ type: 'plain_text',
+ text: 'Add a task name',
+ },
+ },
+ label: {
+ type: 'plain_text',
+ text: 'Task name',
+ },
+ },
+ {
+ type: 'input',
+ block_id: 'task_description_input',
+ element: {
+ type: 'plain_text_input',
+ action_id: 'description',
+ placeholder: {
+ type: 'plain_text',
+ text: 'Add a task description',
+ },
+ },
+ label: {
+ type: 'plain_text',
+ text: 'Task description',
+ },
+ },
+ ];
+
+ await configure({ blocks });
+ },
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {},
+});
+```
+
+## Saving step configurations
+
+After the configuration modal is opened, your app will listen for the `view_submission` event. The `save` callback in your `WorkflowStep` configuration will be run when this event is received.
+
+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 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
+
+To learn more about how to structure these parameters, [read the documentation](https://api.slack.com/reference/workflows/workflow_step).
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, view, update }) => {
+ await ack();
+
+ const { values } = view.state;
+ const taskName = values.task_name_input.name;
+ const taskDescription = values.task_description_input.description;
+
+ const inputs = {
+ taskName: { value: taskName.value },
+ taskDescription: { value: taskDescription.value }
+ };
+
+ const outputs = [
+ {
+ type: 'text',
+ name: 'taskName',
+ label: 'Task name',
+ },
+ {
+ type: 'text',
+ name: 'taskDescription',
+ label: 'Task description',
+ }
+ ];
+
+ await update({ inputs, outputs });
+ },
+ execute: async ({ step, complete, fail }) => {},
+});
+```
+
+## Executing steps from apps
+
+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 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.
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {
+ const { inputs } = step;
+
+ const outputs = {
+ taskName: inputs.taskName.value,
+ taskDescription: inputs.taskDescription.value,
+ };
+
+ // signal back to Slack that everything was successful
+ await complete({ outputs });
+ // NOTE: If you run your app with processBeforeResponse: true option,
+ // `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('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('step from app execution failure registered'); });
+ },
+});
+```
diff --git a/docs/content/tutorial/migration-v2.md b/docs/content/migration/migration-v2.md
similarity index 99%
rename from docs/content/tutorial/migration-v2.md
rename to docs/content/migration/migration-v2.md
index 32b851037..f7b5b2dff 100644
--- a/docs/content/tutorial/migration-v2.md
+++ b/docs/content/migration/migration-v2.md
@@ -1,7 +1,7 @@
---
title: Migrating to V2
-slug: migration-v2
-lang: en---
+slug: /tutorial/migration-v2
+lang: en
---
This guide will walk you through the process of updating your app from using `@slack/bolt@1.x` to `@slack/bolt@2.x`. There are a few changes you'll need to make but for most apps, these changes can be applied in 5 - 15 minutes.
diff --git a/docs/content/tutorial/migration-v3.md b/docs/content/migration/migration-v3.md
similarity index 99%
rename from docs/content/tutorial/migration-v3.md
rename to docs/content/migration/migration-v3.md
index 73aa4c6b6..b453984a2 100644
--- a/docs/content/tutorial/migration-v3.md
+++ b/docs/content/migration/migration-v3.md
@@ -1,6 +1,6 @@
---
title: Migrating to V3
-slug: migration-v3
+slug: /tutorial/migration-v3
lang: en
---
diff --git a/docs/content/tutorial/migration-v4.md b/docs/content/migration/migration-v4.md
similarity index 96%
rename from docs/content/tutorial/migration-v4.md
rename to docs/content/migration/migration-v4.md
index 75097bf84..cadc5233d 100644
--- a/docs/content/tutorial/migration-v4.md
+++ b/docs/content/migration/migration-v4.md
@@ -1,6 +1,6 @@
---
title: Migrating to V4
-slug: migration-v4
+slug: /tutorial/migration-v4
lang: en
---
@@ -94,7 +94,7 @@ import { defaultProcessEventHandler } from '@slack/bolt';
### ð Built-in middleware changes {#built-in-middleware-changes}
-Two [built-in middlewares](../reference#built-in-listener-middleware-functions), `ignoreSelf` and `directMention`, previously needed to be invoked as a function in order to _return_ a middleware. These two built-in middlewares were not parameterized in the sense that they should just be used directly; as a result, you no longer should invoke them and instead pass them directly.
+Two [built-in middlewares](../reference#built-in-middleware-functions), `ignoreSelf` and `directMention`, previously needed to be invoked as a function in order to _return_ a middleware. These two built-in middlewares were not parameterized in the sense that they should just be used directly; as a result, you no longer should invoke them and instead pass them directly.
As an example, previously you may have leveraged `directMention` like this:
diff --git a/docs/content/reference.md b/docs/content/reference.md
index 44e9f1fec..a71dab74b 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 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.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/steps-from-apps).
| `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 steps from apps [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-from-apps). |
| `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
deleted file mode 100644
index 0622d17a4..000000000
--- a/docs/content/steps/adding-editing-steps.md
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Adding or editing steps from apps
-lang: en
-slug: /concepts/adding-editing-steps
----
-
-:::danger
-
-Steps from Apps are a deprecated feature.
-
-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 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 [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`.
-
-To learn more about opening configuration modals, [read the documentation](https://api.slack.com/workflows/steps#handle_config_view).
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {
- await ack();
-
- const blocks = [
- {
- type: 'input',
- block_id: 'task_name_input',
- element: {
- type: 'plain_text_input',
- action_id: 'name',
- placeholder: {
- type: 'plain_text',
- text: 'Add a task name',
- },
- },
- label: {
- type: 'plain_text',
- text: 'Task name',
- },
- },
- {
- type: 'input',
- block_id: 'task_description_input',
- element: {
- type: 'plain_text_input',
- action_id: 'description',
- placeholder: {
- type: 'plain_text',
- text: 'Add a task description',
- },
- },
- label: {
- type: 'plain_text',
- text: 'Task description',
- },
- },
- ];
-
- await configure({ blocks });
- },
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {},
-});
-```
diff --git a/docs/content/steps/creating-steps.md b/docs/content/steps/creating-steps.md
deleted file mode 100644
index f39714ede..000000000
--- a/docs/content/steps/creating-steps.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-title: Creating steps from apps
-lang: en
-slug: /concepts/creating-steps
----
-
-:::danger
-
-Steps from Apps are a deprecated feature.
-
-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 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 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 stepâs events using the callbacks provided in the configuration object.
-
-```javascript
-const { App, WorkflowStep } = require('@slack/bolt');
-
-// Initiate the Bolt app as you normally would
-const app = new App({
- signingSecret: process.env.SLACK_SIGNING_SECRET,
- token: process.env.SLACK_BOT_TOKEN,
-});
-
-// Create a new WorkflowStep instance
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {},
-});
-
-app.step(ws);
-```
diff --git a/docs/content/steps/executing-steps.md b/docs/content/steps/executing-steps.md
deleted file mode 100644
index 55194cecb..000000000
--- a/docs/content/steps/executing-steps.md
+++ /dev/null
@@ -1,49 +0,0 @@
----
-title: Executing steps from apps
-lang: en
-slug: /concepts/executing-steps
----
-
-:::danger
-
-Steps from Apps are a deprecated feature.
-
-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 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 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.
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {
- const { inputs } = step;
-
- const outputs = {
- taskName: inputs.taskName.value,
- taskDescription: inputs.taskDescription.value,
- };
-
- // signal back to Slack that everything was successful
- await complete({ outputs });
- // NOTE: If you run your app with processBeforeResponse: true option,
- // `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('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('step from app execution failure registered'); });
- },
-});
-```
diff --git a/docs/content/steps/saving-steps.md b/docs/content/steps/saving-steps.md
deleted file mode 100644
index 5f3e4a4ba..000000000
--- a/docs/content/steps/saving-steps.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-title: Saving step configurations
-lang: en
-slug: /concepts/saving-steps
----
-
-:::danger
-
-Steps from Apps are a deprecated feature.
-
-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.
-
-:::
-
-After the configuration modal is opened, your app will listen for the `view_submission` event. The `save` callback in your `WorkflowStep` configuration will be run when this event is received.
-
-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 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
-
-To learn more about how to structure these parameters, [read the documentation](https://api.slack.com/reference/workflows/workflow_step).
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, view, update }) => {
- await ack();
-
- const { values } = view.state;
- const taskName = values.task_name_input.name;
- const taskDescription = values.task_description_input.description;
-
- const inputs = {
- taskName: { value: taskName.value },
- taskDescription: { value: taskDescription.value }
- };
-
- const outputs = [
- {
- type: 'text',
- name: 'taskName',
- label: 'Task name',
- },
- {
- type: 'text',
- name: 'taskDescription',
- label: 'Task description',
- }
- ];
-
- await update({ inputs, outputs });
- },
- execute: async ({ step, complete, fail }) => {},
-});
-```
diff --git a/docs/content/steps/steps.md b/docs/content/steps/steps.md
deleted file mode 100644
index f344894f3..000000000
--- a/docs/content/steps/steps.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Overview of steps from apps
-lang: en
-slug: /concepts/steps
----
-
-:::danger
-
-Steps from Apps are a deprecated feature.
-
-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.
-
-:::
-
----
-
-Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows).
-
-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 step from app to function.
-
-Read more about steps from apps in the [API documentation](https://api.slack.com/legacy/workflows/steps).
diff --git a/docs/content/tutorial/getting-started-http.md b/docs/content/tutorial/getting-started-http.md
deleted file mode 100644
index 8be737eb3..000000000
--- a/docs/content/tutorial/getting-started-http.md
+++ /dev/null
@@ -1,326 +0,0 @@
----
-title: Getting started with Bolt for JavaScript and HTTP
-slug: getting-started-http
-lang: en
----
-
-This guide is meant to walk you through getting up and running with a Slack app using Bolt for JavaScript. Along the way, weâll create a new Slack app, set up your local environment, and develop an app that listens and responds to messages from a Slack workspace.
-
-When youâre finished, youâll have this â¡ïž[Getting Started app](https://github.com/slackapi/bolt-js-getting-started-app) to run, modify, and make your own.
-
----
-
-### Create an app {#create-an-app}
-First thing's first: before you start developing with Bolt, you'll want to [create a Slack app](https://api.slack.com/apps/new).
-
-:::tip
-
-We recommend using a workspace where you won't disrupt real work getting done â [you can create a new one for free](https://slack.com/get-started#create).
-
-:::
-
-After you fill out an app name (_you can change it later_) and pick a workspace to install it to, hit the `Create App` button and you'll land on your app's **Basic Information** page.
-
-This page contains an overview of your app in addition to important credentials you'll need later, like the `Signing Secret` under the **App Credentials** header.
-
-![Basic Information page](/img/basic-information-page.png "Basic Information page")
-
-Look around, add an app icon and description, and then let's start configuring your app. ð©
-
----
-
-### Tokens and installing apps {#tokens-and-installing-apps}
-Slack apps use [OAuth to manage access to Slack's APIs](https://api.slack.com/docs/oauth). When an app is installed, you'll receive a token that the app can use to call API methods.
-
-There are three main token types available to a Slack app: user (`xoxp`), bot (`xoxb`), and app (`xapp`) tokens.
-- [User tokens](https://api.slack.com/authentication/token-types#user) allow you to call API methods on behalf of users after they install or authenticate the app. There may be several user tokens for a single workspace.
-- [Bot tokens](https://api.slack.com/authentication/token-types#bot) are associated with bot users, and are only granted once in a workspace where someone installs the app. The bot token your app uses will be the same no matter which user performed the installation. Bot tokens are the token type that _most_ apps use.
-- [App-level tokens](https://api.slack.com/authentication/token-types#app) represent your app across organizations, including installations by all individual users on all workspaces in a given organization and are commonly used for creating websocket connections to your app.
-
-For brevity, we're going to use bot tokens for this guide.
-
-1. Navigate to the **OAuth & Permissions** on the left sidebar and scroll down to the **Bot Token Scopes** section. Click **Add an OAuth Scope**.
-
-2. For now, we'll just add one scope: [`chat:write`](https://api.slack.com/scopes/chat:write). This grants your app the permission to post messages in channels it's a member of.
-
-3. Scroll up to the top of the OAuth & Permissions page and click **Install App to Workspace**. You'll be led through Slack's OAuth UI, where you should allow your app to be installed to your development workspace.
-
-4. Once you authorize the installation, you'll land on the **OAuth & Permissions** page and see a **Bot User OAuth Access Token**.
-
-![OAuth Tokens](/img/bot-token.png "Bot OAuth Token")
-
-:::tip
-
-Treat your token like a password and [keep it safe](https://api.slack.com/docs/oauth-safety). Your app uses it to post and retrieve information from Slack workspaces.
-
-:::
-
----
-
-### Setting up your project {#setting-up-your-project}
-With the initial configuration handled, it's time to set up a new Bolt project. This is where you'll write the code that handles the logic for your app.
-
-If you donât already have a project, letâs create a new one. Create an empty directory and initialize a new project:
-
-```shell
-mkdir first-bolt-app
-cd first-bolt-app
-npm init
-```
-
-Youâll be prompted with a series of questions to describe your new project (you can accept the defaults by hitting Enter on each prompt if you arenât picky). After youâre done, youâll have a new `package.json` file in your directory.
-
-Before we install the Bolt for JavaScript package to your new project, let's save the **bot token** and **Signing Secret** that were generated when you configured your app.
-
-1. **Copy your Signing Secret from the Basic Information page** and then store it in a new environment variable. The following example works on Linux and macOS; but [similar commands are available on Windows](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153).
-
-```shell
-export SLACK_SIGNING_SECRET=
-```
-
-2. **Copy your bot (xoxb) token from the OAuth & Permissions page** and store it in another environment variable.
-```shell
-export SLACK_BOT_TOKEN=xoxb-
-```
-
-:::warning
-
-Remember to keep your token and signing secret secure. At a minimum, you should avoid checking them into public version control, and access them via environment variables as we've done above. Checkout the API documentation for more on [best practices for app security](https://api.slack.com/authentication/best-practices).
-
-:::
-
-Now, let's create your app. Install the `@slack/bolt` package and save it to your `package.json` dependencies using the following command:
-
-```shell
-npm install @slack/bolt
-```
-
-Create a new entrypoint file called `app.js` in this directory and add the following code:
-
-```javascript
-const { App } = require('@slack/bolt');
-
-// Initializes your app with your bot token and signing secret
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-(async () => {
- // Start your app
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-Save your `app.js` file, then on the command line run the following:
-
-```script
-node app.js
-```
-
-Your app should let you know that it's up and running. ð
-
----
-
-### Setting up events with HTTP {#setting-up-events-with-http}
-Your app behaves similarly to people on your team â it can post messages, add emoji reactions, and listen and respond to events.
-
-To listen for events happening in a Slack workspace (like when a message is posted or when a reaction is posted to a message) you'll use the [Events API to subscribe to event types](https://api.slack.com/events-api).
-
-Let's enable events for your app:
-
-1. Go back to your app configuration page (click on the app from your [app management page](https://api.slack.com/apps)). Click **Event Subscriptions** on the left sidebar. Toggle the switch labeled **Enable Events**.
-
-2. Add your Request URL. Slack will send HTTP POST requests corresponding to events to this [Request URL](https://api.slack.com/apis/connections/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls) endpoint. Bolt uses the `/slack/events` path to listen to all incoming requests (whether shortcuts, events, or interactivity payloads). When configuring your Request URL within your app configuration, you'll append `/slack/events`, e.g. `https:///slack/events`. ð¡
-
-:::info
-
-For local development, you can use a proxy service like [ngrok](https://ngrok.com/) to create a public URL and tunnel requests to your development environment. Refer to [ngrok's getting started guide](https://ngrok.com/docs#getting-started-expose) on how to create this tunnel.
-
-:::
-
-
-Finally, it's time to tell Slack what events we'd like to listen for. Under **Event Subscriptions**, toggle the switch labeled **Enable Events**.
-
-When an event occurs, Slack will send your app information about the event, like the user that triggered it and the channel it occurred in. Your app will process the details and can respond accordingly.
-
-Scroll down to **Subscribe to Bot Events**. There are four events related to messages:
-- [`message.channels`](https://api.slack.com/events/message.channels) listens for messages in public channels that your app is added to
-- [`message.groups`](https://api.slack.com/events/message.groups) listens for messages in ð private channels that your app is added to
-- [`message.im`](https://api.slack.com/events/message.im) listens for messages in your app's DMs with users
-- [`message.mpim`](https://api.slack.com/events/message.mpim) listens for messages in multi-person DMs that your app is added to
-
-If you want your bot to listen to messages from everywhere it is added to, choose all four message events. After youâve selected the events you want your bot to listen to, click the green **Save Changes** button.
-
----
-### Listening and responding to a message {#listening-and-responding-to-a-message}
-Your app is now ready for some logic. Let's start by using the `message()` method to attach a listener for messages.
-
-The following example listens and responds to all messages in channels/DMs where your app has been added that contain the word "hello":
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET,
-});
-
-// Listens to incoming messages that contain "hello"
-app.message('hello', async ({ message, say }) => {
- // say() sends a message to the channel where the event was triggered
- await say(`Hey there <@${message.user}>!`);
-});
-
-(async () => {
- // Start your app
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-If you restart your app, so long as your bot user has been added to the channel/DM, when you send any message that contains "hello", it will respond.
-
-This is a basic example, but it gives you a place to start customizing your app based on your own goals. Let's try something a little more interactive by sending a button rather than plain text.
-
----
-
-### Sending and responding to actions {#sending-and-responding-to-actions}
-
-To use features like buttons, select menus, datepickers, modals, and shortcuts, youâll need to enable interactivity. Similar to events, you'll need to specify a Request URL for Slack to send the action (such as *user clicked a button*). Head over to **Interactivity & Shortcuts** in your app configuration.
-
-:::info
-
-By default, Bolt uses the same endpoint for interactive components that it uses for events, so use the same request URL as above (in the example, it was `https://8e8ec2d7.ngrok.io/slack/events`). Press the **Save Changes** button in the lower right hand corner, and that's it. Your app is set up to handle interactivity!
-
-:::
-
-When interactivity is enabled, interactions with shortcuts, modals, or interactive components (such as buttons, select menus, and datepickers) will be sent to your app as events.
-
-Now, letâs go back to your appâs code and add logic to handle those events:
-- First, we'll send a message that contains an interactive component (in this case a button).
-- Next, we'll listen for the action of a user clicking the button before responding
-
-Below, the code from the last section is modified to send a message containing a button rather than just a string:
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-// Listens to incoming messages that contain "hello"
-app.message('hello', async ({ message, say }) => {
- // say() sends a message to the channel where the event was triggered
- await say({
- blocks: [
- {
- "type": "section",
- "text": {
- "type": "mrkdwn",
- "text": `Hey there <@${message.user}>!`
- },
- "accessory": {
- "type": "button",
- "text": {
- "type": "plain_text",
- "text": "Click Me"
- },
- "action_id": "button_click"
- }
- }
- ],
- text: `Hey there <@${message.user}>!`
- });
-});
-
-(async () => {
- // Start your app
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-The value inside of `say()` is now an object that contains an array of `blocks`. Blocks are the building components of a Slack message and can range from text to images to datepickers. In this case, your app will respond with a section block that includes a button as an accessory. Since we're using `blocks`, the `text` is a fallback for notifications and accessibility.
-
-You'll notice in the button `accessory` object, there is an `action_id`. This will act as a unique identifier for the button so your app can specify what action it wants to respond to.
-
-:::tip
-
-The [Block Kit Builder](https://app.slack.com/block-kit-builder) is a simple way to prototype your interactive messages. The builder lets you (or anyone on your team) mockup messages and generates the corresponding JSON that you can paste directly in your app.
-
-:::
-
-Now, if you restart your app and say "hello" in a channel your app is in, you'll see a message with a button. But if you click the button, nothing happens (*yet!*).
-
-Let's add a handler to send a followup message when someone clicks the button:
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-// Listens to incoming messages that contain "hello"
-app.message('hello', async ({ message, say }) => {
- // say() sends a message to the channel where the event was triggered
- await say({
- blocks: [
- {
- "type": "section",
- "text": {
- "type": "mrkdwn",
- "text": `Hey there <@${message.user}>!`
- },
- "accessory": {
- "type": "button",
- "text": {
- "type": "plain_text",
- "text": "Click Me"
- },
- "action_id": "button_click"
- }
- }
- ],
- text: `Hey there <@${message.user}>!`
- });
-});
-
-app.action('button_click', async ({ body, ack, say }) => {
- // Acknowledge the action
- await ack();
- await say(`<@${body.user.id}> clicked the button`);
-});
-
-(async () => {
- // Start your app
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-You can see that we used `app.action()` to listen for the `action_id` that we named `button_click`. If you restart your app and click the button, you'll see a new message from your app that says you clicked the button.
-
----
-
-### Next steps {#next-steps}
-You just built your first [Bolt for JavaScript app](https://github.com/slackapi/bolt-js-getting-started-app)! ð
-
-Now that you have a basic app up and running, you can start exploring how to make your Bolt app stand out. Here are some ideas about what to explore next:
-
-* Read through the Basic concepts to learn about the different methods and features your Bolt app has access to.
-
-* Explore the different events your bot can listen to with the [`events()` method](/concepts/event-listening). All of the events are listed [on the API site](https://api.slack.com/events).
-
-* Bolt allows you to [call Web API methods](/concepts/web-api) with the client attached to your app. There are [over 200 methods](https://api.slack.com/methods) on our API site.
-
-* Learn more about the different token types [on our API site](https://api.slack.com/docs/token-types). Your app may need different tokens depending on the actions you want it to perform. If you are using [Socket Mode](/getting-started) instead of HTTP, an additional (`xapp`) token with `connections:write` scopes is required.
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index 81c195376..14963051a 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -57,7 +57,23 @@ const config = {
redirects: [
{
to: '/getting-started',
- from: ['/tutorial/getting-started'],
+ from: ['/tutorial/getting-started','/tutorial/getting-started-http'],
+ },
+ {
+ to: '/concepts/steps-from-apps',
+ from: [
+ '/concepts/creating-steps',
+ '/concepts/adding-editing-steps',
+ '/concepts/saving-steps',
+ '/concepts/executing-steps'
+ ],
+ },
+ {
+ to: '/concepts/actions',
+ from: [
+ '/concepts/action-listening',
+ '/concepts/action-responding'
+ ],
},
{
to: '/',
diff --git a/docs/i18n/ja-jp/README.md b/docs/i18n/ja-jp/README.md
index 5acce6f8d..c5f04de1a 100644
--- a/docs/i18n/ja-jp/README.md
+++ b/docs/i18n/ja-jp/README.md
@@ -2,7 +2,7 @@
This README describes how the Japanese documentation is created. Please read the [/docs README](./docs/README) for information on _all_ the documentation.
-[Docusaurus](https://docusaurus.io) supports using different languages. Each language is a different version of the same site. The English site is the default. The English page will be viewable if the page is not translated into Japanese.
+[Docusaurus](https://docusaurus.io) supports using different languages. Each language is a different version of the same site. The English site is the default. The English page will be viewable if the page is not translated into Japanese. You do not need to place the English page on the Japanese side of the site though! It is automatically pulled during the build process.
There will be English pages on the Japanese site of the pages are not translated yet. Japanese readers will not miss any content, but they may be confused seeing English and Japanese mixed together. Please give us your thoughts on this setup.
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current.json b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current.json
index c5794d3d0..aa7410656 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current.json
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current.json
@@ -3,26 +3,10 @@
"message": "Next",
"description": "The label for version current"
},
- "sidebar.sidebarJSBolt.category.Basic concepts": {
- "message": "åºæ¬çãªæŠå¿µ",
- "description": "The label for category Basic concepts in sidebar sidebarJSBolt"
- },
- "sidebar.sidebarJSBolt.category.Advanced concepts": {
- "message": "å¿çšã³ã³ã»ãã",
- "description": "The label for category Advanced concepts in sidebar sidebarJSBolt"
- },
"sidebar.sidebarJSBolt.category.Deployments": {
"message": "Deployments",
"description": "The label for category Deployments in sidebar sidebarJSBolt"
},
- "sidebar.sidebarJSBolt.category.Custom functions (Beta)": {
- "message": "Custom functions (Beta)",
- "description": "The label for category Custom functions (Beta) in sidebar sidebarJSBolt"
- },
- "sidebar.sidebarJSBolt.category.Workflow steps (Deprecated)": {
- "message": "ã¯ãŒã¯ãããŒã¹ããã éæšå¥š",
- "description": "The label for category Workflow steps (Deprecated) in sidebar sidebarJSBolt"
- },
"sidebar.sidebarJSBolt.category.Tutorials": {
"message": "ãã¥ãŒããªã¢ã«",
"description": "The label for category Tutorials in sidebar sidebarJSBolt"
@@ -34,5 +18,45 @@
"sidebar.sidebarJSBolt.link.Contributors Guide": {
"message": "è²¢ç®",
"description": "The label for link Contributors Guide in sidebar sidebarJSBolt, linking to https://github.com/SlackAPI/bolt-js/blob/main/.github/contributing.md"
+ },
+ "sidebar.sidebarJSBolt.category.Slack API calls": {
+ "message": "Slack API ã³ãŒã«",
+ "description": "The label for category Slack API calls in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.Events": {
+ "message": "ã€ãã³ã API",
+ "description": "The label for category Events in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.App UI & Interactivity": {
+ "message": "ã€ã³ã¿ã©ã¯ãã£ãã㣠& ã·ã§ãŒãã«ãã",
+ "description": "The label for category Interactivity & Shortcuts in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.App Configuration": {
+ "message": "App ã®èšå®",
+ "description": "The label for category App Configuration in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.Middleware & Context": {
+ "message": "ããã«ãŠã§ã¢ & ã³ã³ããã¹ã",
+ "description": "The label for category Middleware & Context in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.Authorization & Security": {
+ "message": "èªå¯ & ã»ãã¥ãªãã£",
+ "description": "The label for category Authorization & Security in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.Migration Guides": {
+ "message": "ãã€ã°ã¬ãŒã·ã§ã³ã¬ã€ã",
+ "description": "The label for category Migration Guides in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.category.Legacy": {
+ "message": "ã¬ã¬ã·ãŒïŒéæšå¥šïŒ",
+ "description": "The label for category Legacy in sidebar sidebarJSBolt"
+ },
+ "sidebar.sidebarJSBolt.link.Release notes": {
+ "message": "ãªãªãŒã¹ããŒã",
+ "description": "The label for link Release notes in sidebar sidebarJSBolt, linking to https://github.com/slackapi/bolt-js/releases"
+ },
+ "sidebar.sidebarJSBolt.doc.Bolt for JavaScript": {
+ "message": "Bolt for JavaScript",
+ "description": "The label for the doc item Bolt for JavaScript in sidebar sidebarJSBolt, linking to the doc index"
}
}
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-respond.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-respond.md
deleted file mode 100644
index 75d1e3a6d..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-respond.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: ã¢ã¯ã·ã§ã³ãžã®å¿ç
-lang: ja-jp
-slug: /concepts/action-respond
----
-
-ã¢ã¯ã·ã§ã³ãžã®å¿çã«ã¯ã䞻㫠2 ã€ã®ããæ¹ããããŸãã1 ã€ç®ã® (æãäžè¬çãª) ããæ¹ã¯ `say` é¢æ°ã®å©çšã§ãã `say` é¢æ°ã¯ãSlack å
ã®ãªã¯ãšã¹ããçºçããäŒè©±ïŒãã£ã³ãã«ã DMïŒãžã¡ãã»ãŒãžãè¿ããŸãã
-
-ã¢ã¯ã·ã§ã³ã«å¿çãã 2 ã€ç®ã®æ¹æ³ã¯ `respond()` ã§ããããã¯ã¢ã¯ã·ã§ã³ã«çŽä»ããããŠãã `response_url` ãçšããã¡ãã»ãŒãžã®éä¿¡ãã·ã³ãã«ã«è¡ãããã®ãŠãŒãã£ãªãã£ã§ãã
-
-```javascript
-// action_id ã "approve_button" ã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããããªã¬ãŒãããæ¯ã«ããã«ãŠã§ã¢ãåŒã³åºããã
-app.action('approve_button', async ({ ack, say }) => {
- // ã¢ã¯ã·ã§ã³ãªã¯ãšã¹ãã®ç¢ºèª
- await ack();
- await say('Request approved ð');
-});
-```
-
-
-
-`respond()` ã®äœ¿çš
-
-
-`respond()` 㯠`response_url` ãåŒã³åºãããã®ãŠãŒãã£ãªãã£ã§ããããããããçŽæ¥äœ¿ããšããšåæ§ã«åäœããŸããæ°ããã¡ãã»ãŒãžã®ãã€ããŒããšããªãã·ã§ãã«ãªåŒæ°ã§ãã `response_type` (å€ã¯ `in_channel` ãŸã㯠`ephemeral` )ã `replace_original` ã `delete_original` ãå«ã JSON ãªããžã§ã¯ããæž¡ãããšãã§ããŸãã
-
-```javascript
-// "user_select" ã® action_id ãããªã¬ãŒãããã¢ã¯ã·ã§ã³ããªãã¹ã³
-app.action('user_select', async ({ action, ack, respond }) => {
- await ack();
- if (action.type === 'users_select') {
- await respond(`You selected <@${action.selected_user}>`);
- }
-});
-```
-
-
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/custom-steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/custom-steps.md
deleted file mode 100644
index aa4f344cc..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/custom-steps.md
+++ /dev/null
@@ -1,167 +0,0 @@
----
-title: Listening and responding to custom steps
-lang: ja-jp
-slug: /concepts/custom-steps
----
-
-Your app can use the `function()` method to listen to incoming [custom step requests](https://api.slack.com/automation/functions/custom-bolt). Custom steps are used in Workflow Builder to build workflows. The method requires a step `callback_id` of type string. This `callback_id` must also be defined in your [Function](https://api.slack.com/concepts/manifests#functions) definition. Custom steps must be finalized using the `complete()` or `fail()` listener arguments to notify Slack that your app has processed the request.
-
-* `complete()` requires one argument: an `outputs` object. It ends your custom step **successfully** and provides an object containing the outputs of your custom step as per its definition.
-* `fail()` requires **one** argument: `error` of type string. It ends your custom step **unsuccessfully** and provides a message containing information regarding why your custom step failed.
-
-You can reference your custom step's inputs using the `inputs` listener argument.
-
-```js
-// This sample custom step formats an input and outputs it
-app.function('sample_custom_step', async ({ inputs, complete, fail, logger }) => {
- try {
- const { message } = inputs;
-
- await complete({
- outputs: {
- message: `:wave: You submitted the following message: \n\n>${message}`
- }
- });
- } catch (error) {
- logger.error(error);
- await fail({ error: `Failed to handle a function request: ${error}` });
- }
-});
-```
-
-
-
-Example app manifest definition
-
-
-```json
-...
-"functions": {
- "sample_custom_step": {
- "title": "Sample custom step",
- "description": "Run a sample custom step",
- "input_parameters": {
- "message": {
- "type": "string",
- "title": "Message",
- "description": "A message to be formatted by a custom step",
- "is_required": true,
- }
- },
- "output_parameters": {
- "message": {
- "type": "string",
- "title": "Messge",
- "description": "A formatted message",
- "is_required": true,
- }
- }
- }
-}
-```
-
-
-
----
-
-### Listening to custom step interactivity events
-
-Your app's custom steps may create interactivity points for users, for example: Post a message with a button
-
-If such interaction points originate from a custom step execution, the events sent to your app representing the end-user interaction with these points are considered to be _function-scoped interactivity events_. These interactivity events can be handled by your app using the same concepts we covered earlier, such as [Listening to actions](/concepts/action-listening).
-
-_function-scoped interactivity events_ will contain data related to the custom step (`function_executed` event) they were spawned from, such as custom step `inputs` and access to `complete()` and `fail()` listener arguments.
-
-Your app can skip calling `complete()` or `fail()` in the `function()` handler method if the custom step creates an interaction point that requires user interaction before the step can end. However, in the relevant interactivity handler method, your app must invoke `complete()` or `fail()` to notify Slack that the custom step has been processed.
-
-Youâll notice in all interactivity handler examples, `ack()` is used. It is required to call the `ack()` function within an interactivity listener to acknowledge that the request was received from Slack. This is discussed in the [acknowledging requests section](/concepts/acknowledge).
-
-```js
-/** This sample custom step posts a message with a button */
-app.function('custom_step_button', async ({ client, inputs, fail, logger }) => {
- try {
- const { user_id } = inputs;
-
- await client.chat.postMessage({
- channel: user_id,
- text: 'Click the button to signal the function has completed',
- blocks: [
- {
- type: 'section',
- text: {
- type: 'mrkdwn',
- text: 'Click the button to signal the function has completed',
- },
- accessory: {
- type: 'button',
- text: {
- type: 'plain_text',
- text: 'Complete function',
- },
- action_id: 'sample_button',
- },
- },
- ],
- });
- } catch (error) {
- logger.error(error);
- await fail({ error: `Failed to handle a function request: ${error}` });
- }
-});
-
-/** Your listener will be called every time a block element with the action_id "sample_button" is triggered */
-app.action('sample_button', async ({ ack, body, client, complete, fail, logger }) => {
- try {
- await ack();
-
- const { channel, message, user } = body;
- // Functions should be marked as successfully completed using `complete` or
- // as having failed using `fail`, else they'll remain in an 'In progress' state.
- await complete({ outputs: { user_id: user.id } });
-
- await client.chat.update({
- channel: channel.id,
- ts: message.ts,
- text: 'Function completed successfully!',
- });
- } catch (error) {
- logger.error(error);
- await fail({ error: `Failed to handle a function request: ${error}` });
- }
-});
-```
-
-
-
-Example app manifest definition
-
-
-```json
-...
-"functions": {
- "custom_step_button": {
- "title": "Custom step with a button",
- "description": "Custom step that waits for a button click",
- "input_parameters": {
- "user_id": {
- "type": "slack#/types/user_id",
- "title": "User",
- "description": "The recipient of a message with a button",
- "is_required": true,
- }
- },
- "output_parameters": {
- "user_id": {
- "type": "slack#/types/user_id",
- "title": "User",
- "description": "The user that completed the function",
- "is_required": true
- }
- }
- }
-}
-```
-
-
-
-Learn more about responding to interactivity, see the [Slack API documentation](https://api.slack.com/automation/functions/custom-bolt#interactivity).
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/acknowledge.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/acknowledge.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/acknowledge.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/acknowledge.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-listening.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/actions.md
similarity index 60%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-listening.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/actions.md
index bfe5edbe1..510ac555f 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-listening.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/actions.md
@@ -1,11 +1,13 @@
---
-title: ã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
+title: ã¢ã¯ã·ã§ã³
lang: ja-jp
-slug: /concepts/action-listening
+slug: /concepts/actions
---
Bolt ã¢ããªã¯ `action` ã¡ãœãããçšããŠããã¿ã³ã®ã¯ãªãã¯ãã¡ãã¥ãŒã®éžæãã¡ãã»ãŒãžã·ã§ãŒãã«ãããªã©ã®ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ããªãã¹ã³ããããšãã§ããŸãã
+## ã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
+
ã¢ã¯ã·ã§ã³ã¯æåååã® `action_id` ãŸã㯠RegExp ãªããžã§ã¯ãã§ãã£ã«ã¿ãªã³ã°ã§ããŸãã `action_id` ã¯ãSlack ãã©ãããã©ãŒã äžã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ãã®äžæã®èå¥åãšããŠæ©èœããŸãã
ãã¹ãŠã® `action()` ã®äŸã§ `ack()` ã䜿çšãããŠããããšã«æ³šç®ããŠãã ãããSlack ãããªã¯ãšã¹ããåä¿¡ããããšã確èªããããã«ãã¢ã¯ã·ã§ã³ãªã¹ããŒå
㧠`ack()` é¢æ°ãåŒã³åºãå¿
èŠããããŸããããã«ã€ããŠã¯ãã[ãªã¯ãšã¹ãã®ç¢ºèª](/concepts/acknowledge)ã ã»ã¯ã·ã§ã³ã§èª¬æããŠããŸãã
@@ -22,10 +24,7 @@ app.action('approve_button', async ({ ack }) => {
});
```
-
-
-å¶çŽä»ããªããžã§ã¯ãã䜿çšããã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
-
+### å¶çŽä»ããªããžã§ã¯ãã䜿çšããã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
å¶çŽä»ãã®ãªããžã§ã¯ãã䜿ã£ãŠã `callback_id` ã `block_id` ãããã³ `action_id` (ãŸãã¯ãããã®çµã¿åãã) ããªãã¹ã³ããããšãã§ããŸãããªããžã§ã¯ãå
ã®å¶çŽã«ã¯ãæåååãŸã㯠RegExp ãªããžã§ã¯ãã䜿çšã§ããŸãã
@@ -52,4 +51,31 @@ app.action({ action_id: 'select_user', block_id: 'assign_ticket' },
});
```
-
\ No newline at end of file
+## ã¢ã¯ã·ã§ã³ãžã®å¿ç
+
+ã¢ã¯ã·ã§ã³ãžã®å¿çã«ã¯ã䞻㫠2 ã€ã®ããæ¹ããããŸãã1 ã€ç®ã® (æãäžè¬çãª) ããæ¹ã¯ `say` é¢æ°ã®å©çšã§ãã `say` é¢æ°ã¯ãSlack å
ã®ãªã¯ãšã¹ããçºçããäŒè©±ïŒãã£ã³ãã«ã DMïŒãžã¡ãã»ãŒãžãè¿ããŸãã
+
+ã¢ã¯ã·ã§ã³ã«å¿çãã 2 ã€ç®ã®æ¹æ³ã¯ `respond()` ã§ããããã¯ã¢ã¯ã·ã§ã³ã«çŽä»ããããŠãã `response_url` ãçšããã¡ãã»ãŒãžã®éä¿¡ãã·ã³ãã«ã«è¡ãããã®ãŠãŒãã£ãªãã£ã§ãã
+
+```javascript
+// action_id ã "approve_button" ã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããããªã¬ãŒãããæ¯ã«ããã«ãŠã§ã¢ãåŒã³åºããã
+app.action('approve_button', async ({ ack, say }) => {
+ // ã¢ã¯ã·ã§ã³ãªã¯ãšã¹ãã®ç¢ºèª
+ await ack();
+ await say('Request approved ð');
+});
+```
+
+### `respond()` ã®äœ¿çš
+
+`respond()` 㯠`response_url` ãåŒã³åºãããã®ãŠãŒãã£ãªãã£ã§ããããããããçŽæ¥äœ¿ããšããšåæ§ã«åäœããŸããæ°ããã¡ãã»ãŒãžã®ãã€ããŒããšããªãã·ã§ãã«ãªåŒæ°ã§ãã `response_type` (å€ã¯ `in_channel` ãŸã㯠`ephemeral` )ã `replace_original` ã `delete_original` ãå«ã JSON ãªããžã§ã¯ããæž¡ãããšãã§ããŸãã
+
+```javascript
+// "user_select" ã® action_id ãããªã¬ãŒãããã¢ã¯ã·ã§ã³ããªãã¹ã³
+app.action('user_select', async ({ action, ack, respond }) => {
+ await ack();
+ if (action.type === 'users_select') {
+ await respond(`You selected <@${action.selected_user}>`);
+ }
+});
+```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/authenticating-oauth.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/authenticating-oauth.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/authenticating-oauth.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/authenticating-oauth.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/authorization.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/authorization.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/authorization.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/authorization.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/commands.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/commands.md
similarity index 94%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/commands.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/commands.md
index 5616bf65e..c71b1d153 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/commands.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/commands.md
@@ -10,7 +10,7 @@ slug: /concepts/commands
ã¢ããªãã¹ã©ãã·ã¥ã³ãã³ãã®ãªã¯ãšã¹ããåãåã£ãããšã `ack()` ã®å®è¡ã«ãã£ãŠ Slack ã«éç¥ããå¿
èŠããããŸãã
-ã¹ã©ãã·ã¥ã³ãã³ããžã®å¿çã«ã¯ 2 ã€ã®ããæ¹ããããŸãã1 ã€ç®ã®æ¹æ³ã¯ãæååãŸã㯠JSON ãã€ããŒããåãåã `say()` ã§ã2 ã€ç®ã¯ `response_url` ãç°¡åã«å©çšããããã®ãŠãŒãã£ãªãã£ã§ãã `respond()` ã§ãããããã«ã€ããŠã¯ãã[ã¢ã¯ã·ã§ã³ãžã®å¿ç](/concepts/action-respond)ãã»ã¯ã·ã§ã³ã§è©³ãã説æããŠããŸãã
+ã¹ã©ãã·ã¥ã³ãã³ããžã®å¿çã«ã¯ 2 ã€ã®ããæ¹ããããŸãã1 ã€ç®ã®æ¹æ³ã¯ãæååãŸã㯠JSON ãã€ããŒããåãåã `say()` ã§ã2 ã€ç®ã¯ `response_url` ãç°¡åã«å©çšããããã®ãŠãŒãã£ãªãã£ã§ãã `respond()` ã§ãããããã«ã€ããŠã¯ãã[ã¢ã¯ã·ã§ã³ãžã®å¿ç](/concepts/actions)ãã»ã¯ã·ã§ã³ã§è©³ãã説æããŠããŸãã
Slack ã¢ããªã®ç®¡çç»é¢ã§ã¹ã©ãã·ã¥ã³ãã³ããèšå®ãããšãããã®ã¹ã©ãã·ã¥ã³ãã³ãã® Request URL ã«ïŒ`https://{ãã¡ã€ã³}` ã«ç¶ããŠïŒ `/slack/events` ãæå®ããããã«ããŠãã ããã
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/context.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/context.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/context.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/context.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/creating-modals.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/creating-modals.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/creating-modals.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/creating-modals.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/custom-routes.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-routes.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/custom-routes.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-routes.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/deferring-initialization.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/deferring-initialization.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/deferring-initialization.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/deferring-initialization.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/error-handling.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/error-handling.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/error-handling.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/error-handling.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/event-listening.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/event-listening.md
similarity index 51%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/event-listening.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/event-listening.md
index 7dbadd081..8f3c3a0bd 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/event-listening.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/event-listening.md
@@ -25,29 +25,4 @@ app.event('team_join', async ({ event, client, logger }) => {
logger.error(error);
}
});
-```
-
-
-
-ã¡ãã»ãŒãžã®ãµãã¿ã€ãã®ãã£ã«ã¿ãªã³ã°
-
-
-`message()` ãªã¹ããŒã¯ `event('message')` ãšç䟡ã®æ©èœãæäŸããŸãã
-
-ã€ãã³ãã®ãµãã¿ã€ãããã£ã«ã¿ãªã³ã°ãããå Žåãçµã¿èŸŒã¿ã® `subtype()` ããã«ãŠã§ã¢ã䜿çšã§ããŸãã `message_changed` ã `message_replied` ã®ãããªäžè¬çãªã¡ãã»ãŒãžãµãã¿ã€ãã®æ
å ±ã¯ã[ã¡ãã»ãŒãžã€ãã³ãã®ããã¥ã¡ã³ã](https://api.slack.com/events/message#message_subtypes)ãåç
§ããŠãã ããã
-
-```javascript
-// ããã±ãŒãžãã subtype ãã€ã³ããŒã
-const { App, subtype } = require('@slack/bolt');
-
-// user ããã®ã¡ãã»ãŒãžã®ç·šéãšäžèŽ
-app.message(subtype('message_changed'), ({ event, logger }) => {
- // ãã® if æ㯠TypeScript ã§ã³ãŒããæžãéã«å¿
èŠ
- if (event.subtype === 'message_changed'
- && !event.message.subtype
- && !event.previous_message.subtype) {
- logger.info(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`);
- }
-});
-```
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/global-middleware.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/global-middleware.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/global-middleware.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/global-middleware.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/listener-middleware.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/listener-middleware.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/listener-middleware.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/listener-middleware.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/logging.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/logging.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/logging.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/logging.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/message-listening.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/message-listening.md
similarity index 54%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/message-listening.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/message-listening.md
index 254d3aea1..b03033f37 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/message-listening.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/message-listening.md
@@ -4,7 +4,8 @@ lang: ja-jp
slug: /concepts/message-listening
---
-[ã¢ããªãåä¿¡å¯èœãª](https://api.slack.com/messaging/retrieving#permissions)ã¡ãã»ãŒãžããªãã¹ã³ããã«ã¯ã`message` åã§ãªãã€ãã³ããé€å€ãã `message()` ã¡ãœããã䜿çšããŸãã
+[ã¢ããªãåä¿¡å¯èœãª](https://api.slack.com/messaging/retrieving#permissions)ã¡ãã»ãŒãžããªãã¹ã³ããã«ã¯ã`message` åã§ãªãã€ãã³ããé€å€ãã `message()` ã¡ãœããã䜿çšããŸãã`message()` ãªã¹ããŒã¯ `event('message')` ãšç䟡ã®æ©èœãæäŸããŸãã
+
`message()` ã¯ã`string` åã `RegExp` åã®ãæå®ãã¿ãŒã³ã«äžèŽããªãã¡ãã»ãŒãžãé€å€ãã `pattern` ãã©ã¡ãŒã¿ãŒïŒæå®ã¯å¿
é ã§ã¯ãããŸããïŒãåãä»ããŸãã
@@ -21,10 +22,7 @@ app.message(':wave:', async ({ message, say }) => {
});
```
-
-
-æ£èŠè¡šçŸïŒRegExpïŒ ãã¿ãŒã³ã®äœ¿çš
-
+## æ£èŠè¡šçŸïŒRegExpïŒ ãã¿ãŒã³ã®äœ¿çš
æååã®ä»£ããã« æ£èŠè¡šçŸ(RegExp) ãã¿ãŒã³ã䜿çšãããšããã现ãããªãããã³ã°ãå¯èœã§ãã
@@ -39,4 +37,21 @@ app.message(/^(hi|hello|hey).*/, async ({ context, say }) => {
});
```
-
\ No newline at end of file
+## ã¡ãã»ãŒãžã®ãµãã¿ã€ãã®ãã£ã«ã¿ãªã³ã°
+
+
+ã€ãã³ãã®ãµãã¿ã€ãããã£ã«ã¿ãªã³ã°ãããå Žåãçµã¿èŸŒã¿ã® `subtype()` ããã«ãŠã§ã¢ã䜿çšã§ããŸãã `message_changed` ã `message_replied` ã®ãããªäžè¬çãªã¡ãã»ãŒãžãµãã¿ã€ãã®æ
å ±ã¯ã[ã¡ãã»ãŒãžã€ãã³ãã®ããã¥ã¡ã³ã](https://api.slack.com/events/message#message_subtypes)ãåç
§ããŠãã ããã
+
+```javascript
+// ããã±ãŒãžãã subtype ãã€ã³ããŒã
+const { App, subtype } = require('@slack/bolt');
+
+// user ããã®ã¡ãã»ãŒãžã®ç·šéãšäžèŽ
+app.message(subtype('message_changed'), ({ event, logger }) => {
+ // ãã® if æ㯠TypeScript ã§ã³ãŒããæžãéã«å¿
èŠ
+ if (event.subtype === 'message_changed'
+ && !event.message.subtype
+ && !event.previous_message.subtype) {
+ logger.info(`The user ${event.message.user} changed their message from ${event.previous_message.text} to ${event.message.text}`);
+ }
+});
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/message-sending.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/message-sending.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/message-sending.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/message-sending.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/publishing-views.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/publishing-views.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/publishing-views.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/publishing-views.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/receiver.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/receiver.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/receiver.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/receiver.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/options.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/select-menu-options.md
similarity index 92%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/options.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/select-menu-options.md
index 430e9b4f5..2a81d89ec 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/options.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/select-menu-options.md
@@ -4,7 +4,7 @@ lang: ja-jp
slug: /concepts/options
---
-`options()` ã¡ãœããã¯ãSlack ããã®ãªãã·ã§ã³ïŒã»ã¬ã¯ãã¡ãã¥ãŒå
ã®åçãªéžæè¢ïŒããªã¯ãšã¹ããããã€ããŒãããªãã¹ã³ããŸãã [`action()` ãšåæ§](/concepts/action-listening)ã«ãæåååã® `action_id` ãŸãã¯å¶çŽä»ããªããžã§ã¯ããå¿
èŠã§ãã
+`options()` ã¡ãœããã¯ãSlack ããã®ãªãã·ã§ã³ïŒã»ã¬ã¯ãã¡ãã¥ãŒå
ã®åçãªéžæè¢ïŒããªã¯ãšã¹ããããã€ããŒãããªãã¹ã³ããŸãã [`action()` ãšåæ§](/concepts/actions)ã«ãæåååã® `action_id` ãŸãã¯å¶çŽä»ããªããžã§ã¯ããå¿
èŠã§ãã
`external_select` ã¡ãã¥ãŒã«ã¯ `action_id` ã䜿çšããããšãããããããŸããããã€ã¢ãã°ã¯ãŸã Block Kit ããµããŒãããŠããªããããå¶çŽãªããžã§ã¯ããçšã㊠`callback_id` ã§ãã£ã«ã¿ãªã³ã°ããå¿
èŠããããŸãã
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/shortcuts.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/shortcuts.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/shortcuts.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/shortcuts.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/socket-mode.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/socket-mode.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/socket-mode.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/socket-mode.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/token-rotation.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/token-rotation.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/token-rotation.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/token-rotation.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/updating-pushing-views.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/updating-pushing-views.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/updating-pushing-views.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/updating-pushing-views.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/view-submissions.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/view-submissions.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/view-submissions.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/view-submissions.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/web-api.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/web-api.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/web-api.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/web-api.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.mdx
similarity index 70%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.mdx
index 2bfc095af..ccee79ded 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/getting-started.mdx
@@ -9,11 +9,7 @@ lang: ja-jp
ãã®ã¬ã€ãã§ã¯ãBolt ã䜿çšã㊠Slack ã¢ããªãèµ·åãå®è¡ããæ¹æ³ã«ã€ããŠèª¬æããŸãããã®éçšã§ãæ°ãã Slack ã¢ããªãäœæããããŒã«ã«ç°å¢ãèšå®ããSlack ã¯ãŒã¯ã¹ããŒã¹ããã®ã¡ãã»ãŒãžããªãã¹ã³ããŠå¿çããã¢ããªãéçºããŸãã
-:::tip
-
-ãã®ã¬ã€ãã§ã¯[ãœã±ããã¢ãŒã](https://api.slack.com/apis/connections/socket) ãå©çšããŸãããœã±ããã¢ãŒãã¯ãSlack ã¢ããªéçºããšããããå§ããŠã¿ããšããããªãã®ããŒã ã ãã®ããã®ã¢ããªãã€ãããšãã«ããããã®ããæ¹ã§ãããããã§ã« HTTP ãã¢ããªã®ã³ãã¥ãã±ãŒã·ã§ã³ãããã³ã«ãšããŠãããšããã£ãŠãããªããHTTP ã®æ¹åŒã«å¯Ÿå¿ããåæ§ã®ããã¥ã¡ã³ãã§ãã [Bolt å
¥éã¬ã€ãïŒHTTPïŒ](/tutorial/getting-started-http) ãåç
§ããŠãã ããã
-
-:::
+ãã®ã¬ã€ããçµãã£ãããããªãã¯ãã®â¡ïž[Getting Started app](https://github.com/slackapi/bolt-js-getting-started-app)ãå®è¡ããããä¿®æ£ããããèªåã§äœã£ããããããšãã§ããŸãã
---
@@ -79,17 +75,23 @@ npm init
Bolt ããã±ãŒãžãæ°ãããããžã§ã¯ãã«ã€ã³ã¹ããŒã«ããåã«ãã¢ããªã®èšå®æã«çæããããããããŒã¯ã³ãš signing secret (ãµã€ã³èªèšŒ) ãä¿åããŸãããããããã¯ç°å¢å€æ°ãšããŠä¿åããå¿
èŠããããŸãã**ããŒãžã§ã³ç®¡çã§ã¯ä¿åããªã**ã§ãã ããã
-1. **Basic Information ããŒãžãã Signing Secret ãã³ããŒ**ããŠãæ°ããç°å¢å€æ°ã«ä¿åããŸãã次ã®äŸã¯ Linux ãš macOS ã§åäœããŸãããã ãã[Windows ã§ãåæ§ã®ã³ãã³ããå©çšå¯èœ](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153)ã§ãã
+1. **Basic Information ããŒãžãã Signing Secret ãã³ããŒ**ããŠãæ°ããç°å¢å€æ°ã«ä¿åããŸãã次ã®äŸã¯ Linux ãš macOS ã§åäœããŸãããã ãã[Windows ã§ãåæ§ã®ã³ãã³ããå©çšå¯èœ](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153)ã§ãã
+
```shell
export SLACK_SIGNING_SECRET=
```
-2. **OAuth & Permissions ããŒãžããããã (xoxb) ããŒã¯ã³ãã³ããŒ**ãããããå¥ã®ç°å¢å€æ°ã«æ ŒçŽããŸãã
+2. **OAuth & Permissions ããŒãžããããã (xoxb) ããŒã¯ã³ãã³ããŒ**ãããããå¥ã®ç°å¢å€æ°ã«æ ŒçŽããŸãã
+
```shell
export SLACK_BOT_TOKEN=xoxb-
```
-> ð å
šãŠã®ããŒã¯ã³ã¯å®å
šã«ä¿ç®¡ããŠãã ãããå°ãªããšããããªãã¯ãªããŒãžã§ã³ç®¡çã«ãã§ãã¯ã€ã³ãããããªããšã¯é¿ããã¹ãã§ãããããŸããäžã«ãã£ãäŸã®ããã«ç°å¢å€æ°ãä»ããŠã¢ã¯ã»ã¹ããããã«ããŠãã ããã詳现ãªæ
å ±ã¯ [ã¢ããªã®ã»ãã¥ãªãã£ã®ãã¹ããã©ã¯ãã£ã¹](https://api.slack.com/authentication/best-practices)ã®ããã¥ã¡ã³ããåç
§ããŠãã ããã
+:::info
+
+ð å
šãŠã®ããŒã¯ã³ã¯å®å
šã«ä¿ç®¡ããŠãã ãããå°ãªããšããããªãã¯ãªããŒãžã§ã³ç®¡çã«ãã§ãã¯ã€ã³ãããããªããšã¯é¿ããã¹ãã§ãããããŸããäžã«ãã£ãäŸã®ããã«ç°å¢å€æ°ãä»ããŠã¢ã¯ã»ã¹ããããã«ããŠãã ããã詳现ãªæ
å ±ã¯ [ã¢ããªã®ã»ãã¥ãªãã£ã®ãã¹ããã©ã¯ãã£ã¹](https://api.slack.com/authentication/best-practices)ã®ããã¥ã¡ã³ããåç
§ããŠãã ããã
+
+:::
ããã§ã¯ãã¢ããªãäœæããŸãããã次ã®ã³ãã³ãã䜿çšããŠã`@slack/bolt` ããã±ãŒãžãã€ã³ã¹ããŒã«ãã `package.json` äžã§äŸåãã¡ã€ã«ãšããŠä¿åããŸãã
@@ -130,11 +132,19 @@ node app.js
ã¢ããªã¯ã¯ãŒã¯ã¹ããŒã¹å
ã®ä»ã®ã¡ã³ããŒãšåãããã«æ¯ãèããã¡ãã»ãŒãžãæçš¿ããããçµµæåãªã¢ã¯ã·ã§ã³ãè¿œå ããããã€ãã³ãããªãã¹ã³ããŠè¿çãããã§ããŸãã
-Slack ã¯ãŒã¯ã¹ããŒã¹ã§çºçããã€ãã³ãïŒã¡ãã»ãŒãžãæçš¿ããããšãããã¡ãã»ãŒãžã«å¯Ÿãããªã¢ã¯ã·ã§ã³ãã€ãããããšããªã©ïŒããªãã¹ã³ããã«ã¯ã[Events API ã䜿ã£ãŠç¹å®ã®çš®é¡ã®ã€ãã³ãããµãã¹ã¯ã©ã€ãããŸã](https://api.slack.com/events-api)ããã®ãã¥ãŒããªã¢ã«ã§ã¯ã[ãœã±ããã¢ãŒã](https://api.slack.com/apis/connections/socket)ã䜿çšããŸãã Socket ã¢ãŒãã¯ãããŒã ã®ããã«äœããäœãå§ããã°ããã®äººã«ãå§ãã®ãªãã·ã§ã³ã§ãã
+Slack ã¯ãŒã¯ã¹ããŒã¹ã§çºçããã€ãã³ãïŒã¡ãã»ãŒãžãæçš¿ããããšãããã¡ãã»ãŒãžã«å¯Ÿãããªã¢ã¯ã·ã§ã³ãã€ãããããšããªã©ïŒããªãã¹ã³ããã«ã¯ã[Events API ã䜿ã£ãŠç¹å®ã®çš®é¡ã®ã€ãã³ãããµãã¹ã¯ã©ã€ãããŸã](https://api.slack.com/events-api)ã
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+
+
+ãã®ãã¥ãŒããªã¢ã«ã§ã¯ã[ãœã±ããã¢ãŒã](https://api.slack.com/apis/connections/socket)ã䜿çšããŸãã Socket ã¢ãŒãã¯ãããŒã ã®ããã«äœããäœãå§ããã°ããã®äººã«ãå§ãã®ãªãã·ã§ã³ã§ãã
:::tip
-ãœã±ããã¢ãŒãã䜿ãããšã§ãã¢ããªãå
¬éããã HTTP ãšã³ããã€ã³ããå
¬éããã« Events API ãã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããå©çšã§ããããã«ãªããŸãããã®ããšã¯ãéçºæããã¡ã€ã€ãŒãŠã©ãŒã«ã®è£ããã®ãªã¯ãšã¹ããåããéã«äŸ¿å©ã§ããHTTP ã§ã®æ¹åŒã¯ãã¹ãã£ã³ã°ç°å¢ïŒ[AWS](/deployments/aws-lambda) or [Heroku](/deployments/heroku)ãªã©ïŒã«ãããã€ããã¢ããªã Slack App Directory ã§é
åžãããã¢ããªã«é©ããŠããŸãã HTTP ã§ã®æ
å ±ã«ã€ããŠã¯[ãã¡ãã®ããã¥ã¡ã³ã](/tutorial/getting-started-http#setting-up-events-with-http)ãåç
§ããŠãã ããã
+ãœã±ããã¢ãŒãã䜿ãããšã§ãã¢ããªãå
¬éããã HTTP ãšã³ããã€ã³ããå
¬éããã« Events API ãã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããå©çšã§ããããã«ãªããŸãããã®ããšã¯ãéçºæããã¡ã€ã€ãŒãŠã©ãŒã«ã®è£ããã®ãªã¯ãšã¹ããåããéã«äŸ¿å©ã§ããHTTP ã§ã®æ¹åŒã¯ãã¹ãã£ã³ã°ç°å¢ïŒ[AWS](/deployments/aws-lambda) or [Heroku](/deployments/heroku)ãªã©ïŒã«ãããã€ããã¢ããªã Slack App Directory ã§é
åžãããã¢ããªã«é©ããŠããŸãã HTTP ã§ã®æ
å ±ã«ã€ããŠã¯[ãã¡ãã®ããã¥ã¡ã³ã](#setting-up-events)ãåç
§ããŠãã ããã
:::
@@ -144,6 +154,30 @@ Slack ã¯ãŒã¯ã¹ããŒã¹ã§çºçããã€ãã³ãïŒã¡ãã»ãŒãžãæ
2. **Basic Information** ã«ã¢ã¯ã»ã¹ãããApp Tokenãã»ã¯ã·ã§ã³ã®äžã«ã¹ã¯ããŒã«ãã**Generate Token and Scopes** ãã¯ãªãã¯ããŠã¢ããªããŒã¯ã³ãçæããŸãããã®ããŒã¯ã³ã« `connections:write` ã¹ã³ãŒããè¿œå ããçæããã `xapp` ããŒã¯ã³ãä¿åããŸãã
+
+
+
+ã¢ããªã®ã€ãã³ããæå¹ã«ããŸãããã
+
+1. ã¢ããªã®ã€ãã³ããæå¹ã«ããã«ã¯ããŸãã¢ããªèšå®ããŒãžã«æ»ããŸã ([ã¢ããªç®¡çããŒãž](https://api.slack.com/apps)ã§ã¢ããªãã¯ãªãã¯ããŸã)ãå·ŠåŽã®ãµã€ãããŒã«ãã **Event Subscription** ãã¯ãªãã¯ããŸãã**Enable Events** ã®ã¹ã€ããããªã³ã«ããŸãã
+
+2. Request URLãè¿œå ããŸããSlackã¯ã€ãã³ãã«å¯Ÿå¿ããHTTP POSTãªã¯ãšã¹ãããã®[Request URL](https://api.slack.com/apis/connections/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls)ãšã³ããã€ã³ãã«éä¿¡ããŸããBoltã¯`/slack/events`ã®ãã¹ã䜿çšããŠããã¹ãŠã®åä¿¡ãªã¯ãšã¹ãïŒã·ã§ãŒãã«ãããã€ãã³ããã€ã³ã¿ã©ã¯ãã£ããã£ã®ãã€ããŒããªã©ïŒããªãã¹ã³ããŸããã¢ããªã®èšå®ã§Request URLãèšå®ããéã«ã¯ã`https:///slack/events`ã®ããã«`/slack/events`ãè¿œå ããŸããð¡
+
+:::tip
+
+ããŒã«ã«éçºã§ã¯ã[ngrok](https://ngrok.com/)ã®ãããªãããã·ãµãŒãã¹ã䜿ã£ãŠå
¬é URL ãäœæãããªã¯ãšã¹ããéçºç°å¢ã«ãã³ããªã³ã°ããããšãã§ããŸãããã®ãã³ããªã³ã°ã®æ¹æ³ã«ã€ããŠã¯ã[ngrok ã®ã¬ã€ã](https://ngrok.com/docs#getting-started-expose)ãåç
§ããŠãã ããã
+
+:::
+
+æåŸã«ãèãããã€ãã³ããSlackã«äŒããŸãããã**Event Subscriptions**ã®äžã«ããã**Enable Events**ãšããã©ãã«ã®ä»ããã¹ã€ãããåãæ¿ããŸãã
+
+ã€ãã³ããçºçãããšãSlack ã¯ããã®ã€ãã³ããããªã¬ãŒãããŠãŒã¶ãŒãã€ãã³ããçºçãããã£ã³ãã«ãªã©ãã€ãã³ãã«é¢ããæ
å ±ãã¢ããªã«éä¿¡ããŸããã¢ããªã詳现ãåŠçããããã«å¿ããŠå¿çããããšãã§ããŸãã
+
+**Request URL** ããã¯ã¹ã® **Enable Events** ã¹ã€ããã®äžã®ãã£ãŒã«ãã«ãã® URL ã貌ãä»ããŸããBolt ã¢ããªãåŒãç¶ãå®è¡ãããŠããå Žåã¯ãURL ãæ€èšŒãããã§ãã¯ããŒã¯ã衚瀺ãããŸãã
+
+
+
+
ãããŠæåŸã«ãç§ãã¡ãã©ã®ã€ãã³ãããªãã¹ã³ããããã Slack ã«äŒããŸãããã
ã€ãã³ããçºçãããšããã®ã€ãã³ããããªã¬ãŒãããŠãŒã¶ãŒãã€ãã³ããçºçãããã£ã³ãã«ãªã©ãã€ãã³ãã«é¢ããæ
å ±ã Slack ããã¢ããªã«éä¿¡ãããŸããã¢ããªã§ã¯ãããã®æ
å ±ãåŠçããŠãé©åãªå¿çãè¿ããŸãã
@@ -163,6 +197,9 @@ Slack ã¯ãŒã¯ã¹ããŒã¹ã§çºçããã€ãã³ãïŒã¡ãã»ãŒãžãæ
次ã®äŸã§ã¯ãããªãã®ã¢ããªãè¿œå ãããŠãããã£ã³ãã«ã DM 㧠`hello` ãšããåèªãå«ããã¹ãŠã®ã¡ãã»ãŒãžããªãã¹ã³ãã `Hey there @user!` ãšå¿çããŸãã
+
+
+
```javascript
const { App } = require('@slack/bolt');
@@ -190,6 +227,34 @@ app.message('hello', async ({ message, say }) => {
})();
```
+
+
+
+```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET
+});
+
+// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
+app.message('hello', async ({ message, say }) => {
+ // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
+ await say(`Hey there <@${message.user}>!`);
+});
+
+(async () => {
+ // ã¢ããªãèµ·åããŸã
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
ã¢ããªãåèµ·åããããããããŠãŒã¶ãŒããã£ã³ãã«ã DM ã«è¿œå ãã `hello` ãå«ãã¡ãã»ãŒãžãéä¿¡ããŠã¿ãŠãã ãããã¢ããªãå¿çãããæåã§ãã
ããã¯åºæ¬çãªäŸã§ãããããããèªåã®å¥œããªããã«ã¢ããªãã«ã¹ã¿ãã€ãºããŠããããšãã§ããŸããããã«ã€ã³ã¿ã©ã¯ãã£ããªåäœãè©Šãããã«ããã¬ãŒã³ããã¹ãã§ã¯ãªããã¿ã³ãéä¿¡ããŠã¿ãŸãããã
@@ -200,12 +265,27 @@ app.message('hello', async ({ message, say }) => {
ãã¿ã³ãéžæã¡ãã¥ãŒãæ¥ä»ããã«ãŒãã¢ãŒãã«ãªã©ã®æ©èœã䜿çšããã«ã¯ãã€ã³ã¿ã©ã¯ãã£ãæ©èœãæå¹ã«ããå¿
èŠããããŸããã€ãã³ããšåæ§ã«ãSlack ã® URL ãæå®ããŠã¢ã¯ã·ã§ã³ ( ããã¿ã³ã»ã¯ãªãã¯ããªã©) ãéä¿¡ããå¿
èŠããããŸãã
+
+
+
+ãœã±ããã¢ãŒããæå¹ã«ããŠãããšããããã©ã«ãã§åºæ¬çãªã€ã³ã¿ã©ã¯ãã£ãæ©èœãæå¹ã«ãªã£ãŠããããããã§ã¯ç¹ã«äœãããå¿
èŠã¯ããããŸããã
+
+
+
+
+ã¢ããªèšå®ããŒãžã«æ»ããå·ŠåŽã® **Interactivity & Shortcuts** ãã¯ãªãã¯ããŸãã**Request URL** ããã¯ã¹ããã 1 ã€ããããšãããããŸãã
+
:::tip
-ãœã±ããã¢ãŒããæå¹ã«ããŠãããšããããã©ã«ãã§åºæ¬çãªã€ã³ã¿ã©ã¯ãã£ãæ©èœãæå¹ã«ãªã£ãŠããããããã§ã¯ç¹ã«äœãããå¿
èŠã¯ããããŸããããã HTTP ã䜿ã£ãŠããå ŽåãSlack ããã®ã€ãã³ãéä¿¡å
ã§ãã Request URL ãèšå®ããå¿
èŠããããŸãã
+ããã©ã«ãã§ã¯ãBolt ã¯ã€ãã³ãã«äœ¿çšããŠããã®ãšåããšã³ããã€ã³ããã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ãã«äœ¿çšããããã«èšå®ãããŠãããããäžèšãšåããªã¯ãšã¹ã URL (ãã®äŸã§ã¯ `https://8e8ec2d7.ngrok.io/slack/events`) ã䜿çšããŸããå³äžé
ã«ãã **Save Changes** ãã¿ã³ãæŒããŠãã ãããããã§ã¢ããªã®ã€ã³ã¿ã©ã¯ãã£ããªã³ã³ããŒãã³ããå©çšããèšå®ãæå¹ã«ãªããŸãã!
:::
+![Configuring a Request URL](/img/request-url-config.png "Configuring a Request URL")
+
+
+
+
ã€ã³ã¿ã©ã¯ãã£ãæ©èœãæå¹åãããŠãããšãã·ã§ãŒãã«ãããã¢ãŒãã«ãã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ã (äŸïŒãã¿ã³ãéžæã¡ãã¥ãŒãæ¥ä»ããã«ãŒãªã©) ãšã®ã€ã³ã¿ã©ã¯ã·ã§ã³ãã€ãã³ããšããŠããªãã®ã¢ããªã«éä¿¡ãããŸãã
ããã§ã¯ãã¢ããªã®ã³ãŒãã«æ»ããã€ã³ã¿ã©ã¯ãã£ããªåŠçãè¿œå ããŸãããããã®å®è£
ã¯ä»¥äžã®äºã€ã®ã¹ãããã§æ§æãããŸãã
@@ -214,6 +294,9 @@ app.message('hello', async ({ message, say }) => {
以äžã¯ãåã®ã»ã¯ã·ã§ã³ã§èšè¿°ããã¢ããªã³ãŒãããæååã ãã§ãªãããã¿ã³ä»ãã®ã¡ãã»ãŒãžãéä¿¡ããããã«å€æŽãããã®ã§ãã
+
+
+
```javascript
const { App } = require('@slack/bolt');
@@ -260,6 +343,53 @@ app.message('hello', async ({ message, say }) => {
})();
```
+
+
+
+```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET
+});
+
+// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
+app.message('hello', async ({ message, say }) => {
+ // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
+ await say({
+ blocks: [
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": `Hey there <@${message.user}>!`
+ },
+ "accessory": {
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Click Me"
+ },
+ "action_id": "button_click"
+ }
+ }
+ ],
+ text: `Hey there <@${message.user}>!`
+ });
+});
+
+(async () => {
+ // ã¢ããªãèµ·åããŸã
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
`say()` ã«æ ŒçŽãããŠããå€ãã `blocks` ã®é
åãå«ããªããžã§ã¯ãã«ãªããŸããããã®ãããã¯ã¯ Slack ã¡ãã»ãŒãžãæ§æããã³ã³ããŒãã³ãã§ãããããã¹ããç»åãæ¥ä»ããã«ãŒãªã©ãããŸããŸãªã¿ã€ãããããŸãããã®äŸã§ã¯ãã¢ããªã¯ããã¿ã³ã `accessory` ãšããŠå«ãã»ã¯ã·ã§ã³ãããã¯ã䜿çšããŠå¿çããŸãã`blocks` ã䜿ã£ãŠããå Žåã `text` ã¯éç¥ãã¢ã¯ã»ã·ããªãã£ã®ããã®ãã©ãŒã«ããã¯ãšããŠäœ¿çšãããŸãã
ãã®ãã¿ã³ `accessory` ãªããžã§ã¯ãã«ã¯ã`action_id` ãå²ãåœãŠãããŠããŸããããã¯ãã¿ã³ã®äžæã®èå¥åãšããŠæ©èœãããããã¢ããªã¯ã©ã®ã¢ã¯ã·ã§ã³ã«å¿çããããæå®ã§ããŸãã
@@ -274,6 +404,9 @@ app.message('hello', async ({ message, say }) => {
ãã¿ã³ãã¯ãªãã¯ããããšãã©ããŒã¢ããã¡ãã»ãŒãžãéä¿¡ãããã³ãã©ãŒãè¿œå ããŠã¿ãŸãããã
+
+
+
```javascript
const { App } = require('@slack/bolt');
@@ -326,12 +459,66 @@ app.action('button_click', async ({ body, ack, say }) => {
})();
```
+
+
+
+
+```javascript
+const { App } = require('@slack/bolt');
+
+const app = new App({
+ token: process.env.SLACK_BOT_TOKEN,
+ signingSecret: process.env.SLACK_SIGNING_SECRET
+});
+
+// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
+app.message('hello', async ({ message, say }) => {
+ // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
+ await say({
+ blocks: [
+ {
+ "type": "section",
+ "text": {
+ "type": "mrkdwn",
+ "text": `Hey there <@${message.user}>!`
+ },
+ "accessory": {
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Click Me"
+ },
+ "action_id": "button_click"
+ }
+ }
+ ],
+ text: `Hey there <@${message.user}>!`
+ });
+});
+
+app.action('button_click', async ({ body, ack, say }) => {
+ // ã¢ã¯ã·ã§ã³ã®ãªã¯ãšã¹ãã確èª
+ await ack();
+ await say(`<@${body.user.id}> clicked the button`);
+});
+
+(async () => {
+ // ã¢ããªãèµ·åããŸã
+ await app.start(process.env.PORT || 3000);
+
+ console.log('â¡ïž Bolt app is running!');
+})();
+```
+
+
+
+
ãã®ããã«ã`app.action()` ã䜿ãããšã§ `button_click` ãšãã `action_id` ã®ãã¿ã³ã¢ã¯ã·ã§ã³ã®ãªã¹ããŒãè¿œå ã§ããã®ã§ããã¢ããªãåèµ·åããŠãã¿ã³ãã¯ãªãã¯ããŠã¿ãŸãããããããšãyou clicked the button ãšããæ°ããã¡ãã»ãŒãžãã¢ããªã«è¡šç€ºãããã¯ãã§ãã
---
### 次ã®ã¹ããã {#next-steps}
-ããã§æåã® Bolt ã¢ããªããœã±ããã¢ãŒãã䜿ã£ãŠæ§ç¯ã§ããŸãã! ð
+ããã§æåã® Bolt ã¢ããªãæ§ç¯ã§ããŸãã! ð
åºæ¬çãªã¢ããªã®äœæãã§ããŸããã®ã§ã次åã¯æ¯éãã£ãšãããããªã Bolt ã®æ©èœã䜿ã£ãŠã¢ããªãäœã£ãŠã¿ãŸããããäžèšã®ãªã³ã¯ã蟿ã£ãŠããããã¢ã€ãã¢ã暡玢ããŠã¿ãŠãã ããïŒ
@@ -340,5 +527,3 @@ app.action('button_click', async ({ body, ack, say }) => {
* ãããã[`events()` ã¡ãœãã](/concepts/event-listening)ã§ãªãã¹ã³ã§ããããŸããŸãªã€ãã³ãã確èªããŸããããã€ãã³ãã¯ãã¹ãŠ[API ãµã€ã](https://api.slack.com/events)ã«ãªã¹ããããŠããŸãã
* Bolt ã䜿çšãããšãã¢ããªã«ã¢ã¿ãããããŠããã¯ã©ã€ã¢ã³ã㧠[Web API ã¡ãœãããåŒã³åºã](/concepts/web-api)ããšãã§ããŸããAPI ãµã€ãã« [200 ãè¶
ããã¡ãœãã](https://api.slack.com/methods)ãçšæããŠãããŸãã
-
-* [API ãµã€ã](https://api.slack.com/docs/token-types)ã§ã¯ãæ§ã
ãªããŒã¯ã³ã¿ã€ãã®è©³çŽ°ã確èªããããšãã§ããŸããã¢ããªã«ã¯ãå®è¡ããã¢ã¯ã·ã§ã³ã«å¿ããŠç°ãªãããŒã¯ã³ãå¿
èŠã«ãªãå ŽåããããŸãããœã±ããã¢ãŒãã䜿ããªãã¢ããªã§ã¯ãéåžžã¯ãããããŒã¯ã³ (`xoxb`) ãšçœ²åã·ãŒã¯ã¬ãããå¿
èŠã§ãããœã±ããã¢ãŒãã䜿ããªãå Žåã®äŸã«ã€ããŠã¯ã HTTP æ¹åŒã®ããæ¹ãšããŠãã®ãã¥ãŒããªã¢ã«ãšå¯Ÿã«ãªã£ãŠãã [Bolt å
¥éã¬ã€ãïŒHTTPïŒ](/tutorial/getting-started-http)ãåç
§ããŠãã ããã
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/conversation-store.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/conversation-store.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/conversation-store.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/conversation-store.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/hubot-migration.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/hubot-migration.md
similarity index 97%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/hubot-migration.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/hubot-migration.md
index 30d5173db..358171433 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/hubot-migration.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/hubot-migration.md
@@ -24,7 +24,7 @@ Bolt ã¢ããªãäœæããåã«èæ
®ã«å
¥ããæ¹ãããéããã»ã
---
### ãããã®èšå® {#configuring-your-bot}
-ããããŠãŒã¶ãŒãæã€æ¢åã® Slack ã¢ããªããæã¡ã®æ¹ã¯ã[次ã®ã»ã¯ã·ã§ã³ã«é²ãããšãã§ããŸã](#ãããã®èšå®-1)ãããããªãå Žåã¯ã[App Management ããŒãž](https://api.slack.com/apps) ã«ç§»åããèªåã® Hubot ã¢ããªããããã©ããã確èªããŠãã ãããããå Žåã¯ããã®ã¢ããªã®èªèšŒæ
å ±ããã®ãŸãŸäœ¿çšã§ããŸã ([次ã®ã»ã¯ã·ã§ã³ã«é²ãã§ãã ãã](#ãããã®èšå®-1))ããªãå Žåã¯ãäžèšã®æé éãã«é²ããŠãããŸãããã
+ããããŠãŒã¶ãŒãæã€æ¢åã® Slack ã¢ããªããæã¡ã®æ¹ã¯, 次ã®ã»ã¯ã·ã§ã³ã«é²ãããšãã§ããŸããããããªãå Žåã¯ã[App Management ããŒãž](https://api.slack.com/apps) ã«ç§»åããèªåã® Hubot ã¢ããªããããã©ããã確èªããŠãã ãããããå Žåã¯ããã®ã¢ããªã®èªèšŒæ
å ±ããã®ãŸãŸäœ¿çšã§ããŸã (次ã®ã»ã¯ã·ã§ã³ã«é²ãã§ãã ãã)ããªãå Žåã¯ãäžèšã®æé éãã«é²ããŠãããŸãããã
#### Slack ã¢ããªãäœæãã
ãŸãæåã«ãSlack ã¢ããªãäœæããŸãã
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/steps-from-apps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/steps-from-apps.md
new file mode 100644
index 000000000..a131e4320
--- /dev/null
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/steps-from-apps.md
@@ -0,0 +1,194 @@
+---
+title: ã¯ãŒã¯ãããŒã¹ãããã®æŠèŠ
+lang: ja-jp
+slug: /concepts/steps-from-apps
+---
+
+ïŒã¢ããªã«ããïŒã¯ãŒã¯ãããŒã¹ãããïŒWorkflow Steps from Apps) ã¯ã[ã¯ãŒã¯ãããŒãã«ããŒ](https://api.slack.com/workflows)ã«ãããã¯ãŒã¯ãããŒã«çµã¿èŸŒã¿å¯èœãªã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããä»»æã® Slack ã¢ããªãæäŸããããšãå¯èœãšããŸãã
+
+ã¯ãŒã¯ãããŒã¹ãããã¯ãäžã€ã®ç°ãªããŠãŒã¶ãŒã€ãã³ãããæ§æãããŸã:
+
+- ã¯ãŒã¯ãããŒäœæè
ãã¯ãŒã¯ãããŒã«ã«ã¹ã¿ã ã¹ããããè¿œå ã»ãŸãã¯ç·šéãã
+- ã¯ãŒã¯ãããŒäœæè
ãã¹ãããã®èšå®ãä¿åã»æŽæ°ãã
+- ã¯ãŒã¯ãããŒã®å©çšè
ããã®ã¯ãŒã¯ãããŒã¹ããããå®è¡ãã
+
+ã¯ãŒã¯ãããŒã¹ããããæ©èœãããããã«ã¯ããããäžã€ã®ã€ãã³ãå
šãŠãé©åã«ãã³ããªã³ã°ããå¿
èŠããããŸãã
+
+ã¯ãŒã¯ãããŒã¹ãããã®ãããªã詳现ã«ã€ããŠã¯ [API ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps)ãåèã«ããŠãã ããã
+
+---
+
+## ã¹ãããã®å®çŸ©
+
+ã¯ãŒã¯ãããŒã¹ããããäœãããã®æ段ãšã㊠Bolt 㯠`WorkflowStep` ãšããã¯ã©ã¹ãæäŸããŠããŸãã
+
+æ°ãã `WorkflowStep` ã€ã³ã¹ã¿ã³ã¹ã®çæã«ã¯ããã®ã¹ãããã® `callback_id` ãšèšå®ãªããžã§ã¯ããæž¡ããŸãã
+
+èšå®ãªããžã§ã¯ãã«ã¯ `edit`ã`save`ã`execute` ãšããäžã€ã®ããããã£ããããŸãããããã®ããããã¯åäžã®ã³ãŒã«ããã¯é¢æ°ããŸãã¯ã³ãŒã«ããã¯é¢æ°ã®é
åã§ããå¿
èŠããããŸãããã¹ãŠã®ã³ãŒã«ããã¯é¢æ°ã¯ãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãã«é¢ããæ
å ±ãä¿æããã `step` ãªããžã§ã¯ãã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã
+
+`WorkflowStep` ã€ã³ã¹ã¿ã³ã¹ãçæããããããã `app.step()` ã¡ãœããã«æž¡ããŸããããã«ãã£ãŠãBolt ã¢ããªã¯å¯Ÿè±¡ã®ã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãããªãã¹ã³ããããèšå®ãªããžã§ã¯ããæäŸããã³ãŒã«ããã¯é¢æ°ã䜿ã£ãŠã€ãã³ãã«å¿çãããããããšãã§ããããã«ãªããŸãã
+
+
+```javascript
+const { App, WorkflowStep } = require('@slack/bolt');
+
+// ãã€ãéã Bolt ã¢ããªãåæå
+const app = new App({
+ signingSecret: process.env.SLACK_SIGNING_SECRET,
+ token: process.env.SLACK_BOT_TOKEN,
+});
+
+// WorkflowStep ã€ã³ã¹ã¿ã³ã¹ãçæ
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {},
+});
+
+app.step(ws);
+```
+
+---
+
+## ã¹ãããã®è¿œå ã»ç·šé
+
+ã¯ãŒã¯ãããŒã®äœæè
ããã¢ããªãæäŸããã¹ããããã¯ãŒã¯ãããŒã«è¿œå ïŒãŸãã¯ãã®èšå®ãå€æŽïŒããã¿ã€ãã³ã°ã§ãã¢ããªã¯ [`workflow_step_edit`](https://api.slack.com/reference/workflows/workflow_step_edit) ãšããã€ãã³ããåä¿¡ããŸãããã®ã€ãã³ãã®åä¿¡æã« `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `edit` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
+
+ãã®ãšããã¯ãŒã¯ãããŒäœæã»å€æŽã®ã©ã¡ãã®å Žåã§ããã¢ããªã¯[ã¯ãŒã¯ãããŒã¹ãããèšå®ã®ããã®ã¢ãŒãã«](https://api.slack.com/reference/workflows/configuration-view)ãå¿çããå¿
èŠããããŸãããã®ã¢ãŒãã«ã¯ãã¯ãŒã¯ãããŒã¹ãããã«åºæã®èšå®ã§ããå¿
èŠããããéåžžã®ã¢ãŒãã«ã«ã¯ãªãå¶çŽããããŸããæããããããããã®ãšããŠã¯ã`titleâ`ã`submitâ`ã`close` ããããã£ãèšå®ããããšãã§ããŸããããŸããããã©ã«ãã®èšå®ã§ã¯ããã®èšå®ã¢ãŒãã«ã® `callback_id` ã¯ã¯ãŒã¯ãããŒã¹ãããã®ãã®ãšåããã®ã䜿çšãããŸãã
+
+`edit` ã³ãŒã«ããã¯é¢æ°ã®äžã§ã¯ ã¢ãŒãã«ã® view ã®ãã¡ `blocks` ã ããæž¡ãã ãã§ç°¡åã«ã¹ãããèšå®ã¢ãŒãã«ããªãŒãã³ããããšãã§ãã `configure()` ãšãããŠãŒãã£ãªãã£é¢æ°ãå©çšã§ããŸããããã¯ãå¿
èŠãªå
¥åå
容ãæããŸã§èšå®ã®ä¿åãç¡å¹ã«ãã `submit_disabled` ãšãããªãã·ã§ã³ã `true` ã«èšå®ããŸãã
+
+èšå®ã¢ãŒãã«ãéãåŠçã«é¢ãããããªã詳现ã¯ã[ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps#handle_config_view)ãåèã«ããŠãã ããã
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {
+ await ack();
+
+ const blocks = [
+ {
+ type: 'input',
+ block_id: 'task_name_input',
+ element: {
+ type: 'plain_text_input',
+ action_id: 'name',
+ placeholder: {
+ type: 'plain_text',
+ text: 'Add a task name',
+ },
+ },
+ label: {
+ type: 'plain_text',
+ text: 'Task name',
+ },
+ },
+ {
+ type: 'input',
+ block_id: 'task_description_input',
+ element: {
+ type: 'plain_text_input',
+ action_id: 'description',
+ placeholder: {
+ type: 'plain_text',
+ text: 'Add a task description',
+ },
+ },
+ label: {
+ type: 'plain_text',
+ text: 'Task description',
+ },
+ },
+ ];
+
+ await configure({ blocks });
+ },
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {},
+});
+```
+
+---
+
+## ã¹ãããã®èšå®ã®ä¿å
+
+ã¯ãŒã¯ãããŒã¹ãããã®èšå®ã¢ãŒãã«ãéããããã¢ããªã¯ã¯ãŒã¯ãããŒäœæè
ãã¢ãŒãã«ãéä¿¡ããã€ãã³ãã§ãã `view_submission` ã€ãã³ããåŸ
ã¡åããŸãããã®ã€ãã³ããåä¿¡ãããš `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `save` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
+
+`save` ã³ãŒã«ããã¯é¢æ°ã®äžã§ã¯ã以äžã®åŒæ°ãæž¡ããŠã¹ãããã®èšå®ãä¿åããããã® `update()` é¢æ°ãå©çšã§ããŸãã
+
+- `inputs` ã¯ãã¯ãŒã¯ãããŒã¹ãããå®è¡æã«ã¢ããªãåãåãããšãæåŸ
ããããŒã¿ã®å
容ãè¡šçŸãããªããžã§ã¯ãã§ã
+- `outputs` ã¯ãã¹ãããã®å®è¡ãæ£åžžã«å®äºãããšããåäžã¯ãŒã¯ãããŒå
ã®åŸç¶ã®ã¹ãããã«æäŸããããŒã¿ã®å
容ãè¡šçŸãããªããžã§ã¯ãã®é
åã§ãã
+- `step_name` ã¯ãããã©ã«ãã®ã¹ãããåãäžæžãããããã«äœ¿çšããŸã
+- `step_image_url` ã¯ãããã©ã«ãã®ã¹ãããã®ã€ã¡ãŒãžç»åãäžæžãããããã«äœ¿çšããŸã
+
+ãããåŒæ°ãã©ã®ããã«æ§æãããã®è©³çŽ°ã¯ã[ããã¥ã¡ã³ã](https://api.slack.com/reference/workflows/workflow_step)ãåèã«ããŠãã ããã
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, view, update }) => {
+ await ack();
+
+ const { values } = view.state;
+ const taskName = values.task_name_input.name;
+ const taskDescription = values.task_description_input.description;
+
+ const inputs = {
+ taskName: { value: taskName.value },
+ taskDescription: { value: taskDescription.value }
+ };
+
+ const outputs = [
+ {
+ type: 'text',
+ name: 'taskName',
+ label: 'Task name',
+ },
+ {
+ type: 'text',
+ name: 'taskDescription',
+ label: 'Task description',
+ }
+ ];
+
+ await update({ inputs, outputs });
+ },
+ execute: async ({ step, complete, fail }) => {},
+});
+```
+
+
+---
+
+## ã¹ãããã®å®è¡
+
+ã¯ãŒã¯ãããŒã®å©çšè
ã«ãã£ãŠãã¢ããªãæäŸããã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããå®è¡ããããšããã¢ããªã¯[`workflow_step_execute`](https://api.slack.com/events/workflow_step_execute) ãšããã€ãã³ããåä¿¡ããŸãããã®ã€ãã³ãã®åä¿¡æã« `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `execute` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
+
+`save` ã³ãŒã«ããã¯é¢æ°ã§äºãèŠå®ããã `inputs` ã®æ
å ±ã䜿ã£ãŠãããã§ã®åŠçã¯ããµãŒãããŒãã£ã® API ãåŒã³åºããããããŒã¿ããŒã¹ã«æ
å ±ãä¿åãããããã®ãŠãŒã¶ãŒã®ããŒã ã¿ããæŽæ°ãããã`outputs` ãªããžã§ã¯ããæ§ç¯ããããšã§åŸç¶ã®ã¯ãŒã¯ãããŒã¹ããããå©çšã§ããæ
å ±ãèšå®ãããããŸãã
+
+`execute` ã³ãŒã«ããã¯é¢æ°å
ã§ã¯ãã¹ãããã®å®è¡ãæåã§ããããšã Slack åŽã«äŒãã `complete()` é¢æ°ã倱æã§ããããšãäŒãã `fail()` é¢æ°ã®ãããããåŒã³åºãå¿
èŠããããŸãã
+
+```javascript
+const ws = new WorkflowStep('add_task', {
+ edit: async ({ ack, step, configure }) => {},
+ save: async ({ ack, step, update }) => {},
+ execute: async ({ step, complete, fail }) => {
+ const { inputs } = step;
+
+ const outputs = {
+ taskName: inputs.taskName.value,
+ taskDescription: inputs.taskDescription.value,
+ };
+
+ // ããå
šãŠ OK ãªã
+ await complete({ outputs });
+ // 泚æ: processBeforeResponse: true ãæå®ããŠããå Žå
+ // ããã§ã¯ await complete() ã¯ããããããŸãããåŒã³åºã API ã®å¿çãé
ãããã§ãã
+ // ããã«ããã3 ç§ä»¥å
ã« Slack ã®ã€ãã³ã API ã«å¿çããããšãã§ããªããªãå ŽåããããŸãã
+ // 代ããã«ä»¥äžã®ããã«ããããšãã§ããŸã:
+ // complete({ outputs }).then(() => { console.log('workflow step execution complete registered'); });
+
+ // ããäœãåé¡ãèµ·ããã
+ // fail({ error: { message: "Just testing step failure!" } }).then(() => { console.log('workflow step execution failure registered'); });
+ },
+});
+```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v2.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v2.md
similarity index 96%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v2.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v2.md
index ec65f0020..1361e1f5a 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v2.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v2.md
@@ -1,6 +1,6 @@
---
title: 2.x ãã€ã°ã¬ãŒã·ã§ã³ã¬ã€ã
-slug: migration-v2
+slug: /tutorial/migration-v2
lang: ja-jp
---
@@ -8,7 +8,7 @@ lang: ja-jp
ãã®ã¬ã€ã㯠Bolt 1.x ãå©çšããŠããã¢ããªã 2.x ã«ã¢ããã°ã¬ãŒãããããã®æé ã«ã€ããŠèª¬æããŸããããã€ãã®å€æŽãå¿
èŠãšã¯ãªããŸãããã»ãšãã©ã®ã¢ããªã®å Žåã§ããããã察å¿ã«å¿
èŠãªæé㯠5 ã 15 åçšåºŠã§ãã
-*泚: ããããã«ã¢ããã°ã¬ãŒããããªãå Žåã¯ã[Bolt 1.x ã«é¢ãããµããŒãã¹ã±ãžã¥ãŒã«](#bolt-1x-%E3%81%AE%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%82%B9%E3%82%B1%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB)ãã確èªãã ãã*
+*泚: ããããã«ã¢ããã°ã¬ãŒããããªãå Žåã¯ã[Bolt 1.x ã«é¢ãããµããŒãã¹ã±ãžã¥ãŒã«](#slackbolt1x-support-schedule)ãã確èªãã ãã*
---
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v3.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v3.md
similarity index 99%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v3.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v3.md
index 2cea018cc..cc795ed16 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/migration-v3.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/migration/migration-v3.md
@@ -1,6 +1,6 @@
---
title: 3.x ãã€ã°ã¬ãŒã·ã§ã³ã¬ã€ã
-slug: migration-v3
+slug: /tutorial/migration-v3
lang: ja-jp
---
# 3.x ãã€ã°ã¬ãŒã·ã§ã³ã¬ã€ã
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md
index 175c11311..ddf47a638 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/reference.md
@@ -8,18 +8,6 @@ permalink: /reference
ãã®ã¬ã€ãã§ã¯ãBolt ã€ã³ã¿ãŒãã§ã€ã¹ã®ãªã¹ããŒé¢æ°ããªã¹ããŒé¢æ°ã®åŒæ°ãåæåãªãã·ã§ã³ããšã©ãŒã«ã€ããŠè©³ãã説æããŸããâ¡[å
¥éã¬ã€ã](/getting-started)ããŸã å®äºããŠããªãå Žåã¯ãå
ã«ãã¡ã㧠Bolt for JavaScript ã¢ããªéçºã®åºæ¬ã確èªããŠãããŸãããã
-- [ãªã¹ããŒé¢æ°](#listener-functions)
- - [ã¡ãœãã](#methods)
- - [ãªã¹ããŒé¢æ°ã®åŒæ°](#listener-function-arguments)
- - [ãªã¹ããŒããã«ãŠã§ã¢ãšã®éã](#difference-from-listener-middleware)
-- [åæåãªãã·ã§ã³](#initialization-options)
- - [ã¬ã·ãŒããŒãªãã·ã§ã³](#receiver-options)
- - [Appãªãã·ã§ã³](#app-options)
-- [ãã¬ãŒã ã¯ãŒã¯ã®ãšã©ãŒ](#framework-error-types)
- - [ã¯ã©ã€ã¢ã³ãåŽã®ãšã©ãŒ](#client-errors)
-
----
-
## ãªã¹ããŒé¢æ° {#listener-functions}
Slack ã¢ããªã¯éåžžãSlack ããã®ã€ãã³ãæ
å ±ãåãåã£ãããããã«å¿çãè¿ãããããŸããåä¿¡ããã€ãã³ã㯠1 ã€ã®å Žåãããã°ãå€æ°ã®å ŽåããããŸããäŸãã°ãEvents API ã®ã€ãã³ãïŒã¢ããªã«é¢é£ãããªã³ã¯ãå
±æããããšããªã©ïŒãããŠãŒã¶ãŒãã¢ããªã®ã·ã§ãŒãã«ãããå®è¡ããã€ãã³ããåãåã£ããããŸããSlack ããã®ãªã¯ãšã¹ãã®çš®é¡ã«å¿ããŠãããããç°ãªãã¡ãœãããçšæãããŠããŸãããããã®ã¡ãœããã«ããããã®ã€ãã³ããåŠçãããå¿çãè¿ãããããããã®**ãªã¹ããŒé¢æ°**ãæž¡ããŸãã
@@ -33,7 +21,7 @@ Slack ã¢ããªã¯éåžžãSlack ããã®ã€ãã³ãæ
å ±ãåãåã£ã
| `app.action(actionId, fn);` | Block Kit ãšã¬ã¡ã³ãããéä¿¡ããã `action` ã€ãã³ãããªãã¹ã³ããŸãããã®ã€ãã³ãã«ã¯ãŠãŒã¶ãŒã®ãã¿ã³æäœãã¡ãã¥ãŒéžæãæ¥ä»ããã«ãŒã®æäœãªã©ããããŸãã`actionId` ã¯æåååã§ãã¢ããªããã¥ãŒå
ã«å«ãããããã¯ãšã¬ã¡ã³ãã«æå®ããäžæã® `action_id` ã®å€ãšäžèŽããå¿
èŠããããŸããããã§ããããã¥ãŒããšã¯ãã¡ãã»ãŒãžãã¢ãŒãã«ãã¢ããªã®ããŒã ã¿ãã®ããšãæããŸããã¢ã¯ã·ã§ã³ãšã¬ã¡ã³ãã `input` ãããã¯ã«é
眮ããå Žåã¯ã€ãã³ããããªã¬ãŒãããªãããšã«æ³šæããŠãã ããã
| `app.shortcut(callbackId, fn);` | ã°ããŒãã«ã·ã§ãŒãã«ãããŸãã¯ã¡ãã»ãŒãžã·ã§ãŒãã«ããã®åŒã³åºãããªãã¹ã³ããŸãã`callbackId` ã¯æååãŸãã¯æ£èŠè¡šçŸã§ãã¢ããªã®èšå®ã§æå®ããã·ã§ãŒãã«ããã® `callback_id` ã«ãããããå¿
èŠããããŸãã
| `app.view(callbackId, fn);` | `view_submission` ã€ãã³ããš `view_closed` ã€ãã³ãããªãã¹ã³ããŸãã`view_submission` ã€ãã³ãã¯ãã¢ããªãéããã¢ãŒãã«ã§ãŠãŒã¶ãŒãããŒã¿éä¿¡ã®æäœããããšãã«çºçããŸãã`view_closed` ã€ãã³ãã¯ããŠãŒã¶ãŒãããŒã¿éä¿¡ãå®è¡ããã«ã¢ãŒãã«ãéãããšãã«çºçããŸãã
-| `app.step(workflowStep)` | `WorkflowStep` ã®ã€ã³ã¹ã¿ã³ã¹ã«æž¡ãããã³ãŒã«ããã¯ã䜿çšããŠãã¯ãŒã¯ãããŒã¹ãããã€ãã³ãã®ãªãã¹ã³ãšå¿çãè¡ããŸããã³ãŒã«ããã¯ã«ã¯ `edit`ã`save`ã`execute` ã® 3 çš®é¡ããããŸããã¯ãŒã¯ãããŒã¹ãããã«ã€ããŠè©³ããã¯ã[ããã¥ã¡ã³ã](/concepts/adding-editing-steps)ãåç
§ããŠãã ããã
+| `app.step(workflowStep)` | `WorkflowStep` ã®ã€ã³ã¹ã¿ã³ã¹ã«æž¡ãããã³ãŒã«ããã¯ã䜿çšããŠãã¯ãŒã¯ãããŒã¹ãããã€ãã³ãã®ãªãã¹ã³ãšå¿çãè¡ããŸããã³ãŒã«ããã¯ã«ã¯ `edit`ã`save`ã`execute` ã® 3 çš®é¡ããããŸããã¯ãŒã¯ãããŒã¹ãããã«ã€ããŠè©³ããã¯ã[ããã¥ã¡ã³ã](/concepts/steps-from-apps)ãåç
§ããŠãã ããã
| `app.command(commandName, fn);` | Slash ã³ãã³ãã®åŒã³åºãããªãã¹ã³ããŸãã`commandName` ã¯æåååã§ãã¢ããªã®èšå®ã§æå®ããã¹ã©ãã·ã¥ã³ãã³ããšäžèŽããå¿
èŠããããŸããã¹ã©ãã·ã¥ã³ãã³ãã®ååã§ã¯ `/` ãæåã«é
眮ããŸãïŒäŸ : `/helpdesk`ïŒã
| `app.options(actionId, fn);` | å€éšããŒã¿ãœãŒã¹ã䜿çšããã»ã¬ã¯ãã¡ãã¥ãŒãªã©ããéãããéžæè¢èªã¿èŸŒã¿ã®ãªã¯ãšã¹ãããªãã¹ã³ããŸãã䜿ãæ©äŒã¯å€ããããŸãããã`app.action` ãšæ··åããªãããã«ããŸãããã`actionId` ã¯æåååã§ãã¢ããªããã¥ãŒå
ã«[å€éšããŒã¿ãœãŒã¹ã䜿çšããã»ã¬ã¯ãã¡ãã¥ãŒ](https://api.slack.com/reference/block-kit/block-elements#external_select)ãå«ãããšãã«æå®ãã`action_id` ãšäžèŽããå¿
èŠããããŸãã
@@ -134,7 +122,7 @@ Bolt ã§ã¯ãããŸããŸãªãšã©ãŒãå®çŸ©ãããŠããŸãããããã«
| `ReceiverMultipleAckError` | Receiver å
ã§ããã§ã«ç¢ºèªãæžãã§ãããªã¯ãšã¹ãã«å¯ŸããŠã¢ããªãããã« `ack()` ãåŒãã å Žåã«ã¹ããŒããããšã©ãŒã§ããçŸåšãããã©ã«ãã® `HTTPReceiver` ã§ã®ã¿äœ¿çšãããŸãã |
| `ReceiverAuthenticityError` | ã¢ããªã®ãªã¯ãšã¹ãã®çœ²åãæ€èšŒã§ããªããšãã«ã¹ããŒããããšã©ãŒã§ãããã®ãšã©ãŒã«ã¯ã倱æããçç±ã瀺ãæ
å ±ãå«ãŸããŸãïŒäŸ : ã¿ã€ã ã¹ã¿ã³ããæå¹ã§ãªããããããŒã«æããããã眲åã·ãŒã¯ã¬ãããæå¹ã§ãªãïŒã
| `MultipleListenerError` | åäžã®ã€ãã³ãã«å¯ŸããŠè€æ°ã®ãªã¹ããŒã§ã®åŠçäžã«è€æ°ã®ãšã©ãŒãçºçããå Žåã«ã¹ããŒããããšã©ãŒã§ããåã
ã®ãšã©ãŒãé
åã«åãã `originals` ããããã£ãæã¡ãŸãã |
-| `WorkflowStepInitializationError` | æ°ãã `WorkflowStep` ãã€ã³ã¹ã¿ã³ã¹åããéã«ãèšå®ãªãã·ã§ã³ãç¡å¹ãªå ŽåããŸãã¯äžè¶³ããŠããå Žåã«ã¹ããŒããããšã©ãŒã§ããåå ãšããŠã`callback_id` ãæå®ãããŠããªãããŸãã¯èšå®ãªããžã§ã¯ããæå®ãããŠããªãããšãèããããŸããã¯ãŒã¯ãããŒã¹ãããã«ã€ããŠè©³ããã¯ã[ããã¥ã¡ã³ã](/concepts/creating-steps)ãåç
§ããŠãã ããã |
+| `WorkflowStepInitializationError` | æ°ãã `WorkflowStep` ãã€ã³ã¹ã¿ã³ã¹åããéã«ãèšå®ãªãã·ã§ã³ãç¡å¹ãªå ŽåããŸãã¯äžè¶³ããŠããå Žåã«ã¹ããŒããããšã©ãŒã§ããåå ãšããŠã`callback_id` ãæå®ãããŠããªãããŸãã¯èšå®ãªããžã§ã¯ããæå®ãããŠããªãããšãèããããŸããã¯ãŒã¯ãããŒã¹ãããã«ã€ããŠè©³ããã¯ã[ããã¥ã¡ã³ã](/concepts/steps-from-apps)ãåç
§ããŠãã ããã |
| `UnknownError` | ãã¬ãŒã ã¯ãŒã¯å
ã§ã¹ããŒããããç¹å®ã®ãšã©ãŒã³ãŒããæããªããšã©ãŒã§ãã`original` ããããã£ã§è©³çŽ°ã確èªã§ããŸãã |
> [errors.ts](https://github.com/slackapi/bolt-js/blob/main/src/errors.ts) ã®ã³ãŒãã§ããšã©ãŒå®çŸ©ã®éšåãšã³ã³ã¹ãã©ã¯ã¿ãŒã®éšåãèªã¿ãåèã«ããŠã¿ãŠãã ããã
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/adding-editing-steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/adding-editing-steps.md
deleted file mode 100644
index 376aedaee..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/adding-editing-steps.md
+++ /dev/null
@@ -1,60 +0,0 @@
----
-title: ã¹ãããã®è¿œå ã»ç·šé
-lang: ja-jp
-slug: /concepts/adding-editing-steps
----
-
-ã¯ãŒã¯ãããŒã®äœæè
ããã¢ããªãæäŸããã¹ããããã¯ãŒã¯ãããŒã«è¿œå ïŒãŸãã¯ãã®èšå®ãå€æŽïŒããã¿ã€ãã³ã°ã§ãã¢ããªã¯ [`workflow_step_edit`](https://api.slack.com/reference/workflows/workflow_step_edit) ãšããã€ãã³ããåä¿¡ããŸãããã®ã€ãã³ãã®åä¿¡æã« `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `edit` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
-
-ãã®ãšããã¯ãŒã¯ãããŒäœæã»å€æŽã®ã©ã¡ãã®å Žåã§ããã¢ããªã¯[ã¯ãŒã¯ãããŒã¹ãããèšå®ã®ããã®ã¢ãŒãã«](https://api.slack.com/reference/workflows/configuration-view)ãå¿çããå¿
èŠããããŸãããã®ã¢ãŒãã«ã¯ãã¯ãŒã¯ãããŒã¹ãããã«åºæã®èšå®ã§ããå¿
èŠããããéåžžã®ã¢ãŒãã«ã«ã¯ãªãå¶çŽããããŸããæããããããããã®ãšããŠã¯ã`titleâ`ã`submitâ`ã`close` ããããã£ãèšå®ããããšãã§ããŸããããŸããããã©ã«ãã®èšå®ã§ã¯ããã®èšå®ã¢ãŒãã«ã® `callback_id` ã¯ã¯ãŒã¯ãããŒã¹ãããã®ãã®ãšåããã®ã䜿çšãããŸãã
-
-`edit` ã³ãŒã«ããã¯é¢æ°ã®äžã§ã¯ ã¢ãŒãã«ã® view ã®ãã¡ `blocks` ã ããæž¡ãã ãã§ç°¡åã«ã¹ãããèšå®ã¢ãŒãã«ããªãŒãã³ããããšãã§ãã `configure()` ãšãããŠãŒãã£ãªãã£é¢æ°ãå©çšã§ããŸããããã¯ãå¿
èŠãªå
¥åå
容ãæããŸã§èšå®ã®ä¿åãç¡å¹ã«ãã `submit_disabled` ãšãããªãã·ã§ã³ã `true` ã«èšå®ããŸãã
-
-èšå®ã¢ãŒãã«ãéãåŠçã«é¢ãããããªã詳现ã¯ã[ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps#handle_config_view)ãåèã«ããŠãã ããã
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {
- await ack();
-
- const blocks = [
- {
- type: 'input',
- block_id: 'task_name_input',
- element: {
- type: 'plain_text_input',
- action_id: 'name',
- placeholder: {
- type: 'plain_text',
- text: 'Add a task name',
- },
- },
- label: {
- type: 'plain_text',
- text: 'Task name',
- },
- },
- {
- type: 'input',
- block_id: 'task_description_input',
- element: {
- type: 'plain_text_input',
- action_id: 'description',
- placeholder: {
- type: 'plain_text',
- text: 'Add a task description',
- },
- },
- label: {
- type: 'plain_text',
- text: 'Task description',
- },
- },
- ];
-
- await configure({ blocks });
- },
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {},
-});
-```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/creating-steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/creating-steps.md
deleted file mode 100644
index 600504501..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/creating-steps.md
+++ /dev/null
@@ -1,33 +0,0 @@
----
-title: ã¹ãããã®å®çŸ©
-lang: ja-jp
-slug: /concepts/creating-steps
----
-
-ã¯ãŒã¯ãããŒã¹ããããäœãããã®æ段ãšã㊠Bolt 㯠`WorkflowStep` ãšããã¯ã©ã¹ãæäŸããŠããŸãã
-
-æ°ãã `WorkflowStep` ã€ã³ã¹ã¿ã³ã¹ã®çæã«ã¯ããã®ã¹ãããã® `callback_id` ãšèšå®ãªããžã§ã¯ããæž¡ããŸãã
-
-èšå®ãªããžã§ã¯ãã«ã¯ `edit`ã`save`ã`execute` ãšããäžã€ã®ããããã£ããããŸãããããã®ããããã¯åäžã®ã³ãŒã«ããã¯é¢æ°ããŸãã¯ã³ãŒã«ããã¯é¢æ°ã®é
åã§ããå¿
èŠããããŸãããã¹ãŠã®ã³ãŒã«ããã¯é¢æ°ã¯ãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãã«é¢ããæ
å ±ãä¿æããã `step` ãªããžã§ã¯ãã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã
-
-`WorkflowStep` ã€ã³ã¹ã¿ã³ã¹ãçæããããããã `app.step()` ã¡ãœããã«æž¡ããŸããããã«ãã£ãŠãBolt ã¢ããªã¯å¯Ÿè±¡ã®ã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãããªãã¹ã³ããããèšå®ãªããžã§ã¯ããæäŸããã³ãŒã«ããã¯é¢æ°ã䜿ã£ãŠã€ãã³ãã«å¿çãããããããšãã§ããããã«ãªããŸãã
-
-
-```javascript
-const { App, WorkflowStep } = require('@slack/bolt');
-
-// ãã€ãéã Bolt ã¢ããªãåæå
-const app = new App({
- signingSecret: process.env.SLACK_SIGNING_SECRET,
- token: process.env.SLACK_BOT_TOKEN,
-});
-
-// WorkflowStep ã€ã³ã¹ã¿ã³ã¹ãçæ
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {},
-});
-
-app.step(ws);
-```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/executing-steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/executing-steps.md
deleted file mode 100644
index 2bd6660bd..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/executing-steps.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: ã¹ãããã®å®è¡
-lang: ja-jp
-slug: /concepts/executing-steps
----
-
-ã¯ãŒã¯ãããŒã®å©çšè
ã«ãã£ãŠãã¢ããªãæäŸããã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããå®è¡ããããšããã¢ããªã¯[`workflow_step_execute`](https://api.slack.com/events/workflow_step_execute) ãšããã€ãã³ããåä¿¡ããŸãããã®ã€ãã³ãã®åä¿¡æã« `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `execute` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
-
-`save` ã³ãŒã«ããã¯é¢æ°ã§äºãèŠå®ããã `inputs` ã®æ
å ±ã䜿ã£ãŠãããã§ã®åŠçã¯ããµãŒãããŒãã£ã® API ãåŒã³åºããããããŒã¿ããŒã¹ã«æ
å ±ãä¿åãããããã®ãŠãŒã¶ãŒã®ããŒã ã¿ããæŽæ°ãããã`outputs` ãªããžã§ã¯ããæ§ç¯ããããšã§åŸç¶ã®ã¯ãŒã¯ãããŒã¹ããããå©çšã§ããæ
å ±ãèšå®ãããããŸãã
-
-`execute` ã³ãŒã«ããã¯é¢æ°å
ã§ã¯ãã¹ãããã®å®è¡ãæåã§ããããšã Slack åŽã«äŒãã `complete()` é¢æ°ã倱æã§ããããšãäŒãã `fail()` é¢æ°ã®ãããããåŒã³åºãå¿
èŠããããŸãã
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, update }) => {},
- execute: async ({ step, complete, fail }) => {
- const { inputs } = step;
-
- const outputs = {
- taskName: inputs.taskName.value,
- taskDescription: inputs.taskDescription.value,
- };
-
- // ããå
šãŠ OK ãªã
- await complete({ outputs });
- // 泚æ: processBeforeResponse: true ãæå®ããŠããå Žå
- // ããã§ã¯ await complete() ã¯ããããããŸãããåŒã³åºã API ã®å¿çãé
ãããã§ãã
- // ããã«ããã3 ç§ä»¥å
ã« Slack ã®ã€ãã³ã API ã«å¿çããããšãã§ããªããªãå ŽåããããŸãã
- // 代ããã«ä»¥äžã®ããã«ããããšãã§ããŸã:
- // complete({ outputs }).then(() => { console.log('workflow step execution complete registered'); });
-
- // ããäœãåé¡ãèµ·ããã
- // fail({ error: { message: "Just testing step failure!" } }).then(() => { console.log('workflow step execution failure registered'); });
- },
-});
-```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/saving-steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/saving-steps.md
deleted file mode 100644
index 7eda9c243..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/saving-steps.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: ã¹ãããã®èšå®ã®ä¿å
-lang: ja-jp
-slug: /concepts/saving-steps
----
-
-ã¯ãŒã¯ãããŒã¹ãããã®èšå®ã¢ãŒãã«ãéããããã¢ããªã¯ã¯ãŒã¯ãããŒäœæè
ãã¢ãŒãã«ãéä¿¡ããã€ãã³ãã§ãã `view_submission` ã€ãã³ããåŸ
ã¡åããŸãããã®ã€ãã³ããåä¿¡ãããš `WorkflowStep` èšå®ãªããžã§ã¯ãå
ã® `save` ã³ãŒã«ããã¯é¢æ°ãå®è¡ãããŸãã
-
-`save` ã³ãŒã«ããã¯é¢æ°ã®äžã§ã¯ã以äžã®åŒæ°ãæž¡ããŠã¹ãããã®èšå®ãä¿åããããã® `update()` é¢æ°ãå©çšã§ããŸãã
-
-- `inputs` ã¯ãã¯ãŒã¯ãããŒã¹ãããå®è¡æã«ã¢ããªãåãåãããšãæåŸ
ããããŒã¿ã®å
容ãè¡šçŸãããªããžã§ã¯ãã§ã
-- `outputs` ã¯ãã¹ãããã®å®è¡ãæ£åžžã«å®äºãããšããåäžã¯ãŒã¯ãããŒå
ã®åŸç¶ã®ã¹ãããã«æäŸããããŒã¿ã®å
容ãè¡šçŸãããªããžã§ã¯ãã®é
åã§ãã
-- `step_name` ã¯ãããã©ã«ãã®ã¹ãããåãäžæžãããããã«äœ¿çšããŸã
-- `step_image_url` ã¯ãããã©ã«ãã®ã¹ãããã®ã€ã¡ãŒãžç»åãäžæžãããããã«äœ¿çšããŸã
-
-ãããåŒæ°ãã©ã®ããã«æ§æãããã®è©³çŽ°ã¯ã[ããã¥ã¡ã³ã](https://api.slack.com/reference/workflows/workflow_step)ãåèã«ããŠãã ããã
-
-```javascript
-const ws = new WorkflowStep('add_task', {
- edit: async ({ ack, step, configure }) => {},
- save: async ({ ack, step, view, update }) => {
- await ack();
-
- const { values } = view.state;
- const taskName = values.task_name_input.name;
- const taskDescription = values.task_description_input.description;
-
- const inputs = {
- taskName: { value: taskName.value },
- taskDescription: { value: taskDescription.value }
- };
-
- const outputs = [
- {
- type: 'text',
- name: 'taskName',
- label: 'Task name',
- },
- {
- type: 'text',
- name: 'taskDescription',
- label: 'Task description',
- }
- ];
-
- await update({ inputs, outputs });
- },
- execute: async ({ step, complete, fail }) => {},
-});
-```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/steps.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/steps.md
deleted file mode 100644
index 405219353..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/steps.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: ã¯ãŒã¯ãããŒã¹ãããã®æŠèŠ
-lang: ja-jp
-slug: /concepts/steps
----
-
-ïŒã¢ããªã«ããïŒã¯ãŒã¯ãããŒã¹ãããïŒWorkflow Steps from Apps) ã¯ã[ã¯ãŒã¯ãããŒãã«ããŒ](https://api.slack.com/workflows)ã«ãããã¯ãŒã¯ãããŒã«çµã¿èŸŒã¿å¯èœãªã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããä»»æã® Slack ã¢ããªãæäŸããããšãå¯èœãšããŸãã
-
-ã¯ãŒã¯ãããŒã¹ãããã¯ãäžã€ã®ç°ãªããŠãŒã¶ãŒã€ãã³ãããæ§æãããŸã:
-
-- ã¯ãŒã¯ãããŒäœæè
ãã¯ãŒã¯ãããŒã«ã«ã¹ã¿ã ã¹ããããè¿œå ã»ãŸãã¯ç·šéãã
-- ã¯ãŒã¯ãããŒäœæè
ãã¹ãããã®èšå®ãä¿åã»æŽæ°ãã
-- ã¯ãŒã¯ãããŒã®å©çšè
ããã®ã¯ãŒã¯ãããŒã¹ããããå®è¡ãã
-
-ã¯ãŒã¯ãããŒã¹ããããæ©èœãããããã«ã¯ããããäžã€ã®ã€ãã³ãå
šãŠãé©åã«ãã³ããªã³ã°ããå¿
èŠããããŸãã
-
-ã¯ãŒã¯ãããŒã¹ãããã®ãããªã詳现ã«ã€ããŠã¯ [API ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps)ãåèã«ããŠãã ããã
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/getting-started-http.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/getting-started-http.md
deleted file mode 100644
index 6b4dfa8d3..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/tutorials/getting-started-http.md
+++ /dev/null
@@ -1,324 +0,0 @@
----
-title: Bolt å
¥éã¬ã€ã (HTTP)
-slug: getting-started-http
-lang: ja-jp
----
-
-# Bolt å
¥éã¬ã€ã (HTTP)
-
-ãã®ã¬ã€ãã§ã¯ãBolt ã䜿çšã㊠Slack ã¢ããªãèµ·åãå®è¡ããæ¹æ³ã«ã€ããŠèª¬æããŸãããã®éçšã§ãæ°ãã Slack ã¢ããªãäœæããããŒã«ã«ç°å¢ãèšå®ããSlack ã¯ãŒã¯ã¹ããŒã¹ããã®ã¡ãã»ãŒãžããªãã¹ã³ããŠå¿çããã¢ããªãéçºããŸãã
-
-ãã®ã¬ã€ããçµãã£ãããããªãã¯ãã®â¡ïž[Getting Started app](https://github.com/slackapi/bolt-js-getting-started-app)ãå®è¡ããããä¿®æ£ããããèªåã§äœã£ããããããšãã§ããŸãã
-
----
-
-### ã¢ããªãäœæãã {#create-an-app}
-æåã«ããã¹ãããš: Bolt ã§éçºãå§ããåã«ã [Slack ã¢ããªãäœæ](https://api.slack.com/apps/new)ããŸãã
-
-:::tip
-
-ãã€ãã®ä»äºã®ããŸããã«ãªããªãããã«ãå¥ã«éçºçšã®ã¯ãŒã¯ã¹ããŒã¹ã䜿çšããããšãããããããŸã â [æ°ããã¯ãŒã¯ã¹ããŒã¹ãç¡æã§äœæ](https://slack.com/get-started#create)ã§ããŸãã
-
-:::
-
-ã¢ããªåãå
¥åã (åŸã§å€æŽå¯èœ)ãã€ã³ã¹ããŒã«å
ã®ã¯ãŒã¯ã¹ããŒã¹ãéžæãããã`Create App` ãã¿ã³ãã¯ãªãã¯ãããšãã¢ããªã® **Basic Information** ããŒãžã衚瀺ãããŸãã
-
-ãã®ããŒãžã«ã¯ãåŸã§å¿
èŠã«ãªãéèŠãªèªèšŒæ
å ± (**App Credentials** ããããŒã®äžã® `Signing Secret` ãªã©) ã«å ããŠãã¢ããªã±ãŒã·ã§ã³ã®æŠèŠã衚瀺ãããŸãã
-
-![Basic Information page](/img/basic-information-page.png "Basic Information page")
-
-ã²ãšéã確èªããã¢ããªã®ã¢ã€ã³ã³ãšèª¬æãè¿œå ããŠãããã¢ããªã®èšå® ð© ãå§ããŸãããã
-
----
-
-### ããŒã¯ã³ãšã¢ããªã®ã€ã³ã¹ããŒã« {#tokens-and-installing-apps}
-Slack ã¢ããªã¯ã[OAuth ã䜿çšããŠãSlack ã® API ãžã®ã¢ã¯ã»ã¹ã管ç](https://api.slack.com/docs/oauth)ããŸããã¢ããªãã€ã³ã¹ããŒã«ããããšãããŒã¯ã³ãåãåããŸãããã®ããŒã¯ã³ã䜿ã£ãŠãã¢ããªã¯ API ã¡ãœãããåŒã³åºãããšãã§ããŸãã
-
-Slack ã¢ããªã§äœ¿çšã§ããããŒã¯ã³ã«ã¯ããŠãŒã¶ãŒããŒã¯ã³ïŒ`xoxp`ïŒãšãããããŒã¯ã³ïŒ`xoxb`ïŒãã¢ããªã¬ãã«ããŒã¯ã³ïŒ`xapp`ïŒã® 3 çš®é¡ããããŸãã
-- [ãŠãŒã¶ãŒããŒã¯ã³](https://api.slack.com/authentication/token-types#user) ã䜿çšãããšãã¢ããªãã€ã³ã¹ããŒã«ãŸãã¯èªèšŒãããŠãŒã¶ãŒã«æã代ãã£ãŠ API ã¡ãœãããåŒã³åºãããšãã§ããŸãã1 ã€ã®ã¯ãŒã¯ã¹ããŒã¹ã«è€æ°ã®ãŠãŒã¶ãŒããŒã¯ã³ãååšããå¯èœæ§ããããŸãã
-- [ãããããŒã¯ã³](https://api.slack.com/authentication/token-types#bot) ã¯ããããŠãŒã¶ãŒã«é¢é£ã¥ãããã1 ã€ã®ã¯ãŒã¯ã¹ããŒã¹ã§ã¯æåã«èª°ãããã®ã¢ããªãã€ã³ã¹ããŒã«ããéã«äžåºŠã ãçºè¡ãããŸããã©ã®ãŠãŒã¶ãŒãã€ã³ã¹ããŒã«ãå®è¡ããŠããã¢ããªã䜿çšãããããããŒã¯ã³ã¯åãã«ãªããŸãã _ã»ãšãã©_ ã®ã¢ããªã§äœ¿çšãããã®ã¯ããããããŒã¯ã³ã§ãã
-- [ã¢ããªã¬ãã«ããŒã¯ã³](https://api.slack.com/authentication/token-types#app) ã¯ãå
šãŠã®çµç¹ïŒãšãã®é
äžã®ã¯ãŒã¯ã¹ããŒã¹ã§ã®åã
ã®ãŠãŒã¶ãŒã«ããã€ã³ã¹ããŒã«ïŒã暪æããŠãããªãã®ã¢ããªã代çãããã®ã§ããã¢ããªã¬ãã«ããŒã¯ã³ã¯ãã¢ããªã® WebSocket ã³ãã¯ã·ã§ã³ã確ç«ããããã«ãã䜿ãããŸãã
-
-説æãç°¡æœã«ããããã«ããã®ã¬ã€ãã§ã¯ãããããŒã¯ã³ã䜿çšããŸãã
-
-1. å·ŠåŽã®ãµã€ãããŒã® **OAuth & Permissions** ã«ã¢ã¯ã»ã¹ããŠã**Bot Token Scopes** ãŸã§ã¹ã¯ããŒã«ããŸãããããŠã**Add an OAuth Scope** ãã¯ãªãã¯ããŸãã
-
-2. ãšããããã¯ã[`chat:write`](https://api.slack.com/scopes/chat:write) ãšããã¹ã³ãŒãã ããè¿œå ããŠã¿ãŸããããããã¯ãã¢ããªã«ããããŠãŒã¶ãã¡ã³ããŒãšããŠåå ããŠãããã£ã³ãã«ãžã®ã¡ãã»ãŒãžã®æçš¿ãèš±å¯ããã¹ã³ãŒãã§ãã
-
-3. ããŒãžäžéšãŸã§ã¹ã¯ããŒã«ããŠæ»ãã**Install App to Workspace** ãã¯ãªãã¯ããŸãããããšãéçºçšã®ã¯ãŒã¯ã¹ããŒã¹ã«ãã®ã¢ããªãã€ã³ã¹ããŒã«ããããã® Slack ã® OAuth 確èªç»é¢ãžãšèªå°ãããŸãã
-
-4. ã€ã³ã¹ããŒã«ãæ¿èªãããšã**OAuth & Permissions** ããŒãžã衚瀺ããã**Bot User OAuth Access Token** ã確èªããããšãã§ããã¯ãã§ãã
-
-![OAuth Tokens](/img/bot-token.png "OAuth Tokens")
-
-:::tip
-
-ããŒã¯ã³ã¯ããã¹ã¯ãŒãã®ããã«å€§åã«æ±ãã[å®å
šã«ä¿ç®¡](https://api.slack.com/docs/oauth-safety)ããŠãã ãããã¢ããªã§ã¯ãã®ããŒã¯ã³ã䜿çšããŠãSlack ã¯ãŒã¯ã¹ããŒã¹ããã®æ
å ±ãæçš¿ããã³ååŸããŸãã
-
-:::
-
----
-
-### ããŒã«ã«ãããžã§ã¯ãã®èšå® {#setting-up-your-project}
-åæèšå®ãå®äºããã®ã§ã次ã¯æ°ãã Bolt ãããžã§ã¯ããèšå®ããŸããããã§ãã¢ããªã®ããžãã¯ãåŠçããã³ãŒããèšè¿°ããŸãã
-
-ãããžã§ã¯ãããŸã äœæããŠããªãå Žåã¯ãæ°ãããããžã§ã¯ããäœæããŸãããã次ã®ããã«ã空ã®ãã£ã¬ã¯ããªãäœæããŠãæ°ãããããžã§ã¯ããåæåããŸãã
-
-```shell
-mkdir first-bolt-app
-cd first-bolt-app
-npm init
-```
-
-æ°ãããããžã§ã¯ãã説æããããã®äžé£ã®è³ªåã衚瀺ãããŸã (ç¹ã«åé¡ããªããã°ãåããã³ãã㧠Enter ãæŒããšãããã©ã«ããåãå
¥ããããšãã§ããŸã)ãå®äºãããšããã£ã¬ã¯ããªå
ã«æ°ãã `package.json` ãã¡ã€ã«ãäœæãããŸãã
-
-Bolt ããã±ãŒãžãæ°ãããããžã§ã¯ãã«ã€ã³ã¹ããŒã«ããåã«ãã¢ããªã®èšå®æã«çæããããããããŒã¯ã³ãš signing secret (ãµã€ã³èªèšŒ) ãä¿åããŸãããããããã¯ç°å¢å€æ°ãšããŠä¿åããå¿
èŠããããŸãã**ããŒãžã§ã³ç®¡çã§ã¯ä¿åããªã**ã§ãã ããã
-
-1. **Basic Information ããŒãžãã Signing Secret ãã³ããŒ**ããŠãæ°ããç°å¢å€æ°ã«ä¿åããŸãã次ã®äŸã¯ Linux ãš macOS ã§åäœããŸãããã ãã[Windows ã§ãåæ§ã®ã³ãã³ããå©çšå¯èœ](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153)ã§ãã
-```shell
-export SLACK_SIGNING_SECRET=
-```
-
-2. **OAuth & Permissions ããŒãžããããã (xoxb) ããŒã¯ã³ãã³ããŒ**ãããããå¥ã®ç°å¢å€æ°ã«æ ŒçŽããŸãã
-```shell
-export SLACK_BOT_TOKEN=xoxb-
-```
-
-ããã§ã¯ãã¢ããªãäœæããŸãããã次ã®ã³ãã³ãã䜿çšããŠã`@slack/bolt` ããã±ãŒãžãã€ã³ã¹ããŒã«ãã `package.json` äžã§äŸåãã¡ã€ã«ãšããŠä¿åããŸãã
-
-```shell
-npm install @slack/bolt
-```
-
-ãã®ãã£ã¬ã¯ããªå
ã« `app.js` ãšããååã®æ°ãããã¡ã€ã«ãäœæãã以äžã®ã³ãŒããè¿œå ããŸãã
-
-```javascript
-const { App } = require('@slack/bolt');
-
-// ãããããŒã¯ã³ãšãœã±ããã¢ãŒããã³ãã©ãŒã䜿ã£ãŠã¢ããªãåæåããŸã
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-(async () => {
- // ã¢ããªãèµ·åããŸã
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-ãŸãå®è¡ããŠã¿ãŸãããã `app.js` ãã¡ã€ã«ãä¿åããŠããã以äžã®ã³ãã³ãã©ã€ã³ã§åãããŸãã
-
-```script
-node app.js
-```
-
-ã¢ããªãããèµ·åãå®è¡äžã§ããããšãéç¥ãããŸãð
-
----
-
-### ã€ãã³ãã®èšå® (HTTP) {#setting-up-events-with-http}
-ã¢ããªã¯ããããšããŠããŒã ã¡ã³ããŒã®ããã«åäœããã¡ãã»ãŒãžãæçš¿ããããçµµæåãªã¢ã¯ã·ã§ã³ãè¿œå ãããããããšãã§ããŸãã
-
-Slack ã¯ãŒã¯ã¹ããŒã¹ã§çºçããã€ãã³ã (ã¡ãã»ãŒãžãæçš¿ããããšãããã¡ãã»ãŒãžã«å¯Ÿãããªã¢ã¯ã·ã§ã³ãæçš¿ããããšããªã©) ããªãã¹ã³ããã«ã¯ã[Events API ã䜿çšããŠã€ãã³ãã¿ã€ãã«ç»é²](https://api.slack.com/events-api)ããŸãã
-
-ã¢ããªã®ã€ãã³ããæå¹ã«ããŸãããã
-
-1. ã¢ããªã®ã€ãã³ããæå¹ã«ããã«ã¯ããŸãã¢ããªèšå®ããŒãžã«æ»ããŸã ([ã¢ããªç®¡çããŒãž](https://api.slack.com/apps)ã§ã¢ããªãã¯ãªãã¯ããŸã)ãå·ŠåŽã®ãµã€ãããŒã«ãã **Event Subscription** ãã¯ãªãã¯ããŸãã**Enable Events** ã®ã¹ã€ããããªã³ã«ããŸãã
-
-
-2. Request URLãè¿œå ããŸããSlackã¯ã€ãã³ãã«å¯Ÿå¿ããHTTP POSTãªã¯ãšã¹ãããã®[Request URL](https://api.slack.com/apis/connections/events-api#the-events-api__subscribing-to-event-types__events-api-request-urls)ãšã³ããã€ã³ãã«éä¿¡ããŸããBoltã¯`/slack/events`ã®ãã¹ã䜿çšããŠããã¹ãŠã®åä¿¡ãªã¯ãšã¹ãïŒã·ã§ãŒãã«ãããã€ãã³ããã€ã³ã¿ã©ã¯ãã£ããã£ã®ãã€ããŒããªã©ïŒããªãã¹ã³ããŸããã¢ããªã®èšå®ã§Request URLãèšå®ããéã«ã¯ã`https:///slack/events`ã®ããã«`/slack/events`ãè¿œå ããŸããð¡
-
-> ããŒã«ã«éçºã§ã¯ã[ngrok](https://ngrok.com/)ã®ãããªãããã·ãµãŒãã¹ã䜿ã£ãŠå
¬é URL ãäœæãããªã¯ãšã¹ããéçºç°å¢ã«ãã³ããªã³ã°ããããšãã§ããŸãããã®ãã³ããªã³ã°ã®æ¹æ³ã«ã€ããŠã¯ã[ngrok ã®ã¬ã€ã](https://ngrok.com/docs#getting-started-expose)ãåç
§ããŠãã ããã
-
-æåŸã«ãèãããã€ãã³ããSlackã«äŒããŸãããã**Event Subscriptions**ã®äžã«ããã**Enable Events**ãšããã©ãã«ã®ä»ããã¹ã€ãããåãæ¿ããŸãã
-
-ã€ãã³ããçºçãããšãSlack ã¯ããã®ã€ãã³ããããªã¬ãŒãããŠãŒã¶ãŒãã€ãã³ããçºçãããã£ã³ãã«ãªã©ãã€ãã³ãã«é¢ããæ
å ±ãã¢ããªã«éä¿¡ããŸããã¢ããªã詳现ãåŠçããããã«å¿ããŠå¿çããããšãã§ããŸãã
-
-**Request URL** ããã¯ã¹ã® **Enable Events** ã¹ã€ããã®äžã®ãã£ãŒã«ãã«ãã® URL ã貌ãä»ããŸããBolt ã¢ããªãåŒãç¶ãå®è¡ãããŠããå Žåã¯ãURL ãæ€èšŒãããã§ãã¯ããŒã¯ã衚瀺ãããŸãã
-
-Request URL ãæ€èšŒããããã**Subscribe to Bot Events** ãŸã§ã¹ã¯ããŒã«ããŸããã¡ãã»ãŒãžã«é¢ããã€ãã³ããïŒã€ãããŸã:
-- `message.channels` ããªãã®ã¢ããªãè¿œå ãããŠãããããªãã¯ãã£ã³ãã«ã®ã¡ãã»ãŒãžããªãã¹ã³
-- `message.groups` ããªãã®ã¢ããªãè¿œå ãããŠããðãã©ã€ããŒããã£ã³ãã«ã®ã¡ãã»ãŒãžããªãã¹ã³
-- `message.im` ããªãã®ã¢ããªãšãŠãŒã¶ãŒã®ãã€ã¬ã¯ãã¡ãã»ãŒãžããªãã¹ã³
-- `message.mpim` ããªãã®ã¢ããªãè¿œå ãããŠããã°ã«ãŒã DM ããªãã¹ã³
-
-ãããããã«åå ããŠãããã¹ãŠã®å Žæã§å
šãŠã®ã¡ãã»ãŒãžã€ãã³ãããªãã¹ã³ãããããªãããããïŒã€å
šãŠã®ã€ãã³ããéžãã§ãã ãããéžæããããç·ã® **Save Changes** ãã¿ã³ãã¯ãªãã¯ããŸãã
-
----
-
-### ã¡ãã»ãŒãžã®ãªã¹ãã³ã°ãšå¿ç {#listening-and-responding-to-a-message}
-ããã§ãã¢ããªã§ããã€ãã®ããžãã¯ãèšå®ããæºåãæŽããŸããããŸã㯠`message()` ã¡ãœããã䜿çšããŠãã¡ãã»ãŒãžã®ãªã¹ããŒãã¢ã¿ããããŸãããã
-
-次ã®äŸã§ã¯ãããªãã®ã¢ããªãè¿œå ãããŠãããã£ã³ãã«ã DM 㧠`hello` ãšããåèªãå«ããã¹ãŠã®ã¡ãã»ãŒãžããªãã¹ã³ãã `Hey there @user!` ãšå¿çããŸãã
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
-app.message('hello', async ({ message, say }) => {
- // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
- await say(`Hey there <@${message.user}>!`);
-});
-
-(async () => {
- // ã¢ããªãèµ·åããŸã
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-ã¢ããªãåèµ·åããããããããŠãŒã¶ãŒããã£ã³ãã«ã DM ã«è¿œå ãã `hello` ãå«ãã¡ãã»ãŒãžãéä¿¡ããŠã¿ãŠãã ãããã¢ããªãå¿çãããæåã§ãã
-
-ããã¯åºæ¬çãªäŸã§ãããããããèªåã®å¥œããªããã«ã¢ããªãã«ã¹ã¿ãã€ãºããŠããããšãã§ããŸããããã«ã€ã³ã¿ã©ã¯ãã£ããªåäœãè©Šãããã«ããã¬ãŒã³ããã¹ãã§ã¯ãªããã¿ã³ãéä¿¡ããŠã¿ãŸãããã
-
----
-
-### ã¢ã¯ã·ã§ã³ã®éä¿¡ãšå¿ç {#sending-and-responding-to-actions}
-
-ãã¿ã³ãéžæã¡ãã¥ãŒãæ¥ä»ããã«ãŒãã¢ãŒãã«ãªã©ã®æ©èœã䜿çšããã«ã¯ãã€ã³ã¿ã©ã¯ãã£ãæ§ãæå¹ã«ããå¿
èŠããããŸããã€ãã³ããšåæ§ã«ãSlack ã® URL ãæå®ããŠã¢ã¯ã·ã§ã³ ( ããã¿ã³ã»ã¯ãªãã¯ããªã©) ãéä¿¡ããå¿
èŠããããŸãã
-
-ã¢ããªèšå®ããŒãžã«æ»ããå·ŠåŽã® **Interactivity & Shortcuts** ãã¯ãªãã¯ããŸãã**Request URL** ããã¯ã¹ããã 1 ã€ããããšãããããŸãã
-
-:::tip
-
-ããã©ã«ãã§ã¯ãBolt ã¯ã€ãã³ãã«äœ¿çšããŠããã®ãšåããšã³ããã€ã³ããã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ãã«äœ¿çšããããã«èšå®ãããŠãããããäžèšãšåããªã¯ãšã¹ã URL (ãã®äŸã§ã¯ `https://8e8ec2d7.ngrok.io/slack/events`) ã䜿çšããŸããå³äžé
ã«ãã **Save Changes** ãã¿ã³ãæŒããŠãã ãããããã§ã¢ããªã®ã€ã³ã¿ã©ã¯ãã£ããªã³ã³ããŒãã³ããå©çšããèšå®ãæå¹ã«ãªããŸãã!
-
-:::
-
-![Configuring a Request URL](/img/request-url-config.png "Configuring a Request URL")
-
-ã€ã³ã¿ã©ã¯ãã£ãæ©èœãæå¹ã«ãããšãã·ã§ãŒãã«ãããã¢ãŒãã«ãã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ãïŒãã¿ã³ãã»ã¬ã¯ãã¡ãã¥ãŒãããŒã¿ããã«ãŒãªã©ïŒãšã®ããåããã€ãã³ããšããŠã¢ããªã«éä¿¡ãããŸãã
-
-ããã§ã¯ãã¢ããªã®ã³ãŒãã«æ»ããã€ã³ã¿ã©ã¯ãã£ããªåŠçãè¿œå ããŸãããããã®å®è£
ã¯ä»¥äžã®äºã€ã®ã¹ãããã§æ§æãããŸãã
-- æåã«ãã¢ããªãããã¿ã³ãå«ãã¡ãã»ãŒãžãéä¿¡ããŸãã
-- 次ã«ããŠãŒã¶ãŒããã¿ã³ãã¯ãªãã¯ãããšãã®åäœãã¢ããªã§ãªãã¹ã³ããå¿çããŸãã
-
-以äžã¯ãåã®ã»ã¯ã·ã§ã³ã§èšè¿°ããã¢ããªã³ãŒãããæååã ãã§ãªãããã¿ã³ä»ãã®ã¡ãã»ãŒãžãéä¿¡ããããã«å€æŽãããã®ã§ãã
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
-app.message('hello', async ({ message, say }) => {
- // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
- await say({
- blocks: [
- {
- "type": "section",
- "text": {
- "type": "mrkdwn",
- "text": `Hey there <@${message.user}>!`
- },
- "accessory": {
- "type": "button",
- "text": {
- "type": "plain_text",
- "text": "Click Me"
- },
- "action_id": "button_click"
- }
- }
- ],
- text: `Hey there <@${message.user}>!`
- });
-});
-
-(async () => {
- // ã¢ããªãèµ·åããŸã
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-`say()` ã«æ ŒçŽãããŠããå€ãã `blocks` ã®é
åãå«ããªããžã§ã¯ãã«ãªããŸããããã®ãããã¯ã¯ Slack ã¡ãã»ãŒãžãæ§æããã³ã³ããŒãã³ãã§ãããããã¹ããç»åãæ¥ä»ããã«ãŒãªã©ãããŸããŸãªã¿ã€ãããããŸãããã®äŸã§ã¯ãã¢ããªã¯ããã¿ã³ã `accessory` ãšããŠå«ãã»ã¯ã·ã§ã³ãããã¯ã䜿çšããŠå¿çããŸãã`blocks` ã䜿ã£ãŠããå Žåã `text` ã¯éç¥ãã¢ã¯ã»ã·ããªãã£ã®ããã®ãã©ãŒã«ããã¯ãšããŠäœ¿çšãããŸãã
-
-ãã®ãã¿ã³ `accessory` ãªããžã§ã¯ãã«ã¯ã`action_id` ãå²ãåœãŠãããŠããŸããããã¯ãã¿ã³ã®äžæã®èå¥åãšããŠæ©èœãããããã¢ããªã¯ã©ã®ã¢ã¯ã·ã§ã³ã«å¿çããããæå®ã§ããŸãã
-
-:::tip
-
-[Block Kit ãã«ããŒ](https://app.slack.com/block-kit-builder)ã䜿ããšã€ã³ã¿ã©ã¯ãã£ãã¡ãã»ãŒãžãç°¡åã«ãããã¿ã€ãããããšãã§ããŸãããã«ããŒã䜿çšãããšããŠãŒã¶ãŒ (ãŸãã¯ãã®ããŒã ã¡ã³ããŒ) ã¯ã¡ãã»ãŒãžãã¢ãã¯ã¢ããããŠã察å¿ãã JSON ãçæãããããã¢ããªã«çŽæ¥è²Œãä»ããããšãã§ããŸãã
-
-:::
-
-ããã§ãã¢ããªãåèµ·åããã¢ããªãç»é²ãããŠãããã£ã³ãã«ã§ `hello` ãšå
¥åãããšããã¿ã³ä»ãã®ã¡ãã»ãŒãžã衚瀺ãããŸãããã ããã®ãã¿ã³ãã¯ãªãã¯ããŠãããŸã äœãèµ·ãããŸããã
-
-ãã¿ã³ãã¯ãªãã¯ããããšãã©ããŒã¢ããã¡ãã»ãŒãžãéä¿¡ãããã³ãã©ãŒãè¿œå ããŠã¿ãŸãããã
-
-```javascript
-const { App } = require('@slack/bolt');
-
-const app = new App({
- token: process.env.SLACK_BOT_TOKEN,
- signingSecret: process.env.SLACK_SIGNING_SECRET
-});
-
-// "hello" ãå«ãã¡ãã»ãŒãžããªãã¹ã³ããŸã
-app.message('hello', async ({ message, say }) => {
- // ã€ãã³ããããªã¬ãŒããããã£ã³ãã«ã« say() ã§ã¡ãã»ãŒãžãéä¿¡ããŸã
- await say({
- blocks: [
- {
- "type": "section",
- "text": {
- "type": "mrkdwn",
- "text": `Hey there <@${message.user}>!`
- },
- "accessory": {
- "type": "button",
- "text": {
- "type": "plain_text",
- "text": "Click Me"
- },
- "action_id": "button_click"
- }
- }
- ],
- text: `Hey there <@${message.user}>!`
- });
-});
-
-app.action('button_click', async ({ body, ack, say }) => {
- // ã¢ã¯ã·ã§ã³ã®ãªã¯ãšã¹ãã確èª
- await ack();
- await say(`<@${body.user.id}> clicked the button`);
-});
-
-(async () => {
- // ã¢ããªãèµ·åããŸã
- await app.start(process.env.PORT || 3000);
-
- console.log('â¡ïž Bolt app is running!');
-})();
-```
-
-ãã®ããã«ã`app.action()` ã䜿ãããšã§ `button_click` ãšãã `action_id` ã®ãã¿ã³ã¢ã¯ã·ã§ã³ã®ãªã¹ããŒãè¿œå ã§ããã®ã§ããã¢ããªãåèµ·åããŠãã¿ã³ãã¯ãªãã¯ããŠã¿ãŸãããããããšãyou clicked the button ãšããæ°ããã¡ãã»ãŒãžãã¢ããªã«è¡šç€ºãããã¯ãã§ãã
-
----
-
-### 次ã®ã¹ããã {#next-steps}
-ããã§æåã® Bolt ã¢ããªãæ§ç¯ã§ããŸãã! ð
-
-åºæ¬çãªã¢ããªã®äœæãã§ããŸããã®ã§ã次åã¯æ¯éãã£ãšãããããªã Bolt ã®æ©èœã䜿ã£ãŠã¢ããªãäœã£ãŠã¿ãŸããããäžèšã®ãªã³ã¯ã蟿ã£ãŠããããã¢ã€ãã¢ã暡玢ããŠã¿ãŠãã ããïŒ
-
-* åºæ¬çãªæŠå¿µ ããèªã¿ãã ãããBolt ã¢ããªããã¢ã¯ã»ã¹ã§ããããŸããŸãªã¡ãœãããšæ©èœã«ã€ããŠåŠã¶ããšãã§ããŸãã
-
-* ãããã[`events()` ã¡ãœãã](/concepts/event-listening)ã§ãªãã¹ã³ã§ããããŸããŸãªã€ãã³ãã確èªããŸããããã€ãã³ãã¯ãã¹ãŠ[API ãµã€ã](https://api.slack.com/events)ã«ãªã¹ããããŠããŸãã
-
-* Bolt ã䜿çšãããšãã¢ããªã«ã¢ã¿ãããããŠããã¯ã©ã€ã¢ã³ã㧠[Web API ã¡ãœãããåŒã³åºã](/concepts/web-api)ããšãã§ããŸããAPI ãµã€ãã« [200 ãè¶
ããã¡ãœãã](https://api.slack.com/methods)ãçšæããŠãããŸãã
-
-* ç°ãªãããŒã¯ã³ã®çš®é¡ã«ã€ããŠã¯ã[APIãµã€ã](https://api.slack.com/docs/token-types)ãåç
§ããŠãã ãããã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããã¢ã¯ã·ã§ã³ã«å¿ããŠãç°ãªãããŒã¯ã³ãå¿
èŠã«ãªãå ŽåããããŸããHTTPã§ã¯ãªã[Socket Mode](/getting-started)ã䜿çšããŠããå Žåã¯ã`connections:write`ã¹ã³ãŒããæã€è¿œå ã®(`xapp`)ããŒã¯ã³ãå¿
èŠã§ãã
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-theme-classic/navbar.json b/docs/i18n/ja-jp/docusaurus-theme-classic/navbar.json
index d9ffa7ec8..6d84ae7e9 100644
--- a/docs/i18n/ja-jp/docusaurus-theme-classic/navbar.json
+++ b/docs/i18n/ja-jp/docusaurus-theme-classic/navbar.json
@@ -54,5 +54,9 @@
"item.label.Slack Community": {
"message": "Slack Community",
"description": "Navbar item with label Slack Community"
+ },
+ "logo.alt": {
+ "message": "Slack logo",
+ "description": "The alt text of navbar logo"
}
}
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 15ae96e45..7ea9d6924 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -1,109 +1,109 @@
-/**
- The sidebars can be generated from the filesystem, or explicitly defined here.
- Create as many sidebars as you want.
- */
-
-// @ts-check
-
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
- // By default, Docusaurus generates a sidebar from the docs folder structure
- // tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
-
- // But you can create a sidebar manually
sidebarJSBolt: [
{
- type: 'doc',
- id: 'index', // document ID
- label: 'Bolt for JavaScript', // sidebar label
- className: 'sidebar-title',
+ type: "doc",
+ id: "index",
+ label: "Bolt for JavaScript",
+ className: "sidebar-title",
+ },
+ "getting-started",
+ {
+ type: "category",
+ label: "Slack API calls",
+ items: ["concepts/message-sending", "concepts/web-api"],
+ },
+ {
+ type: "category",
+ label: "Events",
+ items: ["concepts/message-listening", "concepts/event-listening"],
+ },
+ {
+ type: "category",
+ label: "App UI & Interactivity",
+ items: [
+ "concepts/acknowledge",
+ "concepts/shortcuts",
+ "concepts/commands",
+ "concepts/actions",
+ "concepts/creating-modals",
+ "concepts/updating-pushing-views",
+ "concepts/view-submissions",
+ "concepts/select-menu-options",
+ "concepts/publishing-views",
+ ],
+ },
+ "concepts/custom-steps",
+ {
+ type: "category",
+ label: "App Configuration",
+ items: [
+ "concepts/socket-mode",
+ "concepts/error-handling",
+ "concepts/logging",
+ "concepts/custom-routes",
+ "concepts/deferring-initialization",
+ "concepts/receiver",
+ ],
},
- 'getting-started',
{
- type: 'category',
- label: 'Basic concepts',
+ type: "category",
+ label: "Middleware & Context",
items: [
- 'basic/message-listening',
- 'basic/message-sending',
- 'basic/event-listening',
- 'basic/web-api',
- 'basic/action-listening',
- 'basic/action-respond',
- 'basic/acknowledge',
- 'basic/shortcuts',
- 'basic/commands',
- 'basic/creating-modals',
- 'basic/updating-pushing-views',
- 'basic/view-submissions',
- 'basic/publishing-views',
- 'basic/custom-steps',
- 'basic/options',
- 'basic/authenticating-oauth',
- 'basic/socket-mode',
+ "concepts/global-middleware",
+ "concepts/listener-middleware",
+ "concepts/context",
],
},
{
- type: 'category',
- label: 'Advanced concepts',
+ type: "category",
+ label: "Authorization & Security",
items: [
- 'advanced/error-handling',
- 'advanced/authorization',
- 'advanced/token-rotation',
- 'advanced/conversation-store',
- 'advanced/global-middleware',
- 'advanced/listener-middleware',
- 'advanced/context',
- 'advanced/deferring-initialization',
- 'advanced/logging',
- 'advanced/custom-routes',
- 'advanced/receiver',
+ "concepts/authenticating-oauth",
+ "concepts/authorization",
+ "concepts/token-rotation",
],
},
{
- type: 'category',
- label: 'Deployments',
- items: ['deployments/aws-lambda', 'deployments/heroku'],
+ type: "category",
+ label: "Deployments",
+ items: ["deployments/aws-lambda", "deployments/heroku"],
},
{
- type: 'category',
- label: 'Steps from apps (Deprecated)',
+ type: "category",
+ label: "Migration Guides",
items: [
- 'steps/steps',
- 'steps/creating-steps',
- 'steps/adding-editing-steps',
- 'steps/saving-steps',
- 'steps/executing-steps',
+ "migration/migration-v2",
+ "migration/migration-v3",
+ "migration/migration-v4",
],
},
- { type: 'html', value: '
' },
{
- type: 'category',
- label: 'Tutorials',
+ type: "category",
+ label: "Legacy",
items: [
- 'tutorial/getting-started-http',
- 'tutorial/hubot-migration',
- 'tutorial/migration-v2',
- 'tutorial/migration-v3',
- 'tutorial/migration-v4',
+ "legacy/hubot-migration",
+ "legacy/steps-from-apps",
+ "legacy/conversation-store",
],
},
- { type: 'html', value: '
' },
- 'reference',
- { type: 'html', value: '
' },
+ { type: "html", value: "
" },
+ "reference",
+ { type: "html", value: "
" },
{
- type: 'link',
- label: 'Release notes',
- href: 'https://github.com/slackapi/bolt-js/releases',
+ type: "link",
+ label: "Release notes",
+ href: "https://github.com/slackapi/bolt-js/releases",
},
{
- type: 'link',
- label: 'Code on GitHub',
- href: 'https://github.com/SlackAPI/bolt-js',
+ type: "link",
+ label: "Code on GitHub",
+ href: "https://github.com/SlackAPI/bolt-js",
},
{
- type: 'link',
- label: 'Contributors Guide',
- href: 'https://github.com/SlackAPI/bolt-js/blob/main/.github/contributing.md',
+ type: "link",
+ label: "Contributors Guide",
+ href: "https://github.com/SlackAPI/bolt-js/blob/main/.github/contributing.md",
},
],
};
diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css
index 45378d07b..c6cc91b1a 100644
--- a/docs/src/css/custom.css
+++ b/docs/src/css/custom.css
@@ -113,3 +113,9 @@ html[data-theme="dark"] .navbar-github-link::before {
font-weight: bold;
color: #000;
}
+
+.tabs-container {
+ border: 2px solid var(--ifm-hr-background-color); /* Adjust the color and thickness as needed */
+ border-radius: 5px; /* To give rounded corners */
+ padding: 0.5em; /* To add spacing inside the tab */
+}