Skip to content

Commit cbc426c

Browse files
authored
Merge pull request #261 from mixedbread-ai/release-please--branches--main--changes--next
release: 0.44.0
2 parents 0373e40 + 7fcb777 commit cbc426c

File tree

10 files changed

+263
-7
lines changed

10 files changed

+263
-7
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.43.0"
2+
".": "0.44.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 62
1+
configured_endpoints: 63
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-8a9abf45fe3e0db8c9ba59803ff9ef4ce5d0bb780765d3c1a9587dde2a8d6c93.yml
33
openapi_spec_hash: 0f3af27e4fc27bcbfbb17f0a2c45c060
4-
config_hash: 6fa04d08d4e1a3a45f562e37fab0ea71
4+
config_hash: 557219db19e51f791a1727eac53d506c

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.44.0 (2025-12-17)
4+
5+
Full Changelog: [v0.43.0...v0.44.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.43.0...v0.44.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([06e7106](https://github.com/mixedbread-ai/mixedbread-python/commit/06e7106befea286d1f7e05268f08fe824aed3631))
10+
311
## 0.43.0 (2025-12-17)
412

513
Full Changelog: [v0.42.0...v0.43.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.42.0...v0.43.0)

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Methods:
122122

123123
- <code title="post /v1/stores/{store_identifier}/files">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">create</a>(store_identifier, \*\*<a href="src/mixedbread/types/stores/file_create_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
124124
- <code title="get /v1/stores/{store_identifier}/files/{file_identifier}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">retrieve</a>(file_identifier, \*, store_identifier, \*\*<a href="src/mixedbread/types/stores/file_retrieve_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
125+
- <code title="patch /v1/stores/{store_identifier}/files/{file_identifier}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">update</a>(file_identifier, \*, store_identifier, \*\*<a href="src/mixedbread/types/stores/file_update_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/store_file.py">StoreFile</a></code>
125126
- <code title="post /v1/stores/{store_identifier}/files/list">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">list</a>(store_identifier, \*\*<a href="src/mixedbread/types/stores/file_list_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_list_response.py">FileListResponse</a></code>
126127
- <code title="delete /v1/stores/{store_identifier}/files/{file_identifier}">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">delete</a>(file_identifier, \*, store_identifier) -> <a href="./src/mixedbread/types/stores/file_delete_response.py">FileDeleteResponse</a></code>
127128
- <code title="post /v1/stores/files/search">client.stores.files.<a href="./src/mixedbread/resources/stores/files.py">search</a>(\*\*<a href="src/mixedbread/types/stores/file_search_params.py">params</a>) -> <a href="./src/mixedbread/types/stores/file_search_response.py">FileSearchResponse</a></code>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mixedbread"
3-
version = "0.43.0"
3+
version = "0.44.0"
44
description = "The official Python library for the Mixedbread API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/mixedbread/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "mixedbread"
4-
__version__ = "0.43.0" # x-release-please-version
4+
__version__ = "0.44.0" # x-release-please-version

src/mixedbread/resources/stores/files.py

Lines changed: 118 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import annotations
44

55
import functools
6-
from typing import Any, List, Union, Iterable, Optional
6+
from typing import Any, Dict, List, Union, Iterable, Optional
77

88
import httpx
99

@@ -19,7 +19,13 @@
1919
async_to_streamed_response_wrapper,
2020
)
2121
from ..._base_client import make_request_options
22-
from ...types.stores import file_list_params, file_create_params, file_search_params, file_retrieve_params
22+
from ...types.stores import (
23+
file_list_params,
24+
file_create_params,
25+
file_search_params,
26+
file_update_params,
27+
file_retrieve_params,
28+
)
2329
from ...types.stores.store_file import StoreFile
2430
from ...types.stores.store_file_status import StoreFileStatus
2531
from ...types.stores.file_list_response import FileListResponse
@@ -173,6 +179,55 @@ def retrieve(
173179
cast_to=StoreFile,
174180
)
175181

182+
def update(
183+
self,
184+
file_identifier: str,
185+
*,
186+
store_identifier: str,
187+
metadata: Optional[Dict[str, object]] | Omit = omit,
188+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
189+
# The extra values given here take precedence over values defined on the client or passed to this method.
190+
extra_headers: Headers | None = None,
191+
extra_query: Query | None = None,
192+
extra_body: Body | None = None,
193+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
194+
) -> StoreFile:
195+
"""
196+
Update metadata on a file within a store.
197+
198+
Args: store_identifier: The ID or name of the store. file_identifier: The ID or
199+
name of the file to update. update_params: Metadata update payload.
200+
201+
Returns: StoreFile: The updated file details.
202+
203+
Args:
204+
store_identifier: The ID or name of the store
205+
206+
file_identifier: The ID or name of the file to update
207+
208+
metadata: Updated metadata for the file
209+
210+
extra_headers: Send extra headers
211+
212+
extra_query: Add additional query parameters to the request
213+
214+
extra_body: Add additional JSON properties to the request
215+
216+
timeout: Override the client-level default timeout for this request, in seconds
217+
"""
218+
if not store_identifier:
219+
raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}")
220+
if not file_identifier:
221+
raise ValueError(f"Expected a non-empty value for `file_identifier` but received {file_identifier!r}")
222+
return self._patch(
223+
f"/v1/stores/{store_identifier}/files/{file_identifier}",
224+
body=maybe_transform({"metadata": metadata}, file_update_params.FileUpdateParams),
225+
options=make_request_options(
226+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
227+
),
228+
cast_to=StoreFile,
229+
)
230+
176231
def list(
177232
self,
178233
store_identifier: str,
@@ -663,6 +718,55 @@ async def retrieve(
663718
cast_to=StoreFile,
664719
)
665720

721+
async def update(
722+
self,
723+
file_identifier: str,
724+
*,
725+
store_identifier: str,
726+
metadata: Optional[Dict[str, object]] | Omit = omit,
727+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
728+
# The extra values given here take precedence over values defined on the client or passed to this method.
729+
extra_headers: Headers | None = None,
730+
extra_query: Query | None = None,
731+
extra_body: Body | None = None,
732+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
733+
) -> StoreFile:
734+
"""
735+
Update metadata on a file within a store.
736+
737+
Args: store_identifier: The ID or name of the store. file_identifier: The ID or
738+
name of the file to update. update_params: Metadata update payload.
739+
740+
Returns: StoreFile: The updated file details.
741+
742+
Args:
743+
store_identifier: The ID or name of the store
744+
745+
file_identifier: The ID or name of the file to update
746+
747+
metadata: Updated metadata for the file
748+
749+
extra_headers: Send extra headers
750+
751+
extra_query: Add additional query parameters to the request
752+
753+
extra_body: Add additional JSON properties to the request
754+
755+
timeout: Override the client-level default timeout for this request, in seconds
756+
"""
757+
if not store_identifier:
758+
raise ValueError(f"Expected a non-empty value for `store_identifier` but received {store_identifier!r}")
759+
if not file_identifier:
760+
raise ValueError(f"Expected a non-empty value for `file_identifier` but received {file_identifier!r}")
761+
return await self._patch(
762+
f"/v1/stores/{store_identifier}/files/{file_identifier}",
763+
body=await async_maybe_transform({"metadata": metadata}, file_update_params.FileUpdateParams),
764+
options=make_request_options(
765+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
766+
),
767+
cast_to=StoreFile,
768+
)
769+
666770
async def list(
667771
self,
668772
store_identifier: str,
@@ -1019,6 +1123,9 @@ def __init__(self, files: FilesResource) -> None:
10191123
self.retrieve = to_raw_response_wrapper(
10201124
files.retrieve,
10211125
)
1126+
self.update = to_raw_response_wrapper(
1127+
files.update,
1128+
)
10221129
self.list = to_raw_response_wrapper(
10231130
files.list,
10241131
)
@@ -1040,6 +1147,9 @@ def __init__(self, files: AsyncFilesResource) -> None:
10401147
self.retrieve = async_to_raw_response_wrapper(
10411148
files.retrieve,
10421149
)
1150+
self.update = async_to_raw_response_wrapper(
1151+
files.update,
1152+
)
10431153
self.list = async_to_raw_response_wrapper(
10441154
files.list,
10451155
)
@@ -1061,6 +1171,9 @@ def __init__(self, files: FilesResource) -> None:
10611171
self.retrieve = to_streamed_response_wrapper(
10621172
files.retrieve,
10631173
)
1174+
self.update = to_streamed_response_wrapper(
1175+
files.update,
1176+
)
10641177
self.list = to_streamed_response_wrapper(
10651178
files.list,
10661179
)
@@ -1082,6 +1195,9 @@ def __init__(self, files: AsyncFilesResource) -> None:
10821195
self.retrieve = async_to_streamed_response_wrapper(
10831196
files.retrieve,
10841197
)
1198+
self.update = async_to_streamed_response_wrapper(
1199+
files.update,
1200+
)
10851201
self.list = async_to_streamed_response_wrapper(
10861202
files.list,
10871203
)

src/mixedbread/types/stores/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .file_create_params import FileCreateParams as FileCreateParams
1010
from .file_list_response import FileListResponse as FileListResponse
1111
from .file_search_params import FileSearchParams as FileSearchParams
12+
from .file_update_params import FileUpdateParams as FileUpdateParams
1213
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
1314
from .file_retrieve_params import FileRetrieveParams as FileRetrieveParams
1415
from .file_search_response import FileSearchResponse as FileSearchResponse
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Dict, Optional
6+
from typing_extensions import Required, TypedDict
7+
8+
__all__ = ["FileUpdateParams"]
9+
10+
11+
class FileUpdateParams(TypedDict, total=False):
12+
store_identifier: Required[str]
13+
"""The ID or name of the store"""
14+
15+
metadata: Optional[Dict[str, object]]
16+
"""Updated metadata for the file"""

tests/api_resources/stores/test_files.py

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,63 @@ def test_path_params_retrieve(self, client: Mixedbread) -> None:
134134
store_identifier="store_identifier",
135135
)
136136

137+
@parametrize
138+
def test_method_update(self, client: Mixedbread) -> None:
139+
file = client.stores.files.update(
140+
file_identifier="file_identifier",
141+
store_identifier="store_identifier",
142+
)
143+
assert_matches_type(StoreFile, file, path=["response"])
144+
145+
@parametrize
146+
def test_method_update_with_all_params(self, client: Mixedbread) -> None:
147+
file = client.stores.files.update(
148+
file_identifier="file_identifier",
149+
store_identifier="store_identifier",
150+
metadata={"foo": "bar"},
151+
)
152+
assert_matches_type(StoreFile, file, path=["response"])
153+
154+
@parametrize
155+
def test_raw_response_update(self, client: Mixedbread) -> None:
156+
response = client.stores.files.with_raw_response.update(
157+
file_identifier="file_identifier",
158+
store_identifier="store_identifier",
159+
)
160+
161+
assert response.is_closed is True
162+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
163+
file = response.parse()
164+
assert_matches_type(StoreFile, file, path=["response"])
165+
166+
@parametrize
167+
def test_streaming_response_update(self, client: Mixedbread) -> None:
168+
with client.stores.files.with_streaming_response.update(
169+
file_identifier="file_identifier",
170+
store_identifier="store_identifier",
171+
) as response:
172+
assert not response.is_closed
173+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
174+
175+
file = response.parse()
176+
assert_matches_type(StoreFile, file, path=["response"])
177+
178+
assert cast(Any, response.is_closed) is True
179+
180+
@parametrize
181+
def test_path_params_update(self, client: Mixedbread) -> None:
182+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"):
183+
client.stores.files.with_raw_response.update(
184+
file_identifier="file_identifier",
185+
store_identifier="",
186+
)
187+
188+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_identifier` but received ''"):
189+
client.stores.files.with_raw_response.update(
190+
file_identifier="",
191+
store_identifier="store_identifier",
192+
)
193+
137194
@parametrize
138195
def test_method_list(self, client: Mixedbread) -> None:
139196
file = client.stores.files.list(
@@ -414,6 +471,63 @@ async def test_path_params_retrieve(self, async_client: AsyncMixedbread) -> None
414471
store_identifier="store_identifier",
415472
)
416473

474+
@parametrize
475+
async def test_method_update(self, async_client: AsyncMixedbread) -> None:
476+
file = await async_client.stores.files.update(
477+
file_identifier="file_identifier",
478+
store_identifier="store_identifier",
479+
)
480+
assert_matches_type(StoreFile, file, path=["response"])
481+
482+
@parametrize
483+
async def test_method_update_with_all_params(self, async_client: AsyncMixedbread) -> None:
484+
file = await async_client.stores.files.update(
485+
file_identifier="file_identifier",
486+
store_identifier="store_identifier",
487+
metadata={"foo": "bar"},
488+
)
489+
assert_matches_type(StoreFile, file, path=["response"])
490+
491+
@parametrize
492+
async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
493+
response = await async_client.stores.files.with_raw_response.update(
494+
file_identifier="file_identifier",
495+
store_identifier="store_identifier",
496+
)
497+
498+
assert response.is_closed is True
499+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
500+
file = await response.parse()
501+
assert_matches_type(StoreFile, file, path=["response"])
502+
503+
@parametrize
504+
async def test_streaming_response_update(self, async_client: AsyncMixedbread) -> None:
505+
async with async_client.stores.files.with_streaming_response.update(
506+
file_identifier="file_identifier",
507+
store_identifier="store_identifier",
508+
) as response:
509+
assert not response.is_closed
510+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
511+
512+
file = await response.parse()
513+
assert_matches_type(StoreFile, file, path=["response"])
514+
515+
assert cast(Any, response.is_closed) is True
516+
517+
@parametrize
518+
async def test_path_params_update(self, async_client: AsyncMixedbread) -> None:
519+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `store_identifier` but received ''"):
520+
await async_client.stores.files.with_raw_response.update(
521+
file_identifier="file_identifier",
522+
store_identifier="",
523+
)
524+
525+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_identifier` but received ''"):
526+
await async_client.stores.files.with_raw_response.update(
527+
file_identifier="",
528+
store_identifier="store_identifier",
529+
)
530+
417531
@parametrize
418532
async def test_method_list(self, async_client: AsyncMixedbread) -> None:
419533
file = await async_client.stores.files.list(

0 commit comments

Comments
 (0)