@mastra/upstash 0.10.3-alpha.2 → 0.10.3-alpha.4

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.
@@ -1,24 +1,33 @@
1
1
 
2
- > @mastra/upstash@0.10.3-alpha.2 build /home/runner/work/mastra/mastra/stores/upstash
2
+ > @mastra/upstash@0.10.3-alpha.4 build /home/runner/work/mastra/mastra/stores/upstash
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 10231ms
9
+ TSC ⚡️ Build success in 9323ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 10756ms
16
+ DTS ⚡️ Build success in 11630ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- dist/index.js (1651:18): Use of eval in "dist/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
21
20
  dist/index.cjs (1651:18): Use of eval in "dist/index.cjs" is strongly discouraged as it poses security risks and may cause issues with minification.
21
+ CJS dist/getMachineId-darwin-3PL23DL6.cjs 1.19 KB
22
+ CJS dist/getMachineId-linux-KYLPK3HC.cjs 813.00 B
23
+ CJS dist/getMachineId-win-ZTI2LRDJ.cjs 1.66 KB
24
+ CJS dist/chunk-N2CPQVE3.cjs 1.09 KB
25
+ CJS dist/getMachineId-bsd-HDZ73WR7.cjs 1015.00 B
26
+ CJS dist/getMachineId-unsupported-DEDJN4ZS.cjs 777.00 B
27
+ CJS dist/chunk-U74OJRHU.cjs 62.08 KB
28
+ CJS dist/index.cjs 1.65 MB
29
+ CJS ⚡️ Build success in 14194ms
30
+ dist/index.js (1651:18): Use of eval in "dist/index.js" is strongly discouraged as it poses security risks and may cause issues with minification.
22
31
  ESM dist/getMachineId-darwin-UTKBTJ2U.js 1.08 KB
23
32
  ESM dist/getMachineId-linux-K3QXQYAB.js 740.00 B
24
33
  ESM dist/getMachineId-bsd-KKIDU47O.js 896.00 B
@@ -27,13 +36,4 @@ dist/index.cjs (1651:18): Use of eval in "dist/index.cjs" is strongly discourage
27
36
  ESM dist/getMachineId-unsupported-VPWBQCK7.js 700.00 B
28
37
  ESM dist/chunk-HSTZWXH7.js 61.52 KB
29
38
  ESM dist/index.js 1.64 MB
30
- ESM ⚡️ Build success in 23117ms
31
- CJS dist/getMachineId-darwin-3PL23DL6.cjs 1.19 KB
32
- CJS dist/getMachineId-linux-KYLPK3HC.cjs 813.00 B
33
- CJS dist/getMachineId-bsd-HDZ73WR7.cjs 1015.00 B
34
- CJS dist/getMachineId-win-ZTI2LRDJ.cjs 1.66 KB
35
- CJS dist/chunk-N2CPQVE3.cjs 1.09 KB
36
- CJS dist/getMachineId-unsupported-DEDJN4ZS.cjs 777.00 B
37
- CJS dist/chunk-U74OJRHU.cjs 62.08 KB
38
- CJS dist/index.cjs 1.65 MB
39
- CJS ⚡️ Build success in 23122ms
39
+ ESM ⚡️ Build success in 23265ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 0.10.3-alpha.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 66f4424: Update peerdeps
8
+
9
+ ## 0.10.3-alpha.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 925ab94: added paginated functions to base class and added boilerplate and updated imports
14
+ - a914da2: Fix upstash paginated APIs
15
+ - Updated dependencies [925ab94]
16
+ - @mastra/core@0.10.4-alpha.3
17
+
3
18
  ## 0.10.3-alpha.2
4
19
 
5
20
  ### Patch Changes
@@ -10,10 +10,13 @@ import type { MastraMessageV2 } from '@mastra/core/memory';
10
10
  import { MastraStorage } from '@mastra/core/storage';
11
11
  import { MastraVector } from '@mastra/core/vector';
12
12
  import type { OperatorSupport } from '@mastra/core/vector/filter';
13
+ import type { PaginationArgs } from '@mastra/core/storage';
14
+ import type { PaginationInfo } from '@mastra/core/storage';
13
15
  import type { QueryResult } from '@mastra/core/vector';
14
16
  import type { QueryVectorParams } from '@mastra/core/vector';
15
17
  import type { StorageColumn } from '@mastra/core/storage';
16
18
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
19
+ import type { StorageGetTracesArg } from '@mastra/core/storage';
17
20
  import type { StorageThreadType } from '@mastra/core/memory';
18
21
  import type { TABLE_NAMES } from '@mastra/core/storage';
19
22
  import type { UpdateVectorParams } from '@mastra/core/vector';
@@ -81,32 +84,17 @@ declare class UpstashStore extends MastraStorage {
81
84
  * @deprecated Use getEvals instead
82
85
  */
83
86
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
84
- getTraces(args: {
85
- name?: string;
86
- scope?: string;
87
- attributes?: Record<string, string>;
88
- filters?: Record<string, any>;
89
- page: number;
90
- perPage?: number;
91
- fromDate?: Date;
92
- toDate?: Date;
93
- }): Promise<any[]>;
94
- getTraces(args: {
87
+ /**
88
+ * @deprecated use getTracesPaginated instead
89
+ */
90
+ getTraces(args: StorageGetTracesArg): Promise<any[]>;
91
+ getTracesPaginated(args: {
95
92
  name?: string;
96
93
  scope?: string;
97
- page: number;
98
- perPage?: number;
99
94
  attributes?: Record<string, string>;
100
95
  filters?: Record<string, any>;
101
- fromDate?: Date;
102
- toDate?: Date;
103
- returnPaginationResults: true;
104
- }): Promise<{
96
+ } & PaginationArgs): Promise<PaginationInfo & {
105
97
  traces: any[];
106
- total: number;
107
- page: number;
108
- perPage: number;
109
- hasMore: boolean;
110
98
  }>;
111
99
  createTable({ tableName, schema, }: {
112
100
  tableName: TABLE_NAMES;
@@ -141,19 +129,16 @@ declare class UpstashStore extends MastraStorage {
141
129
  getThreadById({ threadId }: {
142
130
  threadId: string;
143
131
  }): Promise<StorageThreadType | null>;
144
- getThreadsByResourceId(args: {
132
+ /**
133
+ * @deprecated use getThreadsByResourceIdPaginated instead
134
+ */
135
+ getThreadsByResourceId({ resourceId }: {
145
136
  resourceId: string;
146
137
  }): Promise<StorageThreadType[]>;
147
- getThreadsByResourceId(args: {
138
+ getThreadsByResourceIdPaginated(args: {
148
139
  resourceId: string;
149
- page: number;
150
- perPage?: number;
151
- }): Promise<{
140
+ } & PaginationArgs): Promise<PaginationInfo & {
152
141
  threads: StorageThreadType[];
153
- total: number;
154
- page: number;
155
- perPage: number;
156
- hasMore: boolean;
157
142
  }>;
158
143
  saveThread({ thread }: {
159
144
  thread: StorageThreadType;
@@ -174,24 +159,20 @@ declare class UpstashStore extends MastraStorage {
174
159
  messages: MastraMessageV2[];
175
160
  format: 'v2';
176
161
  }): Promise<MastraMessageV2[]>;
162
+ private _getIncludedMessages;
163
+ /**
164
+ * @deprecated use getMessagesPaginated instead
165
+ */
177
166
  getMessages(args: StorageGetMessagesArg & {
178
167
  format?: 'v1';
179
168
  }): Promise<MastraMessageV1[]>;
180
169
  getMessages(args: StorageGetMessagesArg & {
181
170
  format: 'v2';
182
171
  }): Promise<MastraMessageV2[]>;
183
- getMessages(args: StorageGetMessagesArg & {
172
+ getMessagesPaginated(args: StorageGetMessagesArg & {
184
173
  format?: 'v1' | 'v2';
185
- page: number;
186
- perPage?: number;
187
- fromDate?: Date;
188
- toDate?: Date;
189
- }): Promise<{
174
+ }): Promise<PaginationInfo & {
190
175
  messages: MastraMessageV1[] | MastraMessageV2[];
191
- total: number;
192
- page: number;
193
- perPage: number;
194
- hasMore: boolean;
195
176
  }>;
196
177
  persistWorkflowSnapshot(params: {
197
178
  namespace: string;
@@ -212,18 +193,8 @@ declare class UpstashStore extends MastraStorage {
212
193
  getEvals(options?: {
213
194
  agentName?: string;
214
195
  type?: 'test' | 'live';
215
- page?: number;
216
- perPage?: number;
217
- limit?: number;
218
- offset?: number;
219
- fromDate?: Date;
220
- toDate?: Date;
221
- }): Promise<{
196
+ } & PaginationArgs): Promise<PaginationInfo & {
222
197
  evals: EvalRow[];
223
- total: number;
224
- page?: number;
225
- perPage?: number;
226
- hasMore?: boolean;
227
198
  }>;
228
199
  getWorkflowRuns({ namespace, workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
229
200
  namespace: string;
@@ -10,10 +10,13 @@ import type { MastraMessageV2 } from '@mastra/core/memory';
10
10
  import { MastraStorage } from '@mastra/core/storage';
11
11
  import { MastraVector } from '@mastra/core/vector';
12
12
  import type { OperatorSupport } from '@mastra/core/vector/filter';
13
+ import type { PaginationArgs } from '@mastra/core/storage';
14
+ import type { PaginationInfo } from '@mastra/core/storage';
13
15
  import type { QueryResult } from '@mastra/core/vector';
14
16
  import type { QueryVectorParams } from '@mastra/core/vector';
15
17
  import type { StorageColumn } from '@mastra/core/storage';
16
18
  import type { StorageGetMessagesArg } from '@mastra/core/storage';
19
+ import type { StorageGetTracesArg } from '@mastra/core/storage';
17
20
  import type { StorageThreadType } from '@mastra/core/memory';
18
21
  import type { TABLE_NAMES } from '@mastra/core/storage';
19
22
  import type { UpdateVectorParams } from '@mastra/core/vector';
@@ -81,32 +84,17 @@ declare class UpstashStore extends MastraStorage {
81
84
  * @deprecated Use getEvals instead
82
85
  */
83
86
  getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
84
- getTraces(args: {
85
- name?: string;
86
- scope?: string;
87
- attributes?: Record<string, string>;
88
- filters?: Record<string, any>;
89
- page: number;
90
- perPage?: number;
91
- fromDate?: Date;
92
- toDate?: Date;
93
- }): Promise<any[]>;
94
- getTraces(args: {
87
+ /**
88
+ * @deprecated use getTracesPaginated instead
89
+ */
90
+ getTraces(args: StorageGetTracesArg): Promise<any[]>;
91
+ getTracesPaginated(args: {
95
92
  name?: string;
96
93
  scope?: string;
97
- page: number;
98
- perPage?: number;
99
94
  attributes?: Record<string, string>;
100
95
  filters?: Record<string, any>;
101
- fromDate?: Date;
102
- toDate?: Date;
103
- returnPaginationResults: true;
104
- }): Promise<{
96
+ } & PaginationArgs): Promise<PaginationInfo & {
105
97
  traces: any[];
106
- total: number;
107
- page: number;
108
- perPage: number;
109
- hasMore: boolean;
110
98
  }>;
111
99
  createTable({ tableName, schema, }: {
112
100
  tableName: TABLE_NAMES;
@@ -141,19 +129,16 @@ declare class UpstashStore extends MastraStorage {
141
129
  getThreadById({ threadId }: {
142
130
  threadId: string;
143
131
  }): Promise<StorageThreadType | null>;
144
- getThreadsByResourceId(args: {
132
+ /**
133
+ * @deprecated use getThreadsByResourceIdPaginated instead
134
+ */
135
+ getThreadsByResourceId({ resourceId }: {
145
136
  resourceId: string;
146
137
  }): Promise<StorageThreadType[]>;
147
- getThreadsByResourceId(args: {
138
+ getThreadsByResourceIdPaginated(args: {
148
139
  resourceId: string;
149
- page: number;
150
- perPage?: number;
151
- }): Promise<{
140
+ } & PaginationArgs): Promise<PaginationInfo & {
152
141
  threads: StorageThreadType[];
153
- total: number;
154
- page: number;
155
- perPage: number;
156
- hasMore: boolean;
157
142
  }>;
158
143
  saveThread({ thread }: {
159
144
  thread: StorageThreadType;
@@ -174,24 +159,20 @@ declare class UpstashStore extends MastraStorage {
174
159
  messages: MastraMessageV2[];
175
160
  format: 'v2';
176
161
  }): Promise<MastraMessageV2[]>;
162
+ private _getIncludedMessages;
163
+ /**
164
+ * @deprecated use getMessagesPaginated instead
165
+ */
177
166
  getMessages(args: StorageGetMessagesArg & {
178
167
  format?: 'v1';
179
168
  }): Promise<MastraMessageV1[]>;
180
169
  getMessages(args: StorageGetMessagesArg & {
181
170
  format: 'v2';
182
171
  }): Promise<MastraMessageV2[]>;
183
- getMessages(args: StorageGetMessagesArg & {
172
+ getMessagesPaginated(args: StorageGetMessagesArg & {
184
173
  format?: 'v1' | 'v2';
185
- page: number;
186
- perPage?: number;
187
- fromDate?: Date;
188
- toDate?: Date;
189
- }): Promise<{
174
+ }): Promise<PaginationInfo & {
190
175
  messages: MastraMessageV1[] | MastraMessageV2[];
191
- total: number;
192
- page: number;
193
- perPage: number;
194
- hasMore: boolean;
195
176
  }>;
196
177
  persistWorkflowSnapshot(params: {
197
178
  namespace: string;
@@ -212,18 +193,8 @@ declare class UpstashStore extends MastraStorage {
212
193
  getEvals(options?: {
213
194
  agentName?: string;
214
195
  type?: 'test' | 'live';
215
- page?: number;
216
- perPage?: number;
217
- limit?: number;
218
- offset?: number;
219
- fromDate?: Date;
220
- toDate?: Date;
221
- }): Promise<{
196
+ } & PaginationArgs): Promise<PaginationInfo & {
222
197
  evals: EvalRow[];
223
- total: number;
224
- page?: number;
225
- perPage?: number;
226
- hasMore?: boolean;
227
198
  }>;
228
199
  getWorkflowRuns({ namespace, workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
229
200
  namespace: string;