/** * Traffic incident categories for filtering */ export declare const TRAFFIC_INCIDENT_CATEGORIES: { readonly ACCIDENT: "0"; readonly FOG: "1"; readonly DANGEROUS_CONDITIONS: "2"; readonly RAIN: "3"; readonly ICE: "4"; readonly JAM_LANE_RESTRICTIONS: "5"; readonly LANE_CLOSURE: "6"; readonly ROAD_CLOSURE: "7"; readonly ROAD_WORKS: "8"; readonly WIND: "9"; readonly FLOODING: "10"; readonly DETOUR: "11"; readonly CLUSTER: "14"; }; /** * Time validity filter options */ export type TimeValidityFilter = "present" | "future" | "all"; /** * Magnitude of delay scale (0-4) */ export type DelayMagnitude = 0 | 1 | 2 | 3 | 4; export interface TrafficIncidentsOptions { /** * The language to return results in (IETF language tag) * @default "en-GB" */ language?: string; /** * Filter by time validity (present, future) * @default "present" */ timeValidityFilter?: TimeValidityFilter; /** * Fields to include in the response using TomTom's nested field syntax * @default A comprehensive set of fields including incident type, geometry, and detailed properties * @example "{incidents{type,geometry{type,coordinates},properties{id,iconCategory,events{description}}}}" */ fields?: string; /** * Maximum number of incidents to return */ maxResults?: number; /** * Incident categories to filter by (comma-separated values) * Use TRAFFIC_INCIDENT_CATEGORIES constants or provide custom values * Types: 0=Accident, 1=Fog, 2=Dangerous Conditions, 3=Rain, 4=Ice, 5=Jam/Lane Restrictions, * 6=Lane Closure, 7=Road Closure, 8=Road Works, 9=Wind, 10=Flooding, 11=Detour, * 14=Cluster */ categoryFilter?: string | string[]; } export interface TrafficIncidentEvent { description: string; code: number; iconCategory: number; } export interface TrafficIncidentTMC { countryCode?: string; tableNumber?: string; tableVersion?: string; direction?: string; points?: Array<{ location?: string; offset?: string | number; }>; } export interface TrafficIncidentProperties { id: string; iconCategory: number; magnitudeOfDelay: DelayMagnitude; events: TrafficIncidentEvent[]; startTime?: string; endTime?: string; from?: string; to?: string; length?: number; delay?: number; roadNumbers?: string[]; timeValidity?: string | { startTime?: string; endTime?: string; }; probabilityOfOccurrence?: string; numberOfReports?: number | null; lastReportTime?: string | null; aci?: Record | null; tmc?: TrafficIncidentTMC | null; } export interface TrafficIncident { type: string; geometry: { type: string; coordinates: Array; }; properties: TrafficIncidentProperties; } export interface TrafficIncidentsResult { incidents?: TrafficIncident[]; formatVersion?: string; copyright?: string; privacy?: string; } /** * Default fields to include in traffic incidents response */ export declare const DEFAULT_FIELDS = "{incidents{type,geometry{type,coordinates},properties{id,iconCategory,magnitudeOfDelay,events{description,code,iconCategory},startTime,endTime,from,to,length,delay,roadNumbers,timeValidity,probabilityOfOccurrence,numberOfReports,lastReportTime,tmc{countryCode,tableNumber,tableVersion,direction,points{location,offset}}}}}"; /** * Default options for traffic incidents requests */ export declare const DEFAULT_OPTIONS: Required>;