@sentry/junior-memory 0.194.0 → 0.196.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-memory",
3
- "version": "0.194.0",
3
+ "version": "0.196.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,7 +27,7 @@
27
27
  "commander": "^14.0.3",
28
28
  "drizzle-orm": "^0.45.2",
29
29
  "zod": "^4.5.4",
30
- "@sentry/junior-plugin-api": "0.194.0"
30
+ "@sentry/junior-plugin-api": "0.196.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@oxlint/plugins": "1.79.0",
package/src/api.ts CHANGED
@@ -67,11 +67,11 @@ export const memoryDashboardResponseSchema = z
67
67
  .object({
68
68
  days: z.array(memoryDashboardDaySchema).length(90),
69
69
  extractionDays: z.array(memoryCostDaySchema).length(90),
70
- extractionHours: z.array(memoryCostDaySchema).length(24).optional(),
70
+ extractionHours: z.array(memoryCostDaySchema).min(24).optional(),
71
71
  generatedAt: z.iso.datetime(),
72
- hours: z.array(memoryDashboardDaySchema).length(24).optional(),
72
+ hours: z.array(memoryDashboardDaySchema).min(24).optional(),
73
73
  recallDays: z.array(memoryCostDaySchema).length(90),
74
- recallHours: z.array(memoryCostDaySchema).length(24).optional(),
74
+ recallHours: z.array(memoryCostDaySchema).min(24).optional(),
75
75
  stats: z
76
76
  .object({
77
77
  active: z.number().int().min(0),
@@ -180,13 +180,14 @@ export function createMemoryApi(options: MemoryApiOptions): PluginRouteApp {
180
180
  ] = await Promise.all([
181
181
  getMemoryStats(options.db, userId),
182
182
  getMemoryTimeline(options.db, userId, 90),
183
- getMemoryTimelineHours(options.db, userId, 24),
183
+ getMemoryTimelineHours(options.db, userId, 7 * 24),
184
184
  options.eventStats.costsByDay({
185
185
  days: 90,
186
186
  eventName: "memories_captured",
187
187
  }),
188
188
  options.eventStats.costsByHour({
189
189
  eventName: "memories_captured",
190
+ hours: 7 * 24,
190
191
  }),
191
192
  options.eventStats.costsByDay({
192
193
  days: 90,
@@ -194,6 +195,7 @@ export function createMemoryApi(options: MemoryApiOptions): PluginRouteApp {
194
195
  }),
195
196
  options.eventStats.costsByHour({
196
197
  eventName: "memories_recalled",
198
+ hours: 7 * 24,
197
199
  }),
198
200
  ]);
199
201
  const { private: personal, ...dashboardStats } = stats;