Skip to content

Commit 2cf81d5

Browse files
chore(api): update composite API spec
1 parent 659ab00 commit 2cf81d5

6 files changed

Lines changed: 77 additions & 2 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2195
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: b9621d5fbdbced049722fbb186b3632c
3+
openapi_spec_hash: 4cd58fdf7a6fa895b2514a2e60d131b1
44
config_hash: d3379006654eb5479a62d9576648acc5

src/cloudflare/resources/zones/zones.py

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

33
from __future__ import annotations
44

5-
from typing import Type as TypingType, Optional, cast
5+
from typing import List, Type as TypingType, Optional, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -209,6 +209,7 @@ def list(
209209
page: float | Omit = omit,
210210
per_page: float | Omit = omit,
211211
status: Literal["initializing", "pending", "active", "moved"] | Omit = omit,
212+
type: List[Literal["full", "partial", "secondary", "internal"]] | Omit = omit,
212213
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
213214
# The extra values given here take precedence over values defined on the client or passed to this method.
214215
extra_headers: Headers | None = None,
@@ -246,6 +247,10 @@ def list(
246247
247248
status: Specify a zone status to filter by.
248249
250+
type: Zone types to filter by. Multiple types can be specified as a comma-separated
251+
list (e.g., ?type=full,partial,secondary). When this parameter is not provided,
252+
zones with type "internal" are excluded from the results.
253+
249254
extra_headers: Send extra headers
250255
251256
extra_query: Add additional query parameters to the request
@@ -272,6 +277,7 @@ def list(
272277
"page": page,
273278
"per_page": per_page,
274279
"status": status,
280+
"type": type,
275281
},
276282
zone_list_params.ZoneListParams,
277283
),
@@ -537,6 +543,7 @@ def list(
537543
page: float | Omit = omit,
538544
per_page: float | Omit = omit,
539545
status: Literal["initializing", "pending", "active", "moved"] | Omit = omit,
546+
type: List[Literal["full", "partial", "secondary", "internal"]] | Omit = omit,
540547
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
541548
# The extra values given here take precedence over values defined on the client or passed to this method.
542549
extra_headers: Headers | None = None,
@@ -574,6 +581,10 @@ def list(
574581
575582
status: Specify a zone status to filter by.
576583
584+
type: Zone types to filter by. Multiple types can be specified as a comma-separated
585+
list (e.g., ?type=full,partial,secondary). When this parameter is not provided,
586+
zones with type "internal" are excluded from the results.
587+
577588
extra_headers: Send extra headers
578589
579590
extra_query: Add additional query parameters to the request
@@ -600,6 +611,7 @@ def list(
600611
"page": page,
601612
"per_page": per_page,
602613
"status": status,
614+
"type": type,
603615
},
604616
zone_list_params.ZoneListParams,
605617
),

src/cloudflare/types/zones/setting_edit_response.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"ZonesSchemasResponseBuffering",
6464
"ZonesSchemasRocketLoader",
6565
"ZonesSchemasAutomaticPlatformOptimization",
66+
"ZonesSearchForAgents",
6667
"ZonesSchemasSecurityLevel",
6768
"ZonesSha1Support",
6869
"ZonesSchemasSortQueryStringForCache",
@@ -616,6 +617,30 @@ class ZonesSchemasAutomaticPlatformOptimization(BaseModel):
616617
"""last time this setting was modified."""
617618

618619

620+
class ZonesSearchForAgents(BaseModel):
621+
"""
622+
When enabled, Cloudflare provisions an AI Search instance for the zone
623+
and exposes a /.well-known/ai-search endpoint that AI agents can query.
624+
Markdown responses also receive an agent: YAML capability block advertising
625+
the search endpoint.
626+
"""
627+
628+
id: Literal["search_for_agents"]
629+
"""ID of the zone setting."""
630+
631+
value: Literal["off", "on"]
632+
"""Current value of the zone setting."""
633+
634+
editable: Optional[Literal[True, False]] = None
635+
"""
636+
Whether or not this setting can be modified for this zone (based on your
637+
Cloudflare plan level).
638+
"""
639+
640+
modified_on: Optional[datetime] = None
641+
"""last time this setting was modified."""
642+
643+
619644
class ZonesSchemasSecurityLevel(BaseModel):
620645
"""
621646
Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom. (https://support.cloudflare.com/hc/en-us/articles/200170056).
@@ -855,6 +880,7 @@ class ZonesSchemasWAF(BaseModel):
855880
ZonesSchemasResponseBuffering,
856881
ZonesSchemasRocketLoader,
857882
ZonesSchemasAutomaticPlatformOptimization,
883+
ZonesSearchForAgents,
858884
SecurityHeaders,
859885
ZonesSchemasSecurityLevel,
860886
ServerSideExcludes,

src/cloudflare/types/zones/setting_get_response.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"ZonesSchemasResponseBuffering",
6464
"ZonesSchemasRocketLoader",
6565
"ZonesSchemasAutomaticPlatformOptimization",
66+
"ZonesSearchForAgents",
6667
"ZonesSchemasSecurityLevel",
6768
"ZonesSha1Support",
6869
"ZonesSchemasSortQueryStringForCache",
@@ -616,6 +617,30 @@ class ZonesSchemasAutomaticPlatformOptimization(BaseModel):
616617
"""last time this setting was modified."""
617618

618619

620+
class ZonesSearchForAgents(BaseModel):
621+
"""
622+
When enabled, Cloudflare provisions an AI Search instance for the zone
623+
and exposes a /.well-known/ai-search endpoint that AI agents can query.
624+
Markdown responses also receive an agent: YAML capability block advertising
625+
the search endpoint.
626+
"""
627+
628+
id: Literal["search_for_agents"]
629+
"""ID of the zone setting."""
630+
631+
value: Literal["off", "on"]
632+
"""Current value of the zone setting."""
633+
634+
editable: Optional[Literal[True, False]] = None
635+
"""
636+
Whether or not this setting can be modified for this zone (based on your
637+
Cloudflare plan level).
638+
"""
639+
640+
modified_on: Optional[datetime] = None
641+
"""last time this setting was modified."""
642+
643+
619644
class ZonesSchemasSecurityLevel(BaseModel):
620645
"""
621646
Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom. (https://support.cloudflare.com/hc/en-us/articles/200170056).
@@ -855,6 +880,7 @@ class ZonesSchemasWAF(BaseModel):
855880
ZonesSchemasResponseBuffering,
856881
ZonesSchemasRocketLoader,
857882
ZonesSchemasAutomaticPlatformOptimization,
883+
ZonesSearchForAgents,
858884
SecurityHeaders,
859885
ZonesSchemasSecurityLevel,
860886
ServerSideExcludes,

src/cloudflare/types/zones/zone_list_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import List
56
from typing_extensions import Literal, TypedDict
67

78
__all__ = ["ZoneListParams", "Account"]
@@ -43,6 +44,14 @@ class ZoneListParams(TypedDict, total=False):
4344
status: Literal["initializing", "pending", "active", "moved"]
4445
"""Specify a zone status to filter by."""
4546

47+
type: List[Literal["full", "partial", "secondary", "internal"]]
48+
"""Zone types to filter by.
49+
50+
Multiple types can be specified as a comma-separated list (e.g.,
51+
?type=full,partial,secondary). When this parameter is not provided, zones with
52+
type "internal" are excluded from the results.
53+
"""
54+
4655

4756
class Account(TypedDict, total=False):
4857
id: str

tests/api_resources/test_zones.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
8383
page=1,
8484
per_page=5,
8585
status="initializing",
86+
type=["full"],
8687
)
8788
assert_matches_type(SyncV4PagePaginationArray[Zone], zone, path=["response"])
8889

@@ -302,6 +303,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
302303
page=1,
303304
per_page=5,
304305
status="initializing",
306+
type=["full"],
305307
)
306308
assert_matches_type(AsyncV4PagePaginationArray[Zone], zone, path=["response"])
307309

0 commit comments

Comments
 (0)