@burdenoff/microfe-movethewheels 2026.1108.3 → 2026.1108.5

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.
@@ -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,171 @@ 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'
3283
+ | 'MOTIVE'
3101
3284
  | 'PROJECT44'
3102
3285
  | 'SAMSARA'
3103
3286
  | 'SHIPROCKET';
3104
3287
 
3288
+ export type MtwInventoryCoverPlan = {
3289
+ __typename?: 'MtwInventoryCoverPlan';
3290
+ demandChangePct: Scalars['Float']['output'];
3291
+ generatedAt: Scalars['DateTime']['output'];
3292
+ /** End of the history window: the Monday the current week began. */
3293
+ historyEnd: Scalars['DateTime']['output'];
3294
+ /** First day (Monday) of the closed-week history window. */
3295
+ historyStart: Scalars['DateTime']['output'];
3296
+ historyWeeks: Scalars['Int']['output'];
3297
+ leadTimeWeeks: Scalars['Float']['output'];
3298
+ /** Rows matching the status filter, before the limit. */
3299
+ matchingItems: Scalars['Int']['output'];
3300
+ rows: Array<MtwInventoryCoverRow>;
3301
+ summary: MtwInventoryCoverSummary;
3302
+ targetCoverWeeks: Scalars['Float']['output'];
3303
+ /** More stock lines or delivery jobs existed than were read; the plan covers the newest. */
3304
+ truncated: Scalars['Boolean']['output'];
3305
+ unattributedJobs: Scalars['Int']['output'];
3306
+ /** Outbound units of stocked SKUs whose pickup warehouse could not be resolved (workspace-wide). */
3307
+ unattributedUnits: Scalars['Float']['output'];
3308
+ warehouseId?: Maybe<Scalars['ID']['output']>;
3309
+ };
3310
+
3311
+ /** One warehouse and SKU: stock on hand against forecast outbound demand. */
3312
+ export type MtwInventoryCoverRow = {
3313
+ __typename?: 'MtwInventoryCoverRow';
3314
+ allocated: Scalars['Int']['output'];
3315
+ available: Scalars['Int']['output'];
3316
+ /** Forecast weekly units before the scenario demand change. */
3317
+ baselineWeeklyDemand?: Maybe<Scalars['Float']['output']>;
3318
+ cargoItemId: Scalars['ID']['output'];
3319
+ /** Units shipped so far this (open) week. Not part of the history. */
3320
+ currentWeekUnits: Scalars['Float']['output'];
3321
+ damaged: Scalars['Int']['output'];
3322
+ demandStatus: MtwInventoryDemandStatus;
3323
+ /** Forecast weekly units after the scenario demand change. */
3324
+ forecastWeeklyDemand?: Maybe<Scalars['Float']['output']>;
3325
+ /** The stock lines (locations) aggregated into this position. */
3326
+ inventoryItemIds: Array<Scalars['ID']['output']>;
3327
+ name: Scalars['String']['output'];
3328
+ onHand: Scalars['Int']['output'];
3329
+ /** Monday of the ISO week stock is projected to run out, within two years. */
3330
+ projectedStockOutWeek?: Maybe<Scalars['DateTime']['output']>;
3331
+ reorderPoint?: Maybe<Scalars['Int']['output']>;
3332
+ safetyStock?: Maybe<Scalars['Int']['output']>;
3333
+ sku: Scalars['String']['output'];
3334
+ status: MtwInventoryCoverStatus;
3335
+ /** Stock runs out before a replenishment ordered now would arrive. */
3336
+ stockOutBeforeLeadTime: Scalars['Boolean']['output'];
3337
+ /** Units to order now so the target cover (plus safety stock) is on hand when the order lands. */
3338
+ suggestedReorderQuantity?: Maybe<Scalars['Int']['output']>;
3339
+ /** On hand minus damaged: the stock that can still ship. */
3340
+ usableStock: Scalars['Int']['output'];
3341
+ warehouseCode: Scalars['String']['output'];
3342
+ warehouseId: Scalars['ID']['output'];
3343
+ warehouseName: Scalars['String']['output'];
3344
+ /** Units shipped per closed ISO week of the history window, oldest first. */
3345
+ weeklyUnits: Array<Scalars['Float']['output']>;
3346
+ /** Usable stock divided by forecast weekly demand. */
3347
+ weeksOfCover?: Maybe<Scalars['Float']['output']>;
3348
+ /** Closed weeks the demand rate rests on. */
3349
+ weeksOfHistory: Scalars['Int']['output'];
3350
+ };
3351
+
3352
+ /**
3353
+ * Where a stock position stands against forecast outbound demand (BOFF-10926).
3354
+ * Statuses are listed most urgent first.
3355
+ */
3356
+ export type MtwInventoryCoverStatus =
3357
+ /** Stock runs out before a replenishment ordered now would arrive (cover below the lead time). */
3358
+ | 'AT_RISK'
3359
+ /** Stock covers the lead time and the target cover. */
3360
+ | 'HEALTHY'
3361
+ /** Fewer than 4 closed weeks since the first outbound: no demand forecast yet. */
3362
+ | 'NOT_ENOUGH_HISTORY'
3363
+ /** No outbound in the history window. */
3364
+ | 'NO_DEMAND'
3365
+ /** Demand is forecast and there is no usable stock left. */
3366
+ | 'OUT_OF_STOCK'
3367
+ /** Order now to hold the target cover, or the stock is at or below its reorder point. */
3368
+ | 'REORDER';
3369
+
3370
+ export type MtwInventoryCoverSummary = {
3371
+ __typename?: 'MtwInventoryCoverSummary';
3372
+ atRisk: Scalars['Int']['output'];
3373
+ healthy: Scalars['Int']['output'];
3374
+ noDemand: Scalars['Int']['output'];
3375
+ notEnoughHistory: Scalars['Int']['output'];
3376
+ outOfStock: Scalars['Int']['output'];
3377
+ reorder: Scalars['Int']['output'];
3378
+ totalItems: Scalars['Int']['output'];
3379
+ totalSuggestedReorderQuantity: Scalars['Int']['output'];
3380
+ };
3381
+
3382
+ /** Whether a stock position has a demand forecast. */
3383
+ export type MtwInventoryDemandStatus =
3384
+ | 'FORECAST'
3385
+ | 'NOT_ENOUGH_HISTORY'
3386
+ | 'NO_DEMAND';
3387
+
3105
3388
  export type MtwInventoryItem = {
3106
3389
  __typename?: 'MtwInventoryItem';
3107
3390
  allocated: Scalars['Int']['output'];
@@ -4387,6 +4670,12 @@ export type MtwRouteStats = {
4387
4670
  totalDuration: Scalars['Float']['output'];
4388
4671
  };
4389
4672
 
4673
+ /** Scheduler execution context, added by wspace-scheduler-svc when it fires the job. */
4674
+ export type MtwRunIntegrationPollsInput = {
4675
+ idempotencyKey?: InputMaybe<Scalars['String']['input']>;
4676
+ triggerData?: InputMaybe<Scalars['JSON']['input']>;
4677
+ };
4678
+
4390
4679
  /**
4391
4680
  * Set by wspace-scheduler-svc at fire time: idempotencyKey is
4392
4681
  * "<scheduleId>:<scheduledTime>" and triggerData carries scheduledTime, firedAt,
@@ -5680,6 +5969,17 @@ export type Mutation = {
5680
5969
  * An empty list rejects the whole plan.
5681
5970
  */
5682
5971
  mtwApplyDispatchPlan: MtwDispatchPlan;
5972
+ /**
5973
+ * Accept extracted fields per-field. Accepts are cumulative and idempotent;
5974
+ * the writes each accepted field triggers happen once. POD accepts advance
5975
+ * the referenced shipment via ShipmentService.addTrackingEvent(DELIVERED);
5976
+ * invoice accepts record a freight-invoice comparison against the shipment's
5977
+ * pinned estimate. Fields with no write mapping are recorded as accepted
5978
+ * (audit) without a write.
5979
+ */
5980
+ mtwApplyDocumentExtraction: MtwDocumentExtraction;
5981
+ /** Register, verify or repair the workspace's integration-polls job. Idempotent. */
5982
+ mtwEnsureIntegrationPollSchedule?: Maybe<MtwIntegrationPollSchedule>;
5683
5983
  /** Register, verify or repair the workspace's scheduled-reports job. Idempotent. */
5684
5984
  mtwEnsureReportSchedule?: Maybe<MtwReportSchedule>;
5685
5985
  /**
@@ -5687,6 +5987,13 @@ export type Mutation = {
5687
5987
  * scheduler. Idempotent; leaves a job an operator paused alone.
5688
5988
  */
5689
5989
  mtwEnsureRiskSweepSchedule?: Maybe<MtwRiskSweepSchedule>;
5990
+ /**
5991
+ * Run the shared vision model over a platform File and store the proposed
5992
+ * fields. Reads the file bytes through wspace-files-svc (presigned URL),
5993
+ * gates on checkAiCreditsFor and charges + ledger-records the call on the
5994
+ * shared AI runtime. Writes nothing onto orders / shipments / invoices.
5995
+ */
5996
+ mtwExtractDocument: MtwDocumentExtraction;
5690
5997
  /**
5691
5998
  * Generate (or reuse) the AI narration for a shipment's current risk forecast
5692
5999
  * and return the forecast with it attached. With AI disabled, credits spent or
@@ -5716,6 +6023,12 @@ export type Mutation = {
5716
6023
  * Refused when the shipment is neither at risk nor past its promise.
5717
6024
  */
5718
6025
  mtwResolveException: MtwShipmentDecision;
6026
+ /**
6027
+ * Poll every active pull-based integration of the workspace. Fired every few
6028
+ * minutes by wspace-scheduler-svc as this service's own service actor; a
6029
+ * workspace user may also run it on demand.
6030
+ */
6031
+ mtwRunIntegrationPolls: MtwIntegrationPollRun;
5719
6032
  /**
5720
6033
  * Re-forecast every in-flight shipment of the workspace and notify for any that
5721
6034
  * started slipping. Fired by wspace-scheduler-svc as this service's own service
@@ -5732,7 +6045,10 @@ export type Mutation = {
5732
6045
  openMtwFreeTimeClock: MtwFreeTimeClock;
5733
6046
  optimizeRoute: MtwRoute;
5734
6047
  planMultiModalShipment: MtwShipment;
6048
+ /** Poll one pull-based integration (Geotab) now, outside its schedule. */
6049
+ pollIntegrationNow: MtwIntegrationPollResult;
5735
6050
  publishMtwProcedureVersion: MtwProcedureVersion;
6051
+ /** Recalculate now. `weeksOfHistory` is clamped to 4-104 closed weeks. */
5736
6052
  recalculateDemandForecasts: Scalars['Int']['output'];
5737
6053
  recordMtwConsolidationObservation: MtwConsolidationObservation;
5738
6054
  recordMtwContainerEvent: MtwContainerEvent;
@@ -6067,6 +6383,19 @@ export type MutationMtwApplyDispatchPlanArgs = {
6067
6383
  };
6068
6384
 
6069
6385
 
6386
+ export type MutationMtwApplyDocumentExtractionArgs = {
6387
+ accept: Array<Scalars['String']['input']>;
6388
+ corrections?: InputMaybe<Array<MtwExtractionCorrectionInput>>;
6389
+ extractionId: Scalars['ID']['input'];
6390
+ };
6391
+
6392
+
6393
+ export type MutationMtwExtractDocumentArgs = {
6394
+ docType: MtwDocumentType;
6395
+ fileId: Scalars['ID']['input'];
6396
+ };
6397
+
6398
+
6070
6399
  export type MutationMtwNarrateShipmentRiskForecastArgs = {
6071
6400
  shipmentId: Scalars['ID']['input'];
6072
6401
  };
@@ -6097,6 +6426,11 @@ export type MutationMtwResolveExceptionArgs = {
6097
6426
  };
6098
6427
 
6099
6428
 
6429
+ export type MutationMtwRunIntegrationPollsArgs = {
6430
+ input?: InputMaybe<MtwRunIntegrationPollsInput>;
6431
+ };
6432
+
6433
+
6100
6434
  export type MutationMtwRunRiskSweepArgs = {
6101
6435
  input?: InputMaybe<MtwRunRiskSweepInput>;
6102
6436
  };
@@ -6127,6 +6461,11 @@ export type MutationPlanMultiModalShipmentArgs = {
6127
6461
  };
6128
6462
 
6129
6463
 
6464
+ export type MutationPollIntegrationNowArgs = {
6465
+ id: Scalars['ID']['input'];
6466
+ };
6467
+
6468
+
6130
6469
  export type MutationPublishMtwProcedureVersionArgs = {
6131
6470
  input: PublishMtwProcedureVersionInput;
6132
6471
  };
@@ -6534,6 +6873,8 @@ export type Query = {
6534
6873
  deliveryJobsCount: Scalars['Int']['output'];
6535
6874
  demandForecastByCustomer: Array<MtwDemandForecastPoint>;
6536
6875
  demandForecastByLane: Array<MtwDemandForecastPoint>;
6876
+ /** Model choice and back-test errors per lane or customer, most history first. `limit` caps lanes / customers (1-200). */
6877
+ demandForecastModelChoices: Array<MtwDemandForecastModelChoice>;
6537
6878
  /** Null until the workspace's forecast has been calculated once. */
6538
6879
  demandForecastRunStatus?: Maybe<MtwDemandForecastRunStatus>;
6539
6880
  demandForecastVariance: Array<MtwDemandForecastVariance>;
@@ -6557,6 +6898,12 @@ export type Query = {
6557
6898
  integrationIngestReceipts: Array<MtwIntegrationIngestReceipt>;
6558
6899
  integrations: Array<MtwIntegration>;
6559
6900
  integrationsCount: Scalars['Int']['output'];
6901
+ /**
6902
+ * Weeks of stock cover per warehouse and SKU against forecast outbound
6903
+ * demand from delivery-job cargo lines, with the projected stock-out week
6904
+ * and a suggested reorder quantity. Read-only; computed on request.
6905
+ */
6906
+ inventoryCoverPlan: MtwInventoryCoverPlan;
6560
6907
  inventoryItem?: Maybe<MtwInventoryItem>;
6561
6908
  inventoryItems: Array<MtwInventoryItem>;
6562
6909
  inventoryItemsCount: Scalars['Int']['output'];
@@ -6593,6 +6940,10 @@ export type Query = {
6593
6940
  mtwCustomerNotifications: MtwCustomerNotificationPage;
6594
6941
  mtwDispatchPlan?: Maybe<MtwDispatchPlan>;
6595
6942
  mtwDispatchPlans: Array<MtwDispatchPlan>;
6943
+ /** One extraction, by id. */
6944
+ mtwDocumentExtraction?: Maybe<MtwDocumentExtraction>;
6945
+ /** Every extraction (newest first) that ran against this platform File. */
6946
+ mtwDocumentExtractions: Array<MtwDocumentExtraction>;
6596
6947
  /** Exact immutable instruction, including a proposal's historical owner; not a current-eligibility claim. */
6597
6948
  mtwEmptyReturnInstruction: MtwEmptyReturnInstruction;
6598
6949
  mtwEmptyReturnInstructionPage: MtwEmptyReturnInstructionPage;
@@ -6618,6 +6969,8 @@ export type Query = {
6618
6969
  * entity create permission.
6619
6970
  */
6620
6971
  mtwImportSpec: Array<MtwImportEntitySpec>;
6972
+ /** The workspace's integration-polls job; null until a polled integration is first saved. */
6973
+ mtwIntegrationPollSchedule?: Maybe<MtwIntegrationPollSchedule>;
6621
6974
  /** The workspace's most recent dispatch plan, whatever its status. */
6622
6975
  mtwLatestDispatchPlan?: Maybe<MtwDispatchPlan>;
6623
6976
  /** The shipment's most recent decision of this kind, whatever its status. */
@@ -6790,6 +7143,12 @@ export type QueryDemandForecastByLaneArgs = {
6790
7143
  };
6791
7144
 
6792
7145
 
7146
+ export type QueryDemandForecastModelChoicesArgs = {
7147
+ limit?: InputMaybe<Scalars['Int']['input']>;
7148
+ scopeType: DemandForecastScope;
7149
+ };
7150
+
7151
+
6793
7152
  export type QueryDemandForecastVarianceArgs = {
6794
7153
  limit?: InputMaybe<Scalars['Int']['input']>;
6795
7154
  scopeType: DemandForecastScope;
@@ -6850,6 +7209,11 @@ export type QueryIntegrationsCountArgs = {
6850
7209
  };
6851
7210
 
6852
7211
 
7212
+ export type QueryInventoryCoverPlanArgs = {
7213
+ input?: InputMaybe<InventoryCoverPlanInput>;
7214
+ };
7215
+
7216
+
6853
7217
  export type QueryInventoryItemArgs = {
6854
7218
  id: Scalars['ID']['input'];
6855
7219
  };
@@ -7022,6 +7386,16 @@ export type QueryMtwDispatchPlansArgs = {
7022
7386
  };
7023
7387
 
7024
7388
 
7389
+ export type QueryMtwDocumentExtractionArgs = {
7390
+ id: Scalars['ID']['input'];
7391
+ };
7392
+
7393
+
7394
+ export type QueryMtwDocumentExtractionsArgs = {
7395
+ fileId: Scalars['ID']['input'];
7396
+ };
7397
+
7398
+
7025
7399
  export type QueryMtwEmptyReturnInstructionArgs = {
7026
7400
  id: Scalars['ID']['input'];
7027
7401
  };
@@ -18324,6 +18324,8 @@ export enum ColEventType {
18324
18324
 
18325
18325
  export type ColFamilyTree = {
18326
18326
  __typename?: 'ColFamilyTree';
18327
+ /** Per-tree opt-in for the weekly autonomous AI digest (BOFF-3783 consent gate). Default OFF pre-launch — the scheduled Kin Intelligence loop skips any tree that has not explicitly asked for it. Editable by tree OWNER/STEWARD via colUpdateFamilyTree. */
18328
+ aiDigestEnabled: Scalars['Boolean']['output'];
18327
18329
  /** Cover image — references a wspace-files-svc File (blobs live there). */
18328
18330
  coverFile?: Maybe<File>;
18329
18331
  createdAt: Scalars['DateTime']['output'];
@@ -18555,6 +18557,8 @@ export enum ColMemberRole {
18555
18557
  export type ColMembership = {
18556
18558
  __typename?: 'ColMembership';
18557
18559
  acceptedAt?: Maybe<Scalars['DateTime']['output']>;
18560
+ /** Per-member preference for the weekly autonomous AI digest (BOFF-3783). The loop only notifies members whose tree opted in (aiDigestEnabled), whose membership is ACTIVE, and who have not muted themselves here. A member may change this on their own membership; admins may change it for any member. */
18561
+ aiDigestNotifications: Scalars['Boolean']['output'];
18558
18562
  createdAt: Scalars['DateTime']['output'];
18559
18563
  id: Scalars['ID']['output'];
18560
18564
  invitedAt: Scalars['DateTime']['output'];
@@ -18930,6 +18934,7 @@ export type ColUpdateEventInput = {
18930
18934
  };
18931
18935
 
18932
18936
  export type ColUpdateFamilyTreeInput = {
18937
+ aiDigestEnabled?: InputMaybe<Scalars['Boolean']['input']>;
18933
18938
  coverFileId?: InputMaybe<Scalars['ID']['input']>;
18934
18939
  description?: InputMaybe<Scalars['String']['input']>;
18935
18940
  name?: InputMaybe<Scalars['String']['input']>;
@@ -18937,8 +18942,9 @@ export type ColUpdateFamilyTreeInput = {
18937
18942
  tags?: InputMaybe<Array<Scalars['String']['input']>>;
18938
18943
  };
18939
18944
 
18940
- /** Change a family-circle member's tree role and/or linked Person (BOFF-3972). Omitted fields are left unchanged; an explicit null personId unlinks the member from their Person record. */
18945
+ /** Change a family-circle member's tree role and/or linked Person (BOFF-3972). Omitted fields are left unchanged; an explicit null personId unlinks the member from their Person record. `aiDigestNotifications` is the member's weekly AI-digest preference (BOFF-3783): admins may set it for any member, and a member may set it on their OWN membership without holding a tree role (the service rejects a non-admin trying to change anything else). */
18941
18946
  export type ColUpdateMembershipInput = {
18947
+ aiDigestNotifications?: InputMaybe<Scalars['Boolean']['input']>;
18942
18948
  personId?: InputMaybe<Scalars['ID']['input']>;
18943
18949
  role?: InputMaybe<ColMemberRole>;
18944
18950
  };
@@ -73260,7 +73266,7 @@ export type Mutation = {
73260
73266
  colUntagStory: Scalars['Boolean']['output'];
73261
73267
  colUpdateEvent: ColEvent;
73262
73268
  colUpdateFamilyTree: ColFamilyTree;
73263
- /** Change a member's tree role and/or linked Person (BOFF-3972). Beyond the workspace-level directive below, the service layer requires the caller to be an ACTIVE OWNER/STEWARD of the tree, forbids changing one's own role, and reserves granting or changing OWNER for tree OWNERs. */
73269
+ /** Change a member's tree role, linked Person, and/or weekly AI-digest preference (BOFF-3972 / BOFF-3783). Beyond the workspace-level directive below, the service layer requires the caller to be an ACTIVE OWNER/STEWARD of the tree, forbids changing one's own role, and reserves granting or changing OWNER for tree OWNERs — EXCEPT that any member may change aiDigestNotifications on their own membership, with no tree role required. */
73264
73270
  colUpdateMembership: ColMembership;
73265
73271
  colUpdateMemory: ColMemory;
73266
73272
  colUpdatePerson: ColPerson;
@@ -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
- /** Provider mapping settings (e.g. Samsara's shipment external id key). Never secrets. */
30
- config?: Record<string, string>;
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,