From 82d84e817ee6737820c2f8014f8dfc51a59868b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:03:15 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 2 +- .../resources/r2/buckets/domains/custom.py | 16 ++++++++-------- src/cloudflare/resources/zero_trust/dex/colos.py | 8 ++++---- .../zero_trust/dex/http_tests/percentiles.py | 8 ++++---- .../resources/zero_trust/dex/traceroute_tests.py | 8 ++++---- .../r2/buckets/domains/custom_create_params.py | 8 ++++---- .../types/zero_trust/dex/colo_list_params.py | 4 ++-- .../dex/http_tests/percentile_get_params.py | 4 ++-- .../dex/traceroute_test_percentiles_params.py | 4 ++-- .../r2/buckets/domains/test_custom.py | 14 ++++++++++++-- 10 files changed, 43 insertions(+), 33 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6f3a1184bba..1e1f5be63cd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1448 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-35321a10f9aec92aee5cd1982968d65ac8bddae6f8cdc422b8168d0d08b19c29.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1fd56d8b296b94813055efeb0207b08e331534303d4967b674513550f33e0ccb.yml diff --git a/src/cloudflare/resources/r2/buckets/domains/custom.py b/src/cloudflare/resources/r2/buckets/domains/custom.py index d448f2ba15f..34f2cac3387 100644 --- a/src/cloudflare/resources/r2/buckets/domains/custom.py +++ b/src/cloudflare/resources/r2/buckets/domains/custom.py @@ -60,8 +60,8 @@ def create( *, account_id: str, domain: str, + enabled: bool, zone_id: str, - enabled: bool | NotGiven = NOT_GIVEN, min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN, cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -81,11 +81,11 @@ def create( domain: Name of the custom domain to be added - zone_id: Zone ID of the custom domain - enabled: Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. + zone_id: Zone ID of the custom domain + min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. @@ -114,8 +114,8 @@ def create( body=maybe_transform( { "domain": domain, - "zone_id": zone_id, "enabled": enabled, + "zone_id": zone_id, "min_tls": min_tls, }, custom_create_params.CustomCreateParams, @@ -398,8 +398,8 @@ async def create( *, account_id: str, domain: str, + enabled: bool, zone_id: str, - enabled: bool | NotGiven = NOT_GIVEN, min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN, cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -419,11 +419,11 @@ async def create( domain: Name of the custom domain to be added - zone_id: Zone ID of the custom domain - enabled: Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. + zone_id: Zone ID of the custom domain + min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. @@ -452,8 +452,8 @@ async def create( body=await async_maybe_transform( { "domain": domain, - "zone_id": zone_id, "enabled": enabled, + "zone_id": zone_id, "min_tls": min_tls, }, custom_create_params.CustomCreateParams, diff --git a/src/cloudflare/resources/zero_trust/dex/colos.py b/src/cloudflare/resources/zero_trust/dex/colos.py index fff707ffa02..13fab4eb6ad 100644 --- a/src/cloudflare/resources/zero_trust/dex/colos.py +++ b/src/cloudflare/resources/zero_trust/dex/colos.py @@ -63,9 +63,9 @@ def list( are also returned and sorted alphabetically. Args: - from_: Start time for connection period in RFC3339 (ISO 8601) format. + from_: Start time for connection period in ISO (RFC3339 - ISO 8601) format - to: End time for connection period in RFC3339 (ISO 8601) format. + to: End time for connection period in ISO (RFC3339 - ISO 8601) format sort_by: Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically. @@ -141,9 +141,9 @@ def list( are also returned and sorted alphabetically. Args: - from_: Start time for connection period in RFC3339 (ISO 8601) format. + from_: Start time for connection period in ISO (RFC3339 - ISO 8601) format - to: End time for connection period in RFC3339 (ISO 8601) format. + to: End time for connection period in ISO (RFC3339 - ISO 8601) format sort_by: Type of usage that colos should be sorted by. If unspecified, returns all Cloudflare colos sorted alphabetically. diff --git a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py index 2782a7b67f8..61550f43e11 100644 --- a/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py +++ b/src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py @@ -70,9 +70,9 @@ def get( Args: test_id: API Resource UUID tag. - from_: Start time for aggregate metrics in ISO format + from_: Start time for the query in ISO (RFC3339 - ISO 8601) format - to: End time for aggregate metrics in ISO format + to: End time for the query in ISO (RFC3339 - ISO 8601) format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -157,9 +157,9 @@ async def get( Args: test_id: API Resource UUID tag. - from_: Start time for aggregate metrics in ISO format + from_: Start time for the query in ISO (RFC3339 - ISO 8601) format - to: End time for aggregate metrics in ISO format + to: End time for the query in ISO (RFC3339 - ISO 8601) format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. diff --git a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py index cea6e4567d9..874c7c069e5 100644 --- a/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py +++ b/src/cloudflare/resources/zero_trust/dex/traceroute_tests.py @@ -210,9 +210,9 @@ def percentiles( Args: test_id: API Resource UUID tag. - from_: Start time for aggregate metrics in ISO format + from_: Start time for the query in ISO (RFC3339 - ISO 8601) format - to: End time for aggregate metrics in ISO format + to: End time for the query in ISO (RFC3339 - ISO 8601) format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. @@ -432,9 +432,9 @@ async def percentiles( Args: test_id: API Resource UUID tag. - from_: Start time for aggregate metrics in ISO format + from_: Start time for the query in ISO (RFC3339 - ISO 8601) format - to: End time for aggregate metrics in ISO format + to: End time for the query in ISO (RFC3339 - ISO 8601) format colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in combination with deviceId param. diff --git a/src/cloudflare/types/r2/buckets/domains/custom_create_params.py b/src/cloudflare/types/r2/buckets/domains/custom_create_params.py index 0c9124ce5f1..d975f7ddba6 100644 --- a/src/cloudflare/types/r2/buckets/domains/custom_create_params.py +++ b/src/cloudflare/types/r2/buckets/domains/custom_create_params.py @@ -16,15 +16,15 @@ class CustomCreateParams(TypedDict, total=False): domain: Required[str] """Name of the custom domain to be added""" - zone_id: Required[Annotated[str, PropertyInfo(alias="zoneId")]] - """Zone ID of the custom domain""" - - enabled: bool + enabled: Required[bool] """Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. """ + zone_id: Required[Annotated[str, PropertyInfo(alias="zoneId")]] + """Zone ID of the custom domain""" + min_tls: Annotated[Literal["1.0", "1.1", "1.2", "1.3"], PropertyInfo(alias="minTLS")] """Minimum TLS Version the custom domain will accept for incoming connections. diff --git a/src/cloudflare/types/zero_trust/dex/colo_list_params.py b/src/cloudflare/types/zero_trust/dex/colo_list_params.py index 975e137ecac..c208fcae20f 100644 --- a/src/cloudflare/types/zero_trust/dex/colo_list_params.py +++ b/src/cloudflare/types/zero_trust/dex/colo_list_params.py @@ -13,10 +13,10 @@ class ColoListParams(TypedDict, total=False): account_id: Required[str] from_: Required[Annotated[str, PropertyInfo(alias="from")]] - """Start time for connection period in RFC3339 (ISO 8601) format.""" + """Start time for connection period in ISO (RFC3339 - ISO 8601) format""" to: Required[str] - """End time for connection period in RFC3339 (ISO 8601) format.""" + """End time for connection period in ISO (RFC3339 - ISO 8601) format""" sort_by: Annotated[Literal["fleet-status-usage", "application-tests-usage"], PropertyInfo(alias="sortBy")] """Type of usage that colos should be sorted by. diff --git a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py b/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py index 78d1009603e..1abb70fe422 100644 --- a/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py +++ b/src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py @@ -14,10 +14,10 @@ class PercentileGetParams(TypedDict, total=False): account_id: Required[str] from_: Required[Annotated[str, PropertyInfo(alias="from")]] - """Start time for aggregate metrics in ISO format""" + """Start time for the query in ISO (RFC3339 - ISO 8601) format""" to: Required[str] - """End time for aggregate metrics in ISO format""" + """End time for the query in ISO (RFC3339 - ISO 8601) format""" colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py b/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py index d6ada52d1d2..2bb5c406c65 100644 --- a/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py +++ b/src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py @@ -14,10 +14,10 @@ class TracerouteTestPercentilesParams(TypedDict, total=False): account_id: Required[str] from_: Required[Annotated[str, PropertyInfo(alias="from")]] - """Start time for aggregate metrics in ISO format""" + """Start time for the query in ISO (RFC3339 - ISO 8601) format""" to: Required[str] - """End time for aggregate metrics in ISO format""" + """End time for the query in ISO (RFC3339 - ISO 8601) format""" colo: str """Optionally filter result stats to a Cloudflare colo. diff --git a/tests/api_resources/r2/buckets/domains/test_custom.py b/tests/api_resources/r2/buckets/domains/test_custom.py index 15e6e180724..8e7e018be8f 100644 --- a/tests/api_resources/r2/buckets/domains/test_custom.py +++ b/tests/api_resources/r2/buckets/domains/test_custom.py @@ -29,6 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) assert_matches_type(CustomCreateResponse, custom, path=["response"]) @@ -39,8 +40,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", - zone_id="36ca64a6d92827b8a6b90be344bb1bfd", enabled=True, + zone_id="36ca64a6d92827b8a6b90be344bb1bfd", min_tls="1.0", cf_r2_jurisdiction="default", ) @@ -52,6 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) @@ -66,6 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) as response: assert not response.is_closed @@ -83,6 +86,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: bucket_name="example-bucket", account_id="", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) @@ -91,6 +95,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) @@ -373,6 +378,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) assert_matches_type(CustomCreateResponse, custom, path=["response"]) @@ -383,8 +389,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", - zone_id="36ca64a6d92827b8a6b90be344bb1bfd", enabled=True, + zone_id="36ca64a6d92827b8a6b90be344bb1bfd", min_tls="1.0", cf_r2_jurisdiction="default", ) @@ -396,6 +402,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) @@ -410,6 +417,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) as response: assert not response.is_closed @@ -427,6 +435,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: bucket_name="example-bucket", account_id="", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", ) @@ -435,6 +444,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domain="prefix.example-domain.com", + enabled=True, zone_id="36ca64a6d92827b8a6b90be344bb1bfd", )