Skip to content

Commit 1ea87ff

Browse files
feat(api): manual updates
1 parent b1ba1c0 commit 1ea87ff

File tree

11 files changed

+505
-8
lines changed

11 files changed

+505
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 14
1+
configured_endpoints: 16
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-9f5190d7df873112f3512b5796cd95341f0fa0d2585488d3e829be80ee6045ce.yml
33
openapi_spec_hash: ba834200758376aaea47b2a276f64c1b
4-
config_hash: f83b2b6eb86f2dd68101065998479cb2
4+
config_hash: be3f3b31e322be0f4de6a23e32ab004c

api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@ Methods:
4747
Types:
4848

4949
```python
50-
from beeper_desktop_api.types import Chat, ChatCreateResponse
50+
from beeper_desktop_api.types import Chat, ChatCreateResponse, ChatListResponse
5151
```
5252

5353
Methods:
5454

5555
- <code title="post /v1/chats">client.chats.<a href="./src/beeper_desktop_api/resources/chats/chats.py">create</a>(\*\*<a href="src/beeper_desktop_api/types/chat_create_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/chat_create_response.py">ChatCreateResponse</a></code>
5656
- <code title="get /v1/chats/{chatID}">client.chats.<a href="./src/beeper_desktop_api/resources/chats/chats.py">retrieve</a>(chat_id, \*\*<a href="src/beeper_desktop_api/types/chat_retrieve_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/chat.py">Chat</a></code>
57+
- <code title="get /v1/chats">client.chats.<a href="./src/beeper_desktop_api/resources/chats/chats.py">list</a>(\*\*<a href="src/beeper_desktop_api/types/chat_list_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/chat_list_response.py">SyncCursor[ChatListResponse]</a></code>
5758
- <code title="post /v1/chats/{chatID}/archive">client.chats.<a href="./src/beeper_desktop_api/resources/chats/chats.py">archive</a>(chat_id, \*\*<a href="src/beeper_desktop_api/types/chat_archive_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/shared/base_response.py">BaseResponse</a></code>
5859
- <code title="get /v1/chats/search">client.chats.<a href="./src/beeper_desktop_api/resources/chats/chats.py">search</a>(\*\*<a href="src/beeper_desktop_api/types/chat_search_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/chat.py">SyncCursor[Chat]</a></code>
5960

@@ -74,6 +75,7 @@ from beeper_desktop_api.types import MessageSendResponse
7475

7576
Methods:
7677

78+
- <code title="get /v1/messages">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">list</a>(\*\*<a href="src/beeper_desktop_api/types/message_list_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/shared/message.py">SyncCursor[Message]</a></code>
7779
- <code title="get /v1/messages/search">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">search</a>(\*\*<a href="src/beeper_desktop_api/types/message_search_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/shared/message.py">SyncCursor[Message]</a></code>
7880
- <code title="post /v1/messages">client.messages.<a href="./src/beeper_desktop_api/resources/messages.py">send</a>(\*\*<a href="src/beeper_desktop_api/types/message_send_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/message_send_response.py">MessageSendResponse</a></code>
7981

src/beeper_desktop_api/resources/accounts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
class AccountsResource(SyncAPIResource):
23-
"""Accounts operations"""
23+
"""Manage connected chat accounts"""
2424

2525
@cached_property
2626
def with_raw_response(self) -> AccountsResourceWithRawResponse:
@@ -65,7 +65,7 @@ def list(
6565

6666

6767
class AsyncAccountsResource(AsyncAPIResource):
68-
"""Accounts operations"""
68+
"""Manage connected chat accounts"""
6969

7070
@cached_property
7171
def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse:

src/beeper_desktop_api/resources/chats/chats.py

Lines changed: 132 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import httpx
1010

11-
from ...types import chat_create_params, chat_search_params, chat_archive_params, chat_retrieve_params
11+
from ...types import chat_list_params, chat_create_params, chat_search_params, chat_archive_params, chat_retrieve_params
1212
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
1313
from ..._utils import maybe_transform, async_maybe_transform
1414
from ..._compat import cached_property
@@ -30,6 +30,7 @@
3030
from ...pagination import SyncCursor, AsyncCursor
3131
from ...types.chat import Chat
3232
from ..._base_client import AsyncPaginator, make_request_options
33+
from ...types.chat_list_response import ChatListResponse
3334
from ...types.chat_create_response import ChatCreateResponse
3435
from ...types.shared.base_response import BaseResponse
3536

@@ -166,6 +167,65 @@ def retrieve(
166167
cast_to=Chat,
167168
)
168169

170+
def list(
171+
self,
172+
*,
173+
account_ids: SequenceNotStr[str] | Omit = omit,
174+
cursor: str | Omit = omit,
175+
direction: Literal["after", "before"] | Omit = omit,
176+
limit: int | Omit = omit,
177+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178+
# The extra values given here take precedence over values defined on the client or passed to this method.
179+
extra_headers: Headers | None = None,
180+
extra_query: Query | None = None,
181+
extra_body: Body | None = None,
182+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
183+
) -> SyncCursor[ChatListResponse]:
184+
"""List all chats sorted by last activity (most recent first).
185+
186+
Combines all
187+
accounts into a single paginated list.
188+
189+
Args:
190+
account_ids: Limit to specific account IDs. If omitted, fetches from all accounts.
191+
192+
cursor: Timestamp cursor (milliseconds since epoch) for pagination. Use with direction
193+
to navigate results.
194+
195+
direction: Pagination direction used with 'cursor': 'before' fetches older results, 'after'
196+
fetches newer results. Defaults to 'before' when only 'cursor' is provided.
197+
198+
limit: Maximum number of chats to return (1–200). Defaults to 50.
199+
200+
extra_headers: Send extra headers
201+
202+
extra_query: Add additional query parameters to the request
203+
204+
extra_body: Add additional JSON properties to the request
205+
206+
timeout: Override the client-level default timeout for this request, in seconds
207+
"""
208+
return self._get_api_list(
209+
"/v1/chats",
210+
page=SyncCursor[ChatListResponse],
211+
options=make_request_options(
212+
extra_headers=extra_headers,
213+
extra_query=extra_query,
214+
extra_body=extra_body,
215+
timeout=timeout,
216+
query=maybe_transform(
217+
{
218+
"account_ids": account_ids,
219+
"cursor": cursor,
220+
"direction": direction,
221+
"limit": limit,
222+
},
223+
chat_list_params.ChatListParams,
224+
),
225+
),
226+
model=ChatListResponse,
227+
)
228+
169229
def archive(
170230
self,
171231
chat_id: str,
@@ -436,6 +496,65 @@ async def retrieve(
436496
cast_to=Chat,
437497
)
438498

499+
def list(
500+
self,
501+
*,
502+
account_ids: SequenceNotStr[str] | Omit = omit,
503+
cursor: str | Omit = omit,
504+
direction: Literal["after", "before"] | Omit = omit,
505+
limit: int | Omit = omit,
506+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
507+
# The extra values given here take precedence over values defined on the client or passed to this method.
508+
extra_headers: Headers | None = None,
509+
extra_query: Query | None = None,
510+
extra_body: Body | None = None,
511+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
512+
) -> AsyncPaginator[ChatListResponse, AsyncCursor[ChatListResponse]]:
513+
"""List all chats sorted by last activity (most recent first).
514+
515+
Combines all
516+
accounts into a single paginated list.
517+
518+
Args:
519+
account_ids: Limit to specific account IDs. If omitted, fetches from all accounts.
520+
521+
cursor: Timestamp cursor (milliseconds since epoch) for pagination. Use with direction
522+
to navigate results.
523+
524+
direction: Pagination direction used with 'cursor': 'before' fetches older results, 'after'
525+
fetches newer results. Defaults to 'before' when only 'cursor' is provided.
526+
527+
limit: Maximum number of chats to return (1–200). Defaults to 50.
528+
529+
extra_headers: Send extra headers
530+
531+
extra_query: Add additional query parameters to the request
532+
533+
extra_body: Add additional JSON properties to the request
534+
535+
timeout: Override the client-level default timeout for this request, in seconds
536+
"""
537+
return self._get_api_list(
538+
"/v1/chats",
539+
page=AsyncCursor[ChatListResponse],
540+
options=make_request_options(
541+
extra_headers=extra_headers,
542+
extra_query=extra_query,
543+
extra_body=extra_body,
544+
timeout=timeout,
545+
query=maybe_transform(
546+
{
547+
"account_ids": account_ids,
548+
"cursor": cursor,
549+
"direction": direction,
550+
"limit": limit,
551+
},
552+
chat_list_params.ChatListParams,
553+
),
554+
),
555+
model=ChatListResponse,
556+
)
557+
439558
async def archive(
440559
self,
441560
chat_id: str,
@@ -586,6 +705,9 @@ def __init__(self, chats: ChatsResource) -> None:
586705
self.retrieve = to_raw_response_wrapper(
587706
chats.retrieve,
588707
)
708+
self.list = to_raw_response_wrapper(
709+
chats.list,
710+
)
589711
self.archive = to_raw_response_wrapper(
590712
chats.archive,
591713
)
@@ -609,6 +731,9 @@ def __init__(self, chats: AsyncChatsResource) -> None:
609731
self.retrieve = async_to_raw_response_wrapper(
610732
chats.retrieve,
611733
)
734+
self.list = async_to_raw_response_wrapper(
735+
chats.list,
736+
)
612737
self.archive = async_to_raw_response_wrapper(
613738
chats.archive,
614739
)
@@ -632,6 +757,9 @@ def __init__(self, chats: ChatsResource) -> None:
632757
self.retrieve = to_streamed_response_wrapper(
633758
chats.retrieve,
634759
)
760+
self.list = to_streamed_response_wrapper(
761+
chats.list,
762+
)
635763
self.archive = to_streamed_response_wrapper(
636764
chats.archive,
637765
)
@@ -655,6 +783,9 @@ def __init__(self, chats: AsyncChatsResource) -> None:
655783
self.retrieve = async_to_streamed_response_wrapper(
656784
chats.retrieve,
657785
)
786+
self.list = async_to_streamed_response_wrapper(
787+
chats.list,
788+
)
658789
self.archive = async_to_streamed_response_wrapper(
659790
chats.archive,
660791
)

0 commit comments

Comments
 (0)