import { Observable } from "rxjs"; import * as WebSocket from "ws"; import { ITeslaApiRequestor } from "../ITeslaApiRequestor"; import { VehicleCommands } from "./commands"; import { BaseVehicle, ClimateState, DriveState, GUISettings, StreamItem, VehicleData } from "./types"; export declare class VehicleAPI { private apiRequestor; data: BaseVehicle; /** * Access the commands (write-requests) for this behicle. */ readonly commands: VehicleCommands; constructor(apiRequestor: ITeslaApiRequestor, data: BaseVehicle); /** * Fetch the Vehicle information from the API */ vehicleData(): Promise; /** * Climate settings including seats, vents battery, steering wheel, and preconditioning state. */ climateState(): Promise; /** * Drive state including latitude, longitude, and heading of the data. */ driveState(): Promise; /** * Localization settings including distance units, temperature units, charge units, and clock hour style. */ guiSettings(): Promise; /** * Creates a Raw Stream and returns a raw WebSocket. No self-reconnect or autohealing is provided by this method * Consider using the .stream method below which returns an Observable. */ rawStream(): WebSocket; /** * Creates an auto-reconnecting (if provided) stream to the Tesla API. * @param opts * @returns Observable which emits a StreamItem at on every returned data. */ stream(opts?: { maxTimeout: number; autoReopen: boolean; }): Observable; private initializeStream; }