@burdenoff/microfe-movethewheels 2026.1107.2 → 2026.1107.4
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.
- package/dist/MoveTheWheelsRoutes.js +9 -5
- package/dist/components/DispatchDecisionCard.js +203 -0
- package/dist/generated/tracking-quality-operations.d.ts +138 -1
- package/dist/generated/wspace-types.d.ts +448 -8
- package/dist/hooks/useDispatchPlan.js +88 -0
- package/dist/movethewheels/components/DispatchDecisionCard.d.ts +16 -0
- package/dist/movethewheels/hooks/useCarrierIntegrations.d.ts +2 -0
- package/dist/movethewheels/hooks/useDispatchPlan.d.ts +79 -0
- package/dist/movethewheels/pages/DispatchPlanPage.d.ts +14 -0
- package/dist/movethewheels/utils/carrierIntegrations.d.ts +38 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/wand-sparkles.js +38 -0
- package/dist/pages/DispatchPlanPage.js +374 -0
- package/dist/pages/IntegrationsPage.js +324 -129
- package/dist/pages/RoutesPage.js +85 -80
- package/dist/utils/carrierIntegrations.js +62 -23
- package/package.json +1 -1
- package/src/generated/tracking-quality-operations.ts +157 -0
- package/src/generated/wspace-types.ts +518 -8
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
- package/src/movethewheels/components/DispatchDecisionCard.tsx +243 -0
- package/src/movethewheels/hooks/useCarrierIntegrations.ts +2 -0
- package/src/movethewheels/hooks/useDispatchPlan.ts +286 -0
- package/src/movethewheels/pages/DispatchPlanPage.tsx +505 -0
- package/src/movethewheels/pages/IntegrationsPage.tsx +266 -44
- package/src/movethewheels/pages/RoutesPage.tsx +9 -2
- package/src/movethewheels/utils/carrierIntegrations.ts +76 -8
|
@@ -29,8 +29,8 @@ function p() {
|
|
|
29
29
|
})
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
var m = i(() => import("./pages/DashboardPage.js")), h = i(() => import("./pages/OrdersListPage.js")), g = i(() => import("./pages/OrderDetailsPage.js")), _ = i(() => import("./pages/CreateOrderPage.js")), v = i(() => import("./pages/TrackingPage.js")), y = i(() => import("./pages/TrackingEventQualityPage.js")), b = i(() => import("./pages/ShipmentStatusAuthorityPage.js")), x = i(() => import("./pages/LiveTrackingPage.js")), S = i(() => import("./pages/FleetPage.js")), C = i(() => import("./pages/VehiclesPage.js")), w = i(() => import("./pages/VehicleDetailsPage.js")), T = i(() => import("./pages/DriversPage.js")), E = i(() => import("./pages/DriverDetailsPage.js")), D = i(() => import("./pages/InventoryPage.js")), O = i(() => import("./pages/ProductsPage.js")), k = i(() => import("./pages/ProductDetailsPage.js")), A = i(() => import("./pages/PalletPreviewPage.js")), j = i(() => import("./pages/WarehousesPage.js")), M = i(() => import("./pages/WarehouseDetailsPage.js")), N = i(() => import("./pages/CustomersPage.js")), P = i(() => import("./pages/CustomerDetailsPage.js")), F = i(() => import("./pages/MarketplacePage.js")), ee = i(() => import("./pages/ImportExportPage.js")), I = i(() => import("./pages/SettingsPage.js")), L = i(() => import("./pages/IntegrationsPage.js")), R = i(() => import("./pages/ReportsPage.js")), z = i(() => import("./pages/RoutesPage.js")), B = i(() => import("./pages/RouteDetailsPage.js")), V = i(() => import("./pages/AnalyticsPage.js")), H = i(() => import("./pages/FinancePage.js")), U = i(() => import("./pages/FreightEstimatePage.js")), W = i(() => import("./pages/FreightInvoicePage.js")), G = i(() => import("./pages/ConsolidationPage.js")), K = i(() => import("./pages/LogisticsProceduresPage.js")), q = i(() => import("./pages/DeliveryCapturePage.js")), J = i(() => import("./pages/MultiModalShipmentPage.js")), Y = i(() => import("./pages/ShippingRatesPage.js")), X = i(() => import("./pages/ContainersPage.js")), Z = i(() => import("./pages/ContainerConditionPage.js")), Q = i(() => import("./pages/FreeTimePage.js")), $ = i(() => import("./pages/PendingPickPage.js")), te = i(() => import("./pages/StockObservationsPage.js")), ne = i(() => import("./pages/StockBindingPage.js")), re = i(() => import("./pages/TripUtilizationPage.js")), ie = i(() => import("./pages/
|
|
33
|
-
function
|
|
32
|
+
var m = i(() => import("./pages/DashboardPage.js")), h = i(() => import("./pages/OrdersListPage.js")), g = i(() => import("./pages/OrderDetailsPage.js")), _ = i(() => import("./pages/CreateOrderPage.js")), v = i(() => import("./pages/TrackingPage.js")), y = i(() => import("./pages/TrackingEventQualityPage.js")), b = i(() => import("./pages/ShipmentStatusAuthorityPage.js")), x = i(() => import("./pages/LiveTrackingPage.js")), S = i(() => import("./pages/FleetPage.js")), C = i(() => import("./pages/VehiclesPage.js")), w = i(() => import("./pages/VehicleDetailsPage.js")), T = i(() => import("./pages/DriversPage.js")), E = i(() => import("./pages/DriverDetailsPage.js")), D = i(() => import("./pages/InventoryPage.js")), O = i(() => import("./pages/ProductsPage.js")), k = i(() => import("./pages/ProductDetailsPage.js")), A = i(() => import("./pages/PalletPreviewPage.js")), j = i(() => import("./pages/WarehousesPage.js")), M = i(() => import("./pages/WarehouseDetailsPage.js")), N = i(() => import("./pages/CustomersPage.js")), P = i(() => import("./pages/CustomerDetailsPage.js")), F = i(() => import("./pages/MarketplacePage.js")), ee = i(() => import("./pages/ImportExportPage.js")), I = i(() => import("./pages/SettingsPage.js")), L = i(() => import("./pages/IntegrationsPage.js")), R = i(() => import("./pages/ReportsPage.js")), z = i(() => import("./pages/RoutesPage.js")), B = i(() => import("./pages/RouteDetailsPage.js")), V = i(() => import("./pages/AnalyticsPage.js")), H = i(() => import("./pages/FinancePage.js")), U = i(() => import("./pages/FreightEstimatePage.js")), W = i(() => import("./pages/FreightInvoicePage.js")), G = i(() => import("./pages/ConsolidationPage.js")), K = i(() => import("./pages/LogisticsProceduresPage.js")), q = i(() => import("./pages/DeliveryCapturePage.js")), J = i(() => import("./pages/MultiModalShipmentPage.js")), Y = i(() => import("./pages/ShippingRatesPage.js")), X = i(() => import("./pages/ContainersPage.js")), Z = i(() => import("./pages/ContainerConditionPage.js")), Q = i(() => import("./pages/FreeTimePage.js")), $ = i(() => import("./pages/PendingPickPage.js")), te = i(() => import("./pages/StockObservationsPage.js")), ne = i(() => import("./pages/StockBindingPage.js")), re = i(() => import("./pages/TripUtilizationPage.js")), ie = i(() => import("./pages/DispatchPlanPage.js")), ae = i(() => import("./pages/ConsumedFuelPreviewPage.js")), oe = i(() => import("./pages/EmptyReusePage.js"));
|
|
33
|
+
function se() {
|
|
34
34
|
return t(), /* @__PURE__ */ l(r, {
|
|
35
35
|
fallback: /* @__PURE__ */ l(p, {}),
|
|
36
36
|
children: /* @__PURE__ */ u(s, { children: [
|
|
@@ -96,7 +96,7 @@ function oe() {
|
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ l(o, {
|
|
98
98
|
path: "containers/empty-reuse",
|
|
99
|
-
element: /* @__PURE__ */ l(
|
|
99
|
+
element: /* @__PURE__ */ l(oe, {})
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ l(o, {
|
|
102
102
|
path: "containers/consolidation",
|
|
@@ -235,9 +235,13 @@ function oe() {
|
|
|
235
235
|
element: /* @__PURE__ */ l(re, {})
|
|
236
236
|
}),
|
|
237
237
|
/* @__PURE__ */ l(o, {
|
|
238
|
-
path: "
|
|
238
|
+
path: "routes/dispatch-plan",
|
|
239
239
|
element: /* @__PURE__ */ l(ie, {})
|
|
240
240
|
}),
|
|
241
|
+
/* @__PURE__ */ l(o, {
|
|
242
|
+
path: "fuel-preview",
|
|
243
|
+
element: /* @__PURE__ */ l(ae, {})
|
|
244
|
+
}),
|
|
241
245
|
/* @__PURE__ */ l(o, {
|
|
242
246
|
path: "routes/new",
|
|
243
247
|
element: /* @__PURE__ */ l(B, {})
|
|
@@ -281,4 +285,4 @@ function oe() {
|
|
|
281
285
|
});
|
|
282
286
|
}
|
|
283
287
|
//#endregion
|
|
284
|
-
export {
|
|
288
|
+
export { se as MoveTheWheelsRoutes };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { Check as e } from "../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
2
|
+
import { Route as t } from "../node_modules/lucide-react/dist/esm/icons/route.js";
|
|
3
|
+
import { Sparkles as n } from "../node_modules/lucide-react/dist/esm/icons/sparkles.js";
|
|
4
|
+
import { Truck as r } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
5
|
+
import { User as i } from "../node_modules/lucide-react/dist/esm/icons/user.js";
|
|
6
|
+
import { X as a } from "../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
7
|
+
import { formatDateTime as o } from "../utils/formatters.js";
|
|
8
|
+
import { Badge as s, Button as c, Card as l, CardContent as u } from "./ui.js";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
//#region src/movethewheels/components/DispatchDecisionCard.tsx
|
|
11
|
+
var p = {
|
|
12
|
+
EARLIEST_DUE: ["movethewheels.dispatch.reason.earliestDue", "Earliest due"],
|
|
13
|
+
MAINTENANCE_OK: ["movethewheels.dispatch.reason.maintenanceOk", "No service due"],
|
|
14
|
+
MAINTENANCE_DUE_SOON: ["movethewheels.dispatch.reason.maintenanceDueSoon", "Service due soon"],
|
|
15
|
+
MAINTENANCE_OVERDUE: ["movethewheels.dispatch.reason.maintenanceOverdue", "Service overdue"],
|
|
16
|
+
FUEL_EFFICIENT: ["movethewheels.dispatch.reason.fuelEfficient", "Most fuel-efficient"],
|
|
17
|
+
CAPACITY_FITS: ["movethewheels.dispatch.reason.capacityFits", "Capacity fits"],
|
|
18
|
+
CAPACITY_UNKNOWN: ["movethewheels.dispatch.reason.capacityUnknown", "Capacity not recorded"],
|
|
19
|
+
DRIVER_AVAILABLE: ["movethewheels.dispatch.reason.driverAvailable", "Driver available"],
|
|
20
|
+
DRIVER_RATED: ["movethewheels.dispatch.reason.driverRated", "Driver rated"],
|
|
21
|
+
LICENSE_EXPIRING: ["movethewheels.dispatch.reason.licenseExpiring", "Licence expiring"],
|
|
22
|
+
LINKED_PAIR: ["movethewheels.dispatch.reason.linkedPair", "Linked vehicle and driver"],
|
|
23
|
+
DISTANCE_MEASURED: ["movethewheels.dispatch.reason.distanceMeasured", "Distance measured"],
|
|
24
|
+
DISTANCE_UNKNOWN: ["movethewheels.dispatch.reason.distanceUnknown", "No coordinates"]
|
|
25
|
+
}, m = new Set([
|
|
26
|
+
"MAINTENANCE_DUE_SOON",
|
|
27
|
+
"MAINTENANCE_OVERDUE",
|
|
28
|
+
"CAPACITY_UNKNOWN",
|
|
29
|
+
"LICENSE_EXPIRING",
|
|
30
|
+
"DISTANCE_UNKNOWN"
|
|
31
|
+
]);
|
|
32
|
+
function h(e, t) {
|
|
33
|
+
let n = p[e];
|
|
34
|
+
return n ? t(n[0], n[1]) : e;
|
|
35
|
+
}
|
|
36
|
+
function g(e) {
|
|
37
|
+
return e >= .75 ? "text-status-success-text" : e >= .5 ? "text-status-warning-text" : "text-status-error-text";
|
|
38
|
+
}
|
|
39
|
+
function _({ assignment: e, onOpenRoute: n, t: r }) {
|
|
40
|
+
return e.decision === "ACCEPTED" ? /* @__PURE__ */ f("div", {
|
|
41
|
+
className: "flex flex-wrap items-center gap-2",
|
|
42
|
+
children: [/* @__PURE__ */ d(s, {
|
|
43
|
+
variant: "default",
|
|
44
|
+
children: r("movethewheels.dispatch.decision.accepted", "Accepted")
|
|
45
|
+
}), e.routeId && /* @__PURE__ */ f(c, {
|
|
46
|
+
size: "sm",
|
|
47
|
+
variant: "outline",
|
|
48
|
+
onClick: () => n(e.routeId),
|
|
49
|
+
children: [/* @__PURE__ */ d(t, {
|
|
50
|
+
size: 14,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}), r("movethewheels.dispatch.openRoute", "Open route")]
|
|
53
|
+
})]
|
|
54
|
+
}) : e.decision === "STALE" ? /* @__PURE__ */ f("div", {
|
|
55
|
+
className: "space-y-1",
|
|
56
|
+
children: [/* @__PURE__ */ d(s, {
|
|
57
|
+
variant: "outline",
|
|
58
|
+
children: r("movethewheels.dispatch.decision.stale", "Not applied")
|
|
59
|
+
}), e.decisionReason && /* @__PURE__ */ d("p", {
|
|
60
|
+
className: "text-xs text-status-warning-text",
|
|
61
|
+
children: e.decisionReason
|
|
62
|
+
})]
|
|
63
|
+
}) : e.decision === "REJECTED" ? /* @__PURE__ */ d(s, {
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
children: r("movethewheels.dispatch.decision.rejected", "Rejected")
|
|
66
|
+
}) : /* @__PURE__ */ d(s, {
|
|
67
|
+
variant: "outline",
|
|
68
|
+
children: r("movethewheels.dispatch.decision.pending", "Not decided")
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function v({ assignment: t, open: p, choice: v, disabled: y, onChoose: b, onOpenRoute: x, t: S }) {
|
|
72
|
+
let C = Math.round(t.confidence * 100), w = t.shipmentNumber ?? t.shipmentId, T = "border-border-default";
|
|
73
|
+
return p && v === "accept" ? T = "border-status-success-border" : p && v === "reject" && (T = "border-status-error-border"), /* @__PURE__ */ d(l, {
|
|
74
|
+
className: T,
|
|
75
|
+
"data-assignment-id": t.id,
|
|
76
|
+
"data-testid": "dispatch-decision-card",
|
|
77
|
+
children: /* @__PURE__ */ f(u, {
|
|
78
|
+
className: "space-y-3 p-4",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ f("div", {
|
|
81
|
+
className: "flex flex-wrap items-start justify-between gap-3",
|
|
82
|
+
children: [/* @__PURE__ */ f("div", {
|
|
83
|
+
className: "min-w-0 space-y-1",
|
|
84
|
+
children: [/* @__PURE__ */ f("p", {
|
|
85
|
+
className: "text-sm font-semibold break-words text-text-primary",
|
|
86
|
+
children: [
|
|
87
|
+
S("movethewheels.dispatch.shipment", "Shipment"),
|
|
88
|
+
" ",
|
|
89
|
+
w
|
|
90
|
+
]
|
|
91
|
+
}), t.estimatedDelivery && /* @__PURE__ */ f("p", {
|
|
92
|
+
className: "text-xs text-text-secondary",
|
|
93
|
+
children: [
|
|
94
|
+
S("movethewheels.dispatch.due", "Due"),
|
|
95
|
+
" ",
|
|
96
|
+
o(t.estimatedDelivery)
|
|
97
|
+
]
|
|
98
|
+
})]
|
|
99
|
+
}), /* @__PURE__ */ f("div", {
|
|
100
|
+
className: "text-right",
|
|
101
|
+
children: [/* @__PURE__ */ f("p", {
|
|
102
|
+
className: `text-lg font-bold tabular-nums ${g(t.confidence)}`,
|
|
103
|
+
children: [C, "%"]
|
|
104
|
+
}), /* @__PURE__ */ d("p", {
|
|
105
|
+
className: "text-xs text-text-secondary",
|
|
106
|
+
children: S("movethewheels.dispatch.confidence", "Planner confidence")
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ f("div", {
|
|
111
|
+
className: "grid gap-2 text-sm sm:grid-cols-2",
|
|
112
|
+
children: [/* @__PURE__ */ f("p", {
|
|
113
|
+
className: "flex items-center gap-2 break-words",
|
|
114
|
+
children: [/* @__PURE__ */ d(r, {
|
|
115
|
+
size: 16,
|
|
116
|
+
className: "shrink-0 text-text-secondary",
|
|
117
|
+
"aria-hidden": "true"
|
|
118
|
+
}), /* @__PURE__ */ f("span", { children: [t.vehicleNumber ?? t.vehicleId, t.vehicleType && /* @__PURE__ */ f("span", {
|
|
119
|
+
className: "text-text-secondary",
|
|
120
|
+
children: [" · ", t.vehicleType]
|
|
121
|
+
})] })]
|
|
122
|
+
}), /* @__PURE__ */ f("p", {
|
|
123
|
+
className: "flex items-center gap-2 break-words",
|
|
124
|
+
children: [/* @__PURE__ */ d(i, {
|
|
125
|
+
size: 16,
|
|
126
|
+
className: "shrink-0 text-text-secondary",
|
|
127
|
+
"aria-hidden": "true"
|
|
128
|
+
}), /* @__PURE__ */ d("span", { children: t.driverName ?? t.driverId })]
|
|
129
|
+
})]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ d("ul", {
|
|
132
|
+
className: "flex flex-wrap gap-1.5",
|
|
133
|
+
"aria-label": S("movethewheels.dispatch.reasons", "Reasons"),
|
|
134
|
+
children: t.reasons.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ d(s, {
|
|
135
|
+
variant: m.has(e) ? "outline" : "secondary",
|
|
136
|
+
children: h(e, S)
|
|
137
|
+
}) }, e))
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ d("p", {
|
|
140
|
+
className: "text-sm text-text-secondary",
|
|
141
|
+
children: t.rationale
|
|
142
|
+
}),
|
|
143
|
+
t.aiRationale && /* @__PURE__ */ f("p", {
|
|
144
|
+
className: "flex items-start gap-2 rounded-md bg-surface-secondary p-2 text-sm text-text-primary",
|
|
145
|
+
children: [/* @__PURE__ */ d(n, {
|
|
146
|
+
size: 14,
|
|
147
|
+
className: "mt-0.5 shrink-0",
|
|
148
|
+
"aria-hidden": "true"
|
|
149
|
+
}), /* @__PURE__ */ f("span", { children: [/* @__PURE__ */ f("span", {
|
|
150
|
+
className: "sr-only",
|
|
151
|
+
children: [
|
|
152
|
+
S("movethewheels.dispatch.aiWritten", "AI-written"),
|
|
153
|
+
":",
|
|
154
|
+
" "
|
|
155
|
+
]
|
|
156
|
+
}), t.aiRationale] })]
|
|
157
|
+
}),
|
|
158
|
+
t.estimatedDistanceKm !== null && /* @__PURE__ */ f("p", {
|
|
159
|
+
className: "text-xs text-text-secondary",
|
|
160
|
+
children: [
|
|
161
|
+
S("movethewheels.dispatch.distance", "Straight-line distance"),
|
|
162
|
+
" ",
|
|
163
|
+
t.estimatedDistanceKm,
|
|
164
|
+
" km",
|
|
165
|
+
t.estimatedDurationMinutes !== null && ` · ~${Math.round(t.estimatedDurationMinutes)} min`
|
|
166
|
+
]
|
|
167
|
+
}),
|
|
168
|
+
p ? /* @__PURE__ */ f("div", {
|
|
169
|
+
className: "flex flex-wrap gap-2",
|
|
170
|
+
role: "group",
|
|
171
|
+
"aria-label": S("movethewheels.dispatch.decide", "Decide this assignment"),
|
|
172
|
+
children: [/* @__PURE__ */ f(c, {
|
|
173
|
+
size: "sm",
|
|
174
|
+
variant: v === "accept" ? "default" : "outline",
|
|
175
|
+
"aria-pressed": v === "accept",
|
|
176
|
+
disabled: y,
|
|
177
|
+
onClick: () => b(v === "accept" ? null : "accept"),
|
|
178
|
+
children: [/* @__PURE__ */ d(e, {
|
|
179
|
+
size: 14,
|
|
180
|
+
"aria-hidden": "true"
|
|
181
|
+
}), S("movethewheels.dispatch.accept", "Accept")]
|
|
182
|
+
}), /* @__PURE__ */ f(c, {
|
|
183
|
+
size: "sm",
|
|
184
|
+
variant: v === "reject" ? "destructive" : "outline",
|
|
185
|
+
"aria-pressed": v === "reject",
|
|
186
|
+
disabled: y,
|
|
187
|
+
onClick: () => b(v === "reject" ? null : "reject"),
|
|
188
|
+
children: [/* @__PURE__ */ d(a, {
|
|
189
|
+
size: 14,
|
|
190
|
+
"aria-hidden": "true"
|
|
191
|
+
}), S("movethewheels.dispatch.reject", "Reject")]
|
|
192
|
+
})]
|
|
193
|
+
}) : /* @__PURE__ */ d(_, {
|
|
194
|
+
assignment: t,
|
|
195
|
+
onOpenRoute: x,
|
|
196
|
+
t: S
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
export { v as DispatchDecisionCard };
|
|
@@ -1095,6 +1095,19 @@ export type MtwDashboardMetrics = {
|
|
|
1095
1095
|
totalDeliveryJobs: Scalars['Int']['output'];
|
|
1096
1096
|
totalRevenue: Scalars['Float']['output'];
|
|
1097
1097
|
};
|
|
1098
|
+
export type MtwDecisionRationaleStatus =
|
|
1099
|
+
/** AI is switched off for this environment; the planner's own rationale is shown. */
|
|
1100
|
+
'AI_DISABLED'
|
|
1101
|
+
/** A model-written summary and rationale are attached. */
|
|
1102
|
+
| 'AVAILABLE'
|
|
1103
|
+
/** The workspace has spent its MoveTheWheels AI credits; no model call was made. */
|
|
1104
|
+
| 'CREDITS_EXHAUSTED'
|
|
1105
|
+
/** The workspace reached its daily AI cap; no model call was made. */
|
|
1106
|
+
| 'DAILY_CAP_REACHED'
|
|
1107
|
+
/** There was nothing to explain (no assignments). */
|
|
1108
|
+
| 'NOT_NEEDED'
|
|
1109
|
+
/** The model could not produce a rationale this time; the plan is unchanged. */
|
|
1110
|
+
| 'UNAVAILABLE';
|
|
1098
1111
|
/**
|
|
1099
1112
|
* MoveTheWheels-owned operational dispatch unit. It is intentionally not a cart/order
|
|
1100
1113
|
* system; checkout and order of record remain in global-store-svc StoreOrder.
|
|
@@ -1216,6 +1229,78 @@ export type MtwDemandForecastVariance = {
|
|
|
1216
1229
|
scopeType: DemandForecastScope;
|
|
1217
1230
|
volumeVariance: Scalars['Int']['output'];
|
|
1218
1231
|
};
|
|
1232
|
+
/** One proposed shipment -> vehicle + driver pairing. */
|
|
1233
|
+
export type MtwDispatchAssignment = {
|
|
1234
|
+
__typename?: 'MtwDispatchAssignment';
|
|
1235
|
+
/** Model-written rationale, when AI produced one. */
|
|
1236
|
+
aiRationale?: Maybe<Scalars['String']['output']>;
|
|
1237
|
+
/** Planner confidence from 0 to 1, from how much of what the pairing depends on is recorded and favourable. Not a probability of on-time delivery. */
|
|
1238
|
+
confidence: Scalars['Float']['output'];
|
|
1239
|
+
decidedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
1240
|
+
decision: MtwDispatchAssignmentDecision;
|
|
1241
|
+
decisionReason?: Maybe<Scalars['String']['output']>;
|
|
1242
|
+
driverId: Scalars['ID']['output'];
|
|
1243
|
+
driverName?: Maybe<Scalars['String']['output']>;
|
|
1244
|
+
estimatedDelivery?: Maybe<Scalars['DateTime']['output']>;
|
|
1245
|
+
estimatedDistanceKm?: Maybe<Scalars['Float']['output']>;
|
|
1246
|
+
estimatedDurationMinutes?: Maybe<Scalars['Float']['output']>;
|
|
1247
|
+
id: Scalars['ID']['output'];
|
|
1248
|
+
planId: Scalars['ID']['output'];
|
|
1249
|
+
/** The planner's own factual rationale. */
|
|
1250
|
+
rationale: Scalars['String']['output'];
|
|
1251
|
+
/** Reason codes behind the pairing, e.g. MAINTENANCE_OK, CAPACITY_FITS, LINKED_PAIR. */
|
|
1252
|
+
reasons: Array<Scalars['String']['output']>;
|
|
1253
|
+
routeId?: Maybe<Scalars['ID']['output']>;
|
|
1254
|
+
sequence: Scalars['Int']['output'];
|
|
1255
|
+
shipmentId: Scalars['ID']['output'];
|
|
1256
|
+
shipmentNumber?: Maybe<Scalars['String']['output']>;
|
|
1257
|
+
vehicleId: Scalars['ID']['output'];
|
|
1258
|
+
vehicleNumber?: Maybe<Scalars['String']['output']>;
|
|
1259
|
+
vehicleType?: Maybe<Scalars['String']['output']>;
|
|
1260
|
+
waypoints: Scalars['JSON']['output'];
|
|
1261
|
+
};
|
|
1262
|
+
export type MtwDispatchAssignmentDecision =
|
|
1263
|
+
/** Accepted; routeId is the route that was created. */
|
|
1264
|
+
'ACCEPTED' | 'PENDING' | 'REJECTED'
|
|
1265
|
+
/** Accepted, but the shipment, vehicle or driver changed since the proposal; decisionReason says how. No route was created. */
|
|
1266
|
+
| 'STALE';
|
|
1267
|
+
export type MtwDispatchPlan = {
|
|
1268
|
+
__typename?: 'MtwDispatchPlan';
|
|
1269
|
+
acceptedCount: Scalars['Int']['output'];
|
|
1270
|
+
/** Provider-qualified model that wrote the rationale, when one did. */
|
|
1271
|
+
aiModel?: Maybe<Scalars['String']['output']>;
|
|
1272
|
+
aiStatus: MtwDecisionRationaleStatus;
|
|
1273
|
+
aiSummary?: Maybe<Scalars['String']['output']>;
|
|
1274
|
+
assignments: Array<MtwDispatchAssignment>;
|
|
1275
|
+
createdAt: Scalars['DateTime']['output'];
|
|
1276
|
+
createdBy: Scalars['String']['output'];
|
|
1277
|
+
decidedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
1278
|
+
decidedBy?: Maybe<Scalars['String']['output']>;
|
|
1279
|
+
expiresAt: Scalars['DateTime']['output'];
|
|
1280
|
+
id: Scalars['ID']['output'];
|
|
1281
|
+
/** The deterministic planner that produced the assignments. */
|
|
1282
|
+
method: Scalars['String']['output'];
|
|
1283
|
+
pendingCount: Scalars['Int']['output'];
|
|
1284
|
+
rejectedCount: Scalars['Int']['output'];
|
|
1285
|
+
staleCount: Scalars['Int']['output'];
|
|
1286
|
+
status: MtwDispatchPlanStatus;
|
|
1287
|
+
unassigned: Array<MtwUnassignedShipment>;
|
|
1288
|
+
windowEnd?: Maybe<Scalars['DateTime']['output']>;
|
|
1289
|
+
windowStart?: Maybe<Scalars['DateTime']['output']>;
|
|
1290
|
+
};
|
|
1291
|
+
export type MtwDispatchPlanStatus =
|
|
1292
|
+
/** Every assignment was accepted and has a route. */
|
|
1293
|
+
'APPLIED'
|
|
1294
|
+
/** A decision is being applied right now. */
|
|
1295
|
+
| 'APPLYING'
|
|
1296
|
+
/** The plan was superseded by a newer one or passed its expiry without a decision. */
|
|
1297
|
+
| 'EXPIRED'
|
|
1298
|
+
/** Some assignments were accepted; the rest were rejected or had gone stale. */
|
|
1299
|
+
| 'PARTIALLY_APPLIED'
|
|
1300
|
+
/** Waiting for a decision. */
|
|
1301
|
+
| 'PROPOSED'
|
|
1302
|
+
/** No assignment was accepted; nothing was written. */
|
|
1303
|
+
| 'REJECTED';
|
|
1219
1304
|
/** Unit MoveTheWheels shows distances in. */
|
|
1220
1305
|
export type MtwDistanceUnit =
|
|
1221
1306
|
/** Kilometres */
|
|
@@ -2444,7 +2529,7 @@ export type MtwIntegrationIngestReceipt = {
|
|
|
2444
2529
|
trackingEventId: Scalars['ID']['output'];
|
|
2445
2530
|
workspaceId: Scalars['ID']['output'];
|
|
2446
2531
|
};
|
|
2447
|
-
export type MtwIntegrationProvider = 'DESCARTES' | 'FOURKITES' | 'GENERIC_WEBHOOK' | 'PROJECT44' | 'SHIPROCKET';
|
|
2532
|
+
export type MtwIntegrationProvider = 'DESCARTES' | 'FOURKITES' | 'GENERIC_WEBHOOK' | 'PROJECT44' | 'SAMSARA' | 'SHIPROCKET';
|
|
2448
2533
|
export type MtwInventoryItem = {
|
|
2449
2534
|
__typename?: 'MtwInventoryItem';
|
|
2450
2535
|
allocated: Scalars['Int']['output'];
|
|
@@ -2828,6 +2913,16 @@ export type MtwPickTaskPage = {
|
|
|
2828
2913
|
};
|
|
2829
2914
|
export type MtwPickTaskStatus = 'PENDING_REVIEW';
|
|
2830
2915
|
export type MtwPickTaskWorkflow = 'PICK_TO_STAGING';
|
|
2916
|
+
export type MtwPlanDispatchInput = {
|
|
2917
|
+
/** Only shipments due at or after this time (shipments with no due date are always considered). */
|
|
2918
|
+
from?: InputMaybe<Scalars['DateTime']['input']>;
|
|
2919
|
+
/** At most this many assignments, 1 to 50. Default 25. */
|
|
2920
|
+
maxAssignments?: InputMaybe<Scalars['Int']['input']>;
|
|
2921
|
+
/** Plan only these shipments (at most 100). */
|
|
2922
|
+
shipmentIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
2923
|
+
/** Only shipments due at or before this time. */
|
|
2924
|
+
to?: InputMaybe<Scalars['DateTime']['input']>;
|
|
2925
|
+
};
|
|
2831
2926
|
export type MtwProcedureApplicability = {
|
|
2832
2927
|
__typename?: 'MtwProcedureApplicability';
|
|
2833
2928
|
enforcement: MtwProcedureRecordingBoundary;
|
|
@@ -4166,6 +4261,13 @@ export type MtwTripUtilizationSummary = {
|
|
|
4166
4261
|
tripId: Scalars['ID']['output'];
|
|
4167
4262
|
unknownFactsSegmentCount: Scalars['Int']['output'];
|
|
4168
4263
|
};
|
|
4264
|
+
export type MtwUnassignedShipment = {
|
|
4265
|
+
__typename?: 'MtwUnassignedShipment';
|
|
4266
|
+
/** NO_ELIGIBLE_PAIR, FLEET_FULLY_ASSIGNED, OVER_CAPACITY, PLAN_LIMIT_REACHED or NOT_PLANNABLE. */
|
|
4267
|
+
reason: Scalars['String']['output'];
|
|
4268
|
+
shipmentId: Scalars['ID']['output'];
|
|
4269
|
+
shipmentNumber?: Maybe<Scalars['String']['output']>;
|
|
4270
|
+
};
|
|
4169
4271
|
export type MtwUpdateReportInput = {
|
|
4170
4272
|
description?: InputMaybe<Scalars['String']['input']>;
|
|
4171
4273
|
frequency?: InputMaybe<MtwReportFrequency>;
|
|
@@ -4407,6 +4509,12 @@ export type Mutation = {
|
|
|
4407
4509
|
importMtwDrivers: MtwImportResult;
|
|
4408
4510
|
importMtwVehicles: MtwImportResult;
|
|
4409
4511
|
importMtwWarehouses: MtwImportResult;
|
|
4512
|
+
/**
|
|
4513
|
+
* Accept the listed assignments of an open plan and reject the rest. One PLANNED
|
|
4514
|
+
* route is created per accepted assignment, through the normal route checks.
|
|
4515
|
+
* An empty list rejects the whole plan.
|
|
4516
|
+
*/
|
|
4517
|
+
mtwApplyDispatchPlan: MtwDispatchPlan;
|
|
4410
4518
|
/** Register, verify or repair the workspace's scheduled-reports job. Idempotent. */
|
|
4411
4519
|
mtwEnsureReportSchedule?: Maybe<MtwReportSchedule>;
|
|
4412
4520
|
/**
|
|
@@ -4421,6 +4529,14 @@ export type Mutation = {
|
|
|
4421
4529
|
* makes no model call; `narrationStatus` says why.
|
|
4422
4530
|
*/
|
|
4423
4531
|
mtwNarrateShipmentRiskForecast: MtwRiskForecast;
|
|
4532
|
+
/**
|
|
4533
|
+
* Propose vehicle + driver assignments for PLANNED shipments that have no live
|
|
4534
|
+
* route. Proposal only: no route or delivery job is written. A new proposal
|
|
4535
|
+
* expires any older open one.
|
|
4536
|
+
*/
|
|
4537
|
+
mtwPlanDispatch: MtwDispatchPlan;
|
|
4538
|
+
/** Reject every assignment of an open plan. Writes no route or delivery job. */
|
|
4539
|
+
mtwRejectDispatchPlan: MtwDispatchPlan;
|
|
4424
4540
|
/**
|
|
4425
4541
|
* Re-forecast every in-flight shipment of the workspace and notify for any that
|
|
4426
4542
|
* started slipping. Fired by wspace-scheduler-svc as this service's own service
|
|
@@ -4656,9 +4772,19 @@ export type MutationImportMtwVehiclesArgs = {
|
|
|
4656
4772
|
export type MutationImportMtwWarehousesArgs = {
|
|
4657
4773
|
input: MtwImportInput;
|
|
4658
4774
|
};
|
|
4775
|
+
export type MutationMtwApplyDispatchPlanArgs = {
|
|
4776
|
+
accept: Array<Scalars['ID']['input']>;
|
|
4777
|
+
planId: Scalars['ID']['input'];
|
|
4778
|
+
};
|
|
4659
4779
|
export type MutationMtwNarrateShipmentRiskForecastArgs = {
|
|
4660
4780
|
shipmentId: Scalars['ID']['input'];
|
|
4661
4781
|
};
|
|
4782
|
+
export type MutationMtwPlanDispatchArgs = {
|
|
4783
|
+
input?: InputMaybe<MtwPlanDispatchInput>;
|
|
4784
|
+
};
|
|
4785
|
+
export type MutationMtwRejectDispatchPlanArgs = {
|
|
4786
|
+
planId: Scalars['ID']['input'];
|
|
4787
|
+
};
|
|
4662
4788
|
export type MutationMtwRunRiskSweepArgs = {
|
|
4663
4789
|
input?: InputMaybe<MtwRunRiskSweepInput>;
|
|
4664
4790
|
};
|
|
@@ -5015,6 +5141,8 @@ export type Query = {
|
|
|
5015
5141
|
mtwCustomerNotificationSettings: MtwCustomerNotificationSettings;
|
|
5016
5142
|
/** Customer notifications sent or attempted in this workspace, newest first. */
|
|
5017
5143
|
mtwCustomerNotifications: MtwCustomerNotificationPage;
|
|
5144
|
+
mtwDispatchPlan?: Maybe<MtwDispatchPlan>;
|
|
5145
|
+
mtwDispatchPlans: Array<MtwDispatchPlan>;
|
|
5018
5146
|
/** Exact immutable instruction, including a proposal's historical owner; not a current-eligibility claim. */
|
|
5019
5147
|
mtwEmptyReturnInstruction: MtwEmptyReturnInstruction;
|
|
5020
5148
|
mtwEmptyReturnInstructionPage: MtwEmptyReturnInstructionPage;
|
|
@@ -5040,6 +5168,8 @@ export type Query = {
|
|
|
5040
5168
|
* entity create permission.
|
|
5041
5169
|
*/
|
|
5042
5170
|
mtwImportSpec: Array<MtwImportEntitySpec>;
|
|
5171
|
+
/** The workspace's most recent dispatch plan, whatever its status. */
|
|
5172
|
+
mtwLatestDispatchPlan?: Maybe<MtwDispatchPlan>;
|
|
5043
5173
|
/** The workspace's MoveTheWheels operational defaults; platform defaults when none were saved. */
|
|
5044
5174
|
mtwModuleSettings: MtwModuleSettings;
|
|
5045
5175
|
mtwPalletGeometryPreview: MtwPalletGeometryPreview;
|
|
@@ -5315,6 +5445,13 @@ export type QueryMtwCustomerNotificationsArgs = {
|
|
|
5315
5445
|
filter?: InputMaybe<MtwCustomerNotificationFilterInput>;
|
|
5316
5446
|
pagination?: InputMaybe<PaginationInput>;
|
|
5317
5447
|
};
|
|
5448
|
+
export type QueryMtwDispatchPlanArgs = {
|
|
5449
|
+
id: Scalars['ID']['input'];
|
|
5450
|
+
};
|
|
5451
|
+
export type QueryMtwDispatchPlansArgs = {
|
|
5452
|
+
pagination?: InputMaybe<PaginationInput>;
|
|
5453
|
+
status?: InputMaybe<MtwDispatchPlanStatus>;
|
|
5454
|
+
};
|
|
5318
5455
|
export type QueryMtwEmptyReturnInstructionArgs = {
|
|
5319
5456
|
id: Scalars['ID']['input'];
|
|
5320
5457
|
};
|