@mastra/opensearch 0.0.0-taofeeqInngest-20250603090617 → 0.0.0-transpile-packages-20250724123433

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,155 @@
1
1
  # @mastra/opensearch
2
2
 
3
- ## 0.0.0-taofeeqInngest-20250603090617
3
+ ## 0.0.0-transpile-packages-20250724123433
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [f248d53]
8
+ - Updated dependencies [2affc57]
9
+ - Updated dependencies [66e13e3]
10
+ - Updated dependencies [18344d7]
11
+ - Updated dependencies [40c2525]
12
+ - Updated dependencies [e473f27]
13
+ - Updated dependencies [703ac71]
14
+ - Updated dependencies [a723d69]
15
+ - Updated dependencies [7827943]
16
+ - Updated dependencies [5889a31]
17
+ - Updated dependencies [bf1e7e7]
18
+ - Updated dependencies [4933192]
19
+ - Updated dependencies [d1c77a4]
20
+ - Updated dependencies [dcd4802]
21
+ - Updated dependencies [cbddd18]
22
+ - Updated dependencies [7ba91fa]
23
+ - @mastra/core@0.0.0-transpile-packages-20250724123433
24
+
25
+ ## 0.11.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 8a3bfd2: Update peerdeps to latest core
30
+
31
+ ### Patch Changes
32
+
33
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
34
+ - 0e17048: Throw mastra errors in storage packages
35
+ - Updated dependencies [15e9d26]
36
+ - Updated dependencies [d1baedb]
37
+ - Updated dependencies [d8f2d19]
38
+ - Updated dependencies [4d21bf2]
39
+ - Updated dependencies [07d6d88]
40
+ - Updated dependencies [9d52b17]
41
+ - Updated dependencies [2097952]
42
+ - Updated dependencies [792c4c0]
43
+ - Updated dependencies [5d74aab]
44
+ - Updated dependencies [a8b194f]
45
+ - Updated dependencies [4fb0cc2]
46
+ - Updated dependencies [d2a7a31]
47
+ - Updated dependencies [502fe05]
48
+ - Updated dependencies [144eb0b]
49
+ - Updated dependencies [8ba1b51]
50
+ - Updated dependencies [4efcfa0]
51
+ - Updated dependencies [0e17048]
52
+ - @mastra/core@0.10.7
53
+
54
+ ## 0.11.0-alpha.2
55
+
56
+ ### Minor Changes
57
+
58
+ - 8a3bfd2: Update peerdeps to latest core
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [792c4c0]
63
+ - Updated dependencies [502fe05]
64
+ - Updated dependencies [4efcfa0]
65
+ - @mastra/core@0.10.7-alpha.3
66
+
67
+ ## 0.10.4-alpha.1
68
+
69
+ ### Patch Changes
70
+
71
+ - 144eb0b: [MASTRA-3669] Metadata Filter Types
72
+ - Updated dependencies [15e9d26]
73
+ - Updated dependencies [07d6d88]
74
+ - Updated dependencies [5d74aab]
75
+ - Updated dependencies [144eb0b]
76
+ - @mastra/core@0.10.7-alpha.2
77
+
78
+ ## 0.10.4-alpha.0
79
+
80
+ ### Patch Changes
81
+
82
+ - 0e17048: Throw mastra errors in storage packages
83
+ - Updated dependencies [d1baedb]
84
+ - Updated dependencies [4d21bf2]
85
+ - Updated dependencies [2097952]
86
+ - Updated dependencies [4fb0cc2]
87
+ - Updated dependencies [d2a7a31]
88
+ - Updated dependencies [0e17048]
89
+ - @mastra/core@0.10.7-alpha.1
90
+
91
+ ## 0.10.3
92
+
93
+ ### Patch Changes
94
+
95
+ - 63f6b7d: dependencies updates:
96
+ - Updated dependency [`@opensearch-project/opensearch@^3.5.1` ↗︎](https://www.npmjs.com/package/@opensearch-project/opensearch/v/3.5.1) (from `^3.4.0`, in `dependencies`)
97
+ - Updated dependencies [63f6b7d]
98
+ - Updated dependencies [12a95fc]
99
+ - Updated dependencies [4b0f8a6]
100
+ - Updated dependencies [51264a5]
101
+ - Updated dependencies [8e6f677]
102
+ - Updated dependencies [d70c420]
103
+ - Updated dependencies [ee9af57]
104
+ - Updated dependencies [36f1c36]
105
+ - Updated dependencies [2a16996]
106
+ - Updated dependencies [10d352e]
107
+ - Updated dependencies [9589624]
108
+ - Updated dependencies [53d3c37]
109
+ - Updated dependencies [751c894]
110
+ - Updated dependencies [577ce3a]
111
+ - Updated dependencies [9260b3a]
112
+ - @mastra/core@0.10.6
113
+
114
+ ## 0.10.3-alpha.0
115
+
116
+ ### Patch Changes
117
+
118
+ - 63f6b7d: dependencies updates:
119
+ - Updated dependency [`@opensearch-project/opensearch@^3.5.1` ↗︎](https://www.npmjs.com/package/@opensearch-project/opensearch/v/3.5.1) (from `^3.4.0`, in `dependencies`)
120
+ - Updated dependencies [63f6b7d]
121
+ - Updated dependencies [36f1c36]
122
+ - Updated dependencies [10d352e]
123
+ - Updated dependencies [53d3c37]
124
+ - @mastra/core@0.10.6-alpha.0
125
+
126
+ ## 0.10.2
127
+
128
+ ### Patch Changes
129
+
130
+ - 66f4424: Update peerdeps
131
+ - Updated dependencies [d1ed912]
132
+ - Updated dependencies [f6fd25f]
133
+ - Updated dependencies [dffb67b]
134
+ - Updated dependencies [f1f1f1b]
135
+ - Updated dependencies [925ab94]
136
+ - Updated dependencies [f9816ae]
137
+ - Updated dependencies [82090c1]
138
+ - Updated dependencies [1b443fd]
139
+ - Updated dependencies [ce97900]
140
+ - Updated dependencies [f1309d3]
141
+ - Updated dependencies [14a2566]
142
+ - Updated dependencies [f7f8293]
143
+ - Updated dependencies [48eddb9]
144
+ - @mastra/core@0.10.4
145
+
146
+ ## 0.10.2-alpha.0
147
+
148
+ ### Patch Changes
149
+
150
+ - 66f4424: Update peerdeps
151
+
152
+ ## 0.10.1
4
153
 
5
154
  ### Patch Changes
6
155
 
@@ -12,12 +161,19 @@
12
161
  - Updated dependencies [e5dc18d]
13
162
  - Updated dependencies [ab5adbe]
14
163
  - Updated dependencies [1e8bb40]
164
+ - Updated dependencies [1b5fc55]
15
165
  - Updated dependencies [195c428]
16
166
  - Updated dependencies [f73e11b]
167
+ - Updated dependencies [37643b8]
168
+ - Updated dependencies [99fd6cf]
17
169
  - Updated dependencies [c5bf1ce]
170
+ - Updated dependencies [add596e]
171
+ - Updated dependencies [8dc94d8]
172
+ - Updated dependencies [ecebbeb]
173
+ - Updated dependencies [79d5145]
18
174
  - Updated dependencies [12b7002]
19
175
  - Updated dependencies [2901125]
20
- - @mastra/core@0.0.0-taofeeqInngest-20250603090617
176
+ - @mastra/core@0.10.2
21
177
 
22
178
  ## 0.10.1-alpha.1
23
179
 
package/LICENSE.md CHANGED
@@ -1,46 +1,15 @@
1
- # Elastic License 2.0 (ELv2)
1
+ # Apache License 2.0
2
2
 
3
- Copyright (c) 2025 Mastra AI, Inc.
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- **Acceptance**
6
- By using the software, you agree to all of the terms and conditions below.
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
7
8
 
8
- **Copyright License**
9
- The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
10
 
11
- **Limitations**
12
- You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
13
-
14
- You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
15
-
16
- You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
17
-
18
- **Patents**
19
- The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
20
-
21
- **Notices**
22
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
23
-
24
- If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
25
-
26
- **No Other Rights**
27
- These terms do not imply any licenses other than those expressly granted in these terms.
28
-
29
- **Termination**
30
- If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
31
-
32
- **No Liability**
33
- As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
34
-
35
- **Definitions**
36
- The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
37
-
38
- _you_ refers to the individual or entity agreeing to these terms.
39
-
40
- _your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
41
-
42
- _your licenses_ are all the licenses granted to you for the software under these terms.
43
-
44
- _use_ means anything you do with the software requiring one of your licenses.
45
-
46
- _trademark_ means trademarks, service marks, and similar rights.
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
@@ -1,11 +1,14 @@
1
1
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
2
3
  import type { CreateIndexParams } from '@mastra/core';
3
4
  import type { DeleteIndexParams } from '@mastra/core';
4
5
  import type { DeleteVectorParams } from '@mastra/core';
5
6
  import type { DescribeIndexParams } from '@mastra/core';
6
7
  import type { IndexStats } from '@mastra/core';
8
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
7
9
  import { MastraVector } from '@mastra/core/vector';
8
10
  import type { OperatorSupport } from '@mastra/core/vector/filter';
11
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
9
12
  import type { QueryResult } from '@mastra/core';
10
13
  import type { QueryVectorParams } from '@mastra/core';
11
14
  import type { UpdateVectorParams } from '@mastra/core';
@@ -18,14 +21,16 @@ import type { VectorFilter } from '@mastra/core/vector/filter';
18
21
  */
19
22
  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
23
 
24
+ declare type OpenSearchBlacklisted = BlacklistedRootOperators | '$nor';
25
+
21
26
  /**
22
27
  * Translator for OpenSearch filter queries.
23
28
  * Maintains OpenSearch-compatible syntax while ensuring proper validation
24
29
  * and normalization of values.
25
30
  */
26
- export declare class OpenSearchFilterTranslator extends BaseFilterTranslator {
31
+ export declare class OpenSearchFilterTranslator extends BaseFilterTranslator<OpenSearchVectorFilter> {
27
32
  protected getSupportedOperators(): OperatorSupport;
28
- translate(filter?: VectorFilter): VectorFilter;
33
+ translate(filter?: OpenSearchVectorFilter): OpenSearchVectorFilter;
29
34
  private translateNode;
30
35
  /**
31
36
  * Handles translation of nested objects with dot notation fields
@@ -58,7 +63,11 @@ export declare class OpenSearchFilterTranslator extends BaseFilterTranslator {
58
63
  private createRangeQuery;
59
64
  }
60
65
 
61
- declare class OpenSearchVector extends MastraVector {
66
+ declare type OpenSearchLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor'>;
67
+
68
+ declare type OpenSearchOperatorValueMap = Omit<OperatorValueMap, '$options' | '$nor' | '$elemMatch'>;
69
+
70
+ declare class OpenSearchVector extends MastraVector<OpenSearchVectorFilter> {
62
71
  private client;
63
72
  /**
64
73
  * Creates a new OpenSearchVector client.
@@ -117,7 +126,7 @@ declare class OpenSearchVector extends MastraVector {
117
126
  * @param {boolean} [includeVectors=false] - Whether to include the vectors in the response.
118
127
  * @returns {Promise<QueryResult[]>} A promise that resolves to an array of query results.
119
128
  */
120
- query({ indexName, queryVector, filter, topK, includeVector, }: QueryVectorParams): Promise<QueryResult[]>;
129
+ query({ indexName, queryVector, filter, topK, includeVector, }: OpenSearchVectorParams): Promise<QueryResult[]>;
121
130
  /**
122
131
  * Validates the dimensions of the vectors.
123
132
  *
@@ -129,7 +138,7 @@ declare class OpenSearchVector extends MastraVector {
129
138
  /**
130
139
  * Transforms the filter to the OpenSearch DSL.
131
140
  *
132
- * @param {VectorFilter} filter - The filter to transform.
141
+ * @param {OpenSearchVectorFilter} filter - The filter to transform.
133
142
  * @returns {Record<string, any>} The transformed filter.
134
143
  */
135
144
  private transformFilter;
@@ -156,4 +165,8 @@ declare class OpenSearchVector extends MastraVector {
156
165
  export { OpenSearchVector }
157
166
  export { OpenSearchVector as OpenSearchVector_alias_1 }
158
167
 
168
+ export declare type OpenSearchVectorFilter = VectorFilter<keyof OpenSearchOperatorValueMap, OpenSearchOperatorValueMap, OpenSearchLogicalOperatorValueMap, OpenSearchBlacklisted>;
169
+
170
+ declare type OpenSearchVectorParams = QueryVectorParams<OpenSearchVectorFilter>;
171
+
159
172
  export { }
@@ -1,11 +1,14 @@
1
1
  import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
+ import type { BlacklistedRootOperators } from '@mastra/core/vector/filter';
2
3
  import type { CreateIndexParams } from '@mastra/core';
3
4
  import type { DeleteIndexParams } from '@mastra/core';
4
5
  import type { DeleteVectorParams } from '@mastra/core';
5
6
  import type { DescribeIndexParams } from '@mastra/core';
6
7
  import type { IndexStats } from '@mastra/core';
8
+ import type { LogicalOperatorValueMap } from '@mastra/core/vector/filter';
7
9
  import { MastraVector } from '@mastra/core/vector';
8
10
  import type { OperatorSupport } from '@mastra/core/vector/filter';
11
+ import type { OperatorValueMap } from '@mastra/core/vector/filter';
9
12
  import type { QueryResult } from '@mastra/core';
10
13
  import type { QueryVectorParams } from '@mastra/core';
11
14
  import type { UpdateVectorParams } from '@mastra/core';
@@ -18,14 +21,16 @@ import type { VectorFilter } from '@mastra/core/vector/filter';
18
21
  */
19
22
  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
23
 
24
+ declare type OpenSearchBlacklisted = BlacklistedRootOperators | '$nor';
25
+
21
26
  /**
22
27
  * Translator for OpenSearch filter queries.
23
28
  * Maintains OpenSearch-compatible syntax while ensuring proper validation
24
29
  * and normalization of values.
25
30
  */
26
- export declare class OpenSearchFilterTranslator extends BaseFilterTranslator {
31
+ export declare class OpenSearchFilterTranslator extends BaseFilterTranslator<OpenSearchVectorFilter> {
27
32
  protected getSupportedOperators(): OperatorSupport;
28
- translate(filter?: VectorFilter): VectorFilter;
33
+ translate(filter?: OpenSearchVectorFilter): OpenSearchVectorFilter;
29
34
  private translateNode;
30
35
  /**
31
36
  * Handles translation of nested objects with dot notation fields
@@ -58,7 +63,11 @@ export declare class OpenSearchFilterTranslator extends BaseFilterTranslator {
58
63
  private createRangeQuery;
59
64
  }
60
65
 
61
- declare class OpenSearchVector extends MastraVector {
66
+ declare type OpenSearchLogicalOperatorValueMap = Omit<LogicalOperatorValueMap, '$nor'>;
67
+
68
+ declare type OpenSearchOperatorValueMap = Omit<OperatorValueMap, '$options' | '$nor' | '$elemMatch'>;
69
+
70
+ declare class OpenSearchVector extends MastraVector<OpenSearchVectorFilter> {
62
71
  private client;
63
72
  /**
64
73
  * Creates a new OpenSearchVector client.
@@ -117,7 +126,7 @@ declare class OpenSearchVector extends MastraVector {
117
126
  * @param {boolean} [includeVectors=false] - Whether to include the vectors in the response.
118
127
  * @returns {Promise<QueryResult[]>} A promise that resolves to an array of query results.
119
128
  */
120
- query({ indexName, queryVector, filter, topK, includeVector, }: QueryVectorParams): Promise<QueryResult[]>;
129
+ query({ indexName, queryVector, filter, topK, includeVector, }: OpenSearchVectorParams): Promise<QueryResult[]>;
121
130
  /**
122
131
  * Validates the dimensions of the vectors.
123
132
  *
@@ -129,7 +138,7 @@ declare class OpenSearchVector extends MastraVector {
129
138
  /**
130
139
  * Transforms the filter to the OpenSearch DSL.
131
140
  *
132
- * @param {VectorFilter} filter - The filter to transform.
141
+ * @param {OpenSearchVectorFilter} filter - The filter to transform.
133
142
  * @returns {Record<string, any>} The transformed filter.
134
143
  */
135
144
  private transformFilter;
@@ -156,4 +165,8 @@ declare class OpenSearchVector extends MastraVector {
156
165
  export { OpenSearchVector }
157
166
  export { OpenSearchVector as OpenSearchVector_alias_1 }
158
167
 
168
+ export declare type OpenSearchVectorFilter = VectorFilter<keyof OpenSearchOperatorValueMap, OpenSearchOperatorValueMap, OpenSearchLogicalOperatorValueMap, OpenSearchBlacklisted>;
169
+
170
+ declare type OpenSearchVectorParams = QueryVectorParams<OpenSearchVectorFilter>;
171
+
159
172
  export { }