@mastra/upstash 1.5.5-alpha.1 → 1.5.5

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.
@@ -3,7 +3,7 @@ name: mastra-upstash
3
3
  description: Documentation for @mastra/upstash. Use when working with @mastra/upstash APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/upstash"
6
- version: "1.5.5-alpha.1"
6
+ version: "1.5.5"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.5-alpha.1",
2
+ "version": "1.5.5",
3
3
  "package": "@mastra/upstash",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -18,13 +18,13 @@ The UpstashVector class provides vector search using [Upstash Vector](https://up
18
18
 
19
19
  ### `createIndex()`
20
20
 
21
- Note: This method is a no-op for Upstash as indexes are created automatically.
21
+ Note: This method is a no-op for Upstash. Indexes (Upstash namespaces) are created automatically on first write, and the parameters below are ignored.
22
22
 
23
23
  **indexName** (`string`): Name of the index to create
24
24
 
25
25
  **dimension** (`number`): Vector dimension (must match your embedding model)
26
26
 
27
- **metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Distance metric for similarity search (Default: `cosine`)
27
+ **metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Ignored. The metric is set on the Upstash index itself.
28
28
 
29
29
  ### `upsert()`
30
30
 
@@ -70,7 +70,7 @@ Returns:
70
70
  interface IndexStats {
71
71
  dimension: number
72
72
  count: number
73
- metric: 'cosine' | 'euclidean' | 'dotproduct'
73
+ metric?: 'cosine' | 'euclidean' | 'dotproduct'
74
74
  }
75
75
  ```
76
76
 
@@ -82,10 +82,14 @@ interface IndexStats {
82
82
 
83
83
  **indexName** (`string`): Name of the index to update
84
84
 
85
- **id** (`string`): ID of the item to update
85
+ **id** (`string`): ID of the item to update. Mutually exclusive with filter.
86
+
87
+ **filter** (`Record<string, any>`): Metadata filter matching up to 1,000 items to update. Mutually exclusive with id. Must not be empty.
86
88
 
87
89
  **update** (`object`): Update object containing vector, sparse vector, and/or metadata
88
90
 
91
+ Provide exactly one of `id` or `filter`.
92
+
89
93
  The `update` object can have the following properties:
90
94
 
91
95
  - `vector` (optional): An array of numbers representing the new dense vector.
package/dist/index.cjs CHANGED
@@ -1488,7 +1488,7 @@ var StoreMemoryUpstash = class extends _mastra_core_storage.MemoryStorage {
1488
1488
  const aValue = new Date(a[field]).getTime();
1489
1489
  const bValue = new Date(b[field]).getTime();
1490
1490
  if (direction === "ASC") return aValue - bValue;
1491
- else return bValue - aValue;
1491
+ return bValue - aValue;
1492
1492
  });
1493
1493
  }
1494
1494
  async cloneThread(args) {