From a9931489480e7c0c2180b756c8a0110c8230f5a6 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 3 Dec 2024 14:40:25 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 2 +- src/cloudflare/types/workers/script_update_params.py | 7 +++++++ .../dispatch/namespaces/script_update_params.py | 7 +++++++ tests/api_resources/workers/test_scripts.py | 2 ++ .../dispatch/namespaces/test_scripts.py | 2 ++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7eecdd43461..fe170af0b86 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-58466f8887cb79ea28006b477268bfeceb49aca0ef6b5907ebd6a779543da4ae.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6de93f8f17d32aab783331839a3d62613deee459b821a7a76cb0f4e73a038ce.yml diff --git a/src/cloudflare/types/workers/script_update_params.py b/src/cloudflare/types/workers/script_update_params.py index 9e6a232784d..ebdb23511ac 100644 --- a/src/cloudflare/types/workers/script_update_params.py +++ b/src/cloudflare/types/workers/script_update_params.py @@ -60,6 +60,13 @@ class Variant0MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class Variant0MetadataAssets(TypedDict, total=False): config: Variant0MetadataAssetsConfig diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py index 5ab71b88015..13d32321c3f 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py @@ -55,6 +55,13 @@ class Variant0MetadataAssetsConfig(TypedDict, total=False): is no Worker script. """ + serve_directly: bool + """ + When true and the incoming request matches an asset, that will be served instead + of invoking the Worker script. When false, requests will always invoke the + Worker script. + """ + class Variant0MetadataAssets(TypedDict, total=False): config: Variant0MetadataAssetsConfig diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 0babe17f413..f031908950b 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -48,6 +48,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "config": { "html_handling": "auto-trailing-slash", "not_found_handling": "none", + "serve_directly": True, }, "jwt": "jwt", }, @@ -396,6 +397,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "config": { "html_handling": "auto-trailing-slash", "not_found_handling": "none", + "serve_directly": True, }, "jwt": "jwt", }, diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 98ffebf8766..c5c287cfdab 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -43,6 +43,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "config": { "html_handling": "auto-trailing-slash", "not_found_handling": "none", + "serve_directly": True, }, "jwt": "jwt", }, @@ -384,6 +385,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "config": { "html_handling": "auto-trailing-slash", "not_found_handling": "none", + "serve_directly": True, }, "jwt": "jwt", },