Skip to content

Commit acbdc24

Browse files
feat: generate more types that are used as request bodies (#2263)
1 parent 72b7def commit acbdc24

39 files changed

+1252
-0
lines changed

src/cloudflare/types/bot_management/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@
77
from .bot_fight_mode_configuration import BotFightModeConfiguration as BotFightModeConfiguration
88
from .bot_management_update_params import BotManagementUpdateParams as BotManagementUpdateParams
99
from .bot_management_update_response import BotManagementUpdateResponse as BotManagementUpdateResponse
10+
from .subscription_configuration_param import SubscriptionConfigurationParam as SubscriptionConfigurationParam
11+
from .bot_fight_mode_configuration_param import BotFightModeConfigurationParam as BotFightModeConfigurationParam
1012
from .super_bot_fight_mode_likely_configuration import (
1113
SuperBotFightModeLikelyConfiguration as SuperBotFightModeLikelyConfiguration,
1214
)
1315
from .super_bot_fight_mode_definitely_configuration import (
1416
SuperBotFightModeDefinitelyConfiguration as SuperBotFightModeDefinitelyConfiguration,
1517
)
18+
from .super_bot_fight_mode_likely_configuration_param import (
19+
SuperBotFightModeLikelyConfigurationParam as SuperBotFightModeLikelyConfigurationParam,
20+
)
21+
from .super_bot_fight_mode_definitely_configuration_param import (
22+
SuperBotFightModeDefinitelyConfigurationParam as SuperBotFightModeDefinitelyConfigurationParam,
23+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypedDict
6+
7+
__all__ = ["BotFightModeConfigurationParam"]
8+
9+
10+
class BotFightModeConfigurationParam(TypedDict, total=False):
11+
ai_bots_protection: Literal["block", "disabled"]
12+
"""Enable rule to block AI Scrapers and Crawlers."""
13+
14+
enable_js: bool
15+
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
16+
17+
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
18+
"""
19+
20+
fight_mode: bool
21+
"""Whether to enable Bot Fight Mode."""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypedDict
6+
7+
__all__ = ["SubscriptionConfigurationParam"]
8+
9+
10+
class SubscriptionConfigurationParam(TypedDict, total=False):
11+
ai_bots_protection: Literal["block", "disabled"]
12+
"""Enable rule to block AI Scrapers and Crawlers."""
13+
14+
auto_update_model: bool
15+
"""
16+
Automatically update to the newest bot detection models created by Cloudflare as
17+
they are released.
18+
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
19+
"""
20+
21+
enable_js: bool
22+
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
23+
24+
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
25+
"""
26+
27+
suppress_session_score: bool
28+
"""
29+
Whether to disable tracking the highest bot score for a session in the Bot
30+
Management cookie.
31+
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypedDict
6+
7+
__all__ = ["SuperBotFightModeDefinitelyConfigurationParam"]
8+
9+
10+
class SuperBotFightModeDefinitelyConfigurationParam(TypedDict, total=False):
11+
ai_bots_protection: Literal["block", "disabled"]
12+
"""Enable rule to block AI Scrapers and Crawlers."""
13+
14+
enable_js: bool
15+
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
16+
17+
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
18+
"""
19+
20+
optimize_wordpress: bool
21+
"""Whether to optimize Super Bot Fight Mode protections for Wordpress."""
22+
23+
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"]
24+
"""Super Bot Fight Mode (SBFM) action to take on definitely automated requests."""
25+
26+
sbfm_static_resource_protection: bool
27+
"""
28+
Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
29+
static resources on your application need bot protection. Note: Static resource
30+
protection can also result in legitimate traffic being blocked.
31+
"""
32+
33+
sbfm_verified_bots: Literal["allow", "block"]
34+
"""Super Bot Fight Mode (SBFM) action to take on verified bots requests."""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import Literal, TypedDict
6+
7+
__all__ = ["SuperBotFightModeLikelyConfigurationParam"]
8+
9+
10+
class SuperBotFightModeLikelyConfigurationParam(TypedDict, total=False):
11+
ai_bots_protection: Literal["block", "disabled"]
12+
"""Enable rule to block AI Scrapers and Crawlers."""
13+
14+
enable_js: bool
15+
"""Use lightweight, invisible JavaScript detections to improve Bot Management.
16+
17+
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
18+
"""
19+
20+
optimize_wordpress: bool
21+
"""Whether to optimize Super Bot Fight Mode protections for Wordpress."""
22+
23+
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"]
24+
"""Super Bot Fight Mode (SBFM) action to take on definitely automated requests."""
25+
26+
sbfm_likely_automated: Literal["allow", "block", "managed_challenge"]
27+
"""Super Bot Fight Mode (SBFM) action to take on likely automated requests."""
28+
29+
sbfm_static_resource_protection: bool
30+
"""
31+
Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if
32+
static resources on your application need bot protection. Note: Static resource
33+
protection can also result in legitimate traffic being blocked.
34+
"""
35+
36+
sbfm_verified_bots: Literal["allow", "block"]
37+
"""Super Bot Fight Mode (SBFM) action to take on verified bots requests."""

src/cloudflare/types/dns/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .ds_record import DSRecord as DSRecord
88
from .mx_record import MXRecord as MXRecord
99
from .ns_record import NSRecord as NSRecord
10+
from .ttl_param import TTLParam as TTLParam
1011
from .caa_record import CAARecord as CAARecord
1112
from .loc_record import LOCRecord as LOCRecord
1213
from .ptr_record import PTRRecord as PTRRecord

src/cloudflare/types/dns/ttl_param.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Union
6+
from typing_extensions import Literal, TypeAlias
7+
8+
__all__ = ["TTLParam"]
9+
10+
TTLParam: TypeAlias = Union[float, Literal[1]]

src/cloudflare/types/zero_trust/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .organization import Organization as Organization
1919
from .everyone_rule import EveryoneRule as EveryoneRule
2020
from .ip_rule_param import IPRuleParam as IPRuleParam
21+
from .azure_ad_param import AzureADParam as AzureADParam
2122
from .email_list_rule import EmailListRule as EmailListRule
2223
from .okta_group_rule import OktaGroupRule as OktaGroupRule
2324
from .saml_group_rule import SAMLGroupRule as SAMLGroupRule
@@ -56,6 +57,7 @@
5657
from .tunnel_delete_response import TunnelDeleteResponse as TunnelDeleteResponse
5758
from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse
5859
from .gsuite_group_rule_param import GSuiteGroupRuleParam as GSuiteGroupRuleParam
60+
from .identity_provider_param import IdentityProviderParam as IdentityProviderParam
5961
from .external_evaluation_rule import ExternalEvaluationRule as ExternalEvaluationRule
6062
from .github_organization_rule import GitHubOrganizationRule as GitHubOrganizationRule
6163
from .service_token_rule_param import ServiceTokenRuleParam as ServiceTokenRuleParam
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import List
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
from .identity_provider_type import IdentityProviderType
9+
from .identity_provider_scim_config_param import IdentityProviderSCIMConfigParam
10+
11+
__all__ = ["AzureADParam", "Config"]
12+
13+
14+
class Config(TypedDict, total=False):
15+
claims: List[str]
16+
"""Custom claims"""
17+
18+
client_id: str
19+
"""Your OAuth Client ID"""
20+
21+
client_secret: str
22+
"""Your OAuth Client Secret"""
23+
24+
conditional_access_enabled: bool
25+
"""Should Cloudflare try to load authentication contexts from your account"""
26+
27+
directory_id: str
28+
"""Your Azure directory uuid"""
29+
30+
email_claim_name: str
31+
"""The claim name for email in the id_token response."""
32+
33+
prompt: Literal["login", "select_account", "none"]
34+
"""Indicates the type of user interaction that is required.
35+
36+
prompt=login forces the user to enter their credentials on that request,
37+
negating single-sign on. prompt=none is the opposite. It ensures that the user
38+
isn't presented with any interactive prompt. If the request can't be completed
39+
silently by using single-sign on, the Microsoft identity platform returns an
40+
interaction_required error. prompt=select_account interrupts single sign-on
41+
providing account selection experience listing all the accounts either in
42+
session or any remembered account or an option to choose to use a different
43+
account altogether.
44+
"""
45+
46+
support_groups: bool
47+
"""Should Cloudflare try to load groups from your account"""
48+
49+
50+
class AzureADParam(TypedDict, total=False):
51+
config: Required[Config]
52+
"""The configuration parameters for the identity provider.
53+
54+
To view the required parameters for a specific provider, refer to our
55+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
56+
"""
57+
58+
name: Required[str]
59+
"""The name of the identity provider, shown to users on the login page."""
60+
61+
type: Required[IdentityProviderType]
62+
"""The type of identity provider.
63+
64+
To determine the value for a specific provider, refer to our
65+
[developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
66+
"""
67+
68+
scim_config: IdentityProviderSCIMConfigParam
69+
"""
70+
The configuration settings for enabling a System for Cross-Domain Identity
71+
Management (SCIM) with the identity provider.
72+
"""

0 commit comments

Comments
 (0)