/** * Navidrome MCP Server - API Client * Copyright (C) 2025 * SPDX-License-Identifier: AGPL-3.0-or-later */ import type { Config } from '../config.js'; import { type RetryPolicy } from '../utils/fetch-with-timeout.js'; /** A request for an item Navidrome does not hold, so the caller's ID is probably wrong. */ export declare class NavidromeNotFoundError extends Error { constructor(label: string, endpoint: string); } export declare class NavidromeClient { private readonly authManager; private readonly baseUrl; private readonly config; constructor(config: Config); initialize(): Promise; /** LibraryManager decodes user-scoped claims such as `uid` from this JWT. */ getCurrentToken(): Promise; request(endpoint: string, options?: RequestInit): Promise; /** * `total` is Navidrome's X-Total-Count, the full match count across pages. It is null when the * header is absent or unparseable, so the caller picks the fallback. */ requestWithMeta(endpoint: string, options?: RequestInit): Promise<{ data: T; total: number | null; }>; requestWithLibraryFilter(endpoint: string, options?: RequestInit): Promise; requestWithLibraryFilterAndMeta(endpoint: string, options?: RequestInit): Promise<{ data: T; total: number | null; }>; private buildLibraryFilteredEndpoint; /** POST keeps the salted-MD5 auth params out of the URL, which proxies and access logs record. */ subsonicRequest(endpoint: string, params?: Record, options?: { retryPolicy?: RetryPolicy; }): Promise; /** * Tools build endpoints from constants and validated IDs, so `..` or an absolute URL means a * validation gap. Only the path is checked, since a query string cannot traverse. */ private assertSafeEndpoint; private doFetch; private parseResponse; } //# sourceMappingURL=navidrome-client.d.ts.map