miler map
This commit is contained in:
@@ -444,6 +444,59 @@ class ApiConfig {
|
||||
pick(['consignmentid', 'consignmentId', 'consignment_id']),
|
||||
),
|
||||
|
||||
// ── Where this parcel goes next, in the server's own word ──
|
||||
//
|
||||
// Shipped with request 27. Until it existed, `next_action` was returned
|
||||
// **once** — by `pickup-complete` — and the app had to keep the pivot's
|
||||
// answer on the handset to survive a poll, because `Created` is both the
|
||||
// state a hub-routed parcel settles on *and* the state one holds while
|
||||
// the pivot is still routing it. That cache is now the fallback rather
|
||||
// than the source: [NextLegResolver] prefers this field over it, so a
|
||||
// reinstall, a second device or a routing the office changed mid-day all
|
||||
// read the live answer.
|
||||
//
|
||||
// Values: `pickup`, `start_delivery`, `inward_at_hub`, `deliver`,
|
||||
// `handed_to_hub`, `none`. Carried verbatim — the resolver owns the
|
||||
// reading of them, and an unrecognised word must reach it intact so it
|
||||
// can fall through rather than being flattened here.
|
||||
'next_action': s(
|
||||
pick(['next_action', 'nextaction', 'nextAction']),
|
||||
),
|
||||
|
||||
// ── The base this parcel is to be handed in at ──
|
||||
//
|
||||
// A nested object, carried whole: id, name, address, pincode, latitude,
|
||||
// longitude. Null on a hyperlocal parcel, which has no base leg. See
|
||||
// [HandoverHub], which is the only thing that reads it.
|
||||
//
|
||||
// This is the field that makes a handover navigable. Before it the app
|
||||
// knew a parcel was hub-routed and had no idea which building — every
|
||||
// `hubLat`/`hubLng` in the codebase was the rider's own position standing
|
||||
// in for one.
|
||||
'next_hub': booking['next_hub'] ?? booking['nexthub'],
|
||||
|
||||
// ── What kind of place this is collected FROM ──
|
||||
//
|
||||
// Shipped with request 28. `hub` / `customer` / `merchant` / `store`, on
|
||||
// the row rather than against a location master — a customer-door pickup
|
||||
// has no location id at all, so a type held against locations could never
|
||||
// classify one.
|
||||
//
|
||||
// Home titled every logistics pickup group with the rider's own base name
|
||||
// before this, because the per-booking source was unreliable and a
|
||||
// constant was the safer wrong answer. This is what retires that.
|
||||
'pickup_source_type': s(
|
||||
pick(['pickup_source_type', 'pickupsourcetype', 'pickupSourceType']),
|
||||
),
|
||||
|
||||
// The counter's own name, as the hub holds it. Distinct from
|
||||
// `sourcename`, which the backend fills from `providercompany` /
|
||||
// `providerlocation` and which is a contact person on some rows — that is
|
||||
// how the biggest type on Home once read `Sudharsan`.
|
||||
'pickup_source_name': s(
|
||||
pick(['pickup_source_name', 'pickupsourcename', 'pickupSourceName']),
|
||||
),
|
||||
|
||||
// ── The hub's solved position in the route ──
|
||||
//
|
||||
// Verified live 21 Aug 2026: `GET /miler/bookings` carries `step` on
|
||||
|
||||
Reference in New Issue
Block a user