-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate more types that are used as request bodies (#2263)
- Loading branch information
1 parent
72b7def
commit acbdc24
Showing
39 changed files
with
1,252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/cloudflare/types/bot_management/bot_fight_mode_configuration_param.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing_extensions import Literal, TypedDict | ||
|
||
__all__ = ["BotFightModeConfigurationParam"] | ||
|
||
|
||
class BotFightModeConfigurationParam(TypedDict, total=False): | ||
ai_bots_protection: Literal["block", "disabled"] | ||
"""Enable rule to block AI Scrapers and Crawlers.""" | ||
|
||
enable_js: bool | ||
"""Use lightweight, invisible JavaScript detections to improve Bot Management. | ||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). | ||
""" | ||
|
||
fight_mode: bool | ||
"""Whether to enable Bot Fight Mode.""" |
31 changes: 31 additions & 0 deletions
31
src/cloudflare/types/bot_management/subscription_configuration_param.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing_extensions import Literal, TypedDict | ||
|
||
__all__ = ["SubscriptionConfigurationParam"] | ||
|
||
|
||
class SubscriptionConfigurationParam(TypedDict, total=False): | ||
ai_bots_protection: Literal["block", "disabled"] | ||
"""Enable rule to block AI Scrapers and Crawlers.""" | ||
|
||
auto_update_model: bool | ||
""" | ||
Automatically update to the newest bot detection models created by Cloudflare as | ||
they are released. | ||
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) | ||
""" | ||
|
||
enable_js: bool | ||
"""Use lightweight, invisible JavaScript detections to improve Bot Management. | ||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). | ||
""" | ||
|
||
suppress_session_score: bool | ||
""" | ||
Whether to disable tracking the highest bot score for a session in the Bot | ||
Management cookie. | ||
""" |
34 changes: 34 additions & 0 deletions
34
src/cloudflare/types/bot_management/super_bot_fight_mode_definitely_configuration_param.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing_extensions import Literal, TypedDict | ||
|
||
__all__ = ["SuperBotFightModeDefinitelyConfigurationParam"] | ||
|
||
|
||
class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False): | ||
ai_bots_protection: Literal["block", "disabled"] | ||
"""Enable rule to block AI Scrapers and Crawlers.""" | ||
|
||
enable_js: bool | ||
"""Use lightweight, invisible JavaScript detections to improve Bot Management. | ||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). | ||
""" | ||
|
||
optimize_wordpress: bool | ||
"""Whether to optimize Super Bot Fight Mode protections for Wordpress.""" | ||
|
||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | ||
"""Super Bot Fight Mode (SBFM) action to take on definitely automated requests.""" | ||
|
||
sbfm_static_resource_protection: bool | ||
""" | ||
Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if | ||
static resources on your application need bot protection. Note: Static resource | ||
protection can also result in legitimate traffic being blocked. | ||
""" | ||
|
||
sbfm_verified_bots: Literal["allow", "block"] | ||
"""Super Bot Fight Mode (SBFM) action to take on verified bots requests.""" |
37 changes: 37 additions & 0 deletions
37
src/cloudflare/types/bot_management/super_bot_fight_mode_likely_configuration_param.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing_extensions import Literal, TypedDict | ||
|
||
__all__ = ["SuperBotFightModeLikelyConfigurationParam"] | ||
|
||
|
||
class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False): | ||
ai_bots_protection: Literal["block", "disabled"] | ||
"""Enable rule to block AI Scrapers and Crawlers.""" | ||
|
||
enable_js: bool | ||
"""Use lightweight, invisible JavaScript detections to improve Bot Management. | ||
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). | ||
""" | ||
|
||
optimize_wordpress: bool | ||
"""Whether to optimize Super Bot Fight Mode protections for Wordpress.""" | ||
|
||
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | ||
"""Super Bot Fight Mode (SBFM) action to take on definitely automated requests.""" | ||
|
||
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"] | ||
"""Super Bot Fight Mode (SBFM) action to take on likely automated requests.""" | ||
|
||
sbfm_static_resource_protection: bool | ||
""" | ||
Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if | ||
static resources on your application need bot protection. Note: Static resource | ||
protection can also result in legitimate traffic being blocked. | ||
""" | ||
|
||
sbfm_verified_bots: Literal["allow", "block"] | ||
"""Super Bot Fight Mode (SBFM) action to take on verified bots requests.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Union | ||
from typing_extensions import Literal, TypeAlias | ||
|
||
__all__ = ["TTLParam"] | ||
|
||
TTLParam: TypeAlias = Union[float, Literal[1]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing import List | ||
from typing_extensions import Literal, Required, TypedDict | ||
|
||
from .identity_provider_type import IdentityProviderType | ||
from .identity_provider_scim_config_param import IdentityProviderSCIMConfigParam | ||
|
||
__all__ = ["AzureADParam", "Config"] | ||
|
||
|
||
class Config(TypedDict, total=False): | ||
claims: List[str] | ||
"""Custom claims""" | ||
|
||
client_id: str | ||
"""Your OAuth Client ID""" | ||
|
||
client_secret: str | ||
"""Your OAuth Client Secret""" | ||
|
||
conditional_access_enabled: bool | ||
"""Should Cloudflare try to load authentication contexts from your account""" | ||
|
||
directory_id: str | ||
"""Your Azure directory uuid""" | ||
|
||
email_claim_name: str | ||
"""The claim name for email in the id_token response.""" | ||
|
||
prompt: Literal["login", "select_account", "none"] | ||
"""Indicates the type of user interaction that is required. | ||
prompt=login forces the user to enter their credentials on that request, | ||
negating single-sign on. prompt=none is the opposite. It ensures that the user | ||
isn't presented with any interactive prompt. If the request can't be completed | ||
silently by using single-sign on, the Microsoft identity platform returns an | ||
interaction_required error. prompt=select_account interrupts single sign-on | ||
providing account selection experience listing all the accounts either in | ||
session or any remembered account or an option to choose to use a different | ||
account altogether. | ||
""" | ||
|
||
support_groups: bool | ||
"""Should Cloudflare try to load groups from your account""" | ||
|
||
|
||
class AzureADParam(TypedDict, total=False): | ||
config: Required[Config] | ||
"""The configuration parameters for the identity provider. | ||
To view the required parameters for a specific provider, refer to our | ||
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). | ||
""" | ||
|
||
name: Required[str] | ||
"""The name of the identity provider, shown to users on the login page.""" | ||
|
||
type: Required[IdentityProviderType] | ||
"""The type of identity provider. | ||
To determine the value for a specific provider, refer to our | ||
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/). | ||
""" | ||
|
||
scim_config: IdentityProviderSCIMConfigParam | ||
""" | ||
The configuration settings for enabling a System for Cross-Domain Identity | ||
Management (SCIM) with the identity provider. | ||
""" |
Oops, something went wrong.