diff --git a/docs/README.md b/docs/README.md
index c1f79adfb..023d89975 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -71,7 +71,6 @@ Then grab the latest version of Node.
nvm install node
```
-
If you are running this project locally for the first time, you'll need to install the packages with the following command:
```
diff --git a/docs/content/basic/action-listening.md b/docs/content/basic/action-listening.md
deleted file mode 100644
index cd677d22d..000000000
--- a/docs/content/basic/action-listening.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-title: Listening to actions
-lang: en
-slug: /concepts/action-listening
----
-
-Your app can listen to user actions, like button clicks, and menu selects, using the `action` method.
-
-Actions can be filtered on an `action_id` of type `str` or `re.Pattern`. `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).
-
-Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
-```python
-# Your listener will be called every time a block element with the action_id "approve_button" is triggered
-@app.action("approve_button")
-def update_message(ack):
- ack()
- # Update the message to reflect the action
-```
-
-
-
-Listening to actions using a constraint object
-
-
-You can use a constraints object to listen to `block_id`s and `action_id`s (or any combination of them). Constraints in the object can be of type `str` or `re.Pattern`.
-
-```python
-# Your function will only be called when the action_id matches 'select_user' AND the block_id matches 'assign_ticket'
-@app.action({
- "block_id": "assign_ticket",
- "action_id": "select_user"
-})
-def update_message(ack, body, client):
- ack()
-
- if "container" in body and "message_ts" in body["container"]:
- client.reactions_add(
- name="white_check_mark",
- channel=body["channel"]["id"],
- timestamp=body["container"]["message_ts"],
- )
-```
-
-
\ No newline at end of file
diff --git a/docs/content/basic/action-respond.md b/docs/content/basic/action-respond.md
deleted file mode 100644
index 7153f18bd..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 `say()`, which 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 utility to use the `response_url` associated with the action.
-
-Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
-```python
-# Your listener will be called every time an interactive component with the action_id âapprove_buttonâ is triggered
-@app.action("approve_button")
-def approve_request(ack, say):
- # Acknowledge action request
- ack()
- say("Request approved ð")
-```
-
-
-
-Using respond()
-
-
-Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](https://api.slack.com/reference/messaging/payload) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
-
-```python
-# Listens to actions triggered with action_id of âuser_selectâ
-@app.action("user_select")
-def select_user(ack, action, respond):
- ack()
- respond(f"You selected <@{action['selected_user']}>")
-```
-
-
\ 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/concepts/actions.md b/docs/content/concepts/actions.md
new file mode 100644
index 000000000..b2ab27920
--- /dev/null
+++ b/docs/content/concepts/actions.md
@@ -0,0 +1,73 @@
+---
+title: Listening & responding to actions
+lang: en
+slug: /concepts/actions
+---
+
+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` parameter of type `str` or `re.Pattern`. The `action_id` parameter acts as a unique identifier 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 guide](/concepts/acknowledge).
+
+Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
+
+```python
+# Your listener will be called every time a block element with the action_id "approve_button" is triggered
+@app.action("approve_button")
+def update_message(ack):
+ ack()
+ # Update the message to reflect the action
+```
+
+### Listening to actions using a constraint object
+
+You can use a constraints object to listen to `block_id`s and `action_id`s (or any combination of them). Constraints in the object can be of type `str` or `re.Pattern`.
+
+```python
+# Your function will only be called when the action_id matches 'select_user' AND the block_id matches 'assign_ticket'
+@app.action({
+ "block_id": "assign_ticket",
+ "action_id": "select_user"
+})
+def update_message(ack, body, client):
+ ack()
+
+ if "container" in body and "message_ts" in body["container"]:
+ client.reactions_add(
+ name="white_check_mark",
+ channel=body["channel"]["id"],
+ timestamp=body["container"]["message_ts"],
+ )
+```
+
+## Responding to actions
+
+There are two main ways to respond to actions. The first (and most common) way is to use `say()`, which 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 utility to use the `response_url` associated with the action.
+
+Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
+
+```python
+# Your listener will be called every time an interactive component with the action_id âapprove_buttonâ is triggered
+@app.action("approve_button")
+def approve_request(ack, say):
+ # Acknowledge action request
+ ack()
+ say("Request approved ð")
+```
+
+### Using `respond()` method
+
+Since `respond()` is a utility for calling the `response_url`, it behaves in the same way. You can pass [all the message payload properties](https://api.slack.com/reference/messaging/payload) as keyword arguments along with optional properties like `response_type` (which has a value of `"in_channel"` or `"ephemeral"`), `replace_original`, `delete_original`, `unfurl_links`, and `unfurl_media`. With that, your app can send a new message payload that will be published back to the source of the original interaction.
+
+```python
+# Listens to actions triggered with action_id of âuser_selectâ
+@app.action("user_select")
+def select_user(ack, action, respond):
+ ack()
+ respond(f"You selected <@{action['selected_user']}>")
+```
\ No newline at end of file
diff --git a/docs/content/advanced/adapters.md b/docs/content/concepts/adapters.md
similarity index 59%
rename from docs/content/advanced/adapters.md
rename to docs/content/concepts/adapters.md
index e8beb9c97..ad4303b15 100644
--- a/docs/content/advanced/adapters.md
+++ b/docs/content/concepts/adapters.md
@@ -4,15 +4,13 @@ lang: en
slug: /concepts/adapters
---
+Adapters are responsible for handling and parsing incoming requests from Slack to conform to [`BoltRequest`](https://github.com/slackapi/bolt-python/blob/main/slack_bolt/request/request.py), then dispatching those requests to your Bolt app.
-Adapters are responsible for handling and parsing incoming requests from Slack to conform to `BoltRequest`, then dispatching those requests to your Bolt app.
-
-By default, Bolt will use the built-in `HTTPServer` adapter. While this is okay for local development, it is not recommended for production. Bolt for Python includes a collection of built-in adapters that can be imported and used with your app. The built-in adapters support a variety of popular Python frameworks including Flask, Django, and Starlette among others. Adapters support the use of any production-ready web server of your choice.
+By default, Bolt will use the built-in [`HTTPServer`](https://docs.python.org/3/library/http.server.html) adapter. While this is okay for local development, **it is not recommended for production**. Bolt for Python includes a collection of built-in adapters that can be imported and used with your app. The built-in adapters support a variety of popular Python frameworks including Flask, Django, and Starlette among others. Adapters support the use of any production-ready web server of your choice.
To use an adapter, you'll create an app with the framework of your choosing and import its corresponding adapter. Then you'll initialize the adapter instance and call its function that handles and parses incoming requests.
-The full list adapters, as well as configuration and sample usage, can be found within the repository's `examples` folder.
-
+The full list adapters, as well as configuration and sample usage, can be found within the repository's [`examples`](https://github.com/slackapi/bolt-python/tree/main/examples)
```python
from slack_bolt import App
diff --git a/docs/content/basic/app-home.md b/docs/content/concepts/app-home.md
similarity index 69%
rename from docs/content/basic/app-home.md
rename to docs/content/concepts/app-home.md
index a7a6a1f02..887279a5d 100644
--- a/docs/content/basic/app-home.md
+++ b/docs/content/concepts/app-home.md
@@ -4,9 +4,9 @@ lang: en
slug: /concepts/app-home
---
-Home tabs are customizable surfaces accessible via the sidebar and search that allow apps to display views on a per-user basis. After enabling App Home within your app configuration, home tabs can be published and updated by passing a `user_id` and view payload to the `views.publish` method.
+[Home tabs](https://api.slack.com/surfaces/tabs/using) are customizable surfaces accessible via the sidebar and search that allow apps to display views on a per-user basis. After enabling App Home within your app configuration, home tabs can be published and updated by passing a `user_id` and [view payload](https://api.slack.com/reference/block-kit/views) to the [`views.publish`](https://api.slack.com/methods/views.publish) method.
-You can subscribe to the `app_home_opened` event to listen for when users open your App Home.
+You can subscribe to the [`app_home_opened`](https://api.slack.com/events/app_home_opened) event to listen for when users open your App Home.
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
```python
diff --git a/docs/content/basic/assistant.md b/docs/content/concepts/assistant.md
similarity index 99%
rename from docs/content/basic/assistant.md
rename to docs/content/concepts/assistant.md
index 07da78424..469bba966 100644
--- a/docs/content/basic/assistant.md
+++ b/docs/content/concepts/assistant.md
@@ -277,7 +277,6 @@ def respond_to_user_messages(logger: logging.Logger, set_status: SetStatus, say:
logger.exception(f"Failed to respond to an inquiry: {e}")
say(f":warning: Sorry, something went wrong during processing your request (error: {e})")
-
# Enable this assistant middleware in your Bolt app
app.use(assistant)
```
diff --git a/docs/content/advanced/async.md b/docs/content/concepts/async.md
similarity index 83%
rename from docs/content/advanced/async.md
rename to docs/content/concepts/async.md
index 9544ad810..197377f93 100644
--- a/docs/content/advanced/async.md
+++ b/docs/content/concepts/async.md
@@ -4,11 +4,9 @@ lang: en
slug: /concepts/async
---
+To use the async version of Bolt, you can import and initialize an `AsyncApp` instance (rather than `App`). `AsyncApp` relies on [AIOHTTP](https://docs.aiohttp.org) to make API requests, which means you'll need to install `aiohttp` (by adding to `requirements.txt` or running `pip install aiohttp`).
-To use the async version of Bolt, you can import and initialize an `AsyncApp` instance (rather than `App`). `AsyncApp` relies on AIOHTTP to make API requests, which means you'll need to install `aiohttp` (by adding to `requirements.txt` or running `pip install aiohttp`).
-
-Sample async projects can be found within the repository's `examples` folder.
-
+Sample async projects can be found within the repository's [examples](https://github.com/slackapi/bolt-python/tree/main/examples) folder.
```python
# Requirement: install aiohttp
@@ -28,12 +26,7 @@ if __name__ == "__main__":
app.start(3000)
```
-
-
-Using other frameworks
-
-
-
+## Using other frameworks
Internally `AsyncApp#start()` implements a [`AIOHTTP`](https://docs.aiohttp.org/) web server. If you prefer, you can use a framework other than `AIOHTTP` to handle incoming requests.
@@ -48,7 +41,6 @@ pip install slack_bolt sanic uvicorn
uvicorn async_app:api --reload --port 3000 --log-level debug
```
-
```python
from slack_bolt.async_app import AsyncApp
app = AsyncApp()
@@ -76,5 +68,4 @@ async def endpoint(req: Request):
if __name__ == "__main__":
api.run(host="0.0.0.0", port=int(os.environ.get("PORT", 3000)))
-```
-
+```
\ No newline at end of file
diff --git a/docs/content/basic/authenticating-oauth.md b/docs/content/concepts/authenticating-oauth.md
similarity index 98%
rename from docs/content/basic/authenticating-oauth.md
rename to docs/content/concepts/authenticating-oauth.md
index 321803497..734a727b2 100644
--- a/docs/content/basic/authenticating-oauth.md
+++ b/docs/content/concepts/authenticating-oauth.md
@@ -35,10 +35,7 @@ app = App(
)
```
-
-
-Customizing OAuth defaults
-
+## Customizing OAuth defaults
You can override the default OAuth using `oauth_settings`, which can be passed in during the initialization of App. You can override the following:
@@ -90,6 +87,4 @@ app = App(
callback_options=callback_options,
),
)
-```
-
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/advanced/authorization.md b/docs/content/concepts/authorization.md
similarity index 99%
rename from docs/content/advanced/authorization.md
rename to docs/content/concepts/authorization.md
index 7a67d79ca..4c293b5c2 100644
--- a/docs/content/advanced/authorization.md
+++ b/docs/content/concepts/authorization.md
@@ -4,7 +4,6 @@ lang: en
slug: /concepts/authorization
---
-
Authorization is the process of determining which Slack credentials should be available while processing an incoming Slack request.
Apps installed on a single workspace can simply pass their bot token into the `App` constructor using the `token` parameter. However, if your app will be installed on multiple workspaces, you have two options. The easier option is to use the built-in OAuth support. This will handle setting up OAuth routes and verifying state. Read the section on [authenticating with OAuth](/concepts/authenticating-oauth) for details.
@@ -17,7 +16,6 @@ For a more custom solution, you can set the `authorize` parameter to a function
- **`enterprise_id`** and **`team_id`**, which can be found in requests sent to your app.
- **`user_id`** only when using `user_token`.
-
```python
import os
from slack_bolt import App
diff --git a/docs/content/basic/commands.md b/docs/content/concepts/commands.md
similarity index 100%
rename from docs/content/basic/commands.md
rename to docs/content/concepts/commands.md
diff --git a/docs/content/advanced/context.md b/docs/content/concepts/context.md
similarity index 99%
rename from docs/content/advanced/context.md
rename to docs/content/concepts/context.md
index 34d7819f7..cf7fa45f1 100644
--- a/docs/content/advanced/context.md
+++ b/docs/content/concepts/context.md
@@ -4,12 +4,10 @@ lang: en
slug: /concepts/context
---
-
All listeners have access to a `context` dictionary, which can be used to enrich requests with additional information. Bolt automatically attaches information that is included in the incoming request, like `user_id`, `team_id`, `channel_id`, and `enterprise_id`.
`context` is just a dictionary, so you can directly modify it.
-
```python
# Listener middleware to fetch tasks from external system using user ID
def fetch_tasks(context, event, next):
diff --git a/docs/content/advanced/custom-adapters.md b/docs/content/concepts/custom-adapters.md
similarity index 99%
rename from docs/content/advanced/custom-adapters.md
rename to docs/content/concepts/custom-adapters.md
index 313173750..55c73130d 100644
--- a/docs/content/advanced/custom-adapters.md
+++ b/docs/content/concepts/custom-adapters.md
@@ -4,7 +4,6 @@ lang: en
slug: /concepts/custom-adapters
---
-
[Adapters](/concepts/adapters) are flexible and can be adjusted based on the framework you prefer. There are two necessary components of adapters:
- `__init__(app: App)`: Constructor that accepts and stores an instance of the Bolt `App`.
@@ -23,7 +22,6 @@ Your adapter will return [an instance of `BoltResponse`](https://github.com/slac
For more in-depth examples of custom adapters, look at the implementations of the [built-in adapters](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter).
-
```python
# Necessary imports for Flask
from flask import Request, Response, make_response
diff --git a/docs/content/basic/custom-steps.md b/docs/content/concepts/custom-steps.md
similarity index 99%
rename from docs/content/basic/custom-steps.md
rename to docs/content/concepts/custom-steps.md
index 1eedf9f5d..f91fac33c 100644
--- a/docs/content/basic/custom-steps.md
+++ b/docs/content/concepts/custom-steps.md
@@ -1,5 +1,6 @@
---
title: Listening and responding to custom steps
+sidebar_label: Custom steps
lang: en
slug: /concepts/custom-steps
---
diff --git a/docs/content/advanced/errors.md b/docs/content/concepts/errors.md
similarity index 99%
rename from docs/content/advanced/errors.md
rename to docs/content/concepts/errors.md
index 59601f47b..d0e5cccad 100644
--- a/docs/content/advanced/errors.md
+++ b/docs/content/concepts/errors.md
@@ -4,12 +4,10 @@ lang: en
slug: /concepts/errors
---
-
If an error occurs in a listener, you can handle it directly using a try/except block. Errors associated with your app will be of type `BoltError`. Errors associated with calling Slack APIs will be of type `SlackApiError`.
By default, the global error handler will log all non-handled exceptions to the console. To handle global errors yourself, you can attach a global error handler to your app using the `app.error(fn)` function.
-
```python
@app.error
def custom_error_handler(error, body, logger):
diff --git a/docs/content/basic/event-listening.md b/docs/content/concepts/event-listening.md
similarity index 95%
rename from docs/content/basic/event-listening.md
rename to docs/content/concepts/event-listening.md
index 95c6e84ea..79317b07a 100644
--- a/docs/content/basic/event-listening.md
+++ b/docs/content/concepts/event-listening.md
@@ -18,11 +18,8 @@ def ask_for_introduction(event, say):
text = f"Welcome to the team, <@{user_id}>! ð You can introduce yourself in this channel."
say(text=text, channel=welcome_channel_id)
```
-
-
- Filtering on message subtypes
-
+## Filtering on message subtypes
The `message()` listener is equivalent to `event("message")`.
@@ -38,5 +35,4 @@ You can explicitly filter for events without a subtype by explicitly setting `No
def log_message_change(logger, event):
user, text = event["user"], event["text"]
logger.info(f"The user {user} changed the message to {text}")
-```
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/advanced/global-middleware.md b/docs/content/concepts/global-middleware.md
similarity index 99%
rename from docs/content/advanced/global-middleware.md
rename to docs/content/concepts/global-middleware.md
index 61aa97066..ec748c000 100644
--- a/docs/content/advanced/global-middleware.md
+++ b/docs/content/concepts/global-middleware.md
@@ -4,13 +4,10 @@ lang: en
slug: /concepts/global-middleware
---
-
Global middleware is run for all incoming requests, before any listener middleware. You can add any number of global middleware to your app by passing middleware functions to `app.use()`. Middleware functions are called with the same arguments as listeners, with an additional `next()` function.
Both global and listener middleware must call `next()` to pass control of the execution chain to the next middleware.
-
-
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
```python
@app.use
diff --git a/docs/content/advanced/lazy-listeners.md b/docs/content/concepts/lazy-listeners.md
similarity index 95%
rename from docs/content/advanced/lazy-listeners.md
rename to docs/content/concepts/lazy-listeners.md
index e179c6afc..d72c2f9c0 100644
--- a/docs/content/advanced/lazy-listeners.md
+++ b/docs/content/concepts/lazy-listeners.md
@@ -4,7 +4,6 @@ lang: en
slug: /concepts/lazy-listeners
---
-
Lazy Listeners are a feature which make it easier to deploy Slack apps to FaaS (Function-as-a-Service) environments. Please note that this feature is only available in Bolt for Python, and we are not planning to add the same to other Bolt frameworks.
Typically when handling actions, commands, shortcuts, options and view submissions, you must acknowledge the request from Slack by calling `ack()` within 3 seconds. Calling `ack()` results in sending an HTTP 200 OK response to Slack, letting Slack know that you're handling the response. We normally encourage you to do this as the very first step in your handler function.
@@ -15,7 +14,6 @@ To allow you to still run more time-consuming processes as part of your handler,
* `ack: Callable`: Responsible for calling `ack()` within 3 seconds
* `lazy: List[Callable]`: Responsible for handling time-consuming processes related to the request. The lazy function does not have access to `ack()`.
-
```python
def respond_to_slack_within_3_seconds(body, ack):
text = body.get("text")
@@ -37,13 +35,9 @@ app.command("/start-process")(
)
```
-
-
-Example with AWS Lambda
-
-
+## Example with AWS Lambda
-This example deploys the code to [AWS Lambda](https://aws.amazon.com/lambda/). There are more examples within the [`examples` folder](https://github.com/slackapi/bolt-python/tree/main/examples/aws_lambda).
+This example deploys the code to [AWS Lambda](https://aws.amazon.com/lambda/). There are more examples within the [`examples`](https://github.com/slackapi/bolt-python/tree/main/examples/aws_lambda) folder.
```bash
pip install slack_bolt
@@ -61,7 +55,6 @@ echo 'slack_bolt' > requirements.txt
lambda deploy --config-file config.yaml --requirements requirements.txt
```
-
```python
from slack_bolt import App
from slack_bolt.adapter.aws_lambda import SlackRequestHandler
@@ -108,5 +101,4 @@ Please note that the following IAM permissions would be required for running thi
}
]
}
-```
-
+```
\ No newline at end of file
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 99%
rename from docs/content/advanced/logging.md
rename to docs/content/concepts/logging.md
index 900484b7a..5f82d168a 100644
--- a/docs/content/advanced/logging.md
+++ b/docs/content/concepts/logging.md
@@ -4,12 +4,10 @@ lang: en
slug: /concepts/logging
---
-
By default, Bolt will log information from your app to the output destination. After you've imported the `logging` module, you can customize the root log level by passing the `level` parameter to `basicConfig()`. The available log levels in order of least to most severe are `debug`, `info`, `warning`, `error`, and `critical`.
Outside of a global context, you can also log a single message corresponding to a specific level. Because Bolt uses Pythonâs [standard logging module](https://docs.python.org/3/library/logging.html), you can use any its features.
-
```python
import logging
diff --git a/docs/content/basic/message-listening.md b/docs/content/concepts/message-listening.md
similarity index 93%
rename from docs/content/basic/message-listening.md
rename to docs/content/concepts/message-listening.md
index 0243b1537..3527dc226 100644
--- a/docs/content/basic/message-listening.md
+++ b/docs/content/concepts/message-listening.md
@@ -22,10 +22,7 @@ def say_hello(message, say):
say(f"Hi there, <@{user}>!")
```
-
-
-Using a regular expression pattern
-
+## Using a regular expression pattern
The `re.compile()` method can be used instead of a string for more granular matching.
@@ -37,6 +34,4 @@ def say_hello_regex(say, context):
# regular expression matches are inside of context.matches
greeting = context['matches'][0]
say(f"{greeting}, how are you?")
-```
-
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/basic/message-sending.md b/docs/content/concepts/message-sending.md
similarity index 96%
rename from docs/content/basic/message-sending.md
rename to docs/content/concepts/message-sending.md
index d7b5d2da9..b44f8848f 100644
--- a/docs/content/basic/message-sending.md
+++ b/docs/content/concepts/message-sending.md
@@ -16,10 +16,7 @@ def ask_who(message, say):
say("_Who's there?_")
```
-
-
-Sending a message with blocks
-
+## Sending a message with blocks
`say()` accepts more complex message payloads to make it easy to add functionality and structure to your messages.
@@ -45,6 +42,4 @@ def show_datepicker(event, say):
blocks=blocks,
text="Pick a date for me to remind you"
)
-```
-
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/basic/opening-modals.md b/docs/content/concepts/opening-modals.md
similarity index 77%
rename from docs/content/basic/opening-modals.md
rename to docs/content/concepts/opening-modals.md
index 9049a5bdb..a686eec63 100644
--- a/docs/content/basic/opening-modals.md
+++ b/docs/content/concepts/opening-modals.md
@@ -4,9 +4,9 @@ lang: en
slug: /concepts/opening-modals
---
-[Modals](https://api.slack.com/block-kit/surfaces/modal) are focused surfaces that allow you to collect user data and display dynamic information. You can open a modal by passing a valid `trigger_id` and a [view payload](https://api.slack.com/reference/block-kit/views) to the built-in client's [`views.open`](https://api.slack.com/methods/views.open) method.
+[Modals](https://api.slack.com/block-kit/surfaces/modals) are focused surfaces that allow you to collect user data and display dynamic information. You can open a modal by passing a valid `trigger_id` and a [view payload](https://api.slack.com/reference/block-kit/views) to the built-in client's [`views.open`](https://api.slack.com/methods/views.open) method.
-Your app receives `trigger_id`s in payloads sent to your Request URL that are triggered by user invocations, like a shortcut, button press, or interaction with a select menu.
+Your app receives `trigger_id` parameters in payloads sent to your Request URL triggered user invocation like a slash command, button press, or interaction with a select menu.
Read more about modal composition in the [API documentation](https://api.slack.com/surfaces/modals/using#composing_views).
diff --git a/docs/content/basic/options.md b/docs/content/concepts/select-menu-options.md
similarity index 97%
rename from docs/content/basic/options.md
rename to docs/content/concepts/select-menu-options.md
index e7c1e1243..835ae15c7 100644
--- a/docs/content/basic/options.md
+++ b/docs/content/concepts/select-menu-options.md
@@ -1,5 +1,5 @@
---
-title: Listening and responding to options
+title: Listening & responding to select menu options
lang: en
slug: /concepts/options
---
diff --git a/docs/content/basic/shortcuts.md b/docs/content/concepts/shortcuts.md
similarity index 94%
rename from docs/content/basic/shortcuts.md
rename to docs/content/concepts/shortcuts.md
index 6f469c20f..d9f02c2a1 100644
--- a/docs/content/basic/shortcuts.md
+++ b/docs/content/concepts/shortcuts.md
@@ -53,11 +53,9 @@ def open_modal(ack, shortcut, client):
)
```
-
-
- Listening to shortcuts using a constraint object
-
- You can use a constraints object to listen to `callback_id`s, and `type`s. Constraints in the object can be of type `str` or `re.Pattern`.
+## Listening to shortcuts using a constraint object
+
+You can use a constraints object to listen to `callback_id`s, and `type`s. Constraints in the object can be of type `str` or `re.Pattern`.
```python
# Your listener will only be called when the callback_id matches 'open_modal' AND the type matches 'message_action'
@@ -92,5 +90,4 @@ def open_modal(ack, shortcut, client):
]
}
)
-```
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/basic/socket-mode.md b/docs/content/concepts/socket-mode.md
similarity index 97%
rename from docs/content/basic/socket-mode.md
rename to docs/content/concepts/socket-mode.md
index 61be345de..72a2b7982 100644
--- a/docs/content/basic/socket-mode.md
+++ b/docs/content/concepts/socket-mode.md
@@ -17,7 +17,6 @@ While we recommend using [the built-in Socket Mode adapter](https://github.com/s
|[aiohttp](https://pypi.org/project/aiohttp/) (asyncio-based)|[slack_bolt.adapter.socket_mode.aiohttp](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter/socket_mode/aiohttp)|
|[websockets](https://pypi.org/project/websockets/) (asyncio-based)|[slack_bolt.adapter.socket_mode.websockets](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter/socket_mode/websockets)|
-
```python
import os
from slack_bolt import App
@@ -35,10 +34,7 @@ if __name__ == "__main__":
handler.start()
```
-
-
-Using Async (asyncio)
-
+## Using Async (asyncio)
To use the asyncio-based adapters such as aiohttp, your whole app needs to be compatible with asyncio's async/await programming model. `AsyncSocketModeHandler` is available for running `AsyncApp` and its async middleware and listeners.
@@ -60,5 +56,4 @@ async def main():
if __name__ == "__main__":
import asyncio
asyncio.run(main())
-```
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/content/concepts/steps-from-apps.md b/docs/content/concepts/steps-from-apps.md
new file mode 100644
index 000000000..84315143b
--- /dev/null
+++ b/docs/content/concepts/steps-from-apps.md
@@ -0,0 +1,205 @@
+---
+title: Steps from apps
+lang: en
+slug: /legacy/steps-from-apps
+---
+
+:::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).
+
+Steps from apps are 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/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 keys: `edit`, `save`, and `execute`. Each of these keys must be a single callback or a list 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.
+
+Alternatively, steps from apps can also be created using the `WorkflowStepBuilder` class alongside a decorator pattern. For more information, including an example of this approach, [refer to the documentation](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder).
+
+Refer to the module documents ([common](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) / [step-specific](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/utilities/index.html)) to learn the available arguments.
+
+```python
+import os
+from slack_bolt import App
+from slack_bolt.workflows.step import WorkflowStep
+
+# Initiate the Bolt app as you normally would
+app = App(
+ token=os.environ.get("SLACK_BOT_TOKEN"),
+ signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
+)
+
+def edit(ack, step, configure):
+ pass
+
+def save(ack, view, update):
+ pass
+
+def execute(step, complete, fail):
+ pass
+
+# Create a new WorkflowStep instance
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+
+# Pass Step to set up listeners
+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 the view's blocks with the corresponding `blocks` argument. To disable saving the configuration before certain conditions are met, you can also 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).
+
+Refer to the module documents ([common](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) / [step-specific](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/utilities/index.html)) to learn the available arguments.
+
+```python
+def edit(ack, step, configure):
+ ack()
+
+ 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"},
+ },
+ ]
+ configure(blocks=blocks)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
+
+## 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 a dictionary representing the data your app expects to receive from the user upon step execution.
+- `outputs` is a list 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).
+
+Refer to the module documents ([common](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) / [step-specific](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/utilities/index.html)) to learn the available arguments.
+
+```python
+def save(ack, view, update):
+ ack()
+
+ values = view["state"]["values"]
+ task_name = values["task_name_input"]["name"]
+ task_description = values["task_description_input"]["description"]
+
+ inputs = {
+ "task_name": {"value": task_name["value"]},
+ "task_description": {"value": task_description["value"]}
+ }
+ outputs = [
+ {
+ "type": "text",
+ "name": "task_name",
+ "label": "Task name",
+ },
+ {
+ "type": "text",
+ "name": "task_description",
+ "label": "Task description",
+ }
+ ]
+ update(inputs=inputs, outputs=outputs)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
+
+## Executing steps from app
+
+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 from apps 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.
+
+Refer to the module documents ([common](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) / [step-specific](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/utilities/index.html)) to learn the available arguments.
+
+```python
+def execute(step, complete, fail):
+ inputs = step["inputs"]
+ # if everything was successful
+ outputs = {
+ "task_name": inputs["task_name"]["value"],
+ "task_description": inputs["task_description"]["value"],
+ }
+ complete(outputs=outputs)
+
+ # if something went wrong
+ error = {"message": "Just testing step failure!"}
+ fail(error=error)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
diff --git a/docs/content/advanced/token-rotation.md b/docs/content/concepts/token-rotation.md
similarity index 92%
rename from docs/content/advanced/token-rotation.md
rename to docs/content/concepts/token-rotation.md
index 1f278c3aa..ca690dd28 100644
--- a/docs/content/advanced/token-rotation.md
+++ b/docs/content/concepts/token-rotation.md
@@ -4,12 +4,10 @@ lang: en
slug: /concepts/token-rotation
---
-
Supported in Bolt for Python as of [v1.7.0](https://github.com/slackapi/bolt-python/releases/tag/v1.7.0), token rotation provides an extra layer of security for your access tokens and is defined by the [OAuth V2 RFC](https://datatracker.ietf.org/doc/html/rfc6749#section-10.4).
Instead of an access token representing an existing installation of your Slack app indefinitely, with token rotation enabled, access tokens expire. A refresh token acts as a long-lived way to refresh your access tokens.
Bolt for Python supports and will handle token rotation automatically so long as the [built-in OAuth](/concepts/authenticating-oauth) functionality is used.
-For more information about token rotation, please see the [documentation](https://api.slack.com/authentication/rotation).
-
+For more information about token rotation, please see the [documentation](https://api.slack.com/authentication/rotation).
\ No newline at end of file
diff --git a/docs/content/basic/updating-pushing-views.md b/docs/content/concepts/updating-pushing-views.md
similarity index 66%
rename from docs/content/basic/updating-pushing-views.md
rename to docs/content/concepts/updating-pushing-views.md
index 8cc45d49a..d7a9e3a3e 100644
--- a/docs/content/basic/updating-pushing-views.md
+++ b/docs/content/concepts/updating-pushing-views.md
@@ -4,17 +4,17 @@ lang: en
slug: /concepts/updating-pushing-views
---
-Modals contain a stack of views. When you call `views_open`, you add the root view to the modal. After the initial call, you can dynamically update a view by calling `views_update`, or stack a new view on top of the root view by calling `views_push`.
+Modals contain a stack of views. When you call [`views_open`](https://api.slack.com/methods/views.open), you add the root view to the modal. After the initial call, you can dynamically update a view by calling [`views_update`](https://api.slack.com/methods/views.update), or stack a new view on top of the root view by calling [`views_push`](https://api.slack.com/methods/views.push)
-**`views_update`**
+## The `views_update` method
To update a view, you can use the built-in client to call `views_update` with the `view_id` that was generated when you opened the view, and a new `view` including the updated `blocks` list. If you're updating the view when a user interacts with an element inside of an existing view, the `view_id` will be available in the `body` of the request.
-**`views_push`**
+## The `views_push` method
-To push a new view onto the view stack, you can use the built-in client to call `views_push` with a valid `trigger_id` a new view payload. The arguments for `views_push` is the same as opening modals. After you open a modal, you may only push two additional views onto the view stack.
+To push a new view onto the view stack, you can use the built-in client to call `views_push` with a valid `trigger_id` a new [view payload](https://api.slack.com/reference/block-kit/views). The arguments for `views_push` is the same as [opening modals](/concepts/creating-models). After you open a modal, you may only push two additional views onto the view stack.
-Learn more about updating and pushing views in our API documentation.
+Learn more about updating and pushing views in our [API documentation](https://api.slack.com/surfaces/modals/using#modifying)
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
```python
diff --git a/docs/content/basic/view_submissions.md b/docs/content/concepts/view-submissions.md
similarity index 84%
rename from docs/content/basic/view_submissions.md
rename to docs/content/concepts/view-submissions.md
index b1c3e7cef..a22911e71 100644
--- a/docs/content/basic/view_submissions.md
+++ b/docs/content/concepts/view-submissions.md
@@ -4,9 +4,7 @@ lang: en
slug: /concepts/view_submissions
---
-
-
-If a view payload contains any input blocks, you must listen to `view_submission` requests to receive their values. To listen to `view_submission` requests, you can use the built-in `view()` method. `view()` requires a `callback_id` of type `str` or `re.Pattern`.
+If a [view payload](https://api.slack.com/reference/block-kit/views) contains any input blocks, you must listen to `view_submission` requests to receive their values. To listen to `view_submission` requests, you can use the built-in `view()` method. `view()` requires a `callback_id` of type `str` or `re.Pattern`.
You can access the value of the `input` blocks by accessing the `state` object. `state` contains a `values` object that uses the `block_id` and unique `action_id` to store the input values.
@@ -26,7 +24,8 @@ def handle_submission(ack, body):
ack(response_action="update", view=build_new_view(body))
```
Similarly, there are options for [displaying errors](https://api.slack.com/surfaces/modals/using#displaying_errors) in response to view submissions.
-Read more about view submissions in our API documentation.
+
+Read more about view submissions in our [API documentation](https://api.slack.com/surfaces/modals/using#handling_submissions)
---
@@ -34,7 +33,7 @@ Read more about view submissions in our API documentation for more information about view_closed.
+See the [API documentation](https://api.slack.com/surfaces/modals/using#modal_cancellations) for more information about `view_closed`.
```python
@@ -63,9 +62,6 @@ def handle_view_closed(ack, body, logger):
logger.info(body)
```
-
-
-
Refer to [the module document](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/kwargs_injection/args.html) to learn the available listener arguments.
```python
# Handle a view_submission request
diff --git a/docs/content/basic/web-api.md b/docs/content/concepts/web-api.md
similarity index 100%
rename from docs/content/basic/web-api.md
rename to docs/content/concepts/web-api.md
diff --git a/docs/content/steps/adding-editing-steps.md b/docs/content/steps/adding-editing-steps.md
deleted file mode 100644
index 99ca6d587..000000000
--- a/docs/content/steps/adding-editing-steps.md
+++ /dev/null
@@ -1,62 +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.
-
-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 the view's blocks with the corresponding `blocks` argument. To disable saving the configuration before certain conditions are met, you can also 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).
-
-Refer to the module documents (common / step-specific) to learn the available arguments.
-
-```python
-def edit(ack, step, configure):
- ack()
-
- 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"},
- },
- ]
- configure(blocks=blocks)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
diff --git a/docs/content/steps/creating-steps.md b/docs/content/steps/creating-steps.md
deleted file mode 100644
index 6728a77e1..000000000
--- a/docs/content/steps/creating-steps.md
+++ /dev/null
@@ -1,59 +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.
-
-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 keys: `edit`, `save`, and `execute`. Each of these keys must be a single callback or a list 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.
-
-Alternatively, steps from apps can also be created using the `WorkflowStepBuilder` class alongside a decorator pattern. For more information, including an example of this approach, [refer to the documentation](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder).
-
-Refer to the module documents (common / step-specific) to learn the available arguments.
-
-```python
-import os
-from slack_bolt import App
-from slack_bolt.workflows.step import WorkflowStep
-
-# Initiate the Bolt app as you normally would
-app = App(
- token=os.environ.get("SLACK_BOT_TOKEN"),
- signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
-)
-
-def edit(ack, step, configure):
- pass
-
-def save(ack, view, update):
- pass
-
-def execute(step, complete, fail):
- pass
-
-# Create a new WorkflowStep instance
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-
-# Pass Step to set up listeners
-app.step(ws)
-```
diff --git a/docs/content/steps/executing-steps.md b/docs/content/steps/executing-steps.md
deleted file mode 100644
index 12d557cd0..000000000
--- a/docs/content/steps/executing-steps.md
+++ /dev/null
@@ -1,45 +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.
-
-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 from apps 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.
-
-Refer to the module documents (common / step-specific) to learn the available arguments.
-```python
-def execute(step, complete, fail):
- inputs = step["inputs"]
- # if everything was successful
- outputs = {
- "task_name": inputs["task_name"]["value"],
- "task_description": inputs["task_description"]["value"],
- }
- complete(outputs=outputs)
-
- # if something went wrong
- error = {"message": "Just testing step failure!"}
- fail(error=error)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
diff --git a/docs/content/steps/saving-steps.md b/docs/content/steps/saving-steps.md
deleted file mode 100644
index 079cf5d71..000000000
--- a/docs/content/steps/saving-steps.md
+++ /dev/null
@@ -1,62 +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.
-
-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 a dictionary representing the data your app expects to receive from the user upon step execution.
-- `outputs` is a list 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).
-
-Refer to the module documents (common / step-specific) to learn the available arguments.
-```python
-def save(ack, view, update):
- ack()
-
- values = view["state"]["values"]
- task_name = values["task_name_input"]["name"]
- task_description = values["task_description_input"]["description"]
-
- inputs = {
- "task_name": {"value": task_name["value"]},
- "task_description": {"value": task_description["value"]}
- }
- outputs = [
- {
- "type": "text",
- "name": "task_name",
- "label": "Task name",
- },
- {
- "type": "text",
- "name": "task_description",
- "label": "Task description",
- }
- ]
- update(inputs=inputs, outputs=outputs)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
diff --git a/docs/content/steps/steps.md b/docs/content/steps/steps.md
deleted file mode 100644
index 64604ba78..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.
-
-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 for legacy workflows are now deprecated. Use new [custom steps](https://api.slack.com/automation/functions/custom-bolt).
-
-Steps from apps allow your app to create and process steps that users can add using [Workflow Builder](https://api.slack.com/workflows).
-
-Steps from apps are 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/workflows/steps).
diff --git a/docs/content/tutorial/ai-chatbot.md b/docs/content/tutorial/ai-chatbot.md
index 9fec871a0..9f4038f36 100644
--- a/docs/content/tutorial/ai-chatbot.md
+++ b/docs/content/tutorial/ai-chatbot.md
@@ -12,7 +12,7 @@ In this tutorial, you'll learn how to bring the power of AI into your Slack work
Before getting started, you will need the following:
-* a development workspace where you have permissions to install apps. If you donât have a workspace, go ahead and set that up now—you can [go here](https://slack.com/get-started#create) to create one, or you can join the [Developer Program](https://api.slack.com/developer-program) and provision a sandbox with access to all Slack features for free.
+* a development workspace where you have permissions to install apps. If you donât have a workspace, go ahead and set that up now â you can [go here](https://slack.com/get-started#create) to create one, or you can join the [Developer Program](https://api.slack.com/developer-program) and provision a sandbox with access to all Slack features for free.
* a development environment with [Python 3.6](https://www.python.org/downloads/) or later.
* an Anthropic or OpenAI account with sufficient credits, and in which you have generated a secret key.
@@ -144,7 +144,7 @@ When finished, click **Finish Up**, then click **Publish** to make the workflow
In order for Bolty to provide summaries of recent conversation in a channel, Bolty _must_ be a member of that channel.
-1. Invite Bolty to a channel that you are able to leave and rejoin (for example, not the **#general** channel or a private channel someone else created) by mentioning the app in the channel—i.e., tagging **@Bolty** in the channel and sending your message.
+1. Invite Bolty to a channel that you are able to leave and rejoin (for example, not the **#general** channel or a private channel someone else created) by mentioning the app in the channel â i.e., tagging **@Bolty** in the channel and sending your message.
2. Slackbot will prompt you to either invite Bolty to the channel, or do nothing. Click **Invite Them**. Now when new users join the channel, the workflow you just created will be kicked off.
To test this, leave the channel you just invited Bolty to and rejoin it. This will kick off your workflow and you'll receive a direct message from **Welcome to the channel**. Click the **Yes, give me a summary** button, and Bolty will summarize the recent conversations in the channel you joined.
@@ -167,7 +167,6 @@ It retrieves the conversation history, parses it, generates a summary using an A
and completes the workflow with the summary or fails if an error occurs.
"""
-
def handle_summary_function_callback(
ack: Ack, inputs: dict, fail: Fail, logger: Logger, client: WebClient, complete: Complete
):
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index d6c3aa5a7..b7a5ad096 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -55,6 +55,23 @@ const config = {
to: "/",
from: ["/concepts", "/concepts/basic", "/concepts/advanced"],
},
+ {
+ to: '/concepts/actions',
+ from: [
+ '/concepts/action-listening',
+ '/concepts/action-responding'
+ ],
+ },
+ {
+ to: '/legacy/steps-from-apps',
+ from: [
+ '/concepts/steps',
+ '/concepts/creating-steps',
+ '/concepts/adding-editing-steps',
+ '/concepts/saving-steps',
+ '/concepts/executing-steps'
+ ],
+ },
],
},
],
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 3a31a05c5..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/action-respond.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: ã¢ã¯ã·ã§ã³ãžã®å¿ç
-lang: ja-jp
-slug: /concepts/action-respond
----
-
-ã¢ã¯ã·ã§ã³ãžã®å¿çã«ã¯ã䞻㫠2 ã€ã®æ¹æ³ããããŸãã1 ã€ç®ã®æãäžè¬çãªããæ¹ã¯ `say()` ã䜿çšããæ¹æ³ã§ãããã®ãªã¯ãšã¹ããçºçããäŒè©±ïŒãã£ã³ãã«ã DMïŒã«ã¡ãã»ãŒãžãè¿ããŸãã
-
-2 ã€ç®ã¯ã`respond()` ã䜿çšããæ¹æ³ã§ããããã¯ãã¢ã¯ã·ã§ã³ã«é¢é£ã¥ãããã `response_url` ã䜿ã£ãã¡ãã»ãŒãžéä¿¡ãè¡ãããã®ãŠãŒãã£ãªãã£ã§ãã
-
-æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããã
-```python
-# 'approve_button' ãšãã action_id ã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããããªã¬ãŒããããšããã®ãªã¹ããŒãåŒã°ãã
-@app.action("approve_button")
-def approve_request(ack, say):
- # ã¢ã¯ã·ã§ã³ã®ãªã¯ãšã¹ãã確èª
- ack()
- say("Request approved ð")
-```
-
-
-
-respond() ã®å©çš
-
-
-`respond()` 㯠`response_url` ã䜿ã£ãŠéä¿¡ãããšãã«äŸ¿å©ãªã¡ãœããã§ãããããšåããããªåäœãããŸããæçš¿ããã¡ãã»ãŒãžã®ãã€ããŒãã«ã¯ãå
šãŠã®[ã¡ãã»ãŒãžãã€ããŒãã®ããããã£](https://api.slack.com/reference/messaging/payload)ãšãªãã·ã§ã³ã®ããããã£ãšã㊠`response_type`ïŒå€ã¯ `"in_channel"` ãŸã㯠`"ephemeral"`ïŒã`replace_original`ã`delete_original`ã`unfurl_links`ã`unfurl_media` ãªã©ãæå®ã§ããŸããããããããšã«ãã£ãŠã¢ããªããéä¿¡ãããã¡ãã»ãŒãžã¯ãããåãã®çºçå
ã«åæ ãããŸãã
-
-```python
-# 'user_select' ãšãã action_id ãæã€ã¢ã¯ã·ã§ã³ã®ããªã¬ãŒããªãã¹ã³
-@app.action("user_select")
-def select_user(ack, action, respond):
- ack()
- respond(f"You selected <@{action['selected_user']}>")
-```
-
-
\ No newline at end of file
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 99%
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
index d180a966d..3e3523417 100644
--- 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
@@ -4,8 +4,6 @@ lang: ja-jp
slug: /concepts/acknowledge
---
-
-
ã¢ã¯ã·ã§ã³ïŒactionïŒãã³ãã³ãïŒcommandïŒãã·ã§ãŒãã«ããïŒshortcutïŒããªãã·ã§ã³ïŒoptionsïŒãããã³ã¢ãŒãã«ããã®ããŒã¿éä¿¡ïŒview_submissionïŒã®åãªã¯ãšã¹ãã¯ã**å¿
ã** `ack()` 颿°ã䜿ã£ãŠç¢ºèªãè¡ãå¿
èŠããããŸããããã«ãã£ãŠãªã¯ãšã¹ããåä¿¡ãããããšã Slack ã«èªèãããSlack ã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãé©åã«æŽæ°ãããŸãã
ãªã¯ãšã¹ãã®çš®é¡ã«ãã£ãŠã¯ã確èªã§éç¥æ¹æ³ãç°ãªãå ŽåããããŸããäŸãã°ãå€éšããŒã¿ãœãŒã¹ã䜿çšããéžæã¡ãã¥ãŒã®ãªãã·ã§ã³ã®ãªã¯ãšã¹ãã«å¯Ÿãã確èªã§ã¯ãé©åãª[ãªãã·ã§ã³](https://api.slack.com/reference/block-kit/composition-objects#option)ã®ãªã¹ããšãšãã« `ack()` ãåŒã³åºããŸããã¢ãŒãã«ããã®ããŒã¿éä¿¡ã«å¯Ÿãã確èªã§ã¯ã `response_action` ãæž¡ãããšã§[ã¢ãŒãã«ã®æŽæ°](/concepts/view_submissions)ãªã©ãè¡ããŸãã
@@ -14,8 +12,6 @@ slug: /concepts/acknowledge
FaaS / serverless ç°å¢ã䜿ãå Žåã `ack()` ããã¿ã€ãã³ã°ãç°ãªããŸãã ããã«é¢ãã詳现㯠[Lazy listeners (FaaS)](/concepts/lazy-listeners) ãåç
§ããŠãã ããã
-
-
æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããã
```python
# å€éšããŒã¿ã䜿çšããéžæã¡ãã¥ãŒãªãã·ã§ã³ã«å¿çãããµã³ãã«
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 51%
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 7be3340d6..799436854 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,9 +1,11 @@
---
-title: ã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
+title: ã¢ã¯ã·ã§ã³
lang: ja-jp
-slug: /concepts/action-listening
+slug: /concepts/actions
---
+## ã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
+
Bolt ã¢ããªã¯ `action` ã¡ãœãããçšããŠããã¿ã³ã®ã¯ãªãã¯ãã¡ãã¥ãŒã®éžæãã¡ãã»ãŒãžã·ã§ãŒãã«ãããªã©ã®ãŠãŒã¶ãŒã®ã¢ã¯ã·ã§ã³ããªãã¹ã³ããããšãã§ããŸãã
ã¢ã¯ã·ã§ã³ã¯ `str` åãŸã㯠`re.Pattern` åã® `action_id` ã§ãã£ã«ã¿ãªã³ã°ã§ããŸãã`action_id` ã¯ãSlack ãã©ãããã©ãŒã äžã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããåºå¥ããäžæã®èå¥åãšããŠæ©èœããŸãã
@@ -19,10 +21,7 @@ def update_message(ack):
# ã¢ã¯ã·ã§ã³ãžã®åå¿ãšããŠã¡ãã»ãŒãžãæŽæ°
```
-
-
-å¶çŽä»ããªããžã§ã¯ãã䜿çšããã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
-
+### å¶çŽä»ããªããžã§ã¯ãã䜿çšããã¢ã¯ã·ã§ã³ã®ãªã¹ãã³ã°
å¶çŽä»ãã®ãªããžã§ã¯ãã䜿çšãããšã`block_id` ãš `action_id` ãããããããŸãã¯ä»»æã«çµã¿åãããŠãªãã¹ã³ã§ããŸãããªããžã§ã¯ãå
ã®å¶çŽã¯ã`str` åãŸã㯠`re.Pattern` åã§æå®ã§ããŸãã
@@ -44,4 +43,30 @@ def update_message(ack, body, client):
)
```
-
\ No newline at end of file
+## ã¢ã¯ã·ã§ã³ãžã®å¿ç
+
+ã¢ã¯ã·ã§ã³ãžã®å¿çã«ã¯ã䞻㫠2 ã€ã®æ¹æ³ããããŸãã1 ã€ç®ã®æãäžè¬çãªããæ¹ã¯ `say()` ã䜿çšããæ¹æ³ã§ãããã®ãªã¯ãšã¹ããçºçããäŒè©±ïŒãã£ã³ãã«ã DMïŒã«ã¡ãã»ãŒãžãè¿ããŸãã
+
+2 ã€ç®ã¯ã`respond()` ã䜿çšããæ¹æ³ã§ããããã¯ãã¢ã¯ã·ã§ã³ã«é¢é£ã¥ãããã `response_url` ã䜿ã£ãã¡ãã»ãŒãžéä¿¡ãè¡ãããã®ãŠãŒãã£ãªãã£ã§ãã
+
+æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããã
+```python
+# 'approve_button' ãšãã action_id ã®ã€ã³ã¿ã©ã¯ãã£ãã³ã³ããŒãã³ããããªã¬ãŒããããšããã®ãªã¹ããŒãåŒã°ãã
+@app.action("approve_button")
+def approve_request(ack, say):
+ # ã¢ã¯ã·ã§ã³ã®ãªã¯ãšã¹ãã確èª
+ ack()
+ say("Request approved ð")
+```
+
+### respond() ã®å©çš
+
+`respond()` 㯠`response_url` ã䜿ã£ãŠéä¿¡ãããšãã«äŸ¿å©ãªã¡ãœããã§ãããããšåããããªåäœãããŸããæçš¿ããã¡ãã»ãŒãžã®ãã€ããŒãã«ã¯ãå
šãŠã®[ã¡ãã»ãŒãžãã€ããŒãã®ããããã£](https://api.slack.com/reference/messaging/payload)ãšãªãã·ã§ã³ã®ããããã£ãšã㊠`response_type`ïŒå€ã¯ `"in_channel"` ãŸã㯠`"ephemeral"`ïŒã`replace_original`ã`delete_original`ã`unfurl_links`ã`unfurl_media` ãªã©ãæå®ã§ããŸããããããããšã«ãã£ãŠã¢ããªããéä¿¡ãããã¡ãã»ãŒãžã¯ãããåãã®çºçå
ã«åæ ãããŸãã
+
+```python
+# 'user_select' ãšãã action_id ãæã€ã¢ã¯ã·ã§ã³ã®ããªã¬ãŒããªãã¹ã³
+@app.action("user_select")
+def select_user(ack, action, respond):
+ ack()
+ respond(f"You selected <@{action['selected_user']}>")
+```
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/adapters.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/adapters.md
similarity index 99%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/adapters.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/adapters.md
index 4dfd0f9a1..78c94fca4 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/adapters.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/adapters.md
@@ -12,7 +12,6 @@ slug: /concepts/adapters
ãã¹ãŠã®ã¢ããã¿ãŒã®äžèЧãšãèšå®ãäœ¿ãæ¹ã®ãµã³ãã«ã¯ããªããžããªã® `examples` ãã©ã«ããã芧ãã ããã
-
```python
from slack_bolt import App
app = App(
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/app-home.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/app-home.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/app-home.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/app-home.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/assistant.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/assistant.md
similarity index 99%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/assistant.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/assistant.md
index c09f7979e..d3b54e760 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/assistant.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/assistant.md
@@ -74,7 +74,6 @@ app.use(assistant)
ãªã¹ããŒã«æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããã
-
ãŠãŒã¶ãŒããã£ã³ãã«ã®æšªã§ã¢ã·ã¹ã¿ã³ãã¹ã¬ãããéããå Žåããã®ãã£ã³ãã«ã®æ
å ±ã¯ããã®ã¹ã¬ããã® `AssistantThreadContext` ããŒã¿ãšããŠä¿æããã `get_thread_context` ãŠãŒãã£ãªãã£ã䜿ã£ãŠã¢ã¯ã»ã¹ããããšãã§ããŸããBolt ããã®ãŠãŒãã£ãªãã£ãæäŸããŠããçç±ã¯ãåŸç¶ã®ãŠãŒã¶ãŒã¡ãã»ãŒãžæçš¿ã®ã€ãã³ããã€ããŒãã«ææ°ã®ã¹ã¬ããã®ã³ã³ããã¹ãæ
å ±ã¯å«ãŸããªãããã§ãããã®ãããã¢ããªã¯ã³ã³ããã¹ãæ
å ±ã倿Žãããã¿ã€ãã³ã°ã§ãããäœããã®æ¹æ³ã§ä¿åããåŸç¶ã®ã¡ãã»ãŒãžã€ãã³ãã®ãªã¹ããŒã³ãŒãããåç
§ã§ããããã«ããå¿
èŠããããŸãã
ãã®ãŠãŒã¶ãŒããã£ã³ãã«ãåãæ¿ããå Žåã`assistant_thread_context_changed` ã€ãã³ããããªãã®ã¢ããªã«éä¿¡ãããŸããïŒäžèšã®ã³ãŒãäŸã®ããã«ïŒçµã¿èŸŒã¿ã® `Assistant` ããã«ãŠã§ã¢ãã«ã¹ã¿ã èšå®ãªãã§å©çšããŠããå Žåããã®æŽæ°ããããã£ã³ãã«æ
å ±ã¯ãèªåçã«ãã®ã¢ã·ã¹ã¿ã³ããããããã®æåã®è¿ä¿¡ã®ã¡ãã»ãŒãžã¡ã¿ããŒã¿ãšããŠä¿åãããŸããããã¯ãçµã¿èŸŒã¿ã®ä»çµã¿ã䜿ãå Žåã¯ããã®ã³ã³ããã¹ãæ
å ±ãèªåã§çšæããããŒã¿ã¹ãã¢ã«ä¿åããå¿
èŠã¯ãªããšããããšã§ãããã®çµã¿èŸŒã¿ã®ä»çµã¿ã®å¯äžã®çæã¯ã远å ã® Slack API åŒã³åºãã«ããåŠçæéã®ãªãŒããŒãããã§ããå
·äœçã«ã¯ `get_thread_context` ãå®è¡ãããšãã«ããã®ä¿åãããã¡ãã»ãŒãžã¡ã¿ããŒã¿ã«ã¢ã¯ã»ã¹ããããã« `conversations.history` API ãåŒã³åºãããŸãã
@@ -89,11 +88,9 @@ assistant = Assistant(thread_context_store=FileAssistantThreadContextStore())
ãã®ãªãã¡ã¬ã³ã¹å®è£
ã¯ããŒã«ã«ãã¡ã€ã«ã«äŸåããŠãããæ¬çªç°å¢ã§ã®å©çšã¯æšå¥šããŸãããæ¬çªã¢ããªã§ã¯ `AssistantThreadContextStore` ãç¶æ¿ããèªåã®ã¯ã©ã¹ã䜿ãããã«ããŠãã ããã
-
+æåŸã«ãåäœããå®å
šãªãµã³ãã«ã³ãŒãäŸã確èªãããå Žåã¯ãç§ãã¡ã GitHub äžã§æäŸããŠãã[ãµã³ãã«ã¢ããªã®ãªããžããª](https://github.com/slack-samples/bolt-python-assistant-template)ããã§ãã¯ããŠã¿ãŠãã ããã
-
-ã¢ã·ã¹ã¿ã³ãã¹ã¬ããã§ã® Block Kit ã€ã³ã¿ã©ã¯ã·ã§ã³
-
+## ã¢ã·ã¹ã¿ã³ãã¹ã¬ããã§ã® Block Kit ã€ã³ã¿ã©ã¯ã·ã§ã³
ããé«åºŠãªãŠãŒã¹ã±ãŒã¹ã§ã¯ãäžã®ãããªããã³ããäŸã®ææ¡ã§ã¯ãªã Block Kit ã®ãã¿ã³ãªã©ã䜿ããããšããå ŽåããããããããŸããããããŠãåŸç¶ã®åŠçã®ããã«[æ§é åãããã¡ãã»ãŒãžã¡ã¿ããŒã¿](https://api.slack.com/metadata)ãå«ãã¡ãã»ãŒãžãéä¿¡ããããšããå Žåãããã§ãããã
@@ -229,11 +226,6 @@ def respond_to_user_messages(logger: logging.Logger, set_status: SetStatus, say:
logger.exception(f"Failed to respond to an inquiry: {e}")
say(f":warning: Sorry, something went wrong during processing your request (error: {e})")
-
# ãã®ããã«ãŠã§ã¢ã Bolt ã¢ããªã«è¿œå ããŸã
app.use(assistant)
-```
-
-
-
-æåŸã«ãåäœããå®å
šãªãµã³ãã«ã³ãŒãäŸã確èªãããå Žåã¯ãç§ãã¡ã GitHub äžã§æäŸããŠãã[ãµã³ãã«ã¢ããªã®ãªããžããª](https://github.com/slack-samples/bolt-python-assistant-template)ããã§ãã¯ããŠã¿ãŠãã ããã
\ 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/async.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/async.md
similarity index 96%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/async.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/async.md
index 7ea6c7dc9..19609be89 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/async.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/async.md
@@ -8,7 +8,6 @@ slug: /concepts/async
éåæããŒãžã§ã³ã®ãããžã§ã¯ãã®ãµã³ãã«ã¯ããªããžããªã® `examples` ãã©ã«ãã«ãããŸãã
-
```python
# aiohttp ã®ã€ã³ã¹ããŒã«ãå¿
èŠã§ã
from slack_bolt.async_app import AsyncApp
@@ -27,11 +26,7 @@ if __name__ == "__main__":
app.start(3000)
```
-
-
->ä»ã®ãã¬ãŒã ã¯ãŒã¯ã䜿çšãã
-
-
+## ä»ã®ãã¬ãŒã ã¯ãŒã¯ã䜿çšãã
`AsyncApp#start()` ã§ã¯å
éšçã« [`AIOHTTP`](https://docs.aiohttp.org/) ã®WebãµãŒããŒãå®è£
ãããŠããŸããå¿
èŠã«å¿ããŠãåä¿¡ãªã¯ãšã¹ãã®åŠçã« `AIOHTTP` 以å€ã®ãã¬ãŒã ã¯ãŒã¯ã䜿çšããããšãã§ããŸãã
@@ -46,7 +41,6 @@ pip install slack_bolt sanic uvicorn
uvicorn async_app:api --reload --port 3000 --log-level debug
```
-
```python
from slack_bolt.async_app import AsyncApp
app = AsyncApp()
@@ -74,5 +68,4 @@ async def endpoint(req: Request):
if __name__ == "__main__":
api.run(host="0.0.0.0", port=int(os.environ.get("PORT", 3000)))
-```
-
\ No newline at end of file
+```
\ 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 98%
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
index b1478ee3b..e72f27146 100644
--- 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
@@ -35,10 +35,7 @@ app = App(
)
```
-
-
-OAuth ããã©ã«ãèšå®ãã«ã¹ã¿ãã€ãº
-
+## OAuth ããã©ã«ãèšå®ãã«ã¹ã¿ãã€ãº
`oauth_settings` ã䜿ã£ãŠ OAuth ã¢ãžã¥ãŒã«ã®ããã©ã«ãèšå®ãäžæžãããããšãã§ããŸãããã®ã«ã¹ã¿ãã€ãºãããèšå®ã¯ App ã®åæåæã«æž¡ããŸãã以äžã®æ
å ±ã倿Žå¯èœã§ã:
@@ -90,6 +87,4 @@ app = App(
callback_options=callback_options,
),
)
-```
-
-
\ 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/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 100%
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
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/advanced/custom-adapters.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-adapters.md
similarity index 99%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/custom-adapters.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-adapters.md
index 7d2e63a91..b72d48ded 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/custom-adapters.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-adapters.md
@@ -22,7 +22,6 @@ slug: /concepts/custom-adapters
ã«ã¹ã¿ã ã®ã¢ããã¿ãŒã«é¢é£ãã詳ãããµã³ãã«ã«ã€ããŠã¯ã[çµã¿èŸŒã¿ã®ã¢ããã¿ãŒ](https://github.com/slackapi/bolt-python/tree/main/slack_bolt/adapter)ã®å®è£
ãåèã«ããŠãã ããã
-
```python
# Flask ã§å¿
èŠãªããã±ãŒãžãã€ã³ããŒãããŸã
from flask import Request, Response, make_response
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/concepts/custom-steps.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/custom-steps.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/custom-steps.md
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/errors.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/errors.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/errors.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/errors.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 95%
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 6d0409bb0..e54989255 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
@@ -19,17 +19,12 @@ def ask_for_introduction(event, say):
say(text=text, channel=welcome_channel_id)
```
-
-
-
-ã¡ãã»ãŒãžã®ãµãã¿ã€ãã®ãã£ã«ã¿ãªã³ã°
-
+## ã¡ãã»ãŒãžã®ãµãã¿ã€ãã®ãã£ã«ã¿ãªã³ã°
`message()` ãªã¹ããŒã¯ `event("message")` ãšçäŸ¡ã®æ©èœãæäŸããŸãã
`subtype` ãšãã远å ã®ããŒãæå®ããŠãã€ãã³ãã®ãµãã¿ã€ãã§ãã£ã«ã¿ãªã³ã°ããããšãã§ããŸãããã䜿ããããµãã¿ã€ãã«ã¯ã`bot_message` ã `message_replied` ããããŸãã詳ããã¯[ã¡ãã»ãŒãžã€ãã³ãããŒãž](https://api.slack.com/events/message#message_subtypes)ãåç
§ããŠãã ããããµãã¿ã€ããªãã®ã€ãã³ãã ãã«ãã£ã«ã¿ãŒããããã«æã« `None` ãæå®ããããšãã§ããŸãã
-
```python
# 倿Žããããã¹ãŠã®ã¡ãã»ãŒãžã«äžèŽ
@app.event({
@@ -39,5 +34,4 @@ def ask_for_introduction(event, say):
def log_message_change(logger, event):
user, text = event["user"], event["text"]
logger.info(f"The user {user} changed the message to {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/lazy-listeners.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/lazy-listeners.md
similarity index 98%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/lazy-listeners.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/lazy-listeners.md
index de5f538e8..25eb6294c 100644
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/lazy-listeners.md
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/lazy-listeners.md
@@ -14,7 +14,6 @@ Lazy ãªã¹ããŒé¢æ°ã¯ãFaaS ç°å¢ãžã® Slack ã¢ããªã®ãããã€ã
* `ack: Callable`: 3 ç§ä»¥å
ã§ã® `ack()` ã¡ãœããã®åŒã³åºããæ
åœããŸãã
* `lazy: List[Callable]` : ãªã¯ãšã¹ãã«é¢ããæéã®ãããåŠçã®ãã³ããªã³ã°ãæ
åœããŸããLazy 颿°ãã㯠`ack()` ã«ã¢ã¯ã»ã¹ããããšã¯ã§ããŸããã
-
```python
def respond_to_slack_within_3_seconds(body, ack):
text = body.get("text")
@@ -36,11 +35,7 @@ app.command("/start-process")(
)
```
-
-
-AWS Lambda ã䜿çšããäŸ
-
-
+## AWS Lambda ã䜿çšããäŸ
ãã®ãµã³ãã«ã¯ã[AWS Lambda](https://aws.amazon.com/lambda/) ã«ã³ãŒãããããã€ããŸãã[`examples` ãã©ã«ã](https://github.com/slackapi/bolt-python/tree/main/examples/aws_lambda)ã«ã¯ã»ãã«ããµã³ãã«ãçšæãããŠããŸãã
@@ -60,7 +55,6 @@ echo 'slack_bolt' > requirements.txt
lambda deploy --config-file config.yaml --requirements requirements.txt
```
-
```python
from slack_bolt import App
from slack_bolt.adapter.aws_lambda import SlackRequestHandler
@@ -107,5 +101,4 @@ def handler(event, context):
}
]
}
-```
-
\ 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/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 94%
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 a30620abd..f9ccf7d17 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
@@ -17,10 +17,7 @@ def say_hello(message, say):
say(f"Hi there, <@{user}>!")
```
-
-
-æ£èŠè¡šçŸãã¿ãŒã³ã®å©çš
-
+## æ£èŠè¡šçŸãã¿ãŒã³ã®å©çš
æååã®ä»£ããã« `re.compile()` ã¡ãœããã䜿çšããã°ããã现ãããªæ¡ä»¶æå®ãã§ããŸãã
@@ -32,5 +29,4 @@ def say_hello_regex(say, context):
# æ£èŠè¡šçŸã®ãããçµæã¯ context.matches ã«èšå®ããã
greeting = context['matches'][0]
say(f"{greeting}, how are you?")
-```
-
\ No newline at end of file
+```
\ 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 96%
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
index 8b5c9e7e5..e109a0f4d 100644
--- 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
@@ -15,10 +15,8 @@ slug: /concepts/message-sending
def ask_who(message, say):
say("_Who's there?_")
```
-
-
-ãããã¯ãçšããã¡ãã»ãŒãžã®éä¿¡
-
+
+## ãããã¯ãçšããã¡ãã»ãŒãžã®éä¿¡
`say()` ã¯ãããè€éãªã¡ãã»ãŒãžãã€ããŒããåãä»ããã®ã§ãã¡ãã»ãŒãžã«æ©èœããªãããªæ§é ãäžããããšã容æã§ãã
@@ -44,5 +42,4 @@ def show_datepicker(event, say):
blocks=blocks,
text="Pick a date for me to remind you"
)
-```
-
\ No newline at end of file
+```
\ No newline at end of file
diff --git a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/opening-modals.md b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/opening-modals.md
similarity index 100%
rename from docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/basic/opening-modals.md
rename to docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/concepts/opening-modals.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 99%
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 4838b2a75..78f7dcdb4 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
@@ -33,4 +33,4 @@ def show_options(ack, payload):
if keyword is not None and len(keyword) > 0:
options = [o for o in options if keyword in o["text"]["text"]]
ack(options=options)
-```
\ No newline at end of file
+```
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 97%
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
index 5824fbb65..e12b576ca 100644
--- 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
@@ -53,13 +53,7 @@ def open_modal(ack, shortcut, client):
)
```
-
-
-
-å¶çŽä»ããªããžã§ã¯ãã䜿çšããã·ã§ãŒãã«ããã®ãªã¹ãã³ã°
-
-
-
+## å¶çŽä»ããªããžã§ã¯ãã䜿çšããã·ã§ãŒãã«ããã®ãªã¹ãã³ã°
å¶çŽä»ããªããžã§ã¯ãã䜿ã£ãŠ `callback_id` ã `type` ã«ãããªãã¹ã³ã§ããŸãããªããžã§ã¯ãå
ã®å¶çŽã¯ `str` åãŸã㯠`re.Pattern` ãªããžã§ã¯ãã䜿çšã§ããŸãã
@@ -97,5 +91,4 @@ def open_modal(ack, shortcut, client):
]
}
)
-```
-
\ No newline at end of file
+```
\ No newline at end of file
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 98%
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
index a4c486cbd..ad4f6c8f0 100644
--- 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
@@ -36,16 +36,12 @@ if __name__ == "__main__":
handler.start()
```
-
-
-Async (asyncio) ã®å©çš
-
+## Async (asyncio) ã®å©çš
aiohttp ã®ãã㪠asyncio ãããŒã¹ãšããã¢ããã¿ãŒã䜿ãå Žåãã¢ããªã±ãŒã·ã§ã³å
šäœã asyncio ã® async/await ããã°ã©ãã³ã°ã¢ãã«ã§å®è£
ãããŠããå¿
èŠããããŸãã`AsyncApp` ãåäœãããããã«ã¯ `AsyncSocketModeHandler` ãšãã® async ãªããã«ãŠã§ã¢ããªã¹ããŒãå©çšããŸãã
`AsyncApp` ã®äœ¿ãæ¹ã«ã€ããŠã®è©³çްã¯ã[Async (asyncio) ã®å©çš](/concepts/async)ããé¢é£ãã[ãµã³ãã«ã³ãŒãäŸ](https://github.com/slackapi/bolt-python/tree/main/examples)ãåèã«ããŠãã ããã
-
```python
from slack_bolt.app.async_app import AsyncApp
# ããã©ã«ã㯠aiohttp ã䜿ã£ãå®è£
@@ -62,5 +58,4 @@ async def main():
if __name__ == "__main__":
import asyncio
asyncio.run(main())
-```
-
\ 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/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/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..4717de480
--- /dev/null
+++ b/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/legacy/steps-from-apps.md
@@ -0,0 +1,193 @@
+---
+title: ã¯ãŒã¯ãããŒã¹ãããã®æŠèŠ
+lang: ja-jp
+slug: /concepts/steps-from-apps
+---
+
+ïŒã¢ããªã«ããïŒã¯ãŒã¯ãããŒã¹ãããã§ã¯ãåŠçãã¢ããªåŽã§è¡ãã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããæäŸããããšãã§ããŸãããŠãŒã¶ãŒã¯[ã¯ãŒã¯ãããŒãã«ããŒ](https://api.slack.com/workflows)ã䜿ã£ãŠãããã®ã¹ããããã¯ãŒã¯ãããŒã«è¿œå ã§ããŸãã
+
+ã¯ãŒã¯ãããŒã¹ãããã¯ã次㮠3 ã€ã®ãŠãŒã¶ãŒã€ãã³ãã§æ§æãããŸãã
+
+- ã¯ãŒã¯ãããŒã¹ããããã¯ãŒã¯ãããŒã«è¿œå ã»å€æŽãã
+- ã¯ãŒã¯ãããŒå
ã®ã¹ãããã®èšå®å
å®¹ãæŽæ°ãã
+- ãšã³ããŠãŒã¶ãŒããã®ã¹ããããå®è¡ãã
+
+ã¯ãŒã¯ãããŒã¹ããããæ©èœãããããã«ã¯ãããã 3 ã€ã®ã€ãã³ããã¹ãŠã«å¯Ÿå¿ããå¿
èŠããããŸãã
+
+ã¢ããªã䜿ã£ãã¯ãŒã¯ãããŒã¹ãããã«é¢ãã詳现ã¯ã[API ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps)ãåç
§ããŠãã ããã
+
+## ã¹ãããã®å®çŸ©
+
+ã¯ãŒã¯ãããŒã¹ãããã®äœæã«ã¯ãBolt ãæäŸãã `WorkflowStep` ã¯ã©ã¹ãå©çšããŸãã
+
+ã¹ãããã® `callback_id` ãšèšå®ãªããžã§ã¯ããæå®ããŠã`WorkflowStep` ã®æ°ããã€ã³ã¹ã¿ã³ã¹ãäœæããŸãã
+
+èšå®ãªããžã§ã¯ãã¯ã`edit`ã`save`ã`execute` ãšãã 3 ã€ã®ããŒãæã¡ãŸããããããã®ããŒã¯ãåäžã®ã³ãŒã«ããã¯ããŸãã¯ã³ãŒã«ããã¯ã®ãªã¹ãã§ããå¿
èŠããããŸãããã¹ãŠã®ã³ãŒã«ããã¯ã¯ãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãã«é¢ããæ
å ±ãä¿æãã `step` ãªããžã§ã¯ãã«ã¢ã¯ã»ã¹ã§ããŸãã
+
+`WorkflowStep` ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããããããã`app.step()` ã¡ãœããã«æž¡ããŸããããã«ãã£ãŠãã¢ããªãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãããªãã¹ã³ããèšå®ãªããžã§ã¯ãã§æå®ãããã³ãŒã«ããã¯ã䜿ã£ãŠããã«å¿çã§ããããã«ãªããŸãã
+
+ãŸãããã³ã¬ãŒã¿ãŒãšããŠå©çšã§ãã `WorkflowStepBuilder` ã¯ã©ã¹ã䜿ã£ãŠã¯ãŒã¯ãããŒã¹ããããå®çŸ©ããããšãã§ããŸãã 詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder)ã®ã³ãŒãäŸãªã©ãåèã«ããŠãã ããã
+
+æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
+
+```python
+import os
+from slack_bolt import App
+from slack_bolt.workflows.step import WorkflowStep
+
+# ãã€ãéãBolt ã¢ããªãèµ·åãã
+app = App(
+ token=os.environ.get("SLACK_BOT_TOKEN"),
+ signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
+)
+
+def edit(ack, step, configure):
+ pass
+
+def save(ack, view, update):
+ pass
+
+def execute(step, complete, fail):
+ pass
+
+# WorkflowStep ã®æ°ããã€ã³ã¹ã¿ã³ã¹ãäœæãã
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+# ã¯ãŒã¯ãããŒã¹ããããæž¡ããŠãªã¹ããŒãèšå®ãã
+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` ã³ãŒã«ããã¯å
ã§ `configure()` ãŠãŒãã£ãªãã£ã䜿çšãããšã察å¿ãã `blocks` åŒæ°ã«ãã¥ãŒã®blocks éšåã ããæž¡ããŠãã¹ãããã®èšå®ã¢ãŒãã«ãç°¡åã«è¡šç€ºãããããšãã§ããŸããå¿
èŠãªå
¥åå
容ãæããŸã§èšå®ã®ä¿åãç¡å¹ã«ããã«ã¯ã`True` ã®å€ãã»ãããã `submit_disabled` ãæž¡ããŸãã
+
+èšå®ã¢ãŒãã«ã®éãæ¹ã«é¢ãã詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps#handle_config_view)ãåç
§ããŠãã ããã
+
+æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
+
+```python
+def edit(ack, step, configure):
+ ack()
+
+ 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"},
+ },
+ ]
+ configure(blocks=blocks)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
+
+## ã¹ãããã®èšå®ã®ä¿å
+
+èšå®ã¢ãŒãã«ãéããåŸãã¢ããªã¯ `view_submission` ã€ãã³ãããªãã¹ã³ããŸãããã®ã€ãã³ããã¢ããªã«å±ããšã`WorkflowStep` ã§èšå®ãã `save` ã³ãŒã«ããã¯ãå®è¡ãããŸãã
+
+`save` ã³ãŒã«ããã¯å
ã§ã¯ã`update()` ã¡ãœããã䜿ã£ãŠãã¯ãŒã¯ãããŒã«è¿œå ãããã¹ãããã®èšå®ãä¿åããããšãã§ããŸãããã®ã¡ãœããã«ã¯æ¬¡ã®åŒæ°ãæå®ããŸãã
+
+- `inputs` : ãŠãŒã¶ãŒãã¯ãŒã¯ãããŒã¹ããããå®è¡ãããšãã«ã¢ããªãåãåãäºå®ã®ããŒã¿ã衚ãèŸæžåã®å€ã§ãã
+- `outputs` : ã¯ãŒã¯ãããŒã¹ãããã®å®äºæã«ã¢ããªãåºåããããŒã¿ãèšå®ããããªããžã§ã¯ãã®ãªã¹ãã§ãããã® outputs ã¯ãã¯ãŒã¯ãããŒã®åŸç¶ã®ã¹ãããã§å©çšããããšãã§ããŸãã
+- `step_name` : ã¹ãããã®ããã©ã«ãã®ååããªãŒããŒã©ã€ãããŸãã
+- `step_image_url` : ã¹ãããã®ããã©ã«ãã®ç»åããªãŒããŒã©ã€ãããŸãã
+
+ãããã®ãã©ã¡ãŒã¿ã®æ§ææ¹æ³ã«é¢ãã詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://api.slack.com/reference/workflows/workflow_step)ãåç
§ããŠãã ããã
+
+æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
+
+```python
+def save(ack, view, update):
+ ack()
+
+ values = view["state"]["values"]
+ task_name = values["task_name_input"]["name"]
+ task_description = values["task_description_input"]["description"]
+
+ inputs = {
+ "task_name": {"value": task_name["value"]},
+ "task_description": {"value": task_description["value"]}
+ }
+ outputs = [
+ {
+ "type": "text",
+ "name": "task_name",
+ "label":"Task name",
+ },
+ {
+ "type": "text",
+ "name": "task_description",
+ "label":"Task description",
+ }
+ ]
+ update(inputs=inputs, outputs=outputs)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
+
+## ã¹ãããã®å®è¡
+
+ãšã³ããŠãŒã¶ãŒãã¯ãŒã¯ãããŒã¹ããããå®è¡ãããšãã¢ããªã« [`workflow_step_execute` ã€ãã³ããéä¿¡ãããŸã](https://api.slack.com/events/workflow_step_execute)ããã®ã€ãã³ããã¢ããªã«å±ããšã`WorkflowStep` ã§èšå®ãã `execute` ã³ãŒã«ããã¯ãå®è¡ãããŸãã
+
+`save` ã³ãŒã«ããã¯ã§åãåºãã `inputs` ã䜿ã£ãŠããµãŒãããŒãã£ã® API ãåŒã³åºããæ
å ±ãããŒã¿ããŒã¹ã«ä¿åããããŠãŒã¶ãŒã®ããŒã ã¿ããæŽæ°ãããšãã£ãåŠçãå®è¡ããããšãã§ããŸãããŸããã¯ãŒã¯ãããŒã®åŸç¶ã®ã¹ãããã§å©çšããåºåå€ã `outputs` ãªããžã§ã¯ãã«èšå®ããŸãã
+
+`execute` ã³ãŒã«ããã¯å
ã§ã¯ã`complete()` ãåŒã³åºããŠã¹ãããã®å®è¡ãæåããããšã瀺ããã`fail()` ãåŒã³åºããŠã¹ãããã®å®è¡ã倱æããããšã瀺ãå¿
èŠããããŸãã
+
+æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçšïŒ
+```python
+def execute(step, complete, fail):
+ inputs = step["inputs"]
+ # ãã¹ãŠã®åŠçãæåããå Žå
+ outputs = {
+ "task_name": inputs["task_name"]["value"],
+ "task_description": inputs["task_description"]["value"],
+ }
+ complete(outputs=outputs)
+
+ # 倱æããåŠçãããå Žå
+ error = {"message":"Just testing step failure!"}
+ fail(error=error)
+
+ws = WorkflowStep(
+ callback_id="add_task",
+ edit=edit,
+ save=save,
+ execute=execute,
+)
+app.step(ws)
+```
\ No newline at end of file
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 24b85bfa7..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/adding-editing-steps.md
+++ /dev/null
@@ -1,52 +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` ã³ãŒã«ããã¯å
ã§ `configure()` ãŠãŒãã£ãªãã£ã䜿çšãããšã察å¿ãã `blocks` åŒæ°ã«ãã¥ãŒã®blocks éšåã ããæž¡ããŠãã¹ãããã®èšå®ã¢ãŒãã«ãç°¡åã«è¡šç€ºãããããšãã§ããŸããå¿
èŠãªå
¥åå
容ãæããŸã§èšå®ã®ä¿åãç¡å¹ã«ããã«ã¯ã`True` ã®å€ãã»ãããã `submit_disabled` ãæž¡ããŸãã
-
-èšå®ã¢ãŒãã«ã®éãæ¹ã«é¢ãã詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps#handle_config_view)ãåç
§ããŠãã ããã
-
-æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
-
-```python
-def edit(ack, step, configure):
- ack()
-
- 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"},
- },
- ]
- configure(blocks=blocks)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
\ 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 889543767..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/creating-steps.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-title: ã¹ãããã®å®çŸ©
-lang: ja-jp
-slug: /concepts/creating-steps
----
-
-ã¯ãŒã¯ãããŒã¹ãããã®äœæã«ã¯ãBolt ãæäŸãã `WorkflowStep` ã¯ã©ã¹ãå©çšããŸãã
-
-ã¹ãããã® `callback_id` ãšèšå®ãªããžã§ã¯ããæå®ããŠã`WorkflowStep` ã®æ°ããã€ã³ã¹ã¿ã³ã¹ãäœæããŸãã
-
-èšå®ãªããžã§ã¯ãã¯ã`edit`ã`save`ã`execute` ãšãã 3 ã€ã®ããŒãæã¡ãŸããããããã®ããŒã¯ãåäžã®ã³ãŒã«ããã¯ããŸãã¯ã³ãŒã«ããã¯ã®ãªã¹ãã§ããå¿
èŠããããŸãããã¹ãŠã®ã³ãŒã«ããã¯ã¯ãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãã«é¢ããæ
å ±ãä¿æãã `step` ãªããžã§ã¯ãã«ã¢ã¯ã»ã¹ã§ããŸãã
-
-`WorkflowStep` ã®ã€ã³ã¹ã¿ã³ã¹ãäœæããããããã`app.step()` ã¡ãœããã«æž¡ããŸããããã«ãã£ãŠãã¢ããªãã¯ãŒã¯ãããŒã¹ãããã®ã€ãã³ãããªãã¹ã³ããèšå®ãªããžã§ã¯ãã§æå®ãããã³ãŒã«ããã¯ã䜿ã£ãŠããã«å¿çã§ããããã«ãªããŸãã
-
-ãŸãããã³ã¬ãŒã¿ãŒãšããŠå©çšã§ãã `WorkflowStepBuilder` ã¯ã©ã¹ã䜿ã£ãŠã¯ãŒã¯ãããŒã¹ããããå®çŸ©ããããšãã§ããŸãã 詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://tools.slack.dev/bolt-python/api-docs/slack_bolt/workflows/step/step.html#slack_bolt.workflows.step.step.WorkflowStepBuilder)ã®ã³ãŒãäŸãªã©ãåèã«ããŠãã ããã
-
-æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
-
-```python
-import os
-from slack_bolt import App
-from slack_bolt.workflows.step import WorkflowStep
-
-# ãã€ãéãBolt ã¢ããªãèµ·åãã
-app = App(
- token=os.environ.get("SLACK_BOT_TOKEN"),
- signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
-)
-
-def edit(ack, step, configure):
- pass
-
-def save(ack, view, update):
- pass
-
-def execute(step, complete, fail):
- pass
-
-# WorkflowStep ã®æ°ããã€ã³ã¹ã¿ã³ã¹ãäœæãã
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-# ã¯ãŒã¯ãããŒã¹ããããæž¡ããŠãªã¹ããŒãèšå®ãã
-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 e10c7eec3..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/executing-steps.md
+++ /dev/null
@@ -1,35 +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` ã³ãŒã«ããã¯å
ã§ã¯ã`complete()` ãåŒã³åºããŠã¹ãããã®å®è¡ãæåããããšã瀺ããã`fail()` ãåŒã³åºããŠã¹ãããã®å®è¡ã倱æããããšã瀺ãå¿
èŠããããŸãã
-
-æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçšïŒ
-```python
-def execute(step, complete, fail):
- inputs = step["inputs"]
- # ãã¹ãŠã®åŠçãæåããå Žå
- outputs = {
- "task_name": inputs["task_name"]["value"],
- "task_description": inputs["task_description"]["value"],
- }
- complete(outputs=outputs)
-
- # 倱æããåŠçãããå Žå
- error = {"message":"Just testing step failure!"}
- fail(error=error)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
\ 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 94ad32934..000000000
--- a/docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/steps/saving-steps.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-title: ã¹ãããã®èšå®ã®ä¿å
-lang: ja-jp
-slug: /concepts/saving-steps
----
-
-èšå®ã¢ãŒãã«ãéããåŸãã¢ããªã¯ `view_submission` ã€ãã³ãããªãã¹ã³ããŸãããã®ã€ãã³ããã¢ããªã«å±ããšã`WorkflowStep` ã§èšå®ãã `save` ã³ãŒã«ããã¯ãå®è¡ãããŸãã
-
-`save` ã³ãŒã«ããã¯å
ã§ã¯ã`update()` ã¡ãœããã䜿ã£ãŠãã¯ãŒã¯ãããŒã«è¿œå ãããã¹ãããã®èšå®ãä¿åããããšãã§ããŸãããã®ã¡ãœããã«ã¯æ¬¡ã®åŒæ°ãæå®ããŸãã
-
-- `inputs` : ãŠãŒã¶ãŒãã¯ãŒã¯ãããŒã¹ããããå®è¡ãããšãã«ã¢ããªãåãåãäºå®ã®ããŒã¿ã衚ãèŸæžåã®å€ã§ãã
-- `outputs` : ã¯ãŒã¯ãããŒã¹ãããã®å®äºæã«ã¢ããªãåºåããããŒã¿ãèšå®ããããªããžã§ã¯ãã®ãªã¹ãã§ãããã® outputs ã¯ãã¯ãŒã¯ãããŒã®åŸç¶ã®ã¹ãããã§å©çšããããšãã§ããŸãã
-- `step_name` : ã¹ãããã®ããã©ã«ãã®ååããªãŒããŒã©ã€ãããŸãã
-- `step_image_url` : ã¹ãããã®ããã©ã«ãã®ç»åããªãŒããŒã©ã€ãããŸãã
-
-ãããã®ãã©ã¡ãŒã¿ã®æ§ææ¹æ³ã«é¢ãã詳现ã¯ã[ãã¡ãã®ããã¥ã¡ã³ã](https://api.slack.com/reference/workflows/workflow_step)ãåç
§ããŠãã ããã
-
-æå®å¯èœãªåŒæ°ã®äžèЧã¯ã¢ãžã¥ãŒã«ããã¥ã¡ã³ããåèã«ããŠãã ããïŒå
±é / ã¹ãããçš
-
-```python
-def save(ack, view, update):
- ack()
-
- values = view["state"]["values"]
- task_name = values["task_name_input"]["name"]
- task_description = values["task_description_input"]["description"]
-
- inputs = {
- "task_name": {"value": task_name["value"]},
- "task_description": {"value": task_description["value"]}
- }
- outputs = [
- {
- "type": "text",
- "name": "task_name",
- "label":"Task name",
- },
- {
- "type": "text",
- "name": "task_description",
- "label":"Task description",
- }
- ]
- update(inputs=inputs, outputs=outputs)
-
-ws = WorkflowStep(
- callback_id="add_task",
- edit=edit,
- save=save,
- execute=execute,
-)
-app.step(ws)
-```
\ 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 881d791b2..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
----
-
-ïŒã¢ããªã«ããïŒã¯ãŒã¯ãããŒã¹ãããã§ã¯ãåŠçãã¢ããªåŽã§è¡ãã«ã¹ã¿ã ã®ã¯ãŒã¯ãããŒã¹ããããæäŸããããšãã§ããŸãããŠãŒã¶ãŒã¯[ã¯ãŒã¯ãããŒãã«ããŒ](https://api.slack.com/workflows)ã䜿ã£ãŠãããã®ã¹ããããã¯ãŒã¯ãããŒã«è¿œå ã§ããŸãã
-
-ã¯ãŒã¯ãããŒã¹ãããã¯ã次㮠3 ã€ã®ãŠãŒã¶ãŒã€ãã³ãã§æ§æãããŸãã
-
-- ã¯ãŒã¯ãããŒã¹ããããã¯ãŒã¯ãããŒã«è¿œå ã»å€æŽãã
-- ã¯ãŒã¯ãããŒå
ã®ã¹ãããã®èšå®å
å®¹ãæŽæ°ãã
-- ãšã³ããŠãŒã¶ãŒããã®ã¹ããããå®è¡ãã
-
-ã¯ãŒã¯ãããŒã¹ããããæ©èœãããããã«ã¯ãããã 3 ã€ã®ã€ãã³ããã¹ãŠã«å¯Ÿå¿ããå¿
èŠããããŸãã
-
-ã¢ããªã䜿ã£ãã¯ãŒã¯ãããŒã¹ãããã«é¢ãã詳现ã¯ã[API ããã¥ã¡ã³ã](https://api.slack.com/workflows/steps)ãåç
§ããŠãã ããã
\ No newline at end of file
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 1a294e33b..7b1db75c2 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -1,82 +1,90 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
sidebarBoltPy: [
- {
- type: "doc",
- id: "index",
- label: "Bolt for Python",
- className: "sidebar-title",
- },
- { type: "html", value: "
" },
{
type: "category",
label: "Guides",
- collapsed: false,
items: [
+ {
+ type: "doc",
+ id: "index",
+ label: "Bolt for Python",
+ className: "sidebar-title",
+ },
"getting-started",
{
type: "category",
- label: "Basic concepts",
+ label: "Slack API calls",
+ items: ["concepts/message-sending", "concepts/web-api"],
+ },
+ {
+ type: "category",
+ label: "Events API",
+ items: ["concepts/message-listening", "concepts/event-listening"],
+ },
+ {
+ type: "category",
+ label: "App UI & Interactivity",
+ items: [
+ "concepts/acknowledge",
+ "concepts/shortcuts",
+ "concepts/commands",
+ "concepts/actions",
+ "concepts/opening-modals",
+ "concepts/updating-pushing-views",
+ "concepts/view-submissions",
+ "concepts/select-menu-options",
+ "concepts/app-home",
+ ],
+ },
+ "concepts/assistant",
+ "concepts/custom-steps",
+ {
+ type: "category",
+ label: "App Configuration",
items: [
- "basic/assistant",
- "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/opening-modals",
- "basic/updating-pushing-views",
- "basic/view_submissions",
- "basic/app-home",
- "basic/options",
- "basic/custom-steps",
- "basic/authenticating-oauth",
- "basic/socket-mode",
+ "concepts/socket-mode",
+ "concepts/errors",
+ "concepts/logging",
+ "concepts/async",
],
},
{
type: "category",
- label: "Advanced concepts",
+ label: "Middleware & Context",
items: [
- "advanced/adapters",
- "advanced/custom-adapters",
- "advanced/async",
- "advanced/errors",
- "advanced/logging",
- "advanced/authorization",
- "advanced/token-rotation",
- "advanced/listener-middleware",
- "advanced/global-middleware",
- "advanced/context",
- "advanced/lazy-listeners",
+ "concepts/global-middleware",
+ "concepts/listener-middleware",
+ "concepts/context",
],
},
+ "concepts/lazy-listeners",
+ {
+ type: "category",
+ label: "Adaptors",
+ items: ["concepts/adapters", "concepts/custom-adapters"],
+ },
{
type: "category",
- label: "Steps from apps (Deprecated)",
+ label: "Authorization & Security",
items: [
- "steps/steps",
- "steps/executing-steps",
- "steps/creating-steps",
- "steps/adding-editing-steps",
- "steps/saving-steps",
+ "concepts/authenticating-oauth",
+ "concepts/authorization",
+ "concepts/token-rotation",
],
},
+ {
+ type: "category",
+ label: "Legacy",
+ items: ["concepts/steps-from-apps"],
+ },
],
},
{ type: "html", value: "
" },
{
type: "category",
label: "Tutorials",
- items: [
- "tutorial/getting-started-http",
- "tutorial/ai-chatbot",
- "tutorial/custom-steps-for-jira",
- ],
+ items: ["tutorial/ai-chatbot", "tutorial/getting-started-http"],
},
{ type: "html", value: "
" },
{