@burdenoff/microfe-movethewheels 2026.1108.3 → 2026.1108.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/generated/tracking-quality-operations.d.ts +328 -1
- package/dist/hooks/useCarrierIntegrations.js +30 -29
- package/dist/movethewheels/hooks/useCarrierIntegrations.d.ts +9 -3
- package/dist/movethewheels/utils/carrierIntegrations.d.ts +90 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/cloud-download.js +18 -0
- package/dist/pages/IntegrationsPage.js +551 -329
- package/dist/utils/carrierIntegrations.js +127 -30
- package/package.json +1 -1
- package/src/generated/tracking-quality-operations.ts +373 -0
- package/src/movethewheels/hooks/useCarrierIntegrations.ts +19 -2
- package/src/movethewheels/pages/IntegrationsPage.tsx +292 -36
- package/src/movethewheels/utils/carrierIntegrations.ts +252 -10
|
@@ -470,6 +470,21 @@ export type IntegrationStatus =
|
|
|
470
470
|
| 'DISABLED'
|
|
471
471
|
| 'PAUSED';
|
|
472
472
|
|
|
473
|
+
export type InventoryCoverPlanInput = {
|
|
474
|
+
/** Scenario demand change applied to every forecast, -100 to 500 percent. Default 0. */
|
|
475
|
+
demandChangePct?: InputMaybe<Scalars['Float']['input']>;
|
|
476
|
+
/** Weeks between ordering and receiving stock, 0-26. Default 2. */
|
|
477
|
+
leadTimeWeeks?: InputMaybe<Scalars['Float']['input']>;
|
|
478
|
+
/** Maximum rows returned, 1-1000. Default 200. */
|
|
479
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
480
|
+
/** Only return rows in these statuses. The summary always counts every row. */
|
|
481
|
+
statuses?: InputMaybe<Array<MtwInventoryCoverStatus>>;
|
|
482
|
+
/** Weeks of demand a replenishment should cover once it lands, 1-52. Default 6. */
|
|
483
|
+
targetCoverWeeks?: InputMaybe<Scalars['Float']['input']>;
|
|
484
|
+
/** Only plan this warehouse. Omit for every warehouse. */
|
|
485
|
+
warehouseId?: InputMaybe<Scalars['ID']['input']>;
|
|
486
|
+
};
|
|
487
|
+
|
|
473
488
|
export type InventoryFilterInput = {
|
|
474
489
|
cargoItemId?: InputMaybe<Scalars['ID']['input']>;
|
|
475
490
|
inventoryItemId?: InputMaybe<Scalars['ID']['input']>;
|
|
@@ -1405,11 +1420,54 @@ export type MtwDeliveryJobStatusHistory = {
|
|
|
1405
1420
|
workspaceId: Scalars['ID']['output'];
|
|
1406
1421
|
};
|
|
1407
1422
|
|
|
1423
|
+
/** The model that produced a forecast row. */
|
|
1424
|
+
export type MtwDemandForecastModel =
|
|
1425
|
+
/** Reserved; never produced. Read as the moving-average heuristic. */
|
|
1426
|
+
| 'HEURISTIC_GROWTH_RATE'
|
|
1427
|
+
/** Blend of 4- and 12-week moving averages with a clamped growth term. */
|
|
1428
|
+
| 'HEURISTIC_MOVING_AVG'
|
|
1429
|
+
/** Holt's linear trend exponential smoothing with a damped trend. */
|
|
1430
|
+
| 'HOLT_LINEAR'
|
|
1431
|
+
/** Additive Holt-Winters exponential smoothing with a damped trend and a seasonal cycle in weeks. */
|
|
1432
|
+
| 'HOLT_WINTERS';
|
|
1433
|
+
|
|
1434
|
+
/** Which model forecasts a lane or customer, and why. */
|
|
1435
|
+
export type MtwDemandForecastModelChoice = {
|
|
1436
|
+
__typename?: 'MtwDemandForecastModelChoice';
|
|
1437
|
+
candidates: Array<MtwDemandForecastModelScore>;
|
|
1438
|
+
evaluatedAt: Scalars['DateTime']['output'];
|
|
1439
|
+
/** Closed weeks of history the forecast rests on. */
|
|
1440
|
+
historyWeeks: Scalars['Int']['output'];
|
|
1441
|
+
/** Plain-language reason for the choice, quoting the back-test errors. */
|
|
1442
|
+
reason: Scalars['String']['output'];
|
|
1443
|
+
scopeKey: Scalars['String']['output'];
|
|
1444
|
+
/** Display name: the customer's name for CUSTOMER rows, `Origin → Destination` for LANE rows. */
|
|
1445
|
+
scopeLabel: Scalars['String']['output'];
|
|
1446
|
+
scopeType: DemandForecastScope;
|
|
1447
|
+
selectedModel: MtwDemandForecastModel;
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
/** One candidate model's back-test result for a lane or customer. */
|
|
1451
|
+
export type MtwDemandForecastModelScore = {
|
|
1452
|
+
__typename?: 'MtwDemandForecastModelScore';
|
|
1453
|
+
/** Closed weeks the model was scored on, predicting each one week ahead. */
|
|
1454
|
+
holdoutWeeks: Scalars['Int']['output'];
|
|
1455
|
+
/** Mean absolute percentage error on weekly volume over the back-test weeks (0.25 = 25%). Null when no back-test week had demand. */
|
|
1456
|
+
mape?: Maybe<Scalars['Float']['output']>;
|
|
1457
|
+
model: MtwDemandForecastModel;
|
|
1458
|
+
/** Holt-Winters only: weeks in the seasonal cycle that scored best. */
|
|
1459
|
+
seasonLengthWeeks?: Maybe<Scalars['Int']['output']>;
|
|
1460
|
+
/** This model produces the lane's or customer's forecast. */
|
|
1461
|
+
selected: Scalars['Boolean']['output'];
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1408
1464
|
export type MtwDemandForecastPoint = {
|
|
1409
1465
|
__typename?: 'MtwDemandForecastPoint';
|
|
1410
1466
|
actualRevenue?: Maybe<Scalars['Float']['output']>;
|
|
1411
1467
|
actualVolume?: Maybe<Scalars['Int']['output']>;
|
|
1412
1468
|
confidence: Scalars['Float']['output'];
|
|
1469
|
+
/** The model this row was forecast with. */
|
|
1470
|
+
model: MtwDemandForecastModel;
|
|
1413
1471
|
periodEnd: Scalars['DateTime']['output'];
|
|
1414
1472
|
periodStart: Scalars['DateTime']['output'];
|
|
1415
1473
|
predictedRevenue: Scalars['Float']['output'];
|
|
@@ -1578,6 +1636,57 @@ export type MtwDistanceUnit =
|
|
|
1578
1636
|
/** Miles */
|
|
1579
1637
|
| 'MI';
|
|
1580
1638
|
|
|
1639
|
+
/**
|
|
1640
|
+
* A single extraction run over one platform File. `acceptedFields` is exactly
|
|
1641
|
+
* what a human accepted, `appliedActions` records what those accepts did —
|
|
1642
|
+
* the audit trail for a dispute is which file was read and which fields a
|
|
1643
|
+
* human accepted.
|
|
1644
|
+
*/
|
|
1645
|
+
export type MtwDocumentExtraction = {
|
|
1646
|
+
__typename?: 'MtwDocumentExtraction';
|
|
1647
|
+
acceptedFields: Array<Scalars['String']['output']>;
|
|
1648
|
+
appliedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
1649
|
+
appliedBy?: Maybe<Scalars['String']['output']>;
|
|
1650
|
+
costMicroUsd?: Maybe<Scalars['String']['output']>;
|
|
1651
|
+
createdAt: Scalars['DateTime']['output'];
|
|
1652
|
+
createdBy: Scalars['String']['output'];
|
|
1653
|
+
docType: MtwDocumentType;
|
|
1654
|
+
fields: Array<MtwExtractionField>;
|
|
1655
|
+
fileId: Scalars['ID']['output'];
|
|
1656
|
+
id: Scalars['ID']['output'];
|
|
1657
|
+
model: Scalars['String']['output'];
|
|
1658
|
+
shipmentId?: Maybe<Scalars['ID']['output']>;
|
|
1659
|
+
status: MtwDocumentExtractionStatus;
|
|
1660
|
+
workspaceId: Scalars['ID']['output'];
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
export type MtwDocumentExtractionStatus =
|
|
1664
|
+
| 'APPLIED'
|
|
1665
|
+
| 'PARTIALLY_APPLIED'
|
|
1666
|
+
| 'PROPOSED';
|
|
1667
|
+
|
|
1668
|
+
/**
|
|
1669
|
+
* Freight document intelligence (BOFF-3892).
|
|
1670
|
+
*
|
|
1671
|
+
* A vision model reads a freight document (BOL / POD / carrier invoice / packing
|
|
1672
|
+
* list) attached to a MoveTheWheels entity as a platform File and PROPOSES typed
|
|
1673
|
+
* fields with per-field confidence. The extraction writes nothing to the
|
|
1674
|
+
* operations spine by itself: a human reviews the proposed fields and accepts
|
|
1675
|
+
* them per-field through mtwApplyDocumentExtraction, and only the accepted,
|
|
1676
|
+
* mapped fields perform writes — a POD acceptance advances its shipment through
|
|
1677
|
+
* the normal ShipmentService.addTrackingEvent path, a carrier-invoice
|
|
1678
|
+
* acceptance records a freight-invoice comparison (variance) against the pinned
|
|
1679
|
+
* estimate. The model call is metered and ledgered on the shared AI runtime
|
|
1680
|
+
* (BOFF-3601) and made with store:false; extracted values stay in this
|
|
1681
|
+
* workspace's tables with the same lifecycle as the source file and are never
|
|
1682
|
+
* surfaced as assistant pageContext.
|
|
1683
|
+
*/
|
|
1684
|
+
export type MtwDocumentType =
|
|
1685
|
+
| 'BILL_OF_LADING'
|
|
1686
|
+
| 'CARRIER_INVOICE'
|
|
1687
|
+
| 'PACKING_LIST'
|
|
1688
|
+
| 'PROOF_OF_DELIVERY';
|
|
1689
|
+
|
|
1581
1690
|
export type MtwDriver = {
|
|
1582
1691
|
__typename?: 'MtwDriver';
|
|
1583
1692
|
baseSalary?: Maybe<Scalars['Float']['output']>;
|
|
@@ -1777,6 +1886,21 @@ export type MtwExportJob = {
|
|
|
1777
1886
|
workspaceId: Scalars['ID']['output'];
|
|
1778
1887
|
};
|
|
1779
1888
|
|
|
1889
|
+
export type MtwExtractionCorrectionInput = {
|
|
1890
|
+
key: Scalars['String']['input'];
|
|
1891
|
+
value: Scalars['String']['input'];
|
|
1892
|
+
};
|
|
1893
|
+
|
|
1894
|
+
/** One extracted field: a bounded, normalized value with the model's confidence in it. */
|
|
1895
|
+
export type MtwExtractionField = {
|
|
1896
|
+
__typename?: 'MtwExtractionField';
|
|
1897
|
+
confidence: Scalars['Float']['output'];
|
|
1898
|
+
key: Scalars['String']['output'];
|
|
1899
|
+
label: Scalars['String']['output'];
|
|
1900
|
+
/** Normalized value (ISO dates, plain numbers, JSON text for line items); null when the document did not show it. */
|
|
1901
|
+
value?: Maybe<Scalars['String']['output']>;
|
|
1902
|
+
};
|
|
1903
|
+
|
|
1780
1904
|
export type MtwFinanceMetrics = {
|
|
1781
1905
|
__typename?: 'MtwFinanceMetrics';
|
|
1782
1906
|
fuelCost: Scalars['Float']['output'];
|
|
@@ -3053,6 +3177,8 @@ export type MtwIntegration = {
|
|
|
3053
3177
|
lastSyncAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3054
3178
|
name: Scalars['String']['output'];
|
|
3055
3179
|
onBehalfOf: Scalars['String']['output'];
|
|
3180
|
+
/** Outcome of the latest poll for a pull-based integration (Geotab); null for webhook providers or before the first poll. */
|
|
3181
|
+
pollStatus?: Maybe<MtwIntegrationPollStatus>;
|
|
3056
3182
|
provider: MtwIntegrationProvider;
|
|
3057
3183
|
status: IntegrationStatus;
|
|
3058
3184
|
updatedAt: Scalars['DateTime']['output'];
|
|
@@ -3094,14 +3220,170 @@ export type MtwIntegrationIngestReceipt = {
|
|
|
3094
3220
|
workspaceId: Scalars['ID']['output'];
|
|
3095
3221
|
};
|
|
3096
3222
|
|
|
3223
|
+
/** One integration's result in a poll run. */
|
|
3224
|
+
export type MtwIntegrationPollResult = {
|
|
3225
|
+
__typename?: 'MtwIntegrationPollResult';
|
|
3226
|
+
error?: Maybe<Scalars['String']['output']>;
|
|
3227
|
+
integrationId: Scalars['ID']['output'];
|
|
3228
|
+
recordsFetched: Scalars['Int']['output'];
|
|
3229
|
+
/** Why a poll was skipped: POLL_IN_PROGRESS, BACKING_OFF or STATE_UNAVAILABLE. */
|
|
3230
|
+
skippedReason?: Maybe<Scalars['String']['output']>;
|
|
3231
|
+
/** OK, PARTIAL, FAILED or SKIPPED. */
|
|
3232
|
+
status: Scalars['String']['output'];
|
|
3233
|
+
updatesAccepted: Scalars['Int']['output'];
|
|
3234
|
+
updatesSkipped: Scalars['Int']['output'];
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3237
|
+
export type MtwIntegrationPollRun = {
|
|
3238
|
+
__typename?: 'MtwIntegrationPollRun';
|
|
3239
|
+
integrationsFailed: Scalars['Int']['output'];
|
|
3240
|
+
integrationsPolled: Scalars['Int']['output'];
|
|
3241
|
+
ranAt: Scalars['DateTime']['output'];
|
|
3242
|
+
results: Array<MtwIntegrationPollResult>;
|
|
3243
|
+
updatesAccepted: Scalars['Int']['output'];
|
|
3244
|
+
};
|
|
3245
|
+
|
|
3246
|
+
/** The workspace's integration-polls scheduler job. */
|
|
3247
|
+
export type MtwIntegrationPollSchedule = {
|
|
3248
|
+
__typename?: 'MtwIntegrationPollSchedule';
|
|
3249
|
+
cronExpression: Scalars['String']['output'];
|
|
3250
|
+
id: Scalars['ID']['output'];
|
|
3251
|
+
lastError?: Maybe<Scalars['String']['output']>;
|
|
3252
|
+
lastFiredAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3253
|
+
schedulerJobId?: Maybe<Scalars['String']['output']>;
|
|
3254
|
+
/** PENDING, REGISTERING, ACTIVE or FAILED. */
|
|
3255
|
+
status: Scalars['String']['output'];
|
|
3256
|
+
timezone: Scalars['String']['output'];
|
|
3257
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
3258
|
+
workspaceId: Scalars['ID']['output'];
|
|
3259
|
+
};
|
|
3260
|
+
|
|
3261
|
+
/** State of a pull-based integration's polling (BOFF-10922). */
|
|
3262
|
+
export type MtwIntegrationPollStatus = {
|
|
3263
|
+
__typename?: 'MtwIntegrationPollStatus';
|
|
3264
|
+
consecutiveFailures: Scalars['Int']['output'];
|
|
3265
|
+
integrationId: Scalars['ID']['output'];
|
|
3266
|
+
lastErrorAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3267
|
+
lastPollAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3268
|
+
lastPollError?: Maybe<Scalars['String']['output']>;
|
|
3269
|
+
/** OK, PARTIAL (some updates were rejected) or FAILED. */
|
|
3270
|
+
lastPollStatus?: Maybe<Scalars['String']['output']>;
|
|
3271
|
+
lastRecordsFetched: Scalars['Int']['output'];
|
|
3272
|
+
lastSuccessAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3273
|
+
lastUpdatesAccepted: Scalars['Int']['output'];
|
|
3274
|
+
/** Records skipped because their vehicle is unknown or has no in-progress route. */
|
|
3275
|
+
lastUpdatesSkipped: Scalars['Int']['output'];
|
|
3276
|
+
};
|
|
3277
|
+
|
|
3097
3278
|
export type MtwIntegrationProvider =
|
|
3098
3279
|
| 'DESCARTES'
|
|
3099
3280
|
| 'FOURKITES'
|
|
3100
3281
|
| 'GENERIC_WEBHOOK'
|
|
3282
|
+
| 'GEOTAB'
|
|
3101
3283
|
| 'PROJECT44'
|
|
3102
3284
|
| 'SAMSARA'
|
|
3103
3285
|
| 'SHIPROCKET';
|
|
3104
3286
|
|
|
3287
|
+
export type MtwInventoryCoverPlan = {
|
|
3288
|
+
__typename?: 'MtwInventoryCoverPlan';
|
|
3289
|
+
demandChangePct: Scalars['Float']['output'];
|
|
3290
|
+
generatedAt: Scalars['DateTime']['output'];
|
|
3291
|
+
/** End of the history window: the Monday the current week began. */
|
|
3292
|
+
historyEnd: Scalars['DateTime']['output'];
|
|
3293
|
+
/** First day (Monday) of the closed-week history window. */
|
|
3294
|
+
historyStart: Scalars['DateTime']['output'];
|
|
3295
|
+
historyWeeks: Scalars['Int']['output'];
|
|
3296
|
+
leadTimeWeeks: Scalars['Float']['output'];
|
|
3297
|
+
/** Rows matching the status filter, before the limit. */
|
|
3298
|
+
matchingItems: Scalars['Int']['output'];
|
|
3299
|
+
rows: Array<MtwInventoryCoverRow>;
|
|
3300
|
+
summary: MtwInventoryCoverSummary;
|
|
3301
|
+
targetCoverWeeks: Scalars['Float']['output'];
|
|
3302
|
+
/** More stock lines or delivery jobs existed than were read; the plan covers the newest. */
|
|
3303
|
+
truncated: Scalars['Boolean']['output'];
|
|
3304
|
+
unattributedJobs: Scalars['Int']['output'];
|
|
3305
|
+
/** Outbound units of stocked SKUs whose pickup warehouse could not be resolved (workspace-wide). */
|
|
3306
|
+
unattributedUnits: Scalars['Float']['output'];
|
|
3307
|
+
warehouseId?: Maybe<Scalars['ID']['output']>;
|
|
3308
|
+
};
|
|
3309
|
+
|
|
3310
|
+
/** One warehouse and SKU: stock on hand against forecast outbound demand. */
|
|
3311
|
+
export type MtwInventoryCoverRow = {
|
|
3312
|
+
__typename?: 'MtwInventoryCoverRow';
|
|
3313
|
+
allocated: Scalars['Int']['output'];
|
|
3314
|
+
available: Scalars['Int']['output'];
|
|
3315
|
+
/** Forecast weekly units before the scenario demand change. */
|
|
3316
|
+
baselineWeeklyDemand?: Maybe<Scalars['Float']['output']>;
|
|
3317
|
+
cargoItemId: Scalars['ID']['output'];
|
|
3318
|
+
/** Units shipped so far this (open) week. Not part of the history. */
|
|
3319
|
+
currentWeekUnits: Scalars['Float']['output'];
|
|
3320
|
+
damaged: Scalars['Int']['output'];
|
|
3321
|
+
demandStatus: MtwInventoryDemandStatus;
|
|
3322
|
+
/** Forecast weekly units after the scenario demand change. */
|
|
3323
|
+
forecastWeeklyDemand?: Maybe<Scalars['Float']['output']>;
|
|
3324
|
+
/** The stock lines (locations) aggregated into this position. */
|
|
3325
|
+
inventoryItemIds: Array<Scalars['ID']['output']>;
|
|
3326
|
+
name: Scalars['String']['output'];
|
|
3327
|
+
onHand: Scalars['Int']['output'];
|
|
3328
|
+
/** Monday of the ISO week stock is projected to run out, within two years. */
|
|
3329
|
+
projectedStockOutWeek?: Maybe<Scalars['DateTime']['output']>;
|
|
3330
|
+
reorderPoint?: Maybe<Scalars['Int']['output']>;
|
|
3331
|
+
safetyStock?: Maybe<Scalars['Int']['output']>;
|
|
3332
|
+
sku: Scalars['String']['output'];
|
|
3333
|
+
status: MtwInventoryCoverStatus;
|
|
3334
|
+
/** Stock runs out before a replenishment ordered now would arrive. */
|
|
3335
|
+
stockOutBeforeLeadTime: Scalars['Boolean']['output'];
|
|
3336
|
+
/** Units to order now so the target cover (plus safety stock) is on hand when the order lands. */
|
|
3337
|
+
suggestedReorderQuantity?: Maybe<Scalars['Int']['output']>;
|
|
3338
|
+
/** On hand minus damaged: the stock that can still ship. */
|
|
3339
|
+
usableStock: Scalars['Int']['output'];
|
|
3340
|
+
warehouseCode: Scalars['String']['output'];
|
|
3341
|
+
warehouseId: Scalars['ID']['output'];
|
|
3342
|
+
warehouseName: Scalars['String']['output'];
|
|
3343
|
+
/** Units shipped per closed ISO week of the history window, oldest first. */
|
|
3344
|
+
weeklyUnits: Array<Scalars['Float']['output']>;
|
|
3345
|
+
/** Usable stock divided by forecast weekly demand. */
|
|
3346
|
+
weeksOfCover?: Maybe<Scalars['Float']['output']>;
|
|
3347
|
+
/** Closed weeks the demand rate rests on. */
|
|
3348
|
+
weeksOfHistory: Scalars['Int']['output'];
|
|
3349
|
+
};
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* Where a stock position stands against forecast outbound demand (BOFF-10926).
|
|
3353
|
+
* Statuses are listed most urgent first.
|
|
3354
|
+
*/
|
|
3355
|
+
export type MtwInventoryCoverStatus =
|
|
3356
|
+
/** Stock runs out before a replenishment ordered now would arrive (cover below the lead time). */
|
|
3357
|
+
| 'AT_RISK'
|
|
3358
|
+
/** Stock covers the lead time and the target cover. */
|
|
3359
|
+
| 'HEALTHY'
|
|
3360
|
+
/** Fewer than 4 closed weeks since the first outbound: no demand forecast yet. */
|
|
3361
|
+
| 'NOT_ENOUGH_HISTORY'
|
|
3362
|
+
/** No outbound in the history window. */
|
|
3363
|
+
| 'NO_DEMAND'
|
|
3364
|
+
/** Demand is forecast and there is no usable stock left. */
|
|
3365
|
+
| 'OUT_OF_STOCK'
|
|
3366
|
+
/** Order now to hold the target cover, or the stock is at or below its reorder point. */
|
|
3367
|
+
| 'REORDER';
|
|
3368
|
+
|
|
3369
|
+
export type MtwInventoryCoverSummary = {
|
|
3370
|
+
__typename?: 'MtwInventoryCoverSummary';
|
|
3371
|
+
atRisk: Scalars['Int']['output'];
|
|
3372
|
+
healthy: Scalars['Int']['output'];
|
|
3373
|
+
noDemand: Scalars['Int']['output'];
|
|
3374
|
+
notEnoughHistory: Scalars['Int']['output'];
|
|
3375
|
+
outOfStock: Scalars['Int']['output'];
|
|
3376
|
+
reorder: Scalars['Int']['output'];
|
|
3377
|
+
totalItems: Scalars['Int']['output'];
|
|
3378
|
+
totalSuggestedReorderQuantity: Scalars['Int']['output'];
|
|
3379
|
+
};
|
|
3380
|
+
|
|
3381
|
+
/** Whether a stock position has a demand forecast. */
|
|
3382
|
+
export type MtwInventoryDemandStatus =
|
|
3383
|
+
| 'FORECAST'
|
|
3384
|
+
| 'NOT_ENOUGH_HISTORY'
|
|
3385
|
+
| 'NO_DEMAND';
|
|
3386
|
+
|
|
3105
3387
|
export type MtwInventoryItem = {
|
|
3106
3388
|
__typename?: 'MtwInventoryItem';
|
|
3107
3389
|
allocated: Scalars['Int']['output'];
|
|
@@ -4387,6 +4669,12 @@ export type MtwRouteStats = {
|
|
|
4387
4669
|
totalDuration: Scalars['Float']['output'];
|
|
4388
4670
|
};
|
|
4389
4671
|
|
|
4672
|
+
/** Scheduler execution context, added by wspace-scheduler-svc when it fires the job. */
|
|
4673
|
+
export type MtwRunIntegrationPollsInput = {
|
|
4674
|
+
idempotencyKey?: InputMaybe<Scalars['String']['input']>;
|
|
4675
|
+
triggerData?: InputMaybe<Scalars['JSON']['input']>;
|
|
4676
|
+
};
|
|
4677
|
+
|
|
4390
4678
|
/**
|
|
4391
4679
|
* Set by wspace-scheduler-svc at fire time: idempotencyKey is
|
|
4392
4680
|
* "<scheduleId>:<scheduledTime>" and triggerData carries scheduledTime, firedAt,
|
|
@@ -5680,6 +5968,17 @@ export type Mutation = {
|
|
|
5680
5968
|
* An empty list rejects the whole plan.
|
|
5681
5969
|
*/
|
|
5682
5970
|
mtwApplyDispatchPlan: MtwDispatchPlan;
|
|
5971
|
+
/**
|
|
5972
|
+
* Accept extracted fields per-field. Accepts are cumulative and idempotent;
|
|
5973
|
+
* the writes each accepted field triggers happen once. POD accepts advance
|
|
5974
|
+
* the referenced shipment via ShipmentService.addTrackingEvent(DELIVERED);
|
|
5975
|
+
* invoice accepts record a freight-invoice comparison against the shipment's
|
|
5976
|
+
* pinned estimate. Fields with no write mapping are recorded as accepted
|
|
5977
|
+
* (audit) without a write.
|
|
5978
|
+
*/
|
|
5979
|
+
mtwApplyDocumentExtraction: MtwDocumentExtraction;
|
|
5980
|
+
/** Register, verify or repair the workspace's integration-polls job. Idempotent. */
|
|
5981
|
+
mtwEnsureIntegrationPollSchedule?: Maybe<MtwIntegrationPollSchedule>;
|
|
5683
5982
|
/** Register, verify or repair the workspace's scheduled-reports job. Idempotent. */
|
|
5684
5983
|
mtwEnsureReportSchedule?: Maybe<MtwReportSchedule>;
|
|
5685
5984
|
/**
|
|
@@ -5687,6 +5986,13 @@ export type Mutation = {
|
|
|
5687
5986
|
* scheduler. Idempotent; leaves a job an operator paused alone.
|
|
5688
5987
|
*/
|
|
5689
5988
|
mtwEnsureRiskSweepSchedule?: Maybe<MtwRiskSweepSchedule>;
|
|
5989
|
+
/**
|
|
5990
|
+
* Run the shared vision model over a platform File and store the proposed
|
|
5991
|
+
* fields. Reads the file bytes through wspace-files-svc (presigned URL),
|
|
5992
|
+
* gates on checkAiCreditsFor and charges + ledger-records the call on the
|
|
5993
|
+
* shared AI runtime. Writes nothing onto orders / shipments / invoices.
|
|
5994
|
+
*/
|
|
5995
|
+
mtwExtractDocument: MtwDocumentExtraction;
|
|
5690
5996
|
/**
|
|
5691
5997
|
* Generate (or reuse) the AI narration for a shipment's current risk forecast
|
|
5692
5998
|
* and return the forecast with it attached. With AI disabled, credits spent or
|
|
@@ -5716,6 +6022,12 @@ export type Mutation = {
|
|
|
5716
6022
|
* Refused when the shipment is neither at risk nor past its promise.
|
|
5717
6023
|
*/
|
|
5718
6024
|
mtwResolveException: MtwShipmentDecision;
|
|
6025
|
+
/**
|
|
6026
|
+
* Poll every active pull-based integration of the workspace. Fired every few
|
|
6027
|
+
* minutes by wspace-scheduler-svc as this service's own service actor; a
|
|
6028
|
+
* workspace user may also run it on demand.
|
|
6029
|
+
*/
|
|
6030
|
+
mtwRunIntegrationPolls: MtwIntegrationPollRun;
|
|
5719
6031
|
/**
|
|
5720
6032
|
* Re-forecast every in-flight shipment of the workspace and notify for any that
|
|
5721
6033
|
* started slipping. Fired by wspace-scheduler-svc as this service's own service
|
|
@@ -5732,7 +6044,10 @@ export type Mutation = {
|
|
|
5732
6044
|
openMtwFreeTimeClock: MtwFreeTimeClock;
|
|
5733
6045
|
optimizeRoute: MtwRoute;
|
|
5734
6046
|
planMultiModalShipment: MtwShipment;
|
|
6047
|
+
/** Poll one pull-based integration (Geotab) now, outside its schedule. */
|
|
6048
|
+
pollIntegrationNow: MtwIntegrationPollResult;
|
|
5735
6049
|
publishMtwProcedureVersion: MtwProcedureVersion;
|
|
6050
|
+
/** Recalculate now. `weeksOfHistory` is clamped to 4-104 closed weeks. */
|
|
5736
6051
|
recalculateDemandForecasts: Scalars['Int']['output'];
|
|
5737
6052
|
recordMtwConsolidationObservation: MtwConsolidationObservation;
|
|
5738
6053
|
recordMtwContainerEvent: MtwContainerEvent;
|
|
@@ -6067,6 +6382,19 @@ export type MutationMtwApplyDispatchPlanArgs = {
|
|
|
6067
6382
|
};
|
|
6068
6383
|
|
|
6069
6384
|
|
|
6385
|
+
export type MutationMtwApplyDocumentExtractionArgs = {
|
|
6386
|
+
accept: Array<Scalars['String']['input']>;
|
|
6387
|
+
corrections?: InputMaybe<Array<MtwExtractionCorrectionInput>>;
|
|
6388
|
+
extractionId: Scalars['ID']['input'];
|
|
6389
|
+
};
|
|
6390
|
+
|
|
6391
|
+
|
|
6392
|
+
export type MutationMtwExtractDocumentArgs = {
|
|
6393
|
+
docType: MtwDocumentType;
|
|
6394
|
+
fileId: Scalars['ID']['input'];
|
|
6395
|
+
};
|
|
6396
|
+
|
|
6397
|
+
|
|
6070
6398
|
export type MutationMtwNarrateShipmentRiskForecastArgs = {
|
|
6071
6399
|
shipmentId: Scalars['ID']['input'];
|
|
6072
6400
|
};
|
|
@@ -6097,6 +6425,11 @@ export type MutationMtwResolveExceptionArgs = {
|
|
|
6097
6425
|
};
|
|
6098
6426
|
|
|
6099
6427
|
|
|
6428
|
+
export type MutationMtwRunIntegrationPollsArgs = {
|
|
6429
|
+
input?: InputMaybe<MtwRunIntegrationPollsInput>;
|
|
6430
|
+
};
|
|
6431
|
+
|
|
6432
|
+
|
|
6100
6433
|
export type MutationMtwRunRiskSweepArgs = {
|
|
6101
6434
|
input?: InputMaybe<MtwRunRiskSweepInput>;
|
|
6102
6435
|
};
|
|
@@ -6127,6 +6460,11 @@ export type MutationPlanMultiModalShipmentArgs = {
|
|
|
6127
6460
|
};
|
|
6128
6461
|
|
|
6129
6462
|
|
|
6463
|
+
export type MutationPollIntegrationNowArgs = {
|
|
6464
|
+
id: Scalars['ID']['input'];
|
|
6465
|
+
};
|
|
6466
|
+
|
|
6467
|
+
|
|
6130
6468
|
export type MutationPublishMtwProcedureVersionArgs = {
|
|
6131
6469
|
input: PublishMtwProcedureVersionInput;
|
|
6132
6470
|
};
|
|
@@ -6534,6 +6872,8 @@ export type Query = {
|
|
|
6534
6872
|
deliveryJobsCount: Scalars['Int']['output'];
|
|
6535
6873
|
demandForecastByCustomer: Array<MtwDemandForecastPoint>;
|
|
6536
6874
|
demandForecastByLane: Array<MtwDemandForecastPoint>;
|
|
6875
|
+
/** Model choice and back-test errors per lane or customer, most history first. `limit` caps lanes / customers (1-200). */
|
|
6876
|
+
demandForecastModelChoices: Array<MtwDemandForecastModelChoice>;
|
|
6537
6877
|
/** Null until the workspace's forecast has been calculated once. */
|
|
6538
6878
|
demandForecastRunStatus?: Maybe<MtwDemandForecastRunStatus>;
|
|
6539
6879
|
demandForecastVariance: Array<MtwDemandForecastVariance>;
|
|
@@ -6557,6 +6897,12 @@ export type Query = {
|
|
|
6557
6897
|
integrationIngestReceipts: Array<MtwIntegrationIngestReceipt>;
|
|
6558
6898
|
integrations: Array<MtwIntegration>;
|
|
6559
6899
|
integrationsCount: Scalars['Int']['output'];
|
|
6900
|
+
/**
|
|
6901
|
+
* Weeks of stock cover per warehouse and SKU against forecast outbound
|
|
6902
|
+
* demand from delivery-job cargo lines, with the projected stock-out week
|
|
6903
|
+
* and a suggested reorder quantity. Read-only; computed on request.
|
|
6904
|
+
*/
|
|
6905
|
+
inventoryCoverPlan: MtwInventoryCoverPlan;
|
|
6560
6906
|
inventoryItem?: Maybe<MtwInventoryItem>;
|
|
6561
6907
|
inventoryItems: Array<MtwInventoryItem>;
|
|
6562
6908
|
inventoryItemsCount: Scalars['Int']['output'];
|
|
@@ -6593,6 +6939,10 @@ export type Query = {
|
|
|
6593
6939
|
mtwCustomerNotifications: MtwCustomerNotificationPage;
|
|
6594
6940
|
mtwDispatchPlan?: Maybe<MtwDispatchPlan>;
|
|
6595
6941
|
mtwDispatchPlans: Array<MtwDispatchPlan>;
|
|
6942
|
+
/** One extraction, by id. */
|
|
6943
|
+
mtwDocumentExtraction?: Maybe<MtwDocumentExtraction>;
|
|
6944
|
+
/** Every extraction (newest first) that ran against this platform File. */
|
|
6945
|
+
mtwDocumentExtractions: Array<MtwDocumentExtraction>;
|
|
6596
6946
|
/** Exact immutable instruction, including a proposal's historical owner; not a current-eligibility claim. */
|
|
6597
6947
|
mtwEmptyReturnInstruction: MtwEmptyReturnInstruction;
|
|
6598
6948
|
mtwEmptyReturnInstructionPage: MtwEmptyReturnInstructionPage;
|
|
@@ -6618,6 +6968,8 @@ export type Query = {
|
|
|
6618
6968
|
* entity create permission.
|
|
6619
6969
|
*/
|
|
6620
6970
|
mtwImportSpec: Array<MtwImportEntitySpec>;
|
|
6971
|
+
/** The workspace's integration-polls job; null until a polled integration is first saved. */
|
|
6972
|
+
mtwIntegrationPollSchedule?: Maybe<MtwIntegrationPollSchedule>;
|
|
6621
6973
|
/** The workspace's most recent dispatch plan, whatever its status. */
|
|
6622
6974
|
mtwLatestDispatchPlan?: Maybe<MtwDispatchPlan>;
|
|
6623
6975
|
/** The shipment's most recent decision of this kind, whatever its status. */
|
|
@@ -6790,6 +7142,12 @@ export type QueryDemandForecastByLaneArgs = {
|
|
|
6790
7142
|
};
|
|
6791
7143
|
|
|
6792
7144
|
|
|
7145
|
+
export type QueryDemandForecastModelChoicesArgs = {
|
|
7146
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
7147
|
+
scopeType: DemandForecastScope;
|
|
7148
|
+
};
|
|
7149
|
+
|
|
7150
|
+
|
|
6793
7151
|
export type QueryDemandForecastVarianceArgs = {
|
|
6794
7152
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
6795
7153
|
scopeType: DemandForecastScope;
|
|
@@ -6850,6 +7208,11 @@ export type QueryIntegrationsCountArgs = {
|
|
|
6850
7208
|
};
|
|
6851
7209
|
|
|
6852
7210
|
|
|
7211
|
+
export type QueryInventoryCoverPlanArgs = {
|
|
7212
|
+
input?: InputMaybe<InventoryCoverPlanInput>;
|
|
7213
|
+
};
|
|
7214
|
+
|
|
7215
|
+
|
|
6853
7216
|
export type QueryInventoryItemArgs = {
|
|
6854
7217
|
id: Scalars['ID']['input'];
|
|
6855
7218
|
};
|
|
@@ -7022,6 +7385,16 @@ export type QueryMtwDispatchPlansArgs = {
|
|
|
7022
7385
|
};
|
|
7023
7386
|
|
|
7024
7387
|
|
|
7388
|
+
export type QueryMtwDocumentExtractionArgs = {
|
|
7389
|
+
id: Scalars['ID']['input'];
|
|
7390
|
+
};
|
|
7391
|
+
|
|
7392
|
+
|
|
7393
|
+
export type QueryMtwDocumentExtractionsArgs = {
|
|
7394
|
+
fileId: Scalars['ID']['input'];
|
|
7395
|
+
};
|
|
7396
|
+
|
|
7397
|
+
|
|
7025
7398
|
export type QueryMtwEmptyReturnInstructionArgs = {
|
|
7026
7399
|
id: Scalars['ID']['input'];
|
|
7027
7400
|
};
|
|
@@ -15,9 +15,12 @@ import {
|
|
|
15
15
|
INTEGRATION_COUNTS_QUERY,
|
|
16
16
|
INTEGRATION_EVENTS_QUERY,
|
|
17
17
|
LIST_INTEGRATIONS_QUERY,
|
|
18
|
+
POLL_INTEGRATION_NOW_MUTATION,
|
|
18
19
|
UPDATE_INTEGRATION_MUTATION,
|
|
19
20
|
type CarrierIntegration,
|
|
20
21
|
type CarrierIntegrationEvent,
|
|
22
|
+
type GeotabConfig,
|
|
23
|
+
type IntegrationPollResult,
|
|
21
24
|
type IntegrationStatus,
|
|
22
25
|
type SupportedProvider,
|
|
23
26
|
} from '../utils/carrierIntegrations';
|
|
@@ -26,8 +29,12 @@ export interface CreateCarrierIntegrationInput {
|
|
|
26
29
|
provider: SupportedProvider;
|
|
27
30
|
name: string;
|
|
28
31
|
apiSecret: string;
|
|
29
|
-
/**
|
|
30
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Provider settings (Samsara's shipment external id key, Geotab's server,
|
|
34
|
+
* database, user and rule mappings). Never secrets: a Geotab password goes
|
|
35
|
+
* in `apiSecret`, which the service stores encrypted.
|
|
36
|
+
*/
|
|
37
|
+
config?: Record<string, string> | GeotabConfig;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
export interface UpdateCarrierIntegrationInput {
|
|
@@ -209,6 +216,16 @@ export function useCarrierIntegrationActions() {
|
|
|
209
216
|
);
|
|
210
217
|
return data.updateIntegration;
|
|
211
218
|
},
|
|
219
|
+
/** Polls a pulled feed (Geotab) now, outside its schedule. */
|
|
220
|
+
pollNow: async (id: string) => {
|
|
221
|
+
const data = await executeGraphQL<{ pollIntegrationNow: IntegrationPollResult }>(
|
|
222
|
+
graphQLOptions,
|
|
223
|
+
POLL_INTEGRATION_NOW_MUTATION,
|
|
224
|
+
{ id },
|
|
225
|
+
'SINGLE_ATTEMPT'
|
|
226
|
+
);
|
|
227
|
+
return data.pollIntegrationNow;
|
|
228
|
+
},
|
|
212
229
|
remove: async (id: string) => {
|
|
213
230
|
const data = await executeGraphQL<{ deleteIntegration: boolean }>(
|
|
214
231
|
graphQLOptions,
|