Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 18, 2024
1 parent f9b879a commit b762e85
Show file tree
Hide file tree
Showing 117 changed files with 197 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1348
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9d1a5f2de8e753867ab88ca1b88d1d1cdc944a7834fb81506a7ace10ed151624.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb8d2c58c029167d6eb04131ff40df5631570c1bc49279bc148b2331fa68dee.yml
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6561,7 +6561,7 @@ Methods:

- <code title="get /radar/datasets">client.radar.datasets.<a href="./src/cloudflare/resources/radar/datasets.py">list</a>(\*\*<a href="src/cloudflare/types/radar/dataset_list_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/dataset_list_response.py">DatasetListResponse</a></code>
- <code title="post /radar/datasets/download">client.radar.datasets.<a href="./src/cloudflare/resources/radar/datasets.py">download</a>(\*\*<a href="src/cloudflare/types/radar/dataset_download_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/dataset_download_response.py">DatasetDownloadResponse</a></code>
- <code title="get /radar/datasets/{alias}">client.radar.datasets.<a href="./src/cloudflare/resources/radar/datasets.py">get</a>(alias, \*\*<a href="src/cloudflare/types/radar/dataset_get_params.py">params</a>) -> str</code>
- <code title="get /radar/datasets/{alias}">client.radar.datasets.<a href="./src/cloudflare/resources/radar/datasets.py">get</a>(alias) -> str</code>

## DNS

Expand Down
10 changes: 10 additions & 0 deletions src/cloudflare/resources/radar/attacks/layer3/top/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def attacks(
limit_per_location: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | 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.
Expand Down Expand Up @@ -134,6 +135,9 @@ def attacks(
name: Array of names that will be used to name the series in responses.
normalization: Normalization method applied. Refer to
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
protocol: Array of L3/4 attack types.
extra_headers: Send extra headers
Expand Down Expand Up @@ -164,6 +168,7 @@ def attacks(
"limit_per_location": limit_per_location,
"location": location,
"name": name,
"normalization": normalization,
"protocol": protocol,
},
top_attacks_params.TopAttacksParams,
Expand Down Expand Up @@ -428,6 +433,7 @@ async def attacks(
limit_per_location: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | 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.
Expand Down Expand Up @@ -475,6 +481,9 @@ async def attacks(
name: Array of names that will be used to name the series in responses.
normalization: Normalization method applied. Refer to
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
protocol: Array of L3/4 attack types.
extra_headers: Send extra headers
Expand Down Expand Up @@ -505,6 +514,7 @@ async def attacks(
"limit_per_location": limit_per_location,
"location": location,
"name": name,
"normalization": normalization,
"protocol": protocol,
},
top_attacks_params.TopAttacksParams,
Expand Down
10 changes: 10 additions & 0 deletions src/cloudflare/resources/radar/attacks/layer7/top/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def attacks(
location: List[str] | NotGiven = NOT_GIVEN,
magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
normalization: Literal["PERCENTAGE", "MIN_MAX"] | 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,
Expand Down Expand Up @@ -152,6 +153,9 @@ def attacks(
name: Array of names that will be used to name the series in responses.
normalization: Normalization method applied. Refer to
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -181,6 +185,7 @@ def attacks(
"location": location,
"magnitude": magnitude,
"name": name,
"normalization": normalization,
},
top_attacks_params.TopAttacksParams,
),
Expand Down Expand Up @@ -445,6 +450,7 @@ async def attacks(
location: List[str] | NotGiven = NOT_GIVEN,
magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
normalization: Literal["PERCENTAGE", "MIN_MAX"] | 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,
Expand Down Expand Up @@ -497,6 +503,9 @@ async def attacks(
name: Array of names that will be used to name the series in responses.
normalization: Normalization method applied. Refer to
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -526,6 +535,7 @@ async def attacks(
"location": location,
"magnitude": magnitude,
"name": name,
"normalization": normalization,
},
top_attacks_params.TopAttacksParams,
),
Expand Down
22 changes: 4 additions & 18 deletions src/cloudflare/resources/radar/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, Optional, cast
from typing import Type, cast
from typing_extensions import Literal

import httpx
Expand All @@ -21,7 +21,7 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
from ...types.radar import dataset_get_params, dataset_list_params, dataset_download_params
from ...types.radar import dataset_list_params, dataset_download_params
from ..._base_client import (
make_request_options,
)
Expand Down Expand Up @@ -139,7 +139,6 @@ def get(
self,
alias: str,
*,
date: Optional[str] | 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,
Expand All @@ -156,8 +155,6 @@ def get(
Args:
alias: Dataset alias or id
date: Filter dataset alias by date
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -172,11 +169,7 @@ def get(
return self._get(
f"/radar/datasets/{alias}",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"date": date}, dataset_get_params.DatasetGetParams),
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=str,
)
Expand Down Expand Up @@ -290,7 +283,6 @@ async def get(
self,
alias: str,
*,
date: Optional[str] | 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,
Expand All @@ -307,8 +299,6 @@ async def get(
Args:
alias: Dataset alias or id
date: Filter dataset alias by date
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand All @@ -323,11 +313,7 @@ async def get(
return await self._get(
f"/radar/datasets/{alias}",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform({"date": date}, dataset_get_params.DatasetGetParams),
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=str,
)
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/resources/radar/ranking/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Optional, cast
from typing import List, Type, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -43,7 +43,7 @@ def get(
self,
domain: str,
*,
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
date: List[str] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -119,7 +119,7 @@ async def get(
self,
domain: str,
*,
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
date: List[str] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
name: List[str] | NotGiven = NOT_GIVEN,
Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/resources/radar/ranking/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Union, Optional, cast
from typing import List, Type, Union, cast
from datetime import datetime
from typing_extensions import Literal

Expand Down Expand Up @@ -153,7 +153,7 @@ def timeseries_groups(
def top(
self,
*,
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
date: List[str] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -331,7 +331,7 @@ async def timeseries_groups(
async def top(
self,
*,
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
date: List[str] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
limit: int | NotGiven = NOT_GIVEN,
location: List[str] | NotGiven = NOT_GIVEN,
Expand Down
1 change: 0 additions & 1 deletion src/cloudflare/types/radar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

from .entity_get_params import EntityGetParams as EntityGetParams
from .dataset_get_params import DatasetGetParams as DatasetGetParams
from .radar_email_series import RadarEmailSeries as RadarEmailSeries
from .ranking_top_params import RankingTopParams as RankingTopParams
from .dataset_list_params import DatasetListParams as DatasetListParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/radar/as112/summary_edns_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/radar/as112/top_dnssec_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/radar/as112/top_edns_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/radar/as112/top_locations_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/radar/as112_timeseries_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):

event_type: str = FieldInfo(alias="eventType")

is_instantaneous: object = FieldInfo(alias="isInstantaneous")
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")

end_time: Optional[datetime] = FieldInfo(alias="endTime", default=None)

Expand Down
Loading

0 comments on commit b762e85

Please sign in to comment.