From 577d6b4a6eea1b4f25d5cb72ba7b4642777f2ba1 Mon Sep 17 00:00:00 2001
From: Eden Zimbelman
-
- The base class for JSON serializable class objects A feedback button element object for either positive or negative feedback. A feedback button element object for either positive or negative feedback.
+https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element#button-object-fields Block Elements are things that exists inside of your Blocks.
https://docs.slack.dev/reference/block-kit/block-elements/ Buttons to indicate positive or negative feedback. Buttons to indicate positive or negative feedback.
+https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element Block Elements are things that exists inside of your Blocks.
https://docs.slack.dev/reference/block-kit/block-elements/ An icon button to perform actions. An icon button to perform actions.
+https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element Blocks are a series of components that can be combined
to create visually rich and compellingly interactive messages.
https://docs.slack.dev/reference/block-kit/blocks Displays actions as contextual info, which can include both feedback buttons and icon buttons. Displays actions as contextual info, which can include both feedback buttons and icon buttons.
+https://docs.slack.dev/reference/block-kit/blocks/context-actions-block Blocks are a series of components that can be combined
to create visually rich and compellingly interactive messages.
https://docs.slack.dev/reference/block-kit/blocks Displays actions as contextual info, which can include both feedback buttons and icon buttons. Displays actions as contextual info, which can include both feedback buttons and icon buttons.
+https://docs.slack.dev/reference/block-kit/blocks/context-actions-block The base class for JSON serializable class objects A feedback button element object for either positive or negative feedback. A feedback button element object for either positive or negative feedback.
+https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element#button-object-fields Block Elements are things that exists inside of your Blocks.
https://docs.slack.dev/reference/block-kit/block-elements/ Buttons to indicate positive or negative feedback. Buttons to indicate positive or negative feedback.
+https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element Block Elements are things that exists inside of your Blocks.
https://docs.slack.dev/reference/block-kit/block-elements/ An icon button to perform actions. An icon button to perform actions.
+https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element Lists custom emoji for a team.
https://docs.slack.dev/reference/methods/emoji.list Provides entity details for the flexpane.
+https://docs.slack.dev/reference/methods/entity.presentDetails/ Searches for messages matching a query.
https://docs.slack.dev/reference/methods/search.messages Revoke access to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.delete Set the access level to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.set Creates a List.
+https://docs.slack.dev/reference/methods/slackLists.create Retrieve List download URL from an export job to download List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.get Initiate a job to export List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.start Add a new item to an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.create Deletes an item from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.delete Deletes multiple items from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple Get a row from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.info Get records from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.list Updates cells in a List.
+https://docs.slack.dev/reference/methods/slackLists.items.update Update a List.
+https://docs.slack.dev/reference/methods/slackLists.update Construct a dictionary out of non-null keys (from attributes property)
present on this object raw_text typed text object A raw text object used in table block cells.
+https://docs.slack.dev/reference/block-kit/composition-objects/text-object/
+https://docs.slack.dev/reference/block-kit/blocks/table-block The type of the None singleton. Transforms a string into the required object shape to act as a RawTextObject Transforms a string into a RawTextObject Build an unordered collection of unique elements. Blocks are a series of components that can be combined
+to create visually rich and compellingly interactive messages.
+https://docs.slack.dev/reference/block-kit/blocks Displays structured information in a table.
+https://docs.slack.dev/reference/block-kit/blocks/table-block The type of the None singleton. Build an unordered collection of unique elements. raw_text typed text object A raw text object used in table block cells.
+https://docs.slack.dev/reference/block-kit/composition-objects/text-object/
+https://docs.slack.dev/reference/block-kit/blocks/table-block The type of the None singleton. Transforms a string into the required object shape to act as a RawTextObject Transforms a string into a RawTextObject Build an unordered collection of unique elements. Blocks are a series of components that can be combined
+to create visually rich and compellingly interactive messages.
+https://docs.slack.dev/reference/block-kit/blocks Displays structured information in a table.
+https://docs.slack.dev/reference/block-kit/blocks/table-block The type of the None singleton. Build an unordered collection of unique elements. Construct a dictionary out of non-null keys (from attributes property)
present on this object Custom field types Fields specific to content item entities The type of the None singleton. Action button for entity The type of the None singleton. Processing state configuration for entity action button The type of the None singleton. Actions configuration for entity The type of the None singleton. Array item field for entity (similar to EntityTypedField but with optional type) The type of the None singleton. Attributes for an entity The type of the None singleton. Boolean checkbox properties The type of the None singleton. Boolean text properties The type of the None singleton. Custom field for entity with flexible types The type of the None singleton. Number configuration for entity edit support The type of the None singleton. Select configuration for entity edit support The type of the None singleton. Edit support configuration for entity fields The type of the None singleton. Text configuration for entity edit support The type of the None singleton. Full-size preview configuration for entity The type of the None singleton. Error information for full-size preview The type of the None singleton. Icon field for entity attributes The type of the None singleton. Slack file reference for entity icon The type of the None singleton. Image field for entity The type of the None singleton. Work object entity metadata The type of the None singleton. Payload schema for an entity The type of the None singleton. Get the entity attributes data. Note: Use this property to access the attributes data. The class-level
+'attributes' is reserved for the JSON serialization schema. Entity reference field The type of the None singleton. String field for entity The type of the None singleton. Timestamp field for entity The type of the None singleton. Title for entity attributes The type of the None singleton. Typed field for entity with various display options The type of the None singleton. User field for entity The type of the None singleton. User ID field for entity The type of the None singleton. Message metadata with entities https://docs.slack.dev/messaging/message-metadata/
+https://docs.slack.dev/messaging/work-objects/ The type of the None singleton. Reference (and optional type) used to identify an entity within the developer's system The type of the None singleton. Fields specific to file entities The type of the None singleton. Slack file reference for file entities The type of the None singleton. Fields specific to incident entities The type of the None singleton. Fields specific to task entities The type of the None singleton. Lists custom emoji for a team.
https://docs.slack.dev/reference/methods/emoji.list Provides entity details for the flexpane.
+https://docs.slack.dev/reference/methods/entity.presentDetails/ Searches for messages matching a query.
https://docs.slack.dev/reference/methods/search.messages Revoke access to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.delete Set the access level to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.set Creates a List.
+https://docs.slack.dev/reference/methods/slackLists.create Retrieve List download URL from an export job to download List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.get Initiate a job to export List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.start Add a new item to an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.create Deletes an item from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.delete Deletes multiple items from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple Get a row from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.info Get records from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.list Updates cells in a List.
+https://docs.slack.dev/reference/methods/slackLists.items.update Update a List.
+https://docs.slack.dev/reference/methods/slackLists.update Lists custom emoji for a team.
https://docs.slack.dev/reference/methods/emoji.list Provides entity details for the flexpane.
+https://docs.slack.dev/reference/methods/entity.presentDetails/ Searches for messages matching a query.
https://docs.slack.dev/reference/methods/search.messages Revoke access to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.delete Set the access level to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.set Creates a List.
+https://docs.slack.dev/reference/methods/slackLists.create Retrieve List download URL from an export job to download List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.get Initiate a job to export List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.start Add a new item to an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.create Deletes an item from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.delete Deletes multiple items from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple Get a row from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.info Get records from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.list Updates cells in a List.
+https://docs.slack.dev/reference/methods/slackLists.items.update Update a List.
+https://docs.slack.dev/reference/methods/slackLists.update Lists custom emoji for a team.
https://docs.slack.dev/reference/methods/emoji.list Provides entity details for the flexpane.
+https://docs.slack.dev/reference/methods/entity.presentDetails/ Searches for messages matching a query.
https://docs.slack.dev/reference/methods/search.messages Revoke access to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.delete Set the access level to a List for specified entities.
+https://docs.slack.dev/reference/methods/slackLists.access.set Creates a List.
+https://docs.slack.dev/reference/methods/slackLists.create Retrieve List download URL from an export job to download List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.get Initiate a job to export List contents.
+https://docs.slack.dev/reference/methods/slackLists.download.start Add a new item to an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.create Deletes an item from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.delete Deletes multiple items from an existing List.
+https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple Get a row from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.info Get records from a List.
+https://docs.slack.dev/reference/methods/slackLists.items.list Updates cells in a List.
+https://docs.slack.dev/reference/methods/slackLists.items.update Update a List.
+https://docs.slack.dev/reference/methods/slackLists.updateClasses
class FileInstallationStore
-(*,
base_dir: str = '/Users/eden.zimbelman/.bolt-app-installation',
historical_data_enabled: bool = True,
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.installation_store.file (WARNING)>)
+(*,
base_dir: str = '$HOME/.bolt-app-installation',
historical_data_enabled: bool = True,
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.installation_store.file (WARNING)>)
Methods
class FileInstallationStore
-(*,
base_dir: str = '/Users/eden.zimbelman/.bolt-app-installation',
historical_data_enabled: bool = True,
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.installation_store.file (WARNING)>)
+(*,
base_dir: str = '$HOME/.bolt-app-installation',
historical_data_enabled: bool = True,
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.installation_store.file (WARNING)>)
Classes
class FileOAuthStateStore
-(*,
expiration_seconds: int,
base_dir: str = '/Users/eden.zimbelman/.bolt-app-oauth-state',
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.state_store.file (WARNING)>)
+(*,
expiration_seconds: int,
base_dir: str = '$HOME/.bolt-app-oauth-state',
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.state_store.file (WARNING)>)
Classes
class FileOAuthStateStore
-(*,
expiration_seconds: int,
base_dir: str = '/Users/eden.zimbelman/.bolt-app-oauth-state',
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.state_store.file (WARNING)>)
+(*,
expiration_seconds: int,
base_dir: str = '$HOME/.bolt-app-oauth-state',
client_id: str | None = None,
logger: logging.Logger = <Logger slack_sdk.oauth.state_store.file (WARNING)>)
Python Slack SDK
+
+
From e5a282525db1c04e57fe67bad9febaacbdf8ec66 Mon Sep 17 00:00:00 2001
From: Eden Zimbelman
Inherited members
):
"""
A feedback button element object for either positive or negative feedback.
+ https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element#button-object-fields
Args:
text (required): An object containing some text. Maximum length for this field is 75 characters.
@@ -410,7 +411,8 @@ Inherited members
return json
Args
text : requiredInherited members
**others: dict,
):
"""Buttons to indicate positive or negative feedback.
+ https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element
Args:
action_id (required): An identifier for this action.
@@ -1885,7 +1886,8 @@ Inherited members
Args
action_id : requiredInherited members
**others: dict,
):
"""An icon button to perform actions.
+ https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element
Args:
action_id: An identifier for this action.
@@ -2103,7 +2106,8 @@ Inherited members
Args
action_idInherited members
italic: Optional[bool] = None,
strike: Optional[bool] = None,
code: Optional[bool] = None,
+ underline: Optional[bool] = None,
):
self.bold = bold
self.italic = italic
self.strike = strike
self.code = code
+ self.underline = underline
def to_dict(self, *args) -> dict:
result = {
@@ -3237,6 +3243,7 @@ Inherited members
"italic": self.italic,
"strike": self.strike,
"code": self.code,
+ "underline": self.underline,
}
return {k: v for k, v in result.items() if v is not None}
diff --git a/docs/reference/models/blocks/blocks.html b/docs/reference/models/blocks/blocks.html
index e01a02436..f266b5cad 100644
--- a/docs/reference/models/blocks/blocks.html
+++ b/docs/reference/models/blocks/blocks.html
@@ -433,6 +433,7 @@ Inherited members
**others: dict,
):
"""Displays actions as contextual info, which can include both feedback buttons and icon buttons.
+ https://docs.slack.dev/reference/block-kit/blocks/context-actions-block
Args:
elements (required): An array of feedback_buttons or icon_button block elements. Maximum number of items is 5.
@@ -457,7 +458,8 @@ Inherited members
Args
elements : requiredInherited members
**others: dict,
):
"""Displays actions as contextual info, which can include both feedback buttons and icon buttons.
+ https://docs.slack.dev/reference/block-kit/blocks/context-actions-block
Args:
elements (required): An array of feedback_buttons or icon_button block elements. Maximum number of items is 5.
@@ -1393,7 +1394,8 @@ Inherited members
Args
elements : requiredInherited members
):
"""
A feedback button element object for either positive or negative feedback.
+ https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element#button-object-fields
Args:
text (required): An object containing some text. Maximum length for this field is 75 characters.
@@ -2794,7 +2797,8 @@ Inherited members
return json
Args
text : requiredInherited members
**others: dict,
):
"""Buttons to indicate positive or negative feedback.
+ https://docs.slack.dev/reference/block-kit/block-elements/feedback-buttons-element
Args:
action_id (required): An identifier for this action.
@@ -2918,7 +2923,8 @@ Inherited members
Args
action_id : requiredInherited members
**others: dict,
):
"""An icon button to perform actions.
+ https://docs.slack.dev/reference/block-kit/block-elements/icon-button-element
Args:
action_id: An identifier for this action.
@@ -3225,7 +3232,8 @@ Inherited members
Args
action_idInherited members
italic: Optional[bool] = None,
strike: Optional[bool] = None,
code: Optional[bool] = None,
+ underline: Optional[bool] = None,
):
self.bold = bold
self.italic = italic
self.strike = strike
self.code = code
+ self.underline = underline
def to_dict(self, *args) -> dict:
result = {
@@ -5629,6 +5639,7 @@ Inherited members
"italic": self.italic,
"strike": self.strike,
"code": self.code,
+ "underline": self.underline,
}
return {k: v for k, v in result.items() if v is not None}
diff --git a/docs/reference/scim/async_client.html b/docs/reference/scim/async_client.html
index 426ca9299..c91441c29 100644
--- a/docs/reference/scim/async_client.html
+++ b/docs/reference/scim/async_client.html
@@ -163,9 +163,9 @@ Classes
await self.api_call(
http_verb="PATCH",
path=f"Users/{quote(id)}",
- body_params=partial_user.to_dict()
- if isinstance(partial_user, User)
- else _to_dict_without_not_given(partial_user),
+ body_params=(
+ partial_user.to_dict() if isinstance(partial_user, User) else _to_dict_without_not_given(partial_user)
+ ),
)
)
@@ -228,9 +228,11 @@ Classes
await self.api_call(
http_verb="PATCH",
path=f"Groups/{quote(id)}",
- body_params=partial_group.to_dict()
- if isinstance(partial_group, Group)
- else _to_dict_without_not_given(partial_group),
+ body_params=(
+ partial_group.to_dict()
+ if isinstance(partial_group, Group)
+ else _to_dict_without_not_given(partial_group)
+ ),
)
)
@@ -620,9 +622,11 @@ Methods
await self.api_call(
http_verb="PATCH",
path=f"Groups/{quote(id)}",
- body_params=partial_group.to_dict()
- if isinstance(partial_group, Group)
- else _to_dict_without_not_given(partial_group),
+ body_params=(
+ partial_group.to_dict()
+ if isinstance(partial_group, Group)
+ else _to_dict_without_not_given(partial_group)
+ ),
)
)
@@ -641,9 +645,9 @@ Methods
await self.api_call(
http_verb="PATCH",
path=f"Users/{quote(id)}",
- body_params=partial_user.to_dict()
- if isinstance(partial_user, User)
- else _to_dict_without_not_given(partial_user),
+ body_params=(
+ partial_user.to_dict() if isinstance(partial_user, User) else _to_dict_without_not_given(partial_user)
+ ),
)
)
diff --git a/docs/reference/scim/v1/async_client.html b/docs/reference/scim/v1/async_client.html
index 59fb723f3..6a971bb80 100644
--- a/docs/reference/scim/v1/async_client.html
+++ b/docs/reference/scim/v1/async_client.html
@@ -163,9 +163,9 @@ Classes
await self.api_call(
http_verb="PATCH",
path=f"Users/{quote(id)}",
- body_params=partial_user.to_dict()
- if isinstance(partial_user, User)
- else _to_dict_without_not_given(partial_user),
+ body_params=(
+ partial_user.to_dict() if isinstance(partial_user, User) else _to_dict_without_not_given(partial_user)
+ ),
)
)
@@ -228,9 +228,11 @@ Classes
await self.api_call(
http_verb="PATCH",
path=f"Groups/{quote(id)}",
- body_params=partial_group.to_dict()
- if isinstance(partial_group, Group)
- else _to_dict_without_not_given(partial_group),
+ body_params=(
+ partial_group.to_dict()
+ if isinstance(partial_group, Group)
+ else _to_dict_without_not_given(partial_group)
+ ),
)
)
@@ -620,9 +622,11 @@ Methods
await self.api_call(
http_verb="PATCH",
path=f"Groups/{quote(id)}",
- body_params=partial_group.to_dict()
- if isinstance(partial_group, Group)
- else _to_dict_without_not_given(partial_group),
+ body_params=(
+ partial_group.to_dict()
+ if isinstance(partial_group, Group)
+ else _to_dict_without_not_given(partial_group)
+ ),
)
)
@@ -641,9 +645,9 @@ Methods
await self.api_call(
http_verb="PATCH",
path=f"Users/{quote(id)}",
- body_params=partial_user.to_dict()
- if isinstance(partial_user, User)
- else _to_dict_without_not_given(partial_user),
+ body_params=(
+ partial_user.to_dict() if isinstance(partial_user, User) else _to_dict_without_not_given(partial_user)
+ ),
)
)
diff --git a/docs/reference/socket_mode/websocket_client/index.html b/docs/reference/socket_mode/websocket_client/index.html
index fe43e29b1..b90aa9137 100644
--- a/docs/reference/socket_mode/websocket_client/index.html
+++ b/docs/reference/socket_mode/websocket_client/index.html
@@ -213,10 +213,10 @@ Classes
self.current_session = websocket.WebSocketApp(
self.wss_uri,
- on_open=on_open, # type: ignore[arg-type]
- on_message=on_message, # type: ignore[arg-type]
- on_error=on_error, # type: ignore[arg-type]
- on_close=on_close, # type: ignore[arg-type]
+ on_open=on_open,
+ on_message=on_message,
+ on_error=on_error,
+ on_close=on_close,
)
self.auto_reconnect_enabled = self.default_auto_reconnect_enabled
@@ -441,10 +441,10 @@ Methods
self.current_session = websocket.WebSocketApp(
self.wss_uri,
- on_open=on_open, # type: ignore[arg-type]
- on_message=on_message, # type: ignore[arg-type]
- on_error=on_error, # type: ignore[arg-type]
- on_close=on_close, # type: ignore[arg-type]
+ on_open=on_open,
+ on_message=on_message,
+ on_error=on_error,
+ on_close=on_close,
)
self.auto_reconnect_enabled = self.default_auto_reconnect_enabled
diff --git a/slack_sdk/version.py b/slack_sdk/version.py
index a23f01f83..c787aa278 100644
--- a/slack_sdk/version.py
+++ b/slack_sdk/version.py
@@ -1,3 +1,3 @@
"""Check the latest version at https://pypi.org/project/slack-sdk/"""
-__version__ = "3.37.0"
+__version__ = "3.38.0"
From 21ac4f79e8e8ab6fb868682fc3814522ea37ab6a Mon Sep 17 00:00:00 2001
From: Michael Brooks Static methods
class HttpResponse
-(*,
status_code: str | int,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
+(*,
status_code: int | str,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
Static methods
class HttpResponse
-(*,
status_code: str | int,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
+(*,
status_code: int | str,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
Classes
class HttpResponse
-(*,
status_code: str | int,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
+(*,
status_code: int | str,
headers: Dict[str, str | List[str]],
body: Dict[str, Any] | None = None,
data: bytes | None = None)
Classes
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -3123,6 +3123,7 @@ Classes
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -3139,6 +3140,7 @@ Classes
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -3770,6 +3772,30 @@ Classes
kwargs.update({"include_categories": include_categories})
return self.api_call("emoji.list", http_verb="GET", params=kwargs)
+ def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
+
def files_comments_delete(
self,
*,
@@ -5024,6 +5050,249 @@ Classes
)
return self.api_call("search.messages", http_verb="GET", params=kwargs)
+ def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+
+ def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+
+ def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+
+ def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+
+ def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+
+ def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+
+ def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+
+ def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+
+ def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+
+ def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+
+ def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+ ) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+
+ def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
+
def stars_add(
self,
*,
@@ -10170,7 +10439,7 @@ Methods
https://docs.slack.dev/reference/methods/chat.postEphemeral
-def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | EventAndEntityMetadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
Methods
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -10518,7 +10787,7 @@ Example
-def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
metadata: Dict | EventAndEntityMetadata | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
Example
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -10549,6 +10819,7 @@ Example
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -11580,6 +11851,41 @@ Example
+def entity_presentDetails(self,
trigger_id: str,
metadata: Dict | EntityMetadata | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
error: Dict[str, Any] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
def files_comments_delete(self, *, file: str, id: str, **kwargs) ‑> SlackResponse
Example
+def slackLists_access_delete(self,
*,
list_id: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+def slackLists_access_set(self,
*,
list_id: str,
access_level: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+def slackLists_create(self,
*,
name: str,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
schema: List[Dict[str, Any]] | None = None,
copy_from_list_id: str | None = None,
include_copied_list_records: bool | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+def slackLists_download_get(self, *, list_id: str, job_id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+def slackLists_download_start(self, *, list_id: str, include_archived: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+def slackLists_items_create(self,
*,
list_id: str,
duplicated_item_id: str | None = None,
parent_item_id: str | None = None,
initial_fields: List[Dict[str, Any]] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+def slackLists_items_delete(self, *, list_id: str, id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+def slackLists_items_deleteMultiple(self, *, list_id: str, ids: List[str], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+def slackLists_items_info(self, *, list_id: str, id: str, include_is_subscribed: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+def slackLists_items_list(self,
*,
list_id: str,
limit: int | None = None,
cursor: str | None = None,
archived: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+def slackLists_items_update(self, *, list_id: str, cells: List[Dict[str, Any]], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+def slackLists_update(self,
*,
id: str,
name: str | None = None,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
def stars_add(self,
*,
channel: str | None = None,
file: str | None = None,
file_comment: str | None = None,
timestamp: str | None = None,
**kwargs) ‑> SlackResponse
WebClient
dnd_setSnoozednd_teamInfoemoji_listentity_presentDetailsfiles_comments_deletefiles_completeUploadExternalfiles_deleteWebClient
search_allsearch_filessearch_messagesslackLists_access_deleteslackLists_access_setslackLists_createslackLists_download_getslackLists_download_startslackLists_items_createslackLists_items_deleteslackLists_items_deleteMultipleslackLists_items_infoslackLists_items_listslackLists_items_updateslackLists_updatestars_addstars_liststars_removeAncestors
if callable(method) and hasattr(method, "validator"):
method()
+ def get_object_attribute(self, key: str):
+ return getattr(self, key, None)
+
def get_non_null_attributes(self) -> dict:
"""
Construct a dictionary out of non-null keys (from attributes property)
@@ -136,7 +139,7 @@ Ancestors
return value
def is_not_empty(self, key: str) -> bool:
- value = getattr(self, key, None)
+ value = self.get_object_attribute(key)
if value is None:
return False
@@ -154,7 +157,9 @@ Ancestors
return value is not None
return {
- key: to_dict_compatible(getattr(self, key, None)) for key in sorted(self.attributes) if is_not_empty(self, key)
+ key: to_dict_compatible(value=self.get_object_attribute(key))
+ for key in sorted(self.attributes)
+ if is_not_empty(self, key)
}
def to_dict(self, *args) -> dict:
@@ -208,7 +213,40 @@ Subclasses
Methods
return value
def is_not_empty(self, key: str) -> bool:
- value = getattr(self, key, None)
+ value = self.get_object_attribute(key)
if value is None:
return False
@@ -275,12 +313,27 @@ Methods
return value is not None
return {
- key: to_dict_compatible(getattr(self, key, None)) for key in sorted(self.attributes) if is_not_empty(self, key)
+ key: to_dict_compatible(value=self.get_object_attribute(key))
+ for key in sorted(self.attributes)
+ if is_not_empty(self, key)
}
+def get_object_attribute(self, key: str)
+
+Expand source code
+
+
+def get_object_attribute(self, key: str):
+ return getattr(self, key, None)
def to_dict(self, *args) ‑> dict
attributesget_non_null_attributesget_object_attributeto_dictvalidate_jsonInherited members
+
+class RawTextObject
+(*, text: str)
+
+Expand source code
+
+
+class RawTextObject(TextObject):
+ """raw_text typed text object"""
+
+ type = "raw_text"
+
+ @property
+ def attributes(self) -> Set[str]: # type: ignore[override]
+ return {"text", "type"}
+
+ def __init__(self, *, text: str):
+ """A raw text object used in table block cells.
+ https://docs.slack.dev/reference/block-kit/composition-objects/text-object/
+ https://docs.slack.dev/reference/block-kit/blocks/table-block
+
+ Args:
+ text (required): The text content for the table block cell.
+ """
+ super().__init__(text=text, type=self.type)
+
+ @staticmethod
+ def from_str(text: str) -> "RawTextObject":
+ """Transforms a string into a RawTextObject"""
+ return RawTextObject(text=text)
+
+ @staticmethod
+ def direct_from_string(text: str) -> Dict[str, Any]:
+ """Transforms a string into the required object shape to act as a RawTextObject"""
+ return RawTextObject.from_str(text).to_dict()
+
+ @JsonValidator("text attribute must have at least 1 character")
+ def _validate_text_min_length(self):
+ return len(self.text) >= 1Args
+
+
text : requiredAncestors
+
+Class variables
+
+
+var typeStatic methods
+
+
+
+def direct_from_string(text: str) ‑> Dict[str, Any]
+
+Expand source code
+
+
+@staticmethod
+def direct_from_string(text: str) -> Dict[str, Any]:
+ """Transforms a string into the required object shape to act as a RawTextObject"""
+ return RawTextObject.from_str(text).to_dict()
+def from_str(text: str) ‑> RawTextObject
+
+Expand source code
+
+
+@staticmethod
+def from_str(text: str) -> "RawTextObject":
+ """Transforms a string into a RawTextObject"""
+ return RawTextObject(text=text)Instance variables
+
+
+prop attributes : Set[str]
+Expand source code
+
+
+@property
+def attributes(self) -> Set[str]: # type: ignore[override]
+ return {"text", "type"}Inherited members
+
+
+TextObject:
+
+
class SlackFile
(*, id: str | None = None, url: str | None = None)
@@ -1396,6 +1520,7 @@ Subclasses
Class variables
@@ -1633,6 +1758,15 @@
+
+RawTextObjectSlackFile
attributesInherited members
return VideoBlock(**block)
elif type == RichTextBlock.type:
return RichTextBlock(**block)
+ elif type == TableBlock.type:
+ return TableBlock(**block)
else:
cls.logger.warning(f"Unknown block detected and skipped ({block})")
return None
@@ -269,6 +271,7 @@ Subclasses
Class variables
@@ -1580,6 +1583,123 @@ Inherited members
+class TableBlock
+(*,
rows: Sequence[Sequence[Dict[str, Any]]],
column_settings: Sequence[Dict[str, Any] | None] | None = None,
block_id: str | None = None,
**others: dict)
+
+Expand source code
+
+
+class TableBlock(Block):
+ type = "table"
+
+ @property
+ def attributes(self) -> Set[str]: # type: ignore[override]
+ return super().attributes.union({"rows", "column_settings"})
+
+ def __init__(
+ self,
+ *,
+ rows: Sequence[Sequence[Dict[str, Any]]],
+ column_settings: Optional[Sequence[Optional[Dict[str, Any]]]] = None,
+ block_id: Optional[str] = None,
+ **others: dict,
+ ):
+ """Displays structured information in a table.
+ https://docs.slack.dev/reference/block-kit/blocks/table-block
+
+ Args:
+ rows (required): An array consisting of table rows. Maximum 100 rows.
+ Each row object is an array with a max of 20 table cells.
+ Table cells can have a type of raw_text or rich_text.
+ column_settings: An array describing column behavior. If there are fewer items in the column_settings array
+ than there are columns in the table, then the items in the the column_settings array will describe
+ the same number of columns in the table as there are in the array itself.
+ Any additional columns will have the default behavior. Maximum 20 items.
+ See below for column settings schema.
+ block_id: A unique identifier for a block. If not specified, a block_id will be generated.
+ You can use this block_id when you receive an interaction payload to identify the source of the action.
+ Maximum length for this field is 255 characters.
+ block_id should be unique for each message and each iteration of a message.
+ If a message is updated, use a new block_id.
+ """
+ super().__init__(type=self.type, block_id=block_id)
+ show_unknown_key_warning(self, others)
+
+ self.rows = rows
+ self.column_settings = column_settings
+
+ @JsonValidator("rows attribute must be specified")
+ def _validate_rows(self):
+ return self.rows is not None and len(self.rows) > 0Args
+
+
rows : requiredcolumn_settingsblock_idAncestors
+
+
+Class variables
+
+
+var typeInstance variables
+
+
+prop attributes : Set[str]
+Expand source code
+
+
+@property
+def attributes(self) -> Set[str]: # type: ignore[override]
+ return super().attributes.union({"rows", "column_settings"})Inherited members
+
+
+Block:
+
+
class VideoBlock
(*,
block_id: str | None = None,
alt_text: str | None = None,
video_url: str | None = None,
thumbnail_url: str | None = None,
title: str | dict | PlainTextObject | None = None,
title_url: str | None = None,
description: str | dict | PlainTextObject | None = None,
provider_icon_url: str | None = None,
provider_name: str | None = None,
author_name: str | None = None,
**others: dict)
@@ -1904,6 +2024,13 @@
+TableBlock
+
+
+attributestypeVideoBlock
attributesInherited members
return VideoBlock(**block)
elif type == RichTextBlock.type:
return RichTextBlock(**block)
+ elif type == TableBlock.type:
+ return TableBlock(**block)
else:
cls.logger.warning(f"Unknown block detected and skipped ({block})")
return None
@@ -291,6 +293,7 @@ Subclasses
Class variables
@@ -5462,6 +5465,130 @@ Inherited members
+class RawTextObject
+(*, text: str)
+
+Expand source code
+
+
+class RawTextObject(TextObject):
+ """raw_text typed text object"""
+
+ type = "raw_text"
+
+ @property
+ def attributes(self) -> Set[str]: # type: ignore[override]
+ return {"text", "type"}
+
+ def __init__(self, *, text: str):
+ """A raw text object used in table block cells.
+ https://docs.slack.dev/reference/block-kit/composition-objects/text-object/
+ https://docs.slack.dev/reference/block-kit/blocks/table-block
+
+ Args:
+ text (required): The text content for the table block cell.
+ """
+ super().__init__(text=text, type=self.type)
+
+ @staticmethod
+ def from_str(text: str) -> "RawTextObject":
+ """Transforms a string into a RawTextObject"""
+ return RawTextObject(text=text)
+
+ @staticmethod
+ def direct_from_string(text: str) -> Dict[str, Any]:
+ """Transforms a string into the required object shape to act as a RawTextObject"""
+ return RawTextObject.from_str(text).to_dict()
+
+ @JsonValidator("text attribute must have at least 1 character")
+ def _validate_text_min_length(self):
+ return len(self.text) >= 1Args
+
+
text : requiredAncestors
+
+Class variables
+
+
+var typeStatic methods
+
+
+
+def direct_from_string(text: str) ‑> Dict[str, Any]
+
+Expand source code
+
+
+@staticmethod
+def direct_from_string(text: str) -> Dict[str, Any]:
+ """Transforms a string into the required object shape to act as a RawTextObject"""
+ return RawTextObject.from_str(text).to_dict()
+def from_str(text: str) ‑> RawTextObject
+
+Expand source code
+
+
+@staticmethod
+def from_str(text: str) -> "RawTextObject":
+ """Transforms a string into a RawTextObject"""
+ return RawTextObject(text=text)Instance variables
+
+
+prop attributes : Set[str]
+Expand source code
+
+
+@property
+def attributes(self) -> Set[str]: # type: ignore[override]
+ return {"text", "type"}Inherited members
+
+
+TextObject:
+
+
class RichTextBlock
(*,
elements: Sequence[dict | RichTextElement],
block_id: str | None = None,
**others: dict)
@@ -6952,6 +7079,123 @@ Inherited members
+
+class TableBlock
+(*,
rows: Sequence[Sequence[Dict[str, Any]]],
column_settings: Sequence[Dict[str, Any] | None] | None = None,
block_id: str | None = None,
**others: dict)
+
+Expand source code
+
+
+class TableBlock(Block):
+ type = "table"
+
+ @property
+ def attributes(self) -> Set[str]: # type: ignore[override]
+ return super().attributes.union({"rows", "column_settings"})
+
+ def __init__(
+ self,
+ *,
+ rows: Sequence[Sequence[Dict[str, Any]]],
+ column_settings: Optional[Sequence[Optional[Dict[str, Any]]]] = None,
+ block_id: Optional[str] = None,
+ **others: dict,
+ ):
+ """Displays structured information in a table.
+ https://docs.slack.dev/reference/block-kit/blocks/table-block
+
+ Args:
+ rows (required): An array consisting of table rows. Maximum 100 rows.
+ Each row object is an array with a max of 20 table cells.
+ Table cells can have a type of raw_text or rich_text.
+ column_settings: An array describing column behavior. If there are fewer items in the column_settings array
+ than there are columns in the table, then the items in the the column_settings array will describe
+ the same number of columns in the table as there are in the array itself.
+ Any additional columns will have the default behavior. Maximum 20 items.
+ See below for column settings schema.
+ block_id: A unique identifier for a block. If not specified, a block_id will be generated.
+ You can use this block_id when you receive an interaction payload to identify the source of the action.
+ Maximum length for this field is 255 characters.
+ block_id should be unique for each message and each iteration of a message.
+ If a message is updated, use a new block_id.
+ """
+ super().__init__(type=self.type, block_id=block_id)
+ show_unknown_key_warning(self, others)
+
+ self.rows = rows
+ self.column_settings = column_settings
+
+ @JsonValidator("rows attribute must be specified")
+ def _validate_rows(self):
+ return self.rows is not None and len(self.rows) > 0Args
+
+
rows : requiredcolumn_settingsblock_idAncestors
+
+
+Class variables
+
+
+var typeInstance variables
+
+
+prop attributes : Set[str]
+Expand source code
+
+
+@property
+def attributes(self) -> Set[str]: # type: ignore[override]
+ return super().attributes.union({"rows", "column_settings"})Inherited members
+
+
+Block:
+
+
class TextObject
(text: str,
type: str | None = None,
subtype: str | None = None,
emoji: bool | None = None,
**kwargs)
@@ -7030,6 +7274,7 @@ Subclasses
Class variables
@@ -8151,6 +8396,15 @@
+
+
+RawTextObjectRichTextBlock
attributes
+TableBlock
+
+attributestypeTextObject
attributesAncestors
if callable(method) and hasattr(method, "validator"):
method()
+ def get_object_attribute(self, key: str):
+ return getattr(self, key, None)
+
def get_non_null_attributes(self) -> dict:
"""
Construct a dictionary out of non-null keys (from attributes property)
@@ -240,7 +243,7 @@ Ancestors
return value
def is_not_empty(self, key: str) -> bool:
- value = getattr(self, key, None)
+ value = self.get_object_attribute(key)
if value is None:
return False
@@ -258,7 +261,9 @@ Ancestors
return value is not None
return {
- key: to_dict_compatible(getattr(self, key, None)) for key in sorted(self.attributes) if is_not_empty(self, key)
+ key: to_dict_compatible(value=self.get_object_attribute(key))
+ for key in sorted(self.attributes)
+ if is_not_empty(self, key)
}
def to_dict(self, *args) -> dict:
@@ -312,7 +317,40 @@ Subclasses
Methods
return value
def is_not_empty(self, key: str) -> bool:
- value = getattr(self, key, None)
+ value = self.get_object_attribute(key)
if value is None:
return False
@@ -379,12 +417,27 @@ Methods
return value is not None
return {
- key: to_dict_compatible(getattr(self, key, None)) for key in sorted(self.attributes) if is_not_empty(self, key)
+ key: to_dict_compatible(value=self.get_object_attribute(key))
+ for key in sorted(self.attributes)
+ if is_not_empty(self, key)
}
+def get_object_attribute(self, key: str)
+
+Expand source code
+
+
+def get_object_attribute(self, key: str):
+ return getattr(self, key, None)
def to_dict(self, *args) ‑> dict
attributesget_non_null_attributesget_object_attributeto_dictvalidate_jsonModule
slack_sdk.models.metadataGlobal variables
+
+
var EntityTypeClasses
+
+class ContentItemEntityFields
+(preview: Dict[str, Any] | EntityImageField | None = None,
description: Dict[str, Any] | EntityStringField | None = None,
created_by: Dict[str, Any] | EntityTypedField | None = None,
date_created: Dict[str, Any] | EntityTimestampField | None = None,
date_updated: Dict[str, Any] | EntityTimestampField | None = None,
last_modified_by: Dict[str, Any] | EntityTypedField | None = None,
**kwargs)
+
+Expand source code
+
+
+class ContentItemEntityFields(JsonObject):
+ """Fields specific to content item entities"""
+
+ attributes = {
+ "preview",
+ "description",
+ "created_by",
+ "date_created",
+ "date_updated",
+ "last_modified_by",
+ }
+
+ def __init__(
+ self,
+ preview: Optional[Union[Dict[str, Any], EntityImageField]] = None,
+ description: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ created_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ date_created: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ date_updated: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ last_modified_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ **kwargs,
+ ):
+ self.preview = preview
+ self.description = description
+ self.created_by = created_by
+ self.date_created = date_created
+ self.date_updated = date_updated
+ self.last_modified_by = last_modified_by
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityActionButton
+(text: str,
action_id: str,
value: str | None = None,
style: str | None = None,
url: str | None = None,
accessibility_label: str | None = None,
processing_state: Dict[str, Any] | EntityActionProcessingState | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityActionButton(JsonObject):
+ """Action button for entity"""
+
+ attributes = {
+ "text",
+ "action_id",
+ "value",
+ "style",
+ "url",
+ "accessibility_label",
+ "processing_state",
+ }
+
+ def __init__(
+ self,
+ text: str,
+ action_id: str,
+ value: Optional[str] = None,
+ style: Optional[str] = None,
+ url: Optional[str] = None,
+ accessibility_label: Optional[str] = None,
+ processing_state: Optional[Union[Dict[str, Any], EntityActionProcessingState]] = None,
+ **kwargs,
+ ):
+ self.text = text
+ self.action_id = action_id
+ self.value = value
+ self.style = style
+ self.url = url
+ self.accessibility_label = accessibility_label
+ self.processing_state = processing_state
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityActionProcessingState
+(enabled: bool, interstitial_text: str | None = None, **kwargs)
+
+Expand source code
+
+
+class EntityActionProcessingState(JsonObject):
+ """Processing state configuration for entity action button"""
+
+ attributes = {
+ "enabled",
+ "interstitial_text",
+ }
+
+ def __init__(
+ self,
+ enabled: bool,
+ interstitial_text: Optional[str] = None,
+ **kwargs,
+ ):
+ self.enabled = enabled
+ self.interstitial_text = interstitial_text
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityActions
+(primary_actions: List[Dict[str, Any] | EntityActionButton] | None = None,
overflow_actions: List[Dict[str, Any] | EntityActionButton] | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityActions(JsonObject):
+ """Actions configuration for entity"""
+
+ attributes = {
+ "primary_actions",
+ "overflow_actions",
+ }
+
+ def __init__(
+ self,
+ primary_actions: Optional[List[Union[Dict[str, Any], EntityActionButton]]] = None,
+ overflow_actions: Optional[List[Union[Dict[str, Any], EntityActionButton]]] = None,
+ **kwargs,
+ ):
+ self.primary_actions = primary_actions
+ self.overflow_actions = overflow_actions
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityArrayItemField
+(type: str | None = None,
label: str | None = None,
value: str | int | None = None,
link: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
long: bool | None = None,
format: str | None = None,
image_url: str | None = None,
slack_file: Dict[str, Any] | None = None,
alt_text: str | None = None,
edit: Dict[str, Any] | EntityEditSupport | None = None,
tag_color: str | None = None,
user: Dict[str, Any] | EntityUserIDField | EntityUserField | None = None,
entity_ref: Dict[str, Any] | EntityRefField | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityArrayItemField(JsonObject):
+ """Array item field for entity (similar to EntityTypedField but with optional type)"""
+
+ attributes = {
+ "type",
+ "label",
+ "value",
+ "link",
+ "icon",
+ "long",
+ "format",
+ "image_url",
+ "slack_file",
+ "alt_text",
+ "edit",
+ "tag_color",
+ "user",
+ "entity_ref",
+ }
+
+ def __init__(
+ self,
+ type: Optional[str] = None,
+ label: Optional[str] = None,
+ value: Optional[Union[str, int]] = None,
+ link: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ long: Optional[bool] = None,
+ format: Optional[str] = None,
+ image_url: Optional[str] = None,
+ slack_file: Optional[Dict[str, Any]] = None,
+ alt_text: Optional[str] = None,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ tag_color: Optional[str] = None,
+ user: Optional[Union[Dict[str, Any], EntityUserIDField, EntityUserField]] = None,
+ entity_ref: Optional[Union[Dict[str, Any], EntityRefField]] = None,
+ **kwargs,
+ ):
+ self.type = type
+ self.label = label
+ self.value = value
+ self.link = link
+ self.icon = icon
+ self.long = long
+ self.format = format
+ self.image_url = image_url
+ self.slack_file = slack_file
+ self.alt_text = alt_text
+ self.edit = edit
+ self.tag_color = tag_color
+ self.user = user
+ self.entity_ref = entity_ref
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityAttributes
+(title: Dict[str, Any] | EntityTitle,
display_type: str | None = None,
display_id: str | None = None,
product_icon: Dict[str, Any] | EntityIconField | None = None,
product_name: str | None = None,
locale: str | None = None,
full_size_preview: Dict[str, Any] | EntityFullSizePreview | None = None,
metadata_last_modified: int | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityAttributes(JsonObject):
+ """Attributes for an entity"""
+
+ attributes = {
+ "title",
+ "display_type",
+ "display_id",
+ "product_icon",
+ "product_name",
+ "locale",
+ "full_size_preview",
+ "metadata_last_modified",
+ }
+
+ def __init__(
+ self,
+ title: Union[Dict[str, Any], EntityTitle],
+ display_type: Optional[str] = None,
+ display_id: Optional[str] = None,
+ product_icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ product_name: Optional[str] = None,
+ locale: Optional[str] = None,
+ full_size_preview: Optional[Union[Dict[str, Any], EntityFullSizePreview]] = None,
+ metadata_last_modified: Optional[int] = None,
+ **kwargs,
+ ):
+ self.title = title
+ self.display_type = display_type
+ self.display_id = display_id
+ self.product_icon = product_icon
+ self.product_name = product_name
+ self.locale = locale
+ self.full_size_preview = full_size_preview
+ self.metadata_last_modified = metadata_last_modified
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityBooleanCheckboxField
+(type: str, text: str, description: str | None, **kwargs)
+
+Expand source code
+
+
+class EntityBooleanCheckboxField(JsonObject):
+ """Boolean checkbox properties"""
+
+ attributes = {"type", "text", "description"}
+
+ def __init__(
+ self,
+ type: str,
+ text: str,
+ description: Optional[str],
+ **kwargs,
+ ):
+ self.type = type
+ self.text = text
+ self.description = description
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityBooleanTextField
+(type: str,
true_text: str,
false_text: str,
true_description: str | None,
false_description: str | None,
**kwargs)
+
+Expand source code
+
+
+class EntityBooleanTextField(JsonObject):
+ """Boolean text properties"""
+
+ attributes = {"type", "true_text", "false_text", "true_description", "false_description"}
+
+ def __init__(
+ self,
+ type: str,
+ true_text: str,
+ false_text: str,
+ true_description: Optional[str],
+ false_description: Optional[str],
+ **kwargs,
+ ):
+ self.type = type
+ self.true_text = (true_text,)
+ self.false_text = (false_text,)
+ self.true_description = (true_description,)
+ self.false_description = (false_description,)
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityCustomField
+(label: str,
key: str,
type: str,
value: str | int | List[Dict[str, Any] | EntityArrayItemField] | None = None,
link: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
long: bool | None = None,
format: str | None = None,
image_url: str | None = None,
slack_file: Dict[str, Any] | None = None,
alt_text: str | None = None,
tag_color: str | None = None,
edit: Dict[str, Any] | EntityEditSupport | None = None,
item_type: str | None = None,
user: Dict[str, Any] | EntityUserIDField | EntityUserField | None = None,
entity_ref: Dict[str, Any] | EntityRefField | None = None,
boolean: Dict[str, Any] | EntityBooleanCheckboxField | EntityBooleanTextField | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityCustomField(JsonObject):
+ """Custom field for entity with flexible types"""
+
+ attributes = {
+ "label",
+ "key",
+ "type",
+ "value",
+ "link",
+ "icon",
+ "long",
+ "format",
+ "image_url",
+ "slack_file",
+ "alt_text",
+ "tag_color",
+ "edit",
+ "item_type",
+ "user",
+ "entity_ref",
+ "boolean",
+ }
+
+ def __init__(
+ self,
+ label: str,
+ key: str,
+ type: str,
+ value: Optional[Union[str, int, List[Union[Dict[str, Any], EntityArrayItemField]]]] = None,
+ link: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ long: Optional[bool] = None,
+ format: Optional[str] = None,
+ image_url: Optional[str] = None,
+ slack_file: Optional[Dict[str, Any]] = None,
+ alt_text: Optional[str] = None,
+ tag_color: Optional[str] = None,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ item_type: Optional[str] = None,
+ user: Optional[Union[Dict[str, Any], EntityUserIDField, EntityUserField]] = None,
+ entity_ref: Optional[Union[Dict[str, Any], EntityRefField]] = None,
+ boolean: Optional[Union[Dict[str, Any], EntityBooleanCheckboxField, EntityBooleanTextField]] = None,
+ **kwargs,
+ ):
+ self.label = label
+ self.key = key
+ self.type = type
+ self.value = value
+ self.link = link
+ self.icon = icon
+ self.long = long
+ self.format = format
+ self.image_url = image_url
+ self.slack_file = slack_file
+ self.alt_text = alt_text
+ self.tag_color = tag_color
+ self.edit = edit
+ self.item_type = item_type
+ self.user = user
+ self.entity_ref = entity_ref
+ self.boolean = boolean
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()
+
+ @EnumValidator("type", CustomFieldType)
+ def type_valid(self):
+ return self.type is None or self.type in CustomFieldTypeAncestors
+
+
+Class variables
+
+
+var attributesMethods
+
+
+
+def type_valid(self)
+
+Expand source code
+
+
+@EnumValidator("type", CustomFieldType)
+def type_valid(self):
+ return self.type is None or self.type in CustomFieldTypeInherited members
+
+
+JsonObject:
+
+
+class EntityEditNumberConfig
+(is_decimal_allowed: bool | None = None,
min_value: int | float | None = None,
max_value: int | float | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityEditNumberConfig(JsonObject):
+ """Number configuration for entity edit support"""
+
+ attributes = {
+ "is_decimal_allowed",
+ "min_value",
+ "max_value",
+ }
+
+ def __init__(
+ self,
+ is_decimal_allowed: Optional[bool] = None,
+ min_value: Optional[Union[int, float]] = None,
+ max_value: Optional[Union[int, float]] = None,
+ **kwargs,
+ ):
+ self.is_decimal_allowed = is_decimal_allowed
+ self.min_value = min_value
+ self.max_value = max_value
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityEditSelectConfig
+(current_value: str | None = None,
current_values: List[str] | None = None,
static_options: List[Dict[str, Any]] | None = None,
fetch_options_dynamically: bool | None = None,
min_query_length: int | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityEditSelectConfig(JsonObject):
+ """Select configuration for entity edit support"""
+
+ attributes = {
+ "current_value",
+ "current_values",
+ "static_options",
+ "fetch_options_dynamically",
+ "min_query_length",
+ }
+
+ def __init__(
+ self,
+ current_value: Optional[str] = None,
+ current_values: Optional[List[str]] = None,
+ static_options: Optional[List[Dict[str, Any]]] = None, # Option[]
+ fetch_options_dynamically: Optional[bool] = None,
+ min_query_length: Optional[int] = None,
+ **kwargs,
+ ):
+ self.current_value = current_value
+ self.current_values = current_values
+ self.static_options = static_options
+ self.fetch_options_dynamically = fetch_options_dynamically
+ self.min_query_length = min_query_length
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityEditSupport
+(enabled: bool,
placeholder: Dict[str, Any] | None = None,
hint: Dict[str, Any] | None = None,
optional: bool | None = None,
select: Dict[str, Any] | EntityEditSelectConfig | None = None,
number: Dict[str, Any] | EntityEditNumberConfig | None = None,
text: Dict[str, Any] | EntityEditTextConfig | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityEditSupport(JsonObject):
+ """Edit support configuration for entity fields"""
+
+ attributes = {
+ "enabled",
+ "placeholder",
+ "hint",
+ "optional",
+ "select",
+ "number",
+ "text",
+ }
+
+ def __init__(
+ self,
+ enabled: bool,
+ placeholder: Optional[Dict[str, Any]] = None, # PlainTextElement
+ hint: Optional[Dict[str, Any]] = None, # PlainTextElement
+ optional: Optional[bool] = None,
+ select: Optional[Union[Dict[str, Any], EntityEditSelectConfig]] = None,
+ number: Optional[Union[Dict[str, Any], EntityEditNumberConfig]] = None,
+ text: Optional[Union[Dict[str, Any], EntityEditTextConfig]] = None,
+ **kwargs,
+ ):
+ self.enabled = enabled
+ self.placeholder = placeholder
+ self.hint = hint
+ self.optional = optional
+ self.select = select
+ self.number = number
+ self.text = text
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityEditTextConfig
+(min_length: int | None = None, max_length: int | None = None, **kwargs)
+
+Expand source code
+
+
+class EntityEditTextConfig(JsonObject):
+ """Text configuration for entity edit support"""
+
+ attributes = {
+ "min_length",
+ "max_length",
+ }
+
+ def __init__(
+ self,
+ min_length: Optional[int] = None,
+ max_length: Optional[int] = None,
+ **kwargs,
+ ):
+ self.min_length = min_length
+ self.max_length = max_length
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityFullSizePreview
+(is_supported: bool,
preview_url: str | None = None,
mime_type: str | None = None,
error: Dict[str, Any] | EntityFullSizePreviewError | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityFullSizePreview(JsonObject):
+ """Full-size preview configuration for entity"""
+
+ attributes = {
+ "is_supported",
+ "preview_url",
+ "mime_type",
+ "error",
+ }
+
+ def __init__(
+ self,
+ is_supported: bool,
+ preview_url: Optional[str] = None,
+ mime_type: Optional[str] = None,
+ error: Optional[Union[Dict[str, Any], EntityFullSizePreviewError]] = None,
+ **kwargs,
+ ):
+ self.is_supported = is_supported
+ self.preview_url = preview_url
+ self.mime_type = mime_type
+ self.error = error
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityFullSizePreviewError
+(code: str, message: str | None = None, **kwargs)
+
+Expand source code
+
+
+class EntityFullSizePreviewError(JsonObject):
+ """Error information for full-size preview"""
+
+ attributes = {
+ "code",
+ "message",
+ }
+
+ def __init__(
+ self,
+ code: str,
+ message: Optional[str] = None,
+ **kwargs,
+ ):
+ self.code = code
+ self.message = message
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityIconField
+(alt_text: str,
url: str | None = None,
slack_file: Dict[str, Any] | EntityIconSlackFile | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityIconField(JsonObject):
+ """Icon field for entity attributes"""
+
+ attributes = {
+ "alt_text",
+ "url",
+ "slack_file",
+ }
+
+ def __init__(
+ self,
+ alt_text: str,
+ url: Optional[str] = None,
+ slack_file: Optional[Union[Dict[str, Any], EntityIconSlackFile]] = None,
+ **kwargs,
+ ):
+ self.alt_text = alt_text
+ self.url = url
+ self.slack_file = slack_file
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityIconSlackFile
+(id: str | None = None, url: str | None = None, **kwargs)
+
+Expand source code
+
+
+class EntityIconSlackFile(JsonObject):
+ """Slack file reference for entity icon"""
+
+ attributes = {
+ "id",
+ "url",
+ }
+
+ def __init__(
+ self,
+ id: Optional[str] = None,
+ url: Optional[str] = None,
+ **kwargs,
+ ):
+ self.id = id
+ self.url = url
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityImageField
+(alt_text: str,
label: str | None = None,
image_url: str | None = None,
slack_file: Dict[str, Any] | None = None,
title: str | None = None,
type: str | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityImageField(JsonObject):
+ """Image field for entity"""
+
+ attributes = {
+ "alt_text",
+ "label",
+ "image_url",
+ "slack_file",
+ "title",
+ "type",
+ }
+
+ def __init__(
+ self,
+ alt_text: str,
+ label: Optional[str] = None,
+ image_url: Optional[str] = None,
+ slack_file: Optional[Dict[str, Any]] = None,
+ title: Optional[str] = None,
+ type: Optional[str] = None,
+ **kwargs,
+ ):
+ self.alt_text = alt_text
+ self.label = label
+ self.image_url = image_url
+ self.slack_file = slack_file
+ self.title = title
+ self.type = type
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityMetadata
+(entity_type: str,
entity_payload: Dict[str, Any] | EntityPayload,
external_ref: Dict[str, Any] | ExternalRef,
url: str,
app_unfurl_url: str | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityMetadata(JsonObject):
+ """Work object entity metadata
+
+ https://docs.slack.dev/messaging/work-objects/
+ """
+
+ attributes = {
+ "entity_type",
+ "entity_payload",
+ "external_ref",
+ "url",
+ "app_unfurl_url",
+ }
+
+ def __init__(
+ self,
+ entity_type: str,
+ entity_payload: Union[Dict[str, Any], EntityPayload],
+ external_ref: Union[Dict[str, Any], ExternalRef],
+ url: str,
+ app_unfurl_url: Optional[str] = None,
+ **kwargs,
+ ):
+ self.entity_type = entity_type
+ self.entity_payload = entity_payload
+ self.external_ref = external_ref
+ self.url = url
+ self.app_unfurl_url = app_unfurl_url
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()
+
+ @EnumValidator("entity_type", EntityType)
+ def entity_type_valid(self):
+ return self.entity_type is None or self.entity_type in EntityTypeAncestors
+
+
+Class variables
+
+
+var attributesMethods
+
+
+
+def entity_type_valid(self)
+
+Expand source code
+
+
+@EnumValidator("entity_type", EntityType)
+def entity_type_valid(self):
+ return self.entity_type is None or self.entity_type in EntityTypeInherited members
+
+
+JsonObject:
+
+
+class EntityPayload
+(attributes: Dict[str, Any] | EntityAttributes,
fields: Dict[str, Any] | ContentItemEntityFields | FileEntityFields | IncidentEntityFields | TaskEntityFields | None = None,
custom_fields: List[Dict[str, Any] | EntityCustomField] | None = None,
slack_file: Dict[str, Any] | FileEntitySlackFile | None = None,
display_order: List[str] | None = None,
actions: Dict[str, Any] | EntityActions | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityPayload(JsonObject):
+ """Payload schema for an entity"""
+
+ attributes = {
+ "attributes",
+ "fields",
+ "custom_fields",
+ "slack_file",
+ "display_order",
+ "actions",
+ }
+
+ def __init__(
+ self,
+ attributes: Union[Dict[str, Any], EntityAttributes],
+ fields: Optional[
+ Union[Dict[str, Any], ContentItemEntityFields, FileEntityFields, IncidentEntityFields, TaskEntityFields]
+ ] = None,
+ custom_fields: Optional[List[Union[Dict[str, Any], EntityCustomField]]] = None,
+ slack_file: Optional[Union[Dict[str, Any], FileEntitySlackFile]] = None,
+ display_order: Optional[List[str]] = None,
+ actions: Optional[Union[Dict[str, Any], EntityActions]] = None,
+ **kwargs,
+ ):
+ # Store entity attributes data with a different internal name to avoid
+ # shadowing the class-level 'attributes' set used for JSON serialization
+ self._entity_attributes = attributes
+ self.fields = fields
+ self.custom_fields = custom_fields
+ self.slack_file = slack_file
+ self.display_order = display_order
+ self.actions = actions
+ self.additional_attributes = kwargs
+
+ @property
+ def entity_attributes(self) -> Union[Dict[str, Any], EntityAttributes]:
+ """Get the entity attributes data.
+
+ Note: Use this property to access the attributes data. The class-level
+ 'attributes' is reserved for the JSON serialization schema.
+ """
+ return self._entity_attributes
+
+ @entity_attributes.setter
+ def entity_attributes(self, value: Union[Dict[str, Any], EntityAttributes]):
+ """Set the entity attributes data."""
+ self._entity_attributes = value
+
+ def get_object_attribute(self, key: str):
+ if key == "attributes":
+ return self._entity_attributes
+ else:
+ return getattr(self, key, None)
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInstance variables
+
+
+prop entity_attributes : Dict[str, Any] | EntityAttributes
+Expand source code
+
+
+@property
+def entity_attributes(self) -> Union[Dict[str, Any], EntityAttributes]:
+ """Get the entity attributes data.
+
+ Note: Use this property to access the attributes data. The class-level
+ 'attributes' is reserved for the JSON serialization schema.
+ """
+ return self._entity_attributesMethods
+
+
+
+def get_object_attribute(self, key: str)
+
+Expand source code
+
+
+def get_object_attribute(self, key: str):
+ if key == "attributes":
+ return self._entity_attributes
+ else:
+ return getattr(self, key, None)Inherited members
+
+
+JsonObject:
+
+
+class EntityRefField
+(entity_url: str,
external_ref: Dict[str, Any] | ExternalRef,
title: str,
display_type: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityRefField(JsonObject):
+ """Entity reference field"""
+
+ attributes = {
+ "entity_url",
+ "external_ref",
+ "title",
+ "display_type",
+ "icon",
+ }
+
+ def __init__(
+ self,
+ entity_url: str,
+ external_ref: Union[Dict[str, Any], ExternalRef],
+ title: str,
+ display_type: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ **kwargs,
+ ):
+ self.entity_url = entity_url
+ self.external_ref = external_ref
+ self.title = title
+ self.display_type = display_type
+ self.icon = icon
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityStringField
+(value: str,
label: str | None = None,
format: str | None = None,
link: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
long: bool | None = None,
type: str | None = None,
tag_color: str | None = None,
edit: Dict[str, Any] | EntityEditSupport | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityStringField(JsonObject):
+ """String field for entity"""
+
+ attributes = {
+ "value",
+ "label",
+ "format",
+ "link",
+ "icon",
+ "long",
+ "type",
+ "tag_color",
+ "edit",
+ }
+
+ def __init__(
+ self,
+ value: str,
+ label: Optional[str] = None,
+ format: Optional[str] = None,
+ link: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ long: Optional[bool] = None,
+ type: Optional[str] = None,
+ tag_color: Optional[str] = None,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ **kwargs,
+ ):
+ self.value = value
+ self.label = label
+ self.format = format
+ self.link = link
+ self.icon = icon
+ self.long = long
+ self.type = type
+ self.tag_color = tag_color
+ self.edit = edit
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityTimestampField
+(value: int,
label: str | None = None,
type: str | None = None,
edit: Dict[str, Any] | EntityEditSupport | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityTimestampField(JsonObject):
+ """Timestamp field for entity"""
+
+ attributes = {
+ "value",
+ "label",
+ "type",
+ "edit",
+ }
+
+ def __init__(
+ self,
+ value: int,
+ label: Optional[str] = None,
+ type: Optional[str] = None,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ **kwargs,
+ ):
+ self.value = value
+ self.label = label
+ self.type = type
+ self.edit = edit
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityTitle
+(text: str,
edit: Dict[str, Any] | EntityEditSupport | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityTitle(JsonObject):
+ """Title for entity attributes"""
+
+ attributes = {
+ "text",
+ "edit",
+ }
+
+ def __init__(
+ self,
+ text: str,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ **kwargs,
+ ):
+ self.text = text
+ self.edit = edit
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityTypedField
+(type: str,
label: str | None = None,
value: str | int | None = None,
link: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
long: bool | None = None,
format: str | None = None,
image_url: str | None = None,
slack_file: Dict[str, Any] | None = None,
alt_text: str | None = None,
edit: Dict[str, Any] | EntityEditSupport | None = None,
tag_color: str | None = None,
user: Dict[str, Any] | EntityUserIDField | EntityUserField | None = None,
entity_ref: Dict[str, Any] | EntityRefField | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityTypedField(JsonObject):
+ """Typed field for entity with various display options"""
+
+ attributes = {
+ "type",
+ "label",
+ "value",
+ "link",
+ "icon",
+ "long",
+ "format",
+ "image_url",
+ "slack_file",
+ "alt_text",
+ "edit",
+ "tag_color",
+ "user",
+ "entity_ref",
+ }
+
+ def __init__(
+ self,
+ type: str,
+ label: Optional[str] = None,
+ value: Optional[Union[str, int]] = None,
+ link: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ long: Optional[bool] = None,
+ format: Optional[str] = None,
+ image_url: Optional[str] = None,
+ slack_file: Optional[Dict[str, Any]] = None,
+ alt_text: Optional[str] = None,
+ edit: Optional[Union[Dict[str, Any], EntityEditSupport]] = None,
+ tag_color: Optional[str] = None,
+ user: Optional[Union[Dict[str, Any], EntityUserIDField, EntityUserField]] = None,
+ entity_ref: Optional[Union[Dict[str, Any], EntityRefField]] = None,
+ **kwargs,
+ ):
+ self.type = type
+ self.label = label
+ self.value = value
+ self.link = link
+ self.icon = icon
+ self.long = long
+ self.format = format
+ self.image_url = image_url
+ self.slack_file = slack_file
+ self.alt_text = alt_text
+ self.edit = edit
+ self.tag_color = tag_color
+ self.user = user
+ self.entity_ref = entity_ref
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityUserField
+(text: str,
url: str | None = None,
email: str | None = None,
icon: Dict[str, Any] | EntityIconField | None = None,
**kwargs)
+
+Expand source code
+
+
+class EntityUserField(JsonObject):
+ """User field for entity"""
+
+ attributes = {
+ "text",
+ "url",
+ "email",
+ "icon",
+ }
+
+ def __init__(
+ self,
+ text: str,
+ url: Optional[str] = None,
+ email: Optional[str] = None,
+ icon: Optional[Union[Dict[str, Any], EntityIconField]] = None,
+ **kwargs,
+ ):
+ self.text = text
+ self.url = url
+ self.email = email
+ self.icon = icon
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EntityUserIDField
+(user_id: str, **kwargs)
+
+Expand source code
+
+
+class EntityUserIDField(JsonObject):
+ """User ID field for entity"""
+
+ attributes = {
+ "user_id",
+ }
+
+ def __init__(
+ self,
+ user_id: str,
+ **kwargs,
+ ):
+ self.user_id = user_id
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class EventAndEntityMetadata
+(event_type: str | None = None,
event_payload: Dict[str, Any] | None = None,
entities: List[Dict[str, Any] | EntityMetadata] | None = None,
**kwargs)
+
+Expand source code
+
+
+class EventAndEntityMetadata(JsonObject):
+ """Message metadata with entities
+
+ https://docs.slack.dev/messaging/message-metadata/
+ https://docs.slack.dev/messaging/work-objects/
+ """
+
+ attributes = {"event_type", "event_payload", "entities"}
+
+ def __init__(
+ self,
+ event_type: Optional[str] = None,
+ event_payload: Optional[Dict[str, Any]] = None,
+ entities: Optional[List[Union[Dict[str, Any], EntityMetadata]]] = None,
+ **kwargs,
+ ):
+ self.event_type = event_type
+ self.event_payload = event_payload
+ self.entities = entities
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class ExternalRef
+(id: str, type: str | None = None, **kwargs)
+
+Expand source code
+
+
+class ExternalRef(JsonObject):
+ """Reference (and optional type) used to identify an entity within the developer's system"""
+
+ attributes = {
+ "id",
+ "type",
+ }
+
+ def __init__(
+ self,
+ id: str,
+ type: Optional[str] = None,
+ **kwargs,
+ ):
+ self.id = id
+ self.type = type
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class FileEntityFields
+(preview: Dict[str, Any] | EntityImageField | None = None,
created_by: Dict[str, Any] | EntityTypedField | None = None,
date_created: Dict[str, Any] | EntityTimestampField | None = None,
date_updated: Dict[str, Any] | EntityTimestampField | None = None,
last_modified_by: Dict[str, Any] | EntityTypedField | None = None,
file_size: Dict[str, Any] | EntityStringField | None = None,
mime_type: Dict[str, Any] | EntityStringField | None = None,
full_size_preview: Dict[str, Any] | EntityFullSizePreview | None = None,
**kwargs)
+
+Expand source code
+
+
+class FileEntityFields(JsonObject):
+ """Fields specific to file entities"""
+
+ attributes = {
+ "preview",
+ "created_by",
+ "date_created",
+ "date_updated",
+ "last_modified_by",
+ "file_size",
+ "mime_type",
+ "full_size_preview",
+ }
+
+ def __init__(
+ self,
+ preview: Optional[Union[Dict[str, Any], EntityImageField]] = None,
+ created_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ date_created: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ date_updated: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ last_modified_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ file_size: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ mime_type: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ full_size_preview: Optional[Union[Dict[str, Any], EntityFullSizePreview]] = None,
+ **kwargs,
+ ):
+ self.preview = preview
+ self.created_by = created_by
+ self.date_created = date_created
+ self.date_updated = date_updated
+ self.last_modified_by = last_modified_by
+ self.file_size = file_size
+ self.mime_type = mime_type
+ self.full_size_preview = full_size_preview
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class FileEntitySlackFile
+(id: str, type: str | None = None, **kwargs)
+
+Expand source code
+
+
+class FileEntitySlackFile(JsonObject):
+ """Slack file reference for file entities"""
+
+ attributes = {
+ "id",
+ "type",
+ }
+
+ def __init__(
+ self,
+ id: str,
+ type: Optional[str] = None,
+ **kwargs,
+ ):
+ self.id = id
+ self.type = type
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
+class IncidentEntityFields
+(status: Dict[str, Any] | EntityStringField | None = None,
priority: Dict[str, Any] | EntityStringField | None = None,
urgency: Dict[str, Any] | EntityStringField | None = None,
created_by: Dict[str, Any] | EntityTypedField | None = None,
assigned_to: Dict[str, Any] | EntityTypedField | None = None,
date_created: Dict[str, Any] | EntityTimestampField | None = None,
date_updated: Dict[str, Any] | EntityTimestampField | None = None,
description: Dict[str, Any] | EntityStringField | None = None,
service: Dict[str, Any] | EntityStringField | None = None,
**kwargs)
+
+Expand source code
+
+
+class IncidentEntityFields(JsonObject):
+ """Fields specific to incident entities"""
+
+ attributes = {
+ "status",
+ "priority",
+ "urgency",
+ "created_by",
+ "assigned_to",
+ "date_created",
+ "date_updated",
+ "description",
+ "service",
+ }
+
+ def __init__(
+ self,
+ status: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ priority: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ urgency: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ created_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ assigned_to: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ date_created: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ date_updated: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ description: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ service: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ **kwargs,
+ ):
+ self.status = status
+ self.priority = priority
+ self.urgency = urgency
+ self.created_by = created_by
+ self.assigned_to = assigned_to
+ self.date_created = date_created
+ self.date_updated = date_updated
+ self.description = description
+ self.service = service
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+
class Metadata
(event_type: str, event_payload: Dict[str, Any], **kwargs)
@@ -107,6 +2365,81 @@ Inherited members
+
+class TaskEntityFields
+(description: Dict[str, Any] | EntityStringField | None = None,
created_by: Dict[str, Any] | EntityTypedField | None = None,
date_created: Dict[str, Any] | EntityTimestampField | None = None,
date_updated: Dict[str, Any] | EntityTimestampField | None = None,
assignee: Dict[str, Any] | EntityTypedField | None = None,
status: Dict[str, Any] | EntityStringField | None = None,
due_date: Dict[str, Any] | EntityTypedField | None = None,
priority: Dict[str, Any] | EntityStringField | None = None,
**kwargs)
+
+Expand source code
+
+
+class TaskEntityFields(JsonObject):
+ """Fields specific to task entities"""
+
+ attributes = {
+ "description",
+ "created_by",
+ "date_created",
+ "date_updated",
+ "assignee",
+ "status",
+ "due_date",
+ "priority",
+ }
+
+ def __init__(
+ self,
+ description: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ created_by: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ date_created: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ date_updated: Optional[Union[Dict[str, Any], EntityTimestampField]] = None,
+ assignee: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ status: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ due_date: Optional[Union[Dict[str, Any], EntityTypedField]] = None,
+ priority: Optional[Union[Dict[str, Any], EntityStringField]] = None,
+ **kwargs,
+ ):
+ self.description = description
+ self.created_by = created_by
+ self.date_created = date_created
+ self.date_updated = date_updated
+ self.assignee = assignee
+ self.status = status
+ self.due_date = due_date
+ self.priority = priority
+ self.additional_attributes = kwargs
+
+ def __str__(self):
+ return str(self.get_non_null_attributes())
+
+ def __repr__(self):
+ return self.__str__()Ancestors
+
+
+Class variables
+
+
+var attributesInherited members
+
+
+JsonObject:
+
+Inherited members
slack_sdk.modelsGlobal variables
+
+
+EntityTypeClasses
+ContentItemEntityFields
+
+attributes
+EntityActionButton
+
+attributes
+EntityActionProcessingState
+
+attributes
+EntityActions
+
+attributes
+EntityArrayItemField
+
+attributes
+EntityAttributes
+
+attributes
+EntityBooleanCheckboxField
+
+attributes
+EntityBooleanTextField
+
+attributes
+EntityCustomField
+
+attributestype_valid
+EntityEditNumberConfig
+
+attributes
+EntityEditSelectConfig
+
+attributes
+EntityEditSupport
+
+attributes
+EntityEditTextConfig
+
+attributes
+EntityFullSizePreview
+
+attributes
+EntityFullSizePreviewError
+
+attributes
+EntityIconField
+
+attributes
+EntityIconSlackFile
+
+attributes
+EntityImageField
+
+attributes
+
+EntityMetadata
+
+EntityPayload
+EntityRefField
+
+attributes
+EntityStringField
+
+attributes
+EntityTimestampField
+
+attributes
+EntityTitle
+
+attributes
+EntityTypedField
+
+attributes
+EntityUserField
+
+attributes
+EntityUserIDField
+
+attributes
+EventAndEntityMetadata
+
+attributes
+ExternalRef
+
+attributes
+FileEntityFields
+
+attributes
+FileEntitySlackFile
+
+attributes
+IncidentEntityFields
+
+attributesMetadata
+TaskEntityFields
+
+attributesClasses
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> AsyncSlackResponse:
@@ -3019,6 +3019,7 @@ Classes
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -3035,6 +3036,7 @@ Classes
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -3666,6 +3668,30 @@ Classes
kwargs.update({"include_categories": include_categories})
return await self.api_call("emoji.list", http_verb="GET", params=kwargs)
+ async def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return await self.api_call("entity.presentDetails", json=kwargs)
+
async def files_comments_delete(
self,
*,
@@ -4920,6 +4946,249 @@ Classes
)
return await self.api_call("search.messages", http_verb="GET", params=kwargs)
+ async def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.access.delete", json=kwargs)
+
+ async def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.access.set", json=kwargs)
+
+ async def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.create", json=kwargs)
+
+ async def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.download.get", json=kwargs)
+
+ async def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.download.start", json=kwargs)
+
+ async def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.create", json=kwargs)
+
+ async def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.delete", json=kwargs)
+
+ async def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+
+ async def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.info", json=kwargs)
+
+ async def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.list", json=kwargs)
+
+ async def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.update", json=kwargs)
+
+ async def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> AsyncSlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.update", json=kwargs)
+
async def stars_add(
self,
*,
@@ -10066,7 +10335,7 @@ Methods
https://docs.slack.dev/reference/methods/chat.postEphemeral
-async def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> AsyncSlackResponse
+async def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | EventAndEntityMetadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> AsyncSlackResponse
Methods
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> AsyncSlackResponse:
@@ -10414,7 +10683,7 @@ Example
-async def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> AsyncSlackResponse
+async def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
metadata: Dict | EventAndEntityMetadata | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> AsyncSlackResponse
Example
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -10445,6 +10715,7 @@ Example
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -11476,6 +11747,41 @@ Example
+async def entity_presentDetails(self,
trigger_id: str,
metadata: Dict | EntityMetadata | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
error: Dict[str, Any] | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return await self.api_call("entity.presentDetails", json=kwargs)
async def files_comments_delete(self, *, file: str, id: str, **kwargs) ‑> AsyncSlackResponse
Example
+async def slackLists_access_delete(self,
*,
list_id: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.access.delete", json=kwargs)
+async def slackLists_access_set(self,
*,
list_id: str,
access_level: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.access.set", json=kwargs)
+async def slackLists_create(self,
*,
name: str,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
schema: List[Dict[str, Any]] | None = None,
copy_from_list_id: str | None = None,
include_copied_list_records: bool | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.create", json=kwargs)
+async def slackLists_download_get(self, *, list_id: str, job_id: str, **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.download.get", json=kwargs)
+async def slackLists_download_start(self, *, list_id: str, include_archived: bool | None = None, **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.download.start", json=kwargs)
+async def slackLists_items_create(self,
*,
list_id: str,
duplicated_item_id: str | None = None,
parent_item_id: str | None = None,
initial_fields: List[Dict[str, Any]] | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.create", json=kwargs)
+async def slackLists_items_delete(self, *, list_id: str, id: str, **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.delete", json=kwargs)
+async def slackLists_items_deleteMultiple(self, *, list_id: str, ids: List[str], **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+async def slackLists_items_info(self, *, list_id: str, id: str, include_is_subscribed: bool | None = None, **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.info", json=kwargs)
+async def slackLists_items_list(self,
*,
list_id: str,
limit: int | None = None,
cursor: str | None = None,
archived: bool | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.list", json=kwargs)
+async def slackLists_items_update(self, *, list_id: str, cells: List[Dict[str, Any]], **kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.items.update", json=kwargs)
+async def slackLists_update(self,
*,
id: str,
name: str | None = None,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> AsyncSlackResponse
+
+Expand source code
+
+
+async def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> AsyncSlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return await self.api_call("slackLists.update", json=kwargs)
async def stars_add(self,
*,
channel: str | None = None,
file: str | None = None,
file_comment: str | None = None,
timestamp: str | None = None,
**kwargs) ‑> AsyncSlackResponse
dnd_setSnooze
dnd_teamInfoemoji_listentity_presentDetailsfiles_comments_deletefiles_completeUploadExternalfiles_deletesearch_all
search_filessearch_messagesslackLists_access_deleteslackLists_access_setslackLists_createslackLists_download_getslackLists_download_startslackLists_items_createslackLists_items_deleteslackLists_items_deleteMultipleslackLists_items_infoslackLists_items_listslackLists_items_updateslackLists_updatestars_addstars_liststars_removeClasses
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -3019,6 +3019,7 @@ Classes
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -3035,6 +3036,7 @@ Classes
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -3666,6 +3668,30 @@ Classes
kwargs.update({"include_categories": include_categories})
return self.api_call("emoji.list", http_verb="GET", params=kwargs)
+ def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
+
def files_comments_delete(
self,
*,
@@ -4920,6 +4946,249 @@ Classes
)
return self.api_call("search.messages", http_verb="GET", params=kwargs)
+ def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+
+ def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+
+ def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+
+ def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+
+ def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+
+ def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+
+ def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+
+ def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+
+ def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+
+ def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+
+ def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+ ) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+
+ def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
+
def stars_add(
self,
*,
@@ -10066,7 +10335,7 @@ Methods
https://docs.slack.dev/reference/methods/chat.postEphemeral
-def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | EventAndEntityMetadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
Methods
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -10414,7 +10683,7 @@ Example
-def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
metadata: Dict | EventAndEntityMetadata | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
Example
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -10445,6 +10715,7 @@ Example
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -11476,6 +11747,41 @@ Example
+def entity_presentDetails(self,
trigger_id: str,
metadata: Dict | EntityMetadata | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
error: Dict[str, Any] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
def files_comments_delete(self, *, file: str, id: str, **kwargs) ‑> SlackResponse
Example
+def slackLists_access_delete(self,
*,
list_id: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+def slackLists_access_set(self,
*,
list_id: str,
access_level: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+def slackLists_create(self,
*,
name: str,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
schema: List[Dict[str, Any]] | None = None,
copy_from_list_id: str | None = None,
include_copied_list_records: bool | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+def slackLists_download_get(self, *, list_id: str, job_id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+def slackLists_download_start(self, *, list_id: str, include_archived: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+def slackLists_items_create(self,
*,
list_id: str,
duplicated_item_id: str | None = None,
parent_item_id: str | None = None,
initial_fields: List[Dict[str, Any]] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+def slackLists_items_delete(self, *, list_id: str, id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+def slackLists_items_deleteMultiple(self, *, list_id: str, ids: List[str], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+def slackLists_items_info(self, *, list_id: str, id: str, include_is_subscribed: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+def slackLists_items_list(self,
*,
list_id: str,
limit: int | None = None,
cursor: str | None = None,
archived: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+def slackLists_items_update(self, *, list_id: str, cells: List[Dict[str, Any]], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+def slackLists_update(self,
*,
id: str,
name: str | None = None,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
def stars_add(self,
*,
channel: str | None = None,
file: str | None = None,
file_comment: str | None = None,
timestamp: str | None = None,
**kwargs) ‑> SlackResponse
dnd_setSnooze
dnd_teamInfoemoji_listentity_presentDetailsfiles_comments_deletefiles_completeUploadExternalfiles_deletesearch_all
search_filessearch_messagesslackLists_access_deleteslackLists_access_setslackLists_createslackLists_download_getslackLists_download_startslackLists_items_createslackLists_items_deleteslackLists_items_deleteMultipleslackLists_items_infoslackLists_items_listslackLists_items_updateslackLists_updatestars_addstars_liststars_removeRaises
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -3388,6 +3388,7 @@ Raises
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -3404,6 +3405,7 @@ Raises
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -4035,6 +4037,30 @@ Raises
kwargs.update({"include_categories": include_categories})
return self.api_call("emoji.list", http_verb="GET", params=kwargs)
+ def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
+
def files_comments_delete(
self,
*,
@@ -5289,6 +5315,249 @@ Raises
)
return self.api_call("search.messages", http_verb="GET", params=kwargs)
+ def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+
+ def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+
+ def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+
+ def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+
+ def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+
+ def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+
+ def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+
+ def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+ ) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+
+ def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+
+ def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+
+ def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+ ) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+
+ def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
+
def stars_add(
self,
*,
@@ -10435,7 +10704,7 @@ Methods
https://docs.slack.dev/reference/methods/chat.postEphemeral
-def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | EventAndEntityMetadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> SlackResponse
Methods
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> SlackResponse:
@@ -10783,7 +11052,7 @@ Example
-def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
+def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
metadata: Dict | EventAndEntityMetadata | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> SlackResponse
Example
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -10814,6 +11084,7 @@ Example
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -11845,6 +12116,41 @@ Example
+def entity_presentDetails(self,
trigger_id: str,
metadata: Dict | EntityMetadata | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
error: Dict[str, Any] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
def files_comments_delete(self, *, file: str, id: str, **kwargs) ‑> SlackResponse
Example
+def slackLists_access_delete(self,
*,
list_id: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+def slackLists_access_set(self,
*,
list_id: str,
access_level: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+def slackLists_create(self,
*,
name: str,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
schema: List[Dict[str, Any]] | None = None,
copy_from_list_id: str | None = None,
include_copied_list_records: bool | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+def slackLists_download_get(self, *, list_id: str, job_id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+def slackLists_download_start(self, *, list_id: str, include_archived: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+def slackLists_items_create(self,
*,
list_id: str,
duplicated_item_id: str | None = None,
parent_item_id: str | None = None,
initial_fields: List[Dict[str, Any]] | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+def slackLists_items_delete(self, *, list_id: str, id: str, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+) -> SlackResponse:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+def slackLists_items_deleteMultiple(self, *, list_id: str, ids: List[str], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+) -> SlackResponse:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+def slackLists_items_info(self, *, list_id: str, id: str, include_is_subscribed: bool | None = None, **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+def slackLists_items_list(self,
*,
list_id: str,
limit: int | None = None,
cursor: str | None = None,
archived: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+def slackLists_items_update(self, *, list_id: str, cells: List[Dict[str, Any]], **kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+) -> SlackResponse:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+def slackLists_update(self,
*,
id: str,
name: str | None = None,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> SlackResponse
+
+Expand source code
+
+
+def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> SlackResponse:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
def stars_add(self,
*,
channel: str | None = None,
file: str | None = None,
file_comment: str | None = None,
timestamp: str | None = None,
**kwargs) ‑> SlackResponse
Web
dnd_setSnoozednd_teamInfoemoji_listentity_presentDetailsfiles_comments_deletefiles_completeUploadExternalfiles_deleteWeb
search_allsearch_filessearch_messagesslackLists_access_deleteslackLists_access_setslackLists_createslackLists_download_getslackLists_download_startslackLists_items_createslackLists_items_deleteslackLists_items_deleteMultipleslackLists_items_infoslackLists_items_listslackLists_items_updateslackLists_updatestars_addstars_liststars_removeClasses
link_names: Optional[bool] = None,
username: Optional[str] = None,
parse: Optional[str] = None, # none, full
- metadata: Optional[Union[Dict, Metadata]] = None,
+ metadata: Optional[Union[Dict, Metadata, EventAndEntityMetadata]] = None,
markdown_text: Optional[str] = None,
**kwargs,
) -> Union[Future, SlackResponse]:
@@ -2955,6 +2955,7 @@ Classes
source: Optional[str] = None,
unfurl_id: Optional[str] = None,
unfurls: Optional[Dict[str, Dict]] = None, # or user_auth_*
+ metadata: Optional[Union[Dict, EventAndEntityMetadata]] = None,
user_auth_blocks: Optional[Union[str, Sequence[Union[Dict, Block]]]] = None,
user_auth_message: Optional[str] = None,
user_auth_required: Optional[bool] = None,
@@ -2971,6 +2972,7 @@ Classes
"source": source,
"unfurl_id": unfurl_id,
"unfurls": unfurls,
+ "metadata": metadata,
"user_auth_blocks": user_auth_blocks,
"user_auth_message": user_auth_message,
"user_auth_required": user_auth_required,
@@ -3602,6 +3604,30 @@ Classes
kwargs.update({"include_categories": include_categories})
return self.api_call("emoji.list", http_verb="GET", params=kwargs)
+ def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
+
def files_comments_delete(
self,
*,
@@ -4856,6 +4882,249 @@ Classes
)
return self.api_call("search.messages", http_verb="GET", params=kwargs)
+ def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+
+ def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+
+ def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+
+ def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+
+ def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+
+ def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+
+ def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+
+ def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+
+ def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+
+ def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+
+ def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+
+ def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+ ) -> Union[Future, SlackResponse]:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
+
def stars_add(
self,
*,
@@ -10002,7 +10271,7 @@ Methods
https://docs.slack.dev/reference/methods/chat.postEphemeral
-def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def chat_postMessage(self,
*,
channel: str,
text: str | None = None,
as_user: bool | None = None,
attachments: str | Sequence[Dict | Attachment] | None = None,
blocks: str | Sequence[Dict | Block] | None = None,
thread_ts: str | None = None,
reply_broadcast: bool | None = None,
unfurl_links: bool | None = None,
unfurl_media: bool | None = None,
container_id: str | None = None,
icon_emoji: str | None = None,
icon_url: str | None = None,
mrkdwn: bool | None = None,
link_names: bool | None = None,
username: str | None = None,
parse: str | None = None,
metadata: Dict | Metadata | EventAndEntityMetadata | None = None,
markdown_text: str | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
-def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def chat_unfurl(self,
*,
channel: str | None = None,
ts: str | None = None,
source: str | None = None,
unfurl_id: str | None = None,
unfurls: Dict[str, Dict] | None = None,
metadata: Dict | EventAndEntityMetadata | None = None,
user_auth_blocks: str | Sequence[Dict | Block] | None = None,
user_auth_message: str | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
Lists custom emoji for a team. https://docs.slack.dev/reference/methods/emoji.list
+def entity_presentDetails(self,
trigger_id: str,
metadata: Dict | EntityMetadata | None = None,
user_auth_required: bool | None = None,
user_auth_url: str | None = None,
error: Dict[str, Any] | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def entity_presentDetails(
+ self,
+ trigger_id: str,
+ metadata: Optional[Union[Dict, EntityMetadata]] = None,
+ user_auth_required: Optional[bool] = None,
+ user_auth_url: Optional[str] = None,
+ error: Optional[Dict[str, Any]] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Provides entity details for the flexpane.
+ https://docs.slack.dev/reference/methods/entity.presentDetails/
+ """
+ kwargs.update({"trigger_id": trigger_id})
+ if metadata is not None:
+ kwargs.update({"metadata": metadata})
+ if user_auth_required is not None:
+ kwargs.update({"user_auth_required": user_auth_required})
+ if user_auth_url is not None:
+ kwargs.update({"user_auth_url": user_auth_url})
+ if error is not None:
+ kwargs.update({"error": error})
+ _parse_web_class_objects(kwargs)
+ return self.api_call("entity.presentDetails", json=kwargs)
+Provides entity details for the flexpane. +https://docs.slack.dev/reference/methods/entity.presentDetails/
def files_comments_delete(self, *, file: str, id: str, **kwargs) ‑> _asyncio.Future | LegacySlackResponse
Searches for messages matching a query. https://docs.slack.dev/reference/methods/search.messages
+def slackLists_access_delete(self,
*,
list_id: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_access_delete(
+ self,
+ *,
+ list_id: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Revoke access to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.delete
+ """
+ kwargs.update({"list_id": list_id, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.delete", json=kwargs)
+Revoke access to a List for specified entities. +https://docs.slack.dev/reference/methods/slackLists.access.delete
+def slackLists_access_set(self,
*,
list_id: str,
access_level: str,
channel_ids: List[str] | None = None,
user_ids: List[str] | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_access_set(
+ self,
+ *,
+ list_id: str,
+ access_level: str,
+ channel_ids: Optional[List[str]] = None,
+ user_ids: Optional[List[str]] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Set the access level to a List for specified entities.
+ https://docs.slack.dev/reference/methods/slackLists.access.set
+ """
+ kwargs.update({"list_id": list_id, "access_level": access_level, "channel_ids": channel_ids, "user_ids": user_ids})
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.access.set", json=kwargs)
+Set the access level to a List for specified entities. +https://docs.slack.dev/reference/methods/slackLists.access.set
+def slackLists_create(self,
*,
name: str,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
schema: List[Dict[str, Any]] | None = None,
copy_from_list_id: str | None = None,
include_copied_list_records: bool | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_create(
+ self,
+ *,
+ name: str,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ schema: Optional[List[Dict[str, Any]]] = None,
+ copy_from_list_id: Optional[str] = None,
+ include_copied_list_records: Optional[bool] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Creates a List.
+ https://docs.slack.dev/reference/methods/slackLists.create
+ """
+ kwargs.update(
+ {
+ "name": name,
+ "description_blocks": description_blocks,
+ "schema": schema,
+ "copy_from_list_id": copy_from_list_id,
+ "include_copied_list_records": include_copied_list_records,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.create", json=kwargs)
+Creates a List. +https://docs.slack.dev/reference/methods/slackLists.create
+def slackLists_download_get(self, *, list_id: str, job_id: str, **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_download_get(
+ self,
+ *,
+ list_id: str,
+ job_id: str,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Retrieve List download URL from an export job to download List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.get
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "job_id": job_id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.get", json=kwargs)
+Retrieve List download URL from an export job to download List contents. +https://docs.slack.dev/reference/methods/slackLists.download.get
+def slackLists_download_start(self, *, list_id: str, include_archived: bool | None = None, **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_download_start(
+ self,
+ *,
+ list_id: str,
+ include_archived: Optional[bool] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Initiate a job to export List contents.
+ https://docs.slack.dev/reference/methods/slackLists.download.start
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "include_archived": include_archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.download.start", json=kwargs)
+Initiate a job to export List contents. +https://docs.slack.dev/reference/methods/slackLists.download.start
+def slackLists_items_create(self,
*,
list_id: str,
duplicated_item_id: str | None = None,
parent_item_id: str | None = None,
initial_fields: List[Dict[str, Any]] | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_create(
+ self,
+ *,
+ list_id: str,
+ duplicated_item_id: Optional[str] = None,
+ parent_item_id: Optional[str] = None,
+ initial_fields: Optional[List[Dict[str, Any]]] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Add a new item to an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.create
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "duplicated_item_id": duplicated_item_id,
+ "parent_item_id": parent_item_id,
+ "initial_fields": initial_fields,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.create", json=kwargs)
+Add a new item to an existing List. +https://docs.slack.dev/reference/methods/slackLists.items.create
+def slackLists_items_delete(self, *, list_id: str, id: str, **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_delete(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Deletes an item from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.delete
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.delete", json=kwargs)
+Deletes an item from an existing List. +https://docs.slack.dev/reference/methods/slackLists.items.delete
+def slackLists_items_deleteMultiple(self, *, list_id: str, ids: List[str], **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_deleteMultiple(
+ self,
+ *,
+ list_id: str,
+ ids: List[str],
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Deletes multiple items from an existing List.
+ https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "ids": ids,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.deleteMultiple", json=kwargs)
+Deletes multiple items from an existing List. +https://docs.slack.dev/reference/methods/slackLists.items.deleteMultiple
+def slackLists_items_info(self, *, list_id: str, id: str, include_is_subscribed: bool | None = None, **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_info(
+ self,
+ *,
+ list_id: str,
+ id: str,
+ include_is_subscribed: Optional[bool] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Get a row from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.info
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "id": id,
+ "include_is_subscribed": include_is_subscribed,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.info", json=kwargs)
+Get a row from a List. +https://docs.slack.dev/reference/methods/slackLists.items.info
+def slackLists_items_list(self,
*,
list_id: str,
limit: int | None = None,
cursor: str | None = None,
archived: bool | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_list(
+ self,
+ *,
+ list_id: str,
+ limit: Optional[int] = None,
+ cursor: Optional[str] = None,
+ archived: Optional[bool] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Get records from a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.list
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "limit": limit,
+ "cursor": cursor,
+ "archived": archived,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.list", json=kwargs)
+Get records from a List. +https://docs.slack.dev/reference/methods/slackLists.items.list
+def slackLists_items_update(self, *, list_id: str, cells: List[Dict[str, Any]], **kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_items_update(
+ self,
+ *,
+ list_id: str,
+ cells: List[Dict[str, Any]],
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Updates cells in a List.
+ https://docs.slack.dev/reference/methods/slackLists.items.update
+ """
+ kwargs.update(
+ {
+ "list_id": list_id,
+ "cells": cells,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.items.update", json=kwargs)
+Updates cells in a List. +https://docs.slack.dev/reference/methods/slackLists.items.update
+def slackLists_update(self,
*,
id: str,
name: str | None = None,
description_blocks: str | Sequence[Dict | RichTextBlock] | None = None,
todo_mode: bool | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
+def slackLists_update(
+ self,
+ *,
+ id: str,
+ name: Optional[str] = None,
+ description_blocks: Optional[Union[str, Sequence[Union[Dict, RichTextBlock]]]] = None,
+ todo_mode: Optional[bool] = None,
+ **kwargs,
+) -> Union[Future, SlackResponse]:
+ """Update a List.
+ https://docs.slack.dev/reference/methods/slackLists.update
+ """
+ kwargs.update(
+ {
+ "id": id,
+ "name": name,
+ "description_blocks": description_blocks,
+ "todo_mode": todo_mode,
+ }
+ )
+ kwargs = _remove_none_values(kwargs)
+ return self.api_call("slackLists.update", json=kwargs)
+Update a List. +https://docs.slack.dev/reference/methods/slackLists.update
def stars_add(self,
*,
channel: str | None = None,
file: str | None = None,
file_comment: str | None = None,
timestamp: str | None = None,
**kwargs) ‑> _asyncio.Future | LegacySlackResponse
dnd_setSnooze
dnd_teamInfoemoji_listentity_presentDetailsfiles_comments_deletefiles_completeUploadExternalfiles_deletesearch_all
search_filessearch_messagesslackLists_access_deleteslackLists_access_setslackLists_createslackLists_download_getslackLists_download_startslackLists_items_createslackLists_items_deleteslackLists_items_deleteMultipleslackLists_items_infoslackLists_items_listslackLists_items_updateslackLists_updatestars_addstars_liststars_remove