Skip to content

Commit 88bce73

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

File tree

9 files changed

+114
-253
lines changed

9 files changed

+114
-253
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
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: be3f3b31e322be0f4de6a23e32ab004c
4+
config_hash: 00db138e547960c0d9c47754c2f59051

api.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,18 @@ from beeper_desktop_api.types import Attachment, BaseResponse, Error, Message, R
99
Types:
1010

1111
```python
12-
from beeper_desktop_api.types import DownloadAssetResponse, OpenResponse, SearchResponse
12+
from beeper_desktop_api.types import (
13+
DownloadAssetResponse,
14+
GetTokenInfoResponse,
15+
OpenResponse,
16+
SearchResponse,
17+
)
1318
```
1419

1520
Methods:
1621

1722
- <code title="post /v1/app/download-asset">client.<a href="./src/beeper_desktop_api/_client.py">download_asset</a>(\*\*<a href="src/beeper_desktop_api/types/client_download_asset_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/download_asset_response.py">DownloadAssetResponse</a></code>
23+
- <code title="get /oauth/userinfo">client.<a href="./src/beeper_desktop_api/_client.py">get_token_info</a>() -> <a href="./src/beeper_desktop_api/types/get_token_info_response.py">GetTokenInfoResponse</a></code>
1824
- <code title="post /v1/app/open">client.<a href="./src/beeper_desktop_api/_client.py">open</a>(\*\*<a href="src/beeper_desktop_api/types/client_open_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/open_response.py">OpenResponse</a></code>
1925
- <code title="get /v1/search">client.<a href="./src/beeper_desktop_api/_client.py">search</a>(\*\*<a href="src/beeper_desktop_api/types/client_search_params.py">params</a>) -> <a href="./src/beeper_desktop_api/types/search_response.py">SearchResponse</a></code>
2026

@@ -78,15 +84,3 @@ Methods:
7884
- <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>
7985
- <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>
8086
- <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>
81-
82-
# Token
83-
84-
Types:
85-
86-
```python
87-
from beeper_desktop_api.types import UserInfo
88-
```
89-
90-
Methods:
91-
92-
- <code title="get /oauth/userinfo">client.token.<a href="./src/beeper_desktop_api/resources/token.py">info</a>() -> <a href="./src/beeper_desktop_api/types/user_info.py">UserInfo</a></code>

src/beeper_desktop_api/_client.py

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
async_to_raw_response_wrapper,
3838
async_to_streamed_response_wrapper,
3939
)
40-
from .resources import token, accounts, contacts, messages
40+
from .resources import accounts, contacts, messages
4141
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
4242
from ._exceptions import APIStatusError, BeeperDesktopError
4343
from ._base_client import (
@@ -50,6 +50,7 @@
5050
from .types.open_response import OpenResponse
5151
from .types.search_response import SearchResponse
5252
from .types.download_asset_response import DownloadAssetResponse
53+
from .types.get_token_info_response import GetTokenInfoResponse
5354

5455
__all__ = [
5556
"Timeout",
@@ -68,7 +69,6 @@ class BeeperDesktop(SyncAPIClient):
6869
contacts: contacts.ContactsResource
6970
chats: chats.ChatsResource
7071
messages: messages.MessagesResource
71-
token: token.TokenResource
7272
with_raw_response: BeeperDesktopWithRawResponse
7373
with_streaming_response: BeeperDesktopWithStreamedResponse
7474

@@ -130,7 +130,6 @@ def __init__(
130130
self.contacts = contacts.ContactsResource(self)
131131
self.chats = chats.ChatsResource(self)
132132
self.messages = messages.MessagesResource(self)
133-
self.token = token.TokenResource(self)
134133
self.with_raw_response = BeeperDesktopWithRawResponse(self)
135134
self.with_streaming_response = BeeperDesktopWithStreamedResponse(self)
136135

@@ -240,6 +239,25 @@ def download_asset(
240239
cast_to=DownloadAssetResponse,
241240
)
242241

242+
def get_token_info(
243+
self,
244+
*,
245+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
246+
# The extra values given here take precedence over values defined on the client or passed to this method.
247+
extra_headers: Headers | None = None,
248+
extra_query: Query | None = None,
249+
extra_body: Body | None = None,
250+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
251+
) -> GetTokenInfoResponse:
252+
"""Returns information about the authenticated user/token"""
253+
return self.get(
254+
"/oauth/userinfo",
255+
options=make_request_options(
256+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
257+
),
258+
cast_to=GetTokenInfoResponse,
259+
)
260+
243261
def open(
244262
self,
245263
*,
@@ -371,7 +389,6 @@ class AsyncBeeperDesktop(AsyncAPIClient):
371389
contacts: contacts.AsyncContactsResource
372390
chats: chats.AsyncChatsResource
373391
messages: messages.AsyncMessagesResource
374-
token: token.AsyncTokenResource
375392
with_raw_response: AsyncBeeperDesktopWithRawResponse
376393
with_streaming_response: AsyncBeeperDesktopWithStreamedResponse
377394

@@ -433,7 +450,6 @@ def __init__(
433450
self.contacts = contacts.AsyncContactsResource(self)
434451
self.chats = chats.AsyncChatsResource(self)
435452
self.messages = messages.AsyncMessagesResource(self)
436-
self.token = token.AsyncTokenResource(self)
437453
self.with_raw_response = AsyncBeeperDesktopWithRawResponse(self)
438454
self.with_streaming_response = AsyncBeeperDesktopWithStreamedResponse(self)
439455

@@ -543,6 +559,25 @@ async def download_asset(
543559
cast_to=DownloadAssetResponse,
544560
)
545561

562+
async def get_token_info(
563+
self,
564+
*,
565+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
566+
# The extra values given here take precedence over values defined on the client or passed to this method.
567+
extra_headers: Headers | None = None,
568+
extra_query: Query | None = None,
569+
extra_body: Body | None = None,
570+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
571+
) -> GetTokenInfoResponse:
572+
"""Returns information about the authenticated user/token"""
573+
return await self.get(
574+
"/oauth/userinfo",
575+
options=make_request_options(
576+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
577+
),
578+
cast_to=GetTokenInfoResponse,
579+
)
580+
546581
async def open(
547582
self,
548583
*,
@@ -675,11 +710,13 @@ def __init__(self, client: BeeperDesktop) -> None:
675710
self.contacts = contacts.ContactsResourceWithRawResponse(client.contacts)
676711
self.chats = chats.ChatsResourceWithRawResponse(client.chats)
677712
self.messages = messages.MessagesResourceWithRawResponse(client.messages)
678-
self.token = token.TokenResourceWithRawResponse(client.token)
679713

680714
self.download_asset = to_raw_response_wrapper(
681715
client.download_asset,
682716
)
717+
self.get_token_info = to_raw_response_wrapper(
718+
client.get_token_info,
719+
)
683720
self.open = to_raw_response_wrapper(
684721
client.open,
685722
)
@@ -694,11 +731,13 @@ def __init__(self, client: AsyncBeeperDesktop) -> None:
694731
self.contacts = contacts.AsyncContactsResourceWithRawResponse(client.contacts)
695732
self.chats = chats.AsyncChatsResourceWithRawResponse(client.chats)
696733
self.messages = messages.AsyncMessagesResourceWithRawResponse(client.messages)
697-
self.token = token.AsyncTokenResourceWithRawResponse(client.token)
698734

699735
self.download_asset = async_to_raw_response_wrapper(
700736
client.download_asset,
701737
)
738+
self.get_token_info = async_to_raw_response_wrapper(
739+
client.get_token_info,
740+
)
702741
self.open = async_to_raw_response_wrapper(
703742
client.open,
704743
)
@@ -713,11 +752,13 @@ def __init__(self, client: BeeperDesktop) -> None:
713752
self.contacts = contacts.ContactsResourceWithStreamingResponse(client.contacts)
714753
self.chats = chats.ChatsResourceWithStreamingResponse(client.chats)
715754
self.messages = messages.MessagesResourceWithStreamingResponse(client.messages)
716-
self.token = token.TokenResourceWithStreamingResponse(client.token)
717755

718756
self.download_asset = to_streamed_response_wrapper(
719757
client.download_asset,
720758
)
759+
self.get_token_info = to_streamed_response_wrapper(
760+
client.get_token_info,
761+
)
721762
self.open = to_streamed_response_wrapper(
722763
client.open,
723764
)
@@ -732,11 +773,13 @@ def __init__(self, client: AsyncBeeperDesktop) -> None:
732773
self.contacts = contacts.AsyncContactsResourceWithStreamingResponse(client.contacts)
733774
self.chats = chats.AsyncChatsResourceWithStreamingResponse(client.chats)
734775
self.messages = messages.AsyncMessagesResourceWithStreamingResponse(client.messages)
735-
self.token = token.AsyncTokenResourceWithStreamingResponse(client.token)
736776

737777
self.download_asset = async_to_streamed_response_wrapper(
738778
client.download_asset,
739779
)
780+
self.get_token_info = async_to_streamed_response_wrapper(
781+
client.get_token_info,
782+
)
740783
self.open = async_to_streamed_response_wrapper(
741784
client.open,
742785
)

src/beeper_desktop_api/resources/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
ChatsResourceWithStreamingResponse,
99
AsyncChatsResourceWithStreamingResponse,
1010
)
11-
from .token import (
12-
TokenResource,
13-
AsyncTokenResource,
14-
TokenResourceWithRawResponse,
15-
AsyncTokenResourceWithRawResponse,
16-
TokenResourceWithStreamingResponse,
17-
AsyncTokenResourceWithStreamingResponse,
18-
)
1911
from .accounts import (
2012
AccountsResource,
2113
AsyncAccountsResource,
@@ -66,10 +58,4 @@
6658
"AsyncMessagesResourceWithRawResponse",
6759
"MessagesResourceWithStreamingResponse",
6860
"AsyncMessagesResourceWithStreamingResponse",
69-
"TokenResource",
70-
"AsyncTokenResource",
71-
"TokenResourceWithRawResponse",
72-
"AsyncTokenResourceWithRawResponse",
73-
"TokenResourceWithStreamingResponse",
74-
"AsyncTokenResourceWithStreamingResponse",
7561
]

src/beeper_desktop_api/resources/token.py

Lines changed: 0 additions & 139 deletions
This file was deleted.

src/beeper_desktop_api/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
BaseResponse as BaseResponse,
1313
)
1414
from .account import Account as Account
15-
from .user_info import UserInfo as UserInfo
1615
from .open_response import OpenResponse as OpenResponse
1716
from .search_response import SearchResponse as SearchResponse
1817
from .chat_list_params import ChatListParams as ChatListParams
@@ -32,4 +31,5 @@
3231
from .message_send_response import MessageSendResponse as MessageSendResponse
3332
from .contact_search_response import ContactSearchResponse as ContactSearchResponse
3433
from .download_asset_response import DownloadAssetResponse as DownloadAssetResponse
34+
from .get_token_info_response import GetTokenInfoResponse as GetTokenInfoResponse
3535
from .client_download_asset_params import ClientDownloadAssetParams as ClientDownloadAssetParams

src/beeper_desktop_api/types/user_info.py renamed to src/beeper_desktop_api/types/get_token_info_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
from .._models import BaseModel
77

8-
__all__ = ["UserInfo"]
8+
__all__ = ["GetTokenInfoResponse"]
99

1010

11-
class UserInfo(BaseModel):
11+
class GetTokenInfoResponse(BaseModel):
1212
iat: float
1313
"""Issued at timestamp (Unix epoch seconds)"""
1414

0 commit comments

Comments
 (0)