Skip to content

Commit 49ecf94

Browse files
chore(api): update composite API spec
1 parent 95d2889 commit 49ecf94

4 files changed

Lines changed: 76 additions & 1 deletion

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2273
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: b3e28b3635caf14765747dd14abcac1a
3+
openapi_spec_hash: 7720bdb8e0aa36160e01eccca453f6fa
44
config_hash: 86a9b8037b215f0a9c5c69239f9c6cfd

src/cloudflare/resources/radar/http/http.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,27 @@ def timeseries(
288288
asn: SequenceNotStr[str] | Omit = omit,
289289
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
290290
browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | Omit = omit,
291+
content_type: List[
292+
Literal[
293+
"HTML",
294+
"IMAGES",
295+
"JSON",
296+
"JAVASCRIPT",
297+
"CSS",
298+
"PLAIN_TEXT",
299+
"FONTS",
300+
"XML",
301+
"YAML",
302+
"VIDEO",
303+
"AUDIO",
304+
"MARKDOWN",
305+
"DOCUMENTS",
306+
"BINARY",
307+
"SERIALIZATION",
308+
"OTHER",
309+
]
310+
]
311+
| Omit = omit,
291312
continent: SequenceNotStr[str] | Omit = omit,
292313
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
293314
date_range: SequenceNotStr[str] | Omit = omit,
@@ -331,6 +352,8 @@ def timeseries(
331352
332353
browser_family: Filters results by browser family.
333354
355+
content_type: Filters results by content type category.
356+
334357
continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
335358
Prefix with `-` to exclude continents from results. For example, `-EU,NA`
336359
excludes results from EU, but includes results from NA.
@@ -393,6 +416,7 @@ def timeseries(
393416
"asn": asn,
394417
"bot_class": bot_class,
395418
"browser_family": browser_family,
419+
"content_type": content_type,
396420
"continent": continent,
397421
"date_end": date_end,
398422
"date_range": date_range,
@@ -820,6 +844,27 @@ async def timeseries(
820844
asn: SequenceNotStr[str] | Omit = omit,
821845
bot_class: List[Literal["LIKELY_AUTOMATED", "LIKELY_HUMAN"]] | Omit = omit,
822846
browser_family: List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]] | Omit = omit,
847+
content_type: List[
848+
Literal[
849+
"HTML",
850+
"IMAGES",
851+
"JSON",
852+
"JAVASCRIPT",
853+
"CSS",
854+
"PLAIN_TEXT",
855+
"FONTS",
856+
"XML",
857+
"YAML",
858+
"VIDEO",
859+
"AUDIO",
860+
"MARKDOWN",
861+
"DOCUMENTS",
862+
"BINARY",
863+
"SERIALIZATION",
864+
"OTHER",
865+
]
866+
]
867+
| Omit = omit,
823868
continent: SequenceNotStr[str] | Omit = omit,
824869
date_end: SequenceNotStr[Union[str, datetime]] | Omit = omit,
825870
date_range: SequenceNotStr[str] | Omit = omit,
@@ -863,6 +908,8 @@ async def timeseries(
863908
864909
browser_family: Filters results by browser family.
865910
911+
content_type: Filters results by content type category.
912+
866913
continent: Filters results by continent. Specify a comma-separated list of alpha-2 codes.
867914
Prefix with `-` to exclude continents from results. For example, `-EU,NA`
868915
excludes results from EU, but includes results from NA.
@@ -925,6 +972,7 @@ async def timeseries(
925972
"asn": asn,
926973
"bot_class": bot_class,
927974
"browser_family": browser_family,
975+
"content_type": content_type,
928976
"continent": continent,
929977
"date_end": date_end,
930978
"date_range": date_range,

src/cloudflare/types/radar/http_timeseries_params.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,31 @@ class HTTPTimeseriesParams(TypedDict, total=False):
4545
browser_family: Annotated[List[Literal["CHROME", "EDGE", "FIREFOX", "SAFARI"]], PropertyInfo(alias="browserFamily")]
4646
"""Filters results by browser family."""
4747

48+
content_type: Annotated[
49+
List[
50+
Literal[
51+
"HTML",
52+
"IMAGES",
53+
"JSON",
54+
"JAVASCRIPT",
55+
"CSS",
56+
"PLAIN_TEXT",
57+
"FONTS",
58+
"XML",
59+
"YAML",
60+
"VIDEO",
61+
"AUDIO",
62+
"MARKDOWN",
63+
"DOCUMENTS",
64+
"BINARY",
65+
"SERIALIZATION",
66+
"OTHER",
67+
]
68+
],
69+
PropertyInfo(alias="contentType"),
70+
]
71+
"""Filters results by content type category."""
72+
4873
continent: SequenceNotStr[str]
4974
"""Filters results by continent.
5075

tests/api_resources/radar/test_http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
9292
asn=["string"],
9393
bot_class=["LIKELY_AUTOMATED"],
9494
browser_family=["CHROME"],
95+
content_type=["HTML"],
9596
continent=["string"],
9697
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
9798
date_range=["7d"],
@@ -265,6 +266,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf
265266
asn=["string"],
266267
bot_class=["LIKELY_AUTOMATED"],
267268
browser_family=["CHROME"],
269+
content_type=["HTML"],
268270
continent=["string"],
269271
date_end=[parse_datetime("2019-12-27T18:11:19.117Z")],
270272
date_range=["7d"],

0 commit comments

Comments
 (0)