mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
feat(api): api update (#2563)
This commit is contained in:
parent
1b62d3e0b0
commit
f89618e1f5
12 changed files with 73 additions and 1 deletions
|
|
@ -1,2 +1,2 @@
|
|||
configured_endpoints: 1655
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-de81c1bcfec729c7daa975bd5993c6885134e7352887839339ac28c78259543d.yml
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-384dacc9e1881c2947aebfa77615cbb350c8e538f01b57e78181188f25170262.yml
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
fight_mode: bool | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
|
|
@ -133,6 +134,8 @@ class BotManagementResource(SyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -154,6 +157,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -234,6 +238,8 @@ class BotManagementResource(SyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -263,6 +269,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -344,6 +351,8 @@ class BotManagementResource(SyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -376,6 +385,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
auto_update_model: bool | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
suppress_session_score: bool | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
|
|
@ -457,6 +467,8 @@ class BotManagementResource(SyncAPIResource):
|
|||
they are released.
|
||||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -479,6 +491,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
fight_mode: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -504,6 +517,7 @@ class BotManagementResource(SyncAPIResource):
|
|||
body=maybe_transform(
|
||||
{
|
||||
"ai_bots_protection": ai_bots_protection,
|
||||
"crawler_protection": crawler_protection,
|
||||
"enable_js": enable_js,
|
||||
"fight_mode": fight_mode,
|
||||
"optimize_wordpress": optimize_wordpress,
|
||||
|
|
@ -600,6 +614,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
fight_mode: bool | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
|
|
@ -677,6 +692,8 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -698,6 +715,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -778,6 +796,8 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -807,6 +827,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -888,6 +909,8 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
|
||||
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -920,6 +943,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
auto_update_model: bool | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
suppress_session_score: bool | NotGiven = NOT_GIVEN,
|
||||
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
||||
|
|
@ -1001,6 +1025,8 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
they are released.
|
||||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
|
||||
|
||||
crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
|
||||
|
||||
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
|
||||
|
||||
|
|
@ -1023,6 +1049,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
*,
|
||||
zone_id: str,
|
||||
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
|
||||
enable_js: bool | NotGiven = NOT_GIVEN,
|
||||
fight_mode: bool | NotGiven = NOT_GIVEN,
|
||||
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
|
||||
|
|
@ -1048,6 +1075,7 @@ class AsyncBotManagementResource(AsyncAPIResource):
|
|||
body=await async_maybe_transform(
|
||||
{
|
||||
"ai_bots_protection": ai_bots_protection,
|
||||
"crawler_protection": crawler_protection,
|
||||
"enable_js": enable_js,
|
||||
"fight_mode": fight_mode,
|
||||
"optimize_wordpress": optimize_wordpress,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ class BotFightModeConfiguration(BaseModel):
|
|||
ai_bots_protection: Optional[Literal["block", "disabled"]] = None
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: Optional[bool] = None
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ class BotFightModeConfigurationParam(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ class BotFightModeConfiguration(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
@ -38,6 +41,9 @@ class SuperBotFightModeDefinitelyConfiguration(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
@ -68,6 +74,9 @@ class SuperBotFightModeLikelyConfiguration(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
@ -108,6 +117,9 @@ class SubscriptionConfiguration(TypedDict, total=False):
|
|||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
|
||||
"""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ class SubscriptionConfiguration(BaseModel):
|
|||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
|
||||
"""
|
||||
|
||||
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: Optional[bool] = None
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ class SubscriptionConfigurationParam(TypedDict, total=False):
|
|||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
|
||||
"""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ class SuperBotFightModeDefinitelyConfiguration(BaseModel):
|
|||
ai_bots_protection: Optional[Literal["block", "disabled"]] = None
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: Optional[bool] = None
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ class SuperBotFightModeLikelyConfiguration(BaseModel):
|
|||
ai_bots_protection: Optional[Literal["block", "disabled"]] = None
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Optional[Literal["enabled", "disabled"]] = None
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: Optional[bool] = None
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False):
|
|||
ai_bots_protection: Literal["block", "disabled"]
|
||||
"""Enable rule to block AI Scrapers and Crawlers."""
|
||||
|
||||
crawler_protection: Literal["enabled", "disabled"]
|
||||
"""Enable rule to punish AI Scrapers and Crawlers via a link maze."""
|
||||
|
||||
enable_js: bool
|
||||
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class TestBotManagement:
|
|||
bot_management = client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
fight_mode=True,
|
||||
)
|
||||
|
|
@ -80,6 +81,7 @@ class TestBotManagement:
|
|||
bot_management = client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
optimize_wordpress=True,
|
||||
sbfm_definitely_automated="allow",
|
||||
|
|
@ -131,6 +133,7 @@ class TestBotManagement:
|
|||
bot_management = client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
optimize_wordpress=True,
|
||||
sbfm_definitely_automated="allow",
|
||||
|
|
@ -184,6 +187,7 @@ class TestBotManagement:
|
|||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
auto_update_model=True,
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
suppress_session_score=False,
|
||||
)
|
||||
|
|
@ -274,6 +278,7 @@ class TestAsyncBotManagement:
|
|||
bot_management = await async_client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
fight_mode=True,
|
||||
)
|
||||
|
|
@ -322,6 +327,7 @@ class TestAsyncBotManagement:
|
|||
bot_management = await async_client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
optimize_wordpress=True,
|
||||
sbfm_definitely_automated="allow",
|
||||
|
|
@ -373,6 +379,7 @@ class TestAsyncBotManagement:
|
|||
bot_management = await async_client.bot_management.update(
|
||||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
optimize_wordpress=True,
|
||||
sbfm_definitely_automated="allow",
|
||||
|
|
@ -426,6 +433,7 @@ class TestAsyncBotManagement:
|
|||
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
||||
ai_bots_protection="block",
|
||||
auto_update_model=True,
|
||||
crawler_protection="enabled",
|
||||
enable_js=True,
|
||||
suppress_session_score=False,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue