diff --git a/docs/api-docs/slack_sdk/index.html b/docs/api-docs/slack_sdk/index.html index 741120cf..4b36a271 100644 --- a/docs/api-docs/slack_sdk/index.html +++ b/docs/api-docs/slack_sdk/index.html @@ -3651,7 +3651,7 @@
slack_sdk.models.blocks.block_elements
slack_sdk.models.blocks.block_elements
Subclasses
+class RichTextInputElement
+(*, action_id: Optional[str] = None, placeholder: Union[str, dict, TextObject, ForwardRef(None)] = None, initial_value: Optional[Dict[str, Any]] = None, dispatch_action_config: Union[dict, DispatchActionConfig, ForwardRef(None)] = None, focus_on_load: Optional[bool] = None, **others: dict)
+
Block Elements are things that exists inside of your Blocks. +https://api.slack.com/reference/block-kit/block-elements
+InteractiveElement that is usable in input blocks
+We generally recommend using the concrete subclasses for better supports of available properties.
class RichTextInputElement(InputInteractiveElement):
+ type = "rich_text_input"
+
+ @property
+ def attributes(self) -> Set[str]:
+ return super().attributes.union(
+ {
+ "initial_value",
+ "dispatch_action_config",
+ }
+ )
+
+ def __init__(
+ self,
+ *,
+ action_id: Optional[str] = None,
+ placeholder: Optional[Union[str, dict, TextObject]] = None,
+ initial_value: Optional[Dict[str, Any]] = None, # TODO: Add rich_text block class and its element classes
+ dispatch_action_config: Optional[Union[dict, DispatchActionConfig]] = None,
+ focus_on_load: Optional[bool] = None,
+ **others: dict,
+ ):
+ super().__init__(
+ type=self.type,
+ action_id=action_id,
+ placeholder=TextObject.parse(placeholder, PlainTextObject.type),
+ focus_on_load=focus_on_load,
+ )
+ show_unknown_key_warning(self, others)
+
+ self.initial_value = initial_value
+ self.dispatch_action_config = dispatch_action_config
+var type
InputInteractiveElement
:
+
+InteractiveElement
:
+attributes
class SelectElement
(*, action_id: Optional[str] = None, placeholder: Optional[str] = None, options: Optional[Sequence[Option]] = None, option_groups: Optional[Sequence[OptionGroup]] = None, initial_option: Optional[Option] = None, confirm: Union[dict, ConfirmObject, ForwardRef(None)] = None, focus_on_load: Optional[bool] = None, **others: dict)
@@ -5610,6 +5727,12 @@
+RichTextInputElement
+
+type
+
+
+
SelectElement
option_groups_max_length
diff --git a/docs/api-docs/slack_sdk/models/blocks/index.html b/docs/api-docs/slack_sdk/models/blocks/index.html
index abe02024..7cb16559 100644
--- a/docs/api-docs/slack_sdk/models/blocks/index.html
+++ b/docs/api-docs/slack_sdk/models/blocks/index.html
@@ -67,6 +67,7 @@ Module slack_sdk.models.blocks
from .block_elements import InteractiveElement
from .block_elements import LinkButtonElement
from .block_elements import OverflowMenuElement
+from .block_elements import RichTextInputElement
from .block_elements import PlainTextInputElement
from .block_elements import EmailInputElement
from .block_elements import UrlInputElement
@@ -116,6 +117,7 @@ Module slack_sdk.models.blocks
"InteractiveElement",
"LinkButtonElement",
"OverflowMenuElement",
+ "RichTextInputElement",
"PlainTextInputElement",
"EmailInputElement",
"UrlInputElement",
@@ -3362,6 +3364,7 @@ Subclasses
- NumberInputElement
- PlainTextInputElement
- RadioButtonsElement
+- RichTextInputElement
- SelectElement
- StaticMultiSelectElement
- StaticSelectElement
@@ -4890,6 +4893,83 @@ Inherited members
+
+class RichTextInputElement
+(*, action_id: Optional[str] = None, placeholder: Union[str, dict, TextObject, ForwardRef(None)] = None, initial_value: Optional[Dict[str, Any]] = None, dispatch_action_config: Union[dict, DispatchActionConfig, ForwardRef(None)] = None, focus_on_load: Optional[bool] = None, **others: dict)
+
+
+Block Elements are things that exists inside of your Blocks.
+https://api.slack.com/reference/block-kit/block-elements
+InteractiveElement that is usable in input blocks
+We generally recommend using the concrete subclasses for better supports of available properties.
+
+
+Expand source code
+
+class RichTextInputElement(InputInteractiveElement):
+ type = "rich_text_input"
+
+ @property
+ def attributes(self) -> Set[str]:
+ return super().attributes.union(
+ {
+ "initial_value",
+ "dispatch_action_config",
+ }
+ )
+
+ def __init__(
+ self,
+ *,
+ action_id: Optional[str] = None,
+ placeholder: Optional[Union[str, dict, TextObject]] = None,
+ initial_value: Optional[Dict[str, Any]] = None, # TODO: Add rich_text block class and its element classes
+ dispatch_action_config: Optional[Union[dict, DispatchActionConfig]] = None,
+ focus_on_load: Optional[bool] = None,
+ **others: dict,
+ ):
+ super().__init__(
+ type=self.type,
+ action_id=action_id,
+ placeholder=TextObject.parse(placeholder, PlainTextObject.type),
+ focus_on_load=focus_on_load,
+ )
+ show_unknown_key_warning(self, others)
+
+ self.initial_value = initial_value
+ self.dispatch_action_config = dispatch_action_config
+
+Ancestors
+
+Class variables
+
+var type
+-
+
+
+
+Inherited members
+
+InputInteractiveElement
:
+
+
+InteractiveElement
:
+
+attributes
+
+
+
+
class SectionBlock
(*, block_id: Optional[str] = None, text: Union[str, dict, TextObject, ForwardRef(None)] = None, fields: Optional[Sequence[Union[str, dict, TextObject]]] = None, accessory: Union[dict, BlockElement, ForwardRef(None)] = None, **others: dict)
@@ -6623,6 +6703,12 @@ RichTextInputElement
+
+type
+
+
+
SectionBlock
attributes
diff --git a/docs/api-docs/slack_sdk/version.html b/docs/api-docs/slack_sdk/version.html
index e28a0274..cbf138b0 100644
--- a/docs/api-docs/slack_sdk/version.html
+++ b/docs/api-docs/slack_sdk/version.html
@@ -28,7 +28,7 @@ Module slack_sdk.version
Expand source code
"""Check the latest version at https://pypi.org/project/slack-sdk/"""
-__version__ = "3.22.0"
+__version__ = "3.23.0"
diff --git a/docs/api-docs/slack_sdk/web/async_client.html b/docs/api-docs/slack_sdk/web/async_client.html
index 651240fc..952f4031 100644
--- a/docs/api-docs/slack_sdk/web/async_client.html
+++ b/docs/api-docs/slack_sdk/web/async_client.html
@@ -53,7 +53,6 @@ Module slack_sdk.web.async_client
_remove_none_values,
_to_v2_file_upload_item,
_upload_file_via_v2_url,
- _attach_full_file_metadata_async,
_validate_for_legacy_client,
_print_files_upload_v2_suggestion,
)
@@ -3451,7 +3450,7 @@ Module slack_sdk.web.async_client
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> AsyncSlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -3548,15 +3547,10 @@ Module slack_sdk.web.async_client
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- await _attach_full_file_metadata_async(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
async def files_getUploadURLExternal(
@@ -8503,7 +8497,7 @@ Note
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> AsyncSlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -8600,15 +8594,10 @@ Note
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- await _attach_full_file_metadata_async(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
async def files_getUploadURLExternal(
@@ -15493,7 +15482,7 @@ Methods
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> AsyncSlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -15590,15 +15579,10 @@ Methods
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- await _attach_full_file_metadata_async(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
diff --git a/docs/api-docs/slack_sdk/web/client.html b/docs/api-docs/slack_sdk/web/client.html
index 141014e4..c3ade57b 100644
--- a/docs/api-docs/slack_sdk/web/client.html
+++ b/docs/api-docs/slack_sdk/web/client.html
@@ -44,7 +44,6 @@ Module slack_sdk.web.client
_remove_none_values,
_to_v2_file_upload_item,
_upload_file_via_v2_url,
- _attach_full_file_metadata,
_validate_for_legacy_client,
_print_files_upload_v2_suggestion,
)
@@ -3442,7 +3441,7 @@ Module slack_sdk.web.client
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> SlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -3539,15 +3538,10 @@ Module slack_sdk.web.client
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- _attach_full_file_metadata(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
def files_getUploadURLExternal(
@@ -8494,7 +8488,7 @@ Note
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> SlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -8591,15 +8585,10 @@ Note
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- _attach_full_file_metadata(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
def files_getUploadURLExternal(
@@ -15484,7 +15473,7 @@ Methods
channel: Optional[str] = None,
initial_comment: Optional[str] = None,
thread_ts: Optional[str] = None,
- request_file_info: bool = True,
+ request_file_info: bool = True, # since v3.23, this flag is no longer necessary
**kwargs,
) -> SlackResponse:
"""This wrapper method provides an easy way to upload files using the following endpoints:
@@ -15581,15 +15570,10 @@ Methods
channel_id=channel_to_share,
initial_comment=initial_comment,
thread_ts=thread_ts,
- token=kwargs.get("token"),
**kwargs,
)
- if request_file_info is True:
- _attach_full_file_metadata(
- client=self,
- token_as_arg=kwargs.get("token"),
- completion=completion,
- )
+ if len(completion.get("files")) == 1: # type: ignore
+ completion.data["file"] = completion.get("files")[0] # type: ignore
return completion
diff --git a/docs/api-docs/slack_sdk/web/index.html b/docs/api-docs/slack_sdk/web/index.html
index f4dc9596..1a494fb9 100644
--- a/docs/api-docs/slack_sdk/web/index.html
+++ b/docs/api-docs/slack_sdk/web/index.html
@@ -3862,7 +3862,7 @@ slack_sdk.web.internal_utils
slack_sdk.web.legacy_client
slack_sdk.web.legacy_client
slack_sdk.web.legacy_client