/**
 * @fileoverview Open Charge Map service — HTTP client over the OCM `/v3/poi` endpoint with retry,
 * session-level result caching, and response normalization. Search uses `verbose=false`; single-
 * station detail uses `verbose=true` so `GeneralComments`/`UsageCost`/`NumberOfPoints`/`MediaItems`
 * are populated. Non-OK responses are translated to contract reasons (`auth_failed` for 401/403,
 * `upstream_unavailable` otherwise) so calling tools surface a stable `data.reason`.
 * @module services/openchargemap/openchargemap-service
 */
import type { Context } from '@cyanheads/mcp-ts-core';
import type { ServerConfig } from '../../config/server-config.js';
import type { NormalizedStation, NormalizedStationDetail, SearchPoiParams } from './types.js';
export declare class OpenChargeMapService {
    private readonly serverConfig;
    constructor(serverConfig: ServerConfig);
    /**
     * Search POIs by radius or bounding box with optional filters (`verbose=false`).
     * Returns normalized stations ordered by distance. Cached per param set in `ctx.state`.
     */
    searchPois(params: SearchPoiParams, ctx: Context): Promise<NormalizedStation[]>;
    /**
     * Fetch a single station's full record by numeric OCM ID (`verbose=true`).
     * Returns `null` when OCM responds HTTP 200 with `[]` (no such station) — the caller throws
     * `not_found`. `includeComments` embeds `UserComments[]`.
     */
    getPoi(id: number, options: {
        includeComments: boolean;
    }, ctx: Context): Promise<NormalizedStationDetail | null>;
    private buildSearchUrl;
    private buildDetailUrl;
    /** Fetch and parse a POI array, with retry over the full pipeline and status→reason mapping. */
    private fetchPois;
    /**
     * `fetchWithTimeout` throws a classified `McpError` on non-OK. Re-tag auth failures (401/403,
     * which OCM returns for a missing/invalid key) as `auth_failed`/Unauthorized (non-retryable);
     * everything else as `upstream_unavailable`/ServiceUnavailable (retryable) so the retry predicate
     * and the tool contracts align.
     */
    private translateFetchError;
    private normalizeStation;
    private normalizeStationDetail;
    private normalizeConnection;
    /** Normalize and sort comments newest-first. */
    private normalizeComments;
}
/** Construct the OCM service. Registered in `createApp()`'s `setup()`. */
export declare function initOpenChargeMapService(serverConfig: ServerConfig): void;
/** Accessor for the initialized OCM service. */
export declare function getOpenChargeMapService(): OpenChargeMapService;
/** Reset the singleton (test isolation only). */
export declare function resetOpenChargeMapService(): void;
//# sourceMappingURL=openchargemap-service.d.ts.map