Skip to content

Commit

Permalink
version 1.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Nov 21, 2023
1 parent 66812b3 commit eec2617
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 32 deletions.
19 changes: 12 additions & 7 deletions docs/api-docs/slack_bolt/app/async_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ <h1 class="title">Module <code>slack_bolt.app.async_app</code></h1>
)
return self._server

def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.

from slack_bolt.async_app import AsyncApp
Expand All @@ -516,8 +516,9 @@ <h1 class="title">Module <code>slack_bolt.app.async_app</code></h1>

Args:
path: The path to receive incoming requests from Slack
port: The port to listen on (Default: 3000)
&#34;&#34;&#34;
return self.server(path=path).web_app
return self.server(path=path, port=port).web_app

def start(self, port: int = 3000, path: str = &#34;/slack/events&#34;, host: Optional[str] = None) -&gt; None:
&#34;&#34;&#34;Start a web server using AIOHTTP.
Expand Down Expand Up @@ -1856,7 +1857,7 @@ <h2 id="args">Args</h2>
)
return self._server

def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.

from slack_bolt.async_app import AsyncApp
Expand All @@ -1874,8 +1875,9 @@ <h2 id="args">Args</h2>

Args:
path: The path to receive incoming requests from Slack
port: The port to listen on (Default: 3000)
&#34;&#34;&#34;
return self.server(path=path).web_app
return self.server(path=path, port=port).web_app

def start(self, port: int = 3000, path: str = &#34;/slack/events&#34;, host: Optional[str] = None) -&gt; None:
&#34;&#34;&#34;Start a web server using AIOHTTP.
Expand Down Expand Up @@ -4171,7 +4173,7 @@ <h2 id="args">Args</h2>
</details>
</dd>
<dt id="slack_bolt.app.async_app.AsyncApp.web_app"><code class="name flex">
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events') ‑> aiohttp.web_app.Application</span>
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events', port: int = 3000) ‑> aiohttp.web_app.Application</span>
</code></dt>
<dd>
<div class="desc"><p>Returns a <code>web.Application</code> instance for aiohttp-devtools users.</p>
Expand All @@ -4192,12 +4194,14 @@ <h2 id="args">Args</h2>
<dl>
<dt><strong><code>path</code></strong></dt>
<dd>The path to receive incoming requests from Slack</dd>
<dt><strong><code>port</code></strong></dt>
<dd>The port to listen on (Default: 3000)</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.

from slack_bolt.async_app import AsyncApp
Expand All @@ -4215,8 +4219,9 @@ <h2 id="args">Args</h2>

Args:
path: The path to receive incoming requests from Slack
port: The port to listen on (Default: 3000)
&#34;&#34;&#34;
return self.server(path=path).web_app</code></pre>
return self.server(path=path, port=port).web_app</code></pre>
</details>
</dd>
</dl>
Expand Down
20 changes: 13 additions & 7 deletions docs/api-docs/slack_bolt/async_app.html
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ <h2 id="args">Args</h2>
)
return self._server

def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.

from slack_bolt.async_app import AsyncApp
Expand All @@ -671,8 +671,9 @@ <h2 id="args">Args</h2>

Args:
path: The path to receive incoming requests from Slack
port: The port to listen on (Default: 3000)
&#34;&#34;&#34;
return self.server(path=path).web_app
return self.server(path=path, port=port).web_app

def start(self, port: int = 3000, path: str = &#34;/slack/events&#34;, host: Optional[str] = None) -&gt; None:
&#34;&#34;&#34;Start a web server using AIOHTTP.
Expand Down Expand Up @@ -2968,7 +2969,7 @@ <h2 id="args">Args</h2>
</details>
</dd>
<dt id="slack_bolt.async_app.AsyncApp.web_app"><code class="name flex">
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events') ‑> aiohttp.web_app.Application</span>
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events', port: int = 3000) ‑> aiohttp.web_app.Application</span>
</code></dt>
<dd>
<div class="desc"><p>Returns a <code>web.Application</code> instance for aiohttp-devtools users.</p>
Expand All @@ -2989,12 +2990,14 @@ <h2 id="args">Args</h2>
<dl>
<dt><strong><code>path</code></strong></dt>
<dd>The path to receive incoming requests from Slack</dd>
<dt><strong><code>port</code></strong></dt>
<dd>The port to listen on (Default: 3000)</dd>
</dl></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.

from slack_bolt.async_app import AsyncApp
Expand All @@ -3012,8 +3015,9 @@ <h2 id="args">Args</h2>

Args:
path: The path to receive incoming requests from Slack
port: The port to listen on (Default: 3000)
&#34;&#34;&#34;
return self.server(path=path).web_app</code></pre>
return self.server(path=path, port=port).web_app</code></pre>
</details>
</dd>
</dl>
Expand Down Expand Up @@ -3387,7 +3391,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="slack_bolt.async_app.AsyncBoltRequest"><code class="flex name class">
<span>class <span class="ident">AsyncBoltRequest</span></span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, str]] = None, mode: str = 'http')</span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, Any]] = None, mode: str = 'http')</span>
</code></dt>
<dd>
<div class="desc"><p>Request to a Bolt app.</p>
Expand Down Expand Up @@ -3425,7 +3429,7 @@ <h2 id="args">Args</h2>
body: Union[str, dict],
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
context: Optional[Dict[str, str]] = None,
context: Optional[Dict[str, Any]] = None,
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
):
&#34;&#34;&#34;Request to a Bolt app.
Expand Down Expand Up @@ -3844,6 +3848,7 @@ <h2 id="returns">Returns</h2>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -3863,6 +3868,7 @@ <h2 id="returns">Returns</h2>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
6 changes: 5 additions & 1 deletion docs/api-docs/slack_bolt/context/respond/async_respond.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from typing import Optional, Union, Sequence
<pre><code class="python">from typing import Optional, Union, Sequence, Dict, Any
from ssl import SSLContext

from slack_sdk.models.attachments import Attachment
Expand Down Expand Up @@ -63,6 +63,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -82,6 +83,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down Expand Up @@ -140,6 +142,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = AsyncWebhookClient(
Expand All @@ -159,6 +162,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return await client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
2 changes: 2 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -115,6 +116,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
3 changes: 3 additions & 0 deletions docs/api-docs/slack_bolt/context/respond/internals.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; Dict[str, Any]:
message = {&#34;text&#34;: text}
if blocks is not None and len(blocks) &gt; 0:
Expand All @@ -62,6 +63,8 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
message[&#34;unfurl_media&#34;] = unfurl_media
if thread_ts is not None:
message[&#34;thread_ts&#34;] = thread_ts
if metadata is not None:
message[&#34;metadata&#34;] = metadata
return message</code></pre>
</details>
</section>
Expand Down
6 changes: 5 additions & 1 deletion docs/api-docs/slack_bolt/context/respond/respond.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from typing import Optional, Union, Sequence
<pre><code class="python">from typing import Optional, Union, Sequence, Any, Dict
from ssl import SSLContext

from slack_sdk.models.attachments import Attachment
Expand Down Expand Up @@ -63,6 +63,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -83,6 +84,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down Expand Up @@ -140,6 +142,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -160,6 +163,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
6 changes: 4 additions & 2 deletions docs/api-docs/slack_bolt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3543,7 +3543,7 @@ <h3>Inherited members</h3>
</dd>
<dt id="slack_bolt.BoltRequest"><code class="flex name class">
<span>class <span class="ident">BoltRequest</span></span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, str]] = None, mode: str = 'http')</span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, Any]] = None, mode: str = 'http')</span>
</code></dt>
<dd>
<div class="desc"><p>Request to a Bolt app.</p>
Expand Down Expand Up @@ -3581,7 +3581,7 @@ <h2 id="args">Args</h2>
body: Union[str, dict],
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
context: Optional[Dict[str, str]] = None,
context: Optional[Dict[str, Any]] = None,
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
):
&#34;&#34;&#34;Request to a Bolt app.
Expand Down Expand Up @@ -4132,6 +4132,7 @@ <h2 id="returns">Returns</h2>
unfurl_links: Optional[bool] = None,
unfurl_media: Optional[bool] = None,
thread_ts: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -&gt; WebhookResponse:
if self.response_url is not None:
client = WebhookClient(
Expand All @@ -4152,6 +4153,7 @@ <h2 id="returns">Returns</h2>
unfurl_links=unfurl_links,
unfurl_media=unfurl_media,
thread_ts=thread_ts,
metadata=metadata,
)
return client.send_dict(message)
elif isinstance(text_or_whole_response, dict):
Expand Down
9 changes: 6 additions & 3 deletions docs/api-docs/slack_bolt/listener_matcher/builtins.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.builtins</code></h1>
return workflow_step_edit(constraints[&#34;callback_id&#34;], asyncio)

raise BoltError(f&#34;type: {action_type} is unsupported&#34;)
elif &#34;action_id&#34; in constraints:
elif &#34;action_id&#34; in constraints or &#34;block_id&#34; in constraints:
# The default value is &#34;block_actions&#34;
return block_action(constraints, asyncio)

Expand All @@ -341,8 +341,11 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.builtins</code></h1>
elif isinstance(constraints, dict):
# block_id matching is optional
block_id: Optional[Union[str, Pattern]] = constraints.get(&#34;block_id&#34;)
action_id: Optional[Union[str, Pattern]] = constraints.get(&#34;action_id&#34;)
if block_id is None and action_id is None:
return False
block_id_matched = block_id is None or _matches(block_id, action.get(&#34;block_id&#34;))
action_id_matched = _matches(constraints[&#34;action_id&#34;], action[&#34;action_id&#34;])
action_id_matched = action_id is None or _matches(action_id, action.get(&#34;action_id&#34;))
return block_id_matched and action_id_matched


Expand Down Expand Up @@ -608,7 +611,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
return workflow_step_edit(constraints[&#34;callback_id&#34;], asyncio)

raise BoltError(f&#34;type: {action_type} is unsupported&#34;)
elif &#34;action_id&#34; in constraints:
elif &#34;action_id&#34; in constraints or &#34;block_id&#34; in constraints:
# The default value is &#34;block_actions&#34;
return block_action(constraints, asyncio)

Expand Down
6 changes: 3 additions & 3 deletions docs/api-docs/slack_bolt/request/async_request.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1 class="title">Module <code>slack_bolt.request.async_request</code></h1>
body: Union[str, dict],
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
context: Optional[Dict[str, str]] = None,
context: Optional[Dict[str, Any]] = None,
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
):
&#34;&#34;&#34;Request to a Bolt app.
Expand Down Expand Up @@ -122,7 +122,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="slack_bolt.request.async_request.AsyncBoltRequest"><code class="flex name class">
<span>class <span class="ident">AsyncBoltRequest</span></span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, str]] = None, mode: str = 'http')</span>
<span>(</span><span>*, body: Union[str, dict], query: Union[str, Dict[str, str], Dict[str, Sequence[str]], ForwardRef(None)] = None, headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None, context: Optional[Dict[str, Any]] = None, mode: str = 'http')</span>
</code></dt>
<dd>
<div class="desc"><p>Request to a Bolt app.</p>
Expand Down Expand Up @@ -160,7 +160,7 @@ <h2 id="args">Args</h2>
body: Union[str, dict],
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
context: Optional[Dict[str, str]] = None,
context: Optional[Dict[str, Any]] = None,
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
):
&#34;&#34;&#34;Request to a Bolt app.
Expand Down
Loading

0 comments on commit eec2617

Please sign in to comment.