Skip to content

Commit 86ca907

Browse files
feat(api): api update (#2243)
1 parent 571fe0e commit 86ca907

File tree

10 files changed

+43
-33
lines changed

10 files changed

+43
-33
lines changed

.stats.yml

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

src/cloudflare/resources/r2/buckets/domains/custom.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def create(
6060
*,
6161
account_id: str,
6262
domain: str,
63+
enabled: bool,
6364
zone_id: str,
64-
enabled: bool | NotGiven = NOT_GIVEN,
6565
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
6666
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
6767
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -81,11 +81,11 @@ def create(
8181
8282
domain: Name of the custom domain to be added
8383
84-
zone_id: Zone ID of the custom domain
85-
8684
enabled: Whether to enable public bucket access at the custom domain. If undefined, the
8785
domain will be enabled.
8886
87+
zone_id: Zone ID of the custom domain
88+
8989
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
9090
not set, defaults to 1.0.
9191
@@ -114,8 +114,8 @@ def create(
114114
body=maybe_transform(
115115
{
116116
"domain": domain,
117-
"zone_id": zone_id,
118117
"enabled": enabled,
118+
"zone_id": zone_id,
119119
"min_tls": min_tls,
120120
},
121121
custom_create_params.CustomCreateParams,
@@ -398,8 +398,8 @@ async def create(
398398
*,
399399
account_id: str,
400400
domain: str,
401+
enabled: bool,
401402
zone_id: str,
402-
enabled: bool | NotGiven = NOT_GIVEN,
403403
min_tls: Literal["1.0", "1.1", "1.2", "1.3"] | NotGiven = NOT_GIVEN,
404404
cf_r2_jurisdiction: Literal["default", "eu", "fedramp"] | NotGiven = NOT_GIVEN,
405405
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -419,11 +419,11 @@ async def create(
419419
420420
domain: Name of the custom domain to be added
421421
422-
zone_id: Zone ID of the custom domain
423-
424422
enabled: Whether to enable public bucket access at the custom domain. If undefined, the
425423
domain will be enabled.
426424
425+
zone_id: Zone ID of the custom domain
426+
427427
min_tls: Minimum TLS Version the custom domain will accept for incoming connections. If
428428
not set, defaults to 1.0.
429429
@@ -452,8 +452,8 @@ async def create(
452452
body=await async_maybe_transform(
453453
{
454454
"domain": domain,
455-
"zone_id": zone_id,
456455
"enabled": enabled,
456+
"zone_id": zone_id,
457457
"min_tls": min_tls,
458458
},
459459
custom_create_params.CustomCreateParams,

src/cloudflare/resources/zero_trust/dex/colos.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ def list(
6363
are also returned and sorted alphabetically.
6464
6565
Args:
66-
from_: Start time for connection period in RFC3339 (ISO 8601) format.
66+
from_: Start time for connection period in ISO (RFC3339 - ISO 8601) format
6767
68-
to: End time for connection period in RFC3339 (ISO 8601) format.
68+
to: End time for connection period in ISO (RFC3339 - ISO 8601) format
6969
7070
sort_by: Type of usage that colos should be sorted by. If unspecified, returns all
7171
Cloudflare colos sorted alphabetically.
@@ -141,9 +141,9 @@ def list(
141141
are also returned and sorted alphabetically.
142142
143143
Args:
144-
from_: Start time for connection period in RFC3339 (ISO 8601) format.
144+
from_: Start time for connection period in ISO (RFC3339 - ISO 8601) format
145145
146-
to: End time for connection period in RFC3339 (ISO 8601) format.
146+
to: End time for connection period in ISO (RFC3339 - ISO 8601) format
147147
148148
sort_by: Type of usage that colos should be sorted by. If unspecified, returns all
149149
Cloudflare colos sorted alphabetically.

src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def get(
7070
Args:
7171
test_id: API Resource UUID tag.
7272
73-
from_: Start time for aggregate metrics in ISO format
73+
from_: Start time for the query in ISO (RFC3339 - ISO 8601) format
7474
75-
to: End time for aggregate metrics in ISO format
75+
to: End time for the query in ISO (RFC3339 - ISO 8601) format
7676
7777
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
7878
combination with deviceId param.
@@ -157,9 +157,9 @@ async def get(
157157
Args:
158158
test_id: API Resource UUID tag.
159159
160-
from_: Start time for aggregate metrics in ISO format
160+
from_: Start time for the query in ISO (RFC3339 - ISO 8601) format
161161
162-
to: End time for aggregate metrics in ISO format
162+
to: End time for the query in ISO (RFC3339 - ISO 8601) format
163163
164164
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
165165
combination with deviceId param.

src/cloudflare/resources/zero_trust/dex/traceroute_tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def percentiles(
210210
Args:
211211
test_id: API Resource UUID tag.
212212
213-
from_: Start time for aggregate metrics in ISO format
213+
from_: Start time for the query in ISO (RFC3339 - ISO 8601) format
214214
215-
to: End time for aggregate metrics in ISO format
215+
to: End time for the query in ISO (RFC3339 - ISO 8601) format
216216
217217
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
218218
combination with deviceId param.
@@ -432,9 +432,9 @@ async def percentiles(
432432
Args:
433433
test_id: API Resource UUID tag.
434434
435-
from_: Start time for aggregate metrics in ISO format
435+
from_: Start time for the query in ISO (RFC3339 - ISO 8601) format
436436
437-
to: End time for aggregate metrics in ISO format
437+
to: End time for the query in ISO (RFC3339 - ISO 8601) format
438438
439439
colo: Optionally filter result stats to a Cloudflare colo. Cannot be used in
440440
combination with deviceId param.

src/cloudflare/types/r2/buckets/domains/custom_create_params.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class CustomCreateParams(TypedDict, total=False):
1616
domain: Required[str]
1717
"""Name of the custom domain to be added"""
1818

19-
zone_id: Required[Annotated[str, PropertyInfo(alias="zoneId")]]
20-
"""Zone ID of the custom domain"""
21-
22-
enabled: bool
19+
enabled: Required[bool]
2320
"""Whether to enable public bucket access at the custom domain.
2421
2522
If undefined, the domain will be enabled.
2623
"""
2724

25+
zone_id: Required[Annotated[str, PropertyInfo(alias="zoneId")]]
26+
"""Zone ID of the custom domain"""
27+
2828
min_tls: Annotated[Literal["1.0", "1.1", "1.2", "1.3"], PropertyInfo(alias="minTLS")]
2929
"""Minimum TLS Version the custom domain will accept for incoming connections.
3030

src/cloudflare/types/zero_trust/dex/colo_list_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class ColoListParams(TypedDict, total=False):
1313
account_id: Required[str]
1414

1515
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
16-
"""Start time for connection period in RFC3339 (ISO 8601) format."""
16+
"""Start time for connection period in ISO (RFC3339 - ISO 8601) format"""
1717

1818
to: Required[str]
19-
"""End time for connection period in RFC3339 (ISO 8601) format."""
19+
"""End time for connection period in ISO (RFC3339 - ISO 8601) format"""
2020

2121
sort_by: Annotated[Literal["fleet-status-usage", "application-tests-usage"], PropertyInfo(alias="sortBy")]
2222
"""Type of usage that colos should be sorted by.

src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class PercentileGetParams(TypedDict, total=False):
1414
account_id: Required[str]
1515

1616
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
17-
"""Start time for aggregate metrics in ISO format"""
17+
"""Start time for the query in ISO (RFC3339 - ISO 8601) format"""
1818

1919
to: Required[str]
20-
"""End time for aggregate metrics in ISO format"""
20+
"""End time for the query in ISO (RFC3339 - ISO 8601) format"""
2121

2222
colo: str
2323
"""Optionally filter result stats to a Cloudflare colo.

src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class TracerouteTestPercentilesParams(TypedDict, total=False):
1414
account_id: Required[str]
1515

1616
from_: Required[Annotated[str, PropertyInfo(alias="from")]]
17-
"""Start time for aggregate metrics in ISO format"""
17+
"""Start time for the query in ISO (RFC3339 - ISO 8601) format"""
1818

1919
to: Required[str]
20-
"""End time for aggregate metrics in ISO format"""
20+
"""End time for the query in ISO (RFC3339 - ISO 8601) format"""
2121

2222
colo: str
2323
"""Optionally filter result stats to a Cloudflare colo.

tests/api_resources/r2/buckets/domains/test_custom.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None:
2929
bucket_name="example-bucket",
3030
account_id="023e105f4ecef8ad9ca31a8372d0c353",
3131
domain="prefix.example-domain.com",
32+
enabled=True,
3233
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
3334
)
3435
assert_matches_type(CustomCreateResponse, custom, path=["response"])
@@ -39,8 +40,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3940
bucket_name="example-bucket",
4041
account_id="023e105f4ecef8ad9ca31a8372d0c353",
4142
domain="prefix.example-domain.com",
42-
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
4343
enabled=True,
44+
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
4445
min_tls="1.0",
4546
cf_r2_jurisdiction="default",
4647
)
@@ -52,6 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
5253
bucket_name="example-bucket",
5354
account_id="023e105f4ecef8ad9ca31a8372d0c353",
5455
domain="prefix.example-domain.com",
56+
enabled=True,
5557
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
5658
)
5759

@@ -66,6 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
6668
bucket_name="example-bucket",
6769
account_id="023e105f4ecef8ad9ca31a8372d0c353",
6870
domain="prefix.example-domain.com",
71+
enabled=True,
6972
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
7073
) as response:
7174
assert not response.is_closed
@@ -83,6 +86,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
8386
bucket_name="example-bucket",
8487
account_id="",
8588
domain="prefix.example-domain.com",
89+
enabled=True,
8690
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
8791
)
8892

@@ -91,6 +95,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
9195
bucket_name="",
9296
account_id="023e105f4ecef8ad9ca31a8372d0c353",
9397
domain="prefix.example-domain.com",
98+
enabled=True,
9499
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
95100
)
96101

@@ -373,6 +378,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
373378
bucket_name="example-bucket",
374379
account_id="023e105f4ecef8ad9ca31a8372d0c353",
375380
domain="prefix.example-domain.com",
381+
enabled=True,
376382
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
377383
)
378384
assert_matches_type(CustomCreateResponse, custom, path=["response"])
@@ -383,8 +389,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
383389
bucket_name="example-bucket",
384390
account_id="023e105f4ecef8ad9ca31a8372d0c353",
385391
domain="prefix.example-domain.com",
386-
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
387392
enabled=True,
393+
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
388394
min_tls="1.0",
389395
cf_r2_jurisdiction="default",
390396
)
@@ -396,6 +402,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
396402
bucket_name="example-bucket",
397403
account_id="023e105f4ecef8ad9ca31a8372d0c353",
398404
domain="prefix.example-domain.com",
405+
enabled=True,
399406
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
400407
)
401408

@@ -410,6 +417,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
410417
bucket_name="example-bucket",
411418
account_id="023e105f4ecef8ad9ca31a8372d0c353",
412419
domain="prefix.example-domain.com",
420+
enabled=True,
413421
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
414422
) as response:
415423
assert not response.is_closed
@@ -427,6 +435,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
427435
bucket_name="example-bucket",
428436
account_id="",
429437
domain="prefix.example-domain.com",
438+
enabled=True,
430439
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
431440
)
432441

@@ -435,6 +444,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
435444
bucket_name="",
436445
account_id="023e105f4ecef8ad9ca31a8372d0c353",
437446
domain="prefix.example-domain.com",
447+
enabled=True,
438448
zone_id="36ca64a6d92827b8a6b90be344bb1bfd",
439449
)
440450

0 commit comments

Comments
 (0)