Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #835

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1335
configured_endpoints: 1338
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-563da3da7347fb7ce5676737cc6a457de5da7c96aa7d44098a9db3b2fb8d6599.yml
34 changes: 32 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,21 @@ from cloudflare.types.workers import AIRunResponse

Methods:

- <code title="post /accounts/{account_id}/ai/run/{model_name}">client.workers.ai.<a href="./src/cloudflare/resources/workers/ai.py">run</a>(model_name, \*, account_id, \*\*<a href="src/cloudflare/types/workers/ai_run_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/ai_run_response.py">Optional</a></code>
- <code title="post /accounts/{account_id}/ai/run/{model_name}">client.workers.ai.<a href="./src/cloudflare/resources/workers/ai/ai.py">run</a>(model_name, \*, account_id, \*\*<a href="src/cloudflare/types/workers/ai_run_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/ai_run_response.py">Optional</a></code>

### Models

#### Schema

Types:

```python
from cloudflare.types.workers.ai.models import SchemaGetResponse
```

Methods:

- <code title="get /accounts/{account_id}/ai/models/schema">client.workers.ai.models.schema.<a href="./src/cloudflare/resources/workers/ai/models/schema.py">get</a>(\*, account_id, \*\*<a href="src/cloudflare/types/workers/ai/models/schema_get_params.py">params</a>) -> <a href="./src/cloudflare/types/workers/ai/models/schema_get_response.py">object</a></code>

## Scripts

Expand Down Expand Up @@ -6494,11 +6508,17 @@ Methods:
Types:

```python
from cloudflare.types.radar.bgp import RouteMoasResponse, RoutePfx2asResponse, RouteStatsResponse
from cloudflare.types.radar.bgp import (
RouteAsesResponse,
RouteMoasResponse,
RoutePfx2asResponse,
RouteStatsResponse,
)
```

Methods:

- <code title="get /radar/bgp/routes/ases">client.radar.bgp.routes.<a href="./src/cloudflare/resources/radar/bgp/routes.py">ases</a>(\*\*<a href="src/cloudflare/types/radar/bgp/route_ases_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/route_ases_response.py">RouteAsesResponse</a></code>
- <code title="get /radar/bgp/routes/moas">client.radar.bgp.routes.<a href="./src/cloudflare/resources/radar/bgp/routes.py">moas</a>(\*\*<a href="src/cloudflare/types/radar/bgp/route_moas_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/route_moas_response.py">RouteMoasResponse</a></code>
- <code title="get /radar/bgp/routes/pfx2as">client.radar.bgp.routes.<a href="./src/cloudflare/resources/radar/bgp/routes.py">pfx2as</a>(\*\*<a href="src/cloudflare/types/radar/bgp/route_pfx2as_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/route_pfx2as_response.py">RoutePfx2asResponse</a></code>
- <code title="get /radar/bgp/routes/stats">client.radar.bgp.routes.<a href="./src/cloudflare/resources/radar/bgp/routes.py">stats</a>(\*\*<a href="src/cloudflare/types/radar/bgp/route_stats_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/route_stats_response.py">RouteStatsResponse</a></code>
Expand Down Expand Up @@ -7113,6 +7133,16 @@ Methods:

## HTTP

Types:

```python
from cloudflare.types.radar import HTTPTimeseriesResponse
```

Methods:

- <code title="get /radar/http/timeseries">client.radar.http.<a href="./src/cloudflare/resources/radar/http/http.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/http_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/http_timeseries_response.py">HTTPTimeseriesResponse</a></code>

### Top

Types:
Expand Down
135 changes: 134 additions & 1 deletion src/cloudflare/resources/radar/bgp/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
from ...._base_client import (
make_request_options,
)
from ....types.radar.bgp import route_moas_params, route_stats_params, route_pfx2as_params
from ....types.radar.bgp import route_ases_params, route_moas_params, route_stats_params, route_pfx2as_params
from ....types.radar.bgp.route_ases_response import RouteAsesResponse
from ....types.radar.bgp.route_moas_response import RouteMoasResponse
from ....types.radar.bgp.route_stats_response import RouteStatsResponse
from ....types.radar.bgp.route_pfx2as_response import RoutePfx2asResponse
Expand All @@ -41,6 +42,66 @@ def with_raw_response(self) -> RoutesResourceWithRawResponse:
def with_streaming_response(self) -> RoutesResourceWithStreamingResponse:
return RoutesResourceWithStreamingResponse(self)

def ases(
self,
*,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
location: str | NotGiven = NOT_GIVEN,
sort_by: Literal["cone", "pfxs", "ipv4", "ipv6", "rpki_valid", "rpki_invalid", "rpki_unknown"]
| NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteAsesResponse:
"""
List all ASes on current global routing tables with routing statistics
Args:
format: Format results are returned in.
limit: Limit the number of objects in the response.
location: Location Alpha2 code.
sort_by: Return order results by given type
sort_order: Sort by value ascending or descending
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
"/radar/bgp/routes/ases",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"format": format,
"limit": limit,
"location": location,
"sort_by": sort_by,
"sort_order": sort_order,
},
route_ases_params.RouteAsesParams,
),
post_parser=ResultWrapper[RouteAsesResponse]._unwrapper,
),
cast_to=cast(Type[RouteAsesResponse], ResultWrapper[RouteAsesResponse]),
)

def moas(
self,
*,
Expand Down Expand Up @@ -217,6 +278,66 @@ def with_raw_response(self) -> AsyncRoutesResourceWithRawResponse:
def with_streaming_response(self) -> AsyncRoutesResourceWithStreamingResponse:
return AsyncRoutesResourceWithStreamingResponse(self)

async def ases(
self,
*,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
location: str | NotGiven = NOT_GIVEN,
sort_by: Literal["cone", "pfxs", "ipv4", "ipv6", "rpki_valid", "rpki_invalid", "rpki_unknown"]
| NotGiven = NOT_GIVEN,
sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> RouteAsesResponse:
"""
List all ASes on current global routing tables with routing statistics
Args:
format: Format results are returned in.
limit: Limit the number of objects in the response.
location: Location Alpha2 code.
sort_by: Return order results by given type
sort_order: Sort by value ascending or descending
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
"/radar/bgp/routes/ases",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"format": format,
"limit": limit,
"location": location,
"sort_by": sort_by,
"sort_order": sort_order,
},
route_ases_params.RouteAsesParams,
),
post_parser=ResultWrapper[RouteAsesResponse]._unwrapper,
),
cast_to=cast(Type[RouteAsesResponse], ResultWrapper[RouteAsesResponse]),
)

async def moas(
self,
*,
Expand Down Expand Up @@ -388,6 +509,9 @@ class RoutesResourceWithRawResponse:
def __init__(self, routes: RoutesResource) -> None:
self._routes = routes

self.ases = to_raw_response_wrapper(
routes.ases,
)
self.moas = to_raw_response_wrapper(
routes.moas,
)
Expand All @@ -403,6 +527,9 @@ class AsyncRoutesResourceWithRawResponse:
def __init__(self, routes: AsyncRoutesResource) -> None:
self._routes = routes

self.ases = async_to_raw_response_wrapper(
routes.ases,
)
self.moas = async_to_raw_response_wrapper(
routes.moas,
)
Expand All @@ -418,6 +545,9 @@ class RoutesResourceWithStreamingResponse:
def __init__(self, routes: RoutesResource) -> None:
self._routes = routes

self.ases = to_streamed_response_wrapper(
routes.ases,
)
self.moas = to_streamed_response_wrapper(
routes.moas,
)
Expand All @@ -433,6 +563,9 @@ class AsyncRoutesResourceWithStreamingResponse:
def __init__(self, routes: AsyncRoutesResource) -> None:
self._routes = routes

self.ases = async_to_streamed_response_wrapper(
routes.ases,
)
self.moas = async_to_streamed_response_wrapper(
routes.moas,
)
Expand Down
Loading