Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 6, 2024
1 parent 0f546f5 commit 96236a2
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1336
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f2571965a066e5ec176e3f8cb83d9cbf8889e42380a250bad505db2d18a4a772.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6a077023d5a748c646073f33bc20264fc7235f7fe9ce157d1f50f9914a3927e1.yml
15 changes: 15 additions & 0 deletions src/cloudflare/resources/warp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from typing import Any, Union, cast
from datetime import datetime
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -105,6 +106,7 @@ def list(
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
uuid: str | NotGiven = NOT_GIVEN,
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -133,6 +135,11 @@ def list(
per_page: Number of results to display.
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
state), `healthy` (tunnel is active and able to serve traffic), or `down`
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
uuid: UUID of the tunnel.
extra_headers: Send extra headers
Expand Down Expand Up @@ -162,6 +169,7 @@ def list(
"name": name,
"page": page,
"per_page": per_page,
"status": status,
"uuid": uuid,
"was_active_at": was_active_at,
"was_inactive_at": was_inactive_at,
Expand Down Expand Up @@ -456,6 +464,7 @@ def list(
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
uuid: str | NotGiven = NOT_GIVEN,
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
was_inactive_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -484,6 +493,11 @@ def list(
per_page: Number of results to display.
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
state), `healthy` (tunnel is active and able to serve traffic), or `down`
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
uuid: UUID of the tunnel.
extra_headers: Send extra headers
Expand Down Expand Up @@ -513,6 +527,7 @@ def list(
"name": name,
"page": page,
"per_page": per_page,
"status": status,
"uuid": uuid,
"was_active_at": was_active_at,
"was_inactive_at": was_inactive_at,
Expand Down
15 changes: 15 additions & 0 deletions src/cloudflare/resources/zero_trust/tunnels/tunnels.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from typing import Any, Type, Union, cast
from datetime import datetime
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -169,6 +170,7 @@ def list(
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
tun_types: str | NotGiven = NOT_GIVEN,
uuid: str | NotGiven = NOT_GIVEN,
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -198,6 +200,11 @@ def list(
per_page: Number of results to display.
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
state), `healthy` (tunnel is active and able to serve traffic), or `down`
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
tun_types: The types of tunnels to filter separated by a comma.
uuid: UUID of the tunnel.
Expand Down Expand Up @@ -229,6 +236,7 @@ def list(
"name": name,
"page": page,
"per_page": per_page,
"status": status,
"tun_types": tun_types,
"uuid": uuid,
"was_active_at": was_active_at,
Expand Down Expand Up @@ -485,6 +493,7 @@ def list(
name: str | NotGiven = NOT_GIVEN,
page: float | NotGiven = NOT_GIVEN,
per_page: float | NotGiven = NOT_GIVEN,
status: Literal["inactive", "degraded", "healthy", "down"] | NotGiven = NOT_GIVEN,
tun_types: str | NotGiven = NOT_GIVEN,
uuid: str | NotGiven = NOT_GIVEN,
was_active_at: Union[str, datetime] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -514,6 +523,11 @@ def list(
per_page: Number of results to display.
status: The status of the tunnel. Valid values are `inactive` (tunnel has never been
run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy
state), `healthy` (tunnel is active and able to serve traffic), or `down`
(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
tun_types: The types of tunnels to filter separated by a comma.
uuid: UUID of the tunnel.
Expand Down Expand Up @@ -545,6 +559,7 @@ def list(
"name": name,
"page": page,
"per_page": per_page,
"status": status,
"tun_types": tun_types,
"uuid": uuid,
"was_active_at": was_active_at,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/shared/cloudflare_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class CloudflareTunnel(BaseModel):
If `false`, the tunnel must be configured locally on the origin machine.
"""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Union
from datetime import datetime
from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

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

status: Literal["inactive", "degraded", "healthy", "down"]
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
is active and able to serve traffic), or `down` (tunnel can not serve traffic as
it has no connections to the Cloudflare Edge).
"""

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/zero_trust/tunnel_edit_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
11 changes: 10 additions & 1 deletion src/cloudflare/types/zero_trust/tunnel_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Union
from datetime import datetime
from typing_extensions import Required, Annotated, TypedDict
from typing_extensions import Literal, Required, Annotated, TypedDict

from ..._utils import PropertyInfo

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

status: Literal["inactive", "degraded", "healthy", "down"]
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
active and able to serve traffic but in an unhealthy state), `healthy` (tunnel
is active and able to serve traffic), or `down` (tunnel can not serve traffic as
it has no connections to the Cloudflare Edge).
"""

tun_types: str
"""The types of tunnels to filter separated by a comma."""

Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/zero_trust/tunnel_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TunnelWARPConnectorTunnel(BaseModel):
name: Optional[str] = None
"""A user-friendly name for a tunnel."""

status: Optional[str] = None
status: Optional[Literal["inactive", "degraded", "healthy", "down"]] = None
"""The status of the tunnel.
Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_warp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
name="blog",
page=1,
per_page=1,
status="healthy",
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),
Expand Down Expand Up @@ -389,6 +390,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
name="blog",
page=1,
per_page=1,
status="healthy",
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
was_inactive_at=parse_datetime("2009-11-10T23:00:00Z"),
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/zero_trust/test_tunnels.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
name="blog",
page=1,
per_page=1,
status="healthy",
tun_types="cfd_tunnel,warp_connector",
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
Expand Down Expand Up @@ -349,6 +350,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
name="blog",
page=1,
per_page=1,
status="healthy",
tun_types="cfd_tunnel,warp_connector",
uuid="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
was_active_at=parse_datetime("2009-11-10T23:00:00Z"),
Expand Down

0 comments on commit 96236a2

Please sign in to comment.