tesla-fleet-api 0.0.3 → 0.0.5

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.
@@ -0,0 +1,8 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ export default class Charging {
3
+ parent: TeslaFleetApi;
4
+ constructor(parent: TeslaFleetApi);
5
+ history(vin?: string, startTime?: string, endTime?: string, pageNo?: number, pageSize?: number, sortBy?: string, sortOrder?: string): Promise<Record<string, any>>;
6
+ invoice(id: string): Promise<Record<string, any>>;
7
+ sessions(vin?: string, date_from?: string, date_to?: string, limit?: number, offset?: number): Promise<Record<string, any>>;
8
+ }
@@ -0,0 +1,17 @@
1
+ import EnergySpecific from "./energyspecific.js";
2
+ import TeslaFleetApi from "./teslafleetapi.js";
3
+ export default class Energy {
4
+ parent: TeslaFleetApi;
5
+ constructor(parent: TeslaFleetApi);
6
+ specific(energy_site_id: number): EnergySpecific;
7
+ backup(energy_site_id: number, backup_reserve_percent: number): Promise<Record<string, any>>;
8
+ backup_history(energy_site_id: number, kind: string, start_date: string, end_date: string, period: string, time_zone: string): Promise<Record<string, any>>;
9
+ charge_history(energy_site_id: number, kind: string, start_date: string, end_date: string, time_zone: string): Promise<Record<string, any>>;
10
+ energy_history(energy_site_id: number, kind: string, start_date: string, end_date: string, period: string, time_zone: string): Promise<Record<string, any>>;
11
+ grid_import_export(energy_site_id: number, disallow_charge_from_grid_with_solar_installed?: boolean | null, customer_preferred_export_rule?: string | null): Promise<Record<string, any>>;
12
+ live_status(energy_site_id: number): Promise<Record<string, any>>;
13
+ off_grid_vehicle_charging_reserve(energy_site_id: number, off_grid_vehicle_charging_reserve_percent: number): Promise<Record<string, any>>;
14
+ operation(energy_site_id: number, default_real_mode: string): Promise<Record<string, any>>;
15
+ site_info(energy_site_id: number): Promise<Record<string, any>>;
16
+ storm_mode(energy_site_id: number, enabled: boolean): Promise<Record<string, any>>;
17
+ }
@@ -0,0 +1,16 @@
1
+ import Energy from "./energy.js";
2
+ export default class EnergySpecific {
3
+ parent: Energy;
4
+ energy_site_id: number;
5
+ constructor(parent: Energy, energy_site_id: number);
6
+ backup(backup_reserve_percent: number): Promise<Record<string, any>>;
7
+ backup_history(kind: string, start_date: string, end_date: string, period: string, time_zone: string): Promise<Record<string, any>>;
8
+ charge_history(kind: string, start_date: string, end_date: string, time_zone: string): Promise<Record<string, any>>;
9
+ energy_history(kind: string, start_date: string, end_date: string, period: string, time_zone: string): Promise<Record<string, any>>;
10
+ grid_import_export(disallow_charge_from_grid_with_solar_installed?: boolean | null, customer_preferred_export_rule?: string | null): Promise<Record<string, any>>;
11
+ live_status(): Promise<Record<string, any>>;
12
+ off_grid_vehicle_charging_reserve(off_grid_vehicle_charging_reserve_percent: number): Promise<Record<string, any>>;
13
+ operation(default_real_mode: string): Promise<Record<string, any>>;
14
+ site_info(): Promise<Record<string, any>>;
15
+ storm_mode(enabled: boolean): Promise<Record<string, any>>;
16
+ }
@@ -0,0 +1,4 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ import Teslemetry from "./teslemetry.js";
3
+ import Tessie from "./tessie.js";
4
+ export { TeslaFleetApi, Teslemetry, Tessie };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import TeslaFleetApi from "./teslafleetapi.js";
2
- import Telemetry from "./teslemetry.js";
2
+ import Teslemetry from "./teslemetry.js";
3
3
  import Tessie from "./tessie.js";
4
- export { Telemetry, TeslaFleetApi, Tessie };
4
+ export { TeslaFleetApi, Teslemetry, Tessie };
5
5
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,oBAAoB,CAAC;AAC/C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ export default class Partner {
3
+ parent: TeslaFleetApi;
4
+ constructor(parent: TeslaFleetApi);
5
+ public_key(domain?: string | null): Promise<Record<string, any>>;
6
+ register(domain: string): Promise<Record<string, any>>;
7
+ fleet_telemetry_errors(domain: string): Promise<Record<string, any>>;
8
+ }
@@ -0,0 +1,28 @@
1
+ import Charging from "./charging.js";
2
+ import Energy from "./energy.js";
3
+ import Partner from "./partner.js";
4
+ import User from "./user.js";
5
+ import Vehicle from "./vehicle.js";
6
+ import { Method } from "./types.js";
7
+ export type Region = "na" | "eu" | "cn";
8
+ export default class TeslaFleetApi {
9
+ server: string | null;
10
+ accessToken: string | null;
11
+ charging?: Charging;
12
+ energy?: Energy;
13
+ partner?: Partner;
14
+ user?: User;
15
+ vehicle?: Vehicle;
16
+ constructor(options: {
17
+ accessToken?: string;
18
+ region?: Region;
19
+ server?: string;
20
+ chargingScope?: boolean;
21
+ energyScope?: boolean;
22
+ partnerScope?: boolean;
23
+ userScope?: boolean;
24
+ vehicleScope?: boolean;
25
+ });
26
+ _request(method: Method, path: string, params?: Record<string, any> | null, json?: Record<string, any> | null): Promise<any>;
27
+ products(): Promise<Record<string, any>>;
28
+ }
@@ -0,0 +1,8 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ type Region = "na" | "eu" | "api";
3
+ export default class Telemetry extends TeslaFleetApi {
4
+ constructor(accessToken: string, region?: Region);
5
+ test(): Promise<any>;
6
+ metadata(update_region?: boolean): Promise<void>;
7
+ }
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ import { Scope } from "./types.js";
3
+ export default class Telemetry extends TeslaFleetApi {
4
+ constructor(accessToken: string);
5
+ tesla_scopes(): Promise<Scope[]>;
6
+ }
@@ -0,0 +1,41 @@
1
+ export type Scope = "user_data" | "vehicle_device_data" | "vehicle_cmds" | "vehicle_charging_cmds" | "energy_device_data" | "energy_cmds" | "offline_access" | "openid";
2
+ export type Method = "GET" | "POST" | "PUT" | "DELETE";
3
+ export interface RequestFunction {
4
+ (method: Method, endpoint: string, data?: Record<string, any>): Promise<Record<string, any>>;
5
+ }
6
+ export type Trunk = "front" | "rear";
7
+ export declare const Seats: {
8
+ FRONT_LEFT: number;
9
+ FRONT_RIGHT: number;
10
+ REAR_LEFT: number;
11
+ REAR_CENTER: number;
12
+ REAR_RIGHT: number;
13
+ THIRD_ROW_LEFT: number;
14
+ THIRD_ROW_RIGHT: number;
15
+ };
16
+ export type Seat = keyof typeof Seats;
17
+ export type Level = 0 | 1 | 2 | 3;
18
+ export declare const ClimateModes: {
19
+ Off: number;
20
+ Keep: number;
21
+ Dog: number;
22
+ Camp: number;
23
+ };
24
+ export type ClimateMode = keyof typeof ClimateModes;
25
+ export type VehicleDataEndpoint = "charge_state" | "climate_state" | "closures_state" | "drive_state" | "gui_settings" | "location_data" | "vehicle_config" | "vehicle_state" | "vehicle_data_combo";
26
+ export type AlertTypes = "customer" | "service";
27
+ export interface FleetTelemetryConfig {
28
+ vins: string[];
29
+ config: {
30
+ hostname: string;
31
+ ca: string;
32
+ fields: {
33
+ [key: string]: {
34
+ interval_seconds: number;
35
+ };
36
+ };
37
+ alert_types: AlertTypes[];
38
+ exp: number;
39
+ port: number;
40
+ };
41
+ }
package/dist/user.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ export default class User {
3
+ parent: TeslaFleetApi;
4
+ constructor(parent: TeslaFleetApi);
5
+ backup_key(): Promise<Record<string, any>>;
6
+ feature_config(): Promise<Record<string, any>>;
7
+ me(): Promise<Record<string, any>>;
8
+ orders(): Promise<Record<string, any>>;
9
+ region(): Promise<Record<string, any>>;
10
+ }
@@ -0,0 +1,94 @@
1
+ import TeslaFleetApi from "./teslafleetapi.js";
2
+ import { ClimateMode, FleetTelemetryConfig, Level, Seat, Trunk, VehicleDataEndpoint } from "./types.js";
3
+ import VehicleSpecific from "./vehiclespecific.js";
4
+ export default class Vehicle {
5
+ parent: TeslaFleetApi;
6
+ constructor(parent: TeslaFleetApi);
7
+ specific(vin: string): VehicleSpecific;
8
+ actuate_truck(vehicle_tag: string | number, which_trunk: Trunk): Promise<Record<string, any>>;
9
+ adjust_volume(vehicle_tag: string | number, volume: number): Promise<Record<string, any>>;
10
+ auto_conditioning_start(vehicle_tag: string | number): Promise<Record<string, any>>;
11
+ auto_conditioning_stop(vehicle_tag: string | number): Promise<Record<string, any>>;
12
+ cancel_software_update(vehicle_tag: string | number): Promise<Record<string, any>>;
13
+ charge_max_range(vehicle_tag: string | number): Promise<Record<string, any>>;
14
+ charge_port_door_close(vehicle_tag: string | number): Promise<Record<string, any>>;
15
+ charge_port_door_open(vehicle_tag: string | number): Promise<Record<string, any>>;
16
+ charge_standard(vehicle_tag: string | number): Promise<Record<string, any>>;
17
+ charge_start(vehicle_tag: string | number): Promise<Record<string, any>>;
18
+ charge_stop(vehicle_tag: string | number): Promise<Record<string, any>>;
19
+ clear_pin_to_drive_admin(vehicle_tag: string | number): Promise<Record<string, any>>;
20
+ door_lock(vehicle_tag: string | number): Promise<Record<string, any>>;
21
+ door_unlock(vehicle_tag: string | number): Promise<Record<string, any>>;
22
+ erase_user_data(vehicle_tag: string | number): Promise<Record<string, any>>;
23
+ flash_lights(vehicle_tag: string | number): Promise<Record<string, any>>;
24
+ guest_mode(vehicle_tag: string | number, enable: boolean): Promise<Record<string, any>>;
25
+ honk_horn(vehicle_tag: string | number): Promise<Record<string, any>>;
26
+ media_next_fav(vehicle_tag: string | number): Promise<Record<string, any>>;
27
+ media_next_track(vehicle_tag: string | number): Promise<Record<string, any>>;
28
+ media_prev_fav(vehicle_tag: string | number): Promise<Record<string, any>>;
29
+ media_prev_track(vehicle_tag: string | number): Promise<Record<string, any>>;
30
+ media_toggle_playback(vehicle_tag: string | number): Promise<Record<string, any>>;
31
+ media_volume_down(vehicle_tag: string | number): Promise<Record<string, any>>;
32
+ navigation_gps_request(vehicle_tag: string | number, lat: number, lon: number, order?: number): Promise<Record<string, any>>;
33
+ navigation_request(vehicle_tag: string | number, value: string, locale: string, type?: string): Promise<Record<string, any>>;
34
+ navigation_sc_request(vehicle_tag: string | number, id: number, order?: number): Promise<Record<string, any>>;
35
+ remote_auto_seat_climate_request(vehicle_tag: string | number, auto_seat_position: Seat | number, auto_climate_on: boolean): Promise<Record<string, any>>;
36
+ remote_auto_steering_wheel_heat_climate_request(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
37
+ remote_boombox(vehicle_tag: string | number, sound?: number): Promise<Record<string, any>>;
38
+ remote_seat_cooler_request(vehicle_tag: string | number, seat_position: Seat | number, seat_cooler_level: Level): Promise<Record<string, any>>;
39
+ remote_seat_heater_request(vehicle_tag: string | number, seat_position: Seat | number, seat_heater_level: Level): Promise<Record<string, any>>;
40
+ remote_start_drive(vehicle_tag: string | number): Promise<Record<string, any>>;
41
+ remote_steering_wheel_heat_level_request(vehicle_tag: string | number, level: Level): Promise<Record<string, any>>;
42
+ remote_steering_wheel_heater_request(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
43
+ reset_pin_to_drive_pin(vehicle_tag: string | number): Promise<Record<string, any>>;
44
+ reset_valet_pin(vehicle_tag: string | number): Promise<Record<string, any>>;
45
+ schedule_software_update(vehicle_tag: string | number, offset_sec: number): Promise<Record<string, any>>;
46
+ set_bioweapon_mode(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<Record<string, any>>;
47
+ set_cabin_overheat_protection(vehicle_tag: string | number, on: boolean, fan_only: boolean): Promise<Record<string, any>>;
48
+ set_charge_limit(vehicle_tag: string | number, percent: number): Promise<Record<string, any>>;
49
+ set_charging_amps(vehicle_tag: string | number, charging_amps: number): Promise<Record<string, any>>;
50
+ set_climate_keeper_mode(vehicle_tag: string | number, climate_keeper_mode: number | ClimateMode): Promise<Record<string, any>>;
51
+ set_cop_temp(vehicle_tag: string | number, cop_temp: 0 | 1 | 2 | 30 | 35 | 40 | 90 | 95 | 100): Promise<Record<string, any>>;
52
+ set_pin_to_drive(vehicle_tag: string | number, on: boolean, password: string | number): Promise<Record<string, any>>;
53
+ set_preconditioning_max(vehicle_tag: string | number, on: boolean, manual_override: boolean): Promise<Record<string, any>>;
54
+ set_scheduled_charging(vehicle_tag: string | number, enable: boolean, time: number): Promise<Record<string, any>>;
55
+ set_scheduled_departure(vehicle_tag: string | number, enable?: boolean, preconditioning_enabled?: boolean, preconditioning_weekdays_only?: boolean, departure_time?: number, off_peak_charging_enabled?: boolean, off_peak_charging_weekdays_only?: boolean, end_off_peak_time?: number): Promise<Record<string, any>>;
56
+ set_sentry_mode(vehicle_tag: string | number, on: boolean): Promise<Record<string, any>>;
57
+ set_temps(vehicle_tag: string | number, driver_temp: number, passenger_temp: number): Promise<Record<string, any>>;
58
+ set_valet_mode(vehicle_tag: string | number, on: boolean, password: string | number): Promise<Record<string, any>>;
59
+ set_vehicle_name(vehicle_tag: string | number, vehicle_name: string): Promise<Record<string, any>>;
60
+ speed_limit_activate(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
61
+ speed_limit_clear_pin(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
62
+ speed_limit_clear_pin_admin(vehicle_tag: string | number): Promise<Record<string, any>>;
63
+ speed_limit_deactivate(vehicle_tag: string | number, pin: string | number): Promise<Record<string, any>>;
64
+ speed_limit_set_limit(vehicle_tag: string | number, limit_mph: number): Promise<Record<string, any>>;
65
+ sun_roof_control(vehicle_tag: string | number, state: "stop" | "close" | "vent"): Promise<Record<string, any>>;
66
+ take_drivenote(vehicle_tag: string | number, note: string): Promise<Record<string, any>>;
67
+ trigger_homelink(vehicle_tag: string | number, lat: number, lon: number, token?: string): Promise<Record<string, any>>;
68
+ upcoming_calendar_entries(vehicle_tag: string | number, calendar_data: string): Promise<Record<string, any>>;
69
+ window_control(vehicle_tag: string | number, command: "vent" | "close", lat: number, lon: number): Promise<Record<string, any>>;
70
+ drivers(vehicle_tag: string | number): Promise<Record<string, any>>;
71
+ drivers_remove(vehicle_tag: string | number, share_user_id?: number): Promise<Record<string, any>>;
72
+ eligible_subscriptions(vin: string): Promise<Record<string, any>>;
73
+ eligible_upgrades(vin: string): Promise<Record<string, any>>;
74
+ fleet_status(vins: Array<String>): Promise<Record<string, any>>;
75
+ fleet_telemetry_config(config: FleetTelemetryConfig): Promise<Record<string, any>>;
76
+ fleet_telemetry_config_delete(vehicle_tag: string | number): Promise<Record<string, any>>;
77
+ fleet_telemetry_config_get(vehicle_tag: string | number): Promise<Record<string, any>>;
78
+ list(page?: number, per_page?: number): Promise<Record<string, any>>;
79
+ mobile_enabled(vehicle_tag: string | number): Promise<Record<string, any>>;
80
+ nearby_charging_sites(vehicle_tag: string | number, count?: number, radius?: number, detail?: boolean): Promise<Record<string, any>>;
81
+ options(vin: string): Promise<Record<string, any>>;
82
+ recent_alerts(vehicle_tag: string | number): Promise<Record<string, any>>;
83
+ release_notes(vehicle_tag: string | number, staged?: boolean, language?: string): Promise<Record<string, any>>;
84
+ service_data(vehicle_tag: string | number): Promise<Record<string, any>>;
85
+ share_invites(vehicle_tag: string | number): Promise<Record<string, any>>;
86
+ share_invites_create(vehicle_tag: string | number): Promise<Record<string, any>>;
87
+ share_invites_redeem(code: string): Promise<Record<string, any>>;
88
+ share_invites_revoke(vehicle_tag: string | number, id: string): Promise<Record<string, any>>;
89
+ signed_command(vehicle_tag: string | number, routable_message: string): Promise<Record<string, any>>;
90
+ vehicle(vehicle_tag: string | number): Promise<Record<string, any>>;
91
+ vehicle_data(vehicle_tag: string | number, endpoints?: VehicleDataEndpoint[] | string): Promise<Record<string, any>>;
92
+ wake_up(vehicle_tag: string | number): Promise<Record<string, any>>;
93
+ warranty_details(vin: string): Promise<Record<string, any>>;
94
+ }
@@ -0,0 +1,106 @@
1
+ import { AlertTypes, ClimateMode, Level, Seat, Trunk, VehicleDataEndpoint } from "./types.js";
2
+ import Vehicle from "./vehicle.js";
3
+ interface FleetTelemetryConfig {
4
+ hostname: string;
5
+ ca: string;
6
+ fields: {
7
+ [key: string]: {
8
+ interval_seconds: number;
9
+ };
10
+ };
11
+ alert_types: AlertTypes[];
12
+ exp: number;
13
+ port: number;
14
+ }
15
+ export default class VehicleSpecific {
16
+ parent: Vehicle;
17
+ vin: String;
18
+ constructor(parent: Vehicle, vin: String);
19
+ actuate_truck(which_trunk: Trunk): Promise<Record<string, any>>;
20
+ adjust_volume(volume: number): Promise<Record<string, any>>;
21
+ auto_conditioning_start(): Promise<Record<string, any>>;
22
+ auto_conditioning_stop(): Promise<Record<string, any>>;
23
+ cancel_software_update(): Promise<Record<string, any>>;
24
+ charge_max_range(): Promise<Record<string, any>>;
25
+ charge_port_door_close(): Promise<Record<string, any>>;
26
+ charge_port_door_open(): Promise<Record<string, any>>;
27
+ charge_standard(): Promise<Record<string, any>>;
28
+ charge_start(): Promise<Record<string, any>>;
29
+ charge_stop(): Promise<Record<string, any>>;
30
+ clear_pin_to_drive_admin(): Promise<Record<string, any>>;
31
+ door_lock(): Promise<Record<string, any>>;
32
+ door_unlock(): Promise<Record<string, any>>;
33
+ erase_user_data(): Promise<Record<string, any>>;
34
+ flash_lights(): Promise<Record<string, any>>;
35
+ guest_mode(enable: boolean): Promise<Record<string, any>>;
36
+ honk_horn(): Promise<Record<string, any>>;
37
+ media_next_fav(): Promise<Record<string, any>>;
38
+ media_next_track(): Promise<Record<string, any>>;
39
+ media_prev_fav(): Promise<Record<string, any>>;
40
+ media_prev_track(): Promise<Record<string, any>>;
41
+ media_toggle_playback(): Promise<Record<string, any>>;
42
+ media_volume_down(): Promise<Record<string, any>>;
43
+ navigation_gps_request(lat: number, lon: number, order?: number): Promise<Record<string, any>>;
44
+ navigation_request(value: string, locale: string, type?: string): Promise<Record<string, any>>;
45
+ navigation_sc_request(id: number, order?: number): Promise<Record<string, any>>;
46
+ remote_auto_seat_climate_request(auto_seat_position: Seat | number, auto_climate_on: boolean): Promise<Record<string, any>>;
47
+ remote_auto_steering_wheel_heat_climate_request(on: boolean): Promise<Record<string, any>>;
48
+ remote_boombox(sound?: number): Promise<Record<string, any>>;
49
+ remote_seat_cooler_request(seat_position: Seat | number, seat_cooler_level: Level): Promise<Record<string, any>>;
50
+ remote_seat_heater_request(seat_position: Seat | number, seat_heater_level: Level): Promise<Record<string, any>>;
51
+ remote_start_drive(): Promise<Record<string, any>>;
52
+ remote_steering_wheel_heat_level_request(level: Level): Promise<Record<string, any>>;
53
+ remote_steering_wheel_heater_request(on: boolean): Promise<Record<string, any>>;
54
+ reset_pin_to_drive_pin(): Promise<Record<string, any>>;
55
+ reset_valet_pin(): Promise<Record<string, any>>;
56
+ schedule_software_update(offset_sec: number): Promise<Record<string, any>>;
57
+ set_bioweapon_mode(on: boolean, manual_override: boolean): Promise<Record<string, any>>;
58
+ set_cabin_overheat_protection(on: boolean, fan_only: boolean): Promise<Record<string, any>>;
59
+ set_charge_limit(percent: number): Promise<Record<string, any>>;
60
+ set_charging_amps(charging_amps: number): Promise<Record<string, any>>;
61
+ set_climate_keeper_mode(climate_keeper_mode: number | ClimateMode): Promise<Record<string, any>>;
62
+ set_cop_temp(cop_temp: 0 | 1 | 2 | 30 | 35 | 40 | 90 | 95 | 100): Promise<Record<string, any>>;
63
+ set_pin_to_drive(on: boolean, password: string | number): Promise<Record<string, any>>;
64
+ set_preconditioning_max(on: boolean, manual_override: boolean): Promise<Record<string, any>>;
65
+ set_scheduled_charging(enable: boolean, time: number): Promise<Record<string, any>>;
66
+ 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<Record<string, any>>;
67
+ set_sentry_mode(on: boolean): Promise<Record<string, any>>;
68
+ set_temps(driver_temp: number, passenger_temp: number): Promise<Record<string, any>>;
69
+ set_valet_mode(on: boolean, password: string | number): Promise<Record<string, any>>;
70
+ set_vehicle_name(vehicle_name: string): Promise<Record<string, any>>;
71
+ speed_limit_activate(pin: string | number): Promise<Record<string, any>>;
72
+ speed_limit_clear_pin(pin: string | number): Promise<Record<string, any>>;
73
+ speed_limit_clear_pin_admin(): Promise<Record<string, any>>;
74
+ speed_limit_deactivate(pin: string | number): Promise<Record<string, any>>;
75
+ speed_limit_set_limit(limit_mph: number): Promise<Record<string, any>>;
76
+ sun_roof_control(state: "stop" | "close" | "vent"): Promise<Record<string, any>>;
77
+ take_drivenote(note: string): Promise<Record<string, any>>;
78
+ trigger_homelink(lat: number, lon: number, token?: string): Promise<Record<string, any>>;
79
+ upcoming_calendar_entries(calendar_data: string): Promise<Record<string, any>>;
80
+ window_control(command: "vent" | "close", lat: number, lon: number): Promise<Record<string, any>>;
81
+ drivers(): Promise<Record<string, any>>;
82
+ drivers_remove(share_user_id?: number): Promise<Record<string, any>>;
83
+ eligible_subscriptions(vin: string): Promise<Record<string, any>>;
84
+ eligible_upgrades(vin: string): Promise<Record<string, any>>;
85
+ fleet_status(vins: Array<String>): Promise<Record<string, any>>;
86
+ fleet_telemetry_config(config: FleetTelemetryConfig): Promise<Record<string, any>>;
87
+ fleet_telemetry_config_delete(): Promise<Record<string, any>>;
88
+ fleet_telemetry_config_get(): Promise<Record<string, any>>;
89
+ list(page?: number, per_page?: number): Promise<Record<string, any>>;
90
+ mobile_enabled(): Promise<Record<string, any>>;
91
+ nearby_charging_sites(count?: number, radius?: number, detail?: boolean): Promise<Record<string, any>>;
92
+ options(vin: string): Promise<Record<string, any>>;
93
+ recent_alerts(): Promise<Record<string, any>>;
94
+ release_notes(staged?: boolean, language?: string): Promise<Record<string, any>>;
95
+ service_data(): Promise<Record<string, any>>;
96
+ share_invites(): Promise<Record<string, any>>;
97
+ share_invites_create(): Promise<Record<string, any>>;
98
+ share_invites_redeem(code: string): Promise<Record<string, any>>;
99
+ share_invites_revoke(id: string): Promise<Record<string, any>>;
100
+ signed_command(routable_message: string): Promise<Record<string, any>>;
101
+ vehicle(): Promise<Record<string, any>>;
102
+ vehicle_data(endpoints?: VehicleDataEndpoint[] | string): Promise<Record<string, any>>;
103
+ wake_up(): Promise<Record<string, any>>;
104
+ warranty_details(vin: string): Promise<Record<string, any>>;
105
+ }
106
+ export {};
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
- "name": "tesla-fleet-api",
3
- "version": "0.0.3",
4
- "author": {
5
- "name": "Teslemetry",
6
- "email": "hello@teslemetry.com",
7
- "url": "https://teslemetry.com"
8
- },
9
- "type": "module",
10
- "devDependencies": {
11
- "@types/node": "^20.12.12",
12
- "typescript": "^5.4.5"
13
- },
14
- "files": [
15
- "dist",
16
- "src"
17
- ],
18
- "main": "dist/index.js",
19
- "license": "Apache-2.0",
20
- "scripts": {
21
- "watch": "tsc -w"
22
- }
23
- }
2
+ "name": "tesla-fleet-api",
3
+ "version": "0.0.5",
4
+ "author": {
5
+ "name": "Teslemetry",
6
+ "email": "hello@teslemetry.com",
7
+ "url": "https://teslemetry.com"
8
+ },
9
+ "type": "module",
10
+ "devDependencies": {
11
+ "@types/node": "^20.12.12",
12
+ "typescript": "^5.4.5"
13
+ },
14
+ "scripts": {
15
+ "prepare": "tsc",
16
+ "watch": "tsc -w"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "src"
21
+ ],
22
+ "main": "dist/index.js",
23
+ "license": "Apache-2.0"
24
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import TeslaFleetApi from "./teslafleetapi.js";
2
- import Telemetry from "./teslemetry.js";
2
+ import Teslemetry from "./teslemetry.js";
3
3
  import Tessie from "./tessie.js";
4
4
 
5
- export { Telemetry, TeslaFleetApi, Tessie };
5
+ export { TeslaFleetApi, Teslemetry, Tessie };