diff --git a/docs/reference/index.html b/docs/reference/index.html index d56fafd29..54aaa03f9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -2255,7 +2255,7 @@

Classes

self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2263,7 +2263,9 @@

Classes

"""Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) @@ -9417,7 +9419,7 @@

Methods

https://docs.slack.dev/reference/methods/assistant.threads.setStatus

-def assistant_threads_setSuggestedPrompts(self,
*,
channel_id: str,
thread_ts: str,
title: str | None = None,
prompts: List[Dict[str, str]],
**kwargs) ‑> SlackResponse
+def assistant_threads_setSuggestedPrompts(self,
*,
channel_id: str,
thread_ts: str | None = None,
title: str | None = None,
prompts: List[Dict[str, str]],
**kwargs) ‑> SlackResponse
@@ -9428,7 +9430,7 @@

Methods

self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -9436,7 +9438,9 @@

Methods

"""Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) diff --git a/docs/reference/signature/index.html b/docs/reference/signature/index.html index f1c87b3c1..d2a3ce1c9 100644 --- a/docs/reference/signature/index.html +++ b/docs/reference/signature/index.html @@ -98,6 +98,18 @@

Methods

self.signing_secret = signing_secret self.clock = clock + @property + def signing_secret(self) -> str: + return self._signing_secret + + @signing_secret.setter + def signing_secret(self, value: str) -> None: + if not isinstance(value, str): + raise ValueError("signing_secret must be a string") + if not value.strip(): + raise ValueError("signing_secret must not be empty.") + self._signing_secret = value + def is_valid_request( self, body: Union[str, bytes], @@ -151,6 +163,21 @@

Methods

With the help of signing secrets, your app can more confidently verify whether requests from us are authentic. https://docs.slack.dev/authentication/verifying-requests-from-slack/

+

Instance variables

+
+
prop signing_secret : str
+
+
+ +Expand source code + +
@property
+def signing_secret(self) -> str:
+    return self._signing_secret
+
+
+
+

Methods

@@ -260,6 +287,7 @@

generate_signature
  • is_valid
  • is_valid_request
  • +
  • signing_secret
  • diff --git a/docs/reference/web/async_chat_stream.html b/docs/reference/web/async_chat_stream.html index 5c74a4e10..c9bcd185a 100644 --- a/docs/reference/web/async_chat_stream.html +++ b/docs/reference/web/async_chat_stream.html @@ -119,6 +119,15 @@

    Classes

    self._stream_ts: Optional[str] = None self._buffer_size = buffer_size + @property + def ts(self) -> Optional[str]: + """The message timestamp of the stream. + + Returns None until the first flush (when chat.startStream is called). + Can be used with chat.update as a fallback if the stream expires server-side. + """ + return self._stream_ts + async def append( self, *, @@ -309,6 +318,28 @@

    Args

    **kwargs
    Additional arguments passed to the underlying API calls.
    +

    Instance variables

    +
    +
    prop ts : str | None
    +
    +
    + +Expand source code + +
    @property
    +def ts(self) -> Optional[str]:
    +    """The message timestamp of the stream.
    +
    +    Returns None until the first flush (when chat.startStream is called).
    +    Can be used with chat.update as a fallback if the stream expires server-side.
    +    """
    +    return self._stream_ts
    +
    +

    The message timestamp of the stream.

    +

    Returns None until the first flush (when chat.startStream is called). +Can be used with chat.update as a fallback if the stream expires server-side.

    +
    +

    Methods

    @@ -543,6 +574,7 @@

  • append
  • stop
  • +
  • ts
  • diff --git a/docs/reference/web/async_client.html b/docs/reference/web/async_client.html index 388fdfd20..8af35b5d1 100644 --- a/docs/reference/web/async_client.html +++ b/docs/reference/web/async_client.html @@ -2151,7 +2151,7 @@

    Classes

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2159,7 +2159,9 @@

    Classes

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) @@ -9313,7 +9315,7 @@

    Methods

    https://docs.slack.dev/reference/methods/assistant.threads.setStatus

    -async def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> AsyncSlackResponse
    +async def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str | None = None,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> AsyncSlackResponse
    @@ -9324,7 +9326,7 @@

    Methods

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -9332,7 +9334,9 @@

    Methods

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return await self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
    diff --git a/docs/reference/web/chat_stream.html b/docs/reference/web/chat_stream.html index b685fa338..a6887e3c9 100644 --- a/docs/reference/web/chat_stream.html +++ b/docs/reference/web/chat_stream.html @@ -119,6 +119,15 @@

    Classes

    self._stream_ts: Optional[str] = None self._buffer_size = buffer_size + @property + def ts(self) -> Optional[str]: + """The message timestamp of the stream. + + Returns None until the first flush (when chat.startStream is called). + Can be used with chat.update as a fallback if the stream expires server-side. + """ + return self._stream_ts + def append( self, *, @@ -309,6 +318,28 @@

    Args

    **kwargs
    Additional arguments passed to the underlying API calls.
    +

    Instance variables

    +
    +
    prop ts : str | None
    +
    +
    + +Expand source code + +
    @property
    +def ts(self) -> Optional[str]:
    +    """The message timestamp of the stream.
    +
    +    Returns None until the first flush (when chat.startStream is called).
    +    Can be used with chat.update as a fallback if the stream expires server-side.
    +    """
    +    return self._stream_ts
    +
    +

    The message timestamp of the stream.

    +

    Returns None until the first flush (when chat.startStream is called). +Can be used with chat.update as a fallback if the stream expires server-side.

    +
    +

    Methods

    @@ -543,6 +574,7 @@

  • append
  • stop
  • +
  • ts
  • diff --git a/docs/reference/web/client.html b/docs/reference/web/client.html index 6008fe810..58d305038 100644 --- a/docs/reference/web/client.html +++ b/docs/reference/web/client.html @@ -2151,7 +2151,7 @@

    Classes

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2159,7 +2159,9 @@

    Classes

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) @@ -9313,7 +9315,7 @@

    Methods

    https://docs.slack.dev/reference/methods/assistant.threads.setStatus

    -def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> SlackResponse
    +def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str | None = None,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> SlackResponse
    @@ -9324,7 +9326,7 @@

    Methods

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -9332,7 +9334,9 @@

    Methods

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
    diff --git a/docs/reference/web/index.html b/docs/reference/web/index.html index fff09358c..d5598018f 100644 --- a/docs/reference/web/index.html +++ b/docs/reference/web/index.html @@ -2518,7 +2518,7 @@

    Raises

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2526,7 +2526,9 @@

    Raises

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) @@ -9680,7 +9682,7 @@

    Methods

    https://docs.slack.dev/reference/methods/assistant.threads.setStatus

    -def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> SlackResponse
    +def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str | None = None,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> SlackResponse
    @@ -9691,7 +9693,7 @@

    Methods

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -9699,7 +9701,9 @@

    Methods

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
    diff --git a/docs/reference/web/legacy_client.html b/docs/reference/web/legacy_client.html index 2b4b62c8e..411ed28d2 100644 --- a/docs/reference/web/legacy_client.html +++ b/docs/reference/web/legacy_client.html @@ -2150,7 +2150,7 @@

    Classes

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -2158,7 +2158,9 @@

    Classes

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs) @@ -9236,7 +9238,7 @@

    Methods

    https://docs.slack.dev/reference/methods/assistant.threads.setStatus

    -def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> _asyncio.Future | LegacySlackResponse
    +def assistant_threads_setSuggestedPrompts(self,
    *,
    channel_id: str,
    thread_ts: str | None = None,
    title: str | None = None,
    prompts: List[Dict[str, str]],
    **kwargs) ‑> _asyncio.Future | LegacySlackResponse
    @@ -9247,7 +9249,7 @@

    Methods

    self, *, channel_id: str, - thread_ts: str, + thread_ts: Optional[str] = None, title: Optional[str] = None, prompts: List[Dict[str, str]], **kwargs, @@ -9255,7 +9257,9 @@

    Methods

    """Set suggested prompts for the given assistant thread. https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts """ - kwargs.update({"channel_id": channel_id, "thread_ts": thread_ts, "prompts": prompts}) + kwargs.update({"channel_id": channel_id, "prompts": prompts}) + if thread_ts is not None: + kwargs.update({"thread_ts": thread_ts}) if title is not None: kwargs.update({"title": title}) return self.api_call("assistant.threads.setSuggestedPrompts", json=kwargs)
    diff --git a/slack_sdk/version.py b/slack_sdk/version.py index 30997295d..1e1b54a58 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.42.0" +__version__ = "3.43.0"