diff --git a/stream_chat/async_chat/client.py b/stream_chat/async_chat/client.py index ebecf7c..edc9e2d 100644 --- a/stream_chat/async_chat/client.py +++ b/stream_chat/async_chat/client.py @@ -232,6 +232,22 @@ async def query_banned_users(self, query_conditions: Dict) -> StreamResponse: "query_banned_users", params={"payload": json.dumps(query_conditions)} ) + async def query_future_channel_bans(self, **options: Any) -> StreamResponse: + """ + Query future channel bans created by a user. + + :param options: Optional parameters including: + - user_id: The ID of the user who created the bans + - exclude_expired_bans: Whether to exclude expired bans + - limit: Maximum number of results to return + - offset: Number of results to skip + + :return: A StreamResponse containing the list of future channel bans + """ + return await self.get( + "query_future_channel_bans", params={"payload": json.dumps(options)} + ) + async def block_user( self, blocked_user_id: str, user_id: str, **options: Any ) -> StreamResponse: diff --git a/stream_chat/base/client.py b/stream_chat/base/client.py index b9c9827..750fcc8 100644 --- a/stream_chat/base/client.py +++ b/stream_chat/base/client.py @@ -356,6 +356,23 @@ def query_banned_users( """ pass + @abc.abstractmethod + def query_future_channel_bans( + self, **options: Any + ) -> Union[StreamResponse, Awaitable[StreamResponse]]: + """ + Query future channel bans created by a user. + + :param options: Optional parameters including: + - user_id: The ID of the user who created the bans + - exclude_expired_bans: Whether to exclude expired bans + - limit: Maximum number of results to return + - offset: Number of results to skip + + :return: A StreamResponse containing the list of future channel bans + """ + pass + @abc.abstractmethod def block_user( self, blocked_user_id: str, user_id: str, **options: Any diff --git a/stream_chat/client.py b/stream_chat/client.py index c2a0de8..b9fafd8 100644 --- a/stream_chat/client.py +++ b/stream_chat/client.py @@ -232,6 +232,22 @@ def query_banned_users(self, query_conditions: Dict) -> StreamResponse: "query_banned_users", params={"payload": json.dumps(query_conditions)} ) + def query_future_channel_bans(self, **options: Any) -> StreamResponse: + """ + Query future channel bans created by a user. + + :param options: Optional parameters including: + - user_id: The ID of the user who created the bans + - exclude_expired_bans: Whether to exclude expired bans + - limit: Maximum number of results to return + - offset: Number of results to skip + + :return: A StreamResponse containing the list of future channel bans + """ + return self.get( + "query_future_channel_bans", params={"payload": json.dumps(options)} + ) + def block_user( self, blocked_user_id: str, user_id: str, **options: Any ) -> StreamResponse: