Skip to content

Commit b27f1bb

Browse files
feat(api): api update (#2480)
1 parent b77d84f commit b27f1bb

22 files changed

+45
-37
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-2ea02e50d8914d37380cabfef50fd5e7b375be2452c2548ad4b426a02b7749df.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c6a7d4749b5afe2b38af239106bfdca95d64dcea76c74eb9347a77c47753f922.yml

src/cloudflare/resources/zero_trust/networks/routes/networks.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def delete(
116116
ip_network_encoded: str,
117117
*,
118118
account_id: str,
119-
tun_type: Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"] | NotGiven = NOT_GIVEN,
119+
tun_type: Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]
120+
| NotGiven = NOT_GIVEN,
120121
tunnel_id: str | NotGiven = NOT_GIVEN,
121122
virtual_network_id: str | NotGiven = NOT_GIVEN,
122123
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -314,7 +315,8 @@ async def delete(
314315
ip_network_encoded: str,
315316
*,
316317
account_id: str,
317-
tun_type: Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"] | NotGiven = NOT_GIVEN,
318+
tun_type: Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]
319+
| NotGiven = NOT_GIVEN,
318320
tunnel_id: str | NotGiven = NOT_GIVEN,
319321
virtual_network_id: str | NotGiven = NOT_GIVEN,
320322
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/cloudflare/resources/zero_trust/networks/routes/routes.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, cast
5+
from typing import List, Type, cast
6+
from typing_extensions import Literal
67

78
import httpx
89

@@ -145,7 +146,8 @@ def list(
145146
page: float | NotGiven = NOT_GIVEN,
146147
per_page: float | NotGiven = NOT_GIVEN,
147148
route_id: str | NotGiven = NOT_GIVEN,
148-
tun_types: str | NotGiven = NOT_GIVEN,
149+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
150+
| NotGiven = NOT_GIVEN,
149151
tunnel_id: str | NotGiven = NOT_GIVEN,
150152
virtual_network_id: str | NotGiven = NOT_GIVEN,
151153
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -179,7 +181,7 @@ def list(
179181
180182
route_id: UUID of the route.
181183
182-
tun_types: The types of tunnels to filter separated by a comma.
184+
tun_types: The types of tunnels to filter by, separated by commas.
183185
184186
tunnel_id: UUID of the tunnel.
185187
@@ -479,7 +481,8 @@ def list(
479481
page: float | NotGiven = NOT_GIVEN,
480482
per_page: float | NotGiven = NOT_GIVEN,
481483
route_id: str | NotGiven = NOT_GIVEN,
482-
tun_types: str | NotGiven = NOT_GIVEN,
484+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
485+
| NotGiven = NOT_GIVEN,
483486
tunnel_id: str | NotGiven = NOT_GIVEN,
484487
virtual_network_id: str | NotGiven = NOT_GIVEN,
485488
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -513,7 +516,7 @@ def list(
513516
514517
route_id: UUID of the route.
515518
516-
tun_types: The types of tunnels to filter separated by a comma.
519+
tun_types: The types of tunnels to filter by, separated by commas.
517520
518521
tunnel_id: UUID of the tunnel.
519522

src/cloudflare/resources/zero_trust/tunnels/tunnels.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, Union, cast
5+
from typing import Any, List, Union, cast
66
from datetime import datetime
77
from typing_extensions import Literal
88

@@ -82,7 +82,8 @@ def list(
8282
page: float | NotGiven = NOT_GIVEN,
8383
per_page: float | NotGiven = NOT_GIVEN,
8484
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
85-
tun_types: str | NotGiven = NOT_GIVEN,
85+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
86+
| NotGiven = NOT_GIVEN,
8687
uuid: str | NotGiven = NOT_GIVEN,
8788
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
8889
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -116,7 +117,7 @@ def list(
116117
state), `healthy` (tunnel is active and able to serve traffic), or `down`
117118
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
118119
119-
tun_types: The types of tunnels to filter separated by a comma.
120+
tun_types: The types of tunnels to filter by, separated by commas.
120121
121122
uuid: UUID of the tunnel.
122123
@@ -200,7 +201,8 @@ def list(
200201
page: float | NotGiven = NOT_GIVEN,
201202
per_page: float | NotGiven = NOT_GIVEN,
202203
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
203-
tun_types: str | NotGiven = NOT_GIVEN,
204+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
205+
| NotGiven = NOT_GIVEN,
204206
uuid: str | NotGiven = NOT_GIVEN,
205207
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
206208
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -234,7 +236,7 @@ def list(
234236
state), `healthy` (tunnel is active and able to serve traffic), or `down`
235237
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
236238
237-
tun_types: The types of tunnels to filter separated by a comma.
239+
tun_types: The types of tunnels to filter by, separated by commas.
238240
239241
uuid: UUID of the tunnel.
240242

src/cloudflare/types/shared/cloudflare_tunnel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ class CloudflareTunnel(BaseModel):
9292
it has no connections to the Cloudflare Edge).
9393
"""
9494

95-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
95+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9696
"""The type of tunnel."""

src/cloudflare/types/zero_trust/networks/route_list_params.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing import List
6+
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["RouteListParams"]
89

@@ -41,8 +42,8 @@ class RouteListParams(TypedDict, total=False):
4142
route_id: str
4243
"""UUID of the route."""
4344

44-
tun_types: str
45-
"""The types of tunnels to filter separated by a comma."""
45+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
46+
"""The types of tunnels to filter by, separated by commas."""
4647

4748
tunnel_id: str
4849
"""UUID of the tunnel."""

src/cloudflare/types/zero_trust/networks/routes/network_delete_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class NetworkDeleteParams(TypedDict, total=False):
1111
account_id: Required[str]
1212
"""Cloudflare account ID"""
1313

14-
tun_type: Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]
14+
tun_type: Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]
1515
"""The type of tunnel."""
1616

1717
tunnel_id: str

src/cloudflare/types/zero_trust/networks/teamnet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Teamnet(BaseModel):
2828
network: Optional[str] = None
2929
"""The private IPv4 or IPv6 range connected by the route, in CIDR notation."""
3030

31-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
31+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
3232
"""The type of tunnel."""
3333

3434
tunnel_id: Optional[str] = None

src/cloudflare/types/zero_trust/tunnel_list_params.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import List, Union
66
from datetime import datetime
77
from typing_extensions import Literal, Required, Annotated, TypedDict
88

@@ -49,8 +49,8 @@ class TunnelListParams(TypedDict, total=False):
4949
it has no connections to the Cloudflare Edge).
5050
"""
5151

52-
tun_types: str
53-
"""The types of tunnels to filter separated by a comma."""
52+
tun_types: List[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]]
53+
"""The types of tunnels to filter by, separated by commas."""
5454

5555
uuid: str
5656
"""UUID of the tunnel."""

src/cloudflare/types/zero_trust/tunnel_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/cloudflared_create_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/cloudflared_delete_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/cloudflared_edit_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/cloudflared_get_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/cloudflared_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/warp_connector_create_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/warp_connector_delete_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/warp_connector_edit_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/warp_connector_get_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

src/cloudflare/types/zero_trust/tunnels/warp_connector_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
8787
it has no connections to the Cloudflare Edge).
8888
"""
8989

90-
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "ip_sec", "gre", "cni"]] = None
90+
tun_type: Optional[Literal["cfd_tunnel", "warp_connector", "warp", "magic", "ip_sec", "gre", "cni"]] = None
9191
"""The type of tunnel."""
9292

9393

tests/api_resources/zero_trust/networks/test_routes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
9797
page=1,
9898
per_page=1,
9999
route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
100-
tun_types="cfd_tunnel,warp_connector",
100+
tun_types=["cfd_tunnel"],
101101
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
102102
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
103103
)
@@ -370,7 +370,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
370370
page=1,
371371
per_page=1,
372372
route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
373-
tun_types="cfd_tunnel,warp_connector",
373+
tun_types=["cfd_tunnel"],
374374
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
375375
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
376376
)

tests/api_resources/zero_trust/test_tunnels.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
3838
page=1,
3939
per_page=1,
4040
status="inactive",
41-
tun_types="cfd_tunnel,warp_connector",
41+
tun_types=["cfd_tunnel"],
4242
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
4343
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
4444
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),
@@ -99,7 +99,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
9999
page=1,
100100
per_page=1,
101101
status="inactive",
102-
tun_types="cfd_tunnel,warp_connector",
102+
tun_types=["cfd_tunnel"],
103103
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
104104
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
105105
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),

0 commit comments

Comments
 (0)