Skip to content

Commit 7e3d526

Browse files
authored
Add assistant.threads.* APIs (#1563)
1 parent 2997a17 commit 7e3d526

File tree

4 files changed

+143
-1
lines changed

4 files changed

+143
-1
lines changed

slack_sdk/web/async_client.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,49 @@ async def tooling_tokens_rotate(
20132013
kwargs.update({"refresh_token": refresh_token})
20142014
return await self.api_call("tooling.tokens.rotate", params=kwargs)
20152015

2016+
async def assistant_threads_setStatus(
2017+
self,
2018+
*,
2019+
channel_id: str,
2020+
thread_ts: str,
2021+
status: str,
2022+
**kwargs,
2023+
) -> AsyncSlackResponse:
2024+
"""Revokes a token.
2025+
https://api.slack.com/methods/assistant.threads.setStatus
2026+
"""
2027+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2028+
return await self.api_call("assistant.threads.setStatus", params=kwargs)
2029+
2030+
async def assistant_threads_setTitle(
2031+
self,
2032+
*,
2033+
channel_id: str,
2034+
thread_ts: str,
2035+
title: str,
2036+
**kwargs,
2037+
) -> AsyncSlackResponse:
2038+
"""Revokes a token.
2039+
https://api.slack.com/methods/assistant.threads.setTitle
2040+
"""
2041+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
2042+
return await self.api_call("assistant.threads.setTitle", params=kwargs)
2043+
2044+
async def assistant_threads_setSuggestedPrompts(
2045+
self,
2046+
*,
2047+
channel_id: str,
2048+
thread_ts: str,
2049+
title: Optional[str] = None,
2050+
prompts: List[Dict[str, str]],
2051+
**kwargs,
2052+
) -> AsyncSlackResponse:
2053+
"""Revokes a token.
2054+
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
2055+
"""
2056+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2057+
return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
2058+
20162059
async def auth_revoke(
20172060
self,
20182061
*,

slack_sdk/web/client.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,49 @@ def tooling_tokens_rotate(
20042004
kwargs.update({"refresh_token": refresh_token})
20052005
return self.api_call("tooling.tokens.rotate", params=kwargs)
20062006

2007+
def assistant_threads_setStatus(
2008+
self,
2009+
*,
2010+
channel_id: str,
2011+
thread_ts: str,
2012+
status: str,
2013+
**kwargs,
2014+
) -> SlackResponse:
2015+
"""Revokes a token.
2016+
https://api.slack.com/methods/assistant.threads.setStatus
2017+
"""
2018+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2019+
return self.api_call("assistant.threads.setStatus", params=kwargs)
2020+
2021+
def assistant_threads_setTitle(
2022+
self,
2023+
*,
2024+
channel_id: str,
2025+
thread_ts: str,
2026+
title: str,
2027+
**kwargs,
2028+
) -> SlackResponse:
2029+
"""Revokes a token.
2030+
https://api.slack.com/methods/assistant.threads.setTitle
2031+
"""
2032+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
2033+
return self.api_call("assistant.threads.setTitle", params=kwargs)
2034+
2035+
def assistant_threads_setSuggestedPrompts(
2036+
self,
2037+
*,
2038+
channel_id: str,
2039+
thread_ts: str,
2040+
title: Optional[str] = None,
2041+
prompts: List[Dict[str, str]],
2042+
**kwargs,
2043+
) -> SlackResponse:
2044+
"""Revokes a token.
2045+
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
2046+
"""
2047+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2048+
return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
2049+
20072050
def auth_revoke(
20082051
self,
20092052
*,

slack_sdk/web/legacy_client.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,49 @@ def tooling_tokens_rotate(
20152015
kwargs.update({"refresh_token": refresh_token})
20162016
return self.api_call("tooling.tokens.rotate", params=kwargs)
20172017

2018+
def assistant_threads_setStatus(
2019+
self,
2020+
*,
2021+
channel_id: str,
2022+
thread_ts: str,
2023+
status: str,
2024+
**kwargs,
2025+
) -> Union[Future, SlackResponse]:
2026+
"""Revokes a token.
2027+
https://api.slack.com/methods/assistant.threads.setStatus
2028+
"""
2029+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "status": status})
2030+
return self.api_call("assistant.threads.setStatus", params=kwargs)
2031+
2032+
def assistant_threads_setTitle(
2033+
self,
2034+
*,
2035+
channel_id: str,
2036+
thread_ts: str,
2037+
title: str,
2038+
**kwargs,
2039+
) -> Union[Future, SlackResponse]:
2040+
"""Revokes a token.
2041+
https://api.slack.com/methods/assistant.threads.setTitle
2042+
"""
2043+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title})
2044+
return self.api_call("assistant.threads.setTitle", params=kwargs)
2045+
2046+
def assistant_threads_setSuggestedPrompts(
2047+
self,
2048+
*,
2049+
channel_id: str,
2050+
thread_ts: str,
2051+
title: Optional[str] = None,
2052+
prompts: List[Dict[str, str]],
2053+
**kwargs,
2054+
) -> Union[Future, SlackResponse]:
2055+
"""Revokes a token.
2056+
https://api.slack.com/methods/assistant.threads.setSuggestedPrompts
2057+
"""
2058+
kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "title": title, "prompts": prompts})
2059+
return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
2060+
20182061
def auth_revoke(
20192062
self,
20202063
*,

0 commit comments

Comments
 (0)