import { AircraftData, AirlineDetail, Flight, ZoneData } from './types'; import { AirportData, AirportDetailData } from './airportTypes'; import { FlightRadarApiConfig, RadarOptions } from './config'; export declare class FlightRadarApi { private config; /** * Creates a new instance of the FlightRadarApi class. * @param config The configuration to use for the API. The default configuration is used if not specified({@link defaultFlightRadarApiConfig}). */ constructor(config?: FlightRadarApiConfig); /** * Makes an API request to the FlightRadar24 API and returns the result. * If the request fails, an error is thrown. * If the request succeeds, the result is returned in JSON format. * * @Remarks * This method is used internally by the library and is not intended to be used directly. * * @returns The result of the API request. * * @param url The URL to make the request to. * @param options The options to pass to the fetch request. */ apiRequest(url: string, options?: RequestInit): Promise>; /** * Fetches detailed information about a flight from the FlightRadar24 API. * @param flight The id of the flight to fetch. * @returns The flight data. */ fetchFlight(flight: string): Promise; /** * Fetches detailed information about an Airport from the FlightRadar24 API. * @param code The ICAO or IATA code of the airport to fetch. * @param page Page number of the results to fetch (arrivals/departures). * @returns The airport data. */ fetchAirport(code: string, page?: number): Promise; /** * Fetches airports data from the FlightRadar24 API. * * @Remarks The number of airports returned may be less than the limit. * @returns The airports data. */ fetchAirports(): Promise; /** * Fetches the airlines data from the FlightRadar24 API. * @returns The airlines data. */ fetchAirlines(): Promise; /** * Fetches the zones data from the FlightRadar24 API. * The zones data contains the coordinates of the zones and subzones. * @remarks * The zones data is used to fetch aircraft from a specific zone. * @returns The zones data. */ fetchZones(): Promise; /** * Fetches live aircraft data from the FlightRadar24 API. * * @remarks * The data returned is limited to 1500 aircraft. * @param options The options to pass to the API request. */ fetchFromRadar(options?: RadarOptions): Promise; /** * Fetches live aircraft data from the FlightRadar24 API from multiple zones. * As the API only allows fetching 1500 aircraft at a time, this method fetches aircraft from multiple zones and combines the results. * @Remarks Be careful when using this method as it may result in a lot of API requests. * @param zones The zones to fetch aircraft from. * @param options The options to pass to the API request. */ fetchFromRadarMultiZone(zones: ZoneData[], options?: RadarOptions): Promise; }