Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 22, 2024
1 parent 49fca30 commit 9e78a68
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 116 deletions.
16 changes: 8 additions & 8 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5365,7 +5365,7 @@ from cloudflare.types.zero_trust.dex import LiveStat, FleetStatusLiveResponse

Methods:

- <code title="get /accounts/{account_id}/dex/fleet-status/live">client.zero_trust.dex.fleet_status.<a href="./src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py">live</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/fleet_status_live_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/fleet_status_live_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/fleet-status/live">client.zero_trust.dex.fleet_status.<a href="./src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py">live</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/fleet_status_live_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/fleet_status_live_response.py">FleetStatusLiveResponse</a></code>
- <code title="get /accounts/{account_id}/dex/fleet-status/over-time">client.zero_trust.dex.fleet_status.<a href="./src/cloudflare/resources/zero_trust/dex/fleet_status/fleet_status.py">over_time</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/fleet_status_over_time_params.py">params</a>) -> None</code>

#### Devices
Expand All @@ -5390,7 +5390,7 @@ from cloudflare.types.zero_trust.dex import HTTPDetails

Methods:

- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}">client.zero_trust.dex.http_tests.<a href="./src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/http_test_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/http_details.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}">client.zero_trust.dex.http_tests.<a href="./src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/http_test_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/http_details.py">HTTPDetails</a></code>

#### Percentiles

Expand All @@ -5402,7 +5402,7 @@ from cloudflare.types.zero_trust.dex.http_tests import HTTPDetailsPercentiles, T

Methods:

- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}/percentiles">client.zero_trust.dex.http_tests.percentiles.<a href="./src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/http_tests/http_details_percentiles.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/http-tests/{test_id}/percentiles">client.zero_trust.dex.http_tests.percentiles.<a href="./src/cloudflare/resources/zero_trust/dex/http_tests/percentiles.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/http_tests/percentile_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/http_tests/http_details_percentiles.py">HTTPDetailsPercentiles</a></code>

### Tests

Expand All @@ -5426,7 +5426,7 @@ from cloudflare.types.zero_trust.dex.tests import UniqueDevices

Methods:

- <code title="get /accounts/{account_id}/dex/tests/unique-devices">client.zero_trust.dex.tests.unique_devices.<a href="./src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/tests/unique_device_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/tests/unique_devices.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/tests/unique-devices">client.zero_trust.dex.tests.unique_devices.<a href="./src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/tests/unique_device_list_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/tests/unique_devices.py">UniqueDevices</a></code>

### TracerouteTestResults

Expand All @@ -5440,7 +5440,7 @@ from cloudflare.types.zero_trust.dex.traceroute_test_results import NetworkPathG

Methods:

- <code title="get /accounts/{account_id}/dex/traceroute-test-results/{test_result_id}/network-path">client.zero_trust.dex.traceroute_test_results.network_path.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py">get</a>(test_result_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-test-results/{test_result_id}/network-path">client.zero_trust.dex.traceroute_test_results.network_path.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_test_results/network_path.py">get</a>(test_result_id, \*, account_id) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute_test_results/network_path_get_response.py">NetworkPathGetResponse</a></code>

### TracerouteTests

Expand All @@ -5452,9 +5452,9 @@ from cloudflare.types.zero_trust.dex import Traceroute, TracerouteTestPercentile

Methods:

- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/network-path">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">network_path</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/network_path.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/percentiles">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">percentiles</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py">Optional</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">get</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_get_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute.py">Traceroute</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/network-path">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">network_path</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_network_path_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/network_path.py">NetworkPath</a></code>
- <code title="get /accounts/{account_id}/dex/traceroute-tests/{test_id}/percentiles">client.zero_trust.dex.traceroute_tests.<a href="./src/cloudflare/resources/zero_trust/dex/traceroute_tests.py">percentiles</a>(test_id, \*, account_id, \*\*<a href="src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_params.py">params</a>) -> <a href="./src/cloudflare/types/zero_trust/dex/traceroute_test_percentiles_response.py">TracerouteTestPercentilesResponse</a></code>

## Tunnels

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, Optional, cast
from typing import Type, cast

import httpx

Expand Down Expand Up @@ -60,7 +60,7 @@ def live(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FleetStatusLiveResponse]:
) -> FleetStatusLiveResponse:
"""
List details for live (up to 60 minutes) devices using WARP
Expand All @@ -87,7 +87,7 @@ def live(
query=maybe_transform({"since_minutes": since_minutes}, fleet_status_live_params.FleetStatusLiveParams),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[FleetStatusLiveResponse]], ResultWrapper[FleetStatusLiveResponse]),
cast_to=cast(Type[FleetStatusLiveResponse], ResultWrapper[FleetStatusLiveResponse]),
)

def over_time(
Expand Down Expand Up @@ -173,7 +173,7 @@ async def live(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[FleetStatusLiveResponse]:
) -> FleetStatusLiveResponse:
"""
List details for live (up to 60 minutes) devices using WARP
Expand Down Expand Up @@ -202,7 +202,7 @@ async def live(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[FleetStatusLiveResponse]], ResultWrapper[FleetStatusLiveResponse]),
cast_to=cast(Type[FleetStatusLiveResponse], ResultWrapper[FleetStatusLiveResponse]),
)

async def over_time(
Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/zero_trust/dex/http_tests/http_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Optional, cast
from typing import List, Type, cast
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -66,7 +66,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[HTTPDetails]:
) -> HTTPDetails:
"""
Get test details and aggregate performance metrics for an http test for a given
time period between 1 hour and 7 days.
Expand Down Expand Up @@ -117,7 +117,7 @@ def get(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[HTTPDetails]], ResultWrapper[HTTPDetails]),
cast_to=cast(Type[HTTPDetails], ResultWrapper[HTTPDetails]),
)


Expand Down Expand Up @@ -150,7 +150,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[HTTPDetails]:
) -> HTTPDetails:
"""
Get test details and aggregate performance metrics for an http test for a given
time period between 1 hour and 7 days.
Expand Down Expand Up @@ -201,7 +201,7 @@ async def get(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[HTTPDetails]], ResultWrapper[HTTPDetails]),
cast_to=cast(Type[HTTPDetails], ResultWrapper[HTTPDetails]),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Optional, cast
from typing import List, Type, cast

import httpx

Expand Down Expand Up @@ -52,7 +52,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[HTTPDetailsPercentiles]:
) -> HTTPDetailsPercentiles:
"""
Get percentiles for an http test for a given time period between 1 hour and 7
days.
Expand Down Expand Up @@ -100,7 +100,7 @@ def get(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[HTTPDetailsPercentiles]], ResultWrapper[HTTPDetailsPercentiles]),
cast_to=cast(Type[HTTPDetailsPercentiles], ResultWrapper[HTTPDetailsPercentiles]),
)


Expand Down Expand Up @@ -128,7 +128,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[HTTPDetailsPercentiles]:
) -> HTTPDetailsPercentiles:
"""
Get percentiles for an http test for a given time period between 1 hour and 7
days.
Expand Down Expand Up @@ -176,7 +176,7 @@ async def get(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[HTTPDetailsPercentiles]], ResultWrapper[HTTPDetailsPercentiles]),
cast_to=cast(Type[HTTPDetailsPercentiles], ResultWrapper[HTTPDetailsPercentiles]),
)


Expand Down
10 changes: 5 additions & 5 deletions src/cloudflare/resources/zero_trust/dex/tests/unique_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Type, Optional, cast
from typing import List, Type, cast

import httpx

Expand Down Expand Up @@ -49,7 +49,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[unique_devices.UniqueDevices]:
) -> unique_devices.UniqueDevices:
"""
Returns unique count of devices that have run synthetic application monitoring
tests in the past 7 days.
Expand Down Expand Up @@ -86,7 +86,7 @@ def list(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[unique_devices.UniqueDevices]], ResultWrapper[unique_devices.UniqueDevices]),
cast_to=cast(Type[unique_devices.UniqueDevices], ResultWrapper[unique_devices.UniqueDevices]),
)


Expand All @@ -111,7 +111,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[unique_devices.UniqueDevices]:
) -> unique_devices.UniqueDevices:
"""
Returns unique count of devices that have run synthetic application monitoring
tests in the past 7 days.
Expand Down Expand Up @@ -148,7 +148,7 @@ async def list(
),
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[unique_devices.UniqueDevices]], ResultWrapper[unique_devices.UniqueDevices]),
cast_to=cast(Type[unique_devices.UniqueDevices], ResultWrapper[unique_devices.UniqueDevices]),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Type, Optional, cast
from typing import Type, cast

import httpx

Expand Down Expand Up @@ -44,7 +44,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NetworkPathGetResponse]:
) -> NetworkPathGetResponse:
"""
Get a breakdown of hops and performance metrics for a specific traceroute test
run
Expand Down Expand Up @@ -73,7 +73,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[NetworkPathGetResponse]], ResultWrapper[NetworkPathGetResponse]),
cast_to=cast(Type[NetworkPathGetResponse], ResultWrapper[NetworkPathGetResponse]),
)


Expand All @@ -97,7 +97,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[NetworkPathGetResponse]:
) -> NetworkPathGetResponse:
"""
Get a breakdown of hops and performance metrics for a specific traceroute test
run
Expand Down Expand Up @@ -126,7 +126,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[NetworkPathGetResponse]], ResultWrapper[NetworkPathGetResponse]),
cast_to=cast(Type[NetworkPathGetResponse], ResultWrapper[NetworkPathGetResponse]),
)


Expand Down
Loading

0 comments on commit 9e78a68

Please sign in to comment.