Skip to content

Commit 079c03b

Browse files
feat(api): api update
1 parent af106a6 commit 079c03b

6 files changed

Lines changed: 34 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1807
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4c7cd88f83418c81a4198de85d130961a69344ad931a5ea1d9090462fa0f726c.yml
3-
openapi_spec_hash: 3852d2dae169f2e2c4a3cc20f8a8f33b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-32ba2bac94c7ddbff597992e1e3d67e03fc29b9644d9de414726d8e4dfae35e8.yml
3+
openapi_spec_hash: 4acde6cbe0472133f5139b3378227148
44
config_hash: 9f61e9f02b675e373b140471d52b670c

src/cloudflare/resources/bot_management.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ def update(
396396
zone_id: str,
397397
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
398398
auto_update_model: bool | NotGiven = NOT_GIVEN,
399+
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
399400
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
400401
enable_js: bool | NotGiven = NOT_GIVEN,
401402
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
@@ -480,6 +481,9 @@ def update(
480481
they are released.
481482
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
482483
484+
bm_cookie_enabled: Indicates that the bot management cookie can be placed on end user devices
485+
accessing the site. Defaults to true
486+
483487
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
484488
485489
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
@@ -517,6 +521,7 @@ def update(
517521
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
518522
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
519523
auto_update_model: bool | NotGiven = NOT_GIVEN,
524+
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
520525
suppress_session_score: bool | NotGiven = NOT_GIVEN,
521526
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
522527
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -544,6 +549,7 @@ def update(
544549
"sbfm_verified_bots": sbfm_verified_bots,
545550
"sbfm_likely_automated": sbfm_likely_automated,
546551
"auto_update_model": auto_update_model,
552+
"bm_cookie_enabled": bm_cookie_enabled,
547553
"suppress_session_score": suppress_session_score,
548554
},
549555
bot_management_update_params.BotManagementUpdateParams,
@@ -976,6 +982,7 @@ async def update(
976982
zone_id: str,
977983
ai_bots_protection: Literal["block", "disabled", "only_on_ad_pages"] | NotGiven = NOT_GIVEN,
978984
auto_update_model: bool | NotGiven = NOT_GIVEN,
985+
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
979986
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
980987
enable_js: bool | NotGiven = NOT_GIVEN,
981988
is_robots_txt_managed: bool | NotGiven = NOT_GIVEN,
@@ -1060,6 +1067,9 @@ async def update(
10601067
they are released.
10611068
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
10621069
1070+
bm_cookie_enabled: Indicates that the bot management cookie can be placed on end user devices
1071+
accessing the site. Defaults to true
1072+
10631073
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
10641074
10651075
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
@@ -1097,6 +1107,7 @@ async def update(
10971107
sbfm_verified_bots: Literal["allow", "block"] | NotGiven = NOT_GIVEN,
10981108
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
10991109
auto_update_model: bool | NotGiven = NOT_GIVEN,
1110+
bm_cookie_enabled: bool | NotGiven = NOT_GIVEN,
11001111
suppress_session_score: bool | NotGiven = NOT_GIVEN,
11011112
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11021113
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1124,6 +1135,7 @@ async def update(
11241135
"sbfm_verified_bots": sbfm_verified_bots,
11251136
"sbfm_likely_automated": sbfm_likely_automated,
11261137
"auto_update_model": auto_update_model,
1138+
"bm_cookie_enabled": bm_cookie_enabled,
11271139
"suppress_session_score": suppress_session_score,
11281140
},
11291141
bot_management_update_params.BotManagementUpdateParams,

src/cloudflare/types/bot_management/bot_management_update_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ class SubscriptionConfiguration(TypedDict, total=False):
154154
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
155155
"""
156156

157+
bm_cookie_enabled: bool
158+
"""
159+
Indicates that the bot management cookie can be placed on end user devices
160+
accessing the site. Defaults to true
161+
"""
162+
157163
crawler_protection: Literal["enabled", "disabled"]
158164
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
159165

src/cloudflare/types/bot_management/subscription_configuration.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ class SubscriptionConfiguration(BaseModel):
4949
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
5050
"""
5151

52+
bm_cookie_enabled: Optional[bool] = None
53+
"""
54+
Indicates that the bot management cookie can be placed on end user devices
55+
accessing the site. Defaults to true
56+
"""
57+
5258
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
5359
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
5460

src/cloudflare/types/bot_management/subscription_configuration_param.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ class SubscriptionConfigurationParam(TypedDict, total=False):
2222
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
2323
"""
2424

25+
bm_cookie_enabled: bool
26+
"""
27+
Indicates that the bot management cookie can be placed on end user devices
28+
accessing the site. Defaults to true
29+
"""
30+
2531
crawler_protection: Literal["enabled", "disabled"]
2632
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
2733

tests/api_resources/test_bot_management.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N
190190
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
191191
ai_bots_protection="block",
192192
auto_update_model=True,
193+
bm_cookie_enabled=True,
193194
crawler_protection="enabled",
194195
enable_js=True,
195196
is_robots_txt_managed=True,
@@ -442,6 +443,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn
442443
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
443444
ai_bots_protection="block",
444445
auto_update_model=True,
446+
bm_cookie_enabled=True,
445447
crawler_protection="enabled",
446448
enable_js=True,
447449
is_robots_txt_managed=True,

0 commit comments

Comments
 (0)