Repository navigation
Conversation
Ask for the vehicle's mobileConfiguration.tonneauOption in getUserInfo, as the app's own VehiclesAndEnrollments query does. Its optionId (TON-P01 for the powered tonneau) tells which vehicles have a tonneau cover, which supportedFeatures does not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getUserInfonow also asks for each vehicle'smobileConfiguration.tonneauOption. ItsoptionId(
TON-P01for the powered tonneau) is how the Rivian app decides whether a vehicle has a poweredtonneau cover.
supportedFeatureshas no flag for it.Changes
get_user_information: addmobileConfiguration { __typename tonneauOption { __typename optionId optionName } }insidevehicle { … }.schemas/gateway.graphql: addtonneauOption: VehicleMobileConfigurationOptiontoVehicleMobileConfiguration. It is nullable, unlike its four siblings, because a vehicle withouta tonneau option may return null.
tests/responses.py:USER_INFORMATION_RESPONSEgets atonneauOptionwithoptionIdTON-P01.test_get_user_information: captures the request and asserts the query asks fortonneauOption { __typename optionId optionName }.Testing
The extended test fails without the
rivian.pychange.Notes
tonneauOptionId.contains(TONNEAU_POWER_OPTION_ID), withTON-P01as that ID.getUserInfois needed for setup, so if the gateway rejected the new field, setup would fail.This branch has not been run against the live API yet. Before this PR is marked ready, we will
confirm on our R1T that the query is accepted and returns
TON-P01.up/tonneau-option-gating).