@mastra/couchbase 0.0.0-trigger-playground-ui-package-20250506151043 → 0.0.0-update-stores-peerDeps-20250723031338

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,338 @@
1
1
  # @mastra/couchbase
2
2
 
3
- ## 0.0.0-trigger-playground-ui-package-20250506151043
3
+ ## 0.0.0-update-stores-peerDeps-20250723031338
4
+
5
+ ### Patch Changes
6
+
7
+ - d85b71d: Update mastra core peer dep version
8
+
9
+ ## 0.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 8a3bfd2: Update peerdeps to latest core
14
+
15
+ ### Patch Changes
16
+
17
+ - 0e17048: Throw mastra errors in storage packages
18
+ - Updated dependencies [15e9d26]
19
+ - Updated dependencies [d1baedb]
20
+ - Updated dependencies [d8f2d19]
21
+ - Updated dependencies [4d21bf2]
22
+ - Updated dependencies [07d6d88]
23
+ - Updated dependencies [9d52b17]
24
+ - Updated dependencies [2097952]
25
+ - Updated dependencies [792c4c0]
26
+ - Updated dependencies [5d74aab]
27
+ - Updated dependencies [a8b194f]
28
+ - Updated dependencies [4fb0cc2]
29
+ - Updated dependencies [d2a7a31]
30
+ - Updated dependencies [502fe05]
31
+ - Updated dependencies [144eb0b]
32
+ - Updated dependencies [8ba1b51]
33
+ - Updated dependencies [4efcfa0]
34
+ - Updated dependencies [0e17048]
35
+ - @mastra/core@0.10.7
36
+
37
+ ## 0.11.0-alpha.1
38
+
39
+ ### Minor Changes
40
+
41
+ - 8a3bfd2: Update peerdeps to latest core
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [792c4c0]
46
+ - Updated dependencies [502fe05]
47
+ - Updated dependencies [4efcfa0]
48
+ - @mastra/core@0.10.7-alpha.3
49
+
50
+ ## 0.10.4-alpha.0
51
+
52
+ ### Patch Changes
53
+
54
+ - 0e17048: Throw mastra errors in storage packages
55
+ - Updated dependencies [d1baedb]
56
+ - Updated dependencies [4d21bf2]
57
+ - Updated dependencies [2097952]
58
+ - Updated dependencies [4fb0cc2]
59
+ - Updated dependencies [d2a7a31]
60
+ - Updated dependencies [0e17048]
61
+ - @mastra/core@0.10.7-alpha.1
62
+
63
+ ## 0.10.3
64
+
65
+ ### Patch Changes
66
+
67
+ - 63f6b7d: dependencies updates:
68
+ - Updated dependency [`couchbase@^4.5.0` ↗︎](https://www.npmjs.com/package/couchbase/v/4.5.0) (from `^4.4.5`, in `dependencies`)
69
+ - Updated dependencies [63f6b7d]
70
+ - Updated dependencies [12a95fc]
71
+ - Updated dependencies [4b0f8a6]
72
+ - Updated dependencies [51264a5]
73
+ - Updated dependencies [8e6f677]
74
+ - Updated dependencies [d70c420]
75
+ - Updated dependencies [ee9af57]
76
+ - Updated dependencies [36f1c36]
77
+ - Updated dependencies [2a16996]
78
+ - Updated dependencies [10d352e]
79
+ - Updated dependencies [9589624]
80
+ - Updated dependencies [53d3c37]
81
+ - Updated dependencies [751c894]
82
+ - Updated dependencies [577ce3a]
83
+ - Updated dependencies [9260b3a]
84
+ - @mastra/core@0.10.6
85
+
86
+ ## 0.10.3-alpha.0
87
+
88
+ ### Patch Changes
89
+
90
+ - 63f6b7d: dependencies updates:
91
+ - Updated dependency [`couchbase@^4.5.0` ↗︎](https://www.npmjs.com/package/couchbase/v/4.5.0) (from `^4.4.5`, in `dependencies`)
92
+ - Updated dependencies [63f6b7d]
93
+ - Updated dependencies [36f1c36]
94
+ - Updated dependencies [10d352e]
95
+ - Updated dependencies [53d3c37]
96
+ - @mastra/core@0.10.6-alpha.0
97
+
98
+ ## 0.10.2
99
+
100
+ ### Patch Changes
101
+
102
+ - 66f4424: Update peerdeps
103
+ - Updated dependencies [d1ed912]
104
+ - Updated dependencies [f6fd25f]
105
+ - Updated dependencies [dffb67b]
106
+ - Updated dependencies [f1f1f1b]
107
+ - Updated dependencies [925ab94]
108
+ - Updated dependencies [f9816ae]
109
+ - Updated dependencies [82090c1]
110
+ - Updated dependencies [1b443fd]
111
+ - Updated dependencies [ce97900]
112
+ - Updated dependencies [f1309d3]
113
+ - Updated dependencies [14a2566]
114
+ - Updated dependencies [f7f8293]
115
+ - Updated dependencies [48eddb9]
116
+ - @mastra/core@0.10.4
117
+
118
+ ## 0.10.2-alpha.0
119
+
120
+ ### Patch Changes
121
+
122
+ - 66f4424: Update peerdeps
123
+
124
+ ## 0.10.1
125
+
126
+ ### Patch Changes
127
+
128
+ - f0d559f: Fix peerdeps for alpha channel
129
+ - 915ca1a: Added disconnect function for couchbase and added docs
130
+ Added prompt for OpenSearchVector
131
+ - Updated dependencies [ee77e78]
132
+ - Updated dependencies [592a2db]
133
+ - Updated dependencies [e5dc18d]
134
+ - Updated dependencies [ab5adbe]
135
+ - Updated dependencies [1e8bb40]
136
+ - Updated dependencies [1b5fc55]
137
+ - Updated dependencies [195c428]
138
+ - Updated dependencies [f73e11b]
139
+ - Updated dependencies [37643b8]
140
+ - Updated dependencies [99fd6cf]
141
+ - Updated dependencies [c5bf1ce]
142
+ - Updated dependencies [add596e]
143
+ - Updated dependencies [8dc94d8]
144
+ - Updated dependencies [ecebbeb]
145
+ - Updated dependencies [79d5145]
146
+ - Updated dependencies [12b7002]
147
+ - Updated dependencies [2901125]
148
+ - @mastra/core@0.10.2
149
+
150
+ ## 0.10.1-alpha.1
151
+
152
+ ### Patch Changes
153
+
154
+ - f0d559f: Fix peerdeps for alpha channel
155
+ - Updated dependencies [1e8bb40]
156
+ - @mastra/core@0.10.2-alpha.2
157
+
158
+ ## 0.10.1-alpha.0
159
+
160
+ ### Patch Changes
161
+
162
+ - 915ca1a: Added disconnect function for couchbase and added docs
163
+ Added prompt for OpenSearchVector
164
+ - Updated dependencies [ee77e78]
165
+ - Updated dependencies [2901125]
166
+ - @mastra/core@0.10.2-alpha.1
167
+
168
+ ## 0.10.0
169
+
170
+ ### Minor Changes
171
+
172
+ - 83da932: Move @mastra/core to peerdeps
173
+
174
+ ### Patch Changes
175
+
176
+ - d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
177
+ - a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
178
+ - Updated dependencies [b3a3d63]
179
+ - Updated dependencies [344f453]
180
+ - Updated dependencies [0a3ae6d]
181
+ - Updated dependencies [95911be]
182
+ - Updated dependencies [f53a6ac]
183
+ - Updated dependencies [5eb5a99]
184
+ - Updated dependencies [7e632c5]
185
+ - Updated dependencies [1e9fbfa]
186
+ - Updated dependencies [eabdcd9]
187
+ - Updated dependencies [90be034]
188
+ - Updated dependencies [99f050a]
189
+ - Updated dependencies [d0ee3c6]
190
+ - Updated dependencies [b2ae5aa]
191
+ - Updated dependencies [23f258c]
192
+ - Updated dependencies [a7292b0]
193
+ - Updated dependencies [0dcb9f0]
194
+ - Updated dependencies [2672a05]
195
+ - @mastra/core@0.10.0
196
+
197
+ ## 0.1.0-alpha.1
198
+
199
+ ### Minor Changes
200
+
201
+ - 83da932: Move @mastra/core to peerdeps
202
+
203
+ ### Patch Changes
204
+
205
+ - a7292b0: BREAKING(@mastra/core, all vector stores): Vector store breaking changes (remove deprecated functions and positional arguments)
206
+ - Updated dependencies [b3a3d63]
207
+ - Updated dependencies [344f453]
208
+ - Updated dependencies [0a3ae6d]
209
+ - Updated dependencies [95911be]
210
+ - Updated dependencies [5eb5a99]
211
+ - Updated dependencies [7e632c5]
212
+ - Updated dependencies [1e9fbfa]
213
+ - Updated dependencies [b2ae5aa]
214
+ - Updated dependencies [a7292b0]
215
+ - Updated dependencies [0dcb9f0]
216
+ - @mastra/core@0.10.0-alpha.1
217
+
218
+ ## 0.0.5-alpha.0
219
+
220
+ ### Patch Changes
221
+
222
+ - d0ee3c6: Change all public functions and constructors in vector stores to use named args and prepare to phase out positional args
223
+ - Updated dependencies [f53a6ac]
224
+ - Updated dependencies [eabdcd9]
225
+ - Updated dependencies [90be034]
226
+ - Updated dependencies [99f050a]
227
+ - Updated dependencies [d0ee3c6]
228
+ - Updated dependencies [23f258c]
229
+ - Updated dependencies [2672a05]
230
+ - @mastra/core@0.9.5-alpha.0
231
+
232
+ ## 0.0.4
233
+
234
+ ### Patch Changes
235
+
236
+ - c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
237
+ - Updated dependencies [396be50]
238
+ - Updated dependencies [ab80e7e]
239
+ - Updated dependencies [c3bd795]
240
+ - Updated dependencies [da082f8]
241
+ - Updated dependencies [a5810ce]
242
+ - Updated dependencies [3e9c131]
243
+ - Updated dependencies [3171b5b]
244
+ - Updated dependencies [973e5ac]
245
+ - Updated dependencies [daf942f]
246
+ - Updated dependencies [0b8b868]
247
+ - Updated dependencies [9e1eff5]
248
+ - Updated dependencies [6fa1ad1]
249
+ - Updated dependencies [c28d7a0]
250
+ - Updated dependencies [edf1e88]
251
+ - @mastra/core@0.9.4
252
+
253
+ ## 0.0.4-alpha.4
254
+
255
+ ### Patch Changes
256
+
257
+ - Updated dependencies [3e9c131]
258
+ - @mastra/core@0.9.4-alpha.4
259
+
260
+ ## 0.0.4-alpha.3
261
+
262
+ ### Patch Changes
263
+
264
+ - c3bd795: [MASTRA-3358] Deprecate updateIndexById and deleteIndexById
265
+ - Updated dependencies [396be50]
266
+ - Updated dependencies [c3bd795]
267
+ - Updated dependencies [da082f8]
268
+ - Updated dependencies [a5810ce]
269
+ - @mastra/core@0.9.4-alpha.3
270
+
271
+ ## 0.0.4-alpha.2
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies [3171b5b]
276
+ - Updated dependencies [973e5ac]
277
+ - Updated dependencies [9e1eff5]
278
+ - @mastra/core@0.9.4-alpha.2
279
+
280
+ ## 0.0.4-alpha.1
281
+
282
+ ### Patch Changes
283
+
284
+ - Updated dependencies [ab80e7e]
285
+ - Updated dependencies [6fa1ad1]
286
+ - Updated dependencies [c28d7a0]
287
+ - Updated dependencies [edf1e88]
288
+ - @mastra/core@0.9.4-alpha.1
289
+
290
+ ## 0.0.4-alpha.0
291
+
292
+ ### Patch Changes
293
+
294
+ - Updated dependencies [daf942f]
295
+ - Updated dependencies [0b8b868]
296
+ - @mastra/core@0.9.4-alpha.0
297
+
298
+ ## 0.0.3
299
+
300
+ ### Patch Changes
301
+
302
+ - 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
303
+ - Updated dependencies [e450778]
304
+ - Updated dependencies [8902157]
305
+ - Updated dependencies [ca0dc88]
306
+ - Updated dependencies [526c570]
307
+ - Updated dependencies [d7a6a33]
308
+ - Updated dependencies [9cd1a46]
309
+ - Updated dependencies [b5d2de0]
310
+ - Updated dependencies [644f8ad]
311
+ - Updated dependencies [70dbf51]
312
+ - @mastra/core@0.9.3
313
+
314
+ ## 0.0.3-alpha.1
315
+
316
+ ### Patch Changes
317
+
318
+ - 9cd1a46: [MASTRA-3338] update naming scheme for embedding index based on vector store rules and added duplicate index checks
319
+ - Updated dependencies [e450778]
320
+ - Updated dependencies [8902157]
321
+ - Updated dependencies [ca0dc88]
322
+ - Updated dependencies [9cd1a46]
323
+ - Updated dependencies [70dbf51]
324
+ - @mastra/core@0.9.3-alpha.1
325
+
326
+ ## 0.0.3-alpha.0
327
+
328
+ ### Patch Changes
329
+
330
+ - Updated dependencies [526c570]
331
+ - Updated dependencies [b5d2de0]
332
+ - Updated dependencies [644f8ad]
333
+ - @mastra/core@0.9.3-alpha.0
334
+
335
+ ## 0.0.2
4
336
 
5
337
  ### Patch Changes
6
338
 
@@ -19,8 +351,20 @@
19
351
  - Updated dependencies [17826a9]
20
352
  - Updated dependencies [7d8b7c7]
21
353
  - Updated dependencies [fba031f]
354
+ - Updated dependencies [3a5f1e1]
22
355
  - Updated dependencies [51e6923]
23
- - @mastra/core@0.0.0-trigger-playground-ui-package-20250506151043
356
+ - Updated dependencies [8398d89]
357
+ - @mastra/core@0.9.2
358
+
359
+ ## 0.0.2-alpha.1
360
+
361
+ ### Patch Changes
362
+
363
+ - Updated dependencies [6052aa6]
364
+ - Updated dependencies [7d8b7c7]
365
+ - Updated dependencies [3a5f1e1]
366
+ - Updated dependencies [8398d89]
367
+ - @mastra/core@0.9.2-alpha.6
24
368
 
25
369
  ## 0.0.2-alpha.0
26
370
 
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.
package/README.md CHANGED
@@ -51,7 +51,14 @@ const bucketName = 'your_vector_bucket';
51
51
  const scopeName = '_default'; // Or your custom scope name
52
52
  const collectionName = 'vector_data'; // Or your custom collection name
53
53
 
54
- const vectorStore = new CouchbaseVector(connectionString, username, password, bucketName, scopeName, collectionName);
54
+ const vectorStore = new CouchbaseVector({
55
+ connectionString,
56
+ username,
57
+ password,
58
+ bucketName,
59
+ scopeName,
60
+ collectionName,
61
+ });
55
62
 
56
63
  console.log('CouchbaseVector instance created. Connecting...');
57
64
  ```
@@ -214,6 +221,9 @@ _Note_: Deleting Index does NOT delete the vectors in the associated Couchbase C
214
221
  - `listIndexes()`: Lists the names of all Search Indexes in the cluster. Returns fully qualified names (e.g., `bucket.scope.index`).
215
222
  - `describeIndex(indexName)`: Gets the configured dimension, metric (Mastra name), and document count (currently returns -1) for a specific Search Index (using its short name).
216
223
  - `deleteIndex(indexName)`: Deletes a Search Index (using its short name).
224
+ - `deleteVector(indexName, id)`: Deletes a specific vector entry from an index by its ID.
225
+ - `updateVector(indexName, id, update)`: Updates a specific vector entry by its ID with new vector data and/or metadata.
226
+ - `disconnect()`: Closes the Couchbase client connection. Should be called when done using the store.
217
227
 
218
228
  ## Configuration Details
219
229
 
@@ -1,9 +1,13 @@
1
1
  import type { Collection } from 'couchbase';
2
2
  import type { CreateIndexParams } from '@mastra/core/vector';
3
+ import type { DeleteIndexParams } from '@mastra/core/vector';
4
+ import type { DeleteVectorParams } from '@mastra/core/vector';
5
+ import type { DescribeIndexParams } from '@mastra/core/vector';
3
6
  import type { IndexStats } from '@mastra/core/vector';
4
7
  import { MastraVector } from '@mastra/core/vector';
5
8
  import type { QueryResult } from '@mastra/core/vector';
6
9
  import type { QueryVectorParams } from '@mastra/core/vector';
10
+ import type { UpdateVectorParams } from '@mastra/core/vector';
7
11
  import type { UpsertVectorParams } from '@mastra/core/vector';
8
12
 
9
13
  declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
@@ -18,18 +22,55 @@ declare class CouchbaseVector extends MastraVector {
18
22
  private bucket;
19
23
  private scope;
20
24
  private vector_dimension;
21
- constructor(cnn_string: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
25
+ constructor({ connectionString, username, password, bucketName, scopeName, collectionName }: CouchbaseVectorParams);
22
26
  getCollection(): Promise<Collection>;
23
- createIndex(params: CreateIndexParams): Promise<void>;
24
- upsert(params: UpsertVectorParams): Promise<string[]>;
25
- query(params: QueryVectorParams): Promise<QueryResult[]>;
27
+ createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
28
+ upsert({ vectors, metadata, ids }: UpsertVectorParams): Promise<string[]>;
29
+ query({ indexName, queryVector, topK, includeVector }: QueryVectorParams): Promise<QueryResult[]>;
26
30
  listIndexes(): Promise<string[]>;
27
- describeIndex(indexName: string): Promise<IndexStats>;
28
- deleteIndex(indexName: string): Promise<void>;
31
+ /**
32
+ * Retrieves statistics about a vector index.
33
+ *
34
+ * @param {string} indexName - The name of the index to describe
35
+ * @returns A promise that resolves to the index statistics including dimension, count and metric
36
+ */
37
+ describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
38
+ deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
39
+ /**
40
+ * Updates a vector by its ID with the provided vector and/or metadata.
41
+ * @param indexName - The name of the index containing the vector.
42
+ * @param id - The ID of the vector to update.
43
+ * @param update - An object containing the vector and/or metadata to update.
44
+ * @param update.vector - An optional array of numbers representing the new vector.
45
+ * @param update.metadata - An optional record containing the new metadata.
46
+ * @returns A promise that resolves when the update is complete.
47
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
48
+ */
49
+ updateVector({ id, update }: UpdateVectorParams): Promise<void>;
50
+ /**
51
+ * Deletes a vector by its ID.
52
+ * @param indexName - The name of the index containing the vector.
53
+ * @param id - The ID of the vector to delete.
54
+ * @returns A promise that resolves when the deletion is complete.
55
+ * @throws Will throw an error if the deletion operation fails.
56
+ */
57
+ deleteVector({ id }: DeleteVectorParams): Promise<void>;
58
+ disconnect(): Promise<void>;
29
59
  }
30
60
  export { CouchbaseVector }
31
61
  export { CouchbaseVector as CouchbaseVector_alias_1 }
32
62
 
63
+ declare type CouchbaseVectorParams = {
64
+ connectionString: string;
65
+ username: string;
66
+ password: string;
67
+ bucketName: string;
68
+ scopeName: string;
69
+ collectionName: string;
70
+ };
71
+ export { CouchbaseVectorParams }
72
+ export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
73
+
33
74
  declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
34
75
  export { DISTANCE_MAPPING }
35
76
  export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
@@ -1,9 +1,13 @@
1
1
  import type { Collection } from 'couchbase';
2
2
  import type { CreateIndexParams } from '@mastra/core/vector';
3
+ import type { DeleteIndexParams } from '@mastra/core/vector';
4
+ import type { DeleteVectorParams } from '@mastra/core/vector';
5
+ import type { DescribeIndexParams } from '@mastra/core/vector';
3
6
  import type { IndexStats } from '@mastra/core/vector';
4
7
  import { MastraVector } from '@mastra/core/vector';
5
8
  import type { QueryResult } from '@mastra/core/vector';
6
9
  import type { QueryVectorParams } from '@mastra/core/vector';
10
+ import type { UpdateVectorParams } from '@mastra/core/vector';
7
11
  import type { UpsertVectorParams } from '@mastra/core/vector';
8
12
 
9
13
  declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
@@ -18,18 +22,55 @@ declare class CouchbaseVector extends MastraVector {
18
22
  private bucket;
19
23
  private scope;
20
24
  private vector_dimension;
21
- constructor(cnn_string: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
25
+ constructor({ connectionString, username, password, bucketName, scopeName, collectionName }: CouchbaseVectorParams);
22
26
  getCollection(): Promise<Collection>;
23
- createIndex(params: CreateIndexParams): Promise<void>;
24
- upsert(params: UpsertVectorParams): Promise<string[]>;
25
- query(params: QueryVectorParams): Promise<QueryResult[]>;
27
+ createIndex({ indexName, dimension, metric }: CreateIndexParams): Promise<void>;
28
+ upsert({ vectors, metadata, ids }: UpsertVectorParams): Promise<string[]>;
29
+ query({ indexName, queryVector, topK, includeVector }: QueryVectorParams): Promise<QueryResult[]>;
26
30
  listIndexes(): Promise<string[]>;
27
- describeIndex(indexName: string): Promise<IndexStats>;
28
- deleteIndex(indexName: string): Promise<void>;
31
+ /**
32
+ * Retrieves statistics about a vector index.
33
+ *
34
+ * @param {string} indexName - The name of the index to describe
35
+ * @returns A promise that resolves to the index statistics including dimension, count and metric
36
+ */
37
+ describeIndex({ indexName }: DescribeIndexParams): Promise<IndexStats>;
38
+ deleteIndex({ indexName }: DeleteIndexParams): Promise<void>;
39
+ /**
40
+ * Updates a vector by its ID with the provided vector and/or metadata.
41
+ * @param indexName - The name of the index containing the vector.
42
+ * @param id - The ID of the vector to update.
43
+ * @param update - An object containing the vector and/or metadata to update.
44
+ * @param update.vector - An optional array of numbers representing the new vector.
45
+ * @param update.metadata - An optional record containing the new metadata.
46
+ * @returns A promise that resolves when the update is complete.
47
+ * @throws Will throw an error if no updates are provided or if the update operation fails.
48
+ */
49
+ updateVector({ id, update }: UpdateVectorParams): Promise<void>;
50
+ /**
51
+ * Deletes a vector by its ID.
52
+ * @param indexName - The name of the index containing the vector.
53
+ * @param id - The ID of the vector to delete.
54
+ * @returns A promise that resolves when the deletion is complete.
55
+ * @throws Will throw an error if the deletion operation fails.
56
+ */
57
+ deleteVector({ id }: DeleteVectorParams): Promise<void>;
58
+ disconnect(): Promise<void>;
29
59
  }
30
60
  export { CouchbaseVector }
31
61
  export { CouchbaseVector as CouchbaseVector_alias_1 }
32
62
 
63
+ declare type CouchbaseVectorParams = {
64
+ connectionString: string;
65
+ username: string;
66
+ password: string;
67
+ bucketName: string;
68
+ scopeName: string;
69
+ collectionName: string;
70
+ };
71
+ export { CouchbaseVectorParams }
72
+ export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
73
+
33
74
  declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
34
75
  export { DISTANCE_MAPPING }
35
76
  export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }