This commit is contained in:
Carl-Gerhard Lindesvärd
2026-02-09 09:54:22 +00:00
parent 38d9b65ec8
commit 551927af06
33 changed files with 1746 additions and 142 deletions

View File

@@ -1,6 +1,10 @@
import { z } from 'zod';
import { getSessionList, sessionService } from '@openpanel/db';
import {
getSessionList,
getSessionReplayEvents,
sessionService,
} from '@openpanel/db';
import { zChartEventFilter } from '@openpanel/validation';
import { createTRPCRouter, protectedProcedure } from '../trpc';
@@ -61,4 +65,10 @@ export const sessionRouter = createTRPCRouter({
.query(async ({ input: { sessionId, projectId } }) => {
return sessionService.byId(sessionId, projectId);
}),
replay: protectedProcedure
.input(z.object({ sessionId: z.string(), projectId: z.string() }))
.query(async ({ input: { sessionId, projectId } }) => {
return getSessionReplayEvents(sessionId, projectId);
}),
});