fix(build): JellyseerStatsResponse export/import spelling + test mock type
The frontend production build (tsc -b) was failing, which blocked deployment: - api/jellyseerr.ts exported `JellyseerrStatsResponse` (double-r) while every import used `JellyseerStatsResponse` (single-r) — a mismatch TS reported as "no exported member" (with a misleading identical-name suggestion). The sibling types (JellyseerStat, JellyseerRecentRequest) are single-r, so align the export to single-r. (tsc --noEmit missed it because the root tsconfig is solution-style; tsc -b builds the app project and catches it.) - RequestsTab.test.tsx's useJellyseerrStats mock returned a partial object that didn't satisfy UseQueryResult's full shape; cast via a typed helper. `npm run build` (tsc -b && vite build) now succeeds; 184/184 tests + ESLint clean.
This commit is contained in:
@@ -15,7 +15,7 @@ export interface JellyseerRecentRequest {
|
||||
created_at?: number | string;
|
||||
}
|
||||
|
||||
export interface JellyseerrStatsResponse {
|
||||
export interface JellyseerStatsResponse {
|
||||
stats: JellyseerStat[];
|
||||
recent: JellyseerRecentRequest[];
|
||||
detail?: string | null;
|
||||
@@ -24,8 +24,8 @@ export interface JellyseerrStatsResponse {
|
||||
/** Fetch Jellyseerr request stats for a Jellyfin service instance. */
|
||||
export async function fetchJellyseerrStats(
|
||||
jellyfinServiceId?: string,
|
||||
): Promise<JellyseerrStatsResponse> {
|
||||
return get<JellyseerrStatsResponse>(
|
||||
): Promise<JellyseerStatsResponse> {
|
||||
return get<JellyseerStatsResponse>(
|
||||
"/api/jellyseerr/stats",
|
||||
jellyfinServiceId ? { jellyfin_service_id: jellyfinServiceId } : undefined,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user