import type { TicketAssignmentDetectionsParams, TicketListParams, VideoDetectionsParams, } from '@/types'; export const ticketKeys = { all: ['tickets'] as const, lists: () => [...ticketKeys.all, 'list'] as const, list: (params: TicketListParams) => [...ticketKeys.lists(), params] as const, summaries: () => [...ticketKeys.all, 'summary'] as const, summary: (params: { chainage_id?: string }) => [...ticketKeys.summaries(), params] as const, details: () => [...ticketKeys.all, 'detail'] as const, overview: (ticketId: string) => [...ticketKeys.details(), ticketId, 'overview'] as const, timeline: (ticketId: string) => [...ticketKeys.details(), ticketId, 'timeline'] as const, classDetectionLists: (videoId: string) => [...ticketKeys.details(), 'video', videoId, 'detections'] as const, classDetections: (videoId: string, params: VideoDetectionsParams) => [...ticketKeys.classDetectionLists(videoId), params] as const, reviewDetections: (videoId: string, proofStatus?: string) => [ ...ticketKeys.classDetectionLists(videoId), 'review', proofStatus ?? 'all', ] as const, assignmentDetectionLists: (ticketId: string) => [...ticketKeys.details(), ticketId, 'assignment-detections'] as const, assignmentDetections: ( ticketId: string, params: TicketAssignmentDetectionsParams, ) => [...ticketKeys.assignmentDetectionLists(ticketId), params] as const, assignments: (ticketId: string) => [...ticketKeys.details(), ticketId, 'assignments'] as const, extensionRequest: (ticketId: string, assignmentId: number | undefined) => [ ...ticketKeys.details(), ticketId, 'assignments', assignmentId, 'extension-request', ] as const, assignableUsers: () => [...ticketKeys.all, 'assignable-users'] as const, };