@mastra/opensearch 0.0.0-working-memory-per-user-20250620161509 → 0.0.0-zod-v4-compat-part-2-20250820135355

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.
@@ -9,10 +9,11 @@ import type {
9
9
  UpdateVectorParams,
10
10
  UpsertVectorParams,
11
11
  } from '@mastra/core';
12
+ import { MastraError, ErrorDomain, ErrorCategory } from '@mastra/core/error';
12
13
  import { MastraVector } from '@mastra/core/vector';
13
- import type { VectorFilter } from '@mastra/core/vector/filter';
14
14
  import { Client as OpenSearchClient } from '@opensearch-project/opensearch';
15
15
  import { OpenSearchFilterTranslator } from './filter';
16
+ import type { OpenSearchVectorFilter } from './filter';
16
17
 
17
18
  const METRIC_MAPPING = {
18
19
  cosine: 'cosinesimil',
@@ -26,7 +27,9 @@ const REVERSE_METRIC_MAPPING = {
26
27
  innerproduct: 'dotproduct',
27
28
  } as const;
28
29
 
29
- export class OpenSearchVector extends MastraVector {
30
+ type OpenSearchVectorParams = QueryVectorParams<OpenSearchVectorFilter>;
31
+
32
+ export class OpenSearchVector extends MastraVector<OpenSearchVectorFilter> {
30
33
  private client: OpenSearchClient;
31
34
 
32
35
  /**
@@ -49,7 +52,13 @@ export class OpenSearchVector extends MastraVector {
49
52
  */
50
53
  async createIndex({ indexName, dimension, metric = 'cosine' }: CreateIndexParams): Promise<void> {
51
54
  if (!Number.isInteger(dimension) || dimension <= 0) {
52
- throw new Error('Dimension must be a positive integer');
55
+ throw new MastraError({
56
+ id: 'STORAGE_OPENSEARCH_VECTOR_CREATE_INDEX_INVALID_ARGS',
57
+ domain: ErrorDomain.STORAGE,
58
+ category: ErrorCategory.USER,
59
+ text: 'Dimension must be a positive integer',
60
+ details: { indexName, dimension },
61
+ });
53
62
  }
54
63
 
55
64
  try {
@@ -82,8 +91,15 @@ export class OpenSearchVector extends MastraVector {
82
91
  await this.validateExistingIndex(indexName, dimension, metric);
83
92
  return;
84
93
  }
85
- console.error(`Failed to create index ${indexName}:`, error);
86
- throw error;
94
+ throw new MastraError(
95
+ {
96
+ id: 'STORAGE_OPENSEARCH_VECTOR_CREATE_INDEX_FAILED',
97
+ domain: ErrorDomain.STORAGE,
98
+ category: ErrorCategory.THIRD_PARTY,
99
+ details: { indexName, dimension, metric },
100
+ },
101
+ error,
102
+ );
87
103
  }
88
104
  }
89
105
 
@@ -100,9 +116,15 @@ export class OpenSearchVector extends MastraVector {
100
116
  .filter((index: string | undefined) => index !== undefined);
101
117
 
102
118
  return indexes;
103
- } catch (error: any) {
104
- console.error('Failed to list indexes:', error);
105
- throw new Error(`Failed to list indexes: ${error.message}`);
119
+ } catch (error) {
120
+ throw new MastraError(
121
+ {
122
+ id: 'STORAGE_OPENSEARCH_VECTOR_LIST_INDEXES_FAILED',
123
+ domain: ErrorDomain.STORAGE,
124
+ category: ErrorCategory.THIRD_PARTY,
125
+ },
126
+ error,
127
+ );
106
128
  }
107
129
  }
108
130
 
@@ -137,7 +159,17 @@ export class OpenSearchVector extends MastraVector {
137
159
  try {
138
160
  await this.client.indices.delete({ index: indexName });
139
161
  } catch (error) {
140
- console.error(`Failed to delete index ${indexName}:`, error);
162
+ const mastraError = new MastraError(
163
+ {
164
+ id: 'STORAGE_OPENSEARCH_VECTOR_DELETE_INDEX_FAILED',
165
+ domain: ErrorDomain.STORAGE,
166
+ category: ErrorCategory.THIRD_PARTY,
167
+ details: { indexName },
168
+ },
169
+ error,
170
+ );
171
+ this.logger?.error(mastraError.toString());
172
+ this.logger?.trackException(mastraError);
141
173
  }
142
174
  }
143
175
 
@@ -154,39 +186,46 @@ export class OpenSearchVector extends MastraVector {
154
186
  const vectorIds = ids || vectors.map(() => crypto.randomUUID());
155
187
  const operations = [];
156
188
 
157
- // Get index stats to check dimension
158
- const indexInfo = await this.describeIndex({ indexName });
189
+ try {
190
+ // Get index stats to check dimension
191
+ const indexInfo = await this.describeIndex({ indexName });
159
192
 
160
- // Validate vector dimensions
161
- this.validateVectorDimensions(vectors, indexInfo.dimension);
193
+ // Validate vector dimensions
194
+ this.validateVectorDimensions(vectors, indexInfo.dimension);
162
195
 
163
- for (let i = 0; i < vectors.length; i++) {
164
- const operation = {
165
- index: {
166
- _index: indexName,
167
- _id: vectorIds[i],
168
- },
169
- };
196
+ for (let i = 0; i < vectors.length; i++) {
197
+ const operation = {
198
+ index: {
199
+ _index: indexName,
200
+ _id: vectorIds[i],
201
+ },
202
+ };
170
203
 
171
- const document = {
172
- id: vectorIds[i],
173
- embedding: vectors[i],
174
- metadata: metadata[i] || {},
175
- };
204
+ const document = {
205
+ id: vectorIds[i],
206
+ embedding: vectors[i],
207
+ metadata: metadata[i] || {},
208
+ };
176
209
 
177
- operations.push(operation);
178
- operations.push(document);
179
- }
210
+ operations.push(operation);
211
+ operations.push(document);
212
+ }
180
213
 
181
- try {
182
214
  if (operations.length > 0) {
183
215
  await this.client.bulk({ body: operations, refresh: true });
184
216
  }
185
217
 
186
218
  return vectorIds;
187
219
  } catch (error) {
188
- console.error('Failed to upsert vectors:', error);
189
- throw error;
220
+ throw new MastraError(
221
+ {
222
+ id: 'STORAGE_OPENSEARCH_VECTOR_UPSERT_FAILED',
223
+ domain: ErrorDomain.STORAGE,
224
+ category: ErrorCategory.THIRD_PARTY,
225
+ details: { indexName, vectorCount: vectors?.length || 0 },
226
+ },
227
+ error,
228
+ );
190
229
  }
191
230
  }
192
231
 
@@ -206,7 +245,7 @@ export class OpenSearchVector extends MastraVector {
206
245
  filter,
207
246
  topK = 10,
208
247
  includeVector = false,
209
- }: QueryVectorParams): Promise<QueryResult[]> {
248
+ }: OpenSearchVectorParams): Promise<QueryResult[]> {
210
249
  try {
211
250
  const translatedFilter = this.transformFilter(filter);
212
251
 
@@ -234,9 +273,16 @@ export class OpenSearchVector extends MastraVector {
234
273
  });
235
274
 
236
275
  return results;
237
- } catch (error: any) {
238
- console.error('Failed to query vectors:', error);
239
- throw new Error(`Failed to query vectors for index ${indexName}: ${error.message}`);
276
+ } catch (error) {
277
+ throw new MastraError(
278
+ {
279
+ id: 'STORAGE_OPENSEARCH_VECTOR_QUERY_FAILED',
280
+ domain: ErrorDomain.STORAGE,
281
+ category: ErrorCategory.THIRD_PARTY,
282
+ details: { indexName, topK },
283
+ },
284
+ error,
285
+ );
240
286
  }
241
287
  }
242
288
 
@@ -256,10 +302,10 @@ export class OpenSearchVector extends MastraVector {
256
302
  /**
257
303
  * Transforms the filter to the OpenSearch DSL.
258
304
  *
259
- * @param {VectorFilter} filter - The filter to transform.
305
+ * @param {OpenSearchVectorFilter} filter - The filter to transform.
260
306
  * @returns {Record<string, any>} The transformed filter.
261
307
  */
262
- private transformFilter(filter?: VectorFilter) {
308
+ private transformFilter(filter?: OpenSearchVectorFilter): any {
263
309
  const translator = new OpenSearchFilterTranslator();
264
310
  return translator.translate(filter);
265
311
  }
@@ -275,13 +321,15 @@ export class OpenSearchVector extends MastraVector {
275
321
  * @throws Will throw an error if no updates are provided or if the update operation fails.
276
322
  */
277
323
  async updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void> {
278
- if (!update.vector && !update.metadata) {
279
- throw new Error('No updates provided');
280
- }
281
-
324
+ let existingDoc;
282
325
  try {
326
+ if (!update.vector && !update.metadata) {
327
+ throw new Error('No updates provided');
328
+ }
329
+
283
330
  // First get the current document to merge with updates
284
- const { body: existingDoc } = await this.client
331
+ const { body } = await this.client
332
+
285
333
  .get({
286
334
  index: indexName,
287
335
  id: id,
@@ -290,25 +338,40 @@ export class OpenSearchVector extends MastraVector {
290
338
  throw new Error(`Document with ID ${id} not found in index ${indexName}`);
291
339
  });
292
340
 
293
- if (!existingDoc || !existingDoc._source) {
341
+ if (!body || !body._source) {
294
342
  throw new Error(`Document with ID ${id} has no source data in index ${indexName}`);
295
343
  }
344
+ existingDoc = body;
345
+ } catch (error) {
346
+ throw new MastraError(
347
+ {
348
+ id: 'STORAGE_OPENSEARCH_VECTOR_UPDATE_VECTOR_FAILED',
349
+ domain: ErrorDomain.STORAGE,
350
+ category: ErrorCategory.USER,
351
+ details: { indexName, id },
352
+ },
353
+ error,
354
+ );
355
+ }
296
356
 
297
- const source = existingDoc._source;
298
- const updatedDoc: Record<string, any> = {
299
- id: source.id || id,
300
- };
357
+ const source = existingDoc._source;
358
+ const updatedDoc: Record<string, any> = {
359
+ id: source?.id || id,
360
+ };
301
361
 
362
+ try {
302
363
  // Update vector if provided
303
364
  if (update.vector) {
304
365
  // Get index stats to check dimension
366
+ console.log(`1`);
305
367
  const indexInfo = await this.describeIndex({ indexName });
306
368
 
307
369
  // Validate vector dimensions
370
+ console.log(`2`);
308
371
  this.validateVectorDimensions([update.vector], indexInfo.dimension);
309
372
 
310
373
  updatedDoc.embedding = update.vector;
311
- } else if (source.embedding) {
374
+ } else if (source?.embedding) {
312
375
  updatedDoc.embedding = source.embedding;
313
376
  }
314
377
 
@@ -316,10 +379,11 @@ export class OpenSearchVector extends MastraVector {
316
379
  if (update.metadata) {
317
380
  updatedDoc.metadata = update.metadata;
318
381
  } else {
319
- updatedDoc.metadata = source.metadata || {};
382
+ updatedDoc.metadata = source?.metadata || {};
320
383
  }
321
384
 
322
385
  // Update the document
386
+ console.log(`3`);
323
387
  await this.client.index({
324
388
  index: indexName,
325
389
  id: id,
@@ -327,8 +391,15 @@ export class OpenSearchVector extends MastraVector {
327
391
  refresh: true,
328
392
  });
329
393
  } catch (error) {
330
- console.error(`Failed to update document with ID ${id} in index ${indexName}:`, error);
331
- throw error;
394
+ throw new MastraError(
395
+ {
396
+ id: 'STORAGE_OPENSEARCH_VECTOR_UPDATE_VECTOR_FAILED',
397
+ domain: ErrorDomain.STORAGE,
398
+ category: ErrorCategory.THIRD_PARTY,
399
+ details: { indexName, id },
400
+ },
401
+ error,
402
+ );
332
403
  }
333
404
  }
334
405
 
@@ -347,11 +418,19 @@ export class OpenSearchVector extends MastraVector {
347
418
  refresh: true,
348
419
  });
349
420
  } catch (error: unknown) {
350
- console.error(`Failed to delete document with ID ${id} from index ${indexName}:`, error);
351
- // Don't throw error if document doesn't exist, just log it
352
- if (error && typeof error === 'object' && 'statusCode' in error && error.statusCode !== 404) {
353
- throw error;
421
+ // Don't throw error if document doesn't exist (404)
422
+ if (error && typeof error === 'object' && 'statusCode' in error && error.statusCode === 404) {
423
+ return;
354
424
  }
425
+ throw new MastraError(
426
+ {
427
+ id: 'STORAGE_OPENSEARCH_VECTOR_DELETE_VECTOR_FAILED',
428
+ domain: ErrorDomain.STORAGE,
429
+ category: ErrorCategory.THIRD_PARTY,
430
+ details: { indexName, id },
431
+ },
432
+ error,
433
+ );
355
434
  }
356
435
  }
357
436
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": ["./tsconfig.json", "../../tsconfig.build.json"],
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "./src"
6
+ },
7
+ "include": ["src/**/*"],
8
+ "exclude": ["node_modules", "**/*.test.ts", "src/**/*.mock.ts"]
9
+ }
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "extends": "../../tsconfig.node.json",
3
- "include": ["src/**/*"],
3
+ "include": ["src/**/*", "tsup.config.ts"],
4
4
  "exclude": ["node_modules", "**/*.test.ts"]
5
5
  }
package/tsup.config.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { spawn } from 'child_process';
2
+ import { promisify } from 'util';
3
+ import { defineConfig } from 'tsup';
4
+
5
+ const exec = promisify(spawn);
6
+
7
+ export default defineConfig({
8
+ entry: ['src/index.ts'],
9
+ format: ['esm', 'cjs'],
10
+ clean: true,
11
+ dts: false,
12
+ splitting: true,
13
+ treeshake: {
14
+ preset: 'smallest',
15
+ },
16
+ sourcemap: true,
17
+ onSuccess: async () => {
18
+ await exec('pnpm', ['tsc', '-p', 'tsconfig.build.json'], {
19
+ stdio: 'inherit',
20
+ });
21
+ },
22
+ });
@@ -1,159 +0,0 @@
1
- import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
- import type { CreateIndexParams } from '@mastra/core';
3
- import type { DeleteIndexParams } from '@mastra/core';
4
- import type { DeleteVectorParams } from '@mastra/core';
5
- import type { DescribeIndexParams } from '@mastra/core';
6
- import type { IndexStats } from '@mastra/core';
7
- import { MastraVector } from '@mastra/core/vector';
8
- import type { OperatorSupport } from '@mastra/core/vector/filter';
9
- import type { QueryResult } from '@mastra/core';
10
- import type { QueryVectorParams } from '@mastra/core';
11
- import type { UpdateVectorParams } from '@mastra/core';
12
- import type { UpsertVectorParams } from '@mastra/core';
13
- import type { VectorFilter } from '@mastra/core/vector/filter';
14
-
15
- /**
16
- * Vector store prompt for OpenSearch. This prompt details supported filter operators, syntax, and usage examples.
17
- * Use this as a guide for constructing valid filters for OpenSearch vector queries in Mastra.
18
- */
19
- export declare const OPENSEARCH_PROMPT = "When querying OpenSearch, you can ONLY use the operators listed below. Any other operators will be rejected.\nImportant: Do not explain how to construct the filter\u2014use the specified operators and fields to search the content and return relevant results.\nIf a user tries to use an unsupported operator, reject the filter entirely and let them know that the operator is not supported.\n\nBasic Comparison Operators:\n- $eq: Exact match (default for field: value)\n Example: { \"category\": \"electronics\" }\n- $ne: Not equal\n Example: { \"category\": { \"$ne\": \"electronics\" } }\n- $gt: Greater than\n Example: { \"price\": { \"$gt\": 100 } }\n- $gte: Greater than or equal\n Example: { \"price\": { \"$gte\": 100 } }\n- $lt: Less than\n Example: { \"price\": { \"$lt\": 100 } }\n- $lte: Less than or equal\n Example: { \"price\": { \"$lte\": 100 } }\n\nArray Operators:\n- $in: Match any value in array\n Example: { \"category\": { \"$in\": [\"electronics\", \"books\"] } }\n- $nin: Does not match any value in array\n Example: { \"category\": { \"$nin\": [\"electronics\", \"books\"] } }\n- $all: Match all values in array\n Example: { \"tags\": { \"$all\": [\"premium\", \"sale\"] } }\n\nLogical Operators:\n- $and: Logical AND (implicit when using multiple conditions)\n Example: { \"$and\": [{ \"price\": { \"$gt\": 100 } }, { \"category\": \"electronics\" }] }\n- $or: Logical OR\n Example: { \"$or\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n- $not: Logical NOT\n Example: { \"$not\": { \"category\": \"electronics\" } }\n\nElement Operators:\n- $exists: Check if field exists\n Example: { \"rating\": { \"$exists\": true } }\n\nRegex Operator:\n- $regex: Match using a regular expression (ECMAScript syntax)\n Example: { \"name\": { \"$regex\": \"^Sam.*son$\" } }\n Note: Regex queries are supported for string fields only. Use valid ECMAScript patterns; invalid patterns will throw an error.\n\nRestrictions:\n- Nested fields are supported using dot notation (e.g., \"address.city\").\n- Multiple conditions on the same field are supported (e.g., { \"price\": { \"$gte\": 100, \"$lte\": 1000 } }).\n- Only logical operators ($and, $or, $not) can be used at the top level.\n- All other operators must be used within a field condition.\n Valid: { \"field\": { \"$gt\": 100 } }\n Valid: { \"$and\": [...] }\n Invalid: { \"$gt\": 100 }\n- Logical operators must contain field conditions, not direct operators.\n Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n Invalid: { \"$and\": [{ \"$gt\": 100 }] }\n- $not operator:\n - Must be an object\n - Cannot be empty\n - Can be used at field level or top level\n - Valid: { \"$not\": { \"field\": \"value\" } }\n - Valid: { \"field\": { \"$not\": { \"$eq\": \"value\" } } }\n- Array operators work on array fields only.\n- Empty arrays in conditions are handled gracefully.\n- Regex queries are case-sensitive by default; use patterns accordingly.\n\nExample Complex Query:\n{\n \"$and\": [\n { \"category\": { \"$in\": [\"electronics\", \"computers\"] } },\n { \"price\": { \"$gte\": 100, \"$lte\": 1000 } },\n { \"tags\": { \"$all\": [\"premium\"] } },\n { \"rating\": { \"$exists\": true, \"$gt\": 4 } },\n { \"$or\": [\n { \"stock\": { \"$gt\": 0 } },\n { \"preorder\": true }\n ]},\n { \"name\": { \"$regex\": \"^Sam.*son$\" } }\n ]\n}";
20
-
21
- /**
22
- * Translator for OpenSearch filter queries.
23
- * Maintains OpenSearch-compatible syntax while ensuring proper validation
24
- * and normalization of values.
25
- */
26
- export declare class OpenSearchFilterTranslator extends BaseFilterTranslator {
27
- protected getSupportedOperators(): OperatorSupport;
28
- translate(filter?: VectorFilter): VectorFilter;
29
- private translateNode;
30
- /**
31
- * Handles translation of nested objects with dot notation fields
32
- */
33
- private translateNestedObject;
34
- private translateLogicalOperator;
35
- private translateFieldOperator;
36
- /**
37
- * Translates regex patterns to OpenSearch query syntax
38
- */
39
- private translateRegexOperator;
40
- private addKeywordIfNeeded;
41
- /**
42
- * Helper method to handle special cases for the $not operator
43
- */
44
- private handleNotOperatorSpecialCases;
45
- private translateOperator;
46
- /**
47
- * Translates field conditions to OpenSearch query syntax
48
- * Handles special cases like range queries and multiple operators
49
- */
50
- private translateFieldConditions;
51
- /**
52
- * Checks if conditions can be optimized to a range query
53
- */
54
- private canOptimizeToRangeQuery;
55
- /**
56
- * Creates a range query from numeric operators
57
- */
58
- private createRangeQuery;
59
- }
60
-
61
- declare class OpenSearchVector extends MastraVector {
62
- private client;
63
- /**
64
- * Creates a new OpenSearchVector client.
65
- *
66
- * @param {string} url - The url of the OpenSearch node.
67
- */
68
- constructor({ url }: {
69
- url: string;
70
- });
71
- /**
72
- * Creates a new collection with the specified configuration.
73
- *
74
- * @param {string} indexName - The name of the collection to create.
75
- * @param {number} dimension - The dimension of the vectors to be stored in the collection.
76
- * @param {'cosine' | 'euclidean' | 'dotproduct'} [metric=cosine] - The metric to use to sort vectors in the collection.
77
- * @returns {Promise<void>} A promise that resolves when the collection is created.
78
- */
79
- createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
80
- /**
81
- * Lists all indexes.
82
- *
83
- * @returns {Promise<string[]>} A promise that resolves to an array of indexes.
84
- */
85
- listIndexes(): Promise<string[]>;
86
- /**
87
- * Retrieves statistics about a vector index.
88
- *
89
- * @param {string} indexName - The name of the index to describe
90
- * @returns A promise that resolves to the index statistics including dimension, count and metric
91
- */
92
- describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
93
- /**
94
- * Deletes the specified index.
95
- *
96
- * @param {string} indexName - The name of the index to delete.
97
- * @returns {Promise<void>} A promise that resolves when the index is deleted.
98
- */
99
- deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
100
- /**
101
- * Inserts or updates vectors in the specified collection.
102
- *
103
- * @param {string} indexName - The name of the collection to upsert into.
104
- * @param {number[][]} vectors - An array of vectors to upsert.
105
- * @param {Record<string, any>[]} [metadata] - An optional array of metadata objects corresponding to each vector.
106
- * @param {string[]} [ids] - An optional array of IDs corresponding to each vector. If not provided, new IDs will be generated.
107
- * @returns {Promise<string[]>} A promise that resolves to an array of IDs of the upserted vectors.
108
- */
109
- upsert({ indexName, vectors, metadata, ids }: UpsertVectorParams): Promise<string[]>;
110
- /**
111
- * Queries the specified collection using a vector and optional filter.
112
- *
113
- * @param {string} indexName - The name of the collection to query.
114
- * @param {number[]} queryVector - The vector to query with.
115
- * @param {number} [topK] - The maximum number of results to return.
116
- * @param {Record<string, any>} [filter] - An optional filter to apply to the query. For more on filters in OpenSearch, see the filtering reference: https://opensearch.org/docs/latest/query-dsl/
117
- * @param {boolean} [includeVectors=false] - Whether to include the vectors in the response.
118
- * @returns {Promise<QueryResult[]>} A promise that resolves to an array of query results.
119
- */
120
- query({ indexName, queryVector, filter, topK, includeVector, }: QueryVectorParams): Promise<QueryResult[]>;
121
- /**
122
- * Validates the dimensions of the vectors.
123
- *
124
- * @param {number[][]} vectors - The vectors to validate.
125
- * @param {number} dimension - The dimension of the vectors.
126
- * @returns {void}
127
- */
128
- private validateVectorDimensions;
129
- /**
130
- * Transforms the filter to the OpenSearch DSL.
131
- *
132
- * @param {VectorFilter} filter - The filter to transform.
133
- * @returns {Record<string, any>} The transformed filter.
134
- */
135
- private transformFilter;
136
- /**
137
- * Updates a vector by its ID with the provided vector and/or metadata.
138
- * @param indexName - The name of the index containing the vector.
139
- * @param id - The ID of the vector to update.
140
- * @param update - An object containing the vector and/or metadata to update.
141
- * @param update.vector - An optional array of numbers representing the new vector.
142
- * @param update.metadata - An optional record containing the new metadata.
143
- * @returns A promise that resolves when the update is complete.
144
- * @throws Will throw an error if no updates are provided or if the update operation fails.
145
- */
146
- updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
147
- /**
148
- * Deletes a vector by its ID.
149
- * @param indexName - The name of the index containing the vector.
150
- * @param id - The ID of the vector to delete.
151
- * @returns A promise that resolves when the deletion is complete.
152
- * @throws Will throw an error if the deletion operation fails.
153
- */
154
- deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
155
- }
156
- export { OpenSearchVector }
157
- export { OpenSearchVector as OpenSearchVector_alias_1 }
158
-
159
- export { }