Skip to content

feat(vehicle): add missing REST schedule, waypoint and telemetry JWS methods (COR-8) - #28

Merged
Bre77 merged 2 commits into
mainfrom
feature/eng-16-cor-8-missing-rest-vehicle-methods
Nov 2, 2026
Merged

Bre77 merged 2 commits into
mainfrom
feature/eng-16-cor-8-missing-rest-vehicle-methods

Conversation

@Bre77

@Bre77 Bre77 commented Nov 2, 2026

Copy link
Copy Markdown
Member

Assignee: @Bre77 (bre77)

Summary

Resolves ENG-16 / COR-8: ports the missing REST vehicle methods from python-tesla-fleet-api's VehicleFleet. They live on the bound class (VehicleSpecific) only; nothing is added to Vehicle.

  • navigation_waypoints_request(waypoints)
  • fleet_telemetry_config_jws(vins, token): POST api/1/vehicles/fleet_telemetry_config_jws
  • add_charge_schedule(days_of_week, enabled, lat, lon, start_time?, end_time?, one_time?, id?): derives start_enabled/end_enabled and throws if both times are missing, as Python does
  • add_precondition_schedule(days_of_week, enabled, lat, lon, precondition_time, id?, one_time?)
  • remove_charge_schedule(id), remove_precondition_schedule(id)
  • batch_remove_charge_schedules(home, work, other), batch_remove_precondition_schedules(home, work, other)
  • days_of_week_mask and DAY_OF_WEEK_BITS: exported from src/commands.ts, where Python keeps them, and re-exported from the package root

As in Python, the REST schedule methods send days_of_week unchanged; only the signed path converts it with the mask. Python's name parameter is accepted but never sent, so I left it out of the TS signatures.

Heads-up: signed vehicles

Commands/VehicleSigned extend VehicleSpecific. Until SGN-8 (ENG-37) adds signed overrides, these schedule and waypoint methods on a VehicleSigned go to the plaintext REST endpoints. A vehicle that requires signing will reject them.

Testing

  • New test/vehiclespecific.test.ts: for each method, checks verb, path and body (after _request's own null stripping), plus the add_charge_schedule guard.
  • days_of_week_mask cases cover single names, All, Weekdays, comma lists, whitespace, numeric strings and numbers, and invalid names. Every expected value was checked against Python's own days_of_week_mask.
  • tsc --noEmit, pnpm lint, pnpm test (374 passed).

Tip: I will respond to comments that @ mention @cyrusagent on this PR/MR. You can also submit a review with all your feedback at once, and I will automatically wake up to address each comment.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 87 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 65a0ee7c-9634-428b-aaec-2547e0346c94
Commits

Reviewing files that changed from the base of the PR and between 861ee5b and c1f5306.

Files selected for processing: 5
  • .changeset/rest-schedule-methods.md
  • src/commands.ts
  • src/index.ts
  • src/vehiclespecific.ts
  • test/vehiclespecific.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@Bre77
Bre77 merged commit 9c91c69 into main Nov 2, 2026
2 checks passed
@Bre77
Bre77 deleted the feature/eng-16-cor-8-missing-rest-vehicle-methods branch November 2, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant