From 6ed00c65da6477ba7bf453aae4a7e9f9cded6841 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 00:29:04 +0000 Subject: [PATCH 1/4] feat(api): api update --- .stats.yml | 6 +- api.md | 2 - src/mixedbread/resources/stores/files.py | 105 ------------------ src/mixedbread/types/stores/__init__.py | 1 - .../types/stores/file_delete_response.py | 19 ---- tests/api_resources/stores/test_files.py | 97 ---------------- 6 files changed, 3 insertions(+), 227 deletions(-) delete mode 100644 src/mixedbread/types/stores/file_delete_response.py diff --git a/.stats.yml b/.stats.yml index eb55da54..0ed21676 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 62 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-b091721a627d75feb8567f628f99405d5778b0b88e9cc09fc664dd8e97c6d720.yml -openapi_spec_hash: a23a2aecdcff5fa1d6c8cdc0df0bdfb7 +configured_endpoints: 61 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-656ab86d86574c9c2fba1f067de2c3930f1f83e571d1bf77fb5720b3d7a50b79.yml +openapi_spec_hash: 4ed47395165578f566c4ddc52338cfb5 config_hash: c56a6c9375e7640ce70ff00420e8605a diff --git a/api.md b/api.md index 326815b5..76ad5259 100644 --- a/api.md +++ b/api.md @@ -113,7 +113,6 @@ from mixedbread.types.stores import ( StoreFileStatus, StoreFile, FileListResponse, - FileDeleteResponse, FileSearchResponse, ) ``` @@ -123,7 +122,6 @@ Methods: - client.stores.files.create(store_identifier, \*\*params) -> StoreFile - client.stores.files.retrieve(file_identifier, \*, store_identifier, \*\*params) -> StoreFile - client.stores.files.list(store_identifier, \*\*params) -> FileListResponse -- client.stores.files.delete(file_id, \*, store_identifier) -> FileDeleteResponse - client.stores.files.search(\*\*params) -> FileSearchResponse # Parsing diff --git a/src/mixedbread/resources/stores/files.py b/src/mixedbread/resources/stores/files.py index 1e871645..f5530c0d 100644 --- a/src/mixedbread/resources/stores/files.py +++ b/src/mixedbread/resources/stores/files.py @@ -23,7 +23,6 @@ from ...types.stores.store_file import StoreFile from ...types.stores.store_file_status import StoreFileStatus from ...types.stores.file_list_response import FileListResponse -from ...types.stores.file_delete_response import FileDeleteResponse from ...types.stores.file_search_response import FileSearchResponse __all__ = ["FilesResource", "AsyncFilesResource"] @@ -243,52 +242,6 @@ def list( cast_to=FileListResponse, ) - def delete( - self, - file_id: str, - *, - store_identifier: 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FileDeleteResponse: - """Delete a file from a store. - - Args: store_identifier: The ID or name of the store. - - file_id: The ID or name of - the file to delete. - - Returns: VectorStoreFileDeleted: The deleted file details. - - Args: - store_identifier: The ID or name of the store - - file_id: The ID or name of the file to delete - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not store_identifier: - raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}") - if not file_id: - raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") - return self._delete( - f"/v1/stores/{store_identifier}/files/{file_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=FileDeleteResponse, - ) - def search( self, *, @@ -728,52 +681,6 @@ async def list( cast_to=FileListResponse, ) - async def delete( - self, - file_id: str, - *, - store_identifier: 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, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FileDeleteResponse: - """Delete a file from a store. - - Args: store_identifier: The ID or name of the store. - - file_id: The ID or name of - the file to delete. - - Returns: VectorStoreFileDeleted: The deleted file details. - - Args: - store_identifier: The ID or name of the store - - file_id: The ID or name of the file to delete - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not store_identifier: - raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}") - if not file_id: - raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") - return await self._delete( - f"/v1/stores/{store_identifier}/files/{file_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=FileDeleteResponse, - ) - async def search( self, *, @@ -1012,9 +919,6 @@ def __init__(self, files: FilesResource) -> None: self.list = to_raw_response_wrapper( files.list, ) - self.delete = to_raw_response_wrapper( - files.delete, - ) self.search = to_raw_response_wrapper( files.search, ) @@ -1033,9 +937,6 @@ def __init__(self, files: AsyncFilesResource) -> None: self.list = async_to_raw_response_wrapper( files.list, ) - self.delete = async_to_raw_response_wrapper( - files.delete, - ) self.search = async_to_raw_response_wrapper( files.search, ) @@ -1054,9 +955,6 @@ def __init__(self, files: FilesResource) -> None: self.list = to_streamed_response_wrapper( files.list, ) - self.delete = to_streamed_response_wrapper( - files.delete, - ) self.search = to_streamed_response_wrapper( files.search, ) @@ -1075,9 +973,6 @@ def __init__(self, files: AsyncFilesResource) -> None: self.list = async_to_streamed_response_wrapper( files.list, ) - self.delete = async_to_streamed_response_wrapper( - files.delete, - ) self.search = async_to_streamed_response_wrapper( files.search, ) diff --git a/src/mixedbread/types/stores/__init__.py b/src/mixedbread/types/stores/__init__.py index 3dee7dac..b20cdb89 100644 --- a/src/mixedbread/types/stores/__init__.py +++ b/src/mixedbread/types/stores/__init__.py @@ -9,6 +9,5 @@ from .file_create_params import FileCreateParams as FileCreateParams from .file_list_response import FileListResponse as FileListResponse from .file_search_params import FileSearchParams as FileSearchParams -from .file_delete_response import FileDeleteResponse as FileDeleteResponse from .file_retrieve_params import FileRetrieveParams as FileRetrieveParams from .file_search_response import FileSearchResponse as FileSearchResponse diff --git a/src/mixedbread/types/stores/file_delete_response.py b/src/mixedbread/types/stores/file_delete_response.py deleted file mode 100644 index ada45e9c..00000000 --- a/src/mixedbread/types/stores/file_delete_response.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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 - -__all__ = ["FileDeleteResponse"] - - -class FileDeleteResponse(BaseModel): - id: str - """ID of the deleted file""" - - deleted: Optional[bool] = None - """Whether the deletion was successful""" - - object: Optional[Literal["store.file"]] = None - """Type of the deleted object""" diff --git a/tests/api_resources/stores/test_files.py b/tests/api_resources/stores/test_files.py index ea9fc27b..e4f24043 100644 --- a/tests/api_resources/stores/test_files.py +++ b/tests/api_resources/stores/test_files.py @@ -12,7 +12,6 @@ from mixedbread.types.stores import ( StoreFile, FileListResponse, - FileDeleteResponse, FileSearchResponse, ) @@ -222,54 +221,6 @@ def test_path_params_list(self, client: Mixedbread) -> None: store_identifier="", ) - @parametrize - def test_method_delete(self, client: Mixedbread) -> None: - file = client.stores.files.delete( - file_id="file_id", - store_identifier="store_identifier", - ) - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - @parametrize - def test_raw_response_delete(self, client: Mixedbread) -> None: - response = client.stores.files.with_raw_response.delete( - file_id="file_id", - store_identifier="store_identifier", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - @parametrize - def test_streaming_response_delete(self, client: Mixedbread) -> None: - with client.stores.files.with_streaming_response.delete( - file_id="file_id", - store_identifier="store_identifier", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file = response.parse() - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_delete(self, client: Mixedbread) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"): - client.stores.files.with_raw_response.delete( - file_id="file_id", - store_identifier="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): - client.stores.files.with_raw_response.delete( - file_id="", - store_identifier="store_identifier", - ) - @parametrize def test_method_search(self, client: Mixedbread) -> None: file = client.stores.files.search( @@ -567,54 +518,6 @@ async def test_path_params_list(self, async_client: AsyncMixedbread) -> None: store_identifier="", ) - @parametrize - async def test_method_delete(self, async_client: AsyncMixedbread) -> None: - file = await async_client.stores.files.delete( - file_id="file_id", - store_identifier="store_identifier", - ) - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - @parametrize - async def test_raw_response_delete(self, async_client: AsyncMixedbread) -> None: - response = await async_client.stores.files.with_raw_response.delete( - file_id="file_id", - store_identifier="store_identifier", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = await response.parse() - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - @parametrize - async def test_streaming_response_delete(self, async_client: AsyncMixedbread) -> None: - async with async_client.stores.files.with_streaming_response.delete( - file_id="file_id", - store_identifier="store_identifier", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file = await response.parse() - assert_matches_type(FileDeleteResponse, file, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_delete(self, async_client: AsyncMixedbread) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"): - await async_client.stores.files.with_raw_response.delete( - file_id="file_id", - store_identifier="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"): - await async_client.stores.files.with_raw_response.delete( - file_id="", - store_identifier="store_identifier", - ) - @parametrize async def test_method_search(self, async_client: AsyncMixedbread) -> None: file = await async_client.stores.files.search( From ece68dd6350b58e8dac815213c918ad879c89ddd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 22:29:06 +0000 Subject: [PATCH 2/4] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/types/shared/search_filter_condition.py | 2 +- src/mixedbread/types/shared_params/search_filter_condition.py | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ed21676..a50756d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 61 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-656ab86d86574c9c2fba1f067de2c3930f1f83e571d1bf77fb5720b3d7a50b79.yml -openapi_spec_hash: 4ed47395165578f566c4ddc52338cfb5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-c53a9b02bf4bd345435a03b4178aed1b7c8ac04a2508f370b5361bf305a3f803.yml +openapi_spec_hash: f05a6df876280efad08ed2f0ab78d5fc config_hash: c56a6c9375e7640ce70ff00420e8605a diff --git a/src/mixedbread/types/shared/search_filter_condition.py b/src/mixedbread/types/shared/search_filter_condition.py index 9e6f8c6e..36309f1d 100644 --- a/src/mixedbread/types/shared/search_filter_condition.py +++ b/src/mixedbread/types/shared/search_filter_condition.py @@ -14,5 +14,5 @@ class SearchFilterCondition(BaseModel): value: object """The value to compare against""" - operator: Literal["eq", "not_eq", "gt", "gte", "lt", "lte", "in", "not_in", "like", "not_like"] + operator: Literal["eq", "not_eq", "gt", "gte", "lt", "lte", "in", "not_in", "like", "starts_with", "not_like"] """The operator for the condition""" diff --git a/src/mixedbread/types/shared_params/search_filter_condition.py b/src/mixedbread/types/shared_params/search_filter_condition.py index f2241f70..83863974 100644 --- a/src/mixedbread/types/shared_params/search_filter_condition.py +++ b/src/mixedbread/types/shared_params/search_filter_condition.py @@ -14,5 +14,7 @@ class SearchFilterCondition(TypedDict, total=False): value: Required[object] """The value to compare against""" - operator: Required[Literal["eq", "not_eq", "gt", "gte", "lt", "lte", "in", "not_in", "like", "not_like"]] + operator: Required[ + Literal["eq", "not_eq", "gt", "gte", "lt", "lte", "in", "not_in", "like", "starts_with", "not_like"] + ] """The operator for the condition""" From 2ca508619c2308981e7c1171f9f15637c35b77d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 23:47:58 +0000 Subject: [PATCH 3/4] feat(api): update via SDK Studio --- .stats.yml | 4 +- api.md | 2 + src/mixedbread/resources/stores/files.py | 105 ++++++++++++++++++ src/mixedbread/types/stores/__init__.py | 1 + .../types/stores/file_delete_response.py | 19 ++++ tests/api_resources/stores/test_files.py | 97 ++++++++++++++++ 6 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 src/mixedbread/types/stores/file_delete_response.py diff --git a/.stats.yml b/.stats.yml index a50756d0..82ef3004 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 61 +configured_endpoints: 62 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-c53a9b02bf4bd345435a03b4178aed1b7c8ac04a2508f370b5361bf305a3f803.yml openapi_spec_hash: f05a6df876280efad08ed2f0ab78d5fc -config_hash: c56a6c9375e7640ce70ff00420e8605a +config_hash: 6fa04d08d4e1a3a45f562e37fab0ea71 diff --git a/api.md b/api.md index 76ad5259..4332059c 100644 --- a/api.md +++ b/api.md @@ -113,6 +113,7 @@ from mixedbread.types.stores import ( StoreFileStatus, StoreFile, FileListResponse, + FileDeleteResponse, FileSearchResponse, ) ``` @@ -122,6 +123,7 @@ Methods: - client.stores.files.create(store_identifier, \*\*params) -> StoreFile - client.stores.files.retrieve(file_identifier, \*, store_identifier, \*\*params) -> StoreFile - client.stores.files.list(store_identifier, \*\*params) -> FileListResponse +- client.stores.files.delete(file_identifier, \*, store_identifier) -> FileDeleteResponse - client.stores.files.search(\*\*params) -> FileSearchResponse # Parsing diff --git a/src/mixedbread/resources/stores/files.py b/src/mixedbread/resources/stores/files.py index f5530c0d..a44c12ae 100644 --- a/src/mixedbread/resources/stores/files.py +++ b/src/mixedbread/resources/stores/files.py @@ -23,6 +23,7 @@ from ...types.stores.store_file import StoreFile from ...types.stores.store_file_status import StoreFileStatus from ...types.stores.file_list_response import FileListResponse +from ...types.stores.file_delete_response import FileDeleteResponse from ...types.stores.file_search_response import FileSearchResponse __all__ = ["FilesResource", "AsyncFilesResource"] @@ -242,6 +243,52 @@ def list( cast_to=FileListResponse, ) + def delete( + self, + file_identifier: str, + *, + store_identifier: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FileDeleteResponse: + """Delete a file from a store. + + Args: store_identifier: The ID or name of the store. + + file_id: The ID or name of + the file to delete. + + Returns: VectorStoreFileDeleted: The deleted file details. + + Args: + store_identifier: The ID or name of the store + + file_identifier: The ID or name of the file to delete + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not store_identifier: + raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}") + if not file_identifier: + raise ValueError(f"Expected a non-empty value for `file_identifier` but received {file_identifier!r}") + return self._delete( + f"/v1/stores/{store_identifier}/files/{file_identifier}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileDeleteResponse, + ) + def search( self, *, @@ -681,6 +728,52 @@ async def list( cast_to=FileListResponse, ) + async def delete( + self, + file_identifier: str, + *, + store_identifier: 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FileDeleteResponse: + """Delete a file from a store. + + Args: store_identifier: The ID or name of the store. + + file_id: The ID or name of + the file to delete. + + Returns: VectorStoreFileDeleted: The deleted file details. + + Args: + store_identifier: The ID or name of the store + + file_identifier: The ID or name of the file to delete + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not store_identifier: + raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}") + if not file_identifier: + raise ValueError(f"Expected a non-empty value for `file_identifier` but received {file_identifier!r}") + return await self._delete( + f"/v1/stores/{store_identifier}/files/{file_identifier}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileDeleteResponse, + ) + async def search( self, *, @@ -919,6 +1012,9 @@ def __init__(self, files: FilesResource) -> None: self.list = to_raw_response_wrapper( files.list, ) + self.delete = to_raw_response_wrapper( + files.delete, + ) self.search = to_raw_response_wrapper( files.search, ) @@ -937,6 +1033,9 @@ def __init__(self, files: AsyncFilesResource) -> None: self.list = async_to_raw_response_wrapper( files.list, ) + self.delete = async_to_raw_response_wrapper( + files.delete, + ) self.search = async_to_raw_response_wrapper( files.search, ) @@ -955,6 +1054,9 @@ def __init__(self, files: FilesResource) -> None: self.list = to_streamed_response_wrapper( files.list, ) + self.delete = to_streamed_response_wrapper( + files.delete, + ) self.search = to_streamed_response_wrapper( files.search, ) @@ -973,6 +1075,9 @@ def __init__(self, files: AsyncFilesResource) -> None: self.list = async_to_streamed_response_wrapper( files.list, ) + self.delete = async_to_streamed_response_wrapper( + files.delete, + ) self.search = async_to_streamed_response_wrapper( files.search, ) diff --git a/src/mixedbread/types/stores/__init__.py b/src/mixedbread/types/stores/__init__.py index b20cdb89..3dee7dac 100644 --- a/src/mixedbread/types/stores/__init__.py +++ b/src/mixedbread/types/stores/__init__.py @@ -9,5 +9,6 @@ from .file_create_params import FileCreateParams as FileCreateParams from .file_list_response import FileListResponse as FileListResponse from .file_search_params import FileSearchParams as FileSearchParams +from .file_delete_response import FileDeleteResponse as FileDeleteResponse from .file_retrieve_params import FileRetrieveParams as FileRetrieveParams from .file_search_response import FileSearchResponse as FileSearchResponse diff --git a/src/mixedbread/types/stores/file_delete_response.py b/src/mixedbread/types/stores/file_delete_response.py new file mode 100644 index 00000000..ada45e9c --- /dev/null +++ b/src/mixedbread/types/stores/file_delete_response.py @@ -0,0 +1,19 @@ +# 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 + +__all__ = ["FileDeleteResponse"] + + +class FileDeleteResponse(BaseModel): + id: str + """ID of the deleted file""" + + deleted: Optional[bool] = None + """Whether the deletion was successful""" + + object: Optional[Literal["store.file"]] = None + """Type of the deleted object""" diff --git a/tests/api_resources/stores/test_files.py b/tests/api_resources/stores/test_files.py index e4f24043..97ac0e9e 100644 --- a/tests/api_resources/stores/test_files.py +++ b/tests/api_resources/stores/test_files.py @@ -12,6 +12,7 @@ from mixedbread.types.stores import ( StoreFile, FileListResponse, + FileDeleteResponse, FileSearchResponse, ) @@ -221,6 +222,54 @@ def test_path_params_list(self, client: Mixedbread) -> None: store_identifier="", ) + @parametrize + def test_method_delete(self, client: Mixedbread) -> None: + file = client.stores.files.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Mixedbread) -> None: + response = client.stores.files.with_raw_response.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file = response.parse() + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Mixedbread) -> None: + with client.stores.files.with_streaming_response.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file = response.parse() + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_delete(self, client: Mixedbread) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"): + client.stores.files.with_raw_response.delete( + file_identifier="file_identifier", + store_identifier="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_identifier` but received ''"): + client.stores.files.with_raw_response.delete( + file_identifier="", + store_identifier="store_identifier", + ) + @parametrize def test_method_search(self, client: Mixedbread) -> None: file = client.stores.files.search( @@ -518,6 +567,54 @@ async def test_path_params_list(self, async_client: AsyncMixedbread) -> None: store_identifier="", ) + @parametrize + async def test_method_delete(self, async_client: AsyncMixedbread) -> None: + file = await async_client.stores.files.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncMixedbread) -> None: + response = await async_client.stores.files.with_raw_response.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file = await response.parse() + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncMixedbread) -> None: + async with async_client.stores.files.with_streaming_response.delete( + file_identifier="file_identifier", + store_identifier="store_identifier", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file = await response.parse() + assert_matches_type(FileDeleteResponse, file, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_delete(self, async_client: AsyncMixedbread) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"): + await async_client.stores.files.with_raw_response.delete( + file_identifier="file_identifier", + store_identifier="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_identifier` but received ''"): + await async_client.stores.files.with_raw_response.delete( + file_identifier="", + store_identifier="store_identifier", + ) + @parametrize async def test_method_search(self, async_client: AsyncMixedbread) -> None: file = await async_client.stores.files.search( From 3d0a49ae762a66af823d212c628a6687ed95ce1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 23:48:16 +0000 Subject: [PATCH 4/4] release: 0.39.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ pyproject.toml | 2 +- src/mixedbread/_version.py | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8ea07c9a..1b5dc400 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.38.0" + ".": "0.39.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba2bfc7..e8f38812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.39.0 (2025-11-07) + +Full Changelog: [v0.38.0...v0.39.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.38.0...v0.39.0) + +### Features + +* **api:** api update ([ece68dd](https://github.com/mixedbread-ai/mixedbread-python/commit/ece68dd6350b58e8dac815213c918ad879c89ddd)) +* **api:** api update ([6ed00c6](https://github.com/mixedbread-ai/mixedbread-python/commit/6ed00c65da6477ba7bf453aae4a7e9f9cded6841)) +* **api:** update via SDK Studio ([2ca5086](https://github.com/mixedbread-ai/mixedbread-python/commit/2ca508619c2308981e7c1171f9f15637c35b77d4)) + ## 0.38.0 (2025-11-04) Full Changelog: [v0.37.0...v0.38.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.37.0...v0.38.0) diff --git a/pyproject.toml b/pyproject.toml index 37b16b5c..f2df0f6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.38.0" +version = "0.39.0" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index 07ad0132..d0ade071 100644 --- a/src/mixedbread/_version.py +++ b/src/mixedbread/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "mixedbread" -__version__ = "0.38.0" # x-release-please-version +__version__ = "0.39.0" # x-release-please-version