Skip to content

Commit 00a56ff

Browse files
feat(api): api update
1 parent c637103 commit 00a56ff

25 files changed

Lines changed: 542 additions & 183 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 49
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-7361ed078e7c394c7cb1da4a3e2f3417d4498de5eea648cf9d3caaa0ddf85f78.yml
3-
openapi_spec_hash: 4ae67ffa9040c2d5a87026df79c1feaf
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-fe968780e87b8a5ff65ea009ade00fb0e27e951f7ce16d39a2ae0957740add45.yml
3+
openapi_spec_hash: 9a29ae1bb05df2061e321b0d1adef675
44
config_hash: 6098ac28bc4ec5be0c546035a5d81394

src/mixedbread/resources/data_sources/connectors.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ def list(
237237
data_source_id: str,
238238
*,
239239
limit: int | NotGiven = NOT_GIVEN,
240-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
240+
after: Optional[str] | NotGiven = NOT_GIVEN,
241+
before: Optional[str] | NotGiven = NOT_GIVEN,
241242
include_total: bool | NotGiven = NOT_GIVEN,
242243
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243244
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -257,11 +258,15 @@ def list(
257258
Args:
258259
data_source_id: The ID of the data source to get connectors for
259260
260-
limit: Maximum number of items to return per page
261+
limit: Maximum number of items to return per page (1-100)
261262
262-
cursor: Cursor for pagination (base64 encoded cursor)
263+
after: Cursor for forward pagination - get items after this position. Use last_cursor
264+
from previous response.
263265
264-
include_total: Whether to include the total number of items
266+
before: Cursor for backward pagination - get items before this position. Use
267+
first_cursor from previous response.
268+
269+
include_total: Whether to include total count in response (expensive operation)
265270
266271
extra_headers: Send extra headers
267272
@@ -283,7 +288,8 @@ def list(
283288
query=maybe_transform(
284289
{
285290
"limit": limit,
286-
"cursor": cursor,
291+
"after": after,
292+
"before": before,
287293
"include_total": include_total,
288294
},
289295
connector_list_params.ConnectorListParams,
@@ -550,7 +556,8 @@ async def list(
550556
data_source_id: str,
551557
*,
552558
limit: int | NotGiven = NOT_GIVEN,
553-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
559+
after: Optional[str] | NotGiven = NOT_GIVEN,
560+
before: Optional[str] | NotGiven = NOT_GIVEN,
554561
include_total: bool | NotGiven = NOT_GIVEN,
555562
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
556563
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -570,11 +577,15 @@ async def list(
570577
Args:
571578
data_source_id: The ID of the data source to get connectors for
572579
573-
limit: Maximum number of items to return per page
580+
limit: Maximum number of items to return per page (1-100)
581+
582+
after: Cursor for forward pagination - get items after this position. Use last_cursor
583+
from previous response.
574584
575-
cursor: Cursor for pagination (base64 encoded cursor)
585+
before: Cursor for backward pagination - get items before this position. Use
586+
first_cursor from previous response.
576587
577-
include_total: Whether to include the total number of items
588+
include_total: Whether to include total count in response (expensive operation)
578589
579590
extra_headers: Send extra headers
580591
@@ -596,7 +607,8 @@ async def list(
596607
query=await async_maybe_transform(
597608
{
598609
"limit": limit,
599-
"cursor": cursor,
610+
"after": after,
611+
"before": before,
600612
"include_total": include_total,
601613
},
602614
connector_list_params.ConnectorListParams,

src/mixedbread/resources/data_sources/data_sources.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ def list(
356356
self,
357357
*,
358358
limit: int | NotGiven = NOT_GIVEN,
359-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
359+
after: Optional[str] | NotGiven = NOT_GIVEN,
360+
before: Optional[str] | NotGiven = NOT_GIVEN,
360361
include_total: bool | NotGiven = NOT_GIVEN,
361362
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
362363
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -371,11 +372,15 @@ def list(
371372
Returns: The list of data sources.
372373
373374
Args:
374-
limit: Maximum number of items to return per page
375+
limit: Maximum number of items to return per page (1-100)
375376
376-
cursor: Cursor for pagination (base64 encoded cursor)
377+
after: Cursor for forward pagination - get items after this position. Use last_cursor
378+
from previous response.
377379
378-
include_total: Whether to include the total number of items
380+
before: Cursor for backward pagination - get items before this position. Use
381+
first_cursor from previous response.
382+
383+
include_total: Whether to include total count in response (expensive operation)
379384
380385
extra_headers: Send extra headers
381386
@@ -395,7 +400,8 @@ def list(
395400
query=maybe_transform(
396401
{
397402
"limit": limit,
398-
"cursor": cursor,
403+
"after": after,
404+
"before": before,
399405
"include_total": include_total,
400406
},
401407
data_source_list_params.DataSourceListParams,
@@ -756,7 +762,8 @@ async def list(
756762
self,
757763
*,
758764
limit: int | NotGiven = NOT_GIVEN,
759-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
765+
after: Optional[str] | NotGiven = NOT_GIVEN,
766+
before: Optional[str] | NotGiven = NOT_GIVEN,
760767
include_total: bool | NotGiven = NOT_GIVEN,
761768
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
762769
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -771,11 +778,15 @@ async def list(
771778
Returns: The list of data sources.
772779
773780
Args:
774-
limit: Maximum number of items to return per page
781+
limit: Maximum number of items to return per page (1-100)
782+
783+
after: Cursor for forward pagination - get items after this position. Use last_cursor
784+
from previous response.
775785
776-
cursor: Cursor for pagination (base64 encoded cursor)
786+
before: Cursor for backward pagination - get items before this position. Use
787+
first_cursor from previous response.
777788
778-
include_total: Whether to include the total number of items
789+
include_total: Whether to include total count in response (expensive operation)
779790
780791
extra_headers: Send extra headers
781792
@@ -795,7 +806,8 @@ async def list(
795806
query=await async_maybe_transform(
796807
{
797808
"limit": limit,
798-
"cursor": cursor,
809+
"after": after,
810+
"before": before,
799811
"include_total": include_total,
800812
},
801813
data_source_list_params.DataSourceListParams,

src/mixedbread/resources/files.py

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ def list(
191191
self,
192192
*,
193193
limit: int | NotGiven = NOT_GIVEN,
194-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
194+
after: Optional[str] | NotGiven = NOT_GIVEN,
195+
before: Optional[str] | NotGiven = NOT_GIVEN,
195196
include_total: bool | NotGiven = NOT_GIVEN,
197+
q: Optional[str] | NotGiven = NOT_GIVEN,
196198
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
197199
# The extra values given here take precedence over values defined on the client or passed to this method.
198200
extra_headers: Headers | None = None,
@@ -208,11 +210,17 @@ def list(
208210
Returns: A list of files belonging to the user.
209211
210212
Args:
211-
limit: Maximum number of items to return per page
213+
limit: Maximum number of items to return per page (1-100)
212214
213-
cursor: Cursor for pagination (base64 encoded cursor)
215+
after: Cursor for forward pagination - get items after this position. Use last_cursor
216+
from previous response.
214217
215-
include_total: Whether to include the total number of items
218+
before: Cursor for backward pagination - get items before this position. Use
219+
first_cursor from previous response.
220+
221+
include_total: Whether to include total count in response (expensive operation)
222+
223+
q: Search query for fuzzy matching over name and description fields
216224
217225
extra_headers: Send extra headers
218226
@@ -232,8 +240,10 @@ def list(
232240
query=maybe_transform(
233241
{
234242
"limit": limit,
235-
"cursor": cursor,
243+
"after": after,
244+
"before": before,
236245
"include_total": include_total,
246+
"q": q,
237247
},
238248
file_list_params.FileListParams,
239249
),
@@ -479,8 +489,10 @@ async def list(
479489
self,
480490
*,
481491
limit: int | NotGiven = NOT_GIVEN,
482-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
492+
after: Optional[str] | NotGiven = NOT_GIVEN,
493+
before: Optional[str] | NotGiven = NOT_GIVEN,
483494
include_total: bool | NotGiven = NOT_GIVEN,
495+
q: Optional[str] | NotGiven = NOT_GIVEN,
484496
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
485497
# The extra values given here take precedence over values defined on the client or passed to this method.
486498
extra_headers: Headers | None = None,
@@ -496,11 +508,17 @@ async def list(
496508
Returns: A list of files belonging to the user.
497509
498510
Args:
499-
limit: Maximum number of items to return per page
511+
limit: Maximum number of items to return per page (1-100)
512+
513+
after: Cursor for forward pagination - get items after this position. Use last_cursor
514+
from previous response.
515+
516+
before: Cursor for backward pagination - get items before this position. Use
517+
first_cursor from previous response.
500518
501-
cursor: Cursor for pagination (base64 encoded cursor)
519+
include_total: Whether to include total count in response (expensive operation)
502520
503-
include_total: Whether to include the total number of items
521+
q: Search query for fuzzy matching over name and description fields
504522
505523
extra_headers: Send extra headers
506524
@@ -520,8 +538,10 @@ async def list(
520538
query=await async_maybe_transform(
521539
{
522540
"limit": limit,
523-
"cursor": cursor,
541+
"after": after,
542+
"before": before,
524543
"include_total": include_total,
544+
"q": q,
525545
},
526546
file_list_params.FileListParams,
527547
),

src/mixedbread/resources/parsing/jobs.py

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from ...types.parsing.return_format import ReturnFormat
2727
from ...types.parsing.chunking_strategy import ChunkingStrategy
2828
from ...types.parsing.job_list_response import JobListResponse
29+
from ...types.parsing.parsing_job_status import ParsingJobStatus
2930
from ...types.parsing.job_delete_response import JobDeleteResponse
3031

3132
__all__ = ["JobsResource", "AsyncJobsResource"]
@@ -153,8 +154,10 @@ def list(
153154
self,
154155
*,
155156
limit: int | NotGiven = NOT_GIVEN,
156-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
157+
after: Optional[str] | NotGiven = NOT_GIVEN,
158+
before: Optional[str] | NotGiven = NOT_GIVEN,
157159
include_total: bool | NotGiven = NOT_GIVEN,
160+
statuses: Optional[List[ParsingJobStatus]] | NotGiven = NOT_GIVEN,
158161
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159162
# The extra values given here take precedence over values defined on the client or passed to this method.
160163
extra_headers: Headers | None = None,
@@ -171,11 +174,17 @@ def list(
171174
Returns: List of parsing jobs with pagination.
172175
173176
Args:
174-
limit: Maximum number of items to return per page
177+
limit: Maximum number of items to return per page (1-100)
175178
176-
cursor: Cursor for pagination (base64 encoded cursor)
179+
after: Cursor for forward pagination - get items after this position. Use last_cursor
180+
from previous response.
177181
178-
include_total: Whether to include the total number of items
182+
before: Cursor for backward pagination - get items before this position. Use
183+
first_cursor from previous response.
184+
185+
include_total: Whether to include total count in response (expensive operation)
186+
187+
statuses: Status to filter by
179188
180189
extra_headers: Send extra headers
181190
@@ -195,8 +204,10 @@ def list(
195204
query=maybe_transform(
196205
{
197206
"limit": limit,
198-
"cursor": cursor,
207+
"after": after,
208+
"before": before,
199209
"include_total": include_total,
210+
"statuses": statuses,
200211
},
201212
job_list_params.JobListParams,
202213
),
@@ -562,8 +573,10 @@ async def list(
562573
self,
563574
*,
564575
limit: int | NotGiven = NOT_GIVEN,
565-
cursor: Optional[str] | NotGiven = NOT_GIVEN,
576+
after: Optional[str] | NotGiven = NOT_GIVEN,
577+
before: Optional[str] | NotGiven = NOT_GIVEN,
566578
include_total: bool | NotGiven = NOT_GIVEN,
579+
statuses: Optional[List[ParsingJobStatus]] | NotGiven = NOT_GIVEN,
567580
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
568581
# The extra values given here take precedence over values defined on the client or passed to this method.
569582
extra_headers: Headers | None = None,
@@ -580,11 +593,17 @@ async def list(
580593
Returns: List of parsing jobs with pagination.
581594
582595
Args:
583-
limit: Maximum number of items to return per page
596+
limit: Maximum number of items to return per page (1-100)
597+
598+
after: Cursor for forward pagination - get items after this position. Use last_cursor
599+
from previous response.
600+
601+
before: Cursor for backward pagination - get items before this position. Use
602+
first_cursor from previous response.
584603
585-
cursor: Cursor for pagination (base64 encoded cursor)
604+
include_total: Whether to include total count in response (expensive operation)
586605
587-
include_total: Whether to include the total number of items
606+
statuses: Status to filter by
588607
589608
extra_headers: Send extra headers
590609
@@ -604,8 +623,10 @@ async def list(
604623
query=await async_maybe_transform(
605624
{
606625
"limit": limit,
607-
"cursor": cursor,
626+
"after": after,
627+
"before": before,
608628
"include_total": include_total,
629+
"statuses": statuses,
609630
},
610631
job_list_params.JobListParams,
611632
),

0 commit comments

Comments
 (0)