tesla-fleet-api 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/charging.d.ts +22 -0
  2. package/dist/charging.js +22 -0
  3. package/dist/charging.js.map +1 -1
  4. package/dist/energy.d.ts +75 -0
  5. package/dist/energy.js +76 -0
  6. package/dist/energy.js.map +1 -1
  7. package/dist/energyspecific.d.ts +59 -0
  8. package/dist/energyspecific.js +60 -0
  9. package/dist/energyspecific.js.map +1 -1
  10. package/dist/helpers.d.ts +2 -0
  11. package/dist/helpers.js +10 -0
  12. package/dist/helpers.js.map +1 -0
  13. package/dist/index.d.ts +5 -1
  14. package/dist/index.js +5 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/partner.d.ts +15 -0
  17. package/dist/partner.js +16 -0
  18. package/dist/partner.js.map +1 -1
  19. package/dist/teslafleetapi.d.ts +8 -0
  20. package/dist/teslafleetapi.js +9 -0
  21. package/dist/teslafleetapi.js.map +1 -1
  22. package/dist/teslemetry.d.ts +7 -0
  23. package/dist/teslemetry.js +7 -0
  24. package/dist/teslemetry.js.map +1 -1
  25. package/dist/tessie.d.ts +3 -0
  26. package/dist/tessie.js +3 -0
  27. package/dist/tessie.js.map +1 -1
  28. package/dist/types.d.ts +7 -0
  29. package/dist/types.js.map +1 -1
  30. package/dist/user.d.ts +11 -5
  31. package/dist/user.js +5 -0
  32. package/dist/user.js.map +1 -1
  33. package/dist/vehicle.d.ts +503 -64
  34. package/dist/vehicle.js +453 -0
  35. package/dist/vehicle.js.map +1 -1
  36. package/dist/vehiclespecific.d.ts +409 -63
  37. package/dist/vehiclespecific.js +349 -1
  38. package/dist/vehiclespecific.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/helpers.ts +11 -0
  41. package/src/index.ts +5 -1
  42. package/src/teslafleetapi.ts +8 -0
  43. package/src/teslemetry.ts +7 -2
  44. package/src/tessie.ts +3 -1
  45. package/src/types.ts +8 -0
  46. package/src/user.ts +6 -5
  47. package/src/vehicle.ts +91 -69
  48. package/src/vehiclespecific.ts +67 -63
package/dist/vehicle.d.ts CHANGED
@@ -1,94 +1,533 @@
1
1
  import TeslaFleetApi from "./teslafleetapi.js";
2
- import { ClimateMode, FleetTelemetryConfig, Level, Seat, Trunk, VehicleDataEndpoint } from "./types.js";
2
+ import { ClimateMode, CommandResponse, FleetTelemetryConfig, Level, Seat, Trunk, VehicleDataEndpoint } from "./types.js";
3
3
  import VehicleSpecific from "./vehiclespecific.js";
4
4
  export default class Vehicle {
5
5
  parent: TeslaFleetApi;
6
6
  constructor(parent: TeslaFleetApi);
7
- specific(vin: string): VehicleSpecific;
8
- actuate_truck(vehicle_tag: string | number, which_trunk: Trunk): Promise<Record<string, any>>;
9
- adjust_volume(vehicle_tag: string | number, volume: number): Promise<Record<string, any>>;
10
- auto_conditioning_start(vehicle_tag: string | number): Promise<Record<string, any>>;
11
- auto_conditioning_stop(vehicle_tag: string | number): Promise<Record<string, any>>;
12
- cancel_software_update(vehicle_tag: string | number): Promise<Record<string, any>>;
13
- charge_max_range(vehicle_tag: string | number): Promise<Record<string, any>>;
14
- charge_port_door_close(vehicle_tag: string | number): Promise<Record<string, any>>;
15
- charge_port_door_open(vehicle_tag: string | number): Promise<Record<string, any>>;
16
- charge_standard(vehicle_tag: string | number): Promise<Record<string, any>>;
17
- charge_start(vehicle_tag: string | number): Promise<Record<string, any>>;
18
- charge_stop(vehicle_tag: string | number): Promise<Record<string, any>>;
19
- clear_pin_to_drive_admin(vehicle_tag: string | number): Promise<Record<string, any>>;
20
- door_lock(vehicle_tag: string | number): Promise<Record<string, any>>;
21
- door_unlock(vehicle_tag: string | number): Promise<Record<string, any>>;
22
- erase_user_data(vehicle_tag: string | number): Promise<Record<string, any>>;
23
- flash_lights(vehicle_tag: string | number): Promise<Record<string, any>>;
24
- guest_mode(vehicle_tag: string | number, enable: boolean): Promise<Record<string, any>>;
25
- honk_horn(vehicle_tag: string | number): Promise<Record<string, any>>;
26
- media_next_fav(vehicle_tag: string | number): Promise<Record<string, any>>;
27
- media_next_track(vehicle_tag: string | number): Promise<Record<string, any>>;
28
- media_prev_fav(vehicle_tag: string | number): Promise<Record<string, any>>;
29
- media_prev_track(vehicle_tag: string | number): Promise<Record<string, any>>;
30
- media_toggle_playback(vehicle_tag: string | number): Promise<Record<string, any>>;
31
- media_volume_down(vehicle_tag: string | number): Promise<Record<string, any>>;
32
- navigation_gps_request(vehicle_tag: string | number, lat: number, lon: number, order?: number): Promise<Record<string, any>>;
33
- navigation_request(vehicle_tag: string | number, value: string, locale: string, type?: string): Promise<Record<string, any>>;
34
- navigation_sc_request(vehicle_tag: string | number, id: number, order?: number): Promise<Record<string, any>>;
35
- remote_auto_seat_climate_request(vehicle_tag: string | number, auto_seat_position: Seat | number, auto_climate_on: boolean): Promise<Record<string, any>>;
36
- remote_auto_steering_wheel_heat_climate_request(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
37
- remote_boombox(vehicle_tag: string | number, sound?: number): Promise<Record<string, any>>;
38
- remote_seat_cooler_request(vehicle_tag: string | number, seat_position: Seat | number, seat_cooler_level: Level): Promise<Record<string, any>>;
39
- remote_seat_heater_request(vehicle_tag: string | number, seat_position: Seat | number, seat_heater_level: Level): Promise<Record<string, any>>;
40
- remote_start_drive(vehicle_tag: string | number): Promise<Record<string, any>>;
41
- remote_steering_wheel_heat_level_request(vehicle_tag: string | number, level: Level): Promise<Record<string, any>>;
42
- remote_steering_wheel_heater_request(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
43
- reset_pin_to_drive_pin(vehicle_tag: string | number): Promise<Record<string, any>>;
44
- reset_valet_pin(vehicle_tag: string | number): Promise<Record<string, any>>;
45
- schedule_software_update(vehicle_tag: string | number, offset_sec: number): Promise<Record<string, any>>;
46
- set_bioweapon_mode(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<Record<string, any>>;
47
- set_cabin_overheat_protection(vehicle_tag: string | number, on: boolean, fan_only: boolean): Promise<Record<string, any>>;
48
- set_charge_limit(vehicle_tag: string | number, percent: number): Promise<Record<string, any>>;
49
- set_charging_amps(vehicle_tag: string | number, charging_amps: number): Promise<Record<string, any>>;
50
- set_climate_keeper_mode(vehicle_tag: string | number, climate_keeper_mode: number | ClimateMode): Promise<Record<string, any>>;
51
- set_cop_temp(vehicle_tag: string | number, cop_temp: 0 | 1 | 2 | 30 | 35 | 40 | 90 | 95 | 100): Promise<Record<string, any>>;
52
- set_pin_to_drive(vehicle_tag: string | number, on: boolean, password: string | number): Promise<Record<string, any>>;
53
- set_preconditioning_max(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<Record<string, any>>;
54
- set_scheduled_charging(vehicle_tag: string | number, enable: boolean, time: number): Promise<Record<string, any>>;
55
- set_scheduled_departure(vehicle_tag: string | number, enable?: boolean, preconditioning_enabled?: boolean, preconditioning_weekdays_only?: boolean, departure_time?: number, off_peak_charging_enabled?: boolean, off_peak_charging_weekdays_only?: boolean, end_off_peak_time?: number): Promise<Record<string, any>>;
56
- set_sentry_mode(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
57
- set_temps(vehicle_tag: string | number, driver_temp: number, passenger_temp: number): Promise<Record<string, any>>;
58
- set_valet_mode(vehicle_tag: string | number, on: boolean, password: string | number): Promise<Record<string, any>>;
59
- set_vehicle_name(vehicle_tag: string | number, vehicle_name: string): Promise<Record<string, any>>;
60
- speed_limit_activate(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
61
- speed_limit_clear_pin(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
62
- speed_limit_clear_pin_admin(vehicle_tag: string | number): Promise<Record<string, any>>;
63
- speed_limit_deactivate(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
64
- speed_limit_set_limit(vehicle_tag: string | number, limit_mph: number): Promise<Record<string, any>>;
65
- sun_roof_control(vehicle_tag: string | number, state: "stop" | "close" | "vent"): Promise<Record<string, any>>;
66
- take_drivenote(vehicle_tag: string | number, note: string): Promise<Record<string, any>>;
67
- trigger_homelink(vehicle_tag: string | number, lat: number, lon: number, token?: string): Promise<Record<string, any>>;
68
- upcoming_calendar_entries(vehicle_tag: string | number, calendar_data: string): Promise<Record<string, any>>;
69
- window_control(vehicle_tag: string | number, command: "vent" | "close", lat: number, lon: number): Promise<Record<string, any>>;
7
+ /**
8
+ * Returns a class for a single vehicle.
9
+ * @param vin
10
+ * @returns
11
+ */
12
+ specific(vin: String): VehicleSpecific;
13
+ /**
14
+ * Return the vehicle model name
15
+ * @param vin
16
+ * @returns
17
+ */
18
+ model(vin: String): String;
19
+ /**
20
+ * Return if the vehicle was build before 2021 and cannot sleep without a break
21
+ * @param vin
22
+ * @returns
23
+ */
24
+ pre2021(vin: String): Boolean;
25
+ /**
26
+ * Controls the front (which_trunk: "front") or rear (which_trunk: "rear") trunk.
27
+ * @param vehicle_tag VIN or id field of a vehicle
28
+ * @param which_trunk "front" or "rear"
29
+ */
30
+ actuate_truck(vehicle_tag: string | number, which_trunk: Trunk): Promise<CommandResponse>;
31
+ /**
32
+ * Adjusts vehicle media playback volume.
33
+ * @param vehicle_tag VIN or id field of a vehicle
34
+ * @param volume A floating point number from 0.0 to 11.0.
35
+ */
36
+ adjust_volume(vehicle_tag: string | number, volume: number): Promise<CommandResponse>;
37
+ /**
38
+ * Starts climate preconditioning.
39
+ * @param vehicle_tag VIN or id field of a vehicle
40
+ */
41
+ auto_conditioning_start(vehicle_tag: string | number): Promise<CommandResponse>;
42
+ /**
43
+ * Stops climate preconditioning.
44
+ * @param vehicle_tag VIN or id field of a vehicle
45
+ */
46
+ auto_conditioning_stop(vehicle_tag: string | number): Promise<CommandResponse>;
47
+ /**
48
+ * Cancels the countdown to install the vehicle software update.
49
+ * @param vehicle_tag VIN or id field of a vehicle
50
+ */
51
+ cancel_software_update(vehicle_tag: string | number): Promise<CommandResponse>;
52
+ /**
53
+ * Charges in max range mode -- we recommend limiting the use of this mode to long trips.
54
+ * @param vehicle_tag VIN or id field of a vehicle
55
+ */
56
+ charge_max_range(vehicle_tag: string | number): Promise<CommandResponse>;
57
+ /**
58
+ * Closes the charge port door.
59
+ * @param vehicle_tag VIN or id field of a vehicle
60
+ */
61
+ charge_port_door_close(vehicle_tag: string | number): Promise<CommandResponse>;
62
+ /**
63
+ * Opens the charge port door.
64
+ * @param vehicle_tag VIN or id field of a vehicle
65
+ */
66
+ charge_port_door_open(vehicle_tag: string | number): Promise<CommandResponse>;
67
+ /**
68
+ * Charges in Standard mode.
69
+ * @param vehicle_tag VIN or id field of a vehicle
70
+ */
71
+ charge_standard(vehicle_tag: string | number): Promise<CommandResponse>;
72
+ /**
73
+ * Starts charging the vehicle.
74
+ * @param vehicle_tag VIN or id field of a vehicle
75
+ */
76
+ charge_start(vehicle_tag: string | number): Promise<CommandResponse>;
77
+ /**
78
+ * Stops charging the vehicle.
79
+ * @param vehicle_tag VIN or id field of a vehicle
80
+ */
81
+ charge_stop(vehicle_tag: string | number): Promise<CommandResponse>;
82
+ /**
83
+ * Deactivates PIN to Drive and resets the associated PIN for vehicles running firmware versions 2023.44+. This command is only accessible to fleet managers or owners.
84
+ * @param vehicle_tag VIN or id field of a vehicle
85
+ */
86
+ clear_pin_to_drive_admin(vehicle_tag: string | number): Promise<CommandResponse>;
87
+ /**
88
+ * Locks the vehicle.
89
+ * @param vehicle_tag VIN or id field of a vehicle
90
+ */
91
+ door_lock(vehicle_tag: string | number): Promise<CommandResponse>;
92
+ /**
93
+ * Unlocks the vehicle.
94
+ * @param vehicle_tag VIN or id field of a vehicle
95
+ */
96
+ door_unlock(vehicle_tag: string | number): Promise<CommandResponse>;
97
+ /**
98
+ * Erases user's data from the user interface. Requires the vehicle to be in park.
99
+ * @param vehicle_tag VIN or id field of a vehicle
100
+ */
101
+ erase_user_data(vehicle_tag: string | number): Promise<CommandResponse>;
102
+ /**
103
+ * Briefly flashes the vehicle headlights. Requires the vehicle to be in park.
104
+ * @param vehicle_tag VIN or id field of a vehicle
105
+ */
106
+ flash_lights(vehicle_tag: string | number): Promise<CommandResponse>;
107
+ /**
108
+ * Restricts certain vehicle UI functionality from guest users
109
+ * @param vehicle_tag VIN or id field of a vehicle
110
+ * @param enable `true` or `false`
111
+ */
112
+ guest_mode(vehicle_tag: string | number, enable: boolean): Promise<CommandResponse>;
113
+ /**
114
+ * Honks the vehicle horn. Requires the vehicle to be in park.
115
+ * @param vehicle_tag VIN or id field of a vehicle
116
+ */
117
+ honk_horn(vehicle_tag: string | number): Promise<CommandResponse>;
118
+ /**
119
+ * Advances media player to next favorite track.
120
+ * @param vehicle_tag VIN or id field of a vehicle
121
+ */
122
+ media_next_fav(vehicle_tag: string | number): Promise<CommandResponse>;
123
+ /**
124
+ * Advances media player to next track.
125
+ * @param vehicle_tag VIN or id field of a vehicle
126
+ */
127
+ media_next_track(vehicle_tag: string | number): Promise<CommandResponse>;
128
+ /**
129
+ * Advances media player to previous favorite track.
130
+ * @param vehicle_tag VIN or id field of a vehicle
131
+ */
132
+ media_prev_fav(vehicle_tag: string | number): Promise<CommandResponse>;
133
+ /**
134
+ * Advances media player to previous track.
135
+ * @param vehicle_tag VIN or id field of a vehicle
136
+ */
137
+ media_prev_track(vehicle_tag: string | number): Promise<CommandResponse>;
138
+ /**
139
+ * Toggles current play/pause state.
140
+ * @param vehicle_tag VIN or id field of a vehicle
141
+ */
142
+ media_toggle_playback(vehicle_tag: string | number): Promise<CommandResponse>;
143
+ /**
144
+ * Turns the volume down by one.
145
+ * @param vehicle_tag VIN or id field of a vehicle
146
+ */
147
+ media_volume_down(vehicle_tag: string | number): Promise<CommandResponse>;
148
+ /**
149
+ * Start navigation to given coordinates. Order can be used to specify order of multiple stops.
150
+ * @param vehicle_tag VIN or id field of a vehicle
151
+ * @param lat Latitude
152
+ * @param lon Longitude
153
+ * @param order Order of multiple stops
154
+ */
155
+ navigation_gps_request(vehicle_tag: string | number, lat: number, lon: number, order?: number): Promise<CommandResponse>;
156
+ /**
157
+ * Sends a location to the in-vehicle navigation system.
158
+ * @param vehicle_tag VIN or id field of a vehicle
159
+ * @param type "share_ext_content_raw"
160
+ * @param locale ISO locale such as "en-US"
161
+ * @param timestamp_ms
162
+ */
163
+ navigation_request(vehicle_tag: string | number, value: string, locale: string, type?: string): Promise<CommandResponse>;
164
+ /**
165
+ * Start navigation to a supercharger.
166
+ * @param vehicle_tag VIN or id field of a vehicle
167
+ * @param id Supercharger ID
168
+ * @param order Order of multiple stops
169
+ * @returns
170
+ */
171
+ navigation_sc_request(vehicle_tag: string | number, id: number, order?: number): Promise<CommandResponse>;
172
+ /**
173
+ * Sets automatic seat heating and cooling.
174
+ * @param vehicle_tag VIN or id field of a vehicle
175
+ * @param auto_seat_position Seat position
176
+ * @param auto_climate_on `true` or `false`
177
+ */
178
+ remote_auto_seat_climate_request(vehicle_tag: string | number, auto_seat_position: Seat | number, auto_climate_on: boolean): Promise<CommandResponse>;
179
+ /**
180
+ * Sets automatic steering wheel heating on/off.
181
+ * @param vehicle_tag VIN or id field of a vehicle
182
+ * @param on `true` or `false`
183
+ */
184
+ remote_auto_steering_wheel_heat_climate_request(vehicle_tag: string | number, on: boolean): Promise<CommandResponse>;
185
+ /**
186
+ * Plays a sound through the vehicle external speaker.
187
+ * @param vehicle_tag VIN or id field of a vehicle
188
+ * @param sound Fart is `0`, Locate ping is `2000`
189
+ */
190
+ remote_boombox(vehicle_tag: string | number, sound?: number): Promise<CommandResponse>;
191
+ /**
192
+ * Sets seat cooling.
193
+ * @param vehicle_tag VIN or id field of a vehicle
194
+ * @param seat_position Seat position
195
+ * @param seat_cooler_level Cooling level
196
+ */
197
+ remote_seat_cooler_request(vehicle_tag: string | number, seat_position: Seat | number, seat_cooler_level: Level): Promise<CommandResponse>;
198
+ /**
199
+ * Sets seat heating.
200
+ * @param vehicle_tag VIN or id field of a vehicle
201
+ * @param seat_position Seat position
202
+ * @param seat_heater_level Heating level
203
+ */
204
+ remote_seat_heater_request(vehicle_tag: string | number, seat_position: Seat | number, seat_heater_level: Level): Promise<CommandResponse>;
205
+ /**
206
+ * Starts the vehicle remotely. Requires keyless driving to be enabled.
207
+ * @param vehicle_tag VIN or id field of a vehicle
208
+ */
209
+ remote_start_drive(vehicle_tag: string | number): Promise<CommandResponse>;
210
+ /**
211
+ * Sets steering wheel heat level.
212
+ * @param vehicle_tag VIN or id field of a vehicle
213
+ * @param level Heating level
214
+ */
215
+ remote_steering_wheel_heat_level_request(vehicle_tag: string | number, level: Level): Promise<CommandResponse>;
216
+ /**
217
+ * Sets steering wheel heating on/off. For vehicles that do not support auto steering wheel heat.
218
+ * @param vehicle_tag VIN or id field of a vehicle
219
+ * @param on `true` or `false`
220
+ */
221
+ remote_steering_wheel_heater_request(vehicle_tag: string | number, on: boolean): Promise<CommandResponse>;
222
+ /**
223
+ * Removes PIN to Drive. Requires the car to be in Pin to Drive mode and not in Valet mode. Note that this only works if PIN to Drive is not active. This command also requires the Tesla Vehicle Command Protocol - for more information, please see refer to the documentation here.
224
+ * @param vehicle_tag VIN or id field of a vehicle
225
+ */
226
+ reset_pin_to_drive_pin(vehicle_tag: string | number): Promise<CommandResponse>;
227
+ /**
228
+ * Removes PIN for Valet Mode.
229
+ * @param vehicle_tag VIN or id field of a vehicle
230
+ */
231
+ reset_valet_pin(vehicle_tag: string | number): Promise<CommandResponse>;
232
+ /**
233
+ * Schedules a vehicle software update (over the air "OTA") to be installed in the future.
234
+ * @param vehicle_tag VIN or id field of a vehicle
235
+ * @param offset_sec Offset in seconds
236
+ */
237
+ schedule_software_update(vehicle_tag: string | number, offset_sec: number): Promise<CommandResponse>;
238
+ /**
239
+ * Turns Bioweapon Defense Mode on and off.
240
+ * @param vehicle_tag VIN or id field of a vehicle
241
+ * @param on `true` or `false`
242
+ * @param manual_override `true` or `false`
243
+ */
244
+ set_bioweapon_mode(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<CommandResponse>;
245
+ /**
246
+ * Sets the vehicle overheat protection.
247
+ * @param vehicle_tag VIN or id field of a vehicle
248
+ * @param on `true` or `false`
249
+ * @param fan_only `true` or `false`
250
+ */
251
+ set_cabin_overheat_protection(vehicle_tag: string | number, on: boolean, fan_only: boolean): Promise<CommandResponse>;
252
+ /**
253
+ * Sets the vehicle's charge limit to a custom percentage.
254
+ * @param vehicle_tag VIN or id field of a vehicle
255
+ * @param percent Charge limit percentage typically between 50-100
256
+ */
257
+ set_charge_limit(vehicle_tag: string | number, percent: number): Promise<CommandResponse>;
258
+ /**
259
+ * Sets the charge limit to the standard setting.
260
+ * @param vehicle_tag VIN or id field of a vehicle
261
+ * @param percent Current limit in Amps typically between 5-32
262
+ */
263
+ set_charging_amps(vehicle_tag: string | number, charging_amps: number): Promise<CommandResponse>;
264
+ /**
265
+ * Enables climate keeper mode.
266
+ * @param vehicle_tag VIN or id field of a vehicle
267
+ * @param climate_keeper_mode `0` is Off, `1` is Keep, `2` is Dog, `3` is Camp
268
+ */
269
+ set_climate_keeper_mode(vehicle_tag: string | number, climate_keeper_mode: number | ClimateMode): Promise<CommandResponse>;
270
+ /**
271
+ * Adjusts the Cabin Overheat Protection temperature (COP).
272
+ * @param vehicle_tag VIN or id field of a vehicle
273
+ * @param cop_temp Integer representing Low (0/30C/90F), Medium (1/35C/95F), or High (2/40C/100F)
274
+ */
275
+ set_cop_temp(vehicle_tag: string | number, cop_temp: 0 | 1 | 2 | 30 | 35 | 40 | 90 | 95 | 100): Promise<CommandResponse>;
276
+ /**
277
+ * Sets a four-digit passcode for PIN to Drive. This PIN must then be entered before the vehicle can be driven.
278
+ * @param vehicle_tag VIN or id field of a vehicle
279
+ * @param on `true` or `false`
280
+ * @param password Four-digit passcode
281
+ */
282
+ set_pin_to_drive(vehicle_tag: string | number, on: boolean, password: string | number): Promise<CommandResponse>;
283
+ /**
284
+ * Sets an override for preconditioning — it should default to empty if no override is used.
285
+ * Also known as "Defrost Mode"
286
+ * @param vehicle_tag VIN or id field of a vehicle
287
+ * @param on `true` or `false`
288
+ * @param manual_override `true` or `false`
289
+ */
290
+ set_preconditioning_max(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<CommandResponse>;
291
+ /**
292
+ * Sets a time at which charging should be completed. The time parameter is minutes after midnight (e.g: time=120 schedules charging for 2:00am vehicle local time).
293
+ * @param vehicle_tag VIN or id field of a vehicle
294
+ * @param enable `true` or `false`
295
+ * @param time Minutes after midnight
296
+ */
297
+ set_scheduled_charging(vehicle_tag: string | number, enable: boolean, time: number): Promise<CommandResponse>;
298
+ /**
299
+ * Sets a time at which departure should be completed. The time parameter is minutes after midnight (e.g: time=120 schedules departure for 2:00am vehicle local time).
300
+ * @param vehicle_tag VIN or id field of a vehicle
301
+ * @param enable `true` or `false`
302
+ * @param preconditioning_enabled `true` or `false`
303
+ * @param preconditioning_weekdays_only `true` or `false`
304
+ * @param departure_time Minutes after midnight
305
+ * @param off_peak_charging_enabled `true` or `false`
306
+ * @param off_peak_charging_weekdays_only `true` or `false`
307
+ * @param end_off_peak_time Minutes after midnight
308
+ */
309
+ set_scheduled_departure(vehicle_tag: string | number, enable?: boolean, preconditioning_enabled?: boolean, preconditioning_weekdays_only?: boolean, departure_time?: number, off_peak_charging_enabled?: boolean, off_peak_charging_weekdays_only?: boolean, end_off_peak_time?: number): Promise<CommandResponse>;
310
+ /**
311
+ * Enables and disables Sentry Mode. Sentry Mode allows customers to watch the vehicle cameras live from the mobile app, as well as record sentry events.
312
+ * @param vehicle_tag VIN or id field of a vehicle
313
+ * @param on `true` or `false`
314
+ */
315
+ set_sentry_mode(vehicle_tag: string | number, on: boolean): Promise<CommandResponse>;
316
+ /**
317
+ * Sets the driver and/or passenger-side cabin temperature (and other zones if sync is enabled).
318
+ * @param vehicle_tag VIN or id field of a vehicle
319
+ * @param driver_temp Driver temperature
320
+ * @param passenger_temp Passenger temperature
321
+ */
322
+ set_temps(vehicle_tag: string | number, driver_temp: number, passenger_temp: number): Promise<CommandResponse>;
323
+ /**
324
+ * Turns on Valet Mode and sets a four-digit passcode that must then be entered to disable Valet Mode.
325
+ * @param vehicle_tag VIN or id field of a vehicle
326
+ * @param on `true` or `false`
327
+ * @param password Four-digit passcode
328
+ */
329
+ set_valet_mode(vehicle_tag: string | number, on: boolean, password: string | number): Promise<CommandResponse>;
330
+ /**
331
+ * Changes the name of a vehicle. This command also requires the Tesla Vehicle Command Protocol - for more information, please see refer to the documentation here.
332
+ * @param vehicle_tag VIN or id field of a vehicle
333
+ * @param vehicle_name New name
334
+ */
335
+ set_vehicle_name(vehicle_tag: string | number, vehicle_name: string): Promise<CommandResponse>;
336
+ /**
337
+ * Activates Speed Limit Mode with a four-digit PIN.
338
+ * @param vehicle_tag VIN or id field of a vehicle
339
+ * @param pin Four-digit PIN
340
+ */
341
+ speed_limit_activate(vehicle_tag: string | number, pin: string | number): Promise<CommandResponse>;
342
+ /**
343
+ * Deactivates Speed Limit Mode and resets the associated PIN.
344
+ * @param vehicle_tag VIN or id field of a vehicle
345
+ * @param pin Four-digit PIN
346
+ */
347
+ speed_limit_clear_pin(vehicle_tag: string | number, pin: string | number): Promise<CommandResponse>;
348
+ /**
349
+ * Deactivates Speed Limit Mode and resets the associated PIN for vehicles running firmware versions 2023.38+. This command is only accessible to fleet managers or owners.
350
+ * @param vehicle_tag VIN or id field of a vehicle
351
+ */
352
+ speed_limit_clear_pin_admin(vehicle_tag: string | number): Promise<CommandResponse>;
353
+ /**
354
+ * Deactivates Speed Limit Mode.
355
+ * @param vehicle_tag VIN or id field of a vehicle
356
+ * @param pin Four-digit PIN
357
+ */
358
+ speed_limit_deactivate(vehicle_tag: string | number, pin: string | number): Promise<CommandResponse>;
359
+ /**
360
+ * Sets the maximum speed allowed when Speed Limit Mode is active.
361
+ * @param vehicle_tag VIN or id field of a vehicle
362
+ * @param limit_mph Maximum speed in MPH
363
+ */
364
+ speed_limit_set_limit(vehicle_tag: string | number, limit_mph: number): Promise<CommandResponse>;
365
+ /**
366
+ * Controls the panoramic sunroof on the Model S.
367
+ * @param vehicle_tag VIN or id field of a vehicle
368
+ * @param state "stop", "close" or "vent"
369
+ */
370
+ sun_roof_control(vehicle_tag: string | number, state: "stop" | "close" | "vent"): Promise<CommandResponse>;
371
+ /**
372
+ * Records a drive note. The note parameter is truncated to 80 characters in length.
373
+ * @param vehicle_tag VIN or id field of a vehicle
374
+ * @param note Drive note
375
+ */
376
+ take_drivenote(vehicle_tag: string | number, note: string): Promise<CommandResponse>;
377
+ /**
378
+ * Turns on HomeLink (used to open and close garage doors).
379
+ * @param vehicle_tag VIN or id field of a vehicle
380
+ * @param token
381
+ * @param lat Latitude
382
+ * @param lon Longitude
383
+ */
384
+ trigger_homelink(vehicle_tag: string | number, lat: number, lon: number, token?: string): Promise<CommandResponse>;
385
+ /**
386
+ * Upcoming calendar entries stored on the vehicle.
387
+ * @param vehicle_tag VIN or id field of a vehicle
388
+ * @param calendar_data Calendar data
389
+ */
390
+ upcoming_calendar_entries(vehicle_tag: string | number, calendar_data: string): Promise<CommandResponse>;
391
+ /**
392
+ * Control the windows of a parked vehicle. Supported commands: vent and close. When closing, specify lat and lon of user to ensure they are within range of vehicle (unless this is an M3 platform vehicle).
393
+ * @param vehicle_tag VIN or id field of a vehicle
394
+ * @param command "vent" or "close"
395
+ * @param lat Latitude
396
+ * @param lon Longitude
397
+ */
398
+ window_control(vehicle_tag: string | number, command: "vent" | "close", lat: number, lon: number): Promise<CommandResponse>;
399
+ /**
400
+ * Returns all allowed drivers for a vehicle. This endpoint is only available for the vehicle owner.
401
+ * @param vehicle_tag VIN or id field of a vehicle
402
+ */
70
403
  drivers(vehicle_tag: string | number): Promise<Record<string, any>>;
404
+ /**
405
+ * Removes driver access from a vehicle. Share users can only remove their own access. Owners can remove share access or their own.
406
+ * @param vehicle_tag VIN or id field of a vehicle
407
+ * @param share_user_id
408
+ */
71
409
  drivers_remove(vehicle_tag: string | number, share_user_id?: number): Promise<Record<string, any>>;
410
+ /**
411
+ * Returns eligible vehicle subscriptions.
412
+ * @param vin Vehicle Identification Number
413
+ */
72
414
  eligible_subscriptions(vin: string): Promise<Record<string, any>>;
415
+ /**
416
+ * Returns eligibile vehicle upgrades.
417
+ * @param vin Vehicle Identification Number
418
+ */
73
419
  eligible_upgrades(vin: string): Promise<Record<string, any>>;
420
+ /**
421
+ * Checks whether vehicles can accept Tesla commands protocol for the partner's public key
422
+ * @param vins list of Vehicle Identification Number
423
+ * @returns
424
+ */
74
425
  fleet_status(vins: Array<String>): Promise<Record<string, any>>;
426
+ /**
427
+ * Configures vehicles to connect to self-hosted fleet-telemetry server. This endpoint has concurrency 1 (status 429 will be returned if many calls are made at the same time). Multiple vehicles can be configured with a single call.
428
+ * @param config A dictionary description the fleet telemetry configuration
429
+ * @returns
430
+ */
75
431
  fleet_telemetry_config(config: FleetTelemetryConfig): Promise<Record<string, any>>;
432
+ /**
433
+ * Disconnects vehicles to stream telemetry data to self hosted fleet-telemetry server.
434
+ * @param vehicle_tag VIN or id field of a vehicle
435
+ * @returns
436
+ */
76
437
  fleet_telemetry_config_delete(vehicle_tag: string | number): Promise<Record<string, any>>;
438
+ /**
439
+ * Fetches a vehicle's fleet telemetry config. synced set to true means the vehicle has adopted the target config. synced set to false means the vehicle will attempt to adopt the target config when it next establishes a backend connection.
440
+ * @param vehicle_tag VIN or id field of a vehicle
441
+ * @returns
442
+ */
77
443
  fleet_telemetry_config_get(vehicle_tag: string | number): Promise<Record<string, any>>;
444
+ /**
445
+ * Returns vehicles belonging to the account.
446
+ * @param page Page number
447
+ * @param per_page Number of items per page
448
+ */
78
449
  list(page?: number, per_page?: number): Promise<Record<string, any>>;
450
+ /**
451
+ * Returns whether or not mobile access is enabled for the vehicle.
452
+ * @param vehicle_tag VIN or id field of a vehicle
453
+ */
79
454
  mobile_enabled(vehicle_tag: string | number): Promise<Record<string, any>>;
455
+ /**
456
+ * Returns the charging sites near the current location of the vehicle.
457
+ * @param vehicle_tag VIN or id field of a vehicle
458
+ * @param count
459
+ * @param radius
460
+ * @param detail
461
+ */
80
462
  nearby_charging_sites(vehicle_tag: string | number, count?: number, radius?: number, detail?: boolean): Promise<Record<string, any>>;
463
+ /**
464
+ * Returns vehicle option details.
465
+ * @param vin Vehicle Identification Number
466
+ */
81
467
  options(vin: string): Promise<Record<string, any>>;
468
+ /**
469
+ * List of recent alerts
470
+ * @param vehicle_tag VIN or id field of a vehicle
471
+ */
82
472
  recent_alerts(vehicle_tag: string | number): Promise<Record<string, any>>;
473
+ /**
474
+ * Returns firmware release notes.
475
+ * @param vehicle_tag VIN or id field of a vehicle
476
+ * @param staged
477
+ * @param language
478
+ */
83
479
  release_notes(vehicle_tag: string | number, staged?: boolean, language?: string): Promise<Record<string, any>>;
480
+ /**
481
+ * Returns service data.
482
+ * @param vehicle_tag VIN or id field of a vehicle
483
+ */
84
484
  service_data(vehicle_tag: string | number): Promise<Record<string, any>>;
485
+ /**
486
+ * Returns the share invites for a vehicle.
487
+ * @param vehicle_tag VIN or id field of a vehicle
488
+ */
85
489
  share_invites(vehicle_tag: string | number): Promise<Record<string, any>>;
490
+ /**
491
+ * Creates a share invite for a vehicle.
492
+ * @param vehicle_tag VIN or id field of a vehicle
493
+ */
86
494
  share_invites_create(vehicle_tag: string | number): Promise<Record<string, any>>;
495
+ /**
496
+ * Redeems a share invite.
497
+ * @param code
498
+ */
87
499
  share_invites_redeem(code: string): Promise<Record<string, any>>;
500
+ /**
501
+ * Revokes a share invite.
502
+ * @param vehicle_tag VIN or id field of a vehicle
503
+ * @param id
504
+ */
88
505
  share_invites_revoke(vehicle_tag: string | number, id: string): Promise<Record<string, any>>;
506
+ /**
507
+ * Signed Commands is a generic endpoint replacing legacy commands.
508
+ * @param vehicle_tag VIN or id field of a vehicle
509
+ * @param routable_message
510
+ */
89
511
  signed_command(vehicle_tag: string | number, routable_message: string): Promise<Record<string, any>>;
512
+ /**
513
+ * Returns information about a vehicle.
514
+ * @param vehicle_tag VIN or id field of a vehicle
515
+ */
90
516
  vehicle(vehicle_tag: string | number): Promise<Record<string, any>>;
517
+ /**
518
+ * Makes a live call to the vehicle. This may return cached data if the vehicle is offline. For vehicles running firmware versions 2023.38+, location_data is required to fetch vehicle location. This will result in a location sharing icon to show on the vehicle UI.
519
+ * @param vehicle_tag VIN or id field of a vehicle
520
+ * @param endpoints
521
+ */
91
522
  vehicle_data(vehicle_tag: string | number, endpoints?: VehicleDataEndpoint[] | string): Promise<Record<string, any>>;
523
+ /**
524
+ * Wakes the vehicle from sleep, which is a state to minimize idle energy consumption.
525
+ * @param vehicle_tag VIN or id field of a vehicle
526
+ */
92
527
  wake_up(vehicle_tag: string | number): Promise<Record<string, any>>;
528
+ /**
529
+ * Returns warranty details.
530
+ * @param vin
531
+ */
93
532
  warranty_details(vin: string): Promise<Record<string, any>>;
94
533
  }