@mastra/mongodb 0.0.0-vnext-inngest-20250508122351 → 0.0.0-vnext-20251104230439

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +1150 -2
  2. package/LICENSE.md +11 -42
  3. package/README.md +50 -0
  4. package/dist/index.cjs +2504 -139
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.d.ts +5 -7
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +2500 -136
  9. package/dist/index.js.map +1 -0
  10. package/dist/storage/connectors/MongoDBConnector.d.ts +23 -0
  11. package/dist/storage/connectors/MongoDBConnector.d.ts.map +1 -0
  12. package/dist/storage/connectors/base.d.ts +6 -0
  13. package/dist/storage/connectors/base.d.ts.map +1 -0
  14. package/dist/storage/domains/memory/index.d.ts +66 -0
  15. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  16. package/dist/storage/domains/observability/index.d.ts +43 -0
  17. package/dist/storage/domains/observability/index.d.ts.map +1 -0
  18. package/dist/storage/domains/operations/index.d.ts +50 -0
  19. package/dist/storage/domains/operations/index.d.ts.map +1 -0
  20. package/dist/storage/domains/scores/index.d.ts +50 -0
  21. package/dist/storage/domains/scores/index.d.ts.map +1 -0
  22. package/dist/storage/domains/utils.d.ts +8 -0
  23. package/dist/storage/domains/utils.d.ts.map +1 -0
  24. package/dist/storage/domains/workflows/index.d.ts +45 -0
  25. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  26. package/dist/storage/index.d.ts +201 -0
  27. package/dist/storage/index.d.ts.map +1 -0
  28. package/dist/storage/types.d.ts +11 -0
  29. package/dist/storage/types.d.ts.map +1 -0
  30. package/dist/vector/filter.d.ts +21 -0
  31. package/dist/vector/filter.d.ts.map +1 -0
  32. package/dist/vector/index.d.ts +93 -0
  33. package/dist/vector/index.d.ts.map +1 -0
  34. package/dist/vector/prompt.d.ts +6 -0
  35. package/dist/vector/prompt.d.ts.map +1 -0
  36. package/package.json +34 -16
  37. package/dist/_tsup-dts-rollup.d.cts +0 -96
  38. package/dist/_tsup-dts-rollup.d.ts +0 -96
  39. package/dist/index.d.cts +0 -7
  40. package/docker-compose.yml +0 -8
  41. package/eslint.config.js +0 -6
  42. package/src/index.ts +0 -2
  43. package/src/vector/filter.test.ts +0 -410
  44. package/src/vector/filter.ts +0 -122
  45. package/src/vector/index.test.ts +0 -459
  46. package/src/vector/index.ts +0 -380
  47. package/src/vector/prompt.ts +0 -97
  48. package/tsconfig.json +0 -5
  49. package/vitest.config.ts +0 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mongodb",
3
- "version": "0.0.0-vnext-inngest-20250508122351",
3
+ "version": "0.0.0-vnext-20251104230439",
4
4
  "description": "MongoDB provider for Mastra - includes vector store capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  "default": "./dist/index.js"
13
13
  },
14
14
  "require": {
15
- "types": "./dist/index.d.cts",
15
+ "types": "./dist/index.d.ts",
16
16
  "default": "./dist/index.cjs"
17
17
  }
18
18
  },
@@ -20,24 +20,42 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@types/mongodb": "^4.0.7",
23
- "cloudflare": "^4.1.0",
24
- "mongodb": "^6.15.0",
25
- "uuid": "^11.1.0",
26
- "@mastra/core": "0.0.0-vnext-inngest-20250508122351"
23
+ "cloudflare": "^4.5.0",
24
+ "mongodb": "^6.17.0",
25
+ "uuid": "^11.1.0"
27
26
  },
28
27
  "devDependencies": {
29
- "@microsoft/api-extractor": "^7.52.5",
30
- "@types/node": "^20.17.27",
31
- "eslint": "^9.23.0",
32
- "tsup": "^8.4.0",
33
- "typescript": "^5.8.2",
34
- "vitest": "^3.1.2",
35
- "@internal/lint": "0.0.0-vnext-inngest-20250508122351"
28
+ "@microsoft/api-extractor": "^7.52.8",
29
+ "@types/node": "^20.19.0",
30
+ "eslint": "^9.37.0",
31
+ "tsup": "^8.5.0",
32
+ "typescript": "^5.8.3",
33
+ "vitest": "^3.2.4",
34
+ "@internal/lint": "0.0.0-vnext-20251104230439",
35
+ "@mastra/core": "0.0.0-vnext-20251104230439",
36
+ "@internal/storage-test-utils": "0.0.49",
37
+ "@internal/types-builder": "0.0.0-vnext-20251104230439"
38
+ },
39
+ "peerDependencies": {
40
+ "@mastra/core": "0.0.0-vnext-20251104230439"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "CHANGELOG.md"
45
+ ],
46
+ "homepage": "https://mastra.ai",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/mastra-ai/mastra.git",
50
+ "directory": "stores/mongodb"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/mastra-ai/mastra/issues"
36
54
  },
37
55
  "scripts": {
38
- "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
39
- "build:watch": "pnpm build --watch",
40
- "pretest": "docker compose up -d && (for i in $(seq 1 30); do docker compose exec -T mongodb mongosh --eval 'db.adminCommand(\"ping\")' --quiet && break || (sleep 1; [ $i -eq 30 ] && exit 1); done)",
56
+ "build": "tsup --silent --config tsup.config.ts",
57
+ "build:watch": "tsup --watch --silent --config tsup.config.ts",
58
+ "pretest": "docker compose up -d --wait",
41
59
  "test": "vitest run",
42
60
  "posttest": "docker compose down -v",
43
61
  "pretest:watch": "docker compose up -d",
@@ -1,96 +0,0 @@
1
- import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
- import type { CreateIndexParams } from '@mastra/core/vector';
3
- import type { IndexStats } from '@mastra/core/vector';
4
- import { MastraVector } from '@mastra/core/vector';
5
- import type { MongoClientOptions } from 'mongodb';
6
- import type { OperatorSupport } from '@mastra/core/vector/filter';
7
- import type { ParamsToArgs } from '@mastra/core/vector';
8
- import type { QueryResult } from '@mastra/core/vector';
9
- import type { QueryVectorArgs } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpsertVectorArgs } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
- import type { VectorFilter } from '@mastra/core/vector/filter';
14
-
15
- /**
16
- * Vector store specific prompt that details supported operators and examples.
17
- * This prompt helps users construct valid filters for MongoDB Vector.
18
- */
19
- declare const MONGODB_PROMPT = "When querying MongoDB Vector, you can ONLY use the operators listed below. Any other operators will be rejected.\nImportant: Don't explain how to construct the filter - use the specified operators and fields to search the content and return relevant results.\nIf a user tries to give an explicit operator that is not supported, reject the filter entirely and let them know that the operator is not supported.\n\nBasic Comparison Operators:\n- $eq: Exact match (default when using 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- $elemMatch: Match array elements that meet all specified conditions\n Example: { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 100 } } } }\n- $size: Match arrays with specific length\n Example: { \"tags\": { \"$size\": 3 } }\n\nLogical Operators:\n- $and: Logical AND (can be implicit or explicit)\n Implicit Example: { \"price\": { \"$gt\": 100 }, \"category\": \"electronics\" }\n Explicit 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- $nor: Logical NOR\n Example: { \"$nor\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n\nElement Operators:\n- $exists: Check if field exists\n Example: { \"rating\": { \"$exists\": true } }\n- $type: Check field type\n Example: { \"price\": { \"$type\": \"number\" } }\n\nText Search Operators:\n- $text: Full text search\n Example: { \"$text\": { \"$search\": \"gaming laptop\" } }\n- $regex: Regular expression match\n Example: { \"name\": { \"$regex\": \"^Gaming\" } }\n\nRestrictions:\n- Only logical operators ($and, $or, $not, $nor) can be used at the top level\n- Empty arrays in array operators will return no results\n- Nested fields are supported using dot notation\n- Multiple conditions on the same field are supported\n- At least one key-value pair is required in filter object\n- Empty objects and undefined values are treated as no filter\n- Invalid types in comparison operators will throw errors\n- All non-logical 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- Logical operators ($and, $or, $not, $nor):\n - Can only be used at top level or nested within other logical operators\n - Can not be used on a field level, or be nested inside a field\n - Can not be used inside an operator\n - Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n - Valid: { \"$or\": [{ \"$and\": [{ \"field\": { \"$gt\": 100 } }] }] }\n - Invalid: { \"field\": { \"$and\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$or\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$gt\": { \"$and\": [{...}] } } }\n\nExample Complex Query:\n{\n \"$and\": [\n { \"category\": { \"$in\": [\"electronics\", \"computers\"] } },\n { \"price\": { \"$gte\": 100, \"$lte\": 1000 } },\n { \"tags\": { \"$all\": [\"premium\", \"sale\"] } },\n { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 50 }, \"inStock\": true } } },\n { \"$text\": { \"$search\": \"gaming laptop\" } },\n { \"$or\": [\n { \"stock\": { \"$gt\": 0 } },\n { \"preorder\": true }\n ]},\n { \"$not\": { \"status\": \"discontinued\" } }\n ]\n}";
20
- export { MONGODB_PROMPT }
21
- export { MONGODB_PROMPT as MONGODB_PROMPT_alias_1 }
22
-
23
- /**
24
- * Translator for MongoDB filter queries.
25
- * Maintains MongoDB-compatible syntax while ensuring proper validation
26
- * and normalization of values.
27
- */
28
- export declare class MongoDBFilterTranslator extends BaseFilterTranslator {
29
- protected getSupportedOperators(): OperatorSupport;
30
- translate(filter?: VectorFilter): any;
31
- private translateNode;
32
- private translateOperatorValue;
33
- isEmpty(filter: any): boolean;
34
- }
35
-
36
- declare type MongoDBQueryArgs = [...QueryVectorArgs, string?];
37
- export { MongoDBQueryArgs }
38
- export { MongoDBQueryArgs as MongoDBQueryArgs_alias_1 }
39
-
40
- declare interface MongoDBQueryVectorParams extends QueryVectorParams {
41
- documentFilter?: VectorFilter;
42
- }
43
- export { MongoDBQueryVectorParams }
44
- export { MongoDBQueryVectorParams as MongoDBQueryVectorParams_alias_1 }
45
-
46
- declare type MongoDBUpsertArgs = [...UpsertVectorArgs, string[]?];
47
- export { MongoDBUpsertArgs }
48
- export { MongoDBUpsertArgs as MongoDBUpsertArgs_alias_1 }
49
-
50
- declare type MongoDBUpsertParams = ParamsToArgs<MongoDBUpsertArgs>;
51
- export { MongoDBUpsertParams }
52
- export { MongoDBUpsertParams as MongoDBUpsertParams_alias_1 }
53
-
54
- declare interface MongoDBUpsertVectorParams extends UpsertVectorParams {
55
- documents?: string[];
56
- }
57
- export { MongoDBUpsertVectorParams }
58
- export { MongoDBUpsertVectorParams as MongoDBUpsertVectorParams_alias_1 }
59
-
60
- declare class MongoDBVector extends MastraVector {
61
- private client;
62
- private db;
63
- private collections;
64
- private readonly embeddingFieldName;
65
- private readonly metadataFieldName;
66
- private readonly documentFieldName;
67
- private collectionForValidation;
68
- private mongoMetricMap;
69
- constructor({ uri, dbName, options }: {
70
- uri: string;
71
- dbName: string;
72
- options?: MongoClientOptions;
73
- });
74
- connect(): Promise<void>;
75
- disconnect(): Promise<void>;
76
- createIndex(params: CreateIndexParams): Promise<void>;
77
- waitForIndexReady(indexName: string, timeoutMs?: number, checkIntervalMs?: number): Promise<void>;
78
- upsert(params: MongoDBUpsertVectorParams): Promise<string[]>;
79
- query(params: MongoDBQueryVectorParams): Promise<QueryResult[]>;
80
- listIndexes(): Promise<string[]>;
81
- describeIndex(indexName: string): Promise<IndexStats>;
82
- deleteIndex(indexName: string): Promise<void>;
83
- updateIndexById(indexName: string, id: string, update: {
84
- vector?: number[];
85
- metadata?: Record<string, any>;
86
- }): Promise<void>;
87
- deleteIndexById(indexName: string, id: string): Promise<void>;
88
- private getCollection;
89
- private validateVectorDimensions;
90
- private setIndexDimension;
91
- private transformFilter;
92
- }
93
- export { MongoDBVector }
94
- export { MongoDBVector as MongoDBVector_alias_1 }
95
-
96
- export { }
@@ -1,96 +0,0 @@
1
- import { BaseFilterTranslator } from '@mastra/core/vector/filter';
2
- import type { CreateIndexParams } from '@mastra/core/vector';
3
- import type { IndexStats } from '@mastra/core/vector';
4
- import { MastraVector } from '@mastra/core/vector';
5
- import type { MongoClientOptions } from 'mongodb';
6
- import type { OperatorSupport } from '@mastra/core/vector/filter';
7
- import type { ParamsToArgs } from '@mastra/core/vector';
8
- import type { QueryResult } from '@mastra/core/vector';
9
- import type { QueryVectorArgs } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpsertVectorArgs } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
- import type { VectorFilter } from '@mastra/core/vector/filter';
14
-
15
- /**
16
- * Vector store specific prompt that details supported operators and examples.
17
- * This prompt helps users construct valid filters for MongoDB Vector.
18
- */
19
- declare const MONGODB_PROMPT = "When querying MongoDB Vector, you can ONLY use the operators listed below. Any other operators will be rejected.\nImportant: Don't explain how to construct the filter - use the specified operators and fields to search the content and return relevant results.\nIf a user tries to give an explicit operator that is not supported, reject the filter entirely and let them know that the operator is not supported.\n\nBasic Comparison Operators:\n- $eq: Exact match (default when using 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- $elemMatch: Match array elements that meet all specified conditions\n Example: { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 100 } } } }\n- $size: Match arrays with specific length\n Example: { \"tags\": { \"$size\": 3 } }\n\nLogical Operators:\n- $and: Logical AND (can be implicit or explicit)\n Implicit Example: { \"price\": { \"$gt\": 100 }, \"category\": \"electronics\" }\n Explicit 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- $nor: Logical NOR\n Example: { \"$nor\": [{ \"price\": { \"$lt\": 50 } }, { \"category\": \"books\" }] }\n\nElement Operators:\n- $exists: Check if field exists\n Example: { \"rating\": { \"$exists\": true } }\n- $type: Check field type\n Example: { \"price\": { \"$type\": \"number\" } }\n\nText Search Operators:\n- $text: Full text search\n Example: { \"$text\": { \"$search\": \"gaming laptop\" } }\n- $regex: Regular expression match\n Example: { \"name\": { \"$regex\": \"^Gaming\" } }\n\nRestrictions:\n- Only logical operators ($and, $or, $not, $nor) can be used at the top level\n- Empty arrays in array operators will return no results\n- Nested fields are supported using dot notation\n- Multiple conditions on the same field are supported\n- At least one key-value pair is required in filter object\n- Empty objects and undefined values are treated as no filter\n- Invalid types in comparison operators will throw errors\n- All non-logical 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- Logical operators ($and, $or, $not, $nor):\n - Can only be used at top level or nested within other logical operators\n - Can not be used on a field level, or be nested inside a field\n - Can not be used inside an operator\n - Valid: { \"$and\": [{ \"field\": { \"$gt\": 100 } }] }\n - Valid: { \"$or\": [{ \"$and\": [{ \"field\": { \"$gt\": 100 } }] }] }\n - Invalid: { \"field\": { \"$and\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$or\": [{ \"$gt\": 100 }] } }\n - Invalid: { \"field\": { \"$gt\": { \"$and\": [{...}] } } }\n\nExample Complex Query:\n{\n \"$and\": [\n { \"category\": { \"$in\": [\"electronics\", \"computers\"] } },\n { \"price\": { \"$gte\": 100, \"$lte\": 1000 } },\n { \"tags\": { \"$all\": [\"premium\", \"sale\"] } },\n { \"items\": { \"$elemMatch\": { \"price\": { \"$gt\": 50 }, \"inStock\": true } } },\n { \"$text\": { \"$search\": \"gaming laptop\" } },\n { \"$or\": [\n { \"stock\": { \"$gt\": 0 } },\n { \"preorder\": true }\n ]},\n { \"$not\": { \"status\": \"discontinued\" } }\n ]\n}";
20
- export { MONGODB_PROMPT }
21
- export { MONGODB_PROMPT as MONGODB_PROMPT_alias_1 }
22
-
23
- /**
24
- * Translator for MongoDB filter queries.
25
- * Maintains MongoDB-compatible syntax while ensuring proper validation
26
- * and normalization of values.
27
- */
28
- export declare class MongoDBFilterTranslator extends BaseFilterTranslator {
29
- protected getSupportedOperators(): OperatorSupport;
30
- translate(filter?: VectorFilter): any;
31
- private translateNode;
32
- private translateOperatorValue;
33
- isEmpty(filter: any): boolean;
34
- }
35
-
36
- declare type MongoDBQueryArgs = [...QueryVectorArgs, string?];
37
- export { MongoDBQueryArgs }
38
- export { MongoDBQueryArgs as MongoDBQueryArgs_alias_1 }
39
-
40
- declare interface MongoDBQueryVectorParams extends QueryVectorParams {
41
- documentFilter?: VectorFilter;
42
- }
43
- export { MongoDBQueryVectorParams }
44
- export { MongoDBQueryVectorParams as MongoDBQueryVectorParams_alias_1 }
45
-
46
- declare type MongoDBUpsertArgs = [...UpsertVectorArgs, string[]?];
47
- export { MongoDBUpsertArgs }
48
- export { MongoDBUpsertArgs as MongoDBUpsertArgs_alias_1 }
49
-
50
- declare type MongoDBUpsertParams = ParamsToArgs<MongoDBUpsertArgs>;
51
- export { MongoDBUpsertParams }
52
- export { MongoDBUpsertParams as MongoDBUpsertParams_alias_1 }
53
-
54
- declare interface MongoDBUpsertVectorParams extends UpsertVectorParams {
55
- documents?: string[];
56
- }
57
- export { MongoDBUpsertVectorParams }
58
- export { MongoDBUpsertVectorParams as MongoDBUpsertVectorParams_alias_1 }
59
-
60
- declare class MongoDBVector extends MastraVector {
61
- private client;
62
- private db;
63
- private collections;
64
- private readonly embeddingFieldName;
65
- private readonly metadataFieldName;
66
- private readonly documentFieldName;
67
- private collectionForValidation;
68
- private mongoMetricMap;
69
- constructor({ uri, dbName, options }: {
70
- uri: string;
71
- dbName: string;
72
- options?: MongoClientOptions;
73
- });
74
- connect(): Promise<void>;
75
- disconnect(): Promise<void>;
76
- createIndex(params: CreateIndexParams): Promise<void>;
77
- waitForIndexReady(indexName: string, timeoutMs?: number, checkIntervalMs?: number): Promise<void>;
78
- upsert(params: MongoDBUpsertVectorParams): Promise<string[]>;
79
- query(params: MongoDBQueryVectorParams): Promise<QueryResult[]>;
80
- listIndexes(): Promise<string[]>;
81
- describeIndex(indexName: string): Promise<IndexStats>;
82
- deleteIndex(indexName: string): Promise<void>;
83
- updateIndexById(indexName: string, id: string, update: {
84
- vector?: number[];
85
- metadata?: Record<string, any>;
86
- }): Promise<void>;
87
- deleteIndexById(indexName: string, id: string): Promise<void>;
88
- private getCollection;
89
- private validateVectorDimensions;
90
- private setIndexDimension;
91
- private transformFilter;
92
- }
93
- export { MongoDBVector }
94
- export { MongoDBVector as MongoDBVector_alias_1 }
95
-
96
- export { }
package/dist/index.d.cts DELETED
@@ -1,7 +0,0 @@
1
- export { MONGODB_PROMPT } from './_tsup-dts-rollup.cjs';
2
- export { MongoDBUpsertArgs } from './_tsup-dts-rollup.cjs';
3
- export { MongoDBQueryArgs } from './_tsup-dts-rollup.cjs';
4
- export { MongoDBUpsertParams } from './_tsup-dts-rollup.cjs';
5
- export { MongoDBUpsertVectorParams } from './_tsup-dts-rollup.cjs';
6
- export { MongoDBQueryVectorParams } from './_tsup-dts-rollup.cjs';
7
- export { MongoDBVector } from './_tsup-dts-rollup.cjs';
@@ -1,8 +0,0 @@
1
- services:
2
- mongodb:
3
- image: mongodb/mongodb-atlas-local
4
- environment:
5
- MONGODB_INITDB_ROOT_USERNAME: mongodb
6
- MONGODB_INITDB_ROOT_PASSWORD: mongodb
7
- ports:
8
- - 27018:27017
package/eslint.config.js DELETED
@@ -1,6 +0,0 @@
1
- import { createConfig } from '@internal/lint/eslint';
2
-
3
- const config = await createConfig();
4
-
5
- /** @type {import("eslint").Linter.Config[]} */
6
- export default [...config];
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './vector';
2
- export { MONGODB_PROMPT } from './vector/prompt';