Skip to content

Commit 98fee4a

Browse files
feat(api): api update
1 parent 348095e commit 98fee4a

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-70a10a5a2a1ad186b926adc1495ede7dc3df082272838633c1c7e6d43f8483db.yml
3-
openapi_spec_hash: 1b4af36aa1670bc92a0815f572ec8e45
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dbf820133fda5d5f88170bea1f579cbf51f58883c727ec475d3091e334f62618.yml
3+
openapi_spec_hash: cad99035781372477dd6e995664b414e
44
config_hash: 4b927ddc073213712e291a61ccf872b0

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from typing import Optional
44
from typing_extensions import Literal
55

6+
from pydantic import Field as FieldInfo
7+
68
from ...._models import BaseModel
79
from .tls_settings import TLSSettings
810
from .fips_settings import FipsSettings
@@ -15,7 +17,12 @@
1517
from .browser_isolation_settings import BrowserIsolationSettings
1618
from .custom_certificate_settings import CustomCertificateSettings
1719

18-
__all__ = ["GatewayConfigurationSettings", "Certificate", "HostSelector", "Sandbox"]
20+
__all__ = ["GatewayConfigurationSettings", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
21+
22+
23+
class AppControlSettings(BaseModel):
24+
enabled: Optional[bool] = None
25+
"""Enable App Control"""
1926

2027

2128
class Certificate(BaseModel):
@@ -47,6 +54,9 @@ class GatewayConfigurationSettings(BaseModel):
4754
antivirus: Optional[AntiVirusSettings] = None
4855
"""Anti-virus settings."""
4956

57+
app_control_settings: Optional[AppControlSettings] = FieldInfo(alias="app-control-settings", default=None)
58+
"""Setting to enable App Control"""
59+
5060
block_page: Optional[BlockPageSettings] = None
5161
"""Block page layout settings."""
5262

src/cloudflare/types/zero_trust/gateway/gateway_configuration_settings_param.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
from __future__ import annotations
44

55
from typing import Optional
6-
from typing_extensions import Literal, Required, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

8+
from ...._utils import PropertyInfo
89
from .tls_settings_param import TLSSettingsParam
910
from .fips_settings_param import FipsSettingsParam
1011
from .protocol_detection_param import ProtocolDetectionParam
@@ -16,7 +17,12 @@
1617
from .browser_isolation_settings_param import BrowserIsolationSettingsParam
1718
from .custom_certificate_settings_param import CustomCertificateSettingsParam
1819

19-
__all__ = ["GatewayConfigurationSettingsParam", "Certificate", "HostSelector", "Sandbox"]
20+
__all__ = ["GatewayConfigurationSettingsParam", "AppControlSettings", "Certificate", "HostSelector", "Sandbox"]
21+
22+
23+
class AppControlSettings(TypedDict, total=False):
24+
enabled: bool
25+
"""Enable App Control"""
2026

2127

2228
class Certificate(TypedDict, total=False):
@@ -48,6 +54,9 @@ class GatewayConfigurationSettingsParam(TypedDict, total=False):
4854
antivirus: Optional[AntiVirusSettingsParam]
4955
"""Anti-virus settings."""
5056

57+
app_control_settings: Annotated[Optional[AppControlSettings], PropertyInfo(alias="app-control-settings")]
58+
"""Setting to enable App Control"""
59+
5160
block_page: Optional[BlockPageSettingsParam]
5261
"""Block page layout settings."""
5362

src/cloudflare/types/zero_trust/gateway/gateway_rule.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,6 @@ class GatewayRule(BaseModel):
123123

124124
version: Optional[int] = None
125125
"""version number of the rule"""
126+
127+
warning_status: Optional[str] = None
128+
"""Warning for a misconfigured rule, if any."""

tests/api_resources/zero_trust/gateway/test_configurations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
4545
"support_url": "support_url",
4646
},
4747
},
48+
"app_control_settings": {"enabled": False},
4849
"block_page": {
4950
"background_color": "background_color",
5051
"enabled": True,
@@ -137,6 +138,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
137138
"support_url": "support_url",
138139
},
139140
},
141+
"app_control_settings": {"enabled": False},
140142
"block_page": {
141143
"background_color": "background_color",
142144
"enabled": True,
@@ -271,6 +273,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
271273
"support_url": "support_url",
272274
},
273275
},
276+
"app_control_settings": {"enabled": False},
274277
"block_page": {
275278
"background_color": "background_color",
276279
"enabled": True,
@@ -363,6 +366,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
363366
"support_url": "support_url",
364367
},
365368
},
369+
"app_control_settings": {"enabled": False},
366370
"block_page": {
367371
"background_color": "background_color",
368372
"enabled": True,

0 commit comments

Comments
 (0)