Skip to content

Commit 96236a2

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#857)
1 parent 0f546f5 commit 96236a2

15 files changed

+63
-11
lines changed

.stats.yml

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

src/cloudflare/resources/warp_connector.py

+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from typing import Any, Union, cast
66
from datetime import datetime
7+
from typing_extensions import Literal
78

89
import httpx
910

@@ -105,6 +106,7 @@ def list(
105106
name: str | NotGiven = NOT_GIVEN,
106107
page: float | NotGiven = NOT_GIVEN,
107108
per_page: float | NotGiven = NOT_GIVEN,
109+
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
108110
uuid: str | NotGiven = NOT_GIVEN,
109111
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
110112
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -133,6 +135,11 @@ def list(
133135
134136
per_page: Number of results to display.
135137
138+
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
139+
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
140+
state), `healthy` (tunnel is active and able to serve traffic), or `down`
141+
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
142+
136143
uuid: UUID of the tunnel.
137144
138145
extra_headers: Send extra headers
@@ -162,6 +169,7 @@ def list(
162169
"name": name,
163170
"page": page,
164171
"per_page": per_page,
172+
"status": status,
165173
"uuid": uuid,
166174
"was_active_at": was_active_at,
167175
"was_inactive_at": was_inactive_at,
@@ -456,6 +464,7 @@ def list(
456464
name: str | NotGiven = NOT_GIVEN,
457465
page: float | NotGiven = NOT_GIVEN,
458466
per_page: float | NotGiven = NOT_GIVEN,
467+
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
459468
uuid: str | NotGiven = NOT_GIVEN,
460469
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
461470
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -484,6 +493,11 @@ def list(
484493
485494
per_page: Number of results to display.
486495
496+
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
497+
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
498+
state), `healthy` (tunnel is active and able to serve traffic), or `down`
499+
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
500+
487501
uuid: UUID of the tunnel.
488502
489503
extra_headers: Send extra headers
@@ -513,6 +527,7 @@ def list(
513527
"name": name,
514528
"page": page,
515529
"per_page": per_page,
530+
"status": status,
516531
"uuid": uuid,
517532
"was_active_at": was_active_at,
518533
"was_inactive_at": was_inactive_at,

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

+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from typing import Any, Type, Union, cast
66
from datetime import datetime
7+
from typing_extensions import Literal
78

89
import httpx
910

@@ -169,6 +170,7 @@ def list(
169170
name: str | NotGiven = NOT_GIVEN,
170171
page: float | NotGiven = NOT_GIVEN,
171172
per_page: float | NotGiven = NOT_GIVEN,
173+
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
172174
tun_types: str | NotGiven = NOT_GIVEN,
173175
uuid: str | NotGiven = NOT_GIVEN,
174176
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -198,6 +200,11 @@ def list(
198200
199201
per_page: Number of results to display.
200202
203+
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
204+
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
205+
state), `healthy` (tunnel is active and able to serve traffic), or `down`
206+
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
207+
201208
tun_types: The types of tunnels to filter separated by a comma.
202209
203210
uuid: UUID of the tunnel.
@@ -229,6 +236,7 @@ def list(
229236
"name": name,
230237
"page": page,
231238
"per_page": per_page,
239+
"status": status,
232240
"tun_types": tun_types,
233241
"uuid": uuid,
234242
"was_active_at": was_active_at,
@@ -485,6 +493,7 @@ def list(
485493
name: str | NotGiven = NOT_GIVEN,
486494
page: float | NotGiven = NOT_GIVEN,
487495
per_page: float | NotGiven = NOT_GIVEN,
496+
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
488497
tun_types: str | NotGiven = NOT_GIVEN,
489498
uuid: str | NotGiven = NOT_GIVEN,
490499
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
@@ -514,6 +523,11 @@ def list(
514523
515524
per_page: Number of results to display.
516525
526+
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
527+
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
528+
state), `healthy` (tunnel is active and able to serve traffic), or `down`
529+
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
530+
517531
tun_types: The types of tunnels to filter separated by a comma.
518532
519533
uuid: UUID of the tunnel.
@@ -545,6 +559,7 @@ def list(
545559
"name": name,
546560
"page": page,
547561
"per_page": per_page,
562+
"status": status,
548563
"tun_types": tun_types,
549564
"uuid": uuid,
550565
"was_active_at": was_active_at,

src/cloudflare/types/shared/cloudflare_tunnel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CloudflareTunnel(BaseModel):
8383
If `false`, the tunnel must be configured locally on the origin machine.
8484
"""
8585

86-
status: Optional[str] = None
86+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8787
"""The status of the tunnel.
8888
8989
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/warp_connector/warp_connector_create_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/warp_connector/warp_connector_delete_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/warp_connector/warp_connector_edit_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/warp_connector/warp_connector_get_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/warp_connector/warp_connector_list_params.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from ..._utils import PropertyInfo
1010

@@ -40,6 +40,15 @@ class WARPConnectorListParams(TypedDict, total=False):
4040
per_page: float
4141
"""Number of results to display."""
4242

43+
status: Literal["inactive", "degraded", "healthy", "down"]
44+
"""The status of the tunnel.
45+
46+
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
47+
active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
48+
is active and able to serve traffic), or `down` (tunnel can not serve traffic as
49+
it has no connections to the Cloudflare Edge).
50+
"""
51+
4352
uuid: str
4453
"""UUID of the tunnel."""
4554

src/cloudflare/types/warp_connector/warp_connector_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/zero_trust/tunnel_edit_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

src/cloudflare/types/zero_trust/tunnel_list_params.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from ..._utils import PropertyInfo
1010

@@ -40,6 +40,15 @@ class TunnelListParams(TypedDict, total=False):
4040
per_page: float
4141
"""Number of results to display."""
4242

43+
status: Literal["inactive", "degraded", "healthy", "down"]
44+
"""The status of the tunnel.
45+
46+
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
47+
active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
48+
is active and able to serve traffic), or `down` (tunnel can not serve traffic as
49+
it has no connections to the Cloudflare Edge).
50+
"""
51+
4352
tun_types: str
4453
"""The types of tunnels to filter separated by a comma."""
4554

src/cloudflare/types/zero_trust/tunnel_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
7878
name: Optional[str] = None
7979
"""A user-friendly name for a tunnel."""
8080

81-
status: Optional[str] = None
81+
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
8282
"""The status of the tunnel.
8383
8484
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is

tests/api_resources/test_warp_connector.py

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
8686
name="blog",
8787
page=1,
8888
per_page=1,
89+
status="healthy",
8990
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
9091
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
9192
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),
@@ -389,6 +390,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
389390
name="blog",
390391
page=1,
391392
per_page=1,
393+
status="healthy",
392394
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
393395
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
394396
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),

tests/api_resources/zero_trust/test_tunnels.py

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
8989
name="blog",
9090
page=1,
9191
per_page=1,
92+
status="healthy",
9293
tun_types="cfd_tunnel,warp_connector",
9394
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
9495
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
@@ -349,6 +350,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
349350
name="blog",
350351
page=1,
351352
per_page=1,
353+
status="healthy",
352354
tun_types="cfd_tunnel,warp_connector",
353355
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
354356
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),

0 commit comments

Comments
 (0)