feat(ticket): add paginated class detection preview with image and map

This commit is contained in:
2026-07-08 10:48:03 +05:30
parent fb9a654aea
commit 23186ffd29
11 changed files with 447 additions and 143 deletions

View File

@@ -5,6 +5,8 @@ import {
PaginationParams,
SseTokenResponse,
UploadListResponse,
VideoDetectionsParams,
VideoDetectionsResponse,
} from '@/types';
/**
@@ -59,6 +61,26 @@ export const videoService = {
return response.data;
},
getVideoDetections: async (
videoId: string,
params?: VideoDetectionsParams,
): Promise<VideoDetectionsResponse> => {
const response = await axiosClient.get<VideoDetectionsResponse>(
API_ROUTES.VIDEOS.DETECTIONS(videoId),
{
params: {
skip: params?.skip ?? 0,
limit: params?.limit ?? 1,
class_name: params?.class_name,
min_confidence: params?.min_confidence,
sort: params?.sort ?? 'timestamp_asc',
search: params?.search,
},
},
);
return response.data;
},
/**
* Fetch the annotated video as a blob through the authenticated axios client.
*