@mixedbread/sdk 0.70.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -158,6 +158,41 @@ export class Stores extends APIResource {
158
158
  return this._client.post('/v1/stores/grep', { body, ...options });
159
159
  }
160
160
 
161
+ /**
162
+ * List store chunks purely by metadata filters — no embeddings, no semantic
163
+ * similarity, no reranking.
164
+ *
165
+ * Unlike `/stores/search`, this endpoint does not require a query and never runs a
166
+ * vector lookup. It returns chunks whose file and chunk metadata satisfy
167
+ * `filters`, optionally ordered by a numeric metadata field via `sort_by`. Useful
168
+ * for ranked retrieval over numeric attributes (e.g. price, BPM) and for
169
+ * reproducing the agentic `filter_chunks` tool externally.
170
+ *
171
+ * list-chunks targets a single store and does not support pagination; raise
172
+ * `top_k` to retrieve more chunks.
173
+ *
174
+ * Args: filter_params: Filter configuration including: - store_identifiers: the
175
+ * single store to filter against - filters: optional metadata filter conditions -
176
+ * file_ids: optional list of file IDs to filter chunks by - sort_by: optional
177
+ * metadata field path, or `(field, ascending)` tuple, for numeric ordering -
178
+ * top_k: number of chunks to return
179
+ *
180
+ * Returns: StoreListChunksResponse containing the list of matching chunks.
181
+ *
182
+ * Raises: HTTPException (400): If filter parameters are invalid or multiple stores
183
+ * are passed HTTPException (404): If the store is not found
184
+ *
185
+ * @example
186
+ * ```ts
187
+ * const response = await client.stores.listChunks({
188
+ * store_identifiers: ['string'],
189
+ * });
190
+ * ```
191
+ */
192
+ listChunks(body: StoreListChunksParams, options?: RequestOptions): APIPromise<StoreListChunksResponse> {
193
+ return this._client.post('/v1/stores/list-chunks', { body, ...options });
194
+ }
195
+
161
196
  /**
162
197
  * Get metadata facets
163
198
  *
@@ -1051,6 +1086,20 @@ export interface StoreGrepResponse {
1051
1086
  >;
1052
1087
  }
1053
1088
 
1089
+ export interface StoreListChunksResponse {
1090
+ /**
1091
+ * The object type of the response
1092
+ */
1093
+ object?: 'list';
1094
+
1095
+ /**
1096
+ * The list of chunks matching the metadata filters
1097
+ */
1098
+ data: Array<
1099
+ ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
1100
+ >;
1101
+ }
1102
+
1054
1103
  /**
1055
1104
  * Represents metadata facets for a store.
1056
1105
  */
@@ -1267,6 +1316,86 @@ export namespace StoreGrepParams {
1267
1316
  }
1268
1317
  }
1269
1318
 
1319
+ export interface StoreListChunksParams {
1320
+ /**
1321
+ * IDs or names of stores
1322
+ */
1323
+ store_identifiers: Array<string>;
1324
+
1325
+ /**
1326
+ * Number of results to return
1327
+ */
1328
+ top_k?: number;
1329
+
1330
+ /**
1331
+ * Optional filter conditions
1332
+ */
1333
+ filters?:
1334
+ | StoreListChunksParams.SearchFilterInput
1335
+ | Shared.SearchFilterCondition
1336
+ | Array<StoreListChunksParams.SearchFilterInput | Shared.SearchFilterCondition>
1337
+ | null;
1338
+
1339
+ /**
1340
+ * Optional list of file IDs to filter chunks by (inclusion filter)
1341
+ */
1342
+ file_ids?: Array<unknown> | Array<string> | null;
1343
+
1344
+ /**
1345
+ * Optional sort applied to the returned chunks. Pass a metadata field path or a
1346
+ * tuple of (field path, ascending). Unprefixed dot paths target file metadata;
1347
+ * generated_metadata.\* targets chunk metadata.
1348
+ */
1349
+ sort_by?: string | Array<unknown> | null;
1350
+
1351
+ /**
1352
+ * Search configuration options
1353
+ */
1354
+ search_options?: StoreChunkSearchOptions;
1355
+ }
1356
+
1357
+ export namespace StoreListChunksParams {
1358
+ /**
1359
+ * Represents a filter with AND, OR, and NOT conditions.
1360
+ */
1361
+ export interface SearchFilterInput {
1362
+ /**
1363
+ * List of conditions or filters to be ANDed together
1364
+ */
1365
+ all?: Array<unknown | Shared.SearchFilterCondition> | null;
1366
+
1367
+ /**
1368
+ * List of conditions or filters to be ORed together
1369
+ */
1370
+ any?: Array<unknown | Shared.SearchFilterCondition> | null;
1371
+
1372
+ /**
1373
+ * List of conditions or filters to be NOTed
1374
+ */
1375
+ none?: Array<unknown | Shared.SearchFilterCondition> | null;
1376
+ }
1377
+
1378
+ /**
1379
+ * Represents a filter with AND, OR, and NOT conditions.
1380
+ */
1381
+ export interface SearchFilterInput {
1382
+ /**
1383
+ * List of conditions or filters to be ANDed together
1384
+ */
1385
+ all?: Array<unknown | Shared.SearchFilterCondition> | null;
1386
+
1387
+ /**
1388
+ * List of conditions or filters to be ORed together
1389
+ */
1390
+ any?: Array<unknown | Shared.SearchFilterCondition> | null;
1391
+
1392
+ /**
1393
+ * List of conditions or filters to be NOTed
1394
+ */
1395
+ none?: Array<unknown | Shared.SearchFilterCondition> | null;
1396
+ }
1397
+ }
1398
+
1270
1399
  export interface StoreMetadataFacetsParams {
1271
1400
  /**
1272
1401
  * IDs or names of stores
@@ -1582,6 +1711,7 @@ export declare namespace Stores {
1582
1711
  type VideoURL as VideoURL,
1583
1712
  type StoreDeleteResponse as StoreDeleteResponse,
1584
1713
  type StoreGrepResponse as StoreGrepResponse,
1714
+ type StoreListChunksResponse as StoreListChunksResponse,
1585
1715
  type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse,
1586
1716
  type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse,
1587
1717
  type StoreSearchResponse as StoreSearchResponse,
@@ -1590,6 +1720,7 @@ export declare namespace Stores {
1590
1720
  type StoreUpdateParams as StoreUpdateParams,
1591
1721
  type StoreListParams as StoreListParams,
1592
1722
  type StoreGrepParams as StoreGrepParams,
1723
+ type StoreListChunksParams as StoreListChunksParams,
1593
1724
  type StoreMetadataFacetsParams as StoreMetadataFacetsParams,
1594
1725
  type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams,
1595
1726
  type StoreSearchParams as StoreSearchParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.70.0'; // x-release-please-version
1
+ export const VERSION = '0.71.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.70.0";
1
+ export declare const VERSION = "0.71.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.70.0";
1
+ export declare const VERSION = "0.71.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.70.0'; // x-release-please-version
4
+ exports.VERSION = '0.71.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.70.0'; // x-release-please-version
1
+ export const VERSION = '0.71.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map