tesla-fleet-api 0.3.0 → 0.4.0

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 (192) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +22 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +12 -0
  3. package/dist/charging.cjs +53 -0
  4. package/dist/charging.d.cts +31 -0
  5. package/dist/charging.d.mts +30 -0
  6. package/dist/charging.mjs +53 -0
  7. package/dist/commands.cjs +802 -0
  8. package/dist/commands.d.cts +350 -0
  9. package/dist/commands.d.mts +349 -0
  10. package/dist/commands.mjs +800 -0
  11. package/dist/const.cjs +300 -0
  12. package/dist/const.d.cts +287 -0
  13. package/dist/const.d.mts +287 -0
  14. package/dist/const.mjs +263 -0
  15. package/dist/energy.cjs +137 -0
  16. package/dist/energy.d.cts +95 -0
  17. package/{src/energy.ts → dist/energy.d.mts} +17 -140
  18. package/dist/energy.mjs +137 -0
  19. package/dist/energyspecific.cjs +99 -0
  20. package/dist/energyspecific.d.cts +78 -0
  21. package/dist/energyspecific.d.mts +77 -0
  22. package/dist/energyspecific.mjs +99 -0
  23. package/dist/exceptions.cjs +1487 -0
  24. package/dist/exceptions.d.cts +1142 -0
  25. package/dist/exceptions.d.mts +1142 -0
  26. package/dist/exceptions.mjs +1324 -0
  27. package/dist/index.cjs +226 -0
  28. package/dist/index.d.cts +14 -0
  29. package/dist/index.d.mts +14 -0
  30. package/dist/index.mjs +14 -0
  31. package/dist/partner.cjs +32 -0
  32. package/dist/partner.d.cts +24 -0
  33. package/dist/partner.d.mts +23 -0
  34. package/dist/partner.mjs +32 -0
  35. package/dist/router.cjs +0 -0
  36. package/dist/router.d.cts +1 -0
  37. package/dist/router.d.mts +1 -0
  38. package/dist/router.mjs +1 -0
  39. package/dist/signing/crypto.cjs +31 -0
  40. package/dist/signing/crypto.mjs +27 -0
  41. package/dist/signing/session.cjs +112 -0
  42. package/dist/signing/session.d.cts +69 -0
  43. package/dist/signing/session.d.mts +69 -0
  44. package/dist/signing/session.mjs +110 -0
  45. package/dist/tariff.cjs +292 -0
  46. package/dist/{tariff.d.ts → tariff.d.cts} +17 -17
  47. package/dist/tariff.d.mts +29 -0
  48. package/dist/tariff.mjs +291 -0
  49. package/dist/teslafleetapi.cjs +125 -0
  50. package/dist/teslafleetapi.d.cts +64 -0
  51. package/dist/teslafleetapi.d.mts +64 -0
  52. package/dist/teslafleetapi.mjs +125 -0
  53. package/dist/teslemetry.cjs +36 -0
  54. package/dist/teslemetry.d.cts +23 -0
  55. package/dist/teslemetry.d.mts +23 -0
  56. package/dist/teslemetry.mjs +36 -0
  57. package/dist/tessie.cjs +34 -0
  58. package/dist/tessie.d.cts +23 -0
  59. package/dist/tessie.d.mts +23 -0
  60. package/dist/tessie.mjs +34 -0
  61. package/dist/types/commands.d.cts +28 -0
  62. package/dist/types/commands.d.mts +28 -0
  63. package/dist/types/live_status.d.cts +30 -0
  64. package/dist/types/live_status.d.mts +30 -0
  65. package/dist/types/products.d.cts +58 -0
  66. package/dist/types/products.d.mts +58 -0
  67. package/dist/types/responses.d.cts +9 -0
  68. package/dist/types/responses.d.mts +9 -0
  69. package/dist/types/site_info.d.cts +154 -0
  70. package/dist/types/site_info.d.mts +154 -0
  71. package/dist/types/vehicle.d.cts +27 -0
  72. package/dist/types/vehicle.d.mts +27 -0
  73. package/dist/types/vehicle_data.d.cts +278 -0
  74. package/dist/types/vehicle_data.d.mts +278 -0
  75. package/dist/types.cjs +0 -0
  76. package/dist/types.d.cts +9 -0
  77. package/dist/types.d.mts +9 -0
  78. package/dist/types.mjs +1 -0
  79. package/dist/user.cjs +28 -0
  80. package/dist/user.d.cts +17 -0
  81. package/dist/user.d.mts +16 -0
  82. package/dist/user.mjs +28 -0
  83. package/dist/vehicle.cjs +804 -0
  84. package/dist/vehicle.d.cts +550 -0
  85. package/dist/vehicle.d.mts +549 -0
  86. package/dist/vehicle.mjs +804 -0
  87. package/dist/vehiclesigned.cjs +20 -0
  88. package/dist/vehiclesigned.d.cts +14 -0
  89. package/dist/{vehiclesigned.d.ts → vehiclesigned.d.mts} +3 -3
  90. package/dist/vehiclesigned.mjs +20 -0
  91. package/dist/vehiclespecific.cjs +604 -0
  92. package/dist/vehiclespecific.d.cts +433 -0
  93. package/dist/vehiclespecific.d.mts +432 -0
  94. package/dist/vehiclespecific.mjs +604 -0
  95. package/package.json +108 -35
  96. package/dist/charging.d.ts +0 -30
  97. package/dist/charging.js +0 -51
  98. package/dist/charging.js.map +0 -1
  99. package/dist/commands.d.ts +0 -352
  100. package/dist/commands.js +0 -875
  101. package/dist/commands.js.map +0 -1
  102. package/dist/energy.d.ts +0 -94
  103. package/dist/energy.js +0 -125
  104. package/dist/energy.js.map +0 -1
  105. package/dist/energyspecific.d.ts +0 -77
  106. package/dist/energyspecific.js +0 -97
  107. package/dist/energyspecific.js.map +0 -1
  108. package/dist/helpers.d.ts +0 -2
  109. package/dist/helpers.js +0 -10
  110. package/dist/helpers.js.map +0 -1
  111. package/dist/index.d.ts +0 -15
  112. package/dist/index.js +0 -15
  113. package/dist/index.js.map +0 -1
  114. package/dist/partner.d.ts +0 -23
  115. package/dist/partner.js +0 -31
  116. package/dist/partner.js.map +0 -1
  117. package/dist/signing/crypto.d.ts +0 -10
  118. package/dist/signing/crypto.js +0 -26
  119. package/dist/signing/crypto.js.map +0 -1
  120. package/dist/signing/errors.d.ts +0 -29
  121. package/dist/signing/errors.js +0 -40
  122. package/dist/signing/errors.js.map +0 -1
  123. package/dist/signing/session.d.ts +0 -69
  124. package/dist/signing/session.js +0 -102
  125. package/dist/signing/session.js.map +0 -1
  126. package/dist/tariff.js +0 -302
  127. package/dist/tariff.js.map +0 -1
  128. package/dist/teslafleetapi.d.ts +0 -58
  129. package/dist/teslafleetapi.js +0 -120
  130. package/dist/teslafleetapi.js.map +0 -1
  131. package/dist/teslemetry.d.ts +0 -29
  132. package/dist/teslemetry.js +0 -39
  133. package/dist/teslemetry.js.map +0 -1
  134. package/dist/tessie.d.ts +0 -23
  135. package/dist/tessie.js +0 -28
  136. package/dist/tessie.js.map +0 -1
  137. package/dist/types/commands.d.ts +0 -44
  138. package/dist/types/commands.js +0 -11
  139. package/dist/types/commands.js.map +0 -1
  140. package/dist/types/live_status.d.ts +0 -26
  141. package/dist/types/live_status.js +0 -2
  142. package/dist/types/live_status.js.map +0 -1
  143. package/dist/types/products.d.ts +0 -54
  144. package/dist/types/products.js +0 -2
  145. package/dist/types/products.js.map +0 -1
  146. package/dist/types/responses.d.ts +0 -5
  147. package/dist/types/responses.js +0 -2
  148. package/dist/types/responses.js.map +0 -1
  149. package/dist/types/site_info.d.ts +0 -150
  150. package/dist/types/site_info.js +0 -2
  151. package/dist/types/site_info.js.map +0 -1
  152. package/dist/types/vehicle.d.ts +0 -23
  153. package/dist/types/vehicle.js +0 -10
  154. package/dist/types/vehicle.js.map +0 -1
  155. package/dist/types/vehicle_data.d.ts +0 -274
  156. package/dist/types/vehicle_data.js +0 -2
  157. package/dist/types/vehicle_data.js.map +0 -1
  158. package/dist/user.d.ts +0 -16
  159. package/dist/user.js +0 -26
  160. package/dist/user.js.map +0 -1
  161. package/dist/vehicle.d.ts +0 -548
  162. package/dist/vehicle.js +0 -774
  163. package/dist/vehicle.js.map +0 -1
  164. package/dist/vehiclesigned.js +0 -19
  165. package/dist/vehiclesigned.js.map +0 -1
  166. package/dist/vehiclespecific.d.ts +0 -432
  167. package/dist/vehiclespecific.js +0 -601
  168. package/dist/vehiclespecific.js.map +0 -1
  169. package/src/charging.ts +0 -66
  170. package/src/commands.ts +0 -1134
  171. package/src/energyspecific.ts +0 -116
  172. package/src/helpers.ts +0 -11
  173. package/src/index.ts +0 -21
  174. package/src/partner.ts +0 -37
  175. package/src/signing/crypto.ts +0 -29
  176. package/src/signing/errors.ts +0 -50
  177. package/src/signing/session.ts +0 -132
  178. package/src/tariff.ts +0 -375
  179. package/src/teslafleetapi.ts +0 -182
  180. package/src/teslemetry.ts +0 -54
  181. package/src/tessie.ts +0 -42
  182. package/src/types/commands.ts +0 -62
  183. package/src/types/live_status.ts +0 -27
  184. package/src/types/products.ts +0 -61
  185. package/src/types/responses.ts +0 -1
  186. package/src/types/site_info.ts +0 -159
  187. package/src/types/vehicle.ts +0 -33
  188. package/src/types/vehicle_data.ts +0 -286
  189. package/src/user.ts +0 -35
  190. package/src/vehicle.ts +0 -886
  191. package/src/vehiclesigned.ts +0 -20
  192. package/src/vehiclespecific.ts +0 -818
@@ -0,0 +1,432 @@
1
+ import { CommandResponse, FleetTelemetryConfig } from "./types/commands.mjs";
2
+ import { AutoSeat, ClimateMode, Level, Seat, Trunk, VehicleDataEndpoint } from "./const.mjs";
3
+ import { OptionsResponse } from "./types/responses.mjs";
4
+ import { VehicleResponse } from "./types/vehicle.mjs";
5
+ import { VehicleDataResponse } from "./types/vehicle_data.mjs";
6
+ import Vehicle from "./vehicle.mjs";
7
+ export default class VehicleSpecific {
8
+ parent: Vehicle;
9
+ vin: string;
10
+ model: string;
11
+ pre2021: boolean;
12
+ constructor(parent: Vehicle, vin: string);
13
+ /**
14
+ * Controls the front (which_trunk: "front") or rear (which_trunk: "rear") trunk.
15
+ * @param which_trunk "front" or "rear"
16
+ */
17
+ actuate_truck(which_trunk: Trunk): Promise<CommandResponse>;
18
+ /**
19
+ * Adjusts vehicle media playback volume.
20
+ * @param volume A floating point number from 0.0 to 11.0.
21
+ */
22
+ adjust_volume(volume: number): Promise<CommandResponse>;
23
+ /**
24
+ * Starts climate preconditioning.
25
+ */
26
+ auto_conditioning_start(): Promise<CommandResponse>;
27
+ /**
28
+ * Stops climate preconditioning.
29
+ */
30
+ auto_conditioning_stop(): Promise<CommandResponse>;
31
+ /**
32
+ * Cancels the countdown to install the vehicle software update.
33
+ */
34
+ cancel_software_update(): Promise<CommandResponse>;
35
+ /**
36
+ * Charges in max range mode -- we recommend limiting the use of this mode to long trips.
37
+ */
38
+ charge_max_range(): Promise<CommandResponse>;
39
+ /**
40
+ * Closes the charge port door.
41
+ */
42
+ charge_port_door_close(): Promise<CommandResponse>;
43
+ /**
44
+ * Opens the charge port door.
45
+ */
46
+ charge_port_door_open(): Promise<CommandResponse>;
47
+ /**
48
+ * Charges in Standard mode.
49
+ */
50
+ charge_standard(): Promise<CommandResponse>;
51
+ /**
52
+ * Starts charging the vehicle.
53
+ */
54
+ charge_start(): Promise<CommandResponse>;
55
+ /**
56
+ * Stops charging the vehicle.
57
+ */
58
+ charge_stop(): Promise<CommandResponse>;
59
+ /**
60
+ * 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.
61
+ */
62
+ clear_pin_to_drive_admin(): Promise<CommandResponse>;
63
+ /**
64
+ * Locks the vehicle.
65
+ */
66
+ door_lock(): Promise<CommandResponse>;
67
+ /**
68
+ * Unlocks the vehicle.
69
+ */
70
+ door_unlock(): Promise<CommandResponse>;
71
+ /**
72
+ * Erases user's data from the user interface. Requires the vehicle to be in park.
73
+ */
74
+ erase_user_data(): Promise<CommandResponse>;
75
+ /**
76
+ * Briefly flashes the vehicle headlights. Requires the vehicle to be in park.
77
+ */
78
+ flash_lights(): Promise<CommandResponse>;
79
+ /**
80
+ * Restricts certain vehicle UI functionality from guest users
81
+ * @param enable `true` or `false`
82
+ */
83
+ guest_mode(enable: boolean): Promise<CommandResponse>;
84
+ /**
85
+ * Honks the vehicle horn. Requires the vehicle to be in park.
86
+ */
87
+ honk_horn(): Promise<CommandResponse>;
88
+ /**
89
+ * Advances media player to next favorite track.
90
+ */
91
+ media_next_fav(): Promise<CommandResponse>;
92
+ /**
93
+ * Advances media player to next track.
94
+ */
95
+ media_next_track(): Promise<CommandResponse>;
96
+ /**
97
+ * Advances media player to previous favorite track.
98
+ */
99
+ media_prev_fav(): Promise<CommandResponse>;
100
+ /**
101
+ * Advances media player to previous track.
102
+ */
103
+ media_prev_track(): Promise<CommandResponse>;
104
+ /**
105
+ * Toggles current play/pause state.
106
+ */
107
+ media_toggle_playback(): Promise<CommandResponse>;
108
+ /**
109
+ * Turns the volume down by one.
110
+ */
111
+ media_volume_down(): Promise<CommandResponse>;
112
+ /**
113
+ * Start navigation to given coordinates. Order can be used to specify order of multiple stops.
114
+ * @param lat Latitude
115
+ * @param lon Longitude
116
+ * @param order Order of multiple stops
117
+ */
118
+ navigation_gps_request(lat: number, lon: number, order?: number): Promise<CommandResponse>;
119
+ /**
120
+ * Sends a location to the in-vehicle navigation system.
121
+ * @param type "share_ext_content_raw"
122
+ * @param locale ISO locale such as "en-US"
123
+ * @param timestamp_ms
124
+ */
125
+ navigation_request(value: string, locale: string, type?: string): Promise<CommandResponse>;
126
+ /**
127
+ * Start navigation to a supercharger.
128
+ * @param id Supercharger ID
129
+ * @param order Order of multiple stops
130
+ * @returns
131
+ */
132
+ navigation_sc_request(id: number, order?: number): Promise<CommandResponse>;
133
+ /**
134
+ * Sets automatic seat heating and cooling.
135
+ * @param auto_seat_position `AutoSeat` position (1-indexed: front left is 1, front right is 2)
136
+ * @param auto_climate_on `true` or `false`
137
+ */
138
+ remote_auto_seat_climate_request(auto_seat_position: keyof typeof AutoSeat | number, auto_climate_on: boolean): Promise<CommandResponse>;
139
+ /**
140
+ * Sets automatic steering wheel heating on/off.
141
+ * @param on `true` or `false`
142
+ */
143
+ remote_auto_steering_wheel_heat_climate_request(on: boolean): Promise<CommandResponse>;
144
+ /**
145
+ * Plays a sound through the vehicle external speaker.
146
+ * @param sound Fart is `0`, Locate ping is `2000`
147
+ */
148
+ remote_boombox(sound?: number): Promise<CommandResponse>;
149
+ /**
150
+ * Sets seat cooling.
151
+ * @param seat_position Seat position
152
+ * @param seat_cooler_level Cooling level
153
+ */
154
+ remote_seat_cooler_request(seat_position: Seat | number, seat_cooler_level: Level): Promise<CommandResponse>;
155
+ /**
156
+ * Sets seat heating.
157
+ * @param seat_position Seat position
158
+ * @param seat_heater_level Heating level
159
+ */
160
+ remote_seat_heater_request(seat_position: Seat | number, seat_heater_level: Level): Promise<CommandResponse>;
161
+ /**
162
+ * Starts the vehicle remotely. Requires keyless driving to be enabled.
163
+ */
164
+ remote_start_drive(): Promise<CommandResponse>;
165
+ /**
166
+ * Sets steering wheel heat level.
167
+ * @param level Heating level
168
+ */
169
+ remote_steering_wheel_heat_level_request(level: Level): Promise<CommandResponse>;
170
+ /**
171
+ * Sets steering wheel heating on/off. For vehicles that do not support auto steering wheel heat.
172
+ * @param on `true` or `false`
173
+ */
174
+ remote_steering_wheel_heater_request(on: boolean): Promise<CommandResponse>;
175
+ /**
176
+ * 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.
177
+ */
178
+ reset_pin_to_drive_pin(): Promise<CommandResponse>;
179
+ /**
180
+ * Removes PIN for Valet Mode.
181
+ */
182
+ reset_valet_pin(): Promise<CommandResponse>;
183
+ /**
184
+ * Schedules a vehicle software update (over the air "OTA") to be installed in the future.
185
+ * @param offset_sec Offset in seconds
186
+ */
187
+ schedule_software_update(offset_sec: number): Promise<CommandResponse>;
188
+ /**
189
+ * Turns Bioweapon Defense Mode on and off.
190
+ * @param on `true` or `false`
191
+ * @param manual_override `true` or `false`
192
+ */
193
+ set_bioweapon_mode(on: boolean, manual_override: boolean): Promise<CommandResponse>;
194
+ /**
195
+ * Sets the vehicle overheat protection.
196
+ * @param on `true` or `false`
197
+ * @param fan_only `true` or `false`
198
+ */
199
+ set_cabin_overheat_protection(on: boolean, fan_only: boolean): Promise<CommandResponse>;
200
+ /**
201
+ * Sets the vehicle's charge limit to a custom percentage.
202
+ * @param percent Charge limit percentage typically between 50-100
203
+ */
204
+ set_charge_limit(percent: number): Promise<CommandResponse>;
205
+ /**
206
+ * Sets the charge limit to the standard setting.
207
+ * @param percent Current limit in Amps typically between 5-32
208
+ */
209
+ set_charging_amps(charging_amps: number): Promise<CommandResponse>;
210
+ /**
211
+ * Enables climate keeper mode.
212
+ * @param climate_keeper_mode `0` is Off, `1` is Keep, `2` is Dog, `3` is Camp
213
+ */
214
+ set_climate_keeper_mode(climate_keeper_mode: number | ClimateMode): Promise<CommandResponse>;
215
+ /**
216
+ * Adjusts the Cabin Overheat Protection temperature (COP).
217
+ * @param cop_temp Integer representing Low (0/30C/90F), Medium (1/35C/95F), or High (2/40C/100F)
218
+ */
219
+ set_cop_temp(cop_temp: 0 | 1 | 2 | 30 | 35 | 40 | 90 | 95 | 100): Promise<CommandResponse>;
220
+ /**
221
+ * Sets a four-digit passcode for PIN to Drive. This PIN must then be entered before the vehicle can be driven.
222
+ * @param on `true` or `false`
223
+ * @param password Four-digit passcode
224
+ */
225
+ set_pin_to_drive(on: boolean, password: string | number): Promise<CommandResponse>;
226
+ /**
227
+ * Sets an override for preconditioning — it should default to empty if no override is used.
228
+ * Also known as "Defrost Mode"
229
+ * @param on `true` or `false`
230
+ * @param manual_override `true` or `false`
231
+ */
232
+ set_preconditioning_max(on: boolean, manual_override: boolean): Promise<CommandResponse>;
233
+ /**
234
+ * 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).
235
+ * @param enable `true` or `false`
236
+ * @param time Minutes after midnight
237
+ */
238
+ set_scheduled_charging(enable: boolean, time: number): Promise<CommandResponse>;
239
+ /**
240
+ * 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).
241
+ * @param enable `true` or `false`
242
+ * @param preconditioning_enabled `true` or `false`
243
+ * @param preconditioning_weekdays_only `true` or `false`
244
+ * @param departure_time Minutes after midnight
245
+ * @param off_peak_charging_enabled `true` or `false`
246
+ * @param off_peak_charging_weekdays_only `true` or `false`
247
+ * @param end_off_peak_time Minutes after midnight
248
+ */
249
+ set_scheduled_departure(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>;
250
+ /**
251
+ * 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.
252
+ * @param on `true` or `false`
253
+ */
254
+ set_sentry_mode(on: boolean): Promise<CommandResponse>;
255
+ /**
256
+ * Sets the driver and/or passenger-side cabin temperature (and other zones if sync is enabled).
257
+ * @param driver_temp Driver temperature
258
+ * @param passenger_temp Passenger temperature
259
+ */
260
+ set_temps(driver_temp: number, passenger_temp: number): Promise<CommandResponse>;
261
+ /**
262
+ * Turns on Valet Mode and sets a four-digit passcode that must then be entered to disable Valet Mode.
263
+ * @param on `true` or `false`
264
+ * @param password Four-digit passcode
265
+ */
266
+ set_valet_mode(on: boolean, password: string | number): Promise<CommandResponse>;
267
+ /**
268
+ * 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.
269
+ * @param vehicle_name New name
270
+ */
271
+ set_vehicle_name(vehicle_name: string): Promise<CommandResponse>;
272
+ /**
273
+ * Activates Speed Limit Mode with a four-digit PIN.
274
+ * @param pin Four-digit PIN
275
+ */
276
+ speed_limit_activate(pin: string | number): Promise<CommandResponse>;
277
+ /**
278
+ * Deactivates Speed Limit Mode and resets the associated PIN.
279
+ * @param pin Four-digit PIN
280
+ */
281
+ speed_limit_clear_pin(pin: string | number): Promise<CommandResponse>;
282
+ /**
283
+ * 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.
284
+ */
285
+ speed_limit_clear_pin_admin(): Promise<CommandResponse>;
286
+ /**
287
+ * Deactivates Speed Limit Mode.
288
+ * @param pin Four-digit PIN
289
+ */
290
+ speed_limit_deactivate(pin: string | number): Promise<CommandResponse>;
291
+ /**
292
+ * Sets the maximum speed allowed when Speed Limit Mode is active.
293
+ * @param limit_mph Maximum speed in MPH
294
+ */
295
+ speed_limit_set_limit(limit_mph: number): Promise<CommandResponse>;
296
+ /**
297
+ * Controls the panoramic sunroof on the Model S.
298
+ * @param state "stop", "close" or "vent"
299
+ */
300
+ sun_roof_control(state: "stop" | "close" | "vent"): Promise<CommandResponse>;
301
+ /**
302
+ * Records a drive note. The note parameter is truncated to 80 characters in length.
303
+ * @param note Drive note
304
+ */
305
+ take_drivenote(note: string): Promise<CommandResponse>;
306
+ /**
307
+ * Turns on HomeLink (used to open and close garage doors).
308
+ * @param token
309
+ * @param lat Latitude
310
+ * @param lon Longitude
311
+ */
312
+ trigger_homelink(lat: number, lon: number, token?: string): Promise<CommandResponse>;
313
+ /**
314
+ * Upcoming calendar entries stored on the vehicle.
315
+ * @param calendar_data Calendar data
316
+ */
317
+ upcoming_calendar_entries(calendar_data: string): Promise<CommandResponse>;
318
+ /**
319
+ * 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).
320
+ * @param command "vent" or "close"
321
+ * @param lat Latitude
322
+ * @param lon Longitude
323
+ */
324
+ window_control(command: "vent" | "close", lat: number, lon: number): Promise<CommandResponse>;
325
+ /**
326
+ * Returns all allowed drivers for a vehicle. This endpoint is only available for the vehicle owner.
327
+ */
328
+ drivers(): Promise<Record<string, any>>;
329
+ /**
330
+ * Removes driver access from a vehicle. Share users can only remove their own access. Owners can remove share access or their own.
331
+ * @param share_user_id
332
+ */
333
+ drivers_remove(share_user_id?: number): Promise<Record<string, any>>;
334
+ /**
335
+ * Returns eligible vehicle subscriptions.
336
+ * @param vin Vehicle Identification Number
337
+ */
338
+ eligible_subscriptions(): Promise<Record<string, any>>;
339
+ /**
340
+ * Returns eligibile vehicle upgrades.
341
+ * @param vin Vehicle Identification Number
342
+ */
343
+ eligible_upgrades(): Promise<Record<string, any>>;
344
+ /**
345
+ * Checks whether vehicles can accept Tesla commands protocol for the partner's public key
346
+ * @param vins list of Vehicle Identification Number
347
+ * @returns
348
+ */
349
+ fleet_status(): Promise<Record<string, any>>;
350
+ /**
351
+ * 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.
352
+ * @param config A dictionary description the fleet telemetry configuration
353
+ * @returns
354
+ */
355
+ fleet_telemetry_config(config: FleetTelemetryConfig["config"]): Promise<Record<string, any>>;
356
+ /**
357
+ * Disconnects vehicles to stream telemetry data to self hosted fleet-telemetry server.
358
+ * @returns
359
+ */
360
+ fleet_telemetry_config_delete(): Promise<Record<string, any>>;
361
+ /**
362
+ * 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.
363
+ * @returns
364
+ */
365
+ fleet_telemetry_config_get(): Promise<Record<string, any>>;
366
+ /**
367
+ * Returns whether or not mobile access is enabled for the vehicle.
368
+ */
369
+ mobile_enabled(): Promise<Record<string, any>>;
370
+ /**
371
+ * Returns the charging sites near the current location of the vehicle.
372
+ * @param count
373
+ * @param radius
374
+ * @param detail
375
+ */
376
+ nearby_charging_sites(count?: number, radius?: number, detail?: boolean): Promise<Record<string, any>>;
377
+ /**
378
+ * Returns vehicle option details.
379
+ * @param vin Vehicle Identification Number
380
+ */
381
+ options(_vin: string): Promise<OptionsResponse>;
382
+ /**
383
+ * List of recent alerts
384
+ */
385
+ recent_alerts(): Promise<Record<string, any>>;
386
+ /**
387
+ * Returns firmware release notes.
388
+ * @param staged
389
+ * @param language
390
+ */
391
+ release_notes(staged?: boolean, language?: string): Promise<Record<string, any>>;
392
+ /**
393
+ * Returns service data.
394
+ */
395
+ service_data(): Promise<Record<string, any>>;
396
+ /**
397
+ * Returns the share invites for a vehicle.
398
+ */
399
+ share_invites(): Promise<Record<string, any>>;
400
+ /**
401
+ * Creates a share invite for a vehicle.
402
+ */
403
+ share_invites_create(): Promise<Record<string, any>>;
404
+ /**
405
+ * Revokes a share invite.
406
+ * @param id
407
+ */
408
+ share_invites_revoke(id: string): Promise<Record<string, any>>;
409
+ /**
410
+ * Signed Commands is a generic endpoint replacing legacy commands.
411
+ * @param routable_message
412
+ */
413
+ signed_command(routable_message: string): Promise<Record<string, any>>;
414
+ /**
415
+ * Returns information about a vehicle.
416
+ */
417
+ vehicle(): Promise<VehicleResponse>;
418
+ /**
419
+ * 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.
420
+ * @param endpoints
421
+ */
422
+ vehicle_data(endpoints?: VehicleDataEndpoint[] | string): Promise<VehicleDataResponse>;
423
+ /**
424
+ * Wakes the vehicle from sleep, which is a state to minimize idle energy consumption.
425
+ */
426
+ wake_up(): Promise<Record<string, any>>;
427
+ /**
428
+ * Returns warranty details.
429
+ * @param vin
430
+ */
431
+ warranty_details(): Promise<Record<string, any>>;
432
+ }