From 0ed68144938050026b26ebe85fb47f3076cf2bcc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 23:22:39 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#1167) --- .stats.yml | 2 +- src/cloudflare/types/zones/security_headers.py | 3 +++ src/cloudflare/types/zones/setting_edit_params.py | 3 +++ tests/api_resources/zones/test_settings.py | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4d35e2d2ce3..38bc69cb988 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e82b646fc856d1a049c805050d47c145293003664daee4f933cc9e66dc95264b.yml diff --git a/src/cloudflare/types/zones/security_headers.py b/src/cloudflare/types/zones/security_headers.py index c2ad2888bbb..0054c519547 100644 --- a/src/cloudflare/types/zones/security_headers.py +++ b/src/cloudflare/types/zones/security_headers.py @@ -22,6 +22,9 @@ class ValueStrictTransportSecurity(BaseModel): nosniff: Optional[bool] = None """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + preload: Optional[bool] = None + """Enable automatic preload of the HSTS configuration.""" + class Value(BaseModel): strict_transport_security: Optional[ValueStrictTransportSecurity] = None diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index 32be3362213..3bc53b6eba5 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -640,6 +640,9 @@ class SecurityHeadersValueStrictTransportSecurity(TypedDict, total=False): nosniff: bool """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" + preload: bool + """Enable automatic preload of the HSTS configuration.""" + class SecurityHeadersValue(TypedDict, total=False): strict_transport_security: SecurityHeadersValueStrictTransportSecurity diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index 13ce80fe063..f8af72165ec 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -2493,6 +2493,7 @@ def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> No "include_subdomains": True, "max_age": 86400, "nosniff": True, + "preload": True, } }, ) @@ -5825,6 +5826,7 @@ async def test_method_edit_with_all_params_overload_42(self, async_client: Async "include_subdomains": True, "max_age": 86400, "nosniff": True, + "preload": True, } }, )