Repository navigation
Conversation
Requires core-api 2.0.6. Until it is tagged, composer also accepts dev-release/v2.0.6 and the contract run links core-api's release branch.
The driver sign-in routes (login, login-with-sms, verify-code, forgot-password, reset-password) also accept the platform token, so an app built for an instance needs no organization's API key. API keys and driver tokens work on them as before. Driver sign-up through verify-code is refused to a platform token, and App Review sign-in reads the organization from the request when there is no API key to identify it.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
=============================================
- Coverage 100.00% 99.99% -0.01%
- Complexity 14795 14801 +6
=============================================
Files 680 680
Lines 51526 51541 +15
=============================================
+ Hits 51526 51538 +12
- Misses 0 3 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ding settings - The Navigator link carries the instance's platform token when core can return it, instead of an organization's API key; the old key remains the fallback until the token is rotated once - get-link-app also returns the app link, its QR code and the server details; organization staff who can view Navigator settings may read it once it carries the platform token - New share-link endpoint emails or texts drivers a signed link that works for 7 days - Console: a 'Link the Navigator app' panel with the QR code (download, print), the link, the app link and sending to chosen or all drivers, on the Navigator App settings page and in the admin panel - Driver onboarding settings: the documents flag is saved under its real name, the driver-facing read endpoint accepts the platform token and returns the settings in the form the app reads
- Each organization that allows sign-up by button gets a join code; the QR code carries it together with the server link - New endpoints, open to the platform token: look a join code up, text a verification code, create the driver once the code checks out - Console: the onboarding settings show the join code and its QR code, with download and replace
A 'What drivers see' panel on the Navigator App settings page, with one switch so far: show the service rate on orders (on by default). Drivers' apps read it from GET v1/navigator/settings.
…er carry time windows - A manifest stop returns its role (pickup, waypoint, dropoff, return), its position among the order's points, the waypoint it stands for, the time window and service time that apply, per-waypoint notes and proof requirements, and its meta - Orders return their time window - Tracker stops return their time window, and the tracker reports a real delay: the live arrival estimate against the end of the active stop's window
…sue fields
- GET v1/manifests/{id}/route returns the road route through a manifest's stops from the organization's routing engine, with per-leg geometry where the engine allows, cached, and an empty line rather than an error when routing is unavailable
- Going on and off duty is recorded: drivers.online_since and one driver_duty_periods row per stretch; the driver resource returns online_since
- GET v1/drivers/{id}/day-summary returns the day's waypoints, completed orders, planned and driven distance, time on duty, cash on delivery due and first and last activity
- Fuel reports accept and return a station, fuel type, note and receipt files
- Issues keep the order they are about, return it with their files, and expose their timeline to the driver
…nsole approves or sends back
The documents named in the onboarding settings can now be sent from the
Navigator app (GET and POST v1/drivers/{id}/documents), stored as files
against the driver, and reviewed from the driver's panel in the console.
A driver who signed themselves up stays pending, and cannot go online,
until every document is approved; approving the last one releases them.
The driver is told by push when a document is approved or sent back.
…ds; a driver found online with no start on record begins one
Every read of driver_duty_periods asked for deleted_at, which the table
did not have, so GET drivers/{id}/day-summary failed on every call.
…coped to their own driver
GET and PUT v1/drivers/{id}/notification-preferences let a driver switch
off pushes for new work, order changes, messages and offers. POST
v1/orders/{id}/cash-collected records the cash a driver took, and the day
summary reports it. A driver's own token now reaches only that driver's
manifests and waypoints.
…d a notification sent by hand The app's device registration now records the phone's name, model, system, app version and whether it is a development build; signing out marks the device. The driver's panel in the console lists the devices and can send a notification to one or all of them.
…st an engine that just failed
…eates the order's channel between its driver and dispatch
…ey name; offers last 90 seconds and can be sent again; one push per action A new Navigator setting, off by default, decides whether a driver may dispatch an order. capture-qr finds which item of the order a code names. The sequential ad-hoc offer lasts 90 seconds by default and its expiry travels with the ping. Offer Again re-runs ad-hoc dispatch for an order that found no driver. Creating and dispatching an order together tells the driver once.
…date-activity needs a submitted inspection filed for the order, an unsafe one refuses the step and tells dispatch; console toggle and form picker
… stop: the console sends the stop's address when it has no id yet, so match it to the order's stop by address and drop it if none matches instead of failing the insert
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.
What changed
Navigator is built for an instance, not one organization, so an organization's API key had to be built into the app only to reach the driver sign-in routes. These routes now also accept the instance's platform token, through core-api 2.0.6's
fleetbase.api-or-platformgroup:POST v1/drivers/loginPOST v1/drivers/login-with-smsPOST v1/drivers/verify-codePOST v1/drivers/forgot-passwordPOST v1/drivers/reset-passwordThe driver's organization already came from their account, not from the key, so the handlers are unchanged for sign-in. API keys and driver tokens work on these routes as before, and every other route still refuses the platform token.
verify-codewithfor=create_driveranswers 403 to a platform token. The token ships inside apps and belongs to no organization, so it can't create a driver in one.organization; an API key's organization is still its own and the field is ignored.Requires
fleetbase/core-api2.0.6 (fleetbase/core-api#346). Until it is tagged, composer also acceptsdev-release/v2.0.6and the contract run links that branch. No migration.Testing
RouteRegistrationExecutionTest,ApiDriverControllerContractsTestandApiDriverPasswordContractsTestpass locally, with new tests that pin the list of routes open to the platform token and the sign-up refusal. The rest of the suite was not run locally.v1/driversandv1/ordersanswer 401.organizationagainst a live instance.