Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 94e997a

Browse files
committedFeb 26, 2025·
feat(api): api update (#2478)
1 parent 083d115 commit 94e997a

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1542
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a80f4311bc6fd36640a80989804f6223d7dc2e224d0fc0aea46c13bb85a147df.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bd2b482a83809b029aec6ad87f8bec570c067383f102c15fb9e8483110398194.yml

‎src/cloudflare/resources/rum/site_info.py

+20
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def update(
113113
*,
114114
account_id: str,
115115
auto_install: bool | NotGiven = NOT_GIVEN,
116+
enabled: bool | NotGiven = NOT_GIVEN,
116117
host: str | NotGiven = NOT_GIVEN,
118+
lite: bool | NotGiven = NOT_GIVEN,
117119
zone_tag: str | NotGiven = NOT_GIVEN,
118120
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119121
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -133,8 +135,14 @@ def update(
133135
auto_install: If enabled, the JavaScript snippet is automatically injected for orange-clouded
134136
sites.
135137
138+
enabled: Enables or disables RUM. This option can be used only when auto_install is set
139+
to true.
140+
136141
host: The hostname to use for gray-clouded sites.
137142
143+
lite: If enabled, the JavaScript snippet will not be injected for visitors from the
144+
EU.
145+
138146
zone_tag: The zone identifier.
139147
140148
extra_headers: Send extra headers
@@ -154,7 +162,9 @@ def update(
154162
body=maybe_transform(
155163
{
156164
"auto_install": auto_install,
165+
"enabled": enabled,
157166
"host": host,
167+
"lite": lite,
158168
"zone_tag": zone_tag,
159169
},
160170
site_info_update_params.SiteInfoUpdateParams,
@@ -397,7 +407,9 @@ async def update(
397407
*,
398408
account_id: str,
399409
auto_install: bool | NotGiven = NOT_GIVEN,
410+
enabled: bool | NotGiven = NOT_GIVEN,
400411
host: str | NotGiven = NOT_GIVEN,
412+
lite: bool | NotGiven = NOT_GIVEN,
401413
zone_tag: str | NotGiven = NOT_GIVEN,
402414
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
403415
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -417,8 +429,14 @@ async def update(
417429
auto_install: If enabled, the JavaScript snippet is automatically injected for orange-clouded
418430
sites.
419431
432+
enabled: Enables or disables RUM. This option can be used only when auto_install is set
433+
to true.
434+
420435
host: The hostname to use for gray-clouded sites.
421436
437+
lite: If enabled, the JavaScript snippet will not be injected for visitors from the
438+
EU.
439+
422440
zone_tag: The zone identifier.
423441
424442
extra_headers: Send extra headers
@@ -438,7 +456,9 @@ async def update(
438456
body=await async_maybe_transform(
439457
{
440458
"auto_install": auto_install,
459+
"enabled": enabled,
441460
"host": host,
461+
"lite": lite,
442462
"zone_tag": zone_tag,
443463
},
444464
site_info_update_params.SiteInfoUpdateParams,

‎src/cloudflare/types/rum/site_info_update_params.py

+12
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,20 @@ class SiteInfoUpdateParams(TypedDict, total=False):
1717
sites.
1818
"""
1919

20+
enabled: bool
21+
"""Enables or disables RUM.
22+
23+
This option can be used only when auto_install is set to true.
24+
"""
25+
2026
host: str
2127
"""The hostname to use for gray-clouded sites."""
2228

29+
lite: bool
30+
"""
31+
If enabled, the JavaScript snippet will not be injected for visitors from the
32+
EU.
33+
"""
34+
2335
zone_tag: str
2436
"""The zone identifier."""

‎tests/api_resources/rum/test_site_info.py

+4
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
8383
site_id="023e105f4ecef8ad9ca31a8372d0c353",
8484
account_id="023e105f4ecef8ad9ca31a8372d0c353",
8585
auto_install=True,
86+
enabled=True,
8687
host="example.com",
88+
lite=True,
8789
zone_tag="023e105f4ecef8ad9ca31a8372d0c353",
8890
)
8991
assert_matches_type(Optional[Site], site_info, path=["response"])
@@ -338,7 +340,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
338340
site_id="023e105f4ecef8ad9ca31a8372d0c353",
339341
account_id="023e105f4ecef8ad9ca31a8372d0c353",
340342
auto_install=True,
343+
enabled=True,
341344
host="example.com",
345+
lite=True,
342346
zone_tag="023e105f4ecef8ad9ca31a8372d0c353",
343347
)
344348
assert_matches_type(Optional[Site], site_info, path=["response"])

0 commit comments

Comments
 (0)
Please sign in to comment.