From 3d2205f292a1ef3c7f71cab7b2ec43fc3f56446b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 18 Apr 2024 21:13:03 +0000
Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#341)
---
api.md | 20 +--
src/cloudflare/resources/stream/captions.py | 58 +++----
src/cloudflare/resources/stream/watermarks.py | 155 ++++++++----------
src/cloudflare/types/stream/__init__.py | 3 -
.../types/stream/caption_update_response.py | 7 -
.../types/stream/watermark_create_response.py | 7 -
.../types/stream/watermark_get_response.py | 7 -
tests/api_resources/stream/test_captions.py | 14 +-
tests/api_resources/stream/test_watermarks.py | 35 ++--
9 files changed, 115 insertions(+), 191 deletions(-)
delete mode 100644 src/cloudflare/types/stream/caption_update_response.py
delete mode 100644 src/cloudflare/types/stream/watermark_create_response.py
delete mode 100644 src/cloudflare/types/stream/watermark_get_response.py
diff --git a/api.md b/api.md
index 5296b26c7ed..f24918d5ab9 100644
--- a/api.md
+++ b/api.md
@@ -4360,20 +4360,15 @@ Methods:
Types:
```python
-from cloudflare.types.stream import (
- Watermaks,
- WatermarkCreateResponse,
- WatermarkDeleteResponse,
- WatermarkGetResponse,
-)
+from cloudflare.types.stream import Watermaks, WatermarkDeleteResponse
```
Methods:
-- client.stream.watermarks.create(\*, account_id, \*\*params) -> Optional
+- client.stream.watermarks.create(\*, account_id, \*\*params) -> Optional
- client.stream.watermarks.list(\*, account_id) -> SyncSinglePage[Watermaks]
- client.stream.watermarks.delete(identifier, \*, account_id, \*\*params) -> Optional
-- client.stream.watermarks.get(identifier, \*, account_id) -> Optional
+- client.stream.watermarks.get(identifier, \*, account_id) -> Optional
## Webhooks
@@ -4394,17 +4389,12 @@ Methods:
Types:
```python
-from cloudflare.types.stream import (
- Caption,
- CaptionUpdateResponse,
- CaptionDeleteResponse,
- CaptionGetResponse,
-)
+from cloudflare.types.stream import Caption, CaptionDeleteResponse, CaptionGetResponse
```
Methods:
-- client.stream.captions.update(language, \*, account_id, identifier, \*\*params) -> Optional
+- client.stream.captions.update(language, \*, account_id, identifier, \*\*params) -> Optional
- client.stream.captions.delete(language, \*, account_id, identifier, \*\*params) -> str
- client.stream.captions.get(identifier, \*, account_id) -> Optional
diff --git a/src/cloudflare/resources/stream/captions.py b/src/cloudflare/resources/stream/captions.py
index f99da0a0721..dce7828c93d 100644
--- a/src/cloudflare/resources/stream/captions.py
+++ b/src/cloudflare/resources/stream/captions.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Type, Optional, cast
+from typing import Type, Optional, cast
import httpx
@@ -24,9 +24,9 @@
make_request_options,
)
from ...types.stream import (
+ Caption,
CaptionGetResponse,
CaptionDeleteResponse,
- CaptionUpdateResponse,
caption_delete_params,
caption_update_params,
)
@@ -56,7 +56,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[CaptionUpdateResponse]:
+ ) -> Optional[Caption]:
"""
Uploads the caption or subtitle file to the endpoint for a specific BCP47
language. One caption or subtitle file per language is allowed.
@@ -84,22 +84,17 @@ def update(
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
if not language:
raise ValueError(f"Expected a non-empty value for `language` but received {language!r}")
- return cast(
- Optional[CaptionUpdateResponse],
- self._put(
- f"/accounts/{account_id}/stream/{identifier}/captions/{language}",
- body=maybe_transform({"file": file}, caption_update_params.CaptionUpdateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CaptionUpdateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CaptionUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._put(
+ f"/accounts/{account_id}/stream/{identifier}/captions/{language}",
+ body=maybe_transform({"file": file}, caption_update_params.CaptionUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Caption]]._unwrapper,
),
+ cast_to=cast(Type[Optional[Caption]], ResultWrapper[Caption]),
)
def delete(
@@ -220,7 +215,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[CaptionUpdateResponse]:
+ ) -> Optional[Caption]:
"""
Uploads the caption or subtitle file to the endpoint for a specific BCP47
language. One caption or subtitle file per language is allowed.
@@ -248,22 +243,17 @@ async def update(
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
if not language:
raise ValueError(f"Expected a non-empty value for `language` but received {language!r}")
- return cast(
- Optional[CaptionUpdateResponse],
- await self._put(
- f"/accounts/{account_id}/stream/{identifier}/captions/{language}",
- body=await async_maybe_transform({"file": file}, caption_update_params.CaptionUpdateParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[CaptionUpdateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[CaptionUpdateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._put(
+ f"/accounts/{account_id}/stream/{identifier}/captions/{language}",
+ body=await async_maybe_transform({"file": file}, caption_update_params.CaptionUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Caption]]._unwrapper,
),
+ cast_to=cast(Type[Optional[Caption]], ResultWrapper[Caption]),
)
async def delete(
diff --git a/src/cloudflare/resources/stream/watermarks.py b/src/cloudflare/resources/stream/watermarks.py
index f5c768ca2a5..0392215d21e 100644
--- a/src/cloudflare/resources/stream/watermarks.py
+++ b/src/cloudflare/resources/stream/watermarks.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, Optional, cast
+from typing import Any, Type, Optional, cast
import httpx
@@ -25,14 +25,7 @@
AsyncPaginator,
make_request_options,
)
-from ...types.stream import (
- Watermaks,
- WatermarkGetResponse,
- WatermarkCreateResponse,
- WatermarkDeleteResponse,
- watermark_create_params,
- watermark_delete_params,
-)
+from ...types.stream import Watermaks, WatermarkDeleteResponse, watermark_create_params, watermark_delete_params
__all__ = ["Watermarks", "AsyncWatermarks"]
@@ -62,7 +55,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[WatermarkCreateResponse]:
+ ) -> Optional[Watermaks]:
"""
Creates watermark profiles using a single `HTTP POST multipart/form-data`
request.
@@ -101,32 +94,27 @@ def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- Optional[WatermarkCreateResponse],
- self._post(
- f"/accounts/{account_id}/stream/watermarks",
- body=maybe_transform(
- {
- "file": file,
- "name": name,
- "opacity": opacity,
- "padding": padding,
- "position": position,
- "scale": scale,
- },
- watermark_create_params.WatermarkCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[WatermarkCreateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[WatermarkCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._post(
+ f"/accounts/{account_id}/stream/watermarks",
+ body=maybe_transform(
+ {
+ "file": file,
+ "name": name,
+ "opacity": opacity,
+ "padding": padding,
+ "position": position,
+ "scale": scale,
+ },
+ watermark_create_params.WatermarkCreateParams,
),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Watermaks]]._unwrapper,
+ ),
+ cast_to=cast(Type[Optional[Watermaks]], ResultWrapper[Watermaks]),
)
def list(
@@ -227,7 +215,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[WatermarkGetResponse]:
+ ) -> Optional[Watermaks]:
"""
Retrieves details for a single watermark profile.
@@ -248,21 +236,16 @@ def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
- return cast(
- Optional[WatermarkGetResponse],
- self._get(
- f"/accounts/{account_id}/stream/watermarks/{identifier}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[WatermarkGetResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[WatermarkGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return self._get(
+ f"/accounts/{account_id}/stream/watermarks/{identifier}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Watermaks]]._unwrapper,
),
+ cast_to=cast(Type[Optional[Watermaks]], ResultWrapper[Watermaks]),
)
@@ -291,7 +274,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[WatermarkCreateResponse]:
+ ) -> Optional[Watermaks]:
"""
Creates watermark profiles using a single `HTTP POST multipart/form-data`
request.
@@ -330,32 +313,27 @@ async def create(
"""
if not account_id:
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- Optional[WatermarkCreateResponse],
- await self._post(
- f"/accounts/{account_id}/stream/watermarks",
- body=await async_maybe_transform(
- {
- "file": file,
- "name": name,
- "opacity": opacity,
- "padding": padding,
- "position": position,
- "scale": scale,
- },
- watermark_create_params.WatermarkCreateParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[WatermarkCreateResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[WatermarkCreateResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._post(
+ f"/accounts/{account_id}/stream/watermarks",
+ body=await async_maybe_transform(
+ {
+ "file": file,
+ "name": name,
+ "opacity": opacity,
+ "padding": padding,
+ "position": position,
+ "scale": scale,
+ },
+ watermark_create_params.WatermarkCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Watermaks]]._unwrapper,
),
+ cast_to=cast(Type[Optional[Watermaks]], ResultWrapper[Watermaks]),
)
def list(
@@ -456,7 +434,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[WatermarkGetResponse]:
+ ) -> Optional[Watermaks]:
"""
Retrieves details for a single watermark profile.
@@ -477,21 +455,16 @@ async def get(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
if not identifier:
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
- return cast(
- Optional[WatermarkGetResponse],
- await self._get(
- f"/accounts/{account_id}/stream/watermarks/{identifier}",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper[Optional[WatermarkGetResponse]]._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[WatermarkGetResponse]
- ), # Union types cannot be passed in as arguments in the type system
+ return await self._get(
+ f"/accounts/{account_id}/stream/watermarks/{identifier}",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper[Optional[Watermaks]]._unwrapper,
),
+ cast_to=cast(Type[Optional[Watermaks]], ResultWrapper[Watermaks]),
)
diff --git a/src/cloudflare/types/stream/__init__.py b/src/cloudflare/types/stream/__init__.py
index 1849a5f9203..9aa6856a37f 100644
--- a/src/cloudflare/types/stream/__init__.py
+++ b/src/cloudflare/types/stream/__init__.py
@@ -31,11 +31,9 @@
from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams
from .download_create_params import DownloadCreateParams as DownloadCreateParams
from .live_input_list_params import LiveInputListParams as LiveInputListParams
-from .watermark_get_response import WatermarkGetResponse as WatermarkGetResponse
from .audio_track_copy_params import AudioTrackCopyParams as AudioTrackCopyParams
from .audio_track_edit_params import AudioTrackEditParams as AudioTrackEditParams
from .caption_delete_response import CaptionDeleteResponse as CaptionDeleteResponse
-from .caption_update_response import CaptionUpdateResponse as CaptionUpdateResponse
from .watermark_create_params import WatermarkCreateParams as WatermarkCreateParams
from .watermark_delete_params import WatermarkDeleteParams as WatermarkDeleteParams
from .webhook_delete_response import WebhookDeleteResponse as WebhookDeleteResponse
@@ -47,7 +45,6 @@
from .live_input_delete_params import LiveInputDeleteParams as LiveInputDeleteParams
from .live_input_list_response import LiveInputListResponse as LiveInputListResponse
from .live_input_update_params import LiveInputUpdateParams as LiveInputUpdateParams
-from .watermark_create_response import WatermarkCreateResponse as WatermarkCreateResponse
from .watermark_delete_response import WatermarkDeleteResponse as WatermarkDeleteResponse
from .video_storage_usage_params import VideoStorageUsageParams as VideoStorageUsageParams
from .audio_track_delete_response import AudioTrackDeleteResponse as AudioTrackDeleteResponse
diff --git a/src/cloudflare/types/stream/caption_update_response.py b/src/cloudflare/types/stream/caption_update_response.py
deleted file mode 100644
index 764754136d0..00000000000
--- a/src/cloudflare/types/stream/caption_update_response.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-
-__all__ = ["CaptionUpdateResponse"]
-
-CaptionUpdateResponse = Union[Optional[str], Optional[object]]
diff --git a/src/cloudflare/types/stream/watermark_create_response.py b/src/cloudflare/types/stream/watermark_create_response.py
deleted file mode 100644
index 5d3cfba18a3..00000000000
--- a/src/cloudflare/types/stream/watermark_create_response.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-
-__all__ = ["WatermarkCreateResponse"]
-
-WatermarkCreateResponse = Union[Optional[str], Optional[object]]
diff --git a/src/cloudflare/types/stream/watermark_get_response.py b/src/cloudflare/types/stream/watermark_get_response.py
deleted file mode 100644
index ef115151a41..00000000000
--- a/src/cloudflare/types/stream/watermark_get_response.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-
-__all__ = ["WatermarkGetResponse"]
-
-WatermarkGetResponse = Union[Optional[str], Optional[object]]
diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py
index 8c2f801d181..ddcc3b051ce 100644
--- a/tests/api_resources/stream/test_captions.py
+++ b/tests/api_resources/stream/test_captions.py
@@ -10,8 +10,8 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.stream import (
+ Caption,
CaptionGetResponse,
- CaptionUpdateResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None:
identifier="ea95132c15732412d22c1476fa83f27a",
file="@/Users/kyle/Desktop/tr.vtt",
)
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
caption = response.parse()
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -59,7 +59,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
caption = response.parse()
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -225,7 +225,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
identifier="ea95132c15732412d22c1476fa83f27a",
file="@/Users/kyle/Desktop/tr.vtt",
)
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -240,7 +240,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
caption = await response.parse()
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -255,7 +255,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
caption = await response.parse()
- assert_matches_type(Optional[CaptionUpdateResponse], caption, path=["response"])
+ assert_matches_type(Optional[Caption], caption, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py
index 77ac7c6cde8..83c9058bc3d 100644
--- a/tests/api_resources/stream/test_watermarks.py
+++ b/tests/api_resources/stream/test_watermarks.py
@@ -10,12 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
-from cloudflare.types.stream import (
- Watermaks,
- WatermarkGetResponse,
- WatermarkCreateResponse,
- WatermarkDeleteResponse,
-)
+from cloudflare.types.stream import Watermaks, WatermarkDeleteResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -30,7 +25,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
file="@/Users/rchen/Downloads/watermark.png",
)
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -44,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
position="center",
scale=0.1,
)
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -57,7 +52,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = response.parse()
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -70,7 +65,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = response.parse()
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -189,7 +184,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -202,7 +197,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = response.parse()
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -215,7 +210,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = response.parse()
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -245,7 +240,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
file="@/Users/rchen/Downloads/watermark.png",
)
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -259,7 +254,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
position="center",
scale=0.1,
)
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -272,7 +267,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = await response.parse()
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -285,7 +280,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = await response.parse()
- assert_matches_type(Optional[WatermarkCreateResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -404,7 +399,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -417,7 +412,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = await response.parse()
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -430,7 +425,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
watermark = await response.parse()
- assert_matches_type(Optional[WatermarkGetResponse], watermark, path=["response"])
+ assert_matches_type(Optional[Watermaks], watermark, path=["response"])
assert cast(Any, response.is_closed) is True