Skip to content

Commit 4277aee

Browse files
feat(api): update via SDK Studio
1 parent d629ff8 commit 4277aee

21 files changed

+1108
-4
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: 10
1+
configured_endpoints: 14
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-f6fece9d5716fd37ebca63185e4e926011974dcef9b76da72afc2f8a0fcec988.yml
33
openapi_spec_hash: dc4b381a6a2ae7ea6d7ad0d5df10e0e7
4-
config_hash: 63e7969fd7c560b6105e1de79148b568
4+
config_hash: 33c1aaeaa1f52b66e0020d1a30c48e0c

api.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# Integrations
2+
3+
Types:
4+
5+
```python
6+
from hyperspell.types import IntegrationRevokeResponse
7+
```
8+
9+
Methods:
10+
11+
- <code title="get /integrations/{provider}/revoke">client.integrations.<a href="./src/hyperspell/resources/integrations/integrations.py">revoke</a>(provider) -> <a href="./src/hyperspell/types/integration_revoke_response.py">IntegrationRevokeResponse</a></code>
12+
13+
## GoogleCalendar
14+
15+
Types:
16+
17+
```python
18+
from hyperspell.types.integrations import GoogleCalendarListResponse
19+
```
20+
21+
Methods:
22+
23+
- <code title="get /integrations/google_calendar/list">client.integrations.google_calendar.<a href="./src/hyperspell/resources/integrations/google_calendar.py">list</a>() -> <a href="./src/hyperspell/types/integrations/google_calendar_list_response.py">GoogleCalendarListResponse</a></code>
24+
25+
## WebCrawler
26+
27+
Types:
28+
29+
```python
30+
from hyperspell.types.integrations import WebCrawlerIndexResponse
31+
```
32+
33+
Methods:
34+
35+
- <code title="get /integrations/web_crawler/index">client.integrations.web_crawler.<a href="./src/hyperspell/resources/integrations/web_crawler.py">index</a>(\*\*<a href="src/hyperspell/types/integrations/web_crawler_index_params.py">params</a>) -> <a href="./src/hyperspell/types/integrations/web_crawler_index_response.py">WebCrawlerIndexResponse</a></code>
36+
137
# Documents
238

339
Types:
@@ -45,9 +81,10 @@ Methods:
4581
Types:
4682

4783
```python
48-
from hyperspell.types import Token
84+
from hyperspell.types import Token, AuthMeResponse
4985
```
5086

5187
Methods:
5288

89+
- <code title="get /auth/me">client.auth.<a href="./src/hyperspell/resources/auth.py">me</a>() -> <a href="./src/hyperspell/types/auth_me_response.py">AuthMeResponse</a></code>
5390
- <code title="post /auth/user_token">client.auth.<a href="./src/hyperspell/resources/auth.py">user_token</a>(\*\*<a href="src/hyperspell/types/auth_user_token_params.py">params</a>) -> <a href="./src/hyperspell/types/token.py">Token</a></code>

src/hyperspell/_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
SyncAPIClient,
3434
AsyncAPIClient,
3535
)
36+
from .resources.integrations import integrations
3637

3738
__all__ = [
3839
"Timeout",
@@ -47,6 +48,7 @@
4748

4849

4950
class Hyperspell(SyncAPIClient):
51+
integrations: integrations.IntegrationsResource
5052
documents: documents.DocumentsResource
5153
collections: collections.CollectionsResource
5254
query: query.QueryResource
@@ -104,6 +106,7 @@ def __init__(
104106
_strict_response_validation=_strict_response_validation,
105107
)
106108

109+
self.integrations = integrations.IntegrationsResource(self)
107110
self.documents = documents.DocumentsResource(self)
108111
self.collections = collections.CollectionsResource(self)
109112
self.query = query.QueryResource(self)
@@ -230,6 +233,7 @@ def _make_status_error(
230233

231234

232235
class AsyncHyperspell(AsyncAPIClient):
236+
integrations: integrations.AsyncIntegrationsResource
233237
documents: documents.AsyncDocumentsResource
234238
collections: collections.AsyncCollectionsResource
235239
query: query.AsyncQueryResource
@@ -287,6 +291,7 @@ def __init__(
287291
_strict_response_validation=_strict_response_validation,
288292
)
289293

294+
self.integrations = integrations.AsyncIntegrationsResource(self)
290295
self.documents = documents.AsyncDocumentsResource(self)
291296
self.collections = collections.AsyncCollectionsResource(self)
292297
self.query = query.AsyncQueryResource(self)
@@ -414,6 +419,7 @@ def _make_status_error(
414419

415420
class HyperspellWithRawResponse:
416421
def __init__(self, client: Hyperspell) -> None:
422+
self.integrations = integrations.IntegrationsResourceWithRawResponse(client.integrations)
417423
self.documents = documents.DocumentsResourceWithRawResponse(client.documents)
418424
self.collections = collections.CollectionsResourceWithRawResponse(client.collections)
419425
self.query = query.QueryResourceWithRawResponse(client.query)
@@ -422,6 +428,7 @@ def __init__(self, client: Hyperspell) -> None:
422428

423429
class AsyncHyperspellWithRawResponse:
424430
def __init__(self, client: AsyncHyperspell) -> None:
431+
self.integrations = integrations.AsyncIntegrationsResourceWithRawResponse(client.integrations)
425432
self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents)
426433
self.collections = collections.AsyncCollectionsResourceWithRawResponse(client.collections)
427434
self.query = query.AsyncQueryResourceWithRawResponse(client.query)
@@ -430,6 +437,7 @@ def __init__(self, client: AsyncHyperspell) -> None:
430437

431438
class HyperspellWithStreamedResponse:
432439
def __init__(self, client: Hyperspell) -> None:
440+
self.integrations = integrations.IntegrationsResourceWithStreamingResponse(client.integrations)
433441
self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents)
434442
self.collections = collections.CollectionsResourceWithStreamingResponse(client.collections)
435443
self.query = query.QueryResourceWithStreamingResponse(client.query)
@@ -438,6 +446,7 @@ def __init__(self, client: Hyperspell) -> None:
438446

439447
class AsyncHyperspellWithStreamedResponse:
440448
def __init__(self, client: AsyncHyperspell) -> None:
449+
self.integrations = integrations.AsyncIntegrationsResourceWithStreamingResponse(client.integrations)
441450
self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents)
442451
self.collections = collections.AsyncCollectionsResourceWithStreamingResponse(client.collections)
443452
self.query = query.AsyncQueryResourceWithStreamingResponse(client.query)

src/hyperspell/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,22 @@
3232
CollectionsResourceWithStreamingResponse,
3333
AsyncCollectionsResourceWithStreamingResponse,
3434
)
35+
from .integrations import (
36+
IntegrationsResource,
37+
AsyncIntegrationsResource,
38+
IntegrationsResourceWithRawResponse,
39+
AsyncIntegrationsResourceWithRawResponse,
40+
IntegrationsResourceWithStreamingResponse,
41+
AsyncIntegrationsResourceWithStreamingResponse,
42+
)
3543

3644
__all__ = [
45+
"IntegrationsResource",
46+
"AsyncIntegrationsResource",
47+
"IntegrationsResourceWithRawResponse",
48+
"AsyncIntegrationsResourceWithRawResponse",
49+
"IntegrationsResourceWithStreamingResponse",
50+
"AsyncIntegrationsResourceWithStreamingResponse",
3751
"DocumentsResource",
3852
"AsyncDocumentsResource",
3953
"DocumentsResourceWithRawResponse",

src/hyperspell/resources/auth.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
)
2121
from ..types.token import Token
2222
from .._base_client import make_request_options
23+
from ..types.auth_me_response import AuthMeResponse
2324

2425
__all__ = ["AuthResource", "AsyncAuthResource"]
2526

@@ -44,6 +45,25 @@ def with_streaming_response(self) -> AuthResourceWithStreamingResponse:
4445
"""
4546
return AuthResourceWithStreamingResponse(self)
4647

48+
def me(
49+
self,
50+
*,
51+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
52+
# The extra values given here take precedence over values defined on the client or passed to this method.
53+
extra_headers: Headers | None = None,
54+
extra_query: Query | None = None,
55+
extra_body: Body | None = None,
56+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
57+
) -> AuthMeResponse:
58+
"""Endpoint to get basic user data."""
59+
return self._get(
60+
"/auth/me",
61+
options=make_request_options(
62+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
63+
),
64+
cast_to=AuthMeResponse,
65+
)
66+
4767
def user_token(
4868
self,
4969
*,
@@ -99,6 +119,25 @@ def with_streaming_response(self) -> AsyncAuthResourceWithStreamingResponse:
99119
"""
100120
return AsyncAuthResourceWithStreamingResponse(self)
101121

122+
async def me(
123+
self,
124+
*,
125+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
126+
# The extra values given here take precedence over values defined on the client or passed to this method.
127+
extra_headers: Headers | None = None,
128+
extra_query: Query | None = None,
129+
extra_body: Body | None = None,
130+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
131+
) -> AuthMeResponse:
132+
"""Endpoint to get basic user data."""
133+
return await self._get(
134+
"/auth/me",
135+
options=make_request_options(
136+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
137+
),
138+
cast_to=AuthMeResponse,
139+
)
140+
102141
async def user_token(
103142
self,
104143
*,
@@ -138,6 +177,9 @@ class AuthResourceWithRawResponse:
138177
def __init__(self, auth: AuthResource) -> None:
139178
self._auth = auth
140179

180+
self.me = to_raw_response_wrapper(
181+
auth.me,
182+
)
141183
self.user_token = to_raw_response_wrapper(
142184
auth.user_token,
143185
)
@@ -147,6 +189,9 @@ class AsyncAuthResourceWithRawResponse:
147189
def __init__(self, auth: AsyncAuthResource) -> None:
148190
self._auth = auth
149191

192+
self.me = async_to_raw_response_wrapper(
193+
auth.me,
194+
)
150195
self.user_token = async_to_raw_response_wrapper(
151196
auth.user_token,
152197
)
@@ -156,6 +201,9 @@ class AuthResourceWithStreamingResponse:
156201
def __init__(self, auth: AuthResource) -> None:
157202
self._auth = auth
158203

204+
self.me = to_streamed_response_wrapper(
205+
auth.me,
206+
)
159207
self.user_token = to_streamed_response_wrapper(
160208
auth.user_token,
161209
)
@@ -165,6 +213,9 @@ class AsyncAuthResourceWithStreamingResponse:
165213
def __init__(self, auth: AsyncAuthResource) -> None:
166214
self._auth = auth
167215

216+
self.me = async_to_streamed_response_wrapper(
217+
auth.me,
218+
)
168219
self.user_token = async_to_streamed_response_wrapper(
169220
auth.user_token,
170221
)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .web_crawler import (
4+
WebCrawlerResource,
5+
AsyncWebCrawlerResource,
6+
WebCrawlerResourceWithRawResponse,
7+
AsyncWebCrawlerResourceWithRawResponse,
8+
WebCrawlerResourceWithStreamingResponse,
9+
AsyncWebCrawlerResourceWithStreamingResponse,
10+
)
11+
from .integrations import (
12+
IntegrationsResource,
13+
AsyncIntegrationsResource,
14+
IntegrationsResourceWithRawResponse,
15+
AsyncIntegrationsResourceWithRawResponse,
16+
IntegrationsResourceWithStreamingResponse,
17+
AsyncIntegrationsResourceWithStreamingResponse,
18+
)
19+
from .google_calendar import (
20+
GoogleCalendarResource,
21+
AsyncGoogleCalendarResource,
22+
GoogleCalendarResourceWithRawResponse,
23+
AsyncGoogleCalendarResourceWithRawResponse,
24+
GoogleCalendarResourceWithStreamingResponse,
25+
AsyncGoogleCalendarResourceWithStreamingResponse,
26+
)
27+
28+
__all__ = [
29+
"GoogleCalendarResource",
30+
"AsyncGoogleCalendarResource",
31+
"GoogleCalendarResourceWithRawResponse",
32+
"AsyncGoogleCalendarResourceWithRawResponse",
33+
"GoogleCalendarResourceWithStreamingResponse",
34+
"AsyncGoogleCalendarResourceWithStreamingResponse",
35+
"WebCrawlerResource",
36+
"AsyncWebCrawlerResource",
37+
"WebCrawlerResourceWithRawResponse",
38+
"AsyncWebCrawlerResourceWithRawResponse",
39+
"WebCrawlerResourceWithStreamingResponse",
40+
"AsyncWebCrawlerResourceWithStreamingResponse",
41+
"IntegrationsResource",
42+
"AsyncIntegrationsResource",
43+
"IntegrationsResourceWithRawResponse",
44+
"AsyncIntegrationsResourceWithRawResponse",
45+
"IntegrationsResourceWithStreamingResponse",
46+
"AsyncIntegrationsResourceWithStreamingResponse",
47+
]

0 commit comments

Comments
 (0)