@mixedbread/sdk 0.6.0 → 0.8.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 (138) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +12 -24
  3. package/bin/migration-config.json +2 -2
  4. package/client.d.mts +4 -4
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +4 -4
  7. package/client.d.ts.map +1 -1
  8. package/client.js +2 -2
  9. package/client.js.map +1 -1
  10. package/client.mjs +2 -2
  11. package/client.mjs.map +1 -1
  12. package/core/pagination.d.mts +1 -1
  13. package/core/pagination.d.mts.map +1 -1
  14. package/core/pagination.d.ts +1 -1
  15. package/core/pagination.d.ts.map +1 -1
  16. package/core/resource.d.mts +1 -1
  17. package/core/resource.d.mts.map +1 -1
  18. package/core/resource.d.ts +1 -1
  19. package/core/resource.d.ts.map +1 -1
  20. package/core/resource.js.map +1 -1
  21. package/core/resource.mjs.map +1 -1
  22. package/internal/detect-platform.js +3 -3
  23. package/internal/detect-platform.js.map +1 -1
  24. package/internal/detect-platform.mjs +3 -3
  25. package/internal/detect-platform.mjs.map +1 -1
  26. package/internal/headers.d.mts.map +1 -1
  27. package/internal/headers.d.ts.map +1 -1
  28. package/internal/headers.js +4 -4
  29. package/internal/headers.js.map +1 -1
  30. package/internal/headers.mjs +4 -4
  31. package/internal/headers.mjs.map +1 -1
  32. package/internal/shim-types.d.mts +11 -22
  33. package/internal/shim-types.d.mts.map +1 -0
  34. package/internal/shim-types.d.ts +11 -22
  35. package/internal/shim-types.d.ts.map +1 -0
  36. package/internal/shim-types.js +4 -0
  37. package/internal/shim-types.js.map +1 -0
  38. package/internal/shim-types.mjs +3 -0
  39. package/internal/shim-types.mjs.map +1 -0
  40. package/internal/shims.d.mts +2 -2
  41. package/internal/shims.d.mts.map +1 -1
  42. package/internal/shims.d.ts +2 -2
  43. package/internal/shims.d.ts.map +1 -1
  44. package/internal/uploads.js +1 -1
  45. package/internal/uploads.js.map +1 -1
  46. package/internal/uploads.mjs +1 -1
  47. package/internal/uploads.mjs.map +1 -1
  48. package/internal/utils/log.js +1 -1
  49. package/internal/utils/log.js.map +1 -1
  50. package/internal/utils/log.mjs +1 -1
  51. package/internal/utils/log.mjs.map +1 -1
  52. package/internal/utils/path.d.mts.map +1 -1
  53. package/internal/utils/path.d.ts.map +1 -1
  54. package/internal/utils/path.js.map +1 -1
  55. package/internal/utils/path.mjs +1 -1
  56. package/internal/utils/path.mjs.map +1 -1
  57. package/internal/utils/values.d.mts +2 -0
  58. package/internal/utils/values.d.mts.map +1 -1
  59. package/internal/utils/values.d.ts +2 -0
  60. package/internal/utils/values.d.ts.map +1 -1
  61. package/internal/utils/values.js +4 -1
  62. package/internal/utils/values.js.map +1 -1
  63. package/internal/utils/values.mjs +2 -0
  64. package/internal/utils/values.mjs.map +1 -1
  65. package/package.json +1 -4
  66. package/resources/data-sources/connectors.d.mts +14 -4
  67. package/resources/data-sources/connectors.d.mts.map +1 -1
  68. package/resources/data-sources/connectors.d.ts +14 -4
  69. package/resources/data-sources/connectors.d.ts.map +1 -1
  70. package/resources/data-sources/data-sources.d.mts +172 -35
  71. package/resources/data-sources/data-sources.d.mts.map +1 -1
  72. package/resources/data-sources/data-sources.d.ts +172 -35
  73. package/resources/data-sources/data-sources.d.ts.map +1 -1
  74. package/resources/data-sources/data-sources.js.map +1 -1
  75. package/resources/data-sources/data-sources.mjs.map +1 -1
  76. package/resources/data-sources/index.d.mts +1 -1
  77. package/resources/data-sources/index.d.mts.map +1 -1
  78. package/resources/data-sources/index.d.ts +1 -1
  79. package/resources/data-sources/index.d.ts.map +1 -1
  80. package/resources/data-sources/index.js.map +1 -1
  81. package/resources/data-sources/index.mjs.map +1 -1
  82. package/resources/extractions/content.d.mts +4 -0
  83. package/resources/extractions/content.d.mts.map +1 -1
  84. package/resources/extractions/content.d.ts +4 -0
  85. package/resources/extractions/content.d.ts.map +1 -1
  86. package/resources/index.d.mts +1 -1
  87. package/resources/index.d.mts.map +1 -1
  88. package/resources/index.d.ts +1 -1
  89. package/resources/index.d.ts.map +1 -1
  90. package/resources/index.js.map +1 -1
  91. package/resources/index.mjs.map +1 -1
  92. package/resources/vector-stores/files.d.mts +59 -26
  93. package/resources/vector-stores/files.d.mts.map +1 -1
  94. package/resources/vector-stores/files.d.ts +59 -26
  95. package/resources/vector-stores/files.d.ts.map +1 -1
  96. package/resources/vector-stores/files.js +32 -31
  97. package/resources/vector-stores/files.js.map +1 -1
  98. package/resources/vector-stores/files.mjs +32 -31
  99. package/resources/vector-stores/files.mjs.map +1 -1
  100. package/resources/vector-stores/index.d.mts +1 -1
  101. package/resources/vector-stores/index.d.mts.map +1 -1
  102. package/resources/vector-stores/index.d.ts +1 -1
  103. package/resources/vector-stores/index.d.ts.map +1 -1
  104. package/resources/vector-stores/index.js.map +1 -1
  105. package/resources/vector-stores/index.mjs.map +1 -1
  106. package/resources/vector-stores/vector-stores.d.mts +53 -18
  107. package/resources/vector-stores/vector-stores.d.mts.map +1 -1
  108. package/resources/vector-stores/vector-stores.d.ts +53 -18
  109. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  110. package/resources/vector-stores/vector-stores.js +18 -15
  111. package/resources/vector-stores/vector-stores.js.map +1 -1
  112. package/resources/vector-stores/vector-stores.mjs +18 -15
  113. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  114. package/src/client.ts +10 -4
  115. package/src/core/pagination.ts +1 -1
  116. package/src/core/resource.ts +1 -1
  117. package/src/internal/detect-platform.ts +3 -3
  118. package/src/internal/headers.ts +5 -5
  119. package/src/internal/shim-types.ts +26 -0
  120. package/src/internal/shims.ts +2 -2
  121. package/src/internal/uploads.ts +2 -2
  122. package/src/internal/utils/log.ts +1 -1
  123. package/src/internal/utils/path.ts +1 -1
  124. package/src/internal/utils/values.ts +3 -0
  125. package/src/resources/data-sources/connectors.ts +14 -4
  126. package/src/resources/data-sources/data-sources.ts +207 -37
  127. package/src/resources/data-sources/index.ts +3 -0
  128. package/src/resources/extractions/content.ts +5 -0
  129. package/src/resources/index.ts +3 -0
  130. package/src/resources/vector-stores/files.ts +81 -39
  131. package/src/resources/vector-stores/index.ts +2 -0
  132. package/src/resources/vector-stores/vector-stores.ts +67 -20
  133. package/src/version.ts +1 -1
  134. package/version.d.mts +1 -1
  135. package/version.d.ts +1 -1
  136. package/version.js +1 -1
  137. package/version.mjs +1 -1
  138. package/src/internal/shim-types.d.ts +0 -28
@@ -12,8 +12,10 @@ import {
12
12
  FileSearchParams,
13
13
  FileSearchResponse,
14
14
  Files,
15
+ RerankConfig,
15
16
  ScoredVectorStoreFile,
16
17
  VectorStoreFile,
18
+ VectorStoreFileStatus,
17
19
  VectorStoreFilesLimitOffset,
18
20
  } from './files';
19
21
  import { APIPromise } from '../../core/api-promise';
@@ -37,37 +39,38 @@ export class VectorStores extends APIResource {
37
39
  }
38
40
 
39
41
  /**
40
- * Get a vector store by ID.
42
+ * Get a vector store by ID or name.
41
43
  *
42
- * Args: vector_store_id: The ID of the vector store to retrieve.
44
+ * Args: vector_store_identifier: The ID or name of the vector store to retrieve.
43
45
  *
44
46
  * Returns: VectorStore: The response containing the vector store details.
45
47
  */
46
- retrieve(vectorStoreID: string, options?: RequestOptions): APIPromise<VectorStore> {
47
- return this._client.get(path`/v1/vector_stores/${vectorStoreID}`, options);
48
+ retrieve(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStore> {
49
+ return this._client.get(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
48
50
  }
49
51
 
50
52
  /**
51
- * Update a vector store by ID.
53
+ * Update a vector store by ID or name.
52
54
  *
53
- * Args: vector_store_id: The ID of the vector store to update.
55
+ * Args: vector_store_identifier: The ID or name of the vector store to update.
54
56
  * vector_store_update: VectorStoreCreate object containing the name, description,
55
57
  * and metadata.
56
58
  *
57
59
  * Returns: VectorStore: The response containing the updated vector store details.
58
60
  */
59
61
  update(
60
- vectorStoreID: string,
62
+ vectorStoreIdentifier: string,
61
63
  body: VectorStoreUpdateParams,
62
64
  options?: RequestOptions,
63
65
  ): APIPromise<VectorStore> {
64
- return this._client.put(path`/v1/vector_stores/${vectorStoreID}`, { body, ...options });
66
+ return this._client.put(path`/v1/vector_stores/${vectorStoreIdentifier}`, { body, ...options });
65
67
  }
66
68
 
67
69
  /**
68
- * List all vector stores.
70
+ * List all vector stores with optional search.
69
71
  *
70
- * Args: pagination: The pagination options.
72
+ * Args: pagination: The pagination options. q: Optional search query to filter
73
+ * vector stores.
71
74
  *
72
75
  * Returns: VectorStoreListResponse: The list of vector stores.
73
76
  */
@@ -79,14 +82,14 @@ export class VectorStores extends APIResource {
79
82
  }
80
83
 
81
84
  /**
82
- * Delete a vector store by ID.
85
+ * Delete a vector store by ID or name.
83
86
  *
84
- * Args: vector_store_id: The ID of the vector store to delete.
87
+ * Args: vector_store_identifier: The ID or name of the vector store to delete.
85
88
  *
86
89
  * Returns: VectorStore: The response containing the deleted vector store details.
87
90
  */
88
- delete(vectorStoreID: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
89
- return this._client.delete(path`/v1/vector_stores/${vectorStoreID}`, options);
91
+ delete(vectorStoreIdentifier: string, options?: RequestOptions): APIPromise<VectorStoreDeleteResponse> {
92
+ return this._client.delete(path`/v1/vector_stores/${vectorStoreIdentifier}`, options);
90
93
  }
91
94
 
92
95
  /**
@@ -107,7 +110,9 @@ export class VectorStores extends APIResource {
107
110
  * relevance-scored results.
108
111
  *
109
112
  * Args: search_params: Search configuration including: - query text or
110
- * embeddings - metadata filters - pagination parameters - sorting preferences
113
+ * embeddings - vector_store_ids: List of vector stores to search - file_ids:
114
+ * Optional list of file IDs to filter chunks by (or tuple of list and condition
115
+ * operator) - metadata filters - pagination parameters - sorting preferences
111
116
  * \_state: API state dependency \_ctx: Service context dependency
112
117
  *
113
118
  * Returns: VectorStoreSearchChunkResponse containing: - List of matched chunks
@@ -283,6 +288,11 @@ export namespace ScoredImageURLInputChunk {
283
288
  * The image URL. Can be either a URL or a Data URI.
284
289
  */
285
290
  url: string;
291
+
292
+ /**
293
+ * The image format/mimetype
294
+ */
295
+ format?: string;
286
296
  }
287
297
  }
288
298
 
@@ -487,6 +497,11 @@ export namespace VectorStore {
487
497
  * Counts of files in different states
488
498
  */
489
499
  export interface FileCounts {
500
+ /**
501
+ * Number of files waiting to be processed
502
+ */
503
+ pending?: number;
504
+
490
505
  /**
491
506
  * Number of files currently being processed
492
507
  */
@@ -528,6 +543,11 @@ export interface VectorStoreChunkSearchOptions {
528
543
  */
529
544
  rewrite_query?: boolean;
530
545
 
546
+ /**
547
+ * Whether to rerank results and optional reranking configuration
548
+ */
549
+ rerank?: boolean | FilesAPI.RerankConfig | null;
550
+
531
551
  /**
532
552
  * Whether to return file metadata
533
553
  */
@@ -634,7 +654,12 @@ export interface VectorStoreUpdateParams {
634
654
  metadata?: unknown;
635
655
  }
636
656
 
637
- export interface VectorStoreListParams extends LimitOffsetParams {}
657
+ export interface VectorStoreListParams extends LimitOffsetParams {
658
+ /**
659
+ * Search query for fuzzy matching over name and description fields
660
+ */
661
+ q?: string | null;
662
+ }
638
663
 
639
664
  export interface VectorStoreQuestionAnsweringParams {
640
665
  /**
@@ -644,9 +669,14 @@ export interface VectorStoreQuestionAnsweringParams {
644
669
  query?: string;
645
670
 
646
671
  /**
647
- * IDs of vector stores to search
672
+ * IDs or names of vector stores to search
648
673
  */
649
- vector_store_ids: Array<string>;
674
+ vector_store_identifiers?: Array<string> | null;
675
+
676
+ /**
677
+ * @deprecated
678
+ */
679
+ vector_store_ids?: Array<string> | null;
650
680
 
651
681
  /**
652
682
  * Number of results to return
@@ -662,6 +692,11 @@ export interface VectorStoreQuestionAnsweringParams {
662
692
  | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
663
693
  | null;
664
694
 
695
+ /**
696
+ * Optional list of file IDs to filter chunks by (inclusion filter)
697
+ */
698
+ file_ids?: Array<unknown> | Array<string> | null;
699
+
665
700
  /**
666
701
  * Search configuration options
667
702
  */
@@ -702,9 +737,14 @@ export interface VectorStoreSearchParams {
702
737
  query: string;
703
738
 
704
739
  /**
705
- * IDs of vector stores to search
740
+ * IDs or names of vector stores to search
706
741
  */
707
- vector_store_ids: Array<string>;
742
+ vector_store_identifiers?: Array<string> | null;
743
+
744
+ /**
745
+ * @deprecated
746
+ */
747
+ vector_store_ids?: Array<string> | null;
708
748
 
709
749
  /**
710
750
  * Number of results to return
@@ -720,6 +760,11 @@ export interface VectorStoreSearchParams {
720
760
  | Array<Shared.SearchFilter | Shared.SearchFilterCondition>
721
761
  | null;
722
762
 
763
+ /**
764
+ * Optional list of file IDs to filter chunks by (inclusion filter)
765
+ */
766
+ file_ids?: Array<unknown> | Array<string> | null;
767
+
723
768
  /**
724
769
  * Search configuration options
725
770
  */
@@ -750,7 +795,9 @@ export declare namespace VectorStores {
750
795
 
751
796
  export {
752
797
  Files as Files,
798
+ type RerankConfig as RerankConfig,
753
799
  type ScoredVectorStoreFile as ScoredVectorStoreFile,
800
+ type VectorStoreFileStatus as VectorStoreFileStatus,
754
801
  type VectorStoreFile as VectorStoreFile,
755
802
  type FileDeleteResponse as FileDeleteResponse,
756
803
  type FileSearchResponse as FileSearchResponse,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.6.0'; // x-release-please-version
1
+ export const VERSION = '0.8.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.6.0";
1
+ export declare const VERSION = "0.8.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.6.0";
1
+ export declare const VERSION = "0.8.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.6.0'; // x-release-please-version
4
+ exports.VERSION = '0.8.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.6.0'; // x-release-please-version
1
+ export const VERSION = '0.8.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,28 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- /**
4
- * Shims for types that we can't always rely on being available globally.
5
- *
6
- * Note: these only exist at the type-level, there is no corresponding runtime
7
- * version for any of these symbols.
8
- */
9
-
10
- /**
11
- * In order to properly access the global `NodeJS` type, if it's available, we
12
- * need to make use of declaration shadowing. Without this, any checks for the
13
- * presence of `NodeJS.ReadableStream` will fail.
14
- */
15
- declare namespace NodeJS {
16
- interface ReadableStream {}
17
- }
18
-
19
- type HasProperties<T> = keyof T extends never ? false : true;
20
-
21
- // @ts-ignore
22
- type _ReadableStream<R = any> =
23
- // @ts-ignore
24
- HasProperties<NodeJS.ReadableStream> extends true ? NodeJS.ReadableStream<R> : ReadableStream<R>;
25
-
26
- // @ts-ignore
27
- declare const _ReadableStream: unknown extends typeof ReadableStream ? never : typeof ReadableStream;
28
- export { _ReadableStream as ReadableStream };