From 90ce238bfabfc0182f8f8dabf5cbc9ae84a15c91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:14:47 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#1188) --- .stats.yml | 2 +- .../types/hyperdrive/configuration.py | 10 +++++--- .../types/hyperdrive/configuration_param.py | 9 ++++--- .../api_resources/hyperdrive/test_configs.py | 24 +++++-------------- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/.stats.yml b/.stats.yml index b74781a6893..b0ac00b54b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1256 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc261aaae82e045d5b257d76a8e4dedcc8102a8b20f0d32d091e41296624124.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml diff --git a/src/cloudflare/types/hyperdrive/configuration.py b/src/cloudflare/types/hyperdrive/configuration.py index 68c745a34de..5a6158e9e95 100644 --- a/src/cloudflare/types/hyperdrive/configuration.py +++ b/src/cloudflare/types/hyperdrive/configuration.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from ..._models import BaseModel @@ -14,11 +15,14 @@ class Configuration(BaseModel): host: str """The host (hostname or IP) of your origin database.""" - port: int - """The port (default: 5432 for Postgres) of your origin database.""" - scheme: Literal["postgres", "postgresql", "mysql"] """Specifies the URL scheme used to connect to your origin database.""" user: str """The user of your origin database.""" + + access_client_id: Optional[str] = None + """The Client ID of the Access token to use when connecting to the origin database""" + + port: Optional[int] = None + """The port (default: 5432 for Postgres) of your origin database.""" diff --git a/src/cloudflare/types/hyperdrive/configuration_param.py b/src/cloudflare/types/hyperdrive/configuration_param.py index 02bca1d6527..bd751b98e04 100644 --- a/src/cloudflare/types/hyperdrive/configuration_param.py +++ b/src/cloudflare/types/hyperdrive/configuration_param.py @@ -14,11 +14,14 @@ class ConfigurationParam(TypedDict, total=False): host: Required[str] """The host (hostname or IP) of your origin database.""" - port: Required[int] - """The port (default: 5432 for Postgres) of your origin database.""" - scheme: Required[Literal["postgres", "postgresql", "mysql"]] """Specifies the URL scheme used to connect to your origin database.""" user: Required[str] """The user of your origin database.""" + + access_client_id: str + """The Client ID of the Access token to use when connecting to the origin database""" + + port: int + """The port (default: 5432 for Postgres) of your origin database.""" diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index a6edc5fb868..bb89f9ec1a4 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -44,6 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -67,7 +67,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -87,7 +86,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -110,7 +108,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -126,7 +123,6 @@ def test_method_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -141,6 +137,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -165,7 +162,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -186,7 +182,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -210,7 +205,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -224,7 +218,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -338,6 +331,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: }, name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -451,7 +445,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -465,6 +458,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -488,7 +482,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -508,7 +501,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -531,7 +523,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -547,7 +538,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -562,6 +552,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432, @@ -586,7 +577,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -607,7 +597,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -631,7 +620,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -645,7 +633,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -759,6 +746,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) }, name="example-hyperdrive", origin={ + "access_client_id": "0123456789abcdef0123456789abcdef.access", "database": "postgres", "host": "database.example.com", "port": 5432,