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:
Developer
2026-07-12 16:30:59 +00:00
parent e757f4ba21
commit 54851779fb
4 changed files with 28 additions and 16 deletions
+3 -3
View File
@@ -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,
);