Skip to content
69 changes: 69 additions & 0 deletions slack_sdk/web/async_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4560,6 +4560,75 @@ def emoji_list(
kwargs.update({"include_categories": include_categories})
return self.api_call("emoji.list", http_verb="GET", params=kwargs)

def entity_acknowledgeCommentAction(
self,
*,
trigger_id: str,
comment: Optional[Dict[str, Any]] = None,
error: Optional[str] = None,
**kwargs,
) -> SlackResponse:
"""Acknowledge a comment post, edit, or delete on a Work Object.

Apps call this method to confirm they have processed a comment action.
https://docs.slack.dev/reference/methods/entity.acknowledgeCommentAction

Args:
trigger_id: A reference to the original user action that initiated the comment mutation
comment: The full comment data. Required for edit and post actions.
error: Error message if the action failed in the app. When present, signals that the mutation could not be
completed.
"""
kwargs.update({"trigger_id": trigger_id})
if comment is not None:
kwargs.update({"comment": comment})
if error is not None:
kwargs.update({"error": error})
return self.api_call("entity.acknowledgeCommentAction", json=kwargs)

def entity_presentComments(
self,
*,
comments: Sequence[Dict[str, Any]],
trigger_id: str,
cursor: Optional[str] = None,
can_post_comment: Optional[bool] = None,
delete_action_id: Optional[str] = None,
user_auth_required: Optional[bool] = None,
user_auth_url: Optional[str] = None,
error: Optional[Dict[str, Any]] = None,
**kwargs,
) -> SlackResponse:
"""Provide comments for Work Objects.

Apps call this method to send per-user flexpane comment data to the client.
https://docs.slack.dev/reference/methods/entity.presentComments

Args:
comments: Array of comments to present to the user.
trigger_id: A reference to the original user action that initiated the request
cursor: App supplied cursor used for pagination, will be sent in the next request for comments
can_post_comment: Indicates whether the user has permissions to post comments
delete_action_id: The block action id that will be sent when a delete request is initiated for a comment.
user_auth_required: Set to true (or 1) to indicate that the user must authenticate to see the comments data.
user_auth_url: A custom URL to which users are directed for authentication if required.
error: An object describing an error to show the user in place of the comments.
"""
kwargs.update({"comments": comments, "trigger_id": trigger_id})
if cursor is not None:
kwargs.update({"cursor": cursor})
if can_post_comment is not None:
kwargs.update({"can_post_comment": can_post_comment})
if delete_action_id is not None:
kwargs.update({"delete_action_id": delete_action_id})
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})
return self.api_call("entity.presentComments", json=kwargs)

def entity_presentDetails(
self,
trigger_id: str,
Expand Down
69 changes: 69 additions & 0 deletions slack_sdk/web/legacy_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading