Skip to content

Commit 373f016

Browse files
feat(api): api update
1 parent 273677b commit 373f016

File tree

7 files changed

+68
-2
lines changed

7 files changed

+68
-2
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1711
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0d2b27c0365169b07822f92a35d387347d681e949c1445e31dbb32d44490a5c7.yml
3-
openapi_spec_hash: 255201da7d6b321eec3ffb69aa6b43f2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-285a6b0aa53fd892e9a32ac2c4fc0f0799852dd365a53a76282ece8b5416ae31.yml
3+
openapi_spec_hash: ec2848e9be9054d48ca52d5e9d5f8f51
44
config_hash: 86a54f66d2e5124bf31014f50e82f845

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

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class NotificationSettings(BaseModel):
1111
enabled: Optional[bool] = None
1212
"""Set notification on"""
1313

14+
include_context: Optional[bool] = None
15+
"""If true, context information will be passed as query parameters"""
16+
1417
msg: Optional[str] = None
1518
"""Customize the message shown in the notification."""
1619

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

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class NotificationSettingsParam(TypedDict, total=False):
1111
enabled: bool
1212
"""Set notification on"""
1313

14+
include_context: bool
15+
"""If true, context information will be passed as query parameters"""
16+
1417
msg: str
1518
"""Customize the message shown in the notification."""
1619

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

+18
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"RuleSetting",
1414
"AuditSSH",
1515
"BISOAdminControls",
16+
"BlockPage",
1617
"CheckSession",
1718
"DNSResolvers",
1819
"Egress",
@@ -91,6 +92,14 @@ class BISOAdminControls(BaseModel):
9192
"""Indicates which version of the browser isolation controls should apply."""
9293

9394

95+
class BlockPage(BaseModel):
96+
target_uri: str
97+
"""URI to which the user will be redirected"""
98+
99+
include_context: Optional[bool] = None
100+
"""If true, context information will be passed as query parameters"""
101+
102+
94103
class CheckSession(BaseModel):
95104
duration: Optional[str] = None
96105
"""Configure how fresh the session needs to be to be considered valid."""
@@ -132,6 +141,9 @@ class NotificationSettings(BaseModel):
132141
enabled: Optional[bool] = None
133142
"""Set notification on"""
134143

144+
include_context: Optional[bool] = None
145+
"""If true, context information will be passed as query parameters"""
146+
135147
msg: Optional[str] = None
136148
"""Customize the message shown in the notification."""
137149

@@ -204,6 +216,12 @@ class RuleSetting(BaseModel):
204216
biso_admin_controls: Optional[BISOAdminControls] = None
205217
"""Configure how browser isolation behaves."""
206218

219+
block_page: Optional[BlockPage] = None
220+
"""Custom block page settings.
221+
222+
If missing/null, blocking will use the the account settings.
223+
"""
224+
207225
block_page_enabled: Optional[bool] = None
208226
"""Enable the custom block page."""
209227

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

+18
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"RuleSettingParam",
1313
"AuditSSH",
1414
"BISOAdminControls",
15+
"BlockPage",
1516
"CheckSession",
1617
"DNSResolvers",
1718
"Egress",
@@ -90,6 +91,14 @@ class BISOAdminControls(TypedDict, total=False):
9091
"""Indicates which version of the browser isolation controls should apply."""
9192

9293

94+
class BlockPage(TypedDict, total=False):
95+
target_uri: Required[str]
96+
"""URI to which the user will be redirected"""
97+
98+
include_context: bool
99+
"""If true, context information will be passed as query parameters"""
100+
101+
93102
class CheckSession(TypedDict, total=False):
94103
duration: str
95104
"""Configure how fresh the session needs to be to be considered valid."""
@@ -131,6 +140,9 @@ class NotificationSettings(TypedDict, total=False):
131140
enabled: bool
132141
"""Set notification on"""
133142

143+
include_context: bool
144+
"""If true, context information will be passed as query parameters"""
145+
134146
msg: str
135147
"""Customize the message shown in the notification."""
136148

@@ -203,6 +215,12 @@ class RuleSettingParam(TypedDict, total=False):
203215
biso_admin_controls: BISOAdminControls
204216
"""Configure how browser isolation behaves."""
205217

218+
block_page: BlockPage
219+
"""Custom block page settings.
220+
221+
If missing/null, blocking will use the the account settings.
222+
"""
223+
206224
block_page_enabled: bool
207225
"""Enable the custom block page."""
208226

tests/api_resources/zero_trust/gateway/test_configurations.py

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
4040
"fail_closed": False,
4141
"notification_settings": {
4242
"enabled": True,
43+
"include_context": True,
4344
"msg": "msg",
4445
"support_url": "support_url",
4546
},
@@ -130,6 +131,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
130131
"fail_closed": False,
131132
"notification_settings": {
132133
"enabled": True,
134+
"include_context": True,
133135
"msg": "msg",
134136
"support_url": "support_url",
135137
},
@@ -262,6 +264,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
262264
"fail_closed": False,
263265
"notification_settings": {
264266
"enabled": True,
267+
"include_context": True,
265268
"msg": "msg",
266269
"support_url": "support_url",
267270
},
@@ -352,6 +355,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
352355
"fail_closed": False,
353356
"notification_settings": {
354357
"enabled": True,
358+
"include_context": True,
355359
"msg": "msg",
356360
"support_url": "support_url",
357361
},

tests/api_resources/zero_trust/gateway/test_rules.py

+20
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
6565
"upload": "enabled",
6666
"version": "v1",
6767
},
68+
"block_page": {
69+
"target_uri": "https://example.com",
70+
"include_context": True,
71+
},
6872
"block_page_enabled": True,
6973
"block_reason": "This website is a security risk",
7074
"bypass_parent_rule": False,
@@ -105,6 +109,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
105109
},
106110
"notification_settings": {
107111
"enabled": True,
112+
"include_context": True,
108113
"msg": "msg",
109114
"support_url": "support_url",
110115
},
@@ -221,6 +226,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
221226
"upload": "enabled",
222227
"version": "v1",
223228
},
229+
"block_page": {
230+
"target_uri": "https://example.com",
231+
"include_context": True,
232+
},
224233
"block_page_enabled": True,
225234
"block_reason": "This website is a security risk",
226235
"bypass_parent_rule": False,
@@ -261,6 +270,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
261270
},
262271
"notification_settings": {
263272
"enabled": True,
273+
"include_context": True,
264274
"msg": "msg",
265275
"support_url": "support_url",
266276
},
@@ -572,6 +582,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
572582
"upload": "enabled",
573583
"version": "v1",
574584
},
585+
"block_page": {
586+
"target_uri": "https://example.com",
587+
"include_context": True,
588+
},
575589
"block_page_enabled": True,
576590
"block_reason": "This website is a security risk",
577591
"bypass_parent_rule": False,
@@ -612,6 +626,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
612626
},
613627
"notification_settings": {
614628
"enabled": True,
629+
"include_context": True,
615630
"msg": "msg",
616631
"support_url": "support_url",
617632
},
@@ -728,6 +743,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
728743
"upload": "enabled",
729744
"version": "v1",
730745
},
746+
"block_page": {
747+
"target_uri": "https://example.com",
748+
"include_context": True,
749+
},
731750
"block_page_enabled": True,
732751
"block_reason": "This website is a security risk",
733752
"bypass_parent_rule": False,
@@ -768,6 +787,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
768787
},
769788
"notification_settings": {
770789
"enabled": True,
790+
"include_context": True,
771791
"msg": "msg",
772792
"support_url": "support_url",
773793
},

0 commit comments

Comments
 (0)