Skip to content

Commit 2954990

Browse files
feat(api): aggregated API specs update
1 parent ff00e5a commit 2954990

7 files changed

Lines changed: 3 additions & 206 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 523
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-e7516303f903fe1c8f61ff65cf87e17eab9417800b0592277e00aaeac8c8a658.yml
3-
openapi_spec_hash: f4070c11c3c295565ec28aea7f8f6058
1+
configured_endpoints: 522
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-3721d496395e684887e9ba0386375910a4fe68253893ccfce4e79c2e8a5b84af.yml
3+
openapi_spec_hash: f95b9f70ed1b3b8230ef3a092c6acedd
44
config_hash: 54cc733438deaab24435d7c4226f02d7

api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,6 @@ from gcore.types.dns import (
19201920
DNSNameServer,
19211921
ZoneCreateResponse,
19221922
ZoneListResponse,
1923-
ZoneCheckDelegationStatusResponse,
19241923
ZoneExportResponse,
19251924
ZoneGetResponse,
19261925
ZoneGetStatisticsResponse,
@@ -1933,7 +1932,6 @@ Methods:
19331932
- <code title="post /dns/v2/zones">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">create</a>(\*\*<a href="src/gcore/types/dns/zone_create_params.py">params</a>) -> <a href="./src/gcore/types/dns/zone_create_response.py">ZoneCreateResponse</a></code>
19341933
- <code title="get /dns/v2/zones">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">list</a>(\*\*<a href="src/gcore/types/dns/zone_list_params.py">params</a>) -> <a href="./src/gcore/types/dns/zone_list_response.py">ZoneListResponse</a></code>
19351934
- <code title="delete /dns/v2/zones/{name}">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">delete</a>(name) -> object</code>
1936-
- <code title="post /dns/v2/analyze/{name}/delegation-status">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">check_delegation_status</a>(name) -> <a href="./src/gcore/types/dns/zone_check_delegation_status_response.py">ZoneCheckDelegationStatusResponse</a></code>
19371935
- <code title="patch /dns/v2/zones/{name}/disable">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">disable</a>(name) -> object</code>
19381936
- <code title="patch /dns/v2/zones/{name}/enable">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">enable</a>(name) -> object</code>
19391937
- <code title="get /dns/v2/zones/{zoneName}/export">client.dns.zones.<a href="./src/gcore/resources/dns/zones/zones.py">export</a>(zone_name) -> <a href="./src/gcore/types/dns/zone_export_response.py">ZoneExportResponse</a></code>

src/gcore/resources/dns/zones/zones.py

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
from ....types.dns.zone_export_response import ZoneExportResponse
4949
from ....types.dns.zone_import_response import ZoneImportResponse
5050
from ....types.dns.zone_get_statistics_response import ZoneGetStatisticsResponse
51-
from ....types.dns.zone_check_delegation_status_response import ZoneCheckDelegationStatusResponse
5251

5352
__all__ = ["ZonesResource", "AsyncZonesResource"]
5453

@@ -290,41 +289,6 @@ def delete(
290289
cast_to=object,
291290
)
292291

293-
def check_delegation_status(
294-
self,
295-
name: str,
296-
*,
297-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
298-
# The extra values given here take precedence over values defined on the client or passed to this method.
299-
extra_headers: Headers | None = None,
300-
extra_query: Query | None = None,
301-
extra_body: Body | None = None,
302-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
303-
) -> ZoneCheckDelegationStatusResponse:
304-
"""Returns delegation status for specified domain name.
305-
306-
This endpoint has rate
307-
limit.
308-
309-
Args:
310-
extra_headers: Send extra headers
311-
312-
extra_query: Add additional query parameters to the request
313-
314-
extra_body: Add additional JSON properties to the request
315-
316-
timeout: Override the client-level default timeout for this request, in seconds
317-
"""
318-
if not name:
319-
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
320-
return self._post(
321-
f"/dns/v2/analyze/{name}/delegation-status",
322-
options=make_request_options(
323-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
324-
),
325-
cast_to=ZoneCheckDelegationStatusResponse,
326-
)
327-
328292
def disable(
329293
self,
330294
name: str,
@@ -916,41 +880,6 @@ async def delete(
916880
cast_to=object,
917881
)
918882

919-
async def check_delegation_status(
920-
self,
921-
name: str,
922-
*,
923-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
924-
# The extra values given here take precedence over values defined on the client or passed to this method.
925-
extra_headers: Headers | None = None,
926-
extra_query: Query | None = None,
927-
extra_body: Body | None = None,
928-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
929-
) -> ZoneCheckDelegationStatusResponse:
930-
"""Returns delegation status for specified domain name.
931-
932-
This endpoint has rate
933-
limit.
934-
935-
Args:
936-
extra_headers: Send extra headers
937-
938-
extra_query: Add additional query parameters to the request
939-
940-
extra_body: Add additional JSON properties to the request
941-
942-
timeout: Override the client-level default timeout for this request, in seconds
943-
"""
944-
if not name:
945-
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
946-
return await self._post(
947-
f"/dns/v2/analyze/{name}/delegation-status",
948-
options=make_request_options(
949-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
950-
),
951-
cast_to=ZoneCheckDelegationStatusResponse,
952-
)
953-
954883
async def disable(
955884
self,
956885
name: str,
@@ -1318,9 +1247,6 @@ def __init__(self, zones: ZonesResource) -> None:
13181247
self.delete = to_raw_response_wrapper(
13191248
zones.delete,
13201249
)
1321-
self.check_delegation_status = to_raw_response_wrapper(
1322-
zones.check_delegation_status,
1323-
)
13241250
self.disable = to_raw_response_wrapper(
13251251
zones.disable,
13261252
)
@@ -1365,9 +1291,6 @@ def __init__(self, zones: AsyncZonesResource) -> None:
13651291
self.delete = async_to_raw_response_wrapper(
13661292
zones.delete,
13671293
)
1368-
self.check_delegation_status = async_to_raw_response_wrapper(
1369-
zones.check_delegation_status,
1370-
)
13711294
self.disable = async_to_raw_response_wrapper(
13721295
zones.disable,
13731296
)
@@ -1412,9 +1335,6 @@ def __init__(self, zones: ZonesResource) -> None:
14121335
self.delete = to_streamed_response_wrapper(
14131336
zones.delete,
14141337
)
1415-
self.check_delegation_status = to_streamed_response_wrapper(
1416-
zones.check_delegation_status,
1417-
)
14181338
self.disable = to_streamed_response_wrapper(
14191339
zones.disable,
14201340
)
@@ -1459,9 +1379,6 @@ def __init__(self, zones: AsyncZonesResource) -> None:
14591379
self.delete = async_to_streamed_response_wrapper(
14601380
zones.delete,
14611381
)
1462-
self.check_delegation_status = async_to_streamed_response_wrapper(
1463-
zones.check_delegation_status,
1464-
)
14651382
self.disable = async_to_streamed_response_wrapper(
14661383
zones.disable,
14671384
)

src/gcore/types/dns/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from .dns_label_name import DNSLabelName as DNSLabelName
6-
from .dns_name_server import DNSNameServer as DNSNameServer
76
from .zone_list_params import ZoneListParams as ZoneListParams
87
from .dns_lookup_params import DNSLookupParams as DNSLookupParams
98
from .zone_get_response import ZoneGetResponse as ZoneGetResponse
@@ -26,6 +25,3 @@
2625
from .location_list_countries_response import LocationListCountriesResponse as LocationListCountriesResponse
2726
from .dns_get_account_overview_response import DNSGetAccountOverviewResponse as DNSGetAccountOverviewResponse
2827
from .location_list_continents_response import LocationListContinentsResponse as LocationListContinentsResponse
29-
from .zone_check_delegation_status_response import (
30-
ZoneCheckDelegationStatusResponse as ZoneCheckDelegationStatusResponse,
31-
)

src/gcore/types/dns/dns_name_server.py

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

src/gcore/types/dns/zone_check_delegation_status_response.py

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

tests/api_resources/dns/test_zones.py

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
ZoneExportResponse,
1818
ZoneImportResponse,
1919
ZoneGetStatisticsResponse,
20-
ZoneCheckDelegationStatusResponse,
2120
)
2221

2322
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -159,44 +158,6 @@ def test_path_params_delete(self, client: Gcore) -> None:
159158
"",
160159
)
161160

162-
@parametrize
163-
def test_method_check_delegation_status(self, client: Gcore) -> None:
164-
zone = client.dns.zones.check_delegation_status(
165-
"name",
166-
)
167-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
168-
169-
@parametrize
170-
def test_raw_response_check_delegation_status(self, client: Gcore) -> None:
171-
response = client.dns.zones.with_raw_response.check_delegation_status(
172-
"name",
173-
)
174-
175-
assert response.is_closed is True
176-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
177-
zone = response.parse()
178-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
179-
180-
@parametrize
181-
def test_streaming_response_check_delegation_status(self, client: Gcore) -> None:
182-
with client.dns.zones.with_streaming_response.check_delegation_status(
183-
"name",
184-
) as response:
185-
assert not response.is_closed
186-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
187-
188-
zone = response.parse()
189-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
190-
191-
assert cast(Any, response.is_closed) is True
192-
193-
@parametrize
194-
def test_path_params_check_delegation_status(self, client: Gcore) -> None:
195-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `name` but received ''"):
196-
client.dns.zones.with_raw_response.check_delegation_status(
197-
"",
198-
)
199-
200161
@parametrize
201162
def test_method_disable(self, client: Gcore) -> None:
202163
zone = client.dns.zones.disable(
@@ -642,44 +603,6 @@ async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
642603
"",
643604
)
644605

645-
@parametrize
646-
async def test_method_check_delegation_status(self, async_client: AsyncGcore) -> None:
647-
zone = await async_client.dns.zones.check_delegation_status(
648-
"name",
649-
)
650-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
651-
652-
@parametrize
653-
async def test_raw_response_check_delegation_status(self, async_client: AsyncGcore) -> None:
654-
response = await async_client.dns.zones.with_raw_response.check_delegation_status(
655-
"name",
656-
)
657-
658-
assert response.is_closed is True
659-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
660-
zone = await response.parse()
661-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
662-
663-
@parametrize
664-
async def test_streaming_response_check_delegation_status(self, async_client: AsyncGcore) -> None:
665-
async with async_client.dns.zones.with_streaming_response.check_delegation_status(
666-
"name",
667-
) as response:
668-
assert not response.is_closed
669-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
670-
671-
zone = await response.parse()
672-
assert_matches_type(ZoneCheckDelegationStatusResponse, zone, path=["response"])
673-
674-
assert cast(Any, response.is_closed) is True
675-
676-
@parametrize
677-
async def test_path_params_check_delegation_status(self, async_client: AsyncGcore) -> None:
678-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `name` but received ''"):
679-
await async_client.dns.zones.with_raw_response.check_delegation_status(
680-
"",
681-
)
682-
683606
@parametrize
684607
async def test_method_disable(self, async_client: AsyncGcore) -> None:
685608
zone = await async_client.dns.zones.disable(

0 commit comments

Comments
 (0)