@mixedbread/sdk 0.50.2 → 0.52.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 (88) hide show
  1. package/CHANGELOG.md +225 -0
  2. package/bin/migration-config.json +0 -70
  3. package/client.d.mts +5 -7
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +5 -7
  6. package/client.d.ts.map +1 -1
  7. package/client.js +18 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +18 -6
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/index.d.mts +1 -2
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +1 -2
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js +1 -3
  23. package/resources/index.js.map +1 -1
  24. package/resources/index.mjs +0 -1
  25. package/resources/index.mjs.map +1 -1
  26. package/resources/stores/files.d.mts +98 -20
  27. package/resources/stores/files.d.mts.map +1 -1
  28. package/resources/stores/files.d.ts +98 -20
  29. package/resources/stores/files.d.ts.map +1 -1
  30. package/resources/stores/index.d.mts +1 -1
  31. package/resources/stores/index.d.mts.map +1 -1
  32. package/resources/stores/index.d.ts +1 -1
  33. package/resources/stores/index.d.ts.map +1 -1
  34. package/resources/stores/index.js.map +1 -1
  35. package/resources/stores/index.mjs.map +1 -1
  36. package/resources/stores/stores.d.mts +619 -10
  37. package/resources/stores/stores.d.mts.map +1 -1
  38. package/resources/stores/stores.d.ts +619 -10
  39. package/resources/stores/stores.d.ts.map +1 -1
  40. package/resources/stores/stores.js.map +1 -1
  41. package/resources/stores/stores.mjs.map +1 -1
  42. package/src/client.ts +32 -43
  43. package/src/internal/parse.ts +6 -0
  44. package/src/resources/index.ts +5 -19
  45. package/src/resources/stores/files.ts +140 -19
  46. package/src/resources/stores/index.ts +5 -0
  47. package/src/resources/stores/stores.ts +926 -15
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
  53. package/resources/vector-stores/files.d.mts +0 -1379
  54. package/resources/vector-stores/files.d.mts.map +0 -1
  55. package/resources/vector-stores/files.d.ts +0 -1379
  56. package/resources/vector-stores/files.d.ts.map +0 -1
  57. package/resources/vector-stores/files.js +0 -126
  58. package/resources/vector-stores/files.js.map +0 -1
  59. package/resources/vector-stores/files.mjs +0 -121
  60. package/resources/vector-stores/files.mjs.map +0 -1
  61. package/resources/vector-stores/index.d.mts +0 -3
  62. package/resources/vector-stores/index.d.mts.map +0 -1
  63. package/resources/vector-stores/index.d.ts +0 -3
  64. package/resources/vector-stores/index.d.ts.map +0 -1
  65. package/resources/vector-stores/index.js +0 -9
  66. package/resources/vector-stores/index.js.map +0 -1
  67. package/resources/vector-stores/index.mjs +0 -4
  68. package/resources/vector-stores/index.mjs.map +0 -1
  69. package/resources/vector-stores/vector-stores.d.mts +0 -1885
  70. package/resources/vector-stores/vector-stores.d.mts.map +0 -1
  71. package/resources/vector-stores/vector-stores.d.ts +0 -1885
  72. package/resources/vector-stores/vector-stores.d.ts.map +0 -1
  73. package/resources/vector-stores/vector-stores.js +0 -75
  74. package/resources/vector-stores/vector-stores.js.map +0 -1
  75. package/resources/vector-stores/vector-stores.mjs +0 -70
  76. package/resources/vector-stores/vector-stores.mjs.map +0 -1
  77. package/resources/vector-stores.d.mts +0 -2
  78. package/resources/vector-stores.d.mts.map +0 -1
  79. package/resources/vector-stores.d.ts +0 -2
  80. package/resources/vector-stores.d.ts.map +0 -1
  81. package/resources/vector-stores.js +0 -6
  82. package/resources/vector-stores.js.map +0 -1
  83. package/resources/vector-stores.mjs +0 -3
  84. package/resources/vector-stores.mjs.map +0 -1
  85. package/src/resources/vector-stores/files.ts +0 -2062
  86. package/src/resources/vector-stores/index.ts +0 -36
  87. package/src/resources/vector-stores/vector-stores.ts +0 -2809
  88. package/src/resources/vector-stores.ts +0 -3
@@ -1,9 +1,8 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as Shared from "../shared.js";
3
+ import * as ContentAPI from "../extractions/content.js";
3
4
  import * as FilesAPI from "./files.js";
4
5
  import { FileCreateParams, FileDeleteParams, FileDeleteResponse, FileListParams, FileListResponse, FileRetrieveParams, FileSearchParams, FileSearchResponse, FileUpdateParams, Files, ScoredStoreFile, StoreFile, StoreFileStatus } from "./files.js";
5
- import * as VectorStoresFilesAPI from "../vector-stores/files.js";
6
- import * as VectorStoresAPI from "../vector-stores/vector-stores.js";
7
6
  import { APIPromise } from "../../core/api-promise.js";
8
7
  import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
9
8
  import { RequestOptions } from "../../internal/request-options.js";
@@ -86,6 +85,586 @@ export declare class Stores extends APIResource {
86
85
  search(body: StoreSearchParams, options?: RequestOptions): APIPromise<StoreSearchResponse>;
87
86
  }
88
87
  export type StoresCursor = Cursor<Store>;
88
+ /**
89
+ * Represents an expiration policy for a store.
90
+ */
91
+ export interface ExpiresAfter {
92
+ /**
93
+ * Anchor date for the expiration policy
94
+ */
95
+ anchor?: 'last_active_at';
96
+ /**
97
+ * Number of days after which the store expires
98
+ */
99
+ days?: number;
100
+ }
101
+ export interface ScoredAudioURLInputChunk {
102
+ /**
103
+ * position of the chunk in a file
104
+ */
105
+ chunk_index: number;
106
+ /**
107
+ * mime type of the chunk
108
+ */
109
+ mime_type?: string;
110
+ /**
111
+ * metadata of the chunk
112
+ */
113
+ generated_metadata?: ScoredAudioURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredAudioURLInputChunk.TextChunkGeneratedMetadata | ScoredAudioURLInputChunk.PdfChunkGeneratedMetadata | ScoredAudioURLInputChunk.CodeChunkGeneratedMetadata | ScoredAudioURLInputChunk.AudioChunkGeneratedMetadata | ScoredAudioURLInputChunk.VideoChunkGeneratedMetadata | null;
114
+ /**
115
+ * model used for this chunk
116
+ */
117
+ model?: string | null;
118
+ /**
119
+ * score of the chunk
120
+ */
121
+ score: number;
122
+ /**
123
+ * file id
124
+ */
125
+ file_id: string;
126
+ /**
127
+ * filename
128
+ */
129
+ filename: string;
130
+ /**
131
+ * store id
132
+ */
133
+ store_id: string;
134
+ /**
135
+ * external identifier for this file
136
+ */
137
+ external_id?: string | null;
138
+ /**
139
+ * file metadata
140
+ */
141
+ metadata?: unknown;
142
+ /**
143
+ * Input type identifier
144
+ */
145
+ type?: 'audio_url';
146
+ /**
147
+ * speech recognition (sr) text of the audio
148
+ */
149
+ transcription?: string | null;
150
+ /**
151
+ * summary of the audio
152
+ */
153
+ summary?: string | null;
154
+ /**
155
+ * Model for audio URL validation.
156
+ */
157
+ audio_url?: ScoredAudioURLInputChunk.AudioURL | null;
158
+ /**
159
+ * The sampling rate of the audio.
160
+ */
161
+ sampling_rate: number;
162
+ }
163
+ export declare namespace ScoredAudioURLInputChunk {
164
+ interface MarkdownChunkGeneratedMetadata {
165
+ type?: 'markdown';
166
+ file_type?: 'text/markdown';
167
+ language: string;
168
+ word_count: number;
169
+ file_size: number;
170
+ chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
171
+ heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
172
+ start_line?: number;
173
+ num_lines?: number;
174
+ frontmatter?: {
175
+ [key: string]: unknown;
176
+ };
177
+ [k: string]: unknown;
178
+ }
179
+ namespace MarkdownChunkGeneratedMetadata {
180
+ interface ChunkHeading {
181
+ level: number;
182
+ text: string;
183
+ }
184
+ interface HeadingContext {
185
+ level: number;
186
+ text: string;
187
+ }
188
+ }
189
+ interface TextChunkGeneratedMetadata {
190
+ type?: 'text';
191
+ file_type?: 'text/plain';
192
+ language: string;
193
+ word_count: number;
194
+ file_size: number;
195
+ start_line?: number;
196
+ num_lines?: number;
197
+ [k: string]: unknown;
198
+ }
199
+ interface PdfChunkGeneratedMetadata {
200
+ type?: 'pdf';
201
+ file_type?: 'application/pdf';
202
+ total_pages: number;
203
+ total_size: number;
204
+ [k: string]: unknown;
205
+ }
206
+ interface CodeChunkGeneratedMetadata {
207
+ type?: 'code';
208
+ file_type: string;
209
+ language: string;
210
+ word_count: number;
211
+ file_size: number;
212
+ start_line?: number;
213
+ num_lines?: number;
214
+ [k: string]: unknown;
215
+ }
216
+ interface AudioChunkGeneratedMetadata {
217
+ type?: 'audio';
218
+ file_type: string;
219
+ file_size: number;
220
+ total_duration_seconds: number;
221
+ sample_rate: number;
222
+ channels: number;
223
+ audio_format: number;
224
+ [k: string]: unknown;
225
+ }
226
+ interface VideoChunkGeneratedMetadata {
227
+ type?: 'video';
228
+ file_type: string;
229
+ file_size: number;
230
+ total_duration_seconds: number;
231
+ fps: number;
232
+ width: number;
233
+ height: number;
234
+ frame_count: number;
235
+ has_audio_stream?: boolean;
236
+ [k: string]: unknown;
237
+ }
238
+ /**
239
+ * Model for audio URL validation.
240
+ */
241
+ interface AudioURL {
242
+ /**
243
+ * The audio URL. Can be either a URL or a Data URI.
244
+ */
245
+ url: string;
246
+ }
247
+ }
248
+ export interface ScoredImageURLInputChunk {
249
+ /**
250
+ * position of the chunk in a file
251
+ */
252
+ chunk_index: number;
253
+ /**
254
+ * mime type of the chunk
255
+ */
256
+ mime_type?: string;
257
+ /**
258
+ * metadata of the chunk
259
+ */
260
+ generated_metadata?: ScoredImageURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredImageURLInputChunk.TextChunkGeneratedMetadata | ScoredImageURLInputChunk.PdfChunkGeneratedMetadata | ScoredImageURLInputChunk.CodeChunkGeneratedMetadata | ScoredImageURLInputChunk.AudioChunkGeneratedMetadata | ScoredImageURLInputChunk.VideoChunkGeneratedMetadata | null;
261
+ /**
262
+ * model used for this chunk
263
+ */
264
+ model?: string | null;
265
+ /**
266
+ * score of the chunk
267
+ */
268
+ score: number;
269
+ /**
270
+ * file id
271
+ */
272
+ file_id: string;
273
+ /**
274
+ * filename
275
+ */
276
+ filename: string;
277
+ /**
278
+ * store id
279
+ */
280
+ store_id: string;
281
+ /**
282
+ * external identifier for this file
283
+ */
284
+ external_id?: string | null;
285
+ /**
286
+ * file metadata
287
+ */
288
+ metadata?: unknown;
289
+ /**
290
+ * Input type identifier
291
+ */
292
+ type?: 'image_url';
293
+ /**
294
+ * ocr text of the image
295
+ */
296
+ ocr_text?: string | null;
297
+ /**
298
+ * summary of the image
299
+ */
300
+ summary?: string | null;
301
+ /**
302
+ * Model for image URL validation.
303
+ */
304
+ image_url?: ScoredImageURLInputChunk.ImageURL | null;
305
+ }
306
+ export declare namespace ScoredImageURLInputChunk {
307
+ interface MarkdownChunkGeneratedMetadata {
308
+ type?: 'markdown';
309
+ file_type?: 'text/markdown';
310
+ language: string;
311
+ word_count: number;
312
+ file_size: number;
313
+ chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
314
+ heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
315
+ start_line?: number;
316
+ num_lines?: number;
317
+ frontmatter?: {
318
+ [key: string]: unknown;
319
+ };
320
+ [k: string]: unknown;
321
+ }
322
+ namespace MarkdownChunkGeneratedMetadata {
323
+ interface ChunkHeading {
324
+ level: number;
325
+ text: string;
326
+ }
327
+ interface HeadingContext {
328
+ level: number;
329
+ text: string;
330
+ }
331
+ }
332
+ interface TextChunkGeneratedMetadata {
333
+ type?: 'text';
334
+ file_type?: 'text/plain';
335
+ language: string;
336
+ word_count: number;
337
+ file_size: number;
338
+ start_line?: number;
339
+ num_lines?: number;
340
+ [k: string]: unknown;
341
+ }
342
+ interface PdfChunkGeneratedMetadata {
343
+ type?: 'pdf';
344
+ file_type?: 'application/pdf';
345
+ total_pages: number;
346
+ total_size: number;
347
+ [k: string]: unknown;
348
+ }
349
+ interface CodeChunkGeneratedMetadata {
350
+ type?: 'code';
351
+ file_type: string;
352
+ language: string;
353
+ word_count: number;
354
+ file_size: number;
355
+ start_line?: number;
356
+ num_lines?: number;
357
+ [k: string]: unknown;
358
+ }
359
+ interface AudioChunkGeneratedMetadata {
360
+ type?: 'audio';
361
+ file_type: string;
362
+ file_size: number;
363
+ total_duration_seconds: number;
364
+ sample_rate: number;
365
+ channels: number;
366
+ audio_format: number;
367
+ [k: string]: unknown;
368
+ }
369
+ interface VideoChunkGeneratedMetadata {
370
+ type?: 'video';
371
+ file_type: string;
372
+ file_size: number;
373
+ total_duration_seconds: number;
374
+ fps: number;
375
+ width: number;
376
+ height: number;
377
+ frame_count: number;
378
+ has_audio_stream?: boolean;
379
+ [k: string]: unknown;
380
+ }
381
+ /**
382
+ * Model for image URL validation.
383
+ */
384
+ interface ImageURL {
385
+ /**
386
+ * The image URL. Can be either a URL or a Data URI.
387
+ */
388
+ url: string;
389
+ /**
390
+ * The image format/mimetype
391
+ */
392
+ format?: string;
393
+ }
394
+ }
395
+ export interface ScoredTextInputChunk {
396
+ /**
397
+ * position of the chunk in a file
398
+ */
399
+ chunk_index: number;
400
+ /**
401
+ * mime type of the chunk
402
+ */
403
+ mime_type?: string;
404
+ /**
405
+ * metadata of the chunk
406
+ */
407
+ generated_metadata?: ScoredTextInputChunk.MarkdownChunkGeneratedMetadata | ScoredTextInputChunk.TextChunkGeneratedMetadata | ScoredTextInputChunk.PdfChunkGeneratedMetadata | ScoredTextInputChunk.CodeChunkGeneratedMetadata | ScoredTextInputChunk.AudioChunkGeneratedMetadata | ScoredTextInputChunk.VideoChunkGeneratedMetadata | null;
408
+ /**
409
+ * model used for this chunk
410
+ */
411
+ model?: string | null;
412
+ /**
413
+ * score of the chunk
414
+ */
415
+ score: number;
416
+ /**
417
+ * file id
418
+ */
419
+ file_id: string;
420
+ /**
421
+ * filename
422
+ */
423
+ filename: string;
424
+ /**
425
+ * store id
426
+ */
427
+ store_id: string;
428
+ /**
429
+ * external identifier for this file
430
+ */
431
+ external_id?: string | null;
432
+ /**
433
+ * file metadata
434
+ */
435
+ metadata?: unknown;
436
+ /**
437
+ * Input type identifier
438
+ */
439
+ type?: 'text';
440
+ /**
441
+ * The offset of the text in the file relative to the start of the file.
442
+ */
443
+ offset?: number;
444
+ /**
445
+ * Text content
446
+ */
447
+ text?: string | null;
448
+ }
449
+ export declare namespace ScoredTextInputChunk {
450
+ interface MarkdownChunkGeneratedMetadata {
451
+ type?: 'markdown';
452
+ file_type?: 'text/markdown';
453
+ language: string;
454
+ word_count: number;
455
+ file_size: number;
456
+ chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
457
+ heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
458
+ start_line?: number;
459
+ num_lines?: number;
460
+ frontmatter?: {
461
+ [key: string]: unknown;
462
+ };
463
+ [k: string]: unknown;
464
+ }
465
+ namespace MarkdownChunkGeneratedMetadata {
466
+ interface ChunkHeading {
467
+ level: number;
468
+ text: string;
469
+ }
470
+ interface HeadingContext {
471
+ level: number;
472
+ text: string;
473
+ }
474
+ }
475
+ interface TextChunkGeneratedMetadata {
476
+ type?: 'text';
477
+ file_type?: 'text/plain';
478
+ language: string;
479
+ word_count: number;
480
+ file_size: number;
481
+ start_line?: number;
482
+ num_lines?: number;
483
+ [k: string]: unknown;
484
+ }
485
+ interface PdfChunkGeneratedMetadata {
486
+ type?: 'pdf';
487
+ file_type?: 'application/pdf';
488
+ total_pages: number;
489
+ total_size: number;
490
+ [k: string]: unknown;
491
+ }
492
+ interface CodeChunkGeneratedMetadata {
493
+ type?: 'code';
494
+ file_type: string;
495
+ language: string;
496
+ word_count: number;
497
+ file_size: number;
498
+ start_line?: number;
499
+ num_lines?: number;
500
+ [k: string]: unknown;
501
+ }
502
+ interface AudioChunkGeneratedMetadata {
503
+ type?: 'audio';
504
+ file_type: string;
505
+ file_size: number;
506
+ total_duration_seconds: number;
507
+ sample_rate: number;
508
+ channels: number;
509
+ audio_format: number;
510
+ [k: string]: unknown;
511
+ }
512
+ interface VideoChunkGeneratedMetadata {
513
+ type?: 'video';
514
+ file_type: string;
515
+ file_size: number;
516
+ total_duration_seconds: number;
517
+ fps: number;
518
+ width: number;
519
+ height: number;
520
+ frame_count: number;
521
+ has_audio_stream?: boolean;
522
+ [k: string]: unknown;
523
+ }
524
+ }
525
+ export interface ScoredVideoURLInputChunk {
526
+ /**
527
+ * position of the chunk in a file
528
+ */
529
+ chunk_index: number;
530
+ /**
531
+ * mime type of the chunk
532
+ */
533
+ mime_type?: string;
534
+ /**
535
+ * metadata of the chunk
536
+ */
537
+ generated_metadata?: ScoredVideoURLInputChunk.MarkdownChunkGeneratedMetadata | ScoredVideoURLInputChunk.TextChunkGeneratedMetadata | ScoredVideoURLInputChunk.PdfChunkGeneratedMetadata | ScoredVideoURLInputChunk.CodeChunkGeneratedMetadata | ScoredVideoURLInputChunk.AudioChunkGeneratedMetadata | ScoredVideoURLInputChunk.VideoChunkGeneratedMetadata | null;
538
+ /**
539
+ * model used for this chunk
540
+ */
541
+ model?: string | null;
542
+ /**
543
+ * score of the chunk
544
+ */
545
+ score: number;
546
+ /**
547
+ * file id
548
+ */
549
+ file_id: string;
550
+ /**
551
+ * filename
552
+ */
553
+ filename: string;
554
+ /**
555
+ * store id
556
+ */
557
+ store_id: string;
558
+ /**
559
+ * external identifier for this file
560
+ */
561
+ external_id?: string | null;
562
+ /**
563
+ * file metadata
564
+ */
565
+ metadata?: unknown;
566
+ /**
567
+ * Input type identifier
568
+ */
569
+ type?: 'video_url';
570
+ /**
571
+ * speech recognition (sr) text of the video
572
+ */
573
+ transcription?: string | null;
574
+ /**
575
+ * summary of the video
576
+ */
577
+ summary?: string | null;
578
+ /**
579
+ * Model for video URL validation.
580
+ */
581
+ video_url?: ScoredVideoURLInputChunk.VideoURL | null;
582
+ }
583
+ export declare namespace ScoredVideoURLInputChunk {
584
+ interface MarkdownChunkGeneratedMetadata {
585
+ type?: 'markdown';
586
+ file_type?: 'text/markdown';
587
+ language: string;
588
+ word_count: number;
589
+ file_size: number;
590
+ chunk_headings?: Array<MarkdownChunkGeneratedMetadata.ChunkHeading>;
591
+ heading_context?: Array<MarkdownChunkGeneratedMetadata.HeadingContext>;
592
+ start_line?: number;
593
+ num_lines?: number;
594
+ frontmatter?: {
595
+ [key: string]: unknown;
596
+ };
597
+ [k: string]: unknown;
598
+ }
599
+ namespace MarkdownChunkGeneratedMetadata {
600
+ interface ChunkHeading {
601
+ level: number;
602
+ text: string;
603
+ }
604
+ interface HeadingContext {
605
+ level: number;
606
+ text: string;
607
+ }
608
+ }
609
+ interface TextChunkGeneratedMetadata {
610
+ type?: 'text';
611
+ file_type?: 'text/plain';
612
+ language: string;
613
+ word_count: number;
614
+ file_size: number;
615
+ start_line?: number;
616
+ num_lines?: number;
617
+ [k: string]: unknown;
618
+ }
619
+ interface PdfChunkGeneratedMetadata {
620
+ type?: 'pdf';
621
+ file_type?: 'application/pdf';
622
+ total_pages: number;
623
+ total_size: number;
624
+ [k: string]: unknown;
625
+ }
626
+ interface CodeChunkGeneratedMetadata {
627
+ type?: 'code';
628
+ file_type: string;
629
+ language: string;
630
+ word_count: number;
631
+ file_size: number;
632
+ start_line?: number;
633
+ num_lines?: number;
634
+ [k: string]: unknown;
635
+ }
636
+ interface AudioChunkGeneratedMetadata {
637
+ type?: 'audio';
638
+ file_type: string;
639
+ file_size: number;
640
+ total_duration_seconds: number;
641
+ sample_rate: number;
642
+ channels: number;
643
+ audio_format: number;
644
+ [k: string]: unknown;
645
+ }
646
+ interface VideoChunkGeneratedMetadata {
647
+ type?: 'video';
648
+ file_type: string;
649
+ file_size: number;
650
+ total_duration_seconds: number;
651
+ fps: number;
652
+ width: number;
653
+ height: number;
654
+ frame_count: number;
655
+ has_audio_stream?: boolean;
656
+ [k: string]: unknown;
657
+ }
658
+ /**
659
+ * Model for video URL validation.
660
+ */
661
+ interface VideoURL {
662
+ /**
663
+ * The video URL. Can be either a URL or a Data URI.
664
+ */
665
+ url: string;
666
+ }
667
+ }
89
668
  /**
90
669
  * Model representing a store with its metadata and timestamps.
91
670
  */
@@ -121,7 +700,7 @@ export interface Store {
121
700
  /**
122
701
  * Represents an expiration policy for a store.
123
702
  */
124
- expires_after?: VectorStoresAPI.ExpiresAfter | null;
703
+ expires_after?: ExpiresAfter | null;
125
704
  /**
126
705
  * Processing status of the store
127
706
  */
@@ -164,6 +743,12 @@ export declare namespace Store {
164
743
  * Contextualize files with metadata
165
744
  */
166
745
  contextualization?: boolean | Config.ContextualizationConfig;
746
+ /**
747
+ * Whether to save original content in the store. When False, only vectors are
748
+ * indexed without the original content (index-only mode). This is useful for data
749
+ * privacy. Note: Reranking is not supported when content is not saved.
750
+ */
751
+ save_content?: boolean;
167
752
  }
168
753
  namespace Config {
169
754
  interface ContextualizationConfig {
@@ -222,7 +807,7 @@ export interface StoreChunkSearchOptions {
222
807
  * Whether to rerank results and optional reranking configuration. Ignored when
223
808
  * agentic is enabled (the agent handles ranking).
224
809
  */
225
- rerank?: boolean | VectorStoresFilesAPI.RerankConfig | null;
810
+ rerank?: boolean | StoreChunkSearchOptions.RerankConfig | null;
226
811
  /**
227
812
  * Whether to use agentic multi-query search with automatic query decomposition and
228
813
  * ranking. When enabled, rewrite_query and rerank options are ignored.
@@ -238,6 +823,24 @@ export interface StoreChunkSearchOptions {
238
823
  apply_search_rules?: boolean;
239
824
  }
240
825
  export declare namespace StoreChunkSearchOptions {
826
+ /**
827
+ * Represents a reranking configuration.
828
+ */
829
+ interface RerankConfig {
830
+ /**
831
+ * The name of the reranking model
832
+ */
833
+ model?: string;
834
+ /**
835
+ * Whether to include metadata in the reranked results
836
+ */
837
+ with_metadata?: boolean | Array<string>;
838
+ /**
839
+ * Maximum number of results to return after reranking. If None, returns all
840
+ * reranked results.
841
+ */
842
+ top_k?: number | null;
843
+ }
241
844
  /**
242
845
  * Configuration for agentic multi-query search.
243
846
  */
@@ -297,7 +900,7 @@ export interface StoreQuestionAnsweringResponse {
297
900
  /**
298
901
  * Source documents used to generate the answer
299
902
  */
300
- sources?: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk>;
903
+ sources?: Array<ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk>;
301
904
  }
302
905
  export interface StoreSearchResponse {
303
906
  /**
@@ -307,7 +910,7 @@ export interface StoreSearchResponse {
307
910
  /**
308
911
  * The list of scored store file chunks
309
912
  */
310
- data: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk>;
913
+ data: Array<ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk>;
311
914
  }
312
915
  export interface StoreCreateParams {
313
916
  /**
@@ -326,7 +929,7 @@ export interface StoreCreateParams {
326
929
  /**
327
930
  * Represents an expiration policy for a store.
328
931
  */
329
- expires_after?: VectorStoresAPI.ExpiresAfter | null;
932
+ expires_after?: ExpiresAfter | null;
330
933
  /**
331
934
  * Optional metadata key-value pairs
332
935
  */
@@ -349,6 +952,12 @@ export declare namespace StoreCreateParams {
349
952
  * Contextualize files with metadata
350
953
  */
351
954
  contextualization?: boolean | Config.ContextualizationConfig;
955
+ /**
956
+ * Whether to save original content in the store. When False, only vectors are
957
+ * indexed without the original content (index-only mode). This is useful for data
958
+ * privacy. Note: Reranking is not supported when content is not saved.
959
+ */
960
+ save_content?: boolean;
352
961
  }
353
962
  namespace Config {
354
963
  interface ContextualizationConfig {
@@ -378,7 +987,7 @@ export interface StoreUpdateParams {
378
987
  /**
379
988
  * Represents an expiration policy for a store.
380
989
  */
381
- expires_after?: VectorStoresAPI.ExpiresAfter | null;
990
+ expires_after?: ExpiresAfter | null;
382
991
  /**
383
992
  * Optional metadata key-value pairs
384
993
  */
@@ -474,7 +1083,7 @@ export interface StoreSearchParams {
474
1083
  /**
475
1084
  * Search query text
476
1085
  */
477
- query: string;
1086
+ query: string | ContentAPI.ImageURLInput | ContentAPI.TextInput;
478
1087
  /**
479
1088
  * IDs or names of stores to search
480
1089
  */
@@ -497,7 +1106,7 @@ export interface StoreSearchParams {
497
1106
  search_options?: StoreChunkSearchOptions;
498
1107
  }
499
1108
  export declare namespace Stores {
500
- export { type Store as Store, type StoreChunkSearchOptions as StoreChunkSearchOptions, type StoreDeleteResponse as StoreDeleteResponse, type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse, type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse, type StoreSearchResponse as StoreSearchResponse, type StoresCursor as StoresCursor, type StoreCreateParams as StoreCreateParams, type StoreUpdateParams as StoreUpdateParams, type StoreListParams as StoreListParams, type StoreMetadataFacetsParams as StoreMetadataFacetsParams, type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams, type StoreSearchParams as StoreSearchParams, };
1109
+ export { type ExpiresAfter as ExpiresAfter, type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk, type ScoredImageURLInputChunk as ScoredImageURLInputChunk, type ScoredTextInputChunk as ScoredTextInputChunk, type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk, type Store as Store, type StoreChunkSearchOptions as StoreChunkSearchOptions, type StoreDeleteResponse as StoreDeleteResponse, type StoreMetadataFacetsResponse as StoreMetadataFacetsResponse, type StoreQuestionAnsweringResponse as StoreQuestionAnsweringResponse, type StoreSearchResponse as StoreSearchResponse, type StoresCursor as StoresCursor, type StoreCreateParams as StoreCreateParams, type StoreUpdateParams as StoreUpdateParams, type StoreListParams as StoreListParams, type StoreMetadataFacetsParams as StoreMetadataFacetsParams, type StoreQuestionAnsweringParams as StoreQuestionAnsweringParams, type StoreSearchParams as StoreSearchParams, };
501
1110
  export { Files as Files, type ScoredStoreFile as ScoredStoreFile, type StoreFileStatus as StoreFileStatus, type StoreFile as StoreFile, type FileListResponse as FileListResponse, type FileDeleteResponse as FileDeleteResponse, type FileSearchResponse as FileSearchResponse, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileSearchParams as FileSearchParams, };
502
1111
  }
503
1112
  //# sourceMappingURL=stores.d.ts.map