From c4b9c52f0fbbe02368c95a72af5582eec1d7605d Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 10 Jun 2024 20:45:59 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- .../zero_trust/dlp/datasets/upload.py | 4 ++-- .../dlp/datasets/upload_edit_params.py | 2 +- .../zero_trust/dlp/datasets/test_upload.py | 20 +++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 254000e633d..f6163818d60 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1343 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6545c93a16062d2763cd304367d8babf5aaef09046036361dbb077b75536e858.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1ab7e5d073ef27b0e08bd9fd83e406c15c1c69017c29b17dadceec459febd7b.yml diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py index 8ae70bace70..ffbd13882e4 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/upload.py @@ -85,7 +85,7 @@ def edit( *, account_id: str, dataset_id: str, - body: object, + body: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -178,7 +178,7 @@ async def edit( *, account_id: str, dataset_id: str, - body: object, + body: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py b/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py index 3427ac066d8..1a0500f09a4 100644 --- a/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py +++ b/src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py @@ -12,4 +12,4 @@ class UploadEditParams(TypedDict, total=False): dataset_id: Required[str] - body: Required[object] + body: Required[str] diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index df7a9832ab3..625c13ce809 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -73,7 +73,7 @@ def test_method_edit(self, client: Cloudflare) -> None: 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -84,7 +84,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) assert response.is_closed is True @@ -99,7 +99,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,7 +117,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: 0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -125,7 +125,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: 0, account_id="string", dataset_id="", - body={}, + body="string", ) @@ -187,7 +187,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -198,7 +198,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) assert response.is_closed is True @@ -213,7 +213,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N 0, account_id="string", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -231,7 +231,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: 0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body={}, + body="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -239,5 +239,5 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: 0, account_id="string", dataset_id="", - body={}, + body="string", )