@mastra/couchbase 0.0.0-vector-sources-20250516175436 → 0.0.0-vector-query-tool-provider-options-20250828222356

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/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,17 @@
1
+ import { generateTypes } from '@internal/types-builder';
2
+ import { defineConfig } from 'tsup';
3
+
4
+ export default defineConfig({
5
+ entry: ['src/index.ts'],
6
+ format: ['esm', 'cjs'],
7
+ clean: true,
8
+ dts: false,
9
+ splitting: true,
10
+ treeshake: {
11
+ preset: 'smallest',
12
+ },
13
+ sourcemap: true,
14
+ onSuccess: async () => {
15
+ await generateTypes(process.cwd());
16
+ },
17
+ });
@@ -1,86 +0,0 @@
1
- import type { Collection } from 'couchbase';
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';
6
- import type { IndexStats } from '@mastra/core/vector';
7
- import { MastraVector } from '@mastra/core/vector';
8
- import type { ParamsToArgs } from '@mastra/core/vector';
9
- import type { QueryResult } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpdateVectorParams } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
-
14
- declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
15
-
16
- declare class CouchbaseVector extends MastraVector {
17
- private clusterPromise;
18
- private cluster;
19
- private bucketName;
20
- private collectionName;
21
- private scopeName;
22
- private collection;
23
- private bucket;
24
- private scope;
25
- private vector_dimension;
26
- /**
27
- * @deprecated Passing parameters as positional arguments is deprecated.
28
- * Use the object parameter instead. This signature will be removed on May 20th, 2025.
29
- */
30
- constructor(connectionString: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
31
- constructor(params: CouchbaseVectorParams);
32
- getCollection(): Promise<Collection>;
33
- createIndex(params: CreateIndexParams): Promise<void>;
34
- upsert(params: UpsertVectorParams): Promise<string[]>;
35
- query(params: QueryVectorParams): Promise<QueryResult[]>;
36
- listIndexes(): Promise<string[]>;
37
- /**
38
- * Retrieves statistics about a vector index.
39
- *
40
- * @param params - The parameters for describing an index
41
- * @param params.indexName - The name of the index to describe
42
- * @returns A promise that resolves to the index statistics including dimension, count and metric
43
- */
44
- describeIndex(...args: ParamsToArgs<DescribeIndexParams>): Promise<IndexStats>;
45
- deleteIndex(...args: ParamsToArgs<DeleteIndexParams>): Promise<void>;
46
- /**
47
- * Updates a vector by its ID with the provided vector and/or metadata.
48
- * @param indexName - The name of the index containing the vector.
49
- * @param id - The ID of the vector to update.
50
- * @param update - An object containing the vector and/or metadata to update.
51
- * @param update.vector - An optional array of numbers representing the new vector.
52
- * @param update.metadata - An optional record containing the new metadata.
53
- * @returns A promise that resolves when the update is complete.
54
- * @throws Will throw an error if no updates are provided or if the update operation fails.
55
- */
56
- updateVector(...args: ParamsToArgs<UpdateVectorParams>): Promise<void>;
57
- /**
58
- * Deletes a vector by its ID.
59
- * @param indexName - The name of the index containing the vector.
60
- * @param id - The ID of the vector to delete.
61
- * @returns A promise that resolves when the deletion is complete.
62
- * @throws Will throw an error if the deletion operation fails.
63
- */
64
- deleteVector(...args: ParamsToArgs<DeleteVectorParams>): Promise<void>;
65
- }
66
- export { CouchbaseVector }
67
- export { CouchbaseVector as CouchbaseVector_alias_1 }
68
-
69
- declare type CouchbaseVectorParams = {
70
- connectionString: string;
71
- username: string;
72
- password: string;
73
- bucketName: string;
74
- scopeName: string;
75
- collectionName: string;
76
- };
77
- export { CouchbaseVectorParams }
78
- export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
79
-
80
- declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
81
- export { DISTANCE_MAPPING }
82
- export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
83
-
84
- declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
85
-
86
- export { }
@@ -1,86 +0,0 @@
1
- import type { Collection } from 'couchbase';
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';
6
- import type { IndexStats } from '@mastra/core/vector';
7
- import { MastraVector } from '@mastra/core/vector';
8
- import type { ParamsToArgs } from '@mastra/core/vector';
9
- import type { QueryResult } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpdateVectorParams } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
-
14
- declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
15
-
16
- declare class CouchbaseVector extends MastraVector {
17
- private clusterPromise;
18
- private cluster;
19
- private bucketName;
20
- private collectionName;
21
- private scopeName;
22
- private collection;
23
- private bucket;
24
- private scope;
25
- private vector_dimension;
26
- /**
27
- * @deprecated Passing parameters as positional arguments is deprecated.
28
- * Use the object parameter instead. This signature will be removed on May 20th, 2025.
29
- */
30
- constructor(connectionString: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
31
- constructor(params: CouchbaseVectorParams);
32
- getCollection(): Promise<Collection>;
33
- createIndex(params: CreateIndexParams): Promise<void>;
34
- upsert(params: UpsertVectorParams): Promise<string[]>;
35
- query(params: QueryVectorParams): Promise<QueryResult[]>;
36
- listIndexes(): Promise<string[]>;
37
- /**
38
- * Retrieves statistics about a vector index.
39
- *
40
- * @param params - The parameters for describing an index
41
- * @param params.indexName - The name of the index to describe
42
- * @returns A promise that resolves to the index statistics including dimension, count and metric
43
- */
44
- describeIndex(...args: ParamsToArgs<DescribeIndexParams>): Promise<IndexStats>;
45
- deleteIndex(...args: ParamsToArgs<DeleteIndexParams>): Promise<void>;
46
- /**
47
- * Updates a vector by its ID with the provided vector and/or metadata.
48
- * @param indexName - The name of the index containing the vector.
49
- * @param id - The ID of the vector to update.
50
- * @param update - An object containing the vector and/or metadata to update.
51
- * @param update.vector - An optional array of numbers representing the new vector.
52
- * @param update.metadata - An optional record containing the new metadata.
53
- * @returns A promise that resolves when the update is complete.
54
- * @throws Will throw an error if no updates are provided or if the update operation fails.
55
- */
56
- updateVector(...args: ParamsToArgs<UpdateVectorParams>): Promise<void>;
57
- /**
58
- * Deletes a vector by its ID.
59
- * @param indexName - The name of the index containing the vector.
60
- * @param id - The ID of the vector to delete.
61
- * @returns A promise that resolves when the deletion is complete.
62
- * @throws Will throw an error if the deletion operation fails.
63
- */
64
- deleteVector(...args: ParamsToArgs<DeleteVectorParams>): Promise<void>;
65
- }
66
- export { CouchbaseVector }
67
- export { CouchbaseVector as CouchbaseVector_alias_1 }
68
-
69
- declare type CouchbaseVectorParams = {
70
- connectionString: string;
71
- username: string;
72
- password: string;
73
- bucketName: string;
74
- scopeName: string;
75
- collectionName: string;
76
- };
77
- export { CouchbaseVectorParams }
78
- export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
79
-
80
- declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
81
- export { DISTANCE_MAPPING }
82
- export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
83
-
84
- declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
85
-
86
- export { }
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- export { DISTANCE_MAPPING } from './_tsup-dts-rollup.cjs';
2
- export { CouchbaseVectorParams } from './_tsup-dts-rollup.cjs';
3
- export { CouchbaseVector } from './_tsup-dts-rollup.cjs';