@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
@@ -0,0 +1,372 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as Shared from "../shared.js";
3
+ import * as FilesAPI from "./files.js";
4
+ import { FileCreateParams, FileDeleteParams, FileDeleteResponse, FileListParams, FileListResponse, FileRetrieveParams, FileSearchParams, FileSearchResponse, 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
+ import { APIPromise } from "../../core/api-promise.js";
8
+ import { Cursor, type CursorParams, PagePromise } from "../../core/pagination.js";
9
+ import { RequestOptions } from "../../internal/request-options.js";
10
+ export declare class Stores extends APIResource {
11
+ files: FilesAPI.Files;
12
+ /**
13
+ * Create a new vector store.
14
+ *
15
+ * Args: vector_store_create: VectorStoreCreate object containing the name,
16
+ * description, and metadata.
17
+ *
18
+ * Returns: VectorStore: The response containing the created vector store details.
19
+ */
20
+ create(body: StoreCreateParams, options?: RequestOptions): APIPromise<Store>;
21
+ /**
22
+ * Get a store by ID or name.
23
+ *
24
+ * Args: store_identifier: The ID or name of the store to retrieve.
25
+ *
26
+ * Returns: Store: The response containing the store details.
27
+ */
28
+ retrieve(storeIdentifier: string, options?: RequestOptions): APIPromise<Store>;
29
+ /**
30
+ * Update a store by ID or name.
31
+ *
32
+ * Args: store_identifier: The ID or name of the store to update. store_update:
33
+ * StoreCreate object containing the name, description, and metadata.
34
+ *
35
+ * Returns: Store: The response containing the updated store details.
36
+ */
37
+ update(storeIdentifier: string, body: StoreUpdateParams, options?: RequestOptions): APIPromise<Store>;
38
+ /**
39
+ * List all stores with optional search.
40
+ *
41
+ * Args: pagination: The pagination options. q: Optional search query to filter
42
+ * vector stores.
43
+ *
44
+ * Returns: StoreListResponse: The list of stores.
45
+ */
46
+ list(query?: StoreListParams | null | undefined, options?: RequestOptions): PagePromise<StoresCursor, Store>;
47
+ /**
48
+ * Delete a store by ID or name.
49
+ *
50
+ * Args: store_identifier: The ID or name of the store to delete.
51
+ *
52
+ * Returns: Store: The response containing the deleted store details.
53
+ */
54
+ delete(storeIdentifier: string, options?: RequestOptions): APIPromise<StoreDeleteResponse>;
55
+ /**
56
+ * Question answering
57
+ */
58
+ questionAnswering(body: StoreQuestionAnsweringParams, options?: RequestOptions): APIPromise<StoreQuestionAnsweringResponse>;
59
+ /**
60
+ * Perform semantic search across store chunks.
61
+ *
62
+ * This endpoint searches through store chunks using semantic similarity matching.
63
+ * It supports complex search queries with filters and returns relevance-scored
64
+ * results.
65
+ *
66
+ * Args: search_params: Search configuration including: - query text or
67
+ * embeddings - store_identifiers: List of store identifiers to search - file_ids:
68
+ * Optional list of file IDs to filter chunks by (or tuple of list and condition
69
+ * operator) - metadata filters - pagination parameters - sorting preferences
70
+ * \_state: API state dependency \_ctx: Service context dependency
71
+ *
72
+ * Returns: StoreSearchResponse containing: - List of matched chunks with relevance
73
+ * scores - Pagination details including total result count
74
+ *
75
+ * Raises: HTTPException (400): If search parameters are invalid HTTPException
76
+ * (404): If no vector stores are found to search
77
+ */
78
+ search(body: StoreSearchParams, options?: RequestOptions): APIPromise<StoreSearchResponse>;
79
+ }
80
+ export type StoresCursor = Cursor<Store>;
81
+ /**
82
+ * Model representing a store with its metadata and timestamps.
83
+ */
84
+ export interface Store {
85
+ /**
86
+ * Unique identifier for the store
87
+ */
88
+ id: string;
89
+ /**
90
+ * Name of the store
91
+ */
92
+ name: string;
93
+ /**
94
+ * Detailed description of the store's purpose and contents
95
+ */
96
+ description?: string | null;
97
+ /**
98
+ * Whether the store can be accessed by anyone with valid login credentials
99
+ */
100
+ is_public?: boolean;
101
+ /**
102
+ * Additional metadata associated with the store
103
+ */
104
+ metadata?: unknown;
105
+ /**
106
+ * Counts of files in different states
107
+ */
108
+ file_counts?: Store.FileCounts;
109
+ /**
110
+ * Represents an expiration policy for a store.
111
+ */
112
+ expires_after?: VectorStoresAPI.ExpiresAfter | null;
113
+ /**
114
+ * Processing status of the store
115
+ */
116
+ status?: 'expired' | 'in_progress' | 'completed';
117
+ /**
118
+ * Timestamp when the store was created
119
+ */
120
+ created_at: string;
121
+ /**
122
+ * Timestamp when the store was last updated
123
+ */
124
+ updated_at: string;
125
+ /**
126
+ * Timestamp when the store was last used
127
+ */
128
+ last_active_at?: string | null;
129
+ /**
130
+ * Total storage usage in bytes
131
+ */
132
+ usage_bytes?: number;
133
+ /**
134
+ * Optional expiration timestamp for the store
135
+ */
136
+ expires_at?: string | null;
137
+ /**
138
+ * Type of the object
139
+ */
140
+ object?: 'store';
141
+ }
142
+ export declare namespace Store {
143
+ /**
144
+ * Counts of files in different states
145
+ */
146
+ interface FileCounts {
147
+ /**
148
+ * Number of files waiting to be processed
149
+ */
150
+ pending?: number;
151
+ /**
152
+ * Number of files currently being processed
153
+ */
154
+ in_progress?: number;
155
+ /**
156
+ * Number of files whose processing was cancelled
157
+ */
158
+ cancelled?: number;
159
+ /**
160
+ * Number of successfully processed files
161
+ */
162
+ completed?: number;
163
+ /**
164
+ * Number of files that failed processing
165
+ */
166
+ failed?: number;
167
+ /**
168
+ * Total number of files
169
+ */
170
+ total?: number;
171
+ }
172
+ }
173
+ /**
174
+ * Options for configuring store chunk searches.
175
+ */
176
+ export interface StoreChunkSearchOptions {
177
+ /**
178
+ * Minimum similarity score threshold
179
+ */
180
+ score_threshold?: number;
181
+ /**
182
+ * Whether to rewrite the query
183
+ */
184
+ rewrite_query?: boolean;
185
+ /**
186
+ * Whether to rerank results and optional reranking configuration
187
+ */
188
+ rerank?: boolean | VectorStoresFilesAPI.RerankConfig | null;
189
+ /**
190
+ * Whether to return file metadata
191
+ */
192
+ return_metadata?: boolean;
193
+ /**
194
+ * Whether to apply search rules
195
+ */
196
+ apply_search_rules?: boolean;
197
+ }
198
+ /**
199
+ * Response model for store deletion.
200
+ */
201
+ export interface StoreDeleteResponse {
202
+ /**
203
+ * ID of the deleted store
204
+ */
205
+ id: string;
206
+ /**
207
+ * Whether the deletion was successful
208
+ */
209
+ deleted: boolean;
210
+ /**
211
+ * Type of the deleted object
212
+ */
213
+ object?: 'store';
214
+ }
215
+ /**
216
+ * Results from a question answering operation.
217
+ */
218
+ export interface StoreQuestionAnsweringResponse {
219
+ /**
220
+ * The answer generated by the LLM
221
+ */
222
+ answer: string;
223
+ /**
224
+ * Source documents used to generate the answer
225
+ */
226
+ sources?: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk>;
227
+ }
228
+ export interface StoreSearchResponse {
229
+ /**
230
+ * The object type of the response
231
+ */
232
+ object?: 'list';
233
+ /**
234
+ * The list of scored store file chunks
235
+ */
236
+ data: Array<VectorStoresAPI.ScoredTextInputChunk | VectorStoresAPI.ScoredImageURLInputChunk | VectorStoresAPI.ScoredAudioURLInputChunk | VectorStoresAPI.ScoredVideoURLInputChunk>;
237
+ }
238
+ export interface StoreCreateParams {
239
+ /**
240
+ * Name for the new store
241
+ */
242
+ name?: string | null;
243
+ /**
244
+ * Description of the store
245
+ */
246
+ description?: string | null;
247
+ /**
248
+ * Whether the store can be accessed by anyone with valid login credentials
249
+ */
250
+ is_public?: boolean;
251
+ /**
252
+ * Represents an expiration policy for a store.
253
+ */
254
+ expires_after?: VectorStoresAPI.ExpiresAfter | null;
255
+ /**
256
+ * Optional metadata key-value pairs
257
+ */
258
+ metadata?: unknown;
259
+ /**
260
+ * Optional list of file IDs
261
+ */
262
+ file_ids?: Array<string> | null;
263
+ }
264
+ export interface StoreUpdateParams {
265
+ /**
266
+ * New name for the store
267
+ */
268
+ name?: string | null;
269
+ /**
270
+ * New description
271
+ */
272
+ description?: string | null;
273
+ /**
274
+ * Whether the store can be accessed by anyone with valid login credentials
275
+ */
276
+ is_public?: boolean | null;
277
+ /**
278
+ * Represents an expiration policy for a store.
279
+ */
280
+ expires_after?: VectorStoresAPI.ExpiresAfter | null;
281
+ /**
282
+ * Optional metadata key-value pairs
283
+ */
284
+ metadata?: unknown;
285
+ }
286
+ export interface StoreListParams extends CursorParams {
287
+ /**
288
+ * Search query for fuzzy matching over name and description fields
289
+ */
290
+ q?: string | null;
291
+ }
292
+ export interface StoreQuestionAnsweringParams {
293
+ /**
294
+ * Question to answer. If not provided, the question will be extracted from the
295
+ * passed messages.
296
+ */
297
+ query?: string;
298
+ /**
299
+ * IDs or names of stores to search
300
+ */
301
+ store_identifiers: Array<string>;
302
+ /**
303
+ * Number of results to return
304
+ */
305
+ top_k?: number;
306
+ /**
307
+ * Optional filter conditions
308
+ */
309
+ filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
310
+ /**
311
+ * Optional list of file IDs to filter chunks by (inclusion filter)
312
+ */
313
+ file_ids?: Array<unknown> | Array<string> | null;
314
+ /**
315
+ * Search configuration options
316
+ */
317
+ search_options?: StoreChunkSearchOptions;
318
+ /**
319
+ * Whether to stream the answer
320
+ */
321
+ stream?: boolean;
322
+ /**
323
+ * Question answering configuration options
324
+ */
325
+ qa_options?: StoreQuestionAnsweringParams.QaOptions;
326
+ }
327
+ export declare namespace StoreQuestionAnsweringParams {
328
+ /**
329
+ * Question answering configuration options
330
+ */
331
+ interface QaOptions {
332
+ /**
333
+ * Whether to use citations
334
+ */
335
+ cite?: boolean;
336
+ /**
337
+ * Whether to use multimodal context
338
+ */
339
+ multimodal?: boolean;
340
+ }
341
+ }
342
+ export interface StoreSearchParams {
343
+ /**
344
+ * Search query text
345
+ */
346
+ query: string;
347
+ /**
348
+ * IDs or names of stores to search
349
+ */
350
+ store_identifiers: Array<string>;
351
+ /**
352
+ * Number of results to return
353
+ */
354
+ top_k?: number;
355
+ /**
356
+ * Optional filter conditions
357
+ */
358
+ filters?: Shared.SearchFilter | Shared.SearchFilterCondition | Array<Shared.SearchFilter | Shared.SearchFilterCondition> | null;
359
+ /**
360
+ * Optional list of file IDs to filter chunks by (inclusion filter)
361
+ */
362
+ file_ids?: Array<unknown> | Array<string> | null;
363
+ /**
364
+ * Search configuration options
365
+ */
366
+ search_options?: StoreChunkSearchOptions;
367
+ }
368
+ export declare namespace Stores {
369
+ export { type Store as Store, type StoreChunkSearchOptions as StoreChunkSearchOptions, type StoreDeleteResponse as StoreDeleteResponse, 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 StoreQuestionAnsweringParams as StoreQuestionAnsweringParams, type StoreSearchParams as StoreSearchParams, };
370
+ 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 FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileSearchParams as FileSearchParams, };
371
+ }
372
+ //# sourceMappingURL=stores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.d.ts","sourceRoot":"","sources":["../../src/resources/stores/stores.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,eAAe,EACf,SAAS,EACT,eAAe,EAChB;OACM,KAAK,oBAAoB;OACzB,KAAK,eAAe;OACpB,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IA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ict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Stores = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const FilesAPI = tslib_1.__importStar(require("./files.js"));
8
+ const files_1 = require("./files.js");
9
+ const pagination_1 = require("../../core/pagination.js");
10
+ const path_1 = require("../../internal/utils/path.js");
11
+ class Stores extends resource_1.APIResource {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.files = new FilesAPI.Files(this._client);
15
+ }
16
+ /**
17
+ * Create a new vector store.
18
+ *
19
+ * Args: vector_store_create: VectorStoreCreate object containing the name,
20
+ * description, and metadata.
21
+ *
22
+ * Returns: VectorStore: The response containing the created vector store details.
23
+ */
24
+ create(body, options) {
25
+ return this._client.post('/v1/stores', { body, ...options });
26
+ }
27
+ /**
28
+ * Get a store by ID or name.
29
+ *
30
+ * Args: store_identifier: The ID or name of the store to retrieve.
31
+ *
32
+ * Returns: Store: The response containing the store details.
33
+ */
34
+ retrieve(storeIdentifier, options) {
35
+ return this._client.get((0, path_1.path) `/v1/stores/${storeIdentifier}`, options);
36
+ }
37
+ /**
38
+ * Update a store by ID or name.
39
+ *
40
+ * Args: store_identifier: The ID or name of the store to update. store_update:
41
+ * StoreCreate object containing the name, description, and metadata.
42
+ *
43
+ * Returns: Store: The response containing the updated store details.
44
+ */
45
+ update(storeIdentifier, body, options) {
46
+ return this._client.put((0, path_1.path) `/v1/stores/${storeIdentifier}`, { body, ...options });
47
+ }
48
+ /**
49
+ * List all stores with optional search.
50
+ *
51
+ * Args: pagination: The pagination options. q: Optional search query to filter
52
+ * vector stores.
53
+ *
54
+ * Returns: StoreListResponse: The list of stores.
55
+ */
56
+ list(query = {}, options) {
57
+ return this._client.getAPIList('/v1/stores', (pagination_1.Cursor), { query, ...options });
58
+ }
59
+ /**
60
+ * Delete a store by ID or name.
61
+ *
62
+ * Args: store_identifier: The ID or name of the store to delete.
63
+ *
64
+ * Returns: Store: The response containing the deleted store details.
65
+ */
66
+ delete(storeIdentifier, options) {
67
+ return this._client.delete((0, path_1.path) `/v1/stores/${storeIdentifier}`, options);
68
+ }
69
+ /**
70
+ * Question answering
71
+ */
72
+ questionAnswering(body, options) {
73
+ return this._client.post('/v1/stores/question-answering', { body, ...options });
74
+ }
75
+ /**
76
+ * Perform semantic search across store chunks.
77
+ *
78
+ * This endpoint searches through store chunks using semantic similarity matching.
79
+ * It supports complex search queries with filters and returns relevance-scored
80
+ * results.
81
+ *
82
+ * Args: search_params: Search configuration including: - query text or
83
+ * embeddings - store_identifiers: List of store identifiers to search - file_ids:
84
+ * Optional list of file IDs to filter chunks by (or tuple of list and condition
85
+ * operator) - metadata filters - pagination parameters - sorting preferences
86
+ * \_state: API state dependency \_ctx: Service context dependency
87
+ *
88
+ * Returns: StoreSearchResponse containing: - List of matched chunks with relevance
89
+ * scores - Pagination details including total result count
90
+ *
91
+ * Raises: HTTPException (400): If search parameters are invalid HTTPException
92
+ * (404): If no vector stores are found to search
93
+ */
94
+ search(body, options) {
95
+ return this._client.post('/v1/stores/search', { body, ...options });
96
+ }
97
+ }
98
+ exports.Stores = Stores;
99
+ Stores.Files = files_1.Files;
100
+ //# sourceMappingURL=stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.js","sourceRoot":"","sources":["../../src/resources/stores/stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAaiB;AAIjB,yDAA+E;AAE/E,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA+F3D,CAAC;IA7FC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAA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C;AAiXD,MAAM,CAAC,KAAK,GAAG,aAAK,CAAC"}
@@ -0,0 +1,95 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as FilesAPI from "./files.mjs";
4
+ import { Files, } from "./files.mjs";
5
+ import { Cursor } from "../../core/pagination.mjs";
6
+ import { path } from "../../internal/utils/path.mjs";
7
+ export class Stores extends APIResource {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.files = new FilesAPI.Files(this._client);
11
+ }
12
+ /**
13
+ * Create a new vector store.
14
+ *
15
+ * Args: vector_store_create: VectorStoreCreate object containing the name,
16
+ * description, and metadata.
17
+ *
18
+ * Returns: VectorStore: The response containing the created vector store details.
19
+ */
20
+ create(body, options) {
21
+ return this._client.post('/v1/stores', { body, ...options });
22
+ }
23
+ /**
24
+ * Get a store by ID or name.
25
+ *
26
+ * Args: store_identifier: The ID or name of the store to retrieve.
27
+ *
28
+ * Returns: Store: The response containing the store details.
29
+ */
30
+ retrieve(storeIdentifier, options) {
31
+ return this._client.get(path `/v1/stores/${storeIdentifier}`, options);
32
+ }
33
+ /**
34
+ * Update a store by ID or name.
35
+ *
36
+ * Args: store_identifier: The ID or name of the store to update. store_update:
37
+ * StoreCreate object containing the name, description, and metadata.
38
+ *
39
+ * Returns: Store: The response containing the updated store details.
40
+ */
41
+ update(storeIdentifier, body, options) {
42
+ return this._client.put(path `/v1/stores/${storeIdentifier}`, { body, ...options });
43
+ }
44
+ /**
45
+ * List all stores with optional search.
46
+ *
47
+ * Args: pagination: The pagination options. q: Optional search query to filter
48
+ * vector stores.
49
+ *
50
+ * Returns: StoreListResponse: The list of stores.
51
+ */
52
+ list(query = {}, options) {
53
+ return this._client.getAPIList('/v1/stores', (Cursor), { query, ...options });
54
+ }
55
+ /**
56
+ * Delete a store by ID or name.
57
+ *
58
+ * Args: store_identifier: The ID or name of the store to delete.
59
+ *
60
+ * Returns: Store: The response containing the deleted store details.
61
+ */
62
+ delete(storeIdentifier, options) {
63
+ return this._client.delete(path `/v1/stores/${storeIdentifier}`, options);
64
+ }
65
+ /**
66
+ * Question answering
67
+ */
68
+ questionAnswering(body, options) {
69
+ return this._client.post('/v1/stores/question-answering', { body, ...options });
70
+ }
71
+ /**
72
+ * Perform semantic search across store chunks.
73
+ *
74
+ * This endpoint searches through store chunks using semantic similarity matching.
75
+ * It supports complex search queries with filters and returns relevance-scored
76
+ * results.
77
+ *
78
+ * Args: search_params: Search configuration including: - query text or
79
+ * embeddings - store_identifiers: List of store identifiers to search - file_ids:
80
+ * Optional list of file IDs to filter chunks by (or tuple of list and condition
81
+ * operator) - metadata filters - pagination parameters - sorting preferences
82
+ * \_state: API state dependency \_ctx: Service context dependency
83
+ *
84
+ * Returns: StoreSearchResponse containing: - List of matched chunks with relevance
85
+ * scores - Pagination details including total result count
86
+ *
87
+ * Raises: HTTPException (400): If search parameters are invalid HTTPException
88
+ * (404): If no vector stores are found to search
89
+ */
90
+ search(body, options) {
91
+ return this._client.post('/v1/stores/search', { body, ...options });
92
+ }
93
+ }
94
+ Stores.Files = Files;
95
+ //# sourceMappingURL=stores.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.mjs","sourceRoot":"","sources":["../../src/resources/stores/stores.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EASL,KAAK,GAIN;OAIM,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA+F3D,CAAC;IA7FC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EA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"./stores/index.mjs";
2
+ //# sourceMappingURL=stores.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.d.mts","sourceRoot":"","sources":["../src/resources/stores.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./stores/index.js";
2
+ //# sourceMappingURL=stores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.d.ts","sourceRoot":"","sources":["../src/resources/stores.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./stores/index.js"), exports);
6
+ //# sourceMappingURL=stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.js","sourceRoot":"","sources":["../src/resources/stores.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./stores/index.mjs";
3
+ //# sourceMappingURL=stores.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stores.mjs","sourceRoot":"","sources":["../src/resources/stores.ts"],"names":[],"mappings":"AAAA,sFAAsF"}