fix: lint type import

This commit is contained in:
Julien Froidefond
2025-03-02 14:02:23 +01:00
parent e8386a4834
commit a4b521fe2e
78 changed files with 595 additions and 242 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { AppErrorType } from "@/types/global";
import type { AppErrorType } from "@/types/global";
import { ERROR_CODES } from "@/constants/errorCodes";
class AuthService {

View File

@@ -1,11 +1,11 @@
import { AuthConfig } from "@/types/auth";
import type { AuthConfig } from "@/types/auth";
import { getServerCacheService } from "./server-cache.service";
import { ConfigDBService } from "./config-db.service";
import { DebugService } from "./debug.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { KomgaConfig } from "@/types/komga";
import { ServerCacheService } from "./server-cache.service";
import type { KomgaConfig } from "@/types/komga";
import type { ServerCacheService } from "./server-cache.service";
// Types de cache disponibles
export type CacheType = "DEFAULT" | "HOME" | "LIBRARIES" | "SERIES" | "BOOKS" | "IMAGES";

View File

@@ -1,6 +1,7 @@
import { BaseApiService } from "./base-api.service";
import { KomgaBook, KomgaBookWithPages } from "@/types/komga";
import { ImageService, ImageResponse } from "./image.service";
import type { KomgaBook, KomgaBookWithPages } from "@/types/komga";
import type { ImageResponse } from "./image.service";
import { ImageService } from "./image.service";
import { PreferencesService } from "./preferences.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";

View File

@@ -1,4 +1,4 @@
import { KomgaBook } from "@/types/komga";
import type { KomgaBook } from "@/types/komga";
export class ClientOfflineBookService {
static setCurrentPage(book: KomgaBook, page: number) {

View File

@@ -5,7 +5,7 @@ import { DebugService } from "./debug.service";
import { AuthServerService } from "./auth-server.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { User, KomgaConfigData, TTLConfigData, KomgaConfig, TTLConfig } from "@/types/komga";
import type { User, KomgaConfigData, TTLConfigData, KomgaConfig, TTLConfig } from "@/types/komga";
export class ConfigDBService {
private static getCurrentUser(): User {

View File

@@ -1,6 +1,6 @@
import fs from "fs/promises";
import path from "path";
import { CacheType } from "./base-api.service";
import type { CacheType } from "./base-api.service";
import { AuthServerService } from "./auth-server.service";
import { PreferencesService } from "./preferences.service";
import { ERROR_CODES } from "../../constants/errorCodes";

View File

@@ -4,7 +4,7 @@ import { DebugService } from "./debug.service";
import { AuthServerService } from "./auth-server.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { User } from "@/types/komga";
import type { User } from "@/types/komga";
export class FavoriteService {
private static readonly FAVORITES_CHANGE_EVENT = "favoritesChanged";

View File

@@ -1,6 +1,6 @@
import { BaseApiService } from "./base-api.service";
import { KomgaBook, KomgaSeries } from "@/types/komga";
import { LibraryResponse } from "@/types/library";
import type { KomgaBook, KomgaSeries } from "@/types/komga";
import type { LibraryResponse } from "@/types/library";
import { getServerCacheService } from "./server-cache.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";

View File

@@ -1,10 +1,10 @@
import { BaseApiService } from "./base-api.service";
import { LibraryResponse } from "@/types/library";
import { Series } from "@/types/series";
import type { LibraryResponse } from "@/types/library";
import type { Series } from "@/types/series";
import { getServerCacheService } from "./server-cache.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { KomgaLibrary } from "@/types/komga";
import type { KomgaLibrary } from "@/types/komga";
export class LibraryService extends BaseApiService {
static async getLibraries(): Promise<KomgaLibrary[]> {

View File

@@ -2,8 +2,9 @@ import { PreferencesModel } from "@/lib/models/preferences.model";
import { AuthServerService } from "./auth-server.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { UserPreferences, defaultPreferences } from "@/types/preferences";
import { User } from "@/types/komga";
import type { UserPreferences} from "@/types/preferences";
import { defaultPreferences } from "@/types/preferences";
import type { User } from "@/types/komga";
export class PreferencesService {
static getCurrentUser(): User {

View File

@@ -1,14 +1,15 @@
import { BaseApiService } from "./base-api.service";
import { LibraryResponse } from "@/types/library";
import { KomgaBook, KomgaSeries } from "@/types/komga";
import type { LibraryResponse } from "@/types/library";
import type { KomgaBook, KomgaSeries } from "@/types/komga";
import { BookService } from "./book.service";
import { ImageService, ImageResponse } from "./image.service";
import type { ImageResponse } from "./image.service";
import { ImageService } from "./image.service";
import { PreferencesService } from "./preferences.service";
import { getServerCacheService } from "./server-cache.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { UserPreferences } from "@/types/preferences";
import { ServerCacheService } from "./server-cache.service";
import type { UserPreferences } from "@/types/preferences";
import type { ServerCacheService } from "./server-cache.service";
export class SeriesService extends BaseApiService {
static async getSeries(seriesId: string): Promise<KomgaSeries> {

View File

@@ -1,8 +1,8 @@
import { BaseApiService } from "./base-api.service";
import { AuthConfig } from "@/types/auth";
import type { AuthConfig } from "@/types/auth";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
import { KomgaLibrary } from "@/types/komga";
import type { KomgaLibrary } from "@/types/komga";
export class TestService extends BaseApiService {
static async testConnection(config: AuthConfig): Promise<{ libraries: KomgaLibrary[] }> {