mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-12 06:53:21 +00:00
feat(api): api update
This commit is contained in:
parent
348095e34f
commit
98fee4a292
5 changed files with 31 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
configured_endpoints: 1752
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70a10a5a2a1ad186b926adc1495ede7dc3df082272838633c1c7e6d43f8483db.yml
|
||||
openapi_spec_hash: 1b4af36aa1670bc92a0815f572ec8e45
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbf820133fda5d5f88170bea1f579cbf51f58883c727ec475d3091e334f62618.yml
|
||||
openapi_spec_hash: cad99035781372477dd6e995664b414e
|
||||
config_hash: 4b927ddc073213712e291a61ccf872b0
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
from typing import Optional
|
||||
from typing_extensions import Literal
|
||||
|
||||
from pydantic import Field as FieldInfo
|
||||
|
||||
from ...._models import BaseModel
|
||||
from .tls_settings import TLSSettings
|
||||
from .fips_settings import FipsSettings
|
||||
|
|
@ -15,7 +17,12 @@ from .extended_email_matching import ExtendedEmailMatching
|
|||
from .browser_isolation_settings import BrowserIsolationSettings
|
||||
from .custom_certificate_settings import CustomCertificateSettings
|
||||
|
||||
__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Sandbox"]
|
||||
__all__ = ["GatewayConfigurationSettings", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
|
||||
|
||||
|
||||
class AppControlSettings(BaseModel):
|
||||
enabled: Optional[bool] = None
|
||||
"""Enable App Control"""
|
||||
|
||||
|
||||
class Certificate(BaseModel):
|
||||
|
|
@ -47,6 +54,9 @@ class GatewayConfigurationSettings(BaseModel):
|
|||
antivirus: Optional[AntiVirusSettings] = None
|
||||
"""Anti-virus settings."""
|
||||
|
||||
app_control_settings: Optional[AppControlSettings] = FieldInfo(alias="app-control-settings", default=None)
|
||||
"""Setting to enable App Control"""
|
||||
|
||||
block_page: Optional[BlockPageSettings] = None
|
||||
"""Block page layout settings."""
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
from typing_extensions import Literal, Required, TypedDict
|
||||
from typing_extensions import Literal, Required, Annotated, TypedDict
|
||||
|
||||
from ...._utils import PropertyInfo
|
||||
from .tls_settings_param import TLSSettingsParam
|
||||
from .fips_settings_param import FipsSettingsParam
|
||||
from .protocol_detection_param import ProtocolDetectionParam
|
||||
|
|
@ -16,7 +17,12 @@ from .extended_email_matching_param import ExtendedEmailMatchingParam
|
|||
from .browser_isolation_settings_param import BrowserIsolationSettingsParam
|
||||
from .custom_certificate_settings_param import CustomCertificateSettingsParam
|
||||
|
||||
__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Sandbox"]
|
||||
__all__ = ["GatewayConfigurationSettingsParam", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
|
||||
|
||||
|
||||
class AppControlSettings(TypedDict, total=False):
|
||||
enabled: bool
|
||||
"""Enable App Control"""
|
||||
|
||||
|
||||
class Certificate(TypedDict, total=False):
|
||||
|
|
@ -48,6 +54,9 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
|
|||
antivirus: Optional[AntiVirusSettingsParam]
|
||||
"""Anti-virus settings."""
|
||||
|
||||
app_control_settings: Annotated[Optional[AppControlSettings], PropertyInfo(alias="app-control-settings")]
|
||||
"""Setting to enable App Control"""
|
||||
|
||||
block_page: Optional[BlockPageSettingsParam]
|
||||
"""Block page layout settings."""
|
||||
|
||||
|
|
|
|||
|
|
@ -123,3 +123,6 @@ class GatewayRule(BaseModel):
|
|||
|
||||
version: Optional[int] = None
|
||||
"""version number of the rule"""
|
||||
|
||||
warning_status: Optional[str] = None
|
||||
"""Warning for a misconfigured rule, if any."""
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class TestConfigurations:
|
|||
"support_url": "support_url",
|
||||
},
|
||||
},
|
||||
"app_control_settings": {"enabled": False},
|
||||
"block_page": {
|
||||
"background_color": "background_color",
|
||||
"enabled": True,
|
||||
|
|
@ -137,6 +138,7 @@ class TestConfigurations:
|
|||
"support_url": "support_url",
|
||||
},
|
||||
},
|
||||
"app_control_settings": {"enabled": False},
|
||||
"block_page": {
|
||||
"background_color": "background_color",
|
||||
"enabled": True,
|
||||
|
|
@ -271,6 +273,7 @@ class TestAsyncConfigurations:
|
|||
"support_url": "support_url",
|
||||
},
|
||||
},
|
||||
"app_control_settings": {"enabled": False},
|
||||
"block_page": {
|
||||
"background_color": "background_color",
|
||||
"enabled": True,
|
||||
|
|
@ -363,6 +366,7 @@ class TestAsyncConfigurations:
|
|||
"support_url": "support_url",
|
||||
},
|
||||
},
|
||||
"app_control_settings": {"enabled": False},
|
||||
"block_page": {
|
||||
"background_color": "background_color",
|
||||
"enabled": True,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue