Skip to content

Commit 6ddf7bd

Browse files
feat(api): api update
1 parent 6a13939 commit 6ddf7bd

14 files changed

Lines changed: 82 additions & 44 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1782
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-965cde604d129fa9ce1aee892f1d851c2c08f687e968d7244c9e7eaac1bebd35.yml
3-
openapi_spec_hash: 58cf3c2b2316b22dcca0b5ec2e66c1fd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a70ee5e2ed74bb497eaeab36c8bac4e915d0ccceffcac0d49c506286379bb557.yml
3+
openapi_spec_hash: c286686962046e02f46ef991dd5a0e1b
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import TypedDict
67

78
__all__ = ["ActivityLogSettingsParam"]
89

910

1011
class ActivityLogSettingsParam(TypedDict, total=False):
11-
enabled: bool
12+
enabled: Optional[bool]
1213
"""Enable activity logging."""

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212

1313
class AntiVirusSettingsParam(TypedDict, total=False):
14-
enabled_download_phase: bool
14+
enabled_download_phase: Optional[bool]
1515
"""Enable anti-virus scanning on downloads."""
1616

17-
enabled_upload_phase: bool
17+
enabled_upload_phase: Optional[bool]
1818
"""Enable anti-virus scanning on uploads."""
1919

20-
fail_closed: bool
20+
fail_closed: Optional[bool]
2121
"""Block requests for files that cannot be scanned."""
2222

2323
notification_settings: Optional[NotificationSettingsParam]

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@
99

1010

1111
class BlockPageSettings(BaseModel):
12+
enabled: Optional[bool] = None
13+
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
14+
15+
mode: Literal["customized_block_page", "redirect_uri"]
16+
"""
17+
Controls whether the user is redirected to a Cloudflare-hosted block page or to
18+
a customer-provided URI.
19+
"""
20+
1221
background_color: Optional[str] = None
1322
"""
1423
If mode is customized_block_page: block page background color in #rrggbb format.
1524
"""
1625

17-
enabled: Optional[bool] = None
18-
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
19-
2026
footer_text: Optional[str] = None
2127
"""If mode is customized_block_page: block page footer text."""
2228

@@ -41,12 +47,6 @@ class BlockPageSettings(BaseModel):
4147
page.
4248
"""
4349

44-
mode: Optional[Literal["customized_block_page", "redirect_uri"]] = None
45-
"""
46-
Controls whether the user is redirected to a Cloudflare-hosted block page or to
47-
a customer-provided URI.
48-
"""
49-
5050
name: Optional[str] = None
5151
"""If mode is customized_block_page: block page title."""
5252

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Literal, TypedDict
5+
from typing import Optional
6+
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["BlockPageSettingsParam"]
89

910

1011
class BlockPageSettingsParam(TypedDict, total=False):
12+
enabled: Required[Optional[bool]]
13+
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
14+
15+
mode: Required[Literal["customized_block_page", "redirect_uri"]]
16+
"""
17+
Controls whether the user is redirected to a Cloudflare-hosted block page or to
18+
a customer-provided URI.
19+
"""
20+
1121
background_color: str
1222
"""
1323
If mode is customized_block_page: block page background color in #rrggbb format.
1424
"""
1525

16-
enabled: bool
17-
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
18-
1926
footer_text: str
2027
"""If mode is customized_block_page: block page footer text."""
2128

@@ -40,12 +47,6 @@ class BlockPageSettingsParam(TypedDict, total=False):
4047
page.
4148
"""
4249

43-
mode: Literal["customized_block_page", "redirect_uri"]
44-
"""
45-
Controls whether the user is redirected to a Cloudflare-hosted block page or to
46-
a customer-provided URI.
47-
"""
48-
4950
name: str
5051
"""If mode is customized_block_page: block page title."""
5152

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Optional
4+
from typing_extensions import Literal
45

56
from ...._models import BaseModel
67

78
__all__ = ["BodyScanningSettings"]
89

910

1011
class BodyScanningSettings(BaseModel):
11-
inspection_mode: Optional[str] = None
12+
inspection_mode: Optional[Literal["deep", "shallow"]] = None
1213
"""Set the inspection mode to either `deep` or `shallow`."""

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing_extensions import Literal, TypedDict
66

77
__all__ = ["BodyScanningSettingsParam"]
88

99

1010
class BodyScanningSettingsParam(TypedDict, total=False):
11-
inspection_mode: str
11+
inspection_mode: Literal["deep", "shallow"]
1212
"""Set the inspection mode to either `deep` or `shallow`."""

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class CustomCertificateSettings(BaseModel):
12-
enabled: bool
12+
enabled: Optional[bool] = None
1313
"""Enable use of custom certificate authority for signing Gateway traffic."""
1414

1515
id: Optional[str] = None

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Required, TypedDict
67

78
__all__ = ["CustomCertificateSettingsParam"]
89

910

1011
class CustomCertificateSettingsParam(TypedDict, total=False):
11-
enabled: Required[bool]
12+
enabled: Required[Optional[bool]]
1213
"""Enable use of custom certificate authority for signing Gateway traffic."""
1314

1415
id: str

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import TypedDict
67

78
__all__ = ["ExtendedEmailMatchingParam"]
89

910

1011
class ExtendedEmailMatchingParam(TypedDict, total=False):
11-
enabled: bool
12+
enabled: Optional[bool]
1213
"""Enable matching all variants of user emails (with + or .
1314
1415
modifiers) used as criteria in Firewall policies.

0 commit comments

Comments
 (0)