import { ITeslaApiRequestor } from "./ITeslaApiRequestor"; import { PowerwallAPI } from "./powerwalls"; import { VehicleAPI } from "./vehicles"; /** * Main class TeslaAPI Entry point for this library. */ export declare class TeslaAPI implements ITeslaApiRequestor { /** * Use this to get the token or the current set username and password. */ get credentials(): { username: string; password: string; token: string; }; private token; private username; private password; constructor(token: string); constructor(username: string, password: string); /** * Lists vehicles. */ vehicles(): Promise; products(): Promise>; powerwalls(): Promise; /** * Create a raw authenticated HTTP.GET request to Tesla. * You can use it if this library misses some API calls. * @param path the endpoint path * @param params the parameters to pass to axios (see axios documentation) */ getRequest(path: string, params?: any): Promise; /** * Creates a raw authenticated HTTP.POST request to Tesla * You can use it if this library misses some API calls. * @param path the endpoint path * @param body the request body * @param params */ postRequest(path: string, body?: any, params?: any): Promise; /** * Creates authentication headers. */ private buildHeaders; /** * Performs the initial authentication request. when using "username" and "password" */ private auth; /** * Ensures that the token has been set. */ private ensureAuth; }