tesla-fleet-api 0.3.0 → 0.5.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.
- package/README.md +284 -1
- package/dist/_virtual/_rolldown/runtime.cjs +32 -0
- package/dist/_virtual/_rolldown/runtime.mjs +12 -0
- package/dist/bluetooth/adapters/shared.cjs +38 -0
- package/dist/bluetooth/adapters/shared.mjs +36 -0
- package/dist/bluetooth/async.cjs +121 -0
- package/dist/bluetooth/async.d.cts +10 -0
- package/dist/bluetooth/async.d.mts +10 -0
- package/dist/bluetooth/async.mjs +116 -0
- package/dist/bluetooth/broadcast.cjs +153 -0
- package/dist/bluetooth/broadcast.d.cts +59 -0
- package/dist/bluetooth/broadcast.d.mts +59 -0
- package/dist/bluetooth/broadcast.mjs +151 -0
- package/dist/bluetooth/constants.cjs +99 -0
- package/dist/bluetooth/constants.d.cts +70 -0
- package/dist/bluetooth/constants.d.mts +70 -0
- package/dist/bluetooth/constants.mjs +72 -0
- package/dist/bluetooth/esphome.cjs +292 -0
- package/dist/bluetooth/esphome.d.cts +83 -0
- package/dist/bluetooth/esphome.d.mts +83 -0
- package/dist/bluetooth/esphome.mjs +291 -0
- package/dist/bluetooth/framing.cjs +125 -0
- package/dist/bluetooth/framing.d.cts +45 -0
- package/dist/bluetooth/framing.d.mts +45 -0
- package/dist/bluetooth/framing.mjs +122 -0
- package/dist/bluetooth/homey.cjs +155 -0
- package/dist/bluetooth/homey.d.cts +75 -0
- package/dist/bluetooth/homey.d.mts +75 -0
- package/dist/bluetooth/homey.mjs +150 -0
- package/dist/bluetooth/names.cjs +24 -0
- package/dist/bluetooth/names.d.cts +10 -0
- package/dist/bluetooth/names.d.mts +10 -0
- package/dist/bluetooth/names.mjs +20 -0
- package/dist/bluetooth/noble.cjs +178 -0
- package/dist/bluetooth/noble.d.cts +58 -0
- package/dist/bluetooth/noble.d.mts +58 -0
- package/dist/bluetooth/noble.mjs +177 -0
- package/dist/bluetooth/streamglue.cjs +157 -0
- package/dist/bluetooth/streamglue.d.cts +37 -0
- package/dist/bluetooth/streamglue.d.mts +37 -0
- package/dist/bluetooth/streamglue.mjs +154 -0
- package/dist/bluetooth/teslabluetooth.cjs +67 -0
- package/dist/bluetooth/teslabluetooth.d.cts +41 -0
- package/dist/bluetooth/teslabluetooth.d.mts +41 -0
- package/dist/bluetooth/teslabluetooth.mjs +66 -0
- package/dist/bluetooth/transport.cjs +10 -0
- package/dist/bluetooth/transport.d.cts +95 -0
- package/dist/bluetooth/transport.d.mts +95 -0
- package/dist/bluetooth/transport.mjs +10 -0
- package/dist/bluetooth/vehiclebluetooth.cjs +1272 -0
- package/dist/bluetooth/vehiclebluetooth.d.cts +495 -0
- package/dist/bluetooth/vehiclebluetooth.d.mts +495 -0
- package/dist/bluetooth/vehiclebluetooth.mjs +1270 -0
- package/dist/bluetooth/verify.cjs +93 -0
- package/dist/bluetooth/verify.d.cts +35 -0
- package/dist/bluetooth/verify.d.mts +35 -0
- package/dist/bluetooth/verify.mjs +91 -0
- package/dist/bluetooth.cjs +53 -0
- package/dist/bluetooth.d.cts +10 -0
- package/dist/bluetooth.d.mts +10 -0
- package/dist/bluetooth.mjs +9 -0
- package/dist/charging.cjs +53 -0
- package/dist/charging.d.cts +31 -0
- package/dist/charging.d.mts +30 -0
- package/dist/charging.mjs +53 -0
- package/dist/commands.cjs +1797 -0
- package/dist/commands.d.cts +881 -0
- package/dist/commands.d.mts +881 -0
- package/dist/commands.mjs +1791 -0
- package/dist/const.cjs +322 -0
- package/dist/const.d.cts +308 -0
- package/dist/const.d.mts +308 -0
- package/dist/const.mjs +282 -0
- package/dist/energy.cjs +142 -0
- package/dist/energy.d.cts +101 -0
- package/dist/energy.d.mts +100 -0
- package/dist/energy.mjs +142 -0
- package/dist/energyisland.cjs +38 -0
- package/dist/energyisland.mjs +37 -0
- package/dist/energyparsers.cjs +118 -0
- package/dist/energyparsers.d.cts +39 -0
- package/dist/energyparsers.d.mts +39 -0
- package/dist/energyparsers.mjs +116 -0
- package/dist/energyspecific.cjs +457 -0
- package/dist/energyspecific.d.cts +258 -0
- package/dist/energyspecific.d.mts +258 -0
- package/dist/energyspecific.mjs +451 -0
- package/dist/exceptions.cjs +1488 -0
- package/dist/exceptions.d.cts +1143 -0
- package/dist/exceptions.d.mts +1143 -0
- package/dist/exceptions.mjs +1325 -0
- package/dist/funnel.cjs +297 -0
- package/dist/funnel.d.cts +118 -0
- package/dist/funnel.d.mts +118 -0
- package/dist/funnel.mjs +292 -0
- package/dist/index.cjs +287 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.mjs +27 -0
- package/dist/log.cjs +75 -0
- package/dist/log.d.cts +4 -0
- package/dist/log.d.mts +4 -0
- package/dist/log.mjs +71 -0
- package/dist/oauth.cjs +143 -0
- package/dist/oauth.d.cts +69 -0
- package/dist/oauth.d.mts +69 -0
- package/dist/oauth.mjs +143 -0
- package/dist/partner.cjs +32 -0
- package/dist/partner.d.cts +24 -0
- package/dist/partner.d.mts +23 -0
- package/dist/partner.mjs +32 -0
- package/dist/powerwall/client.cjs +818 -0
- package/dist/powerwall/client.d.cts +297 -0
- package/dist/powerwall/client.d.mts +297 -0
- package/dist/powerwall/client.mjs +807 -0
- package/dist/powerwall/components.cjs +188 -0
- package/dist/powerwall/components.d.cts +45 -0
- package/dist/powerwall/components.d.mts +45 -0
- package/dist/powerwall/components.mjs +182 -0
- package/dist/powerwall/energysite.cjs +216 -0
- package/dist/powerwall/energysite.d.cts +104 -0
- package/dist/powerwall/energysite.d.mts +104 -0
- package/dist/powerwall/energysite.mjs +214 -0
- package/dist/powerwall/exceptions.cjs +59 -0
- package/dist/powerwall/exceptions.d.cts +38 -0
- package/dist/powerwall/exceptions.d.mts +38 -0
- package/dist/powerwall/exceptions.mjs +51 -0
- package/dist/powerwall/gateway.cjs +102 -0
- package/dist/powerwall/gateway.d.cts +57 -0
- package/dist/powerwall/gateway.d.mts +57 -0
- package/dist/powerwall/gateway.mjs +101 -0
- package/dist/powerwall/merge.cjs +163 -0
- package/dist/powerwall/merge.d.cts +63 -0
- package/dist/powerwall/merge.d.mts +63 -0
- package/dist/powerwall/merge.mjs +159 -0
- package/dist/powerwall/models.d.cts +95 -0
- package/dist/powerwall/models.d.mts +95 -0
- package/dist/powerwall/queries.cjs +17 -0
- package/dist/powerwall/queries.mjs +10 -0
- package/dist/powerwall/transport.cjs +232 -0
- package/dist/powerwall/transport.mjs +227 -0
- package/dist/powerwall.cjs +47 -0
- package/dist/powerwall.d.cts +9 -0
- package/dist/powerwall.d.mts +9 -0
- package/dist/powerwall.mjs +8 -0
- package/dist/router/base.cjs +203 -0
- package/dist/router/base.d.cts +112 -0
- package/dist/router/base.d.mts +112 -0
- package/dist/router/base.mjs +200 -0
- package/dist/router/energysite.cjs +65 -0
- package/dist/router/energysite.d.cts +47 -0
- package/dist/router/energysite.d.mts +47 -0
- package/dist/router/energysite.mjs +60 -0
- package/dist/router.cjs +13 -0
- package/dist/router.d.cts +3 -0
- package/dist/router.d.mts +3 -0
- package/dist/router.mjs +3 -0
- package/dist/signing/crypto.cjs +59 -0
- package/dist/signing/crypto.mjs +52 -0
- package/dist/signing/energy.cjs +123 -0
- package/dist/signing/energy.d.cts +45 -0
- package/dist/signing/energy.d.mts +45 -0
- package/dist/signing/energy.mjs +120 -0
- package/dist/signing/jws.cjs +229 -0
- package/dist/signing/jws.d.cts +45 -0
- package/dist/signing/jws.d.mts +45 -0
- package/dist/signing/jws.mjs +211 -0
- package/dist/signing/keys.cjs +191 -0
- package/dist/signing/keys.d.cts +21 -0
- package/dist/signing/keys.d.mts +21 -0
- package/dist/signing/keys.mjs +182 -0
- package/dist/signing/session.cjs +186 -0
- package/dist/signing/session.d.cts +106 -0
- package/dist/signing/session.d.mts +106 -0
- package/dist/signing/session.mjs +184 -0
- package/dist/tariff.cjs +319 -0
- package/dist/tariff.d.cts +40 -0
- package/dist/tariff.d.mts +40 -0
- package/dist/tariff.mjs +317 -0
- package/dist/teslafleetapi.cjs +326 -0
- package/dist/teslafleetapi.d.cts +160 -0
- package/dist/teslafleetapi.d.mts +160 -0
- package/dist/teslafleetapi.mjs +326 -0
- package/dist/teslemetry.cjs +183 -0
- package/dist/teslemetry.d.cts +113 -0
- package/dist/teslemetry.d.mts +113 -0
- package/dist/teslemetry.mjs +181 -0
- package/dist/teslemetryenergy.cjs +287 -0
- package/dist/teslemetryenergy.d.cts +154 -0
- package/dist/teslemetryenergy.d.mts +154 -0
- package/dist/teslemetryenergy.mjs +282 -0
- package/dist/teslemetryvehicle.cjs +407 -0
- package/dist/teslemetryvehicle.d.cts +238 -0
- package/dist/teslemetryvehicle.d.mts +238 -0
- package/dist/teslemetryvehicle.mjs +405 -0
- package/dist/tessie.cjs +71 -0
- package/dist/tessie.d.cts +69 -0
- package/dist/tessie.d.mts +69 -0
- package/dist/tessie.mjs +71 -0
- package/dist/tessievehicle.cjs +514 -0
- package/dist/tessievehicle.d.cts +333 -0
- package/dist/tessievehicle.d.mts +333 -0
- package/dist/tessievehicle.mjs +513 -0
- package/dist/types/commands.d.cts +28 -0
- package/dist/types/commands.d.mts +28 -0
- package/dist/types/live_status.d.cts +30 -0
- package/dist/types/live_status.d.mts +30 -0
- package/dist/types/products.d.cts +58 -0
- package/dist/types/products.d.mts +58 -0
- package/dist/types/responses.d.cts +13 -0
- package/dist/types/responses.d.mts +13 -0
- package/dist/types/site_info.d.cts +154 -0
- package/dist/types/site_info.d.mts +154 -0
- package/dist/types/vehicle.d.cts +33 -0
- package/dist/types/vehicle.d.mts +33 -0
- package/dist/types/vehicle_data.d.cts +278 -0
- package/dist/types/vehicle_data.d.mts +278 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +9 -0
- package/dist/types.d.mts +9 -0
- package/dist/types.mjs +1 -0
- package/dist/user.cjs +28 -0
- package/dist/user.d.cts +17 -0
- package/dist/user.d.mts +16 -0
- package/dist/user.mjs +28 -0
- package/dist/util.cjs +41 -0
- package/dist/util.d.cts +18 -0
- package/dist/util.d.mts +18 -0
- package/dist/util.mjs +40 -0
- package/dist/vehicle.cjs +847 -0
- package/dist/vehicle.d.cts +566 -0
- package/dist/vehicle.d.mts +565 -0
- package/dist/vehicle.mjs +847 -0
- package/dist/vehiclesigned.cjs +35 -0
- package/dist/vehiclesigned.d.cts +23 -0
- package/dist/vehiclesigned.d.mts +22 -0
- package/dist/vehiclesigned.mjs +35 -0
- package/dist/vehiclespecific.cjs +715 -0
- package/dist/vehiclespecific.d.cts +497 -0
- package/dist/vehiclespecific.d.mts +496 -0
- package/dist/vehiclespecific.mjs +715 -0
- package/package.json +178 -38
- package/dist/charging.d.ts +0 -30
- package/dist/charging.js +0 -51
- package/dist/charging.js.map +0 -1
- package/dist/commands.d.ts +0 -352
- package/dist/commands.js +0 -875
- package/dist/commands.js.map +0 -1
- package/dist/energy.d.ts +0 -94
- package/dist/energy.js +0 -125
- package/dist/energy.js.map +0 -1
- package/dist/energyspecific.d.ts +0 -77
- package/dist/energyspecific.js +0 -97
- package/dist/energyspecific.js.map +0 -1
- package/dist/helpers.d.ts +0 -2
- package/dist/helpers.js +0 -10
- package/dist/helpers.js.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
- package/dist/partner.d.ts +0 -23
- package/dist/partner.js +0 -31
- package/dist/partner.js.map +0 -1
- package/dist/signing/crypto.d.ts +0 -10
- package/dist/signing/crypto.js +0 -26
- package/dist/signing/crypto.js.map +0 -1
- package/dist/signing/errors.d.ts +0 -29
- package/dist/signing/errors.js +0 -40
- package/dist/signing/errors.js.map +0 -1
- package/dist/signing/session.d.ts +0 -69
- package/dist/signing/session.js +0 -102
- package/dist/signing/session.js.map +0 -1
- package/dist/tariff.d.ts +0 -29
- package/dist/tariff.js +0 -302
- package/dist/tariff.js.map +0 -1
- package/dist/teslafleetapi.d.ts +0 -58
- package/dist/teslafleetapi.js +0 -120
- package/dist/teslafleetapi.js.map +0 -1
- package/dist/teslemetry.d.ts +0 -29
- package/dist/teslemetry.js +0 -39
- package/dist/teslemetry.js.map +0 -1
- package/dist/tessie.d.ts +0 -23
- package/dist/tessie.js +0 -28
- package/dist/tessie.js.map +0 -1
- package/dist/types/commands.d.ts +0 -44
- package/dist/types/commands.js +0 -11
- package/dist/types/commands.js.map +0 -1
- package/dist/types/live_status.d.ts +0 -26
- package/dist/types/live_status.js +0 -2
- package/dist/types/live_status.js.map +0 -1
- package/dist/types/products.d.ts +0 -54
- package/dist/types/products.js +0 -2
- package/dist/types/products.js.map +0 -1
- package/dist/types/responses.d.ts +0 -5
- package/dist/types/responses.js +0 -2
- package/dist/types/responses.js.map +0 -1
- package/dist/types/site_info.d.ts +0 -150
- package/dist/types/site_info.js +0 -2
- package/dist/types/site_info.js.map +0 -1
- package/dist/types/vehicle.d.ts +0 -23
- package/dist/types/vehicle.js +0 -10
- package/dist/types/vehicle.js.map +0 -1
- package/dist/types/vehicle_data.d.ts +0 -274
- package/dist/types/vehicle_data.js +0 -2
- package/dist/types/vehicle_data.js.map +0 -1
- package/dist/user.d.ts +0 -16
- package/dist/user.js +0 -26
- package/dist/user.js.map +0 -1
- package/dist/vehicle.d.ts +0 -548
- package/dist/vehicle.js +0 -774
- package/dist/vehicle.js.map +0 -1
- package/dist/vehiclesigned.d.ts +0 -13
- package/dist/vehiclesigned.js +0 -19
- package/dist/vehiclesigned.js.map +0 -1
- package/dist/vehiclespecific.d.ts +0 -432
- package/dist/vehiclespecific.js +0 -601
- package/dist/vehiclespecific.js.map +0 -1
- package/src/charging.ts +0 -66
- package/src/commands.ts +0 -1134
- package/src/energy.ts +0 -217
- package/src/energyspecific.ts +0 -116
- package/src/helpers.ts +0 -11
- package/src/index.ts +0 -21
- package/src/partner.ts +0 -37
- package/src/signing/crypto.ts +0 -29
- package/src/signing/errors.ts +0 -50
- package/src/signing/session.ts +0 -132
- package/src/tariff.ts +0 -375
- package/src/teslafleetapi.ts +0 -182
- package/src/teslemetry.ts +0 -54
- package/src/tessie.ts +0 -42
- package/src/types/commands.ts +0 -62
- package/src/types/live_status.ts +0 -27
- package/src/types/products.ts +0 -61
- package/src/types/responses.ts +0 -1
- package/src/types/site_info.ts +0 -159
- package/src/types/vehicle.ts +0 -33
- package/src/types/vehicle_data.ts +0 -286
- package/src/user.ts +0 -35
- package/src/vehicle.ts +0 -886
- package/src/vehiclesigned.ts +0 -20
- package/src/vehiclespecific.ts +0 -818
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import Tessie from "./tessie.cjs";
|
|
2
|
+
import Vehicle from "./vehicle.cjs";
|
|
3
|
+
import VehicleSpecific from "./vehiclespecific.cjs";
|
|
4
|
+
/** Tessie replies at the top level, not in Fleet's `{ response }`, so Fleet's reply types do not fit. */
|
|
5
|
+
type Reply = any;
|
|
6
|
+
/** Options of `tessie_set_scheduled_departure`. Each flag defaults to `false`. */
|
|
7
|
+
export type TessieScheduledDepartureOptions = {
|
|
8
|
+
preconditioning_enabled?: boolean;
|
|
9
|
+
preconditioning_weekdays_only?: boolean;
|
|
10
|
+
off_peak_charging_enabled?: boolean;
|
|
11
|
+
off_peak_charging_weekdays_only?: boolean;
|
|
12
|
+
end_off_peak_time?: number;
|
|
13
|
+
max_attempts?: number;
|
|
14
|
+
wait_for_completion?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Options of `tessie_add_charge_schedule`. */
|
|
17
|
+
export type TessieChargeScheduleOptions = {
|
|
18
|
+
start_time?: number;
|
|
19
|
+
end_time?: number;
|
|
20
|
+
one_time?: boolean;
|
|
21
|
+
id?: number;
|
|
22
|
+
max_attempts?: number;
|
|
23
|
+
wait_for_completion?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** Options of `tessie_add_precondition_schedule`. */
|
|
26
|
+
export type TessiePreconditionScheduleOptions = {
|
|
27
|
+
one_time?: boolean;
|
|
28
|
+
id?: number;
|
|
29
|
+
max_attempts?: number;
|
|
30
|
+
wait_for_completion?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** A time range, in epoch seconds. Sent as `from` and `to`. */
|
|
33
|
+
type TimeRange = {
|
|
34
|
+
start?: number | null;
|
|
35
|
+
end?: number | null;
|
|
36
|
+
};
|
|
37
|
+
/** Options of `states`. */
|
|
38
|
+
export type TessieStatesOptions = TimeRange & {
|
|
39
|
+
interval?: number;
|
|
40
|
+
condense?: boolean;
|
|
41
|
+
timezone?: string;
|
|
42
|
+
distance_format?: string;
|
|
43
|
+
temperature_format?: string;
|
|
44
|
+
format?: string;
|
|
45
|
+
results?: number;
|
|
46
|
+
page?: number;
|
|
47
|
+
exclude?: string;
|
|
48
|
+
fields?: string;
|
|
49
|
+
};
|
|
50
|
+
/** Options of `map`. */
|
|
51
|
+
export type TessieMapOptions = {
|
|
52
|
+
width?: number;
|
|
53
|
+
height?: number;
|
|
54
|
+
zoom?: number;
|
|
55
|
+
marker_size?: string;
|
|
56
|
+
style?: string;
|
|
57
|
+
};
|
|
58
|
+
/** Filters on a place, shared by `drives`, `charges` and `idles`. */
|
|
59
|
+
type OriginFilter = {
|
|
60
|
+
origin_latitude?: number;
|
|
61
|
+
origin_longitude?: number;
|
|
62
|
+
origin_radius?: number;
|
|
63
|
+
exclude_origin?: boolean;
|
|
64
|
+
};
|
|
65
|
+
/** Page size options, shared by `drives`, `charges` and `idles`. `results` is used when `limit` is not given. */
|
|
66
|
+
type Paged = {
|
|
67
|
+
limit?: number;
|
|
68
|
+
results?: number;
|
|
69
|
+
page?: number;
|
|
70
|
+
};
|
|
71
|
+
/** Options of `drives`. */
|
|
72
|
+
export type TessieDrivesOptions = TimeRange & OriginFilter & Paged & {
|
|
73
|
+
timezone?: string;
|
|
74
|
+
distance_format?: string;
|
|
75
|
+
temperature_format?: string;
|
|
76
|
+
destination_latitude?: number;
|
|
77
|
+
destination_longitude?: number;
|
|
78
|
+
destination_radius?: number;
|
|
79
|
+
exclude_destination?: boolean;
|
|
80
|
+
tag?: string;
|
|
81
|
+
exclude_tag?: string;
|
|
82
|
+
driver_profile?: string;
|
|
83
|
+
exclude_driver_profile?: string;
|
|
84
|
+
format?: string;
|
|
85
|
+
minimum_distance?: number;
|
|
86
|
+
};
|
|
87
|
+
/** Options of `path`. */
|
|
88
|
+
export type TessiePathOptions = {
|
|
89
|
+
separate?: boolean;
|
|
90
|
+
simplify?: boolean;
|
|
91
|
+
details?: boolean;
|
|
92
|
+
timezone?: string;
|
|
93
|
+
};
|
|
94
|
+
/** Options of `charges`. */
|
|
95
|
+
export type TessieChargesOptions = TimeRange & OriginFilter & Paged & {
|
|
96
|
+
timezone?: string;
|
|
97
|
+
distance_format?: string;
|
|
98
|
+
format?: string;
|
|
99
|
+
superchargers_only?: boolean;
|
|
100
|
+
minimum_energy_added?: number;
|
|
101
|
+
};
|
|
102
|
+
/** Options of `idles`. */
|
|
103
|
+
export type TessieIdlesOptions = TimeRange & OriginFilter & Paged & {
|
|
104
|
+
timezone?: string;
|
|
105
|
+
distance_format?: string;
|
|
106
|
+
format?: string;
|
|
107
|
+
};
|
|
108
|
+
/** Options of `set_drive_tag`: `tag`, and either `drives` or both `start` and `end`. */
|
|
109
|
+
export type TessieDriveTagOptions = TimeRange & {
|
|
110
|
+
tag?: string | null;
|
|
111
|
+
drives?: number[] | null;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* A Tessie vehicle: Tessie's commands and reads, on top of the Fleet REST commands.
|
|
115
|
+
*
|
|
116
|
+
* Commands take `wait_for_completion` and `max_attempts` last, falling back to
|
|
117
|
+
* the client's. As in Python, the `tessie_*` methods take the two in the
|
|
118
|
+
* opposite order to the rest.
|
|
119
|
+
*/
|
|
120
|
+
export declare class TessieVehicle extends VehicleSpecific {
|
|
121
|
+
parent: TessieVehicles;
|
|
122
|
+
private _request;
|
|
123
|
+
/** The query string of a command, with the client's defaults for anything not given. */
|
|
124
|
+
_command_params(wait_for_completion?: boolean | null, max_attempts?: number | null, params?: Record<string, any>): Record<string, any>;
|
|
125
|
+
private _command;
|
|
126
|
+
/** Wake the vehicle from sleep. `_wait_for_completion` is accepted and ignored, as in Python. */
|
|
127
|
+
wake(_wait_for_completion?: boolean | null): Promise<Reply>;
|
|
128
|
+
/** Lock the doors. */
|
|
129
|
+
lock(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
130
|
+
/** Unlock the doors. */
|
|
131
|
+
unlock(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
132
|
+
/** Open the front trunk. */
|
|
133
|
+
activate_front_trunk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
134
|
+
/** Open or close the rear trunk. */
|
|
135
|
+
activate_rear_trunk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
136
|
+
/** Open the truck tonneau cover. */
|
|
137
|
+
open_tonneau(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
138
|
+
/** Close the truck tonneau cover. */
|
|
139
|
+
close_tonneau(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
140
|
+
/** Open all windows. */
|
|
141
|
+
vent_windows(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
142
|
+
/** Close all windows. */
|
|
143
|
+
close_windows(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
144
|
+
/** Start the climate system. */
|
|
145
|
+
start_climate(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
146
|
+
/** Stop the climate system. */
|
|
147
|
+
stop_climate(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
148
|
+
/** Set the cabin temperature. */
|
|
149
|
+
set_temperatures(temperature: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
150
|
+
/** Adjust a seat's heating level. */
|
|
151
|
+
set_seat_heat(seat: string, level: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
152
|
+
/** Adjust a seat's cooling level. */
|
|
153
|
+
set_seat_cool(seat: string, level: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
154
|
+
/** Begin defrosting. */
|
|
155
|
+
start_max_defrost(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
156
|
+
/** End defrosting. */
|
|
157
|
+
stop_max_defrost(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
158
|
+
/** Enable the heated steering wheel. */
|
|
159
|
+
start_steering_wheel_heater(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
160
|
+
/** Disable the heated steering wheel. */
|
|
161
|
+
stop_steering_wheel_heater(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
162
|
+
/** Configure overheat protection. */
|
|
163
|
+
tessie_set_cabin_overheat_protection(on: boolean, fan_only?: boolean, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
164
|
+
/** Set the overheat protection temperature. */
|
|
165
|
+
tessie_set_cop_temp(cop_temp: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
166
|
+
/** Enable or disable defense mode. */
|
|
167
|
+
tessie_set_bioweapon_mode(on: boolean, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
168
|
+
/** Configure climate keeper. */
|
|
169
|
+
tessie_set_climate_keeper_mode(mode: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
170
|
+
/** Begin a charging session. */
|
|
171
|
+
start_charging(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
172
|
+
/** End a charging session. */
|
|
173
|
+
stop_charging(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
174
|
+
/** Set the target charge percentage. */
|
|
175
|
+
set_charge_limit(percent: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
176
|
+
/** Adjust the charging amperage. */
|
|
177
|
+
tessie_set_charging_amps(amps: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
178
|
+
/** Open or unlock the charge port. */
|
|
179
|
+
open_charge_port(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
180
|
+
/** Close the charge port. */
|
|
181
|
+
close_charge_port(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
182
|
+
/** Flash the lights. */
|
|
183
|
+
flash(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
184
|
+
/** Sound the horn. */
|
|
185
|
+
honk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
186
|
+
/** Activate a HomeLink device. */
|
|
187
|
+
tessie_trigger_homelink(max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
188
|
+
/** Enable keyless driving. */
|
|
189
|
+
remote_start(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
190
|
+
/** Open the sunroof. */
|
|
191
|
+
vent_sunroof(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
192
|
+
/** Close the sunroof. */
|
|
193
|
+
close_sunroof(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
194
|
+
/** Activate Sentry Mode. */
|
|
195
|
+
enable_sentry(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
196
|
+
/** Deactivate Sentry Mode. */
|
|
197
|
+
disable_sentry(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
198
|
+
/** Activate Valet Mode. */
|
|
199
|
+
enable_valet(pin?: string | number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
200
|
+
/** Deactivate Valet Mode. */
|
|
201
|
+
disable_valet(pin?: string | number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
202
|
+
/** Schedule an update installation. */
|
|
203
|
+
tessie_schedule_software_update(in_seconds: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
204
|
+
/** Cancel a pending update. */
|
|
205
|
+
cancel_software_update(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
206
|
+
/** Configure scheduled charging. */
|
|
207
|
+
set_scheduled_charging(enable: boolean, time: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
208
|
+
/** Configure scheduled departure. */
|
|
209
|
+
tessie_set_scheduled_departure(enable: boolean, departure_time: number, options?: TessieScheduledDepartureOptions): Promise<Reply>;
|
|
210
|
+
/**
|
|
211
|
+
* Add a charging schedule.
|
|
212
|
+
* @throws Error when neither end is enabled, or an enabled end has no time.
|
|
213
|
+
*/
|
|
214
|
+
tessie_add_charge_schedule(days_of_week: string, enabled: boolean, start_enabled: boolean, end_enabled: boolean, lat: number, lon: number, options?: TessieChargeScheduleOptions): Promise<Reply>;
|
|
215
|
+
/** Delete a charging schedule. */
|
|
216
|
+
remove_charge_schedule(id: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
217
|
+
/** Add a preconditioning schedule. */
|
|
218
|
+
tessie_add_precondition_schedule(days_of_week: string, enabled: boolean, lat: number, lon: number, precondition_time: number, options?: TessiePreconditionScheduleOptions): Promise<Reply>;
|
|
219
|
+
/** Delete a preconditioning schedule. */
|
|
220
|
+
remove_precondition_schedule(id: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
221
|
+
/** Share an address or location to the vehicle. */
|
|
222
|
+
share(value: string, locale?: string, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
223
|
+
/** Trigger a novelty sound effect. */
|
|
224
|
+
remote_boombox(sound?: number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
225
|
+
/**
|
|
226
|
+
* Set the speed limit.
|
|
227
|
+
* @param limit_mph Used when `mph` is not given.
|
|
228
|
+
* @param wait_for_completion
|
|
229
|
+
* @param max_attempts
|
|
230
|
+
* @param mph
|
|
231
|
+
* @throws Error when neither `mph` nor `limit_mph` is given.
|
|
232
|
+
*/
|
|
233
|
+
set_speed_limit(limit_mph?: number | null, wait_for_completion?: boolean | null, max_attempts?: number | null, mph?: number | null): Promise<Reply>;
|
|
234
|
+
/** Activate the speed limit. */
|
|
235
|
+
enable_speed_limit(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
236
|
+
/** Deactivate the speed limit. */
|
|
237
|
+
disable_speed_limit(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
238
|
+
/** Remove the speed limit PIN. */
|
|
239
|
+
clear_speed_limit_pin(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
240
|
+
/** Activate guest mode. */
|
|
241
|
+
enable_guest(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
242
|
+
/** Deactivate guest mode. */
|
|
243
|
+
disable_guest(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
244
|
+
/** Enable Keep Accessory Power Mode. */
|
|
245
|
+
enable_keep_accessory_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
246
|
+
/** Disable Keep Accessory Power Mode. */
|
|
247
|
+
disable_keep_accessory_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
248
|
+
/** Enable Low Power Mode. */
|
|
249
|
+
enable_low_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
250
|
+
/** Disable Low Power Mode. */
|
|
251
|
+
disable_low_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
252
|
+
/** Get vehicle data. */
|
|
253
|
+
state(use_cache?: boolean): Promise<Reply>;
|
|
254
|
+
/** The same as `state`, under the Fleet name. */
|
|
255
|
+
vehicle(use_cache?: boolean): Promise<Reply>;
|
|
256
|
+
/** Get battery data. */
|
|
257
|
+
battery(): Promise<Reply>;
|
|
258
|
+
/** Get battery health data. */
|
|
259
|
+
battery_health(start?: number | null, end?: number | null, distance_format?: string | null): Promise<Reply>;
|
|
260
|
+
/** Get historical vehicle states within a timeframe. */
|
|
261
|
+
states(options?: TessieStatesOptions): Promise<Reply>;
|
|
262
|
+
/** Get coordinates, address and saved location. */
|
|
263
|
+
location(): Promise<Reply>;
|
|
264
|
+
/** Get the list of firmware-generated alerts. */
|
|
265
|
+
firmware_alerts(): Promise<Reply>;
|
|
266
|
+
/** Get a map image of the vehicle's location. */
|
|
267
|
+
map(options?: TessieMapOptions): Promise<Reply>;
|
|
268
|
+
/** Get energy use since the last charge. */
|
|
269
|
+
consumption_since_charge(): Promise<Reply>;
|
|
270
|
+
/** Get the weather forecast around the vehicle. */
|
|
271
|
+
weather(): Promise<Reply>;
|
|
272
|
+
/** Get historical drive records. */
|
|
273
|
+
drives(options?: TessieDrivesOptions): Promise<Reply>;
|
|
274
|
+
/** Get the driving route during a timeframe. */
|
|
275
|
+
path(start: number, end: number, options?: TessiePathOptions): Promise<Reply>;
|
|
276
|
+
/** Get charging history. */
|
|
277
|
+
charges(options?: TessieChargesOptions): Promise<Reply>;
|
|
278
|
+
/** Get the periods when the vehicle was idle. */
|
|
279
|
+
idles(options?: TessieIdlesOptions): Promise<Reply>;
|
|
280
|
+
/** Get the latest idle period. */
|
|
281
|
+
last_idle_state(): Promise<Reply>;
|
|
282
|
+
/** List additional authorized drivers. */
|
|
283
|
+
drivers(): Promise<Reply>;
|
|
284
|
+
/** Remove a driver's access. */
|
|
285
|
+
delete_driver(id: string | number, user_id?: number | null): Promise<Reply>;
|
|
286
|
+
/** List pending driver invitations. */
|
|
287
|
+
invitations(): Promise<Reply>;
|
|
288
|
+
/** Create a driver invitation. */
|
|
289
|
+
create_invitation(email?: string | null, role?: string | null): Promise<Reply>;
|
|
290
|
+
/** Cancel a driver invitation. */
|
|
291
|
+
revoke_invitation(id: string | number): Promise<Reply>;
|
|
292
|
+
/** Assign the subscription or charging payer role. Requires a Tesla Business account. */
|
|
293
|
+
set_roles(role: string, account_id?: string | null, federation_id?: string | null): Promise<Reply>;
|
|
294
|
+
/** Get the telemetry configuration. */
|
|
295
|
+
get_fleet_telemetry_config(): Promise<Reply>;
|
|
296
|
+
/**
|
|
297
|
+
* Set the telemetry configuration.
|
|
298
|
+
* @param config The configuration.
|
|
299
|
+
* @param fields Replaces `config.fields`.
|
|
300
|
+
*/
|
|
301
|
+
set_fleet_telemetry_config(config?: Record<string, any> | null, fields?: Record<string, any> | null): Promise<Reply>;
|
|
302
|
+
/** Remove the telemetry configuration. */
|
|
303
|
+
delete_fleet_telemetry_config(): Promise<Reply>;
|
|
304
|
+
/**
|
|
305
|
+
* Assign a tag to drives, given by id or by timeframe.
|
|
306
|
+
* @throws Error without a `tag`, or without `drives` or both `start` and `end`.
|
|
307
|
+
*/
|
|
308
|
+
set_drive_tag({ start, end, tag, drives }: TessieDriveTagOptions): Promise<Reply>;
|
|
309
|
+
/** Record a charge's cost. */
|
|
310
|
+
set_charge_cost(charge_id: number, cost: number | null, currency?: string | null): Promise<Reply>;
|
|
311
|
+
/** Get the current tire pressure readings. */
|
|
312
|
+
tire_pressure(pressure_format?: string | null, start?: number | null, end?: number | null): Promise<Reply>;
|
|
313
|
+
/** Get the vehicle's operational status. */
|
|
314
|
+
vehicle_status(): Promise<Reply>;
|
|
315
|
+
/** Get license plate information. */
|
|
316
|
+
plate(): Promise<Reply>;
|
|
317
|
+
/** Update license plate information. */
|
|
318
|
+
update_plate(plate: string, state?: string | null): Promise<Reply>;
|
|
319
|
+
}
|
|
320
|
+
/** Creates `TessieVehicle`s. Tessie cannot use the Fleet API directly, so `create` is the only factory. */
|
|
321
|
+
export declare class TessieVehicles extends Vehicle {
|
|
322
|
+
/** Class `create` instantiates; a subclass overrides it to supply its own vehicle type. */
|
|
323
|
+
static Vehicle: new (parent: Vehicle, vin: string) => TessieVehicle;
|
|
324
|
+
parent: Tessie;
|
|
325
|
+
byVin: Map<string, TessieVehicle>;
|
|
326
|
+
readonly createFleet: never;
|
|
327
|
+
readonly createSigned: never;
|
|
328
|
+
readonly specific: never;
|
|
329
|
+
readonly specificSigned: never;
|
|
330
|
+
/** Creates a vehicle, and records it by VIN. */
|
|
331
|
+
create(vin: string): TessieVehicle;
|
|
332
|
+
}
|
|
333
|
+
export {};
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import Tessie from "./tessie.mjs";
|
|
2
|
+
import Vehicle from "./vehicle.mjs";
|
|
3
|
+
import VehicleSpecific from "./vehiclespecific.mjs";
|
|
4
|
+
/** Tessie replies at the top level, not in Fleet's `{ response }`, so Fleet's reply types do not fit. */
|
|
5
|
+
type Reply = any;
|
|
6
|
+
/** Options of `tessie_set_scheduled_departure`. Each flag defaults to `false`. */
|
|
7
|
+
export type TessieScheduledDepartureOptions = {
|
|
8
|
+
preconditioning_enabled?: boolean;
|
|
9
|
+
preconditioning_weekdays_only?: boolean;
|
|
10
|
+
off_peak_charging_enabled?: boolean;
|
|
11
|
+
off_peak_charging_weekdays_only?: boolean;
|
|
12
|
+
end_off_peak_time?: number;
|
|
13
|
+
max_attempts?: number;
|
|
14
|
+
wait_for_completion?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Options of `tessie_add_charge_schedule`. */
|
|
17
|
+
export type TessieChargeScheduleOptions = {
|
|
18
|
+
start_time?: number;
|
|
19
|
+
end_time?: number;
|
|
20
|
+
one_time?: boolean;
|
|
21
|
+
id?: number;
|
|
22
|
+
max_attempts?: number;
|
|
23
|
+
wait_for_completion?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** Options of `tessie_add_precondition_schedule`. */
|
|
26
|
+
export type TessiePreconditionScheduleOptions = {
|
|
27
|
+
one_time?: boolean;
|
|
28
|
+
id?: number;
|
|
29
|
+
max_attempts?: number;
|
|
30
|
+
wait_for_completion?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** A time range, in epoch seconds. Sent as `from` and `to`. */
|
|
33
|
+
type TimeRange = {
|
|
34
|
+
start?: number | null;
|
|
35
|
+
end?: number | null;
|
|
36
|
+
};
|
|
37
|
+
/** Options of `states`. */
|
|
38
|
+
export type TessieStatesOptions = TimeRange & {
|
|
39
|
+
interval?: number;
|
|
40
|
+
condense?: boolean;
|
|
41
|
+
timezone?: string;
|
|
42
|
+
distance_format?: string;
|
|
43
|
+
temperature_format?: string;
|
|
44
|
+
format?: string;
|
|
45
|
+
results?: number;
|
|
46
|
+
page?: number;
|
|
47
|
+
exclude?: string;
|
|
48
|
+
fields?: string;
|
|
49
|
+
};
|
|
50
|
+
/** Options of `map`. */
|
|
51
|
+
export type TessieMapOptions = {
|
|
52
|
+
width?: number;
|
|
53
|
+
height?: number;
|
|
54
|
+
zoom?: number;
|
|
55
|
+
marker_size?: string;
|
|
56
|
+
style?: string;
|
|
57
|
+
};
|
|
58
|
+
/** Filters on a place, shared by `drives`, `charges` and `idles`. */
|
|
59
|
+
type OriginFilter = {
|
|
60
|
+
origin_latitude?: number;
|
|
61
|
+
origin_longitude?: number;
|
|
62
|
+
origin_radius?: number;
|
|
63
|
+
exclude_origin?: boolean;
|
|
64
|
+
};
|
|
65
|
+
/** Page size options, shared by `drives`, `charges` and `idles`. `results` is used when `limit` is not given. */
|
|
66
|
+
type Paged = {
|
|
67
|
+
limit?: number;
|
|
68
|
+
results?: number;
|
|
69
|
+
page?: number;
|
|
70
|
+
};
|
|
71
|
+
/** Options of `drives`. */
|
|
72
|
+
export type TessieDrivesOptions = TimeRange & OriginFilter & Paged & {
|
|
73
|
+
timezone?: string;
|
|
74
|
+
distance_format?: string;
|
|
75
|
+
temperature_format?: string;
|
|
76
|
+
destination_latitude?: number;
|
|
77
|
+
destination_longitude?: number;
|
|
78
|
+
destination_radius?: number;
|
|
79
|
+
exclude_destination?: boolean;
|
|
80
|
+
tag?: string;
|
|
81
|
+
exclude_tag?: string;
|
|
82
|
+
driver_profile?: string;
|
|
83
|
+
exclude_driver_profile?: string;
|
|
84
|
+
format?: string;
|
|
85
|
+
minimum_distance?: number;
|
|
86
|
+
};
|
|
87
|
+
/** Options of `path`. */
|
|
88
|
+
export type TessiePathOptions = {
|
|
89
|
+
separate?: boolean;
|
|
90
|
+
simplify?: boolean;
|
|
91
|
+
details?: boolean;
|
|
92
|
+
timezone?: string;
|
|
93
|
+
};
|
|
94
|
+
/** Options of `charges`. */
|
|
95
|
+
export type TessieChargesOptions = TimeRange & OriginFilter & Paged & {
|
|
96
|
+
timezone?: string;
|
|
97
|
+
distance_format?: string;
|
|
98
|
+
format?: string;
|
|
99
|
+
superchargers_only?: boolean;
|
|
100
|
+
minimum_energy_added?: number;
|
|
101
|
+
};
|
|
102
|
+
/** Options of `idles`. */
|
|
103
|
+
export type TessieIdlesOptions = TimeRange & OriginFilter & Paged & {
|
|
104
|
+
timezone?: string;
|
|
105
|
+
distance_format?: string;
|
|
106
|
+
format?: string;
|
|
107
|
+
};
|
|
108
|
+
/** Options of `set_drive_tag`: `tag`, and either `drives` or both `start` and `end`. */
|
|
109
|
+
export type TessieDriveTagOptions = TimeRange & {
|
|
110
|
+
tag?: string | null;
|
|
111
|
+
drives?: number[] | null;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* A Tessie vehicle: Tessie's commands and reads, on top of the Fleet REST commands.
|
|
115
|
+
*
|
|
116
|
+
* Commands take `wait_for_completion` and `max_attempts` last, falling back to
|
|
117
|
+
* the client's. As in Python, the `tessie_*` methods take the two in the
|
|
118
|
+
* opposite order to the rest.
|
|
119
|
+
*/
|
|
120
|
+
export declare class TessieVehicle extends VehicleSpecific {
|
|
121
|
+
parent: TessieVehicles;
|
|
122
|
+
private _request;
|
|
123
|
+
/** The query string of a command, with the client's defaults for anything not given. */
|
|
124
|
+
_command_params(wait_for_completion?: boolean | null, max_attempts?: number | null, params?: Record<string, any>): Record<string, any>;
|
|
125
|
+
private _command;
|
|
126
|
+
/** Wake the vehicle from sleep. `_wait_for_completion` is accepted and ignored, as in Python. */
|
|
127
|
+
wake(_wait_for_completion?: boolean | null): Promise<Reply>;
|
|
128
|
+
/** Lock the doors. */
|
|
129
|
+
lock(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
130
|
+
/** Unlock the doors. */
|
|
131
|
+
unlock(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
132
|
+
/** Open the front trunk. */
|
|
133
|
+
activate_front_trunk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
134
|
+
/** Open or close the rear trunk. */
|
|
135
|
+
activate_rear_trunk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
136
|
+
/** Open the truck tonneau cover. */
|
|
137
|
+
open_tonneau(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
138
|
+
/** Close the truck tonneau cover. */
|
|
139
|
+
close_tonneau(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
140
|
+
/** Open all windows. */
|
|
141
|
+
vent_windows(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
142
|
+
/** Close all windows. */
|
|
143
|
+
close_windows(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
144
|
+
/** Start the climate system. */
|
|
145
|
+
start_climate(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
146
|
+
/** Stop the climate system. */
|
|
147
|
+
stop_climate(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
148
|
+
/** Set the cabin temperature. */
|
|
149
|
+
set_temperatures(temperature: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
150
|
+
/** Adjust a seat's heating level. */
|
|
151
|
+
set_seat_heat(seat: string, level: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
152
|
+
/** Adjust a seat's cooling level. */
|
|
153
|
+
set_seat_cool(seat: string, level: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
154
|
+
/** Begin defrosting. */
|
|
155
|
+
start_max_defrost(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
156
|
+
/** End defrosting. */
|
|
157
|
+
stop_max_defrost(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
158
|
+
/** Enable the heated steering wheel. */
|
|
159
|
+
start_steering_wheel_heater(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
160
|
+
/** Disable the heated steering wheel. */
|
|
161
|
+
stop_steering_wheel_heater(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
162
|
+
/** Configure overheat protection. */
|
|
163
|
+
tessie_set_cabin_overheat_protection(on: boolean, fan_only?: boolean, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
164
|
+
/** Set the overheat protection temperature. */
|
|
165
|
+
tessie_set_cop_temp(cop_temp: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
166
|
+
/** Enable or disable defense mode. */
|
|
167
|
+
tessie_set_bioweapon_mode(on: boolean, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
168
|
+
/** Configure climate keeper. */
|
|
169
|
+
tessie_set_climate_keeper_mode(mode: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
170
|
+
/** Begin a charging session. */
|
|
171
|
+
start_charging(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
172
|
+
/** End a charging session. */
|
|
173
|
+
stop_charging(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
174
|
+
/** Set the target charge percentage. */
|
|
175
|
+
set_charge_limit(percent: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
176
|
+
/** Adjust the charging amperage. */
|
|
177
|
+
tessie_set_charging_amps(amps: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
178
|
+
/** Open or unlock the charge port. */
|
|
179
|
+
open_charge_port(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
180
|
+
/** Close the charge port. */
|
|
181
|
+
close_charge_port(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
182
|
+
/** Flash the lights. */
|
|
183
|
+
flash(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
184
|
+
/** Sound the horn. */
|
|
185
|
+
honk(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
186
|
+
/** Activate a HomeLink device. */
|
|
187
|
+
tessie_trigger_homelink(max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
188
|
+
/** Enable keyless driving. */
|
|
189
|
+
remote_start(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
190
|
+
/** Open the sunroof. */
|
|
191
|
+
vent_sunroof(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
192
|
+
/** Close the sunroof. */
|
|
193
|
+
close_sunroof(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
194
|
+
/** Activate Sentry Mode. */
|
|
195
|
+
enable_sentry(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
196
|
+
/** Deactivate Sentry Mode. */
|
|
197
|
+
disable_sentry(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
198
|
+
/** Activate Valet Mode. */
|
|
199
|
+
enable_valet(pin?: string | number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
200
|
+
/** Deactivate Valet Mode. */
|
|
201
|
+
disable_valet(pin?: string | number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
202
|
+
/** Schedule an update installation. */
|
|
203
|
+
tessie_schedule_software_update(in_seconds: number, max_attempts?: number | null, wait_for_completion?: boolean | null): Promise<Reply>;
|
|
204
|
+
/** Cancel a pending update. */
|
|
205
|
+
cancel_software_update(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
206
|
+
/** Configure scheduled charging. */
|
|
207
|
+
set_scheduled_charging(enable: boolean, time: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
208
|
+
/** Configure scheduled departure. */
|
|
209
|
+
tessie_set_scheduled_departure(enable: boolean, departure_time: number, options?: TessieScheduledDepartureOptions): Promise<Reply>;
|
|
210
|
+
/**
|
|
211
|
+
* Add a charging schedule.
|
|
212
|
+
* @throws Error when neither end is enabled, or an enabled end has no time.
|
|
213
|
+
*/
|
|
214
|
+
tessie_add_charge_schedule(days_of_week: string, enabled: boolean, start_enabled: boolean, end_enabled: boolean, lat: number, lon: number, options?: TessieChargeScheduleOptions): Promise<Reply>;
|
|
215
|
+
/** Delete a charging schedule. */
|
|
216
|
+
remove_charge_schedule(id: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
217
|
+
/** Add a preconditioning schedule. */
|
|
218
|
+
tessie_add_precondition_schedule(days_of_week: string, enabled: boolean, lat: number, lon: number, precondition_time: number, options?: TessiePreconditionScheduleOptions): Promise<Reply>;
|
|
219
|
+
/** Delete a preconditioning schedule. */
|
|
220
|
+
remove_precondition_schedule(id: number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
221
|
+
/** Share an address or location to the vehicle. */
|
|
222
|
+
share(value: string, locale?: string, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
223
|
+
/** Trigger a novelty sound effect. */
|
|
224
|
+
remote_boombox(sound?: number | null, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
225
|
+
/**
|
|
226
|
+
* Set the speed limit.
|
|
227
|
+
* @param limit_mph Used when `mph` is not given.
|
|
228
|
+
* @param wait_for_completion
|
|
229
|
+
* @param max_attempts
|
|
230
|
+
* @param mph
|
|
231
|
+
* @throws Error when neither `mph` nor `limit_mph` is given.
|
|
232
|
+
*/
|
|
233
|
+
set_speed_limit(limit_mph?: number | null, wait_for_completion?: boolean | null, max_attempts?: number | null, mph?: number | null): Promise<Reply>;
|
|
234
|
+
/** Activate the speed limit. */
|
|
235
|
+
enable_speed_limit(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
236
|
+
/** Deactivate the speed limit. */
|
|
237
|
+
disable_speed_limit(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
238
|
+
/** Remove the speed limit PIN. */
|
|
239
|
+
clear_speed_limit_pin(pin: string | number, wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
240
|
+
/** Activate guest mode. */
|
|
241
|
+
enable_guest(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
242
|
+
/** Deactivate guest mode. */
|
|
243
|
+
disable_guest(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
244
|
+
/** Enable Keep Accessory Power Mode. */
|
|
245
|
+
enable_keep_accessory_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
246
|
+
/** Disable Keep Accessory Power Mode. */
|
|
247
|
+
disable_keep_accessory_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
248
|
+
/** Enable Low Power Mode. */
|
|
249
|
+
enable_low_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
250
|
+
/** Disable Low Power Mode. */
|
|
251
|
+
disable_low_power_mode(wait_for_completion?: boolean | null, max_attempts?: number | null): Promise<Reply>;
|
|
252
|
+
/** Get vehicle data. */
|
|
253
|
+
state(use_cache?: boolean): Promise<Reply>;
|
|
254
|
+
/** The same as `state`, under the Fleet name. */
|
|
255
|
+
vehicle(use_cache?: boolean): Promise<Reply>;
|
|
256
|
+
/** Get battery data. */
|
|
257
|
+
battery(): Promise<Reply>;
|
|
258
|
+
/** Get battery health data. */
|
|
259
|
+
battery_health(start?: number | null, end?: number | null, distance_format?: string | null): Promise<Reply>;
|
|
260
|
+
/** Get historical vehicle states within a timeframe. */
|
|
261
|
+
states(options?: TessieStatesOptions): Promise<Reply>;
|
|
262
|
+
/** Get coordinates, address and saved location. */
|
|
263
|
+
location(): Promise<Reply>;
|
|
264
|
+
/** Get the list of firmware-generated alerts. */
|
|
265
|
+
firmware_alerts(): Promise<Reply>;
|
|
266
|
+
/** Get a map image of the vehicle's location. */
|
|
267
|
+
map(options?: TessieMapOptions): Promise<Reply>;
|
|
268
|
+
/** Get energy use since the last charge. */
|
|
269
|
+
consumption_since_charge(): Promise<Reply>;
|
|
270
|
+
/** Get the weather forecast around the vehicle. */
|
|
271
|
+
weather(): Promise<Reply>;
|
|
272
|
+
/** Get historical drive records. */
|
|
273
|
+
drives(options?: TessieDrivesOptions): Promise<Reply>;
|
|
274
|
+
/** Get the driving route during a timeframe. */
|
|
275
|
+
path(start: number, end: number, options?: TessiePathOptions): Promise<Reply>;
|
|
276
|
+
/** Get charging history. */
|
|
277
|
+
charges(options?: TessieChargesOptions): Promise<Reply>;
|
|
278
|
+
/** Get the periods when the vehicle was idle. */
|
|
279
|
+
idles(options?: TessieIdlesOptions): Promise<Reply>;
|
|
280
|
+
/** Get the latest idle period. */
|
|
281
|
+
last_idle_state(): Promise<Reply>;
|
|
282
|
+
/** List additional authorized drivers. */
|
|
283
|
+
drivers(): Promise<Reply>;
|
|
284
|
+
/** Remove a driver's access. */
|
|
285
|
+
delete_driver(id: string | number, user_id?: number | null): Promise<Reply>;
|
|
286
|
+
/** List pending driver invitations. */
|
|
287
|
+
invitations(): Promise<Reply>;
|
|
288
|
+
/** Create a driver invitation. */
|
|
289
|
+
create_invitation(email?: string | null, role?: string | null): Promise<Reply>;
|
|
290
|
+
/** Cancel a driver invitation. */
|
|
291
|
+
revoke_invitation(id: string | number): Promise<Reply>;
|
|
292
|
+
/** Assign the subscription or charging payer role. Requires a Tesla Business account. */
|
|
293
|
+
set_roles(role: string, account_id?: string | null, federation_id?: string | null): Promise<Reply>;
|
|
294
|
+
/** Get the telemetry configuration. */
|
|
295
|
+
get_fleet_telemetry_config(): Promise<Reply>;
|
|
296
|
+
/**
|
|
297
|
+
* Set the telemetry configuration.
|
|
298
|
+
* @param config The configuration.
|
|
299
|
+
* @param fields Replaces `config.fields`.
|
|
300
|
+
*/
|
|
301
|
+
set_fleet_telemetry_config(config?: Record<string, any> | null, fields?: Record<string, any> | null): Promise<Reply>;
|
|
302
|
+
/** Remove the telemetry configuration. */
|
|
303
|
+
delete_fleet_telemetry_config(): Promise<Reply>;
|
|
304
|
+
/**
|
|
305
|
+
* Assign a tag to drives, given by id or by timeframe.
|
|
306
|
+
* @throws Error without a `tag`, or without `drives` or both `start` and `end`.
|
|
307
|
+
*/
|
|
308
|
+
set_drive_tag({ start, end, tag, drives }: TessieDriveTagOptions): Promise<Reply>;
|
|
309
|
+
/** Record a charge's cost. */
|
|
310
|
+
set_charge_cost(charge_id: number, cost: number | null, currency?: string | null): Promise<Reply>;
|
|
311
|
+
/** Get the current tire pressure readings. */
|
|
312
|
+
tire_pressure(pressure_format?: string | null, start?: number | null, end?: number | null): Promise<Reply>;
|
|
313
|
+
/** Get the vehicle's operational status. */
|
|
314
|
+
vehicle_status(): Promise<Reply>;
|
|
315
|
+
/** Get license plate information. */
|
|
316
|
+
plate(): Promise<Reply>;
|
|
317
|
+
/** Update license plate information. */
|
|
318
|
+
update_plate(plate: string, state?: string | null): Promise<Reply>;
|
|
319
|
+
}
|
|
320
|
+
/** Creates `TessieVehicle`s. Tessie cannot use the Fleet API directly, so `create` is the only factory. */
|
|
321
|
+
export declare class TessieVehicles extends Vehicle {
|
|
322
|
+
/** Class `create` instantiates; a subclass overrides it to supply its own vehicle type. */
|
|
323
|
+
static Vehicle: new (parent: Vehicle, vin: string) => TessieVehicle;
|
|
324
|
+
parent: Tessie;
|
|
325
|
+
byVin: Map<string, TessieVehicle>;
|
|
326
|
+
readonly createFleet: never;
|
|
327
|
+
readonly createSigned: never;
|
|
328
|
+
readonly specific: never;
|
|
329
|
+
readonly specificSigned: never;
|
|
330
|
+
/** Creates a vehicle, and records it by VIN. */
|
|
331
|
+
create(vin: string): TessieVehicle;
|
|
332
|
+
}
|
|
333
|
+
export {};
|