import { type RedactedServarrInstance, type ServarrConfig, type ServarrInstance, type ServarrType } from "./schema.js";
export interface LoadedServarrConfig {
    readonly path: string;
    readonly configDir: string;
    readonly config: ServarrConfig;
}
export interface ServarrRequestOptions {
    readonly timeoutMs?: number;
    readonly query?: Record<string, string | number | boolean | undefined>;
}
export interface ServarrResponse {
    readonly service: ServarrType;
    readonly instance: RedactedServarrInstance;
    readonly endpoint: string;
    readonly url: string;
    readonly status: number;
    readonly data: unknown;
}
export declare class ServarrIntegrationError extends Error {
    readonly exitCode: number;
    constructor(message: string, exitCode?: number);
}
export declare function getDefaultServarrConfigPath(root?: string): string;
export declare function resolveServarrConfigPath(configFile?: string): Promise<string>;
export declare function loadServarrConfig(configFile?: string): Promise<LoadedServarrConfig>;
export declare function listServarrInstances(config: ServarrConfig): RedactedServarrInstance[];
export declare function selectServarrInstance(config: ServarrConfig, type: ServarrType, name?: string): ServarrInstance;
export declare function requestServarr(instance: ServarrInstance, endpoint: string, configDir: string, options?: ServarrRequestOptions): Promise<ServarrResponse>;
export declare function serviceEndpoint(type: ServarrType, kind: "library" | "search"): string;
