diff --git a/.stats.yml b/.stats.yml index 077c6fd8f08..3fdc78452d1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1490 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b46e31e5f69309fc518f386002c3df2afeb03c0361127704253f9197d52d11d9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-85569f0482730af4e8c6afc9b33c7ba894e47b2d8fa36a3e013daf5390adb647.yml diff --git a/src/cloudflare/resources/radar/ai/bots/summary.py b/src/cloudflare/resources/radar/ai/bots/summary.py index f1cf1315778..e8a1c0a005a 100644 --- a/src/cloudflare/resources/radar/ai/bots/summary.py +++ b/src/cloudflare/resources/radar/ai/bots/summary.py @@ -58,6 +58,7 @@ def user_agent( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -90,6 +91,9 @@ def user_agent( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -119,6 +123,7 @@ def user_agent( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -159,6 +164,7 @@ async def user_agent( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -191,6 +197,9 @@ async def user_agent( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -220,6 +229,7 @@ async def user_agent( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, diff --git a/src/cloudflare/resources/radar/as112/summary.py b/src/cloudflare/resources/radar/as112/summary.py index 34d4b1676a6..64f1fa64f29 100644 --- a/src/cloudflare/resources/radar/as112/summary.py +++ b/src/cloudflare/resources/radar/as112/summary.py @@ -386,6 +386,7 @@ def query_type( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -417,6 +418,9 @@ def query_type( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -446,6 +450,7 @@ def query_type( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -465,6 +470,7 @@ def response_codes( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -496,6 +502,9 @@ def response_codes( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -525,6 +534,7 @@ def response_codes( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -881,6 +891,7 @@ async def query_type( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -912,6 +923,9 @@ async def query_type( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -941,6 +955,7 @@ async def query_type( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -960,6 +975,7 @@ async def response_codes( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -991,6 +1007,9 @@ async def response_codes( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1020,6 +1039,7 @@ async def response_codes( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, diff --git a/src/cloudflare/resources/radar/as112/timeseries_groups.py b/src/cloudflare/resources/radar/as112/timeseries_groups.py index 00695c14157..4571879b766 100644 --- a/src/cloudflare/resources/radar/as112/timeseries_groups.py +++ b/src/cloudflare/resources/radar/as112/timeseries_groups.py @@ -411,6 +411,7 @@ def query_type( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -446,6 +447,9 @@ def query_type( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -476,6 +480,7 @@ def query_type( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -496,6 +501,7 @@ def response_codes( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -532,6 +538,9 @@ def response_codes( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -562,6 +571,7 @@ def response_codes( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -945,6 +955,7 @@ async def query_type( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -980,6 +991,9 @@ async def query_type( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1010,6 +1024,7 @@ async def query_type( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -1030,6 +1045,7 @@ async def response_codes( date_range: List[str] | NotGiven = NOT_GIVEN, date_start: List[Union[str, datetime]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1066,6 +1082,9 @@ async def response_codes( format: Format results are returned in. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1096,6 +1115,7 @@ async def response_codes( "date_range": date_range, "date_start": date_start, "format": format, + "limit_per_group": limit_per_group, "location": location, "name": name, }, diff --git a/src/cloudflare/resources/radar/attacks/layer3/summary.py b/src/cloudflare/resources/radar/attacks/layer3/summary.py index 0e6843b6167..b4f5c7853cc 100644 --- a/src/cloudflare/resources/radar/attacks/layer3/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer3/summary.py @@ -487,6 +487,7 @@ def vector( direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN, @@ -520,6 +521,9 @@ def vector( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -552,6 +556,7 @@ def vector( "direction": direction, "format": format, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "protocol": protocol, @@ -1010,6 +1015,7 @@ async def vector( direction: Literal["ORIGIN", "TARGET"] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, protocol: List[Literal["UDP", "TCP", "ICMP", "GRE"]] | NotGiven = NOT_GIVEN, @@ -1043,6 +1049,9 @@ async def vector( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1075,6 +1084,7 @@ async def vector( "direction": direction, "format": format, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "protocol": protocol, diff --git a/src/cloudflare/resources/radar/attacks/layer7/summary.py b/src/cloudflare/resources/radar/attacks/layer7/summary.py index 2dd6c303e25..69a23e0ced4 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/summary.py +++ b/src/cloudflare/resources/radar/attacks/layer7/summary.py @@ -151,6 +151,7 @@ def http_method( format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -192,6 +193,9 @@ def http_method( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -225,6 +229,7 @@ def http_method( "format": format, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -590,6 +595,7 @@ def managed_rules( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -633,6 +639,9 @@ def managed_rules( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -667,6 +676,7 @@ def managed_rules( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -740,6 +750,7 @@ def mitigation_product( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -777,6 +788,9 @@ def mitigation_product( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -809,6 +823,7 @@ def mitigation_product( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, }, @@ -930,6 +945,7 @@ async def http_method( format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -971,6 +987,9 @@ async def http_method( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1004,6 +1023,7 @@ async def http_method( "format": format, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -1369,6 +1389,7 @@ async def managed_rules( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -1412,6 +1433,9 @@ async def managed_rules( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1446,6 +1470,7 @@ async def managed_rules( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -1519,6 +1544,7 @@ async def mitigation_product( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1556,6 +1582,9 @@ async def mitigation_product( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1588,6 +1617,7 @@ async def mitigation_product( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, }, diff --git a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py index 864e7659cde..e57361ae51c 100644 --- a/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py +++ b/src/cloudflare/resources/radar/attacks/layer7/timeseries_groups.py @@ -164,6 +164,7 @@ def http_method( format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -210,6 +211,9 @@ def http_method( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -247,6 +251,7 @@ def http_method( "format": format, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -802,6 +807,7 @@ def managed_rules( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -850,6 +856,9 @@ def managed_rules( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -888,6 +897,7 @@ def managed_rules( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -963,6 +973,7 @@ def mitigation_product( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_MAX"] | NotGiven = NOT_GIVEN, @@ -1005,6 +1016,9 @@ def mitigation_product( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1041,6 +1055,7 @@ def mitigation_product( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "normalization": normalization, @@ -1338,6 +1353,7 @@ async def http_method( format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -1384,6 +1400,9 @@ async def http_method( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1421,6 +1440,7 @@ async def http_method( "format": format, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -1976,6 +1996,7 @@ async def managed_rules( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, mitigation_product: List[ Literal[ @@ -2024,6 +2045,9 @@ async def managed_rules( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -2062,6 +2086,7 @@ async def managed_rules( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "mitigation_product": mitigation_product, "name": name, @@ -2137,6 +2162,7 @@ async def mitigation_product( | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, normalization: Literal["PERCENTAGE", "MIN0_MAX"] | NotGiven = NOT_GIVEN, @@ -2179,6 +2205,9 @@ async def mitigation_product( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -2215,6 +2244,7 @@ async def mitigation_product( "http_method": http_method, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "normalization": normalization, diff --git a/src/cloudflare/resources/radar/http/timeseries_groups.py b/src/cloudflare/resources/radar/http/timeseries_groups.py index d4c1800e0c5..1b1a6da94db 100644 --- a/src/cloudflare/resources/radar/http/timeseries_groups.py +++ b/src/cloudflare/resources/radar/http/timeseries_groups.py @@ -318,6 +318,7 @@ def browser_family( http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] @@ -368,6 +369,9 @@ def browser_family( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -407,6 +411,7 @@ def browser_family( "http_protocol": http_protocol, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "os": os, @@ -1474,6 +1479,7 @@ async def browser_family( http_protocol: List[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN, http_version: List[Literal["HTTPv1", "HTTPv2", "HTTPv3"]] | NotGiven = NOT_GIVEN, ip_version: List[Literal["IPv4", "IPv6"]] | NotGiven = NOT_GIVEN, + limit_per_group: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, os: List[Literal["WINDOWS", "MACOSX", "IOS", "ANDROID", "CHROMEOS", "LINUX", "SMART_TV"]] @@ -1524,6 +1530,9 @@ async def browser_family( ip_version: Filter for ip version. + limit_per_group: Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + location: Array of comma separated list of locations (alpha-2 country codes). Start with `-` to exclude from results. For example, `-US,PT` excludes results from the US, but includes results from PT. @@ -1563,6 +1572,7 @@ async def browser_family( "http_protocol": http_protocol, "http_version": http_version, "ip_version": ip_version, + "limit_per_group": limit_per_group, "location": location, "name": name, "os": os, diff --git a/src/cloudflare/resources/radar/ranking/domain.py b/src/cloudflare/resources/radar/ranking/domain.py index 60ea7cf7f98..1c2e3a87f4f 100644 --- a/src/cloudflare/resources/radar/ranking/domain.py +++ b/src/cloudflare/resources/radar/ranking/domain.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import List, Type, cast +from typing import List, Type, Union, cast +from datetime import date from typing_extensions import Literal import httpx @@ -52,8 +53,9 @@ def get( self, domain: str, *, - date: List[str] | NotGiven = NOT_GIVEN, + date: List[Union[str, date]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + include_top_locations: bool | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, ranking_type: Literal["POPULAR", "TRENDING_RISE", "TRENDING_STEADY"] | NotGiven = NOT_GIVEN, @@ -76,6 +78,8 @@ def get( format: Format results are returned in. + include_top_locations: Include top locations in the response. + limit: Limit the number of objects in the response. name: Array of names that will be used to name the series in responses. @@ -103,6 +107,7 @@ def get( { "date": date, "format": format, + "include_top_locations": include_top_locations, "limit": limit, "name": name, "ranking_type": ranking_type, @@ -139,8 +144,9 @@ async def get( self, domain: str, *, - date: List[str] | NotGiven = NOT_GIVEN, + date: List[Union[str, date]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + include_top_locations: bool | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, name: List[str] | NotGiven = NOT_GIVEN, ranking_type: Literal["POPULAR", "TRENDING_RISE", "TRENDING_STEADY"] | NotGiven = NOT_GIVEN, @@ -163,6 +169,8 @@ async def get( format: Format results are returned in. + include_top_locations: Include top locations in the response. + limit: Limit the number of objects in the response. name: Array of names that will be used to name the series in responses. @@ -190,6 +198,7 @@ async def get( { "date": date, "format": format, + "include_top_locations": include_top_locations, "limit": limit, "name": name, "ranking_type": ranking_type, diff --git a/src/cloudflare/resources/radar/ranking/ranking.py b/src/cloudflare/resources/radar/ranking/ranking.py index d3b371159c1..86136d7ad46 100644 --- a/src/cloudflare/resources/radar/ranking/ranking.py +++ b/src/cloudflare/resources/radar/ranking/ranking.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import List, Type, Union, cast -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal import httpx @@ -143,7 +143,7 @@ def timeseries_groups( def top( self, *, - date: List[str] | NotGiven = NOT_GIVEN, + date: List[Union[str, date]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, @@ -313,7 +313,7 @@ async def timeseries_groups( async def top( self, *, - date: List[str] | NotGiven = NOT_GIVEN, + date: List[Union[str, date]] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, location: List[str] | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/radar/ai/bots/summary_user_agent_params.py b/src/cloudflare/types/radar/ai/bots/summary_user_agent_params.py index 1056e13c5b2..448b49a9f2c 100644 --- a/src/cloudflare/types/radar/ai/bots/summary_user_agent_params.py +++ b/src/cloudflare/types/radar/ai/bots/summary_user_agent_params.py @@ -42,6 +42,12 @@ class SummaryUserAgentParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py index b46f01345af..d47ce220214 100644 --- a/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py +++ b/src/cloudflare/types/radar/ai/bots/summary_user_agent_response.py @@ -53,4 +53,4 @@ class Meta(BaseModel): class SummaryUserAgentResponse(BaseModel): meta: Meta - summary_0: Dict[str, List[str]] + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/as112/summary_query_type_params.py b/src/cloudflare/types/radar/as112/summary_query_type_params.py index aea17cb0a58..6ff8f600ad8 100644 --- a/src/cloudflare/types/radar/as112/summary_query_type_params.py +++ b/src/cloudflare/types/radar/as112/summary_query_type_params.py @@ -42,6 +42,12 @@ class SummaryQueryTypeParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/as112/summary_query_type_response.py b/src/cloudflare/types/radar/as112/summary_query_type_response.py index d5268d2eb3f..87baa9cd63b 100644 --- a/src/cloudflare/types/radar/as112/summary_query_type_response.py +++ b/src/cloudflare/types/radar/as112/summary_query_type_response.py @@ -1,20 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = [ - "SummaryQueryTypeResponse", - "Meta", - "MetaDateRange", - "MetaConfidenceInfo", - "MetaConfidenceInfoAnnotation", - "Summary0", -] +__all__ = ["SummaryQueryTypeResponse", "Meta", "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation"] class MetaDateRange(BaseModel): @@ -57,19 +50,7 @@ class Meta(BaseModel): confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) -class Summary0(BaseModel): - a: str = FieldInfo(alias="A") - - aaaa: str = FieldInfo(alias="AAAA") - - ptr: str = FieldInfo(alias="PTR") - - soa: str = FieldInfo(alias="SOA") - - srv: str = FieldInfo(alias="SRV") - - class SummaryQueryTypeResponse(BaseModel): meta: Meta - summary_0: Summary0 + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_params.py b/src/cloudflare/types/radar/as112/summary_response_codes_params.py index 9579b04766e..1ee19186ded 100644 --- a/src/cloudflare/types/radar/as112/summary_response_codes_params.py +++ b/src/cloudflare/types/radar/as112/summary_response_codes_params.py @@ -42,6 +42,12 @@ class SummaryResponseCodesParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/as112/summary_response_codes_response.py b/src/cloudflare/types/radar/as112/summary_response_codes_response.py index 9c916f07a98..f4e19fe4238 100644 --- a/src/cloudflare/types/radar/as112/summary_response_codes_response.py +++ b/src/cloudflare/types/radar/as112/summary_response_codes_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +13,6 @@ "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation", - "Summary0", ] @@ -57,13 +56,7 @@ class Meta(BaseModel): confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) -class Summary0(BaseModel): - noerror: str = FieldInfo(alias="NOERROR") - - nxdomain: str = FieldInfo(alias="NXDOMAIN") - - class SummaryResponseCodesResponse(BaseModel): meta: Meta - summary_0: Summary0 + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py b/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py index d83568fe1d3..cb0afb94023 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_query_type_params.py @@ -49,6 +49,12 @@ class TimeseriesGroupQueryTypeParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py index 05cf4ac7fab..50fa3dd1979 100644 --- a/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py +++ b/src/cloudflare/types/radar/as112/timeseries_group_response_codes_params.py @@ -49,6 +49,12 @@ class TimeseriesGroupResponseCodesParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py index 3da6f2912a7..55e3ea8a30a 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_params.py @@ -44,6 +44,12 @@ class SummaryVectorParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py index cf21e355719..7dd4becaf4b 100644 --- a/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py +++ b/src/cloudflare/types/radar/attacks/layer3/summary_vector_response.py @@ -53,4 +53,4 @@ class Meta(BaseModel): class SummaryVectorResponse(BaseModel): meta: Meta - summary_0: Dict[str, List[str]] + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py index 6060fcfa603..056c66ca9f4 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_params.py @@ -48,6 +48,12 @@ class SummaryHTTPMethodParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py index 38203e4eb07..79afadef9b6 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_http_method_response.py @@ -1,20 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from pydantic import Field as FieldInfo from ....._models import BaseModel -__all__ = [ - "SummaryHTTPMethodResponse", - "Meta", - "MetaDateRange", - "MetaConfidenceInfo", - "MetaConfidenceInfoAnnotation", - "Summary0", -] +__all__ = ["SummaryHTTPMethodResponse", "Meta", "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation"] class MetaDateRange(BaseModel): @@ -57,13 +50,7 @@ class Meta(BaseModel): confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) -class Summary0(BaseModel): - get: str = FieldInfo(alias="GET") - - post: str = FieldInfo(alias="POST") - - class SummaryHTTPMethodResponse(BaseModel): meta: Meta - summary_0: Summary0 + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py index 5dfedbebd51..16197925be5 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_params.py @@ -103,6 +103,12 @@ class SummaryManagedRulesParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py index 2a095a472e6..d63373ae0c7 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_managed_rules_response.py @@ -53,4 +53,4 @@ class Meta(BaseModel): class SummaryManagedRulesResponse(BaseModel): meta: Meta - summary_0: Dict[str, List[str]] + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py index 4013e1ee425..55a45aa7fc1 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_params.py @@ -103,6 +103,12 @@ class SummaryMitigationProductParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py index f815da2375a..eebfb391f20 100644 --- a/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/summary_mitigation_product_response.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Dict, List, Optional from datetime import datetime from pydantic import Field as FieldInfo @@ -13,7 +13,6 @@ "MetaDateRange", "MetaConfidenceInfo", "MetaConfidenceInfoAnnotation", - "Summary0", ] @@ -57,13 +56,7 @@ class Meta(BaseModel): confidence_info: Optional[MetaConfidenceInfo] = FieldInfo(alias="confidenceInfo", default=None) -class Summary0(BaseModel): - ddos: str = FieldInfo(alias="DDOS") - - waf: str = FieldInfo(alias="WAF") - - class SummaryMitigationProductResponse(BaseModel): meta: Meta - summary_0: Summary0 + summary_0: Dict[str, str] diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py index d6ea3e4eec2..098e2050b40 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_params.py @@ -55,6 +55,12 @@ class TimeseriesGroupHTTPMethodParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py index a0f6379a2c5..45e7a8b8a9f 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_method_response.py @@ -1,8 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List - -from pydantic import Field as FieldInfo +from typing import TYPE_CHECKING, List from ....._models import BaseModel @@ -10,10 +8,14 @@ class Serie0(BaseModel): - get: List[str] = FieldInfo(alias="GET") - timestamps: List[str] + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + class TimeseriesGroupHTTPMethodResponse(BaseModel): meta: object diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_response.py index f8085143fa2..0aeb0474fd0 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_http_version_response.py @@ -12,6 +12,10 @@ class Serie0(BaseModel): http_1_x: List[str] = FieldInfo(alias="HTTP/1.x") + http_2: List[str] = FieldInfo(alias="HTTP/2") + + http_3: List[str] = FieldInfo(alias="HTTP/3") + timestamps: List[str] diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py index 7c26f5c6c64..055a4d3e140 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_managed_rules_params.py @@ -110,6 +110,12 @@ class TimeseriesGroupManagedRulesParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py index 7dfb3741259..97c71692e3c 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_params.py @@ -110,6 +110,12 @@ class TimeseriesGroupMitigationProductParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py index 7e598104c96..b3e88c1e6a0 100644 --- a/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py +++ b/src/cloudflare/types/radar/attacks/layer7/timeseries_group_mitigation_product_response.py @@ -1,8 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List - -from pydantic import Field as FieldInfo +from typing import TYPE_CHECKING, List from ....._models import BaseModel @@ -10,10 +8,14 @@ class Serie0(BaseModel): - ddos: List[str] = FieldInfo(alias="DDOS") - timestamps: List[str] + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> List[str]: ... + class TimeseriesGroupMitigationProductResponse(BaseModel): meta: object diff --git a/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py b/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py index df17101636c..ae16d65d0c7 100644 --- a/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py +++ b/src/cloudflare/types/radar/http/timeseries_group_browser_family_params.py @@ -68,6 +68,12 @@ class TimeseriesGroupBrowserFamilyParams(TypedDict, total=False): ip_version: Annotated[List[Literal["IPv4", "IPv6"]], PropertyInfo(alias="ipVersion")] """Filter for ip version.""" + limit_per_group: Annotated[int, PropertyInfo(alias="limitPerGroup")] + """ + Limit the number of objects (eg browsers, verticals, etc) to the top items over + the time range. + """ + location: List[str] """Array of comma separated list of locations (alpha-2 country codes). diff --git a/src/cloudflare/types/radar/ranking/domain_get_params.py b/src/cloudflare/types/radar/ranking/domain_get_params.py index 98bbbaf27da..95eb1587c83 100644 --- a/src/cloudflare/types/radar/ranking/domain_get_params.py +++ b/src/cloudflare/types/radar/ranking/domain_get_params.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import List +import datetime +from typing import List, Union from typing_extensions import Literal, Annotated, TypedDict from ...._utils import PropertyInfo @@ -11,12 +12,15 @@ class DomainGetParams(TypedDict, total=False): - date: List[str] + date: Annotated[List[Union[str, datetime.date]], PropertyInfo(format="iso8601")] """Array of dates to filter the ranking.""" format: Literal["JSON", "CSV"] """Format results are returned in.""" + include_top_locations: Annotated[bool, PropertyInfo(alias="includeTopLocations")] + """Include top locations in the response.""" + limit: int """Limit the number of objects in the response.""" diff --git a/src/cloudflare/types/radar/ranking_top_params.py b/src/cloudflare/types/radar/ranking_top_params.py index e482e6f9f96..903af228882 100644 --- a/src/cloudflare/types/radar/ranking_top_params.py +++ b/src/cloudflare/types/radar/ranking_top_params.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing import List +import datetime +from typing import List, Union from typing_extensions import Literal, Annotated, TypedDict from ..._utils import PropertyInfo @@ -11,7 +12,7 @@ class RankingTopParams(TypedDict, total=False): - date: List[str] + date: Annotated[List[Union[str, datetime.date]], PropertyInfo(format="iso8601")] """Array of dates to filter the ranking.""" format: Literal["JSON", "CSV"] diff --git a/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py index 84e1ce0e8ea..b6ab06c0b94 100644 --- a/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py +++ b/src/cloudflare/types/radar/tcp_resets_timeout_timeseries_groups_response.py @@ -59,31 +59,14 @@ class Meta(BaseModel): class Serie0(BaseModel): later_in_flow: List[str] - """ - Connection resets within the first 10 packets from the client, but after the - server has received multiple data packets. - """ no_match: List[str] - """All other connections.""" post_ack: List[str] - """ - Connection resets or timeouts after the server received both a SYN packet and an - ACK packet, meaning the connection was successfully established. - """ post_psh: List[str] - """ - Connection resets or timeouts after the server received a packet with PSH flag - set, following connection establishment. - """ post_syn: List[str] - """ - Connection resets or timeouts after the server received only a single SYN - packet. - """ timestamps: List[datetime] diff --git a/tests/api_resources/radar/ai/bots/test_summary.py b/tests/api_resources/radar/ai/bots/test_summary.py index a9d3715f712..ca5d4e987c0 100644 --- a/tests/api_resources/radar/ai/bots/test_summary.py +++ b/tests/api_resources/radar/ai/bots/test_summary.py @@ -32,6 +32,7 @@ def test_method_user_agent_with_all_params(self, client: Cloudflare) -> None: date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -75,6 +76,7 @@ async def test_method_user_agent_with_all_params(self, async_client: AsyncCloudf date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) diff --git a/tests/api_resources/radar/ai/test_timeseries_groups.py b/tests/api_resources/radar/ai/test_timeseries_groups.py index 51184d25d05..94ccc123297 100644 --- a/tests/api_resources/radar/ai/test_timeseries_groups.py +++ b/tests/api_resources/radar/ai/test_timeseries_groups.py @@ -33,7 +33,7 @@ def test_method_user_agent_with_all_params(self, client: Cloudflare) -> None: date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], ) @@ -78,7 +78,7 @@ async def test_method_user_agent_with_all_params(self, async_client: AsyncCloudf date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], ) diff --git a/tests/api_resources/radar/as112/test_summary.py b/tests/api_resources/radar/as112/test_summary.py index caffb58e7bb..d5956baed72 100644 --- a/tests/api_resources/radar/as112/test_summary.py +++ b/tests/api_resources/radar/as112/test_summary.py @@ -195,6 +195,7 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -234,6 +235,7 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -433,6 +435,7 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -472,6 +475,7 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) diff --git a/tests/api_resources/radar/as112/test_timeseries_groups.py b/tests/api_resources/radar/as112/test_timeseries_groups.py index 703a7fd254f..26adfcf7eab 100644 --- a/tests/api_resources/radar/as112/test_timeseries_groups.py +++ b/tests/api_resources/radar/as112/test_timeseries_groups.py @@ -200,6 +200,7 @@ def test_method_query_type_with_all_params(self, client: Cloudflare) -> None: date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -240,6 +241,7 @@ def test_method_response_codes_with_all_params(self, client: Cloudflare) -> None date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -444,6 +446,7 @@ async def test_method_query_type_with_all_params(self, async_client: AsyncCloudf date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) @@ -484,6 +487,7 @@ async def test_method_response_codes_with_all_params(self, async_client: AsyncCl date_range=["7d"], date_start=[parse_datetime("2019-12-27T18:11:19.117Z")], format="JSON", + limit_per_group=10, location=["string"], name=["string"], ) diff --git a/tests/api_resources/radar/attacks/layer3/test_summary.py b/tests/api_resources/radar/attacks/layer3/test_summary.py index dd0ffe08b6c..6e0d57be6a1 100644 --- a/tests/api_resources/radar/attacks/layer3/test_summary.py +++ b/tests/api_resources/radar/attacks/layer3/test_summary.py @@ -241,6 +241,7 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: direction="ORIGIN", format="JSON", ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], protocol=["UDP"], @@ -487,6 +488,7 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare direction="ORIGIN", format="JSON", ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], protocol=["UDP"], diff --git a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py index 0fd0a3e6c90..258338056b5 100644 --- a/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer3/test_timeseries_groups.py @@ -169,7 +169,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -297,7 +297,7 @@ def test_method_vector_with_all_params(self, client: Cloudflare) -> None: direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -341,7 +341,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -515,7 +515,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -643,7 +643,7 @@ async def test_method_vector_with_all_params(self, async_client: AsyncCloudflare direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -687,7 +687,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla direction="ORIGIN", format="JSON", ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", diff --git a/tests/api_resources/radar/attacks/layer7/test_summary.py b/tests/api_resources/radar/attacks/layer7/test_summary.py index 64b5d969caf..694c8f4497c 100644 --- a/tests/api_resources/radar/attacks/layer7/test_summary.py +++ b/tests/api_resources/radar/attacks/layer7/test_summary.py @@ -80,6 +80,7 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: format="JSON", http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -207,6 +208,7 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -250,6 +252,7 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], ) @@ -334,6 +337,7 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud format="JSON", http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -461,6 +465,7 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -504,6 +509,7 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], ) diff --git a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py index 54a36ba067e..853d11fb63c 100644 --- a/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py +++ b/tests/api_resources/radar/attacks/layer7/test_timeseries_groups.py @@ -84,6 +84,7 @@ def test_method_http_method_with_all_params(self, client: Cloudflare) -> None: format="JSON", http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -173,7 +174,7 @@ def test_method_industry_with_all_params(self, client: Cloudflare) -> None: http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -263,6 +264,7 @@ def test_method_managed_rules_with_all_params(self, client: Cloudflare) -> None: http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -308,6 +310,7 @@ def test_method_mitigation_product_with_all_params(self, client: Cloudflare) -> http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -352,7 +355,7 @@ def test_method_vertical_with_all_params(self, client: Cloudflare) -> None: http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -441,6 +444,7 @@ async def test_method_http_method_with_all_params(self, async_client: AsyncCloud format="JSON", http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -530,7 +534,7 @@ async def test_method_industry_with_all_params(self, async_client: AsyncCloudfla http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -620,6 +624,7 @@ async def test_method_managed_rules_with_all_params(self, async_client: AsyncClo http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], @@ -665,6 +670,7 @@ async def test_method_mitigation_product_with_all_params(self, async_client: Asy http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], normalization="PERCENTAGE", @@ -709,7 +715,7 @@ async def test_method_vertical_with_all_params(self, async_client: AsyncCloudfla http_method=["GET"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], mitigation_product=["DDOS"], name=["string"], diff --git a/tests/api_resources/radar/http/test_timeseries_groups.py b/tests/api_resources/radar/http/test_timeseries_groups.py index 8c0d3decdd5..8789e6c61ed 100644 --- a/tests/api_resources/radar/http/test_timeseries_groups.py +++ b/tests/api_resources/radar/http/test_timeseries_groups.py @@ -95,7 +95,7 @@ def test_method_browser_with_all_params(self, client: Cloudflare) -> None: http_protocol=["HTTP"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], os=["WINDOWS"], @@ -143,6 +143,7 @@ def test_method_browser_family_with_all_params(self, client: Cloudflare) -> None http_protocol=["HTTP"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], os=["WINDOWS"], @@ -563,7 +564,7 @@ async def test_method_browser_with_all_params(self, async_client: AsyncCloudflar http_protocol=["HTTP"], http_version=["HTTPv1"], ip_version=["IPv4"], - limit_per_group=4, + limit_per_group=10, location=["string"], name=["string"], os=["WINDOWS"], @@ -611,6 +612,7 @@ async def test_method_browser_family_with_all_params(self, async_client: AsyncCl http_protocol=["HTTP"], http_version=["HTTPv1"], ip_version=["IPv4"], + limit_per_group=10, location=["string"], name=["string"], os=["WINDOWS"], diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index b67fc2b8ad7..26021593dd9 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare._utils import parse_date from cloudflare.types.radar.ranking import DomainGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,8 +29,9 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( domain="google.com", - date=["string"], + date=[parse_date("2019-12-27")], format="JSON", + include_top_locations=True, limit=5, name=["string"], ranking_type="POPULAR", @@ -82,8 +84,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( domain="google.com", - date=["string"], + date=[parse_date("2019-12-27")], format="JSON", + include_top_locations=True, limit=5, name=["string"], ranking_type="POPULAR", diff --git a/tests/api_resources/radar/test_ranking.py b/tests/api_resources/radar/test_ranking.py index 9e4b188e021..6608571dbd3 100644 --- a/tests/api_resources/radar/test_ranking.py +++ b/tests/api_resources/radar/test_ranking.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare._utils import parse_datetime +from cloudflare._utils import parse_date, parse_datetime from cloudflare.types.radar import ( RankingTopResponse, RankingTimeseriesGroupsResponse, @@ -69,7 +69,7 @@ def test_method_top(self, client: Cloudflare) -> None: @parametrize def test_method_top_with_all_params(self, client: Cloudflare) -> None: ranking = client.radar.ranking.top( - date=["string"], + date=[parse_date("2019-12-27")], format="JSON", limit=5, location=["string"], @@ -150,7 +150,7 @@ async def test_method_top(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_top_with_all_params(self, async_client: AsyncCloudflare) -> None: ranking = await async_client.radar.ranking.top( - date=["string"], + date=[parse_date("2019-12-27")], format="JSON", limit=5, location=["string"],