1212 GetMessagesRequest ,
1313 GetMessagesResponse ,
1414 GetChatsRequest ,
15- ChatListResponseV3
15+ UnseenChatCount
1616)
1717from ..base_client import BaseClient
1818
@@ -193,15 +193,15 @@ def get_messages_sync(
193193 async def get_chats (
194194 self ,
195195 request : GetChatsRequest ,
196- ) -> ChatListResponseV3 :
196+ ) -> ChatListResponse :
197197 """
198198 Get list of chats.
199199
200200 Args:
201201 request: The get chats request model containing query parameters.
202202
203203 Returns:
204- ChatListResponseV3 : The list of chats based on OpenAPI specification.
204+ ChatListResponse : The list of chats based on OpenAPI specification.
205205 """
206206 params = {
207207 "limit" : request .limit ,
@@ -219,20 +219,20 @@ async def get_chats(
219219 params ["filters" ] = request .filters .value
220220
221221 response = await self ._get ("/v3/chats" , params = params )
222- return ChatListResponseV3 (** response )
222+ return ChatListResponse (** response )
223223
224224 def get_chats_sync (
225225 self ,
226226 request : GetChatsRequest ,
227- ) -> ChatListResponseV3 :
227+ ) -> ChatListResponse :
228228 """
229229 Get list of chats (synchronous version).
230230
231231 Args:
232232 request: The get chats request model containing query parameters.
233233
234234 Returns:
235- ChatListResponseV3 : The list of chats based on OpenAPI specification.
235+ ChatListResponse : The list of chats based on OpenAPI specification.
236236 """
237237 params = {
238238 "limit" : request .limit ,
@@ -250,4 +250,36 @@ def get_chats_sync(
250250 params ["filters" ] = request .filters .value
251251
252252 response = self ._get_sync ("/v3/chats" , params = params )
253- return ChatListResponseV3 (** response )
253+ return ChatListResponse (** response )
254+
255+ async def get_unseen_chat_count (self , exceeds_limit : int = 30 ) -> 'UnseenChatCount' :
256+ """
257+ Get the count of unseen chats.
258+
259+ Args:
260+ exceeds_limit: The limit to check for exceeding unseen chats (default: 30).
261+
262+ Returns:
263+ UnseenChatCount: The unseen chat count response.
264+ """
265+ endpoint = "/v3/chats/unseen_count"
266+ params = {"exceeds_limit" : exceeds_limit }
267+ response = await self ._get (endpoint , params = params )
268+ from .models import UnseenChatCount
269+ return UnseenChatCount (** response )
270+
271+ def get_unseen_chat_count_sync (self , exceeds_limit : int = 30 ) -> 'UnseenChatCount' :
272+ """
273+ Get the count of unseen chats (synchronous version).
274+
275+ Args:
276+ exceeds_limit: The limit to check for exceeding unseen chats (default: 30).
277+
278+ Returns:
279+ UnseenChatCount: The unseen chat count response.
280+ """
281+ endpoint = "/v3/chats/unseen_count"
282+ params = {"exceeds_limit" : exceeds_limit }
283+ response = self ._get_sync (endpoint , params = params )
284+ from .models import UnseenChatCount
285+ return UnseenChatCount (** response )
0 commit comments