Skip to content

Commit eec2617

Browse files
committed
version 1.18.1
1 parent 66812b3 commit eec2617

File tree

14 files changed

+62
-32
lines changed

14 files changed

+62
-32
lines changed

docs/api-docs/slack_bolt/app/async_app.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ <h1 class="title">Module <code>slack_bolt.app.async_app</code></h1>
498498
)
499499
return self._server
500500

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

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

517517
Args:
518518
path: The path to receive incoming requests from Slack
519+
port: The port to listen on (Default: 3000)
519520
&#34;&#34;&#34;
520-
return self.server(path=path).web_app
521+
return self.server(path=path, port=port).web_app
521522

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

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

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

18751876
Args:
18761877
path: The path to receive incoming requests from Slack
1878+
port: The port to listen on (Default: 3000)
18771879
&#34;&#34;&#34;
1878-
return self.server(path=path).web_app
1880+
return self.server(path=path, port=port).web_app
18791881

18801882
def start(self, port: int = 3000, path: str = &#34;/slack/events&#34;, host: Optional[str] = None) -&gt; None:
18811883
&#34;&#34;&#34;Start a web server using AIOHTTP.
@@ -4171,7 +4173,7 @@ <h2 id="args">Args</h2>
41714173
</details>
41724174
</dd>
41734175
<dt id="slack_bolt.app.async_app.AsyncApp.web_app"><code class="name flex">
4174-
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events') ‑> aiohttp.web_app.Application</span>
4176+
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events', port: int = 3000) ‑> aiohttp.web_app.Application</span>
41754177
</code></dt>
41764178
<dd>
41774179
<div class="desc"><p>Returns a <code>web.Application</code> instance for aiohttp-devtools users.</p>
@@ -4192,12 +4194,14 @@ <h2 id="args">Args</h2>
41924194
<dl>
41934195
<dt><strong><code>path</code></strong></dt>
41944196
<dd>The path to receive incoming requests from Slack</dd>
4197+
<dt><strong><code>port</code></strong></dt>
4198+
<dd>The port to listen on (Default: 3000)</dd>
41954199
</dl></div>
41964200
<details class="source">
41974201
<summary>
41984202
<span>Expand source code</span>
41994203
</summary>
4200-
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
4204+
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
42014205
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.
42024206

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

42164220
Args:
42174221
path: The path to receive incoming requests from Slack
4222+
port: The port to listen on (Default: 3000)
42184223
&#34;&#34;&#34;
4219-
return self.server(path=path).web_app</code></pre>
4224+
return self.server(path=path, port=port).web_app</code></pre>
42204225
</details>
42214226
</dd>
42224227
</dl>

docs/api-docs/slack_bolt/async_app.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ <h2 id="args">Args</h2>
653653
)
654654
return self._server
655655

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

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

672672
Args:
673673
path: The path to receive incoming requests from Slack
674+
port: The port to listen on (Default: 3000)
674675
&#34;&#34;&#34;
675-
return self.server(path=path).web_app
676+
return self.server(path=path, port=port).web_app
676677

677678
def start(self, port: int = 3000, path: str = &#34;/slack/events&#34;, host: Optional[str] = None) -&gt; None:
678679
&#34;&#34;&#34;Start a web server using AIOHTTP.
@@ -2968,7 +2969,7 @@ <h2 id="args">Args</h2>
29682969
</details>
29692970
</dd>
29702971
<dt id="slack_bolt.async_app.AsyncApp.web_app"><code class="name flex">
2971-
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events') ‑> aiohttp.web_app.Application</span>
2972+
<span>def <span class="ident">web_app</span></span>(<span>self, path: str = '/slack/events', port: int = 3000) ‑> aiohttp.web_app.Application</span>
29722973
</code></dt>
29732974
<dd>
29742975
<div class="desc"><p>Returns a <code>web.Application</code> instance for aiohttp-devtools users.</p>
@@ -2989,12 +2990,14 @@ <h2 id="args">Args</h2>
29892990
<dl>
29902991
<dt><strong><code>path</code></strong></dt>
29912992
<dd>The path to receive incoming requests from Slack</dd>
2993+
<dt><strong><code>port</code></strong></dt>
2994+
<dd>The port to listen on (Default: 3000)</dd>
29922995
</dl></div>
29932996
<details class="source">
29942997
<summary>
29952998
<span>Expand source code</span>
29962999
</summary>
2997-
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;) -&gt; web.Application:
3000+
<pre><code class="python">def web_app(self, path: str = &#34;/slack/events&#34;, port: int = 3000) -&gt; web.Application:
29983001
&#34;&#34;&#34;Returns a `web.Application` instance for aiohttp-devtools users.
29993002

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

30133016
Args:
30143017
path: The path to receive incoming requests from Slack
3018+
port: The port to listen on (Default: 3000)
30153019
&#34;&#34;&#34;
3016-
return self.server(path=path).web_app</code></pre>
3020+
return self.server(path=path, port=port).web_app</code></pre>
30173021
</details>
30183022
</dd>
30193023
</dl>
@@ -3387,7 +3391,7 @@ <h3>Inherited members</h3>
33873391
</dd>
33883392
<dt id="slack_bolt.async_app.AsyncBoltRequest"><code class="flex name class">
33893393
<span>class <span class="ident">AsyncBoltRequest</span></span>
3390-
<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>
3394+
<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>
33913395
</code></dt>
33923396
<dd>
33933397
<div class="desc"><p>Request to a Bolt app.</p>
@@ -3425,7 +3429,7 @@ <h2 id="args">Args</h2>
34253429
body: Union[str, dict],
34263430
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
34273431
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
3428-
context: Optional[Dict[str, str]] = None,
3432+
context: Optional[Dict[str, Any]] = None,
34293433
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
34303434
):
34313435
&#34;&#34;&#34;Request to a Bolt app.
@@ -3844,6 +3848,7 @@ <h2 id="returns">Returns</h2>
38443848
unfurl_links: Optional[bool] = None,
38453849
unfurl_media: Optional[bool] = None,
38463850
thread_ts: Optional[str] = None,
3851+
metadata: Optional[Dict[str, Any]] = None,
38473852
) -&gt; WebhookResponse:
38483853
if self.response_url is not None:
38493854
client = AsyncWebhookClient(
@@ -3863,6 +3868,7 @@ <h2 id="returns">Returns</h2>
38633868
unfurl_links=unfurl_links,
38643869
unfurl_media=unfurl_media,
38653870
thread_ts=thread_ts,
3871+
metadata=metadata,
38663872
)
38673873
return await client.send_dict(message)
38683874
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/async_respond.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
2626
<summary>
2727
<span>Expand source code</span>
2828
</summary>
29-
<pre><code class="python">from typing import Optional, Union, Sequence
29+
<pre><code class="python">from typing import Optional, Union, Sequence, Dict, Any
3030
from ssl import SSLContext
3131

3232
from slack_sdk.models.attachments import Attachment
@@ -63,6 +63,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
6363
unfurl_links: Optional[bool] = None,
6464
unfurl_media: Optional[bool] = None,
6565
thread_ts: Optional[str] = None,
66+
metadata: Optional[Dict[str, Any]] = None,
6667
) -&gt; WebhookResponse:
6768
if self.response_url is not None:
6869
client = AsyncWebhookClient(
@@ -82,6 +83,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.async_respond</code></
8283
unfurl_links=unfurl_links,
8384
unfurl_media=unfurl_media,
8485
thread_ts=thread_ts,
86+
metadata=metadata,
8587
)
8688
return await client.send_dict(message)
8789
elif isinstance(text_or_whole_response, dict):
@@ -140,6 +142,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
140142
unfurl_links: Optional[bool] = None,
141143
unfurl_media: Optional[bool] = None,
142144
thread_ts: Optional[str] = None,
145+
metadata: Optional[Dict[str, Any]] = None,
143146
) -&gt; WebhookResponse:
144147
if self.response_url is not None:
145148
client = AsyncWebhookClient(
@@ -159,6 +162,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
159162
unfurl_links=unfurl_links,
160163
unfurl_media=unfurl_media,
161164
thread_ts=thread_ts,
165+
metadata=metadata,
162166
)
163167
return await client.send_dict(message)
164168
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
9595
unfurl_links: Optional[bool] = None,
9696
unfurl_media: Optional[bool] = None,
9797
thread_ts: Optional[str] = None,
98+
metadata: Optional[Dict[str, Any]] = None,
9899
) -&gt; WebhookResponse:
99100
if self.response_url is not None:
100101
client = WebhookClient(
@@ -115,6 +116,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
115116
unfurl_links=unfurl_links,
116117
unfurl_media=unfurl_media,
117118
thread_ts=thread_ts,
119+
metadata=metadata,
118120
)
119121
return client.send_dict(message)
120122
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/context/respond/internals.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
4444
unfurl_links: Optional[bool] = None,
4545
unfurl_media: Optional[bool] = None,
4646
thread_ts: Optional[str] = None,
47+
metadata: Optional[Dict[str, Any]] = None,
4748
) -&gt; Dict[str, Any]:
4849
message = {&#34;text&#34;: text}
4950
if blocks is not None and len(blocks) &gt; 0:
@@ -62,6 +63,8 @@ <h1 class="title">Module <code>slack_bolt.context.respond.internals</code></h1>
6263
message[&#34;unfurl_media&#34;] = unfurl_media
6364
if thread_ts is not None:
6465
message[&#34;thread_ts&#34;] = thread_ts
66+
if metadata is not None:
67+
message[&#34;metadata&#34;] = metadata
6568
return message</code></pre>
6669
</details>
6770
</section>

docs/api-docs/slack_bolt/context/respond/respond.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
2626
<summary>
2727
<span>Expand source code</span>
2828
</summary>
29-
<pre><code class="python">from typing import Optional, Union, Sequence
29+
<pre><code class="python">from typing import Optional, Union, Sequence, Any, Dict
3030
from ssl import SSLContext
3131

3232
from slack_sdk.models.attachments import Attachment
@@ -63,6 +63,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
6363
unfurl_links: Optional[bool] = None,
6464
unfurl_media: Optional[bool] = None,
6565
thread_ts: Optional[str] = None,
66+
metadata: Optional[Dict[str, Any]] = None,
6667
) -&gt; WebhookResponse:
6768
if self.response_url is not None:
6869
client = WebhookClient(
@@ -83,6 +84,7 @@ <h1 class="title">Module <code>slack_bolt.context.respond.respond</code></h1>
8384
unfurl_links=unfurl_links,
8485
unfurl_media=unfurl_media,
8586
thread_ts=thread_ts,
87+
metadata=metadata,
8688
)
8789
return client.send_dict(message)
8890
elif isinstance(text_or_whole_response, dict):
@@ -140,6 +142,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
140142
unfurl_links: Optional[bool] = None,
141143
unfurl_media: Optional[bool] = None,
142144
thread_ts: Optional[str] = None,
145+
metadata: Optional[Dict[str, Any]] = None,
143146
) -&gt; WebhookResponse:
144147
if self.response_url is not None:
145148
client = WebhookClient(
@@ -160,6 +163,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
160163
unfurl_links=unfurl_links,
161164
unfurl_media=unfurl_media,
162165
thread_ts=thread_ts,
166+
metadata=metadata,
163167
)
164168
return client.send_dict(message)
165169
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3543,7 +3543,7 @@ <h3>Inherited members</h3>
35433543
</dd>
35443544
<dt id="slack_bolt.BoltRequest"><code class="flex name class">
35453545
<span>class <span class="ident">BoltRequest</span></span>
3546-
<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>
3546+
<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>
35473547
</code></dt>
35483548
<dd>
35493549
<div class="desc"><p>Request to a Bolt app.</p>
@@ -3581,7 +3581,7 @@ <h2 id="args">Args</h2>
35813581
body: Union[str, dict],
35823582
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
35833583
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
3584-
context: Optional[Dict[str, str]] = None,
3584+
context: Optional[Dict[str, Any]] = None,
35853585
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
35863586
):
35873587
&#34;&#34;&#34;Request to a Bolt app.
@@ -4132,6 +4132,7 @@ <h2 id="returns">Returns</h2>
41324132
unfurl_links: Optional[bool] = None,
41334133
unfurl_media: Optional[bool] = None,
41344134
thread_ts: Optional[str] = None,
4135+
metadata: Optional[Dict[str, Any]] = None,
41354136
) -&gt; WebhookResponse:
41364137
if self.response_url is not None:
41374138
client = WebhookClient(
@@ -4152,6 +4153,7 @@ <h2 id="returns">Returns</h2>
41524153
unfurl_links=unfurl_links,
41534154
unfurl_media=unfurl_media,
41544155
thread_ts=thread_ts,
4156+
metadata=metadata,
41554157
)
41564158
return client.send_dict(message)
41574159
elif isinstance(text_or_whole_response, dict):

docs/api-docs/slack_bolt/listener_matcher/builtins.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h1 class="title">Module <code>slack_bolt.listener_matcher.builtins</code></h1>
320320
return workflow_step_edit(constraints[&#34;callback_id&#34;], asyncio)
321321

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

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

348351

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

610613
raise BoltError(f&#34;type: {action_type} is unsupported&#34;)
611-
elif &#34;action_id&#34; in constraints:
614+
elif &#34;action_id&#34; in constraints or &#34;block_id&#34; in constraints:
612615
# The default value is &#34;block_actions&#34;
613616
return block_action(constraints, asyncio)
614617

docs/api-docs/slack_bolt/request/async_request.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1 class="title">Module <code>slack_bolt.request.async_request</code></h1>
5757
body: Union[str, dict],
5858
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
5959
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
60-
context: Optional[Dict[str, str]] = None,
60+
context: Optional[Dict[str, Any]] = None,
6161
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
6262
):
6363
&#34;&#34;&#34;Request to a Bolt app.
@@ -122,7 +122,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
122122
<dl>
123123
<dt id="slack_bolt.request.async_request.AsyncBoltRequest"><code class="flex name class">
124124
<span>class <span class="ident">AsyncBoltRequest</span></span>
125-
<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>
125+
<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>
126126
</code></dt>
127127
<dd>
128128
<div class="desc"><p>Request to a Bolt app.</p>
@@ -160,7 +160,7 @@ <h2 id="args">Args</h2>
160160
body: Union[str, dict],
161161
query: Optional[Union[str, Dict[str, str], Dict[str, Sequence[str]]]] = None,
162162
headers: Optional[Dict[str, Union[str, Sequence[str]]]] = None,
163-
context: Optional[Dict[str, str]] = None,
163+
context: Optional[Dict[str, Any]] = None,
164164
mode: str = &#34;http&#34;, # either &#34;http&#34; or &#34;socket_mode&#34;
165165
):
166166
&#34;&#34;&#34;Request to a Bolt app.

0 commit comments

Comments
 (0)