export type Backend = "genesis" | "orbis"; /** Routing API response structure */ export interface RoutingResponse { routes?: Array<{ legs?: Array<{ points?: unknown; [key: string]: unknown; }>; guidance?: unknown; [key: string]: unknown; }>; [key: string]: unknown; } /** Search API response structure (geocode, POI, fuzzy, nearby) */ export interface SearchResponse { summary?: { queryTime?: number; fuzzyLevel?: number; offset?: number; geoBias?: unknown; [key: string]: unknown; }; results?: Array<{ poi?: { classifications?: unknown; openingHours?: unknown; categorySet?: unknown; timeZone?: unknown; brands?: unknown; features?: unknown; [key: string]: unknown; }; address?: { countryCodeISO3?: string; countrySubdivisionCode?: string; countrySubdivisionName?: string; localName?: string; extendedPostalCode?: string; [key: string]: unknown; }; dataSources?: unknown; matchConfidence?: unknown; info?: string; viewport?: unknown; boundingBox?: unknown; [key: string]: unknown; }>; addresses?: Array<{ address?: { countryCodeISO3?: string; countrySubdivisionCode?: string; countrySubdivisionName?: string; localName?: string; boundingBox?: unknown; [key: string]: unknown; }; mapcodes?: unknown; matchType?: string; [key: string]: unknown; }>; [key: string]: unknown; } /** Traffic incidents API response structure */ export interface TrafficResponse { incidents?: Array<{ geometry?: { coordinates?: unknown; [key: string]: unknown; }; properties?: { tmc?: unknown; aci?: unknown; numberOfReports?: unknown; lastReportTime?: unknown; probabilityOfOccurrence?: string; timeValidity?: string; [key: string]: unknown; }; [key: string]: unknown; }>; [key: string]: unknown; } /** Reachable range response (SDK GeoJSON PolygonFeature or legacy REST) */ export interface ReachableRangeResponse { type?: string; geometry?: { type?: string; coordinates?: unknown; [key: string]: unknown; }; reachableRange?: { boundary?: unknown; [key: string]: unknown; }; [key: string]: unknown; } /** MCP response content structure */ export interface MCPResponseContent { type: "text"; text: string; } export interface MCPResponse { content: MCPResponseContent[]; isError?: boolean; [key: string]: unknown; } /** * Trim verbose properties from a GeoJSON Feature's properties object. * Used by all Orbis search-related tools (geocode, fuzzy, POI, nearby, area, EV, along-route). * * Removes: * - POI: classifications, categorySet, categoryIds, timeZone, features, brands, openingHours * - Metadata: dataSources, matchConfidence, info, score, viewport, boundingBox, entryPoints * - Address: countryCodeISO3, countrySubdivisionCode, countrySubdivisionName, localName, extendedPostalCode * - Other: mapcodes, addressRanges, relatedPois * * Keeps: * - POI: name, phone, url, categories * - Address: freeformAddress, streetName, streetNumber, municipality, postalCode, countryCode, country, countrySubdivision * - Core: type, distance, chargingPark, geometry */ export declare function trimGeoJSONFeatureProperties(props: Record): void; /** * Trim routing response - removes large coordinate arrays and guidance instructions. * * COMMON (both backends): * - routes[].legs[].points (50K-75K chars - polyline data for visualization) * - routes[].guidance (turn-by-turn instructions) * * GENESIS ONLY: * - routes[].sections exists (sectionType, travelMode) - kept as it's small and useful * * ORBIS SDK FORMAT (GeoJSON FeatureCollection): * - features[].geometry.coordinates (full route polyline) * - features[].properties.guidance (turn-by-turn instructions) * - features[].properties.sections[].geometry (section geometry) */ export declare function trimRoutingResponse(response: unknown, _backend?: Backend): unknown; /** * Trim search response - removes verbose POI details and metadata. * Handles differences between Genesis and Orbis backends. * * COMMON (both backends): * - results[].dataSources (geometry IDs - not needed for agent) * - results[].matchConfidence (internal scoring) * - results[].info (internal reference string) * - results[].viewport (map display bounds) * - results[].boundingBox (map display bounds) * - results[].poi.classifications (verbose category data) * - results[].poi.openingHours (detailed hours) * - results[].poi.categorySet (redundant with categories) * - results[].address.countryCodeISO3 (redundant with countryCode) * - results[].address.countrySubdivisionCode (redundant) * - results[].address.localName (usually same as municipality) * * GENESIS ONLY: * - results[].poi.brands (brand info - only in Genesis) * - results[].address.extendedPostalCode (only in Genesis nearby) * * ORBIS SDK FORMAT (GeoJSON FeatureCollection): * - features[].properties verbose fields are already stripped by the SDK */ export declare function trimSearchResponse(response: unknown, backend?: Backend): unknown; /** * Trim traffic response - removes geometry coordinates and verbose metadata. * Structure is identical between Genesis and Orbis. * * COMMON (both backends): * - incidents[].geometry.coordinates (large polyline arrays - 500-1000 chars each) * - incidents[].properties.tmc (traffic message channel codes) * - incidents[].properties.aci (internal codes) * - incidents[].properties.numberOfReports (null in most cases) * - incidents[].properties.lastReportTime (null in most cases) * - incidents[].properties.probabilityOfOccurrence (always "certain") * - incidents[].properties.timeValidity (always "present") */ export declare function trimTrafficResponse(response: unknown, _backend?: Backend): unknown; /** * Trim reachable range response - removes boundary coordinates. * * SDK format (GeoJSON FeatureCollection from calculateReachableRanges): * - features[].geometry.coordinates (large polygon boundary arrays) * - features[].properties (SDK input params — not needed by agent) * - bbox (overall bounds) * * SDK format (single GeoJSON PolygonFeature): * - geometry.coordinates (large polygon boundary array) * - properties (SDK input params — not needed by agent) * * Legacy REST format: * - reachableRange.boundary (large coordinate array) */ export declare function trimReachableRangeResponse(response: unknown, _backend?: Backend): unknown; /** * Build MCP response with trimmed data for agent and viz_id for Apps to fetch full data from cache. * Full data is stored in cache with short TTL for Apps to retrieve via tomtom-get-viz-data tool. */ export declare function buildCompressedResponse(trimmedData: T, fullData: T, showUI?: boolean): Promise;