Skip to content

Commit b762e85

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1016)
1 parent f9b879a commit b762e85

File tree

117 files changed

+197
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+197
-173
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1348
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9d1a5f2de8e753867ab88ca1b88d1d1cdc944a7834fb81506a7ace10ed151624.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfb8d2c58c029167d6eb04131ff40df5631570c1bc49279bc148b2331fa68dee.yml

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6561,7 +6561,7 @@ Methods:
65616561

65626562
- <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>
65636563
- <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>
6564-
- <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>
6564+
- <code title="get /radar/datasets/{alias}">client.radar.datasets.<a href="./src/cloudflare/resources/radar/datasets.py">get</a>(alias) -> str</code>
65656565

65666566
## DNS
65676567

src/cloudflare/resources/radar/attacks/layer3/top/top.py

+10
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def attacks(
8787
limit_per_location: int | NotGiven = NOT_GIVEN,
8888
location: List[str] | NotGiven = NOT_GIVEN,
8989
name: List[str] | NotGiven = NOT_GIVEN,
90+
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
9091
protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN,
9192
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9293
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -134,6 +135,9 @@ def attacks(
134135
135136
name: Array of names that will be used to name the series in responses.
136137
138+
normalization: Normalization method applied. Refer to
139+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
140+
137141
protocol: Array of L3/4 attack types.
138142
139143
extra_headers: Send extra headers
@@ -164,6 +168,7 @@ def attacks(
164168
"limit_per_location": limit_per_location,
165169
"location": location,
166170
"name": name,
171+
"normalization": normalization,
167172
"protocol": protocol,
168173
},
169174
top_attacks_params.TopAttacksParams,
@@ -428,6 +433,7 @@ async def attacks(
428433
limit_per_location: int | NotGiven = NOT_GIVEN,
429434
location: List[str] | NotGiven = NOT_GIVEN,
430435
name: List[str] | NotGiven = NOT_GIVEN,
436+
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
431437
protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN,
432438
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
433439
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -475,6 +481,9 @@ async def attacks(
475481
476482
name: Array of names that will be used to name the series in responses.
477483
484+
normalization: Normalization method applied. Refer to
485+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
486+
478487
protocol: Array of L3/4 attack types.
479488
480489
extra_headers: Send extra headers
@@ -505,6 +514,7 @@ async def attacks(
505514
"limit_per_location": limit_per_location,
506515
"location": location,
507516
"name": name,
517+
"normalization": normalization,
508518
"protocol": protocol,
509519
},
510520
top_attacks_params.TopAttacksParams,

src/cloudflare/resources/radar/attacks/layer7/top/top.py

+10
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def attacks(
100100
location: List[str] | NotGiven = NOT_GIVEN,
101101
magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
102102
name: List[str] | NotGiven = NOT_GIVEN,
103+
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
103104
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
104105
# The extra values given here take precedence over values defined on the client or passed to this method.
105106
extra_headers: Headers | None = None,
@@ -152,6 +153,9 @@ def attacks(
152153
153154
name: Array of names that will be used to name the series in responses.
154155
156+
normalization: Normalization method applied. Refer to
157+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
158+
155159
extra_headers: Send extra headers
156160
157161
extra_query: Add additional query parameters to the request
@@ -181,6 +185,7 @@ def attacks(
181185
"location": location,
182186
"magnitude": magnitude,
183187
"name": name,
188+
"normalization": normalization,
184189
},
185190
top_attacks_params.TopAttacksParams,
186191
),
@@ -445,6 +450,7 @@ async def attacks(
445450
location: List[str] | NotGiven = NOT_GIVEN,
446451
magnitude: Literal["AFFECTED_ZONES", "MITIGATED_REQUESTS"] | NotGiven = NOT_GIVEN,
447452
name: List[str] | NotGiven = NOT_GIVEN,
453+
normalization: Literal["PERCENTAGE", "MIN_MAX"] | NotGiven = NOT_GIVEN,
448454
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449455
# The extra values given here take precedence over values defined on the client or passed to this method.
450456
extra_headers: Headers | None = None,
@@ -497,6 +503,9 @@ async def attacks(
497503
498504
name: Array of names that will be used to name the series in responses.
499505
506+
normalization: Normalization method applied. Refer to
507+
[Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
508+
500509
extra_headers: Send extra headers
501510
502511
extra_query: Add additional query parameters to the request
@@ -526,6 +535,7 @@ async def attacks(
526535
"location": location,
527536
"magnitude": magnitude,
528537
"name": name,
538+
"normalization": normalization,
529539
},
530540
top_attacks_params.TopAttacksParams,
531541
),

src/cloudflare/resources/radar/datasets.py

+4-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, Optional, cast
5+
from typing import Type, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -21,7 +21,7 @@
2121
async_to_streamed_response_wrapper,
2222
)
2323
from ..._wrappers import ResultWrapper
24-
from ...types.radar import dataset_get_params, dataset_list_params, dataset_download_params
24+
from ...types.radar import dataset_list_params, dataset_download_params
2525
from ..._base_client import (
2626
make_request_options,
2727
)
@@ -139,7 +139,6 @@ def get(
139139
self,
140140
alias: str,
141141
*,
142-
date: Optional[str] | NotGiven = NOT_GIVEN,
143142
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
144143
# The extra values given here take precedence over values defined on the client or passed to this method.
145144
extra_headers: Headers | None = None,
@@ -156,8 +155,6 @@ def get(
156155
Args:
157156
alias: Dataset alias or id
158157
159-
date: Filter dataset alias by date
160-
161158
extra_headers: Send extra headers
162159
163160
extra_query: Add additional query parameters to the request
@@ -172,11 +169,7 @@ def get(
172169
return self._get(
173170
f"/radar/datasets/{alias}",
174171
options=make_request_options(
175-
extra_headers=extra_headers,
176-
extra_query=extra_query,
177-
extra_body=extra_body,
178-
timeout=timeout,
179-
query=maybe_transform({"date": date}, dataset_get_params.DatasetGetParams),
172+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
180173
),
181174
cast_to=str,
182175
)
@@ -290,7 +283,6 @@ async def get(
290283
self,
291284
alias: str,
292285
*,
293-
date: Optional[str] | NotGiven = NOT_GIVEN,
294286
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
295287
# The extra values given here take precedence over values defined on the client or passed to this method.
296288
extra_headers: Headers | None = None,
@@ -307,8 +299,6 @@ async def get(
307299
Args:
308300
alias: Dataset alias or id
309301
310-
date: Filter dataset alias by date
311-
312302
extra_headers: Send extra headers
313303
314304
extra_query: Add additional query parameters to the request
@@ -323,11 +313,7 @@ async def get(
323313
return await self._get(
324314
f"/radar/datasets/{alias}",
325315
options=make_request_options(
326-
extra_headers=extra_headers,
327-
extra_query=extra_query,
328-
extra_body=extra_body,
329-
timeout=timeout,
330-
query=await async_maybe_transform({"date": date}, dataset_get_params.DatasetGetParams),
316+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
331317
),
332318
cast_to=str,
333319
)

src/cloudflare/resources/radar/ranking/domain.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Type, Optional, cast
5+
from typing import List, Type, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -43,7 +43,7 @@ def get(
4343
self,
4444
domain: str,
4545
*,
46-
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
46+
date: List[str] | NotGiven = NOT_GIVEN,
4747
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
4848
limit: int | NotGiven = NOT_GIVEN,
4949
name: List[str] | NotGiven = NOT_GIVEN,
@@ -119,7 +119,7 @@ async def get(
119119
self,
120120
domain: str,
121121
*,
122-
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
122+
date: List[str] | NotGiven = NOT_GIVEN,
123123
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
124124
limit: int | NotGiven = NOT_GIVEN,
125125
name: List[str] | NotGiven = NOT_GIVEN,

src/cloudflare/resources/radar/ranking/ranking.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Type, Union, Optional, cast
5+
from typing import List, Type, Union, cast
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -153,7 +153,7 @@ def timeseries_groups(
153153
def top(
154154
self,
155155
*,
156-
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
156+
date: List[str] | NotGiven = NOT_GIVEN,
157157
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
158158
limit: int | NotGiven = NOT_GIVEN,
159159
location: List[str] | NotGiven = NOT_GIVEN,
@@ -331,7 +331,7 @@ async def timeseries_groups(
331331
async def top(
332332
self,
333333
*,
334-
date: List[Optional[str]] | NotGiven = NOT_GIVEN,
334+
date: List[str] | NotGiven = NOT_GIVEN,
335335
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
336336
limit: int | NotGiven = NOT_GIVEN,
337337
location: List[str] | NotGiven = NOT_GIVEN,

src/cloudflare/types/radar/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from .entity_get_params import EntityGetParams as EntityGetParams
6-
from .dataset_get_params import DatasetGetParams as DatasetGetParams
76
from .radar_email_series import RadarEmailSeries as RadarEmailSeries
87
from .ranking_top_params import RankingTopParams as RankingTopParams
98
from .dataset_list_params import DatasetListParams as DatasetListParams

src/cloudflare/types/radar/as112/summary_dnssec_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/summary_edns_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/summary_ip_version_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/summary_protocol_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/summary_query_type_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/summary_response_codes_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/top_dnssec_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
2525

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

28-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
28+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
2929

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

src/cloudflare/types/radar/as112/top_edns_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
2525

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

28-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
28+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
2929

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

src/cloudflare/types/radar/as112/top_ip_version_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112/top_locations_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/as112_timeseries_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/attacks/layer3/summary_bitrate_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/attacks/layer3/summary_duration_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/attacks/layer3/summary_get_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

src/cloudflare/types/radar/attacks/layer3/summary_ip_version_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MetaConfidenceInfoAnnotation(BaseModel):
3232

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

35-
is_instantaneous: object = FieldInfo(alias="isInstantaneous")
35+
is_instantaneous: bool = FieldInfo(alias="isInstantaneous")
3636

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

0 commit comments

Comments
 (0)