Skip to content

Commit f82c2b5

Browse files
feat(api): update via SDK Studio
1 parent c7b0af6 commit f82c2b5

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
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: 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: 4afa3c24db26c8c374eeaf0a739e1b59
4+
config_hash: 85255d5a167e2f4bcf8a9314d653ec01

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Methods:
1515
Types:
1616

1717
```python
18-
from hyperspell.types.integrations import GoogleCalendarListResponse
18+
from hyperspell.types.integrations import Calendar
1919
```
2020

2121
Methods:
2222

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>
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/calendar.py">Calendar</a></code>
2424

2525
## WebCrawler
2626

src/hyperspell/resources/integrations/google_calendar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
async_to_streamed_response_wrapper,
1515
)
1616
from ..._base_client import make_request_options
17-
from ...types.integrations.google_calendar_list_response import GoogleCalendarListResponse
17+
from ...types.integrations.calendar import Calendar
1818

1919
__all__ = ["GoogleCalendarResource", "AsyncGoogleCalendarResource"]
2020

@@ -48,7 +48,7 @@ def list(
4848
extra_query: Query | None = None,
4949
extra_body: Body | None = None,
5050
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
51-
) -> GoogleCalendarListResponse:
51+
) -> Calendar:
5252
"""List available calendars for a user.
5353
5454
This can be used to ie. populate a dropdown
@@ -59,7 +59,7 @@ def list(
5959
options=make_request_options(
6060
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
6161
),
62-
cast_to=GoogleCalendarListResponse,
62+
cast_to=Calendar,
6363
)
6464

6565

@@ -92,7 +92,7 @@ async def list(
9292
extra_query: Query | None = None,
9393
extra_body: Body | None = None,
9494
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
95-
) -> GoogleCalendarListResponse:
95+
) -> Calendar:
9696
"""List available calendars for a user.
9797
9898
This can be used to ie. populate a dropdown
@@ -103,7 +103,7 @@ async def list(
103103
options=make_request_options(
104104
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
105105
),
106-
cast_to=GoogleCalendarListResponse,
106+
cast_to=Calendar,
107107
)
108108

109109

src/hyperspell/types/integrations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
from __future__ import annotations
44

5+
from .calendar import Calendar as Calendar
56
from .web_crawler_index_params import WebCrawlerIndexParams as WebCrawlerIndexParams
67
from .web_crawler_index_response import WebCrawlerIndexResponse as WebCrawlerIndexResponse
7-
from .google_calendar_list_response import GoogleCalendarListResponse as GoogleCalendarListResponse

src/hyperspell/types/integrations/google_calendar_list_response.py renamed to src/hyperspell/types/integrations/calendar.py

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

55
from ..._models import BaseModel
66

7-
__all__ = ["GoogleCalendarListResponse", "Item"]
7+
__all__ = ["Calendar", "Item"]
88

99

1010
class Item(BaseModel):
@@ -21,5 +21,5 @@ class Item(BaseModel):
2121
"""Default timezone of the calendar"""
2222

2323

24-
class GoogleCalendarListResponse(BaseModel):
24+
class Calendar(BaseModel):
2525
items: List[Item]

tests/api_resources/integrations/test_google_calendar.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from hyperspell import Hyperspell, AsyncHyperspell
1111
from tests.utils import assert_matches_type
12-
from hyperspell.types.integrations import GoogleCalendarListResponse
12+
from hyperspell.types.integrations import Calendar
1313

1414
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1515

@@ -20,7 +20,7 @@ class TestGoogleCalendar:
2020
@parametrize
2121
def test_method_list(self, client: Hyperspell) -> None:
2222
google_calendar = client.integrations.google_calendar.list()
23-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
23+
assert_matches_type(Calendar, google_calendar, path=["response"])
2424

2525
@parametrize
2626
def test_raw_response_list(self, client: Hyperspell) -> None:
@@ -29,7 +29,7 @@ def test_raw_response_list(self, client: Hyperspell) -> None:
2929
assert response.is_closed is True
3030
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
3131
google_calendar = response.parse()
32-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
32+
assert_matches_type(Calendar, google_calendar, path=["response"])
3333

3434
@parametrize
3535
def test_streaming_response_list(self, client: Hyperspell) -> None:
@@ -38,7 +38,7 @@ def test_streaming_response_list(self, client: Hyperspell) -> None:
3838
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
3939

4040
google_calendar = response.parse()
41-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
41+
assert_matches_type(Calendar, google_calendar, path=["response"])
4242

4343
assert cast(Any, response.is_closed) is True
4444

@@ -49,7 +49,7 @@ class TestAsyncGoogleCalendar:
4949
@parametrize
5050
async def test_method_list(self, async_client: AsyncHyperspell) -> None:
5151
google_calendar = await async_client.integrations.google_calendar.list()
52-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
52+
assert_matches_type(Calendar, google_calendar, path=["response"])
5353

5454
@parametrize
5555
async def test_raw_response_list(self, async_client: AsyncHyperspell) -> None:
@@ -58,7 +58,7 @@ async def test_raw_response_list(self, async_client: AsyncHyperspell) -> None:
5858
assert response.is_closed is True
5959
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
6060
google_calendar = await response.parse()
61-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
61+
assert_matches_type(Calendar, google_calendar, path=["response"])
6262

6363
@parametrize
6464
async def test_streaming_response_list(self, async_client: AsyncHyperspell) -> None:
@@ -67,6 +67,6 @@ async def test_streaming_response_list(self, async_client: AsyncHyperspell) -> N
6767
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
6868

6969
google_calendar = await response.parse()
70-
assert_matches_type(GoogleCalendarListResponse, google_calendar, path=["response"])
70+
assert_matches_type(Calendar, google_calendar, path=["response"])
7171

7272
assert cast(Any, response.is_closed) is True

0 commit comments

Comments
 (0)