tesla-fleet-api 0.0.6 → 0.0.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"teslafleetapi.js","sourceRoot":"","sources":["../src/teslafleetapi.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AAMnC,MAAM,OAAO,GAA2B;IACpC,EAAE,EAAE,6CAA6C;IACjD,EAAE,EAAE,6CAA6C;IACjD,EAAE,EAAE,4CAA4C;CACnD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAa;IAS9B,YAAY,OASX;QAjBD,WAAM,GAAkB,IAAI,CAAC;QAkBzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAEvC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QACjC,CAAC;aAAM,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,EAAE,CAAC;YACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACjE,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAE7C,IAAI,OAAO,CAAC,aAAa,KAAK,KAAK,EAAE,CAAC;YAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;QACD,IAAI,OAAO,CAAC,WAAW,K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AC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,QAAQ;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAClD,CAAC;CACJ"}
@@ -2,7 +2,14 @@ import TeslaFleetApi from "./teslafleetapi.js";
2
2
  type Region = "na" | "eu" | "api";
3
3
  export default class Telemetry extends TeslaFleetApi {
4
4
  constructor(accessToken: string, region?: Region);
5
+ /**
6
+ * Test the connection to Teslemetry
7
+ */
5
8
  test(): Promise<any>;
9
+ /**
10
+ * Get details about your Teslemetry account
11
+ * @param update_region Update the server URL based on the region in the metadata
12
+ */
6
13
  metadata(update_region?: boolean): Promise<void>;
7
14
  }
8
15
  export {};
@@ -3,9 +3,16 @@ export default class Telemetry extends TeslaFleetApi {
3
3
  constructor(accessToken, region = "api") {
4
4
  super({ accessToken, server: `https://${region}.teslemetry.com`, partnerScope: false, userScope: false });
5
5
  }
6
+ /**
7
+ * Test the connection to Teslemetry
8
+ */
6
9
  async test() {
7
10
  return this._request("GET", "/api/test");
8
11
  }
12
+ /**
13
+ * Get details about your Teslemetry account
14
+ * @param update_region Update the server URL based on the region in the metadata
15
+ */
9
16
  async metadata(update_region = true) {
10
17
  this._request("GET", "/api/metadata").then((metadata) => {
11
18
  if (update_region) {
@@ -1 +1 @@
1
- {"version":3,"file":"teslemetry.js","sourceRoot":"","sources":["../src/teslemetry.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAI/C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAChD,YAAY,WAAmB,EAAE,SAAiB,KAAK;QACnD,KAAK,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,MAAM,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9G,CAAC;IAKD,KAAK,CAAC,IAAI;QACN,OAAO,IAAI,CAAC,Q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import TeslaFleetApi from "./teslafleetapi.js";
2
2
  import { Scope } from "./types.js";
3
3
  export default class Telemetry extends TeslaFleetApi {
4
4
  constructor(accessToken: string);
5
+ /**
6
+ * Get your approved Tesla scopes
7
+ */
5
8
  tesla_scopes(): Promise<Scope[]>;
6
9
  }
package/dist/tessie.js CHANGED
@@ -3,6 +3,9 @@ export default class Telemetry extends TeslaFleetApi {
3
3
  constructor(accessToken) {
4
4
  super({ accessToken, server: `https://api.tessie.com`, partnerScope: false, userScope: false });
5
5
  }
6
+ /**
7
+ * Get your approved Tesla scopes
8
+ */
6
9
  async tesla_scopes() {
7
10
  return this._request("GET", "auth/tesla_scopes");
8
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tessie.js","sourceRoot":"","sources":["../src/tessie.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAChD,YAAY,WAAmB;QAC3B,KAAK,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,wBAAwB,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACpG,CAAC;IAKD,KAAK,CAAC,YAAY;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACrD,CAAC;CACJ"}
1
+ {"version":3,"file":"tessie.js","sourceRoot":"","sources":["../src/tessie.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAG/C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,aAAa;IAChD,YAAY,WAAmB;QAC3B,KAAK,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,wBAAwB,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;IACrD,CAAC;CACJ"}
package/dist/user.d.ts CHANGED
@@ -3,9 +3,14 @@ import { CommandResponse } from "./types.js";
3
3
  export default class User {
4
4
  parent: TeslaFleetApi;
5
5
  constructor(parent: TeslaFleetApi);
6
+ /** Returns the public key associated with the user. */
6
7
  backup_key(): Promise<CommandResponse>;
8
+ /** Returns any custom feature flag applied to a user. */
7
9
  feature_config(): Promise<CommandResponse>;
10
+ /** Returns a summary of a user's account. */
8
11
  me(): Promise<CommandResponse>;
12
+ /** Returns the active orders for a user. */
9
13
  orders(): Promise<CommandResponse>;
14
+ /** Returns a user's region and appropriate fleet-api base URL. Accepts no parameters, response is based on the authentication token subject. */
10
15
  region(): Promise<CommandResponse>;
11
16
  }
package/dist/user.js CHANGED
@@ -2,18 +2,23 @@ export default class User {
2
2
  constructor(parent) {
3
3
  this.parent = parent;
4
4
  }
5
+ /** Returns the public key associated with the user. */
5
6
  async backup_key() {
6
7
  return this.parent._request("GET", "api/1/users/backup_key");
7
8
  }
9
+ /** Returns any custom feature flag applied to a user. */
8
10
  async feature_config() {
9
11
  return this.parent._request("GET", "api/1/users/feature_config");
10
12
  }
13
+ /** Returns a summary of a user's account. */
11
14
  async me() {
12
15
  return this.parent._request("GET", "api/1/users/me");
13
16
  }
17
+ /** Returns the active orders for a user. */
14
18
  async orders() {
15
19
  return this.parent._request("GET", "api/1/users/orders");
16
20
  }
21
+ /** Returns a user's region and appropriate fleet-api base URL. Accepts no parameters, response is based on the authentication token subject. */
17
22
  async region() {
18
23
  return this.parent._request("GET", "api/1/users/region");
19
24
  }
package/dist/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,IAAI;IAGrB,YAAY,MAAqB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAGD,KAAK,CAAC,UA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KAAK,EAAE,oBAAoB,CAAC,CAAC;IAC7D,CAAC;IAED,gJAAgJ;IAChJ,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;IAC7D,CAAC;CACJ"}
package/dist/vehicle.d.ts CHANGED
@@ -4,93 +4,530 @@ 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
- model(vin: String): String;
9
- pre2021(vin: String): Boolean;
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
+ */
10
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
+ */
11
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
+ */
12
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
+ */
13
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
+ */
14
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
+ */
15
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
+ */
16
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
+ */
17
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
+ */
18
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
+ */
19
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
+ */
20
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
+ */
21
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
+ */
22
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
+ */
23
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
+ */
24
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
+ */
25
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
+ */
26
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
+ */
27
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
+ */
28
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
+ */
29
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
+ */
30
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
+ */
31
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
+ */
32
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
+ */
33
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
+ */
34
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
+ */
35
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
+ */
36
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
+ */
37
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
+ */
38
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
+ */
39
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
+ */
40
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
+ */
41
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
+ */
42
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
+ */
43
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
+ */
44
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
+ */
45
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
+ */
46
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
+ */
47
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
+ */
48
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
+ */
49
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
+ */
50
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
+ */
51
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
+ */
52
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
+ */
53
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
+ */
54
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
+ */
55
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
+ */
56
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
+ */
57
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
+ */
58
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
+ */
59
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
+ */
60
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
+ */
61
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
+ */
62
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
+ */
63
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
+ */
64
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
+ */
65
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
+ */
66
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
+ */
67
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
+ */
68
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
+ */
69
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
+ */
70
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
+ */
71
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
+ */
72
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
+ */
73
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
+ */
74
414
  eligible_subscriptions(vin: string): Promise<Record<string, any>>;
415
+ /**
416
+ * Returns eligibile vehicle upgrades.
417
+ * @param vin Vehicle Identification Number
418
+ */
75
419
  eligible_upgrades(vin: string): Promise<Record<string, any>>;
76
- fleet_status(vins: Array<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
+ */
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
+ */
77
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
+ */
78
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
+ */
79
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
+ */
80
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
+ */
81
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
+ */
82
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
+ */
83
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
+ */
84
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
+ */
85
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
+ */
86
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
+ */
87
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
+ */
88
494
  share_invites_create(vehicle_tag: string | number): Promise<Record<string, any>>;
495
+ /**
496
+ * Redeems a share invite.
497
+ * @param code
498
+ */
89
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
+ */
90
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
+ */
91
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
+ */
92
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
+ */
93
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
+ */
94
527
  wake_up(vehicle_tag: string | number): Promise<Record<string, any>>;
528
+ /**
529
+ * Returns warranty details.
530
+ * @param vin
531
+ */
95
532
  warranty_details(vin: string): Promise<Record<string, any>>;
96
533
  }