@mixedbread/sdk 0.29.0 → 0.31.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +18 -18
  3. package/bin/cli +4 -10
  4. package/bin/migration-config.json +70 -0
  5. package/client.d.mts +3 -0
  6. package/client.d.mts.map +1 -1
  7. package/client.d.ts +3 -0
  8. package/client.d.ts.map +1 -1
  9. package/client.js +3 -0
  10. package/client.js.map +1 -1
  11. package/client.mjs +3 -0
  12. package/client.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/data-sources/connectors.d.mts +4 -4
  15. package/resources/data-sources/connectors.d.mts.map +1 -1
  16. package/resources/data-sources/connectors.d.ts +4 -4
  17. package/resources/data-sources/connectors.d.ts.map +1 -1
  18. package/resources/index.d.mts +1 -0
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +1 -0
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js +3 -1
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs +1 -0
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/stores/files.d.mts +547 -0
  27. package/resources/stores/files.d.mts.map +1 -0
  28. package/resources/stores/files.d.ts +547 -0
  29. package/resources/stores/files.d.ts.map +1 -0
  30. package/resources/stores/files.js +68 -0
  31. package/resources/stores/files.js.map +1 -0
  32. package/resources/stores/files.mjs +64 -0
  33. package/resources/stores/files.mjs.map +1 -0
  34. package/resources/stores/index.d.mts +3 -0
  35. package/resources/stores/index.d.mts.map +1 -0
  36. package/resources/stores/index.d.ts +3 -0
  37. package/resources/stores/index.d.ts.map +1 -0
  38. package/resources/stores/index.js +9 -0
  39. package/resources/stores/index.js.map +1 -0
  40. package/resources/stores/index.mjs +4 -0
  41. package/resources/stores/index.mjs.map +1 -0
  42. package/resources/stores/stores.d.mts +372 -0
  43. package/resources/stores/stores.d.mts.map +1 -0
  44. package/resources/stores/stores.d.ts +372 -0
  45. package/resources/stores/stores.d.ts.map +1 -0
  46. package/resources/stores/stores.js +100 -0
  47. package/resources/stores/stores.js.map +1 -0
  48. package/resources/stores/stores.mjs +95 -0
  49. package/resources/stores/stores.mjs.map +1 -0
  50. package/resources/stores.d.mts +2 -0
  51. package/resources/stores.d.mts.map +1 -0
  52. package/resources/stores.d.ts +2 -0
  53. package/resources/stores.d.ts.map +1 -0
  54. package/resources/stores.js +6 -0
  55. package/resources/stores.js.map +1 -0
  56. package/resources/stores.mjs +3 -0
  57. package/resources/stores.mjs.map +1 -0
  58. package/resources/vector-stores/files.d.mts +316 -266
  59. package/resources/vector-stores/files.d.mts.map +1 -1
  60. package/resources/vector-stores/files.d.ts +316 -266
  61. package/resources/vector-stores/files.d.ts.map +1 -1
  62. package/resources/vector-stores/files.js +10 -35
  63. package/resources/vector-stores/files.js.map +1 -1
  64. package/resources/vector-stores/files.mjs +10 -35
  65. package/resources/vector-stores/files.mjs.map +1 -1
  66. package/resources/vector-stores/vector-stores.d.mts +593 -275
  67. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  68. package/resources/vector-stores/vector-stores.d.ts +593 -275
  69. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  70. package/resources/vector-stores/vector-stores.js +15 -41
  71. package/resources/vector-stores/vector-stores.js.map +1 -1
  72. package/resources/vector-stores/vector-stores.mjs +15 -41
  73. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  74. package/src/client.ts +31 -0
  75. package/src/resources/data-sources/connectors.ts +4 -4
  76. package/src/resources/index.ts +14 -0
  77. package/src/resources/stores/files.ts +692 -0
  78. package/src/resources/stores/index.ts +30 -0
  79. package/src/resources/stores/stores.ts +523 -0
  80. package/src/resources/stores.ts +3 -0
  81. package/src/resources/vector-stores/files.ts +359 -441
  82. package/src/resources/vector-stores/vector-stores.ts +693 -453
  83. package/src/version.ts +1 -1
  84. package/version.d.mts +1 -1
  85. package/version.d.ts +1 -1
  86. package/version.js +1 -1
  87. package/version.mjs +1 -1
@@ -1,64 +1,39 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
- import * as FilesAPI from "./files.mjs";
2
+ import * as VectorStoresFilesAPI from "./files.mjs";
3
3
  import * as Shared from "../shared.mjs";
4
- import * as VectorStoresAPI from "./vector-stores.mjs";
4
+ import * as FilesAPI from "../stores/files.mjs";
5
5
  import { APIPromise } from "../../core/api-promise.mjs";
6
6
  import { RequestOptions } from "../../internal/request-options.mjs";
7
7
  import { Uploadable } from "../../uploads.mjs";
8
8
  export declare class Files extends APIResource {
9
9
  /**
10
- * Add an already uploaded file to a vector store.
10
+ * DEPRECATED: Use POST /stores/{store_identifier}/files instead
11
11
  *
12
- * Args: vector_store_identifier: The ID or name of the vector store to add the
13
- * file to file: The file to add and index
14
- *
15
- * Returns: VectorStoreFile: Details of the added and indexed file
12
+ * @deprecated Use post stores.files instead
16
13
  */
17
14
  create(vectorStoreIdentifier: string, body: FileCreateParams, options?: RequestOptions): APIPromise<VectorStoreFile>;
18
15
  /**
19
- * Get details of a specific file in a vector store.
20
- *
21
- * Args: vector_store_identifier: The ID or name of the vector store file_id: The
22
- * ID of the file
16
+ * DEPRECATED: Use GET /stores/{store_identifier}/files/{file_id} instead
23
17
  *
24
- * Returns: VectorStoreFile: Details of the vector store file
18
+ * @deprecated Use stores.files instead
25
19
  */
26
20
  retrieve(fileID: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<VectorStoreFile>;
27
21
  /**
28
- * List files indexed in a vector store with pagination and metadata filter.
22
+ * DEPRECATED: Use POST /stores/{store_identifier}/files/list instead
29
23
  *
30
- * Args: vector_store_identifier: The ID or name of the vector store pagination:
31
- * Pagination parameters and metadata filter
32
- *
33
- * Returns: VectorStoreFileListResponse: Paginated list of vector store files
24
+ * @deprecated Use post stores.files.list instead
34
25
  */
35
26
  list(vectorStoreIdentifier: string, body: FileListParams, options?: RequestOptions): APIPromise<FileListResponse>;
36
27
  /**
37
- * Delete a file from a vector store.
38
- *
39
- * Args: vector_store_identifier: The ID or name of the vector store file_id: The
40
- * ID of the file to delete
28
+ * DEPRECATED: Use DELETE /stores/{store_identifier}/files/{file_id} instead
41
29
  *
42
- * Returns: VectorStoreFileDeleted: The deleted file
30
+ * @deprecated Use stores.files instead
43
31
  */
44
32
  delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse>;
45
33
  /**
46
- * Perform semantic search across complete vector store files.
34
+ * DEPRECATED: Use POST /stores/{store_identifier}/files/search instead
47
35
  *
48
- * This endpoint searches through vector store files using semantic similarity
49
- * matching. Unlike chunk search, it returns complete matching files rather than
50
- * individual chunks. Supports complex search queries with filters and returns
51
- * relevance-scored results.
52
- *
53
- * Args: search_params: Search configuration including: - query text or
54
- * embeddings - metadata filters - pagination parameters - sorting preferences
55
- * \_state: API state dependency \_ctx: Service context dependency
56
- *
57
- * Returns: VectorStoreSearchFileResponse containing: - List of matched files with
58
- * relevance scores - Pagination details including total result count
59
- *
60
- * Raises: HTTPException (400): If search parameters are invalid HTTPException
61
- * (404): If no vector stores are found to search
36
+ * @deprecated Use stores.files.search instead
62
37
  */
63
38
  search(body: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse>;
64
39
  /**
@@ -126,7 +101,7 @@ export interface RerankConfig {
126
101
  top_k?: number | null;
127
102
  }
128
103
  /**
129
- * Represents a scored file stored in a vector store.
104
+ * Represents a scored store file.
130
105
  */
131
106
  export interface ScoredVectorStoreFile {
132
107
  /**
@@ -144,17 +119,17 @@ export interface ScoredVectorStoreFile {
144
119
  /**
145
120
  * Processing status of the file
146
121
  */
147
- status?: VectorStoreFileStatus;
122
+ status?: FilesAPI.StoreFileStatus;
148
123
  /**
149
124
  * Last error message if processing failed
150
125
  */
151
126
  last_error?: unknown;
152
127
  /**
153
- * ID of the containing vector store
128
+ * ID of the containing store
154
129
  */
155
130
  vector_store_id: string;
156
131
  /**
157
- * Timestamp of vector store file creation
132
+ * Timestamp of store file creation
158
133
  */
159
134
  created_at: string;
160
135
  /**
@@ -172,15 +147,290 @@ export interface ScoredVectorStoreFile {
172
147
  /**
173
148
  * Array of scored file chunks
174
149
  */
175
- chunks: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk> | null;
150
+ chunks: Array<ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk> | null;
176
151
  /**
177
152
  * score of the file
178
153
  */
179
154
  score: number;
180
155
  }
156
+ export declare namespace ScoredVectorStoreFile {
157
+ /**
158
+ * Scored text chunk for deprecated API.
159
+ */
160
+ interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
161
+ /**
162
+ * position of the chunk in a file
163
+ */
164
+ chunk_index: number;
165
+ /**
166
+ * mime type of the chunk
167
+ */
168
+ mime_type?: string;
169
+ /**
170
+ * metadata of the chunk
171
+ */
172
+ generated_metadata?: {
173
+ [key: string]: unknown;
174
+ } | null;
175
+ /**
176
+ * model used for this chunk
177
+ */
178
+ model?: string | null;
179
+ /**
180
+ * score of the chunk
181
+ */
182
+ score: number;
183
+ /**
184
+ * file id
185
+ */
186
+ file_id: string;
187
+ /**
188
+ * filename
189
+ */
190
+ filename: string;
191
+ /**
192
+ * store id
193
+ */
194
+ vector_store_id: string;
195
+ /**
196
+ * file metadata
197
+ */
198
+ metadata?: unknown;
199
+ /**
200
+ * Input type identifier
201
+ */
202
+ type?: 'text';
203
+ /**
204
+ * The offset of the text in the file relative to the start of the file.
205
+ */
206
+ offset?: number;
207
+ /**
208
+ * Text content to process
209
+ */
210
+ text: string;
211
+ }
212
+ /**
213
+ * Scored image chunk for deprecated API.
214
+ */
215
+ interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
216
+ /**
217
+ * position of the chunk in a file
218
+ */
219
+ chunk_index: number;
220
+ /**
221
+ * mime type of the chunk
222
+ */
223
+ mime_type?: string;
224
+ /**
225
+ * metadata of the chunk
226
+ */
227
+ generated_metadata?: {
228
+ [key: string]: unknown;
229
+ } | null;
230
+ /**
231
+ * model used for this chunk
232
+ */
233
+ model?: string | null;
234
+ /**
235
+ * score of the chunk
236
+ */
237
+ score: number;
238
+ /**
239
+ * file id
240
+ */
241
+ file_id: string;
242
+ /**
243
+ * filename
244
+ */
245
+ filename: string;
246
+ /**
247
+ * store id
248
+ */
249
+ vector_store_id: string;
250
+ /**
251
+ * file metadata
252
+ */
253
+ metadata?: unknown;
254
+ /**
255
+ * Input type identifier
256
+ */
257
+ type?: 'image_url';
258
+ /**
259
+ * ocr text of the image
260
+ */
261
+ ocr_text?: string | null;
262
+ /**
263
+ * summary of the image
264
+ */
265
+ summary?: string | null;
266
+ /**
267
+ * The image input specification.
268
+ */
269
+ image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
270
+ }
271
+ namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
272
+ /**
273
+ * The image input specification.
274
+ */
275
+ interface ImageURL {
276
+ /**
277
+ * The image URL. Can be either a URL or a Data URI.
278
+ */
279
+ url: string;
280
+ /**
281
+ * The image format/mimetype
282
+ */
283
+ format?: string;
284
+ }
285
+ }
286
+ /**
287
+ * Scored audio chunk for deprecated API.
288
+ */
289
+ interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
290
+ /**
291
+ * position of the chunk in a file
292
+ */
293
+ chunk_index: number;
294
+ /**
295
+ * mime type of the chunk
296
+ */
297
+ mime_type?: string;
298
+ /**
299
+ * metadata of the chunk
300
+ */
301
+ generated_metadata?: {
302
+ [key: string]: unknown;
303
+ } | null;
304
+ /**
305
+ * model used for this chunk
306
+ */
307
+ model?: string | null;
308
+ /**
309
+ * score of the chunk
310
+ */
311
+ score: number;
312
+ /**
313
+ * file id
314
+ */
315
+ file_id: string;
316
+ /**
317
+ * filename
318
+ */
319
+ filename: string;
320
+ /**
321
+ * store id
322
+ */
323
+ vector_store_id: string;
324
+ /**
325
+ * file metadata
326
+ */
327
+ metadata?: unknown;
328
+ /**
329
+ * Input type identifier
330
+ */
331
+ type?: 'audio_url';
332
+ /**
333
+ * speech recognition (sr) text of the audio
334
+ */
335
+ transcription?: string | null;
336
+ /**
337
+ * summary of the audio
338
+ */
339
+ summary?: string | null;
340
+ /**
341
+ * The audio input specification.
342
+ */
343
+ audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
344
+ /**
345
+ * The sampling rate of the audio.
346
+ */
347
+ sampling_rate: number;
348
+ }
349
+ namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
350
+ /**
351
+ * The audio input specification.
352
+ */
353
+ interface AudioURL {
354
+ /**
355
+ * The audio URL. Can be either a URL or a Data URI.
356
+ */
357
+ url: string;
358
+ }
359
+ }
360
+ /**
361
+ * Scored video chunk for deprecated API.
362
+ */
363
+ interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
364
+ /**
365
+ * position of the chunk in a file
366
+ */
367
+ chunk_index: number;
368
+ /**
369
+ * mime type of the chunk
370
+ */
371
+ mime_type?: string;
372
+ /**
373
+ * metadata of the chunk
374
+ */
375
+ generated_metadata?: {
376
+ [key: string]: unknown;
377
+ } | null;
378
+ /**
379
+ * model used for this chunk
380
+ */
381
+ model?: string | null;
382
+ /**
383
+ * score of the chunk
384
+ */
385
+ score: number;
386
+ /**
387
+ * file id
388
+ */
389
+ file_id: string;
390
+ /**
391
+ * filename
392
+ */
393
+ filename: string;
394
+ /**
395
+ * store id
396
+ */
397
+ vector_store_id: string;
398
+ /**
399
+ * file metadata
400
+ */
401
+ metadata?: unknown;
402
+ /**
403
+ * Input type identifier
404
+ */
405
+ type?: 'video_url';
406
+ /**
407
+ * speech recognition (sr) text of the video
408
+ */
409
+ transcription?: string | null;
410
+ /**
411
+ * summary of the video
412
+ */
413
+ summary?: string | null;
414
+ /**
415
+ * The video input specification.
416
+ */
417
+ video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
418
+ }
419
+ namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
420
+ /**
421
+ * The video input specification.
422
+ */
423
+ interface VideoURL {
424
+ /**
425
+ * The video URL. Can be either a URL or a Data URI.
426
+ */
427
+ url: string;
428
+ }
429
+ }
430
+ }
181
431
  export type VectorStoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
182
432
  /**
183
- * Represents a file stored in a vector store.
433
+ * Represents a file stored in a store.
184
434
  */
185
435
  export interface VectorStoreFile {
186
436
  /**
@@ -198,17 +448,17 @@ export interface VectorStoreFile {
198
448
  /**
199
449
  * Processing status of the file
200
450
  */
201
- status?: VectorStoreFileStatus;
451
+ status?: FilesAPI.StoreFileStatus;
202
452
  /**
203
453
  * Last error message if processing failed
204
454
  */
205
455
  last_error?: unknown;
206
456
  /**
207
- * ID of the containing vector store
457
+ * ID of the containing store
208
458
  */
209
459
  vector_store_id: string;
210
460
  /**
211
- * Timestamp of vector store file creation
461
+ * Timestamp of store file creation
212
462
  */
213
463
  created_at: string;
214
464
  /**
@@ -241,7 +491,9 @@ export declare namespace VectorStoreFile {
241
491
  /**
242
492
  * metadata of the chunk
243
493
  */
244
- generated_metadata?: TextInputChunk.MarkdownChunkGeneratedMetadata | TextInputChunk.TextChunkGeneratedMetadata | TextInputChunk.PdfChunkGeneratedMetadata | TextInputChunk.CodeChunkGeneratedMetadata | TextInputChunk.AudioChunkGeneratedMetadata | null;
494
+ generated_metadata?: {
495
+ [key: string]: unknown;
496
+ } | null;
245
497
  /**
246
498
  * model used for this chunk
247
499
  */
@@ -259,61 +511,6 @@ export declare namespace VectorStoreFile {
259
511
  */
260
512
  text: string;
261
513
  }
262
- namespace TextInputChunk {
263
- interface MarkdownChunkGeneratedMetadata {
264
- type?: 'markdown';
265
- file_type?: 'text/markdown';
266
- language: string;
267
- word_count: number;
268
- file_size: number;
269
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
270
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
271
- [k: string]: unknown;
272
- }
273
- namespace MarkdownChunkGeneratedMetadata {
274
- interface ChunkHeading {
275
- level: number;
276
- text: string;
277
- }
278
- interface HeadingContext {
279
- level: number;
280
- text: string;
281
- }
282
- }
283
- interface TextChunkGeneratedMetadata {
284
- type?: 'text';
285
- file_type?: 'text/plain';
286
- language: string;
287
- word_count: number;
288
- file_size: number;
289
- [k: string]: unknown;
290
- }
291
- interface PdfChunkGeneratedMetadata {
292
- type?: 'pdf';
293
- file_type?: 'application/pdf';
294
- total_pages: number;
295
- total_size: number;
296
- [k: string]: unknown;
297
- }
298
- interface CodeChunkGeneratedMetadata {
299
- type?: 'code';
300
- file_type: string;
301
- language: string;
302
- word_count: number;
303
- file_size: number;
304
- [k: string]: unknown;
305
- }
306
- interface AudioChunkGeneratedMetadata {
307
- type?: 'audio';
308
- file_type: string;
309
- file_size: number;
310
- total_duration_seconds: number;
311
- sample_rate: number;
312
- channels: number;
313
- audio_format: number;
314
- [k: string]: unknown;
315
- }
316
- }
317
514
  interface ImageURLInputChunk {
318
515
  /**
319
516
  * position of the chunk in a file
@@ -326,7 +523,9 @@ export declare namespace VectorStoreFile {
326
523
  /**
327
524
  * metadata of the chunk
328
525
  */
329
- generated_metadata?: ImageURLInputChunk.MarkdownChunkGeneratedMetadata | ImageURLInputChunk.TextChunkGeneratedMetadata | ImageURLInputChunk.PdfChunkGeneratedMetadata | ImageURLInputChunk.CodeChunkGeneratedMetadata | ImageURLInputChunk.AudioChunkGeneratedMetadata | null;
526
+ generated_metadata?: {
527
+ [key: string]: unknown;
528
+ } | null;
330
529
  /**
331
530
  * model used for this chunk
332
531
  */
@@ -349,59 +548,6 @@ export declare namespace VectorStoreFile {
349
548
  image_url: ImageURLInputChunk.ImageURL;
350
549
  }
351
550
  namespace ImageURLInputChunk {
352
- interface MarkdownChunkGeneratedMetadata {
353
- type?: 'markdown';
354
- file_type?: 'text/markdown';
355
- language: string;
356
- word_count: number;
357
- file_size: number;
358
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
359
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
360
- [k: string]: unknown;
361
- }
362
- namespace MarkdownChunkGeneratedMetadata {
363
- interface ChunkHeading {
364
- level: number;
365
- text: string;
366
- }
367
- interface HeadingContext {
368
- level: number;
369
- text: string;
370
- }
371
- }
372
- interface TextChunkGeneratedMetadata {
373
- type?: 'text';
374
- file_type?: 'text/plain';
375
- language: string;
376
- word_count: number;
377
- file_size: number;
378
- [k: string]: unknown;
379
- }
380
- interface PdfChunkGeneratedMetadata {
381
- type?: 'pdf';
382
- file_type?: 'application/pdf';
383
- total_pages: number;
384
- total_size: number;
385
- [k: string]: unknown;
386
- }
387
- interface CodeChunkGeneratedMetadata {
388
- type?: 'code';
389
- file_type: string;
390
- language: string;
391
- word_count: number;
392
- file_size: number;
393
- [k: string]: unknown;
394
- }
395
- interface AudioChunkGeneratedMetadata {
396
- type?: 'audio';
397
- file_type: string;
398
- file_size: number;
399
- total_duration_seconds: number;
400
- sample_rate: number;
401
- channels: number;
402
- audio_format: number;
403
- [k: string]: unknown;
404
- }
405
551
  /**
406
552
  * The image input specification.
407
553
  */
@@ -428,7 +574,9 @@ export declare namespace VectorStoreFile {
428
574
  /**
429
575
  * metadata of the chunk
430
576
  */
431
- generated_metadata?: AudioURLInputChunk.MarkdownChunkGeneratedMetadata | AudioURLInputChunk.TextChunkGeneratedMetadata | AudioURLInputChunk.PdfChunkGeneratedMetadata | AudioURLInputChunk.CodeChunkGeneratedMetadata | AudioURLInputChunk.AudioChunkGeneratedMetadata | null;
577
+ generated_metadata?: {
578
+ [key: string]: unknown;
579
+ } | null;
432
580
  /**
433
581
  * model used for this chunk
434
582
  */
@@ -455,59 +603,6 @@ export declare namespace VectorStoreFile {
455
603
  sampling_rate: number;
456
604
  }
457
605
  namespace AudioURLInputChunk {
458
- interface MarkdownChunkGeneratedMetadata {
459
- type?: 'markdown';
460
- file_type?: 'text/markdown';
461
- language: string;
462
- word_count: number;
463
- file_size: number;
464
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
465
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
466
- [k: string]: unknown;
467
- }
468
- namespace MarkdownChunkGeneratedMetadata {
469
- interface ChunkHeading {
470
- level: number;
471
- text: string;
472
- }
473
- interface HeadingContext {
474
- level: number;
475
- text: string;
476
- }
477
- }
478
- interface TextChunkGeneratedMetadata {
479
- type?: 'text';
480
- file_type?: 'text/plain';
481
- language: string;
482
- word_count: number;
483
- file_size: number;
484
- [k: string]: unknown;
485
- }
486
- interface PdfChunkGeneratedMetadata {
487
- type?: 'pdf';
488
- file_type?: 'application/pdf';
489
- total_pages: number;
490
- total_size: number;
491
- [k: string]: unknown;
492
- }
493
- interface CodeChunkGeneratedMetadata {
494
- type?: 'code';
495
- file_type: string;
496
- language: string;
497
- word_count: number;
498
- file_size: number;
499
- [k: string]: unknown;
500
- }
501
- interface AudioChunkGeneratedMetadata {
502
- type?: 'audio';
503
- file_type: string;
504
- file_size: number;
505
- total_duration_seconds: number;
506
- sample_rate: number;
507
- channels: number;
508
- audio_format: number;
509
- [k: string]: unknown;
510
- }
511
606
  /**
512
607
  * The audio input specification.
513
608
  */
@@ -530,7 +625,9 @@ export declare namespace VectorStoreFile {
530
625
  /**
531
626
  * metadata of the chunk
532
627
  */
533
- generated_metadata?: VideoURLInputChunk.MarkdownChunkGeneratedMetadata | VideoURLInputChunk.TextChunkGeneratedMetadata | VideoURLInputChunk.PdfChunkGeneratedMetadata | VideoURLInputChunk.CodeChunkGeneratedMetadata | VideoURLInputChunk.AudioChunkGeneratedMetadata | null;
628
+ generated_metadata?: {
629
+ [key: string]: unknown;
630
+ } | null;
534
631
  /**
535
632
  * model used for this chunk
536
633
  */
@@ -553,59 +650,6 @@ export declare namespace VectorStoreFile {
553
650
  video_url: VideoURLInputChunk.VideoURL;
554
651
  }
555
652
  namespace VideoURLInputChunk {
556
- interface MarkdownChunkGeneratedMetadata {
557
- type?: 'markdown';
558
- file_type?: 'text/markdown';
559
- language: string;
560
- word_count: number;
561
- file_size: number;
562
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
563
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
564
- [k: string]: unknown;
565
- }
566
- namespace MarkdownChunkGeneratedMetadata {
567
- interface ChunkHeading {
568
- level: number;
569
- text: string;
570
- }
571
- interface HeadingContext {
572
- level: number;
573
- text: string;
574
- }
575
- }
576
- interface TextChunkGeneratedMetadata {
577
- type?: 'text';
578
- file_type?: 'text/plain';
579
- language: string;
580
- word_count: number;
581
- file_size: number;
582
- [k: string]: unknown;
583
- }
584
- interface PdfChunkGeneratedMetadata {
585
- type?: 'pdf';
586
- file_type?: 'application/pdf';
587
- total_pages: number;
588
- total_size: number;
589
- [k: string]: unknown;
590
- }
591
- interface CodeChunkGeneratedMetadata {
592
- type?: 'code';
593
- file_type: string;
594
- language: string;
595
- word_count: number;
596
- file_size: number;
597
- [k: string]: unknown;
598
- }
599
- interface AudioChunkGeneratedMetadata {
600
- type?: 'audio';
601
- file_type: string;
602
- file_size: number;
603
- total_duration_seconds: number;
604
- sample_rate: number;
605
- channels: number;
606
- audio_format: number;
607
- [k: string]: unknown;
608
- }
609
653
  /**
610
654
  * The video input specification.
611
655
  */
@@ -617,6 +661,9 @@ export declare namespace VectorStoreFile {
617
661
  }
618
662
  }
619
663
  }
664
+ /**
665
+ * List response wrapper for vector store files.
666
+ */
620
667
  export interface FileListResponse {
621
668
  /**
622
669
  * Response model for cursor-based pagination.
@@ -676,6 +723,9 @@ export interface FileDeleteResponse {
676
723
  */
677
724
  object?: 'vector_store.file';
678
725
  }
726
+ /**
727
+ * Search response wrapper for vector store files.
728
+ */
679
729
  export interface FileSearchResponse {
680
730
  /**
681
731
  * The object type of the response
@@ -747,7 +797,7 @@ export interface FileListParams {
747
797
  /**
748
798
  * Status to filter by
749
799
  */
750
- statuses?: Array<VectorStoreFileStatus> | null;
800
+ statuses?: Array<FilesAPI.StoreFileStatus> | null;
751
801
  /**
752
802
  * Metadata filter to apply to the query
753
803
  */
@@ -801,7 +851,7 @@ export declare namespace FileSearchParams {
801
851
  /**
802
852
  * Whether to rerank results and optional reranking configuration
803
853
  */
804
- rerank?: boolean | FilesAPI.RerankConfig | null;
854
+ rerank?: boolean | VectorStoresFilesAPI.RerankConfig | null;
805
855
  /**
806
856
  * Whether to return file metadata
807
857
  */