Client options, retries, and debug logging
createKomgaClient
interface KomgaClientOptions { baseUrl: string; auth?: AuthConfig; timeout?: number; retry?: RetryConfig; debug?: boolean; }
type AuthConfig = | { type: 'basic'; username: string; password: string } | { type: 'apiKey'; key: string };
interface RetryConfig { limit?: number; methods?: string[]; statusCodes?: number[]; backoffLimit?: number; }
import { createKomgaClient } from 'komga-sdk'; const client = createKomgaClient({ baseUrl: 'http://localhost:25600', auth: { type: 'basic', username: 'admin', password: 'password' }, timeout: 30000, retry: { limit: 3, backoffLimit: 3000 }, debug: false, });