@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,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as FilesAPI from './files';
4
+ import * as VectorStoresFilesAPI from './files';
5
5
  import * as Shared from '../shared';
6
- import * as VectorStoresAPI from './vector-stores';
6
+ import * as FilesAPI from '../stores/files';
7
7
  import { APIPromise } from '../../core/api-promise';
8
8
  import { RequestOptions } from '../../internal/request-options';
9
9
  import * as polling from '../../lib/polling';
@@ -12,12 +12,9 @@ import { path } from '../../internal/utils/path';
12
12
 
13
13
  export class Files extends APIResource {
14
14
  /**
15
- * Add an already uploaded file to a vector store.
15
+ * DEPRECATED: Use POST /stores/{store_identifier}/files instead
16
16
  *
17
- * Args: vector_store_identifier: The ID or name of the vector store to add the
18
- * file to file: The file to add and index
19
- *
20
- * Returns: VectorStoreFile: Details of the added and indexed file
17
+ * @deprecated Use post stores.files instead
21
18
  */
22
19
  create(
23
20
  vectorStoreIdentifier: string,
@@ -28,12 +25,9 @@ export class Files extends APIResource {
28
25
  }
29
26
 
30
27
  /**
31
- * Get details of a specific file in a vector store.
32
- *
33
- * Args: vector_store_identifier: The ID or name of the vector store file_id: The
34
- * ID of the file
28
+ * DEPRECATED: Use GET /stores/{store_identifier}/files/{file_id} instead
35
29
  *
36
- * Returns: VectorStoreFile: Details of the vector store file
30
+ * @deprecated Use stores.files instead
37
31
  */
38
32
  retrieve(
39
33
  fileID: string,
@@ -48,12 +42,9 @@ export class Files extends APIResource {
48
42
  }
49
43
 
50
44
  /**
51
- * List files indexed in a vector store with pagination and metadata filter.
45
+ * DEPRECATED: Use POST /stores/{store_identifier}/files/list instead
52
46
  *
53
- * Args: vector_store_identifier: The ID or name of the vector store pagination:
54
- * Pagination parameters and metadata filter
55
- *
56
- * Returns: VectorStoreFileListResponse: Paginated list of vector store files
47
+ * @deprecated Use post stores.files.list instead
57
48
  */
58
49
  list(
59
50
  vectorStoreIdentifier: string,
@@ -67,12 +58,9 @@ export class Files extends APIResource {
67
58
  }
68
59
 
69
60
  /**
70
- * Delete a file from a vector store.
71
- *
72
- * Args: vector_store_identifier: The ID or name of the vector store file_id: The
73
- * ID of the file to delete
61
+ * DEPRECATED: Use DELETE /stores/{store_identifier}/files/{file_id} instead
74
62
  *
75
- * Returns: VectorStoreFileDeleted: The deleted file
63
+ * @deprecated Use stores.files instead
76
64
  */
77
65
  delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<FileDeleteResponse> {
78
66
  const { vector_store_identifier } = params;
@@ -80,22 +68,9 @@ export class Files extends APIResource {
80
68
  }
81
69
 
82
70
  /**
83
- * Perform semantic search across complete vector store files.
84
- *
85
- * This endpoint searches through vector store files using semantic similarity
86
- * matching. Unlike chunk search, it returns complete matching files rather than
87
- * individual chunks. Supports complex search queries with filters and returns
88
- * relevance-scored results.
89
- *
90
- * Args: search_params: Search configuration including: - query text or
91
- * embeddings - metadata filters - pagination parameters - sorting preferences
92
- * \_state: API state dependency \_ctx: Service context dependency
93
- *
94
- * Returns: VectorStoreSearchFileResponse containing: - List of matched files with
95
- * relevance scores - Pagination details including total result count
71
+ * DEPRECATED: Use POST /stores/{store_identifier}/files/search instead
96
72
  *
97
- * Raises: HTTPException (400): If search parameters are invalid HTTPException
98
- * (404): If no vector stores are found to search
73
+ * @deprecated Use stores.files.search instead
99
74
  */
100
75
  search(body: FileSearchParams, options?: RequestOptions): APIPromise<FileSearchResponse> {
101
76
  return this._client.post('/v1/vector_stores/files/search', { body, ...options });
@@ -225,7 +200,7 @@ export interface RerankConfig {
225
200
  }
226
201
 
227
202
  /**
228
- * Represents a scored file stored in a vector store.
203
+ * Represents a scored store file.
229
204
  */
230
205
  export interface ScoredVectorStoreFile {
231
206
  /**
@@ -246,7 +221,7 @@ export interface ScoredVectorStoreFile {
246
221
  /**
247
222
  * Processing status of the file
248
223
  */
249
- status?: VectorStoreFileStatus;
224
+ status?: FilesAPI.StoreFileStatus;
250
225
 
251
226
  /**
252
227
  * Last error message if processing failed
@@ -254,12 +229,12 @@ export interface ScoredVectorStoreFile {
254
229
  last_error?: unknown;
255
230
 
256
231
  /**
257
- * ID of the containing vector store
232
+ * ID of the containing store
258
233
  */
259
234
  vector_store_id: string;
260
235
 
261
236
  /**
262
- * Timestamp of vector store file creation
237
+ * Timestamp of store file creation
263
238
  */
264
239
  created_at: string;
265
240
 
@@ -282,10 +257,10 @@ export interface ScoredVectorStoreFile {
282
257
  * Array of scored file chunks
283
258
  */
284
259
  chunks: Array<
285
- | VectorStoresAPI.ScoredTextInputChunk
286
- | VectorStoresAPI.ScoredImageURLInputChunk
287
- | VectorStoresAPI.ScoredAudioURLInputChunk
288
- | VectorStoresAPI.ScoredVideoURLInputChunk
260
+ | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk
261
+ | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk
262
+ | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk
263
+ | ScoredVectorStoreFile.MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk
289
264
  > | null;
290
265
 
291
266
  /**
@@ -294,10 +269,333 @@ export interface ScoredVectorStoreFile {
294
269
  score: number;
295
270
  }
296
271
 
272
+ export namespace ScoredVectorStoreFile {
273
+ /**
274
+ * Scored text chunk for deprecated API.
275
+ */
276
+ export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredTextInputChunk {
277
+ /**
278
+ * position of the chunk in a file
279
+ */
280
+ chunk_index: number;
281
+
282
+ /**
283
+ * mime type of the chunk
284
+ */
285
+ mime_type?: string;
286
+
287
+ /**
288
+ * metadata of the chunk
289
+ */
290
+ generated_metadata?: { [key: string]: unknown } | null;
291
+
292
+ /**
293
+ * model used for this chunk
294
+ */
295
+ model?: string | null;
296
+
297
+ /**
298
+ * score of the chunk
299
+ */
300
+ score: number;
301
+
302
+ /**
303
+ * file id
304
+ */
305
+ file_id: string;
306
+
307
+ /**
308
+ * filename
309
+ */
310
+ filename: string;
311
+
312
+ /**
313
+ * store id
314
+ */
315
+ vector_store_id: string;
316
+
317
+ /**
318
+ * file metadata
319
+ */
320
+ metadata?: unknown;
321
+
322
+ /**
323
+ * Input type identifier
324
+ */
325
+ type?: 'text';
326
+
327
+ /**
328
+ * The offset of the text in the file relative to the start of the file.
329
+ */
330
+ offset?: number;
331
+
332
+ /**
333
+ * Text content to process
334
+ */
335
+ text: string;
336
+ }
337
+
338
+ /**
339
+ * Scored image chunk for deprecated API.
340
+ */
341
+ export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
342
+ /**
343
+ * position of the chunk in a file
344
+ */
345
+ chunk_index: number;
346
+
347
+ /**
348
+ * mime type of the chunk
349
+ */
350
+ mime_type?: string;
351
+
352
+ /**
353
+ * metadata of the chunk
354
+ */
355
+ generated_metadata?: { [key: string]: unknown } | null;
356
+
357
+ /**
358
+ * model used for this chunk
359
+ */
360
+ model?: string | null;
361
+
362
+ /**
363
+ * score of the chunk
364
+ */
365
+ score: number;
366
+
367
+ /**
368
+ * file id
369
+ */
370
+ file_id: string;
371
+
372
+ /**
373
+ * filename
374
+ */
375
+ filename: string;
376
+
377
+ /**
378
+ * store id
379
+ */
380
+ vector_store_id: string;
381
+
382
+ /**
383
+ * file metadata
384
+ */
385
+ metadata?: unknown;
386
+
387
+ /**
388
+ * Input type identifier
389
+ */
390
+ type?: 'image_url';
391
+
392
+ /**
393
+ * ocr text of the image
394
+ */
395
+ ocr_text?: string | null;
396
+
397
+ /**
398
+ * summary of the image
399
+ */
400
+ summary?: string | null;
401
+
402
+ /**
403
+ * The image input specification.
404
+ */
405
+ image_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk.ImageURL;
406
+ }
407
+
408
+ export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredImageURLInputChunk {
409
+ /**
410
+ * The image input specification.
411
+ */
412
+ export interface ImageURL {
413
+ /**
414
+ * The image URL. Can be either a URL or a Data URI.
415
+ */
416
+ url: string;
417
+
418
+ /**
419
+ * The image format/mimetype
420
+ */
421
+ format?: string;
422
+ }
423
+ }
424
+
425
+ /**
426
+ * Scored audio chunk for deprecated API.
427
+ */
428
+ export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
429
+ /**
430
+ * position of the chunk in a file
431
+ */
432
+ chunk_index: number;
433
+
434
+ /**
435
+ * mime type of the chunk
436
+ */
437
+ mime_type?: string;
438
+
439
+ /**
440
+ * metadata of the chunk
441
+ */
442
+ generated_metadata?: { [key: string]: unknown } | null;
443
+
444
+ /**
445
+ * model used for this chunk
446
+ */
447
+ model?: string | null;
448
+
449
+ /**
450
+ * score of the chunk
451
+ */
452
+ score: number;
453
+
454
+ /**
455
+ * file id
456
+ */
457
+ file_id: string;
458
+
459
+ /**
460
+ * filename
461
+ */
462
+ filename: string;
463
+
464
+ /**
465
+ * store id
466
+ */
467
+ vector_store_id: string;
468
+
469
+ /**
470
+ * file metadata
471
+ */
472
+ metadata?: unknown;
473
+
474
+ /**
475
+ * Input type identifier
476
+ */
477
+ type?: 'audio_url';
478
+
479
+ /**
480
+ * speech recognition (sr) text of the audio
481
+ */
482
+ transcription?: string | null;
483
+
484
+ /**
485
+ * summary of the audio
486
+ */
487
+ summary?: string | null;
488
+
489
+ /**
490
+ * The audio input specification.
491
+ */
492
+ audio_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk.AudioURL;
493
+
494
+ /**
495
+ * The sampling rate of the audio.
496
+ */
497
+ sampling_rate: number;
498
+ }
499
+
500
+ export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredAudioURLInputChunk {
501
+ /**
502
+ * The audio input specification.
503
+ */
504
+ export interface AudioURL {
505
+ /**
506
+ * The audio URL. Can be either a URL or a Data URI.
507
+ */
508
+ url: string;
509
+ }
510
+ }
511
+
512
+ /**
513
+ * Scored video chunk for deprecated API.
514
+ */
515
+ export interface MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
516
+ /**
517
+ * position of the chunk in a file
518
+ */
519
+ chunk_index: number;
520
+
521
+ /**
522
+ * mime type of the chunk
523
+ */
524
+ mime_type?: string;
525
+
526
+ /**
527
+ * metadata of the chunk
528
+ */
529
+ generated_metadata?: { [key: string]: unknown } | null;
530
+
531
+ /**
532
+ * model used for this chunk
533
+ */
534
+ model?: string | null;
535
+
536
+ /**
537
+ * score of the chunk
538
+ */
539
+ score: number;
540
+
541
+ /**
542
+ * file id
543
+ */
544
+ file_id: string;
545
+
546
+ /**
547
+ * filename
548
+ */
549
+ filename: string;
550
+
551
+ /**
552
+ * store id
553
+ */
554
+ vector_store_id: string;
555
+
556
+ /**
557
+ * file metadata
558
+ */
559
+ metadata?: unknown;
560
+
561
+ /**
562
+ * Input type identifier
563
+ */
564
+ type?: 'video_url';
565
+
566
+ /**
567
+ * speech recognition (sr) text of the video
568
+ */
569
+ transcription?: string | null;
570
+
571
+ /**
572
+ * summary of the video
573
+ */
574
+ summary?: string | null;
575
+
576
+ /**
577
+ * The video input specification.
578
+ */
579
+ video_url: MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk.VideoURL;
580
+ }
581
+
582
+ export namespace MxbaiOmniAPIRoutesV1DeprecatedVectorStoresModelsScoredVideoURLInputChunk {
583
+ /**
584
+ * The video input specification.
585
+ */
586
+ export interface VideoURL {
587
+ /**
588
+ * The video URL. Can be either a URL or a Data URI.
589
+ */
590
+ url: string;
591
+ }
592
+ }
593
+ }
594
+
297
595
  export type VectorStoreFileStatus = 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
298
596
 
299
597
  /**
300
- * Represents a file stored in a vector store.
598
+ * Represents a file stored in a store.
301
599
  */
302
600
  export interface VectorStoreFile {
303
601
  /**
@@ -318,7 +616,7 @@ export interface VectorStoreFile {
318
616
  /**
319
617
  * Processing status of the file
320
618
  */
321
- status?: VectorStoreFileStatus;
619
+ status?: FilesAPI.StoreFileStatus;
322
620
 
323
621
  /**
324
622
  * Last error message if processing failed
@@ -326,12 +624,12 @@ export interface VectorStoreFile {
326
624
  last_error?: unknown;
327
625
 
328
626
  /**
329
- * ID of the containing vector store
627
+ * ID of the containing store
330
628
  */
331
629
  vector_store_id: string;
332
630
 
333
631
  /**
334
- * Timestamp of vector store file creation
632
+ * Timestamp of store file creation
335
633
  */
336
634
  created_at: string;
337
635
 
@@ -376,13 +674,7 @@ export namespace VectorStoreFile {
376
674
  /**
377
675
  * metadata of the chunk
378
676
  */
379
- generated_metadata?:
380
- | TextInputChunk.MarkdownChunkGeneratedMetadata
381
- | TextInputChunk.TextChunkGeneratedMetadata
382
- | TextInputChunk.PdfChunkGeneratedMetadata
383
- | TextInputChunk.CodeChunkGeneratedMetadata
384
- | TextInputChunk.AudioChunkGeneratedMetadata
385
- | null;
677
+ generated_metadata?: { [key: string]: unknown } | null;
386
678
 
387
679
  /**
388
680
  * model used for this chunk
@@ -405,98 +697,6 @@ export namespace VectorStoreFile {
405
697
  text: string;
406
698
  }
407
699
 
408
- export namespace TextInputChunk {
409
- export interface MarkdownChunkGeneratedMetadata {
410
- type?: 'markdown';
411
-
412
- file_type?: 'text/markdown';
413
-
414
- language: string;
415
-
416
- word_count: number;
417
-
418
- file_size: number;
419
-
420
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
421
-
422
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
423
-
424
- [k: string]: unknown;
425
- }
426
-
427
- export namespace MarkdownChunkGeneratedMetadata {
428
- export interface ChunkHeading {
429
- level: number;
430
-
431
- text: string;
432
- }
433
-
434
- export interface HeadingContext {
435
- level: number;
436
-
437
- text: string;
438
- }
439
- }
440
-
441
- export interface TextChunkGeneratedMetadata {
442
- type?: 'text';
443
-
444
- file_type?: 'text/plain';
445
-
446
- language: string;
447
-
448
- word_count: number;
449
-
450
- file_size: number;
451
-
452
- [k: string]: unknown;
453
- }
454
-
455
- export interface PdfChunkGeneratedMetadata {
456
- type?: 'pdf';
457
-
458
- file_type?: 'application/pdf';
459
-
460
- total_pages: number;
461
-
462
- total_size: number;
463
-
464
- [k: string]: unknown;
465
- }
466
-
467
- export interface CodeChunkGeneratedMetadata {
468
- type?: 'code';
469
-
470
- file_type: string;
471
-
472
- language: string;
473
-
474
- word_count: number;
475
-
476
- file_size: number;
477
-
478
- [k: string]: unknown;
479
- }
480
-
481
- export interface AudioChunkGeneratedMetadata {
482
- type?: 'audio';
483
-
484
- file_type: string;
485
-
486
- file_size: number;
487
-
488
- total_duration_seconds: number;
489
-
490
- sample_rate: number;
491
-
492
- channels: number;
493
-
494
- audio_format: number;
495
-
496
- [k: string]: unknown;
497
- }
498
- }
499
-
500
700
  export interface ImageURLInputChunk {
501
701
  /**
502
702
  * position of the chunk in a file
@@ -511,13 +711,7 @@ export namespace VectorStoreFile {
511
711
  /**
512
712
  * metadata of the chunk
513
713
  */
514
- generated_metadata?:
515
- | ImageURLInputChunk.MarkdownChunkGeneratedMetadata
516
- | ImageURLInputChunk.TextChunkGeneratedMetadata
517
- | ImageURLInputChunk.PdfChunkGeneratedMetadata
518
- | ImageURLInputChunk.CodeChunkGeneratedMetadata
519
- | ImageURLInputChunk.AudioChunkGeneratedMetadata
520
- | null;
714
+ generated_metadata?: { [key: string]: unknown } | null;
521
715
 
522
716
  /**
523
717
  * model used for this chunk
@@ -546,96 +740,6 @@ export namespace VectorStoreFile {
546
740
  }
547
741
 
548
742
  export namespace ImageURLInputChunk {
549
- export interface MarkdownChunkGeneratedMetadata {
550
- type?: 'markdown';
551
-
552
- file_type?: 'text/markdown';
553
-
554
- language: string;
555
-
556
- word_count: number;
557
-
558
- file_size: number;
559
-
560
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
561
-
562
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
563
-
564
- [k: string]: unknown;
565
- }
566
-
567
- export namespace MarkdownChunkGeneratedMetadata {
568
- export interface ChunkHeading {
569
- level: number;
570
-
571
- text: string;
572
- }
573
-
574
- export interface HeadingContext {
575
- level: number;
576
-
577
- text: string;
578
- }
579
- }
580
-
581
- export interface TextChunkGeneratedMetadata {
582
- type?: 'text';
583
-
584
- file_type?: 'text/plain';
585
-
586
- language: string;
587
-
588
- word_count: number;
589
-
590
- file_size: number;
591
-
592
- [k: string]: unknown;
593
- }
594
-
595
- export interface PdfChunkGeneratedMetadata {
596
- type?: 'pdf';
597
-
598
- file_type?: 'application/pdf';
599
-
600
- total_pages: number;
601
-
602
- total_size: number;
603
-
604
- [k: string]: unknown;
605
- }
606
-
607
- export interface CodeChunkGeneratedMetadata {
608
- type?: 'code';
609
-
610
- file_type: string;
611
-
612
- language: string;
613
-
614
- word_count: number;
615
-
616
- file_size: number;
617
-
618
- [k: string]: unknown;
619
- }
620
-
621
- export interface AudioChunkGeneratedMetadata {
622
- type?: 'audio';
623
-
624
- file_type: string;
625
-
626
- file_size: number;
627
-
628
- total_duration_seconds: number;
629
-
630
- sample_rate: number;
631
-
632
- channels: number;
633
-
634
- audio_format: number;
635
-
636
- [k: string]: unknown;
637
- }
638
-
639
743
  /**
640
744
  * The image input specification.
641
745
  */
@@ -666,13 +770,7 @@ export namespace VectorStoreFile {
666
770
  /**
667
771
  * metadata of the chunk
668
772
  */
669
- generated_metadata?:
670
- | AudioURLInputChunk.MarkdownChunkGeneratedMetadata
671
- | AudioURLInputChunk.TextChunkGeneratedMetadata
672
- | AudioURLInputChunk.PdfChunkGeneratedMetadata
673
- | AudioURLInputChunk.CodeChunkGeneratedMetadata
674
- | AudioURLInputChunk.AudioChunkGeneratedMetadata
675
- | null;
773
+ generated_metadata?: { [key: string]: unknown } | null;
676
774
 
677
775
  /**
678
776
  * model used for this chunk
@@ -706,96 +804,6 @@ export namespace VectorStoreFile {
706
804
  }
707
805
 
708
806
  export namespace AudioURLInputChunk {
709
- export interface MarkdownChunkGeneratedMetadata {
710
- type?: 'markdown';
711
-
712
- file_type?: 'text/markdown';
713
-
714
- language: string;
715
-
716
- word_count: number;
717
-
718
- file_size: number;
719
-
720
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
721
-
722
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
723
-
724
- [k: string]: unknown;
725
- }
726
-
727
- export namespace MarkdownChunkGeneratedMetadata {
728
- export interface ChunkHeading {
729
- level: number;
730
-
731
- text: string;
732
- }
733
-
734
- export interface HeadingContext {
735
- level: number;
736
-
737
- text: string;
738
- }
739
- }
740
-
741
- export interface TextChunkGeneratedMetadata {
742
- type?: 'text';
743
-
744
- file_type?: 'text/plain';
745
-
746
- language: string;
747
-
748
- word_count: number;
749
-
750
- file_size: number;
751
-
752
- [k: string]: unknown;
753
- }
754
-
755
- export interface PdfChunkGeneratedMetadata {
756
- type?: 'pdf';
757
-
758
- file_type?: 'application/pdf';
759
-
760
- total_pages: number;
761
-
762
- total_size: number;
763
-
764
- [k: string]: unknown;
765
- }
766
-
767
- export interface CodeChunkGeneratedMetadata {
768
- type?: 'code';
769
-
770
- file_type: string;
771
-
772
- language: string;
773
-
774
- word_count: number;
775
-
776
- file_size: number;
777
-
778
- [k: string]: unknown;
779
- }
780
-
781
- export interface AudioChunkGeneratedMetadata {
782
- type?: 'audio';
783
-
784
- file_type: string;
785
-
786
- file_size: number;
787
-
788
- total_duration_seconds: number;
789
-
790
- sample_rate: number;
791
-
792
- channels: number;
793
-
794
- audio_format: number;
795
-
796
- [k: string]: unknown;
797
- }
798
-
799
807
  /**
800
808
  * The audio input specification.
801
809
  */
@@ -821,13 +829,7 @@ export namespace VectorStoreFile {
821
829
  /**
822
830
  * metadata of the chunk
823
831
  */
824
- generated_metadata?:
825
- | VideoURLInputChunk.MarkdownChunkGeneratedMetadata
826
- | VideoURLInputChunk.TextChunkGeneratedMetadata
827
- | VideoURLInputChunk.PdfChunkGeneratedMetadata
828
- | VideoURLInputChunk.CodeChunkGeneratedMetadata
829
- | VideoURLInputChunk.AudioChunkGeneratedMetadata
830
- | null;
832
+ generated_metadata?: { [key: string]: unknown } | null;
831
833
 
832
834
  /**
833
835
  * model used for this chunk
@@ -856,96 +858,6 @@ export namespace VectorStoreFile {
856
858
  }
857
859
 
858
860
  export namespace VideoURLInputChunk {
859
- export interface MarkdownChunkGeneratedMetadata {
860
- type?: 'markdown';
861
-
862
- file_type?: 'text/markdown';
863
-
864
- language: string;
865
-
866
- word_count: number;
867
-
868
- file_size: number;
869
-
870
- chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
871
-
872
- heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
873
-
874
- [k: string]: unknown;
875
- }
876
-
877
- export namespace MarkdownChunkGeneratedMetadata {
878
- export interface ChunkHeading {
879
- level: number;
880
-
881
- text: string;
882
- }
883
-
884
- export interface HeadingContext {
885
- level: number;
886
-
887
- text: string;
888
- }
889
- }
890
-
891
- export interface TextChunkGeneratedMetadata {
892
- type?: 'text';
893
-
894
- file_type?: 'text/plain';
895
-
896
- language: string;
897
-
898
- word_count: number;
899
-
900
- file_size: number;
901
-
902
- [k: string]: unknown;
903
- }
904
-
905
- export interface PdfChunkGeneratedMetadata {
906
- type?: 'pdf';
907
-
908
- file_type?: 'application/pdf';
909
-
910
- total_pages: number;
911
-
912
- total_size: number;
913
-
914
- [k: string]: unknown;
915
- }
916
-
917
- export interface CodeChunkGeneratedMetadata {
918
- type?: 'code';
919
-
920
- file_type: string;
921
-
922
- language: string;
923
-
924
- word_count: number;
925
-
926
- file_size: number;
927
-
928
- [k: string]: unknown;
929
- }
930
-
931
- export interface AudioChunkGeneratedMetadata {
932
- type?: 'audio';
933
-
934
- file_type: string;
935
-
936
- file_size: number;
937
-
938
- total_duration_seconds: number;
939
-
940
- sample_rate: number;
941
-
942
- channels: number;
943
-
944
- audio_format: number;
945
-
946
- [k: string]: unknown;
947
- }
948
-
949
861
  /**
950
862
  * The video input specification.
951
863
  */
@@ -958,6 +870,9 @@ export namespace VectorStoreFile {
958
870
  }
959
871
  }
960
872
 
873
+ /**
874
+ * List response wrapper for vector store files.
875
+ */
961
876
  export interface FileListResponse {
962
877
  /**
963
878
  * Response model for cursor-based pagination.
@@ -1027,6 +942,9 @@ export interface FileDeleteResponse {
1027
942
  object?: 'vector_store.file';
1028
943
  }
1029
944
 
945
+ /**
946
+ * Search response wrapper for vector store files.
947
+ */
1030
948
  export interface FileSearchResponse {
1031
949
  /**
1032
950
  * The object type of the response
@@ -1111,7 +1029,7 @@ export interface FileListParams {
1111
1029
  /**
1112
1030
  * Status to filter by
1113
1031
  */
1114
- statuses?: Array<VectorStoreFileStatus> | null;
1032
+ statuses?: Array<FilesAPI.StoreFileStatus> | null;
1115
1033
 
1116
1034
  /**
1117
1035
  * Metadata filter to apply to the query
@@ -1184,7 +1102,7 @@ export namespace FileSearchParams {
1184
1102
  /**
1185
1103
  * Whether to rerank results and optional reranking configuration
1186
1104
  */
1187
- rerank?: boolean | FilesAPI.RerankConfig | null;
1105
+ rerank?: boolean | VectorStoresFilesAPI.RerankConfig | null;
1188
1106
 
1189
1107
  /**
1190
1108
  * Whether to return file metadata