fix: update replay data handling to use eventWithTime type and add rrweb types dependency

This commit is contained in:
Usman Baig
2026-01-19 12:52:02 +01:00
parent a740b0d703
commit 0b3fca45d5
4 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import apiRequest from './client'
import type { eventWithTime } from '@rrweb/types'
export interface ReplayListItem {
id: string
@@ -58,8 +59,8 @@ export async function getReplay(siteId: string, replayId: string): Promise<Sessi
return apiRequest<SessionReplay>(`/sites/${siteId}/replays/${replayId}`)
}
export async function getReplayData(siteId: string, replayId: string): Promise<unknown[]> {
const response = await apiRequest<unknown[]>(`/sites/${siteId}/replays/${replayId}/data`)
export async function getReplayData(siteId: string, replayId: string): Promise<eventWithTime[]> {
const response = await apiRequest<eventWithTime[]>(`/sites/${siteId}/replays/${replayId}/data`)
return response
}