stream-chat 4.21.0__tar.gz → 4.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {stream-chat-4.21.0/stream_chat.egg-info → stream-chat-4.23.0}/PKG-INFO +2 -2
  2. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/__pkg__.py +1 -1
  3. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/async_chat/client.py +10 -0
  4. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/client.py +24 -0
  5. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/client.py +8 -0
  6. {stream-chat-4.21.0 → stream-chat-4.23.0/stream_chat.egg-info}/PKG-INFO +2 -2
  7. {stream-chat-4.21.0 → stream-chat-4.23.0}/LICENSE +0 -0
  8. {stream-chat-4.21.0 → stream-chat-4.23.0}/MANIFEST.in +0 -0
  9. {stream-chat-4.21.0 → stream-chat-4.23.0}/README.md +0 -0
  10. {stream-chat-4.21.0 → stream-chat-4.23.0}/pyproject.toml +0 -0
  11. {stream-chat-4.21.0 → stream-chat-4.23.0}/setup.cfg +0 -0
  12. {stream-chat-4.21.0 → stream-chat-4.23.0}/setup.py +0 -0
  13. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/__init__.py +0 -0
  14. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/async_chat/__init__.py +0 -0
  15. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/async_chat/campaign.py +0 -0
  16. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/async_chat/channel.py +0 -0
  17. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/async_chat/segment.py +0 -0
  18. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/__init__.py +0 -0
  19. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/campaign.py +0 -0
  20. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/channel.py +0 -0
  21. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/exceptions.py +0 -0
  22. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/base/segment.py +0 -0
  23. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/campaign.py +0 -0
  24. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/channel.py +0 -0
  25. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/py.typed +0 -0
  26. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/segment.py +0 -0
  27. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/__init__.py +0 -0
  28. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/base.py +0 -0
  29. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/campaign.py +0 -0
  30. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/rate_limit.py +0 -0
  31. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/segment.py +0 -0
  32. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat/types/stream_response.py +0 -0
  33. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat.egg-info/SOURCES.txt +0 -0
  34. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat.egg-info/dependency_links.txt +0 -0
  35. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat.egg-info/not-zip-safe +0 -0
  36. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat.egg-info/requires.txt +0 -0
  37. {stream-chat-4.21.0 → stream-chat-4.23.0}/stream_chat.egg-info/top_level.txt +0 -0
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stream-chat
3
- Version: 4.21.0
3
+ Version: 4.23.0
4
4
  Summary: Client for Stream Chat.
5
5
  Home-page: https://github.com/GetStream/stream-chat-python
6
6
  Author: Tommaso Barbugli
7
7
  Author-email: support@getstream.io
8
8
  Project-URL: Bug Tracker, https://github.com/GetStream/stream-chat-python/issues
9
9
  Project-URL: Documentation, https://getstream.io/activity-feeds/docs/python/?language=python
10
- Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.21.0
10
+ Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.23.0
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: Operating System :: OS Independent
@@ -1,6 +1,6 @@
1
1
  __author__ = "Tommaso Barbugli"
2
2
  __copyright__ = "Copyright 2019-2022, Stream.io, Inc"
3
- __version__ = "4.21.0"
3
+ __version__ = "4.23.0"
4
4
  __maintainer__ = "Tommaso Barbugli"
5
5
  __email__ = "support@getstream.io"
6
6
  __status__ = "Production"
@@ -190,6 +190,13 @@ class StreamChatAsync(StreamChatInterface, AsyncContextManager):
190
190
  async def deactivate_user(self, user_id: str, **options: Any) -> StreamResponse:
191
191
  return await self.post(f"users/{user_id}/deactivate", data=options)
192
192
 
193
+ async def deactivate_users(
194
+ self, user_ids: Iterable[str], **options: Any
195
+ ) -> StreamResponse:
196
+ return await self.post(
197
+ "users/deactivate", data=dict(options, user_ids=user_ids)
198
+ )
199
+
193
200
  async def reactivate_user(self, user_id: str, **options: Any) -> StreamResponse:
194
201
  return await self.post(f"users/{user_id}/reactivate", data=options)
195
202
 
@@ -776,6 +783,9 @@ class StreamChatAsync(StreamChatInterface, AsyncContextManager):
776
783
  async def get_export_channel_status(self, task_id: str) -> StreamResponse:
777
784
  return await self.get(f"export_channels/{task_id}")
778
785
 
786
+ async def export_users(self, user_ids: Iterable[str]) -> StreamResponse:
787
+ return await self.post("export/users", data={"user_ids": user_ids})
788
+
779
789
  async def get_task(self, task_id: str) -> StreamResponse:
780
790
  return await self.get(f"tasks/{task_id}")
781
791
 
@@ -256,6 +256,21 @@ class StreamChatInterface(abc.ABC):
256
256
  """
257
257
  pass
258
258
 
259
+ @abc.abstractmethod
260
+ def deactivate_users(
261
+ self, user_ids: Iterable[str], **options: Any
262
+ ) -> Union[StreamResponse, Awaitable[StreamResponse]]:
263
+ """
264
+ Deactivates multiple users in a batch operation.
265
+ Deactivated users cannot connect to Stream Chat, and can't send or receive messages.
266
+ To reactivate users, use `reactivate_user` method for each user.
267
+
268
+ :param user_ids: a list of user IDs to deactivate
269
+ :param options: additional options
270
+ :return: task_id
271
+ """
272
+ pass
273
+
259
274
  @abc.abstractmethod
260
275
  def reactivate_user(
261
276
  self, user_id: str, **options: Any
@@ -1213,6 +1228,15 @@ class StreamChatInterface(abc.ABC):
1213
1228
  """
1214
1229
  pass
1215
1230
 
1231
+ @abc.abstractmethod
1232
+ def export_users(
1233
+ self, user_ids: Iterable[str]
1234
+ ) -> Union[StreamResponse, Awaitable[StreamResponse]]:
1235
+ """
1236
+ Requests a users export
1237
+ """
1238
+ pass
1239
+
1216
1240
  @abc.abstractmethod
1217
1241
  def get_task(
1218
1242
  self, task_id: str
@@ -178,6 +178,11 @@ class StreamChat(StreamChatInterface):
178
178
  def deactivate_user(self, user_id: str, **options: Any) -> StreamResponse:
179
179
  return self.post(f"users/{user_id}/deactivate", data=options)
180
180
 
181
+ def deactivate_users(
182
+ self, user_ids: Iterable[str], **options: Any
183
+ ) -> StreamResponse:
184
+ return self.post("users/deactivate", data=dict(options, user_ids=user_ids))
185
+
181
186
  def reactivate_user(self, user_id: str, **options: Any) -> StreamResponse:
182
187
  return self.post(f"users/{user_id}/reactivate", data=options)
183
188
 
@@ -740,6 +745,9 @@ class StreamChat(StreamChatInterface):
740
745
  def get_export_channel_status(self, task_id: str) -> StreamResponse:
741
746
  return self.get(f"export_channels/{task_id}")
742
747
 
748
+ def export_users(self, user_ids: Iterable[str]) -> StreamResponse:
749
+ return self.post("export/users", data={"user_ids": user_ids})
750
+
743
751
  def get_task(self, task_id: str) -> StreamResponse:
744
752
  return self.get(f"tasks/{task_id}")
745
753
 
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stream-chat
3
- Version: 4.21.0
3
+ Version: 4.23.0
4
4
  Summary: Client for Stream Chat.
5
5
  Home-page: https://github.com/GetStream/stream-chat-python
6
6
  Author: Tommaso Barbugli
7
7
  Author-email: support@getstream.io
8
8
  Project-URL: Bug Tracker, https://github.com/GetStream/stream-chat-python/issues
9
9
  Project-URL: Documentation, https://getstream.io/activity-feeds/docs/python/?language=python
10
- Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.21.0
10
+ Project-URL: Release Notes, https://github.com/GetStream/stream-chat-python/releases/tag/v4.23.0
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: Operating System :: OS Independent
File without changes
File without changes
File without changes
File without changes
File without changes