Skip to content

Commit 798ad9b

Browse files
feat(api): api update
1 parent a8e5cc8 commit 798ad9b

5 files changed

Lines changed: 30 additions & 30 deletions

File tree

.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-9437feb23d81453829170341fd809fd1f6899c8b9f94fd1f65be90772be4ec83.yml
3-
openapi_spec_hash: d9006e1941cceabd20a5c883069a7424
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-24631e39af233973e51129ca7090195b430ab835af32564981169e12e5f6eedf.yml
3+
openapi_spec_hash: 743b8f14b73519c3b813ed9159cbe6e3
44
config_hash: eda5b3d9487ce675d1fadf88153b457d

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,20 +9,14 @@
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-
2112
background_color: Optional[str] = None
2213
"""
2314
If mode is customized_block_page: block page background color in #rrggbb format.
2415
"""
2516

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

@@ -47,6 +41,12 @@ class BlockPageSettings(BaseModel):
4741
page.
4842
"""
4943

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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,20 @@
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, TypedDict
77

88
__all__ = ["BlockPageSettingsParam"]
99

1010

1111
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-
2112
background_color: str
2213
"""
2314
If mode is customized_block_page: block page background color in #rrggbb format.
2415
"""
2516

17+
enabled: Optional[bool]
18+
"""Enable only cipher suites and TLS versions compliant with FIPS 140-2."""
19+
2620
footer_text: str
2721
"""If mode is customized_block_page: block page footer text."""
2822

@@ -47,6 +41,12 @@ class BlockPageSettingsParam(TypedDict, total=False):
4741
page.
4842
"""
4943

44+
mode: Literal["customized_block_page", "redirect_uri"]
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: str
5151
"""If mode is customized_block_page: block page title."""
5252

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class RuleSettingParam(TypedDict, total=False):
225225
block_page_enabled: bool
226226
"""Enable the custom block page."""
227227

228-
block_reason: str
228+
block_reason: Optional[str]
229229
"""
230230
The text describing why this block occurred, displayed on the custom block page
231231
(if enabled).

tests/api_resources/zero_trust/gateway/test_configurations.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
4646
},
4747
},
4848
"block_page": {
49-
"enabled": True,
50-
"mode": "customized_block_page",
5149
"background_color": "background_color",
50+
"enabled": True,
5251
"footer_text": "--footer--",
5352
"header_text": "--header--",
5453
"include_context": True,
5554
"logo_path": "https://logos.com/a.png",
5655
"mailto_address": "admin@example.com",
5756
"mailto_subject": "Blocked User Inquiry",
57+
"mode": "customized_block_page",
5858
"name": "Cloudflare",
5959
"suppress_footer": False,
6060
"target_uri": "https://example.com",
@@ -139,15 +139,15 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
139139
},
140140
},
141141
"block_page": {
142-
"enabled": True,
143-
"mode": "customized_block_page",
144142
"background_color": "background_color",
143+
"enabled": True,
145144
"footer_text": "--footer--",
146145
"header_text": "--header--",
147146
"include_context": True,
148147
"logo_path": "https://logos.com/a.png",
149148
"mailto_address": "admin@example.com",
150149
"mailto_subject": "Blocked User Inquiry",
150+
"mode": "customized_block_page",
151151
"name": "Cloudflare",
152152
"suppress_footer": False,
153153
"target_uri": "https://example.com",
@@ -276,15 +276,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
276276
},
277277
},
278278
"block_page": {
279-
"enabled": True,
280-
"mode": "customized_block_page",
281279
"background_color": "background_color",
280+
"enabled": True,
282281
"footer_text": "--footer--",
283282
"header_text": "--header--",
284283
"include_context": True,
285284
"logo_path": "https://logos.com/a.png",
286285
"mailto_address": "admin@example.com",
287286
"mailto_subject": "Blocked User Inquiry",
287+
"mode": "customized_block_page",
288288
"name": "Cloudflare",
289289
"suppress_footer": False,
290290
"target_uri": "https://example.com",
@@ -369,15 +369,15 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
369369
},
370370
},
371371
"block_page": {
372-
"enabled": True,
373-
"mode": "customized_block_page",
374372
"background_color": "background_color",
373+
"enabled": True,
375374
"footer_text": "--footer--",
376375
"header_text": "--header--",
377376
"include_context": True,
378377
"logo_path": "https://logos.com/a.png",
379378
"mailto_address": "admin@example.com",
380379
"mailto_subject": "Blocked User Inquiry",
380+
"mode": "customized_block_page",
381381
"name": "Cloudflare",
382382
"suppress_footer": False,
383383
"target_uri": "https://example.com",

0 commit comments

Comments
 (0)