@mastra/opensearch 0.0.0-scorers-ui-refactored-20250916094952 → 0.0.0-scorers-logs-20251208093427

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.
@@ -1,4 +1,4 @@
1
- import type { CreateIndexParams, DeleteIndexParams, DeleteVectorParams, DescribeIndexParams, IndexStats, QueryResult, QueryVectorParams, UpdateVectorParams, UpsertVectorParams } from '@mastra/core/vector';
1
+ import type { CreateIndexParams, DeleteIndexParams, DeleteVectorParams, DescribeIndexParams, IndexStats, QueryResult, QueryVectorParams, UpdateVectorParams, UpsertVectorParams, DeleteVectorsParams } from '@mastra/core/vector';
2
2
  import { MastraVector } from '@mastra/core/vector';
3
3
  import type { OpenSearchVectorFilter } from './filter.js';
4
4
  type OpenSearchVectorParams = QueryVectorParams<OpenSearchVectorFilter>;
@@ -9,8 +9,10 @@ export declare class OpenSearchVector extends MastraVector<OpenSearchVectorFilte
9
9
  *
10
10
  * @param {string} url - The url of the OpenSearch node.
11
11
  */
12
- constructor({ url }: {
12
+ constructor({ url, id }: {
13
13
  url: string;
14
+ } & {
15
+ id: string;
14
16
  });
15
17
  /**
16
18
  * Creates a new collection with the specified configuration.
@@ -78,16 +80,24 @@ export declare class OpenSearchVector extends MastraVector<OpenSearchVectorFilte
78
80
  */
79
81
  private transformFilter;
80
82
  /**
81
- * Updates a vector by its ID with the provided vector and/or metadata.
82
- * @param indexName - The name of the index containing the vector.
83
- * @param id - The ID of the vector to update.
84
- * @param update - An object containing the vector and/or metadata to update.
85
- * @param update.vector - An optional array of numbers representing the new vector.
86
- * @param update.metadata - An optional record containing the new metadata.
83
+ * Updates vectors by ID or filter with the provided vector and/or metadata.
84
+ * @param params - Parameters containing either id or filter for targeting vectors to update
85
+ * @param params.indexName - The name of the index containing the vector(s).
86
+ * @param params.id - The ID of a single vector to update (mutually exclusive with filter).
87
+ * @param params.filter - A filter to match multiple vectors to update (mutually exclusive with id).
88
+ * @param params.update - An object containing the vector and/or metadata to update.
87
89
  * @returns A promise that resolves when the update is complete.
88
90
  * @throws Will throw an error if no updates are provided or if the update operation fails.
89
91
  */
90
- updateVector({ indexName, id, update }: UpdateVectorParams): Promise<void>;
92
+ updateVector(params: UpdateVectorParams<OpenSearchVectorFilter>): Promise<void>;
93
+ /**
94
+ * Updates a single vector by its ID.
95
+ */
96
+ private updateVectorById;
97
+ /**
98
+ * Updates multiple vectors matching a filter.
99
+ */
100
+ private updateVectorsByFilter;
91
101
  /**
92
102
  * Deletes a vector by its ID.
93
103
  * @param indexName - The name of the index containing the vector.
@@ -96,6 +106,7 @@ export declare class OpenSearchVector extends MastraVector<OpenSearchVectorFilte
96
106
  * @throws Will throw an error if the deletion operation fails.
97
107
  */
98
108
  deleteVector({ indexName, id }: DeleteVectorParams): Promise<void>;
109
+ deleteVectors({ indexName, filter, ids }: DeleteVectorsParams<OpenSearchVectorFilter>): Promise<void>;
99
110
  }
100
111
  export {};
101
112
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAcvD,KAAK,sBAAsB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;AAExE,qBAAa,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACxE,OAAO,CAAC,MAAM,CAAmB;IAEjC;;;;OAIG;gBACS,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAKpC;;;;;;;OAOG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AkB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDrF;;OAEG;YACW,gBAAgB;IAqF9B;;OAEG;YACW,qBAAqB;IAoDnC;;;;;;OAMG;IACG,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BlE,aAAa,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAkF5G"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/opensearch",
3
- "version": "0.0.0-scorers-ui-refactored-20250916094952",
3
+ "version": "0.0.0-scorers-logs-20251208093427",
4
4
  "description": "OpenSearch vector store provider for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,17 +23,20 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@microsoft/api-extractor": "^7.52.8",
26
- "@types/node": "^20.19.0",
27
- "eslint": "^9.30.1",
26
+ "@types/node": "22.13.17",
27
+ "@vitest/coverage-v8": "4.0.12",
28
+ "@vitest/ui": "4.0.12",
29
+ "eslint": "^9.37.0",
28
30
  "tsup": "^8.5.0",
29
31
  "typescript": "^5.8.3",
30
- "vitest": "^3.2.4",
31
- "@internal/lint": "0.0.0-scorers-ui-refactored-20250916094952",
32
- "@internal/types-builder": "0.0.0-scorers-ui-refactored-20250916094952",
33
- "@mastra/core": "0.0.0-scorers-ui-refactored-20250916094952"
32
+ "vitest": "4.0.12",
33
+ "@internal/lint": "0.0.0-scorers-logs-20251208093427",
34
+ "@internal/storage-test-utils": "0.0.49",
35
+ "@internal/types-builder": "0.0.0-scorers-logs-20251208093427",
36
+ "@mastra/core": "0.0.0-scorers-logs-20251208093427"
34
37
  },
35
38
  "peerDependencies": {
36
- "@mastra/core": "0.0.0-scorers-ui-refactored-20250916094952"
39
+ "@mastra/core": "0.0.0-scorers-logs-20251208093427"
37
40
  },
38
41
  "files": [
39
42
  "dist",
@@ -48,6 +51,9 @@
48
51
  "bugs": {
49
52
  "url": "https://github.com/mastra-ai/mastra/issues"
50
53
  },
54
+ "engines": {
55
+ "node": ">=22.13.0"
56
+ },
51
57
  "scripts": {
52
58
  "build": "tsup --silent --config tsup.config.ts",
53
59
  "build:watch": "tsup --watch --silent --config tsup.config.ts",