@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.
@@ -1287,6 +1287,20 @@ export type MtwDashboardMetrics = {
1287
1287
  totalRevenue: Scalars['Float']['output'];
1288
1288
  };
1289
1289
 
1290
+ export type MtwDecisionRationaleStatus =
1291
+ /** AI is switched off for this environment; the planner's own rationale is shown. */
1292
+ | 'AI_DISABLED'
1293
+ /** A model-written summary and rationale are attached. */
1294
+ | 'AVAILABLE'
1295
+ /** The workspace has spent its MoveTheWheels AI credits; no model call was made. */
1296
+ | 'CREDITS_EXHAUSTED'
1297
+ /** The workspace reached its daily AI cap; no model call was made. */
1298
+ | 'DAILY_CAP_REACHED'
1299
+ /** There was nothing to explain (no assignments). */
1300
+ | 'NOT_NEEDED'
1301
+ /** The model could not produce a rationale this time; the plan is unchanged. */
1302
+ | 'UNAVAILABLE';
1303
+
1290
1304
  /**
1291
1305
  * MoveTheWheels-owned operational dispatch unit. It is intentionally not a cart/order
1292
1306
  * system; checkout and order of record remain in global-store-svc StoreOrder.
@@ -1416,6 +1430,84 @@ export type MtwDemandForecastVariance = {
1416
1430
  volumeVariance: Scalars['Int']['output'];
1417
1431
  };
1418
1432
 
1433
+ /** One proposed shipment -> vehicle + driver pairing. */
1434
+ export type MtwDispatchAssignment = {
1435
+ __typename?: 'MtwDispatchAssignment';
1436
+ /** Model-written rationale, when AI produced one. */
1437
+ aiRationale?: Maybe<Scalars['String']['output']>;
1438
+ /** 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. */
1439
+ confidence: Scalars['Float']['output'];
1440
+ decidedAt?: Maybe<Scalars['DateTime']['output']>;
1441
+ decision: MtwDispatchAssignmentDecision;
1442
+ decisionReason?: Maybe<Scalars['String']['output']>;
1443
+ driverId: Scalars['ID']['output'];
1444
+ driverName?: Maybe<Scalars['String']['output']>;
1445
+ estimatedDelivery?: Maybe<Scalars['DateTime']['output']>;
1446
+ estimatedDistanceKm?: Maybe<Scalars['Float']['output']>;
1447
+ estimatedDurationMinutes?: Maybe<Scalars['Float']['output']>;
1448
+ id: Scalars['ID']['output'];
1449
+ planId: Scalars['ID']['output'];
1450
+ /** The planner's own factual rationale. */
1451
+ rationale: Scalars['String']['output'];
1452
+ /** Reason codes behind the pairing, e.g. MAINTENANCE_OK, CAPACITY_FITS, LINKED_PAIR. */
1453
+ reasons: Array<Scalars['String']['output']>;
1454
+ routeId?: Maybe<Scalars['ID']['output']>;
1455
+ sequence: Scalars['Int']['output'];
1456
+ shipmentId: Scalars['ID']['output'];
1457
+ shipmentNumber?: Maybe<Scalars['String']['output']>;
1458
+ vehicleId: Scalars['ID']['output'];
1459
+ vehicleNumber?: Maybe<Scalars['String']['output']>;
1460
+ vehicleType?: Maybe<Scalars['String']['output']>;
1461
+ waypoints: Scalars['JSON']['output'];
1462
+ };
1463
+
1464
+ export type MtwDispatchAssignmentDecision =
1465
+ /** Accepted; routeId is the route that was created. */
1466
+ | 'ACCEPTED'
1467
+ | 'PENDING'
1468
+ | 'REJECTED'
1469
+ /** Accepted, but the shipment, vehicle or driver changed since the proposal; decisionReason says how. No route was created. */
1470
+ | 'STALE';
1471
+
1472
+ export type MtwDispatchPlan = {
1473
+ __typename?: 'MtwDispatchPlan';
1474
+ acceptedCount: Scalars['Int']['output'];
1475
+ /** Provider-qualified model that wrote the rationale, when one did. */
1476
+ aiModel?: Maybe<Scalars['String']['output']>;
1477
+ aiStatus: MtwDecisionRationaleStatus;
1478
+ aiSummary?: Maybe<Scalars['String']['output']>;
1479
+ assignments: Array<MtwDispatchAssignment>;
1480
+ createdAt: Scalars['DateTime']['output'];
1481
+ createdBy: Scalars['String']['output'];
1482
+ decidedAt?: Maybe<Scalars['DateTime']['output']>;
1483
+ decidedBy?: Maybe<Scalars['String']['output']>;
1484
+ expiresAt: Scalars['DateTime']['output'];
1485
+ id: Scalars['ID']['output'];
1486
+ /** The deterministic planner that produced the assignments. */
1487
+ method: Scalars['String']['output'];
1488
+ pendingCount: Scalars['Int']['output'];
1489
+ rejectedCount: Scalars['Int']['output'];
1490
+ staleCount: Scalars['Int']['output'];
1491
+ status: MtwDispatchPlanStatus;
1492
+ unassigned: Array<MtwUnassignedShipment>;
1493
+ windowEnd?: Maybe<Scalars['DateTime']['output']>;
1494
+ windowStart?: Maybe<Scalars['DateTime']['output']>;
1495
+ };
1496
+
1497
+ export type MtwDispatchPlanStatus =
1498
+ /** Every assignment was accepted and has a route. */
1499
+ | 'APPLIED'
1500
+ /** A decision is being applied right now. */
1501
+ | 'APPLYING'
1502
+ /** The plan was superseded by a newer one or passed its expiry without a decision. */
1503
+ | 'EXPIRED'
1504
+ /** Some assignments were accepted; the rest were rejected or had gone stale. */
1505
+ | 'PARTIALLY_APPLIED'
1506
+ /** Waiting for a decision. */
1507
+ | 'PROPOSED'
1508
+ /** No assignment was accepted; nothing was written. */
1509
+ | 'REJECTED';
1510
+
1419
1511
  /** Unit MoveTheWheels shows distances in. */
1420
1512
  export type MtwDistanceUnit =
1421
1513
  /** Kilometres */
@@ -2944,6 +3036,7 @@ export type MtwIntegrationProvider =
2944
3036
  | 'FOURKITES'
2945
3037
  | 'GENERIC_WEBHOOK'
2946
3038
  | 'PROJECT44'
3039
+ | 'SAMSARA'
2947
3040
  | 'SHIPROCKET';
2948
3041
 
2949
3042
  export type MtwInventoryItem = {
@@ -3402,6 +3495,17 @@ export type MtwPickTaskStatus =
3402
3495
  export type MtwPickTaskWorkflow =
3403
3496
  | 'PICK_TO_STAGING';
3404
3497
 
3498
+ export type MtwPlanDispatchInput = {
3499
+ /** Only shipments due at or after this time (shipments with no due date are always considered). */
3500
+ from?: InputMaybe<Scalars['DateTime']['input']>;
3501
+ /** At most this many assignments, 1 to 50. Default 25. */
3502
+ maxAssignments?: InputMaybe<Scalars['Int']['input']>;
3503
+ /** Plan only these shipments (at most 100). */
3504
+ shipmentIds?: InputMaybe<Array<Scalars['ID']['input']>>;
3505
+ /** Only shipments due at or before this time. */
3506
+ to?: InputMaybe<Scalars['DateTime']['input']>;
3507
+ };
3508
+
3405
3509
  export type MtwProcedureApplicability = {
3406
3510
  __typename?: 'MtwProcedureApplicability';
3407
3511
  enforcement: MtwProcedureRecordingBoundary;
@@ -5014,6 +5118,14 @@ export type MtwTripUtilizationSummary = {
5014
5118
  unknownFactsSegmentCount: Scalars['Int']['output'];
5015
5119
  };
5016
5120
 
5121
+ export type MtwUnassignedShipment = {
5122
+ __typename?: 'MtwUnassignedShipment';
5123
+ /** NO_ELIGIBLE_PAIR, FLEET_FULLY_ASSIGNED, OVER_CAPACITY, PLAN_LIMIT_REACHED or NOT_PLANNABLE. */
5124
+ reason: Scalars['String']['output'];
5125
+ shipmentId: Scalars['ID']['output'];
5126
+ shipmentNumber?: Maybe<Scalars['String']['output']>;
5127
+ };
5128
+
5017
5129
  export type MtwUpdateReportInput = {
5018
5130
  description?: InputMaybe<Scalars['String']['input']>;
5019
5131
  frequency?: InputMaybe<MtwReportFrequency>;
@@ -5297,6 +5409,12 @@ export type Mutation = {
5297
5409
  importMtwDrivers: MtwImportResult;
5298
5410
  importMtwVehicles: MtwImportResult;
5299
5411
  importMtwWarehouses: MtwImportResult;
5412
+ /**
5413
+ * Accept the listed assignments of an open plan and reject the rest. One PLANNED
5414
+ * route is created per accepted assignment, through the normal route checks.
5415
+ * An empty list rejects the whole plan.
5416
+ */
5417
+ mtwApplyDispatchPlan: MtwDispatchPlan;
5300
5418
  /** Register, verify or repair the workspace's scheduled-reports job. Idempotent. */
5301
5419
  mtwEnsureReportSchedule?: Maybe<MtwReportSchedule>;
5302
5420
  /**
@@ -5311,6 +5429,14 @@ export type Mutation = {
5311
5429
  * makes no model call; `narrationStatus` says why.
5312
5430
  */
5313
5431
  mtwNarrateShipmentRiskForecast: MtwRiskForecast;
5432
+ /**
5433
+ * Propose vehicle + driver assignments for PLANNED shipments that have no live
5434
+ * route. Proposal only: no route or delivery job is written. A new proposal
5435
+ * expires any older open one.
5436
+ */
5437
+ mtwPlanDispatch: MtwDispatchPlan;
5438
+ /** Reject every assignment of an open plan. Writes no route or delivery job. */
5439
+ mtwRejectDispatchPlan: MtwDispatchPlan;
5314
5440
  /**
5315
5441
  * Re-forecast every in-flight shipment of the workspace and notify for any that
5316
5442
  * started slipping. Fired by wspace-scheduler-svc as this service's own service
@@ -5650,11 +5776,27 @@ export type MutationImportMtwWarehousesArgs = {
5650
5776
  };
5651
5777
 
5652
5778
 
5779
+ export type MutationMtwApplyDispatchPlanArgs = {
5780
+ accept: Array<Scalars['ID']['input']>;
5781
+ planId: Scalars['ID']['input'];
5782
+ };
5783
+
5784
+
5653
5785
  export type MutationMtwNarrateShipmentRiskForecastArgs = {
5654
5786
  shipmentId: Scalars['ID']['input'];
5655
5787
  };
5656
5788
 
5657
5789
 
5790
+ export type MutationMtwPlanDispatchArgs = {
5791
+ input?: InputMaybe<MtwPlanDispatchInput>;
5792
+ };
5793
+
5794
+
5795
+ export type MutationMtwRejectDispatchPlanArgs = {
5796
+ planId: Scalars['ID']['input'];
5797
+ };
5798
+
5799
+
5658
5800
  export type MutationMtwRunRiskSweepArgs = {
5659
5801
  input?: InputMaybe<MtwRunRiskSweepInput>;
5660
5802
  };
@@ -6147,6 +6289,8 @@ export type Query = {
6147
6289
  mtwCustomerNotificationSettings: MtwCustomerNotificationSettings;
6148
6290
  /** Customer notifications sent or attempted in this workspace, newest first. */
6149
6291
  mtwCustomerNotifications: MtwCustomerNotificationPage;
6292
+ mtwDispatchPlan?: Maybe<MtwDispatchPlan>;
6293
+ mtwDispatchPlans: Array<MtwDispatchPlan>;
6150
6294
  /** Exact immutable instruction, including a proposal's historical owner; not a current-eligibility claim. */
6151
6295
  mtwEmptyReturnInstruction: MtwEmptyReturnInstruction;
6152
6296
  mtwEmptyReturnInstructionPage: MtwEmptyReturnInstructionPage;
@@ -6172,6 +6316,8 @@ export type Query = {
6172
6316
  * entity create permission.
6173
6317
  */
6174
6318
  mtwImportSpec: Array<MtwImportEntitySpec>;
6319
+ /** The workspace's most recent dispatch plan, whatever its status. */
6320
+ mtwLatestDispatchPlan?: Maybe<MtwDispatchPlan>;
6175
6321
  /** The workspace's MoveTheWheels operational defaults; platform defaults when none were saved. */
6176
6322
  mtwModuleSettings: MtwModuleSettings;
6177
6323
  mtwPalletGeometryPreview: MtwPalletGeometryPreview;
@@ -6555,6 +6701,17 @@ export type QueryMtwCustomerNotificationsArgs = {
6555
6701
  };
6556
6702
 
6557
6703
 
6704
+ export type QueryMtwDispatchPlanArgs = {
6705
+ id: Scalars['ID']['input'];
6706
+ };
6707
+
6708
+
6709
+ export type QueryMtwDispatchPlansArgs = {
6710
+ pagination?: InputMaybe<PaginationInput>;
6711
+ status?: InputMaybe<MtwDispatchPlanStatus>;
6712
+ };
6713
+
6714
+
6558
6715
  export type QueryMtwEmptyReturnInstructionArgs = {
6559
6716
  id: Scalars['ID']['input'];
6560
6717
  };