@burdenoff/microfe-movethewheels 2026.1016.2 → 2026.1016.3

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.
Files changed (31) hide show
  1. package/dist/components/freight-cost/FreightCommercialEditor.js +217 -0
  2. package/dist/components/freight-cost/FreightCommercialFactEditor.js +217 -0
  3. package/dist/components/freight-cost/FreightCommercialHistory.js +115 -0
  4. package/dist/components/freight-cost/FreightDraftForm.js +106 -91
  5. package/dist/components/freight-cost/FreightHistory.js +42 -40
  6. package/dist/generated/freight-cost-operations.d.ts +959 -0
  7. package/dist/hooks/useFreightRecoveryAction.js +20 -20
  8. package/dist/movethewheels/components/freight-cost/FreightCommercialEditor.d.ts +8 -0
  9. package/dist/movethewheels/components/freight-cost/FreightCommercialFactEditor.d.ts +8 -0
  10. package/dist/movethewheels/components/freight-cost/FreightCommercialHistory.d.ts +4 -0
  11. package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +4 -2
  12. package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +2 -2
  13. package/dist/movethewheels/utils/freightCommercial.d.ts +44 -0
  14. package/dist/pages/FreightEstimatePage.js +96 -92
  15. package/dist/src/generated/freight-cost-operations.js +495 -6
  16. package/dist/utils/freightAcknowledgement.js +6 -5
  17. package/dist/utils/freightCommercial.js +194 -0
  18. package/dist/utils/freightRecovery.js +22 -22
  19. package/package.json +4 -3
  20. package/src/generated/freight-cost-operations.ts +831 -1
  21. package/src/movethewheels/components/freight-cost/FreightCommercialEditor.tsx +236 -0
  22. package/src/movethewheels/components/freight-cost/FreightCommercialFactEditor.tsx +258 -0
  23. package/src/movethewheels/components/freight-cost/FreightCommercialHistory.tsx +90 -0
  24. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +33 -4
  25. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +4 -2
  26. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +2 -1
  27. package/src/movethewheels/pages/FreightEstimatePage.tsx +14 -7
  28. package/src/movethewheels/utils/freightAcknowledgement.ts +3 -1
  29. package/src/movethewheels/utils/freightCommercial.ts +388 -0
  30. package/src/movethewheels/utils/freightRecovery.ts +6 -2
  31. package/src/operations/freight-cost/commercial.graphql +483 -0
@@ -65,6 +65,236 @@ export type MtwContainerPagination = {
65
65
  };
66
66
  export type MtwFreightAmountBasis = 'CALCULATED' | 'SOURCED_FIXED' | 'UNKNOWN';
67
67
  export type MtwFreightCategory = 'ACCESSORIAL' | 'BASE_FREIGHT' | 'BROKER' | 'DESTINATION_HANDLING' | 'DUTY_ESTIMATE' | 'FREE_TIME_EXPOSURE' | 'FUEL' | 'INSURANCE' | 'ON_CARRIAGE' | 'ORIGIN_HANDLING' | 'OTHER' | 'PRE_CARRIAGE' | 'TAX_ESTIMATE';
68
+ export type MtwFreightCommercialCapture = {
69
+ __typename?: 'MtwFreightCommercialCapture';
70
+ cargo: MtwFreightCommercialCargoFact;
71
+ carrier: MtwFreightCommercialCarrierFact;
72
+ destination: MtwFreightCommercialLocationFact;
73
+ equipment: MtwFreightCommercialEquipmentFact;
74
+ origin: MtwFreightCommercialLocationFact;
75
+ ownerLegs: Array<MtwFreightCommercialOwnerLeg>;
76
+ ownerShipment: MtwFreightCommercialShipment;
77
+ schemaVersion: Scalars['Int']['output'];
78
+ selectedLegs: Array<MtwFreightCommercialLegPin>;
79
+ service: MtwFreightCommercialServiceFact;
80
+ volume: MtwFreightCommercialVolumeFact;
81
+ weight: MtwFreightCommercialWeightFact;
82
+ };
83
+ export type MtwFreightCommercialCaptureInput = {
84
+ cargo: MtwFreightCommercialCargoFactInput;
85
+ carrier: MtwFreightCommercialCarrierFactInput;
86
+ destination: MtwFreightCommercialLocationFactInput;
87
+ equipment: MtwFreightCommercialEquipmentFactInput;
88
+ origin: MtwFreightCommercialLocationFactInput;
89
+ schemaVersion: Scalars['Int']['input'];
90
+ selectedLegs: Array<MtwFreightCommercialLegPinInput>;
91
+ service: MtwFreightCommercialServiceFactInput;
92
+ volume: MtwFreightCommercialVolumeFactInput;
93
+ weight: MtwFreightCommercialWeightFactInput;
94
+ };
95
+ export type MtwFreightCommercialCargo = {
96
+ __typename?: 'MtwFreightCommercialCargo';
97
+ classificationLabel: Scalars['String']['output'];
98
+ description: Scalars['String']['output'];
99
+ };
100
+ export type MtwFreightCommercialCargoFact = {
101
+ __typename?: 'MtwFreightCommercialCargoFact';
102
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
103
+ reason?: Maybe<Scalars['String']['output']>;
104
+ status: MtwFreightCommercialStatus;
105
+ value?: Maybe<MtwFreightCommercialCargo>;
106
+ };
107
+ export type MtwFreightCommercialCargoFactInput = {
108
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
109
+ reason?: InputMaybe<Scalars['String']['input']>;
110
+ status: MtwFreightCommercialStatus;
111
+ value?: InputMaybe<MtwFreightCommercialCargoInput>;
112
+ };
113
+ export type MtwFreightCommercialCargoInput = {
114
+ classificationLabel: Scalars['String']['input'];
115
+ description: Scalars['String']['input'];
116
+ };
117
+ export type MtwFreightCommercialCarrier = {
118
+ __typename?: 'MtwFreightCommercialCarrier';
119
+ label: Scalars['String']['output'];
120
+ reference: Scalars['String']['output'];
121
+ };
122
+ export type MtwFreightCommercialCarrierFact = {
123
+ __typename?: 'MtwFreightCommercialCarrierFact';
124
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
125
+ reason?: Maybe<Scalars['String']['output']>;
126
+ status: MtwFreightCommercialStatus;
127
+ value?: Maybe<MtwFreightCommercialCarrier>;
128
+ };
129
+ export type MtwFreightCommercialCarrierFactInput = {
130
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
131
+ reason?: InputMaybe<Scalars['String']['input']>;
132
+ status: MtwFreightCommercialStatus;
133
+ value?: InputMaybe<MtwFreightCommercialCarrierInput>;
134
+ };
135
+ export type MtwFreightCommercialCarrierInput = {
136
+ label: Scalars['String']['input'];
137
+ reference: Scalars['String']['input'];
138
+ };
139
+ export type MtwFreightCommercialEquipment = {
140
+ __typename?: 'MtwFreightCommercialEquipment';
141
+ count: Scalars['Int']['output'];
142
+ typeLabel: Scalars['String']['output'];
143
+ };
144
+ export type MtwFreightCommercialEquipmentFact = {
145
+ __typename?: 'MtwFreightCommercialEquipmentFact';
146
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
147
+ reason?: Maybe<Scalars['String']['output']>;
148
+ status: MtwFreightCommercialStatus;
149
+ value?: Maybe<MtwFreightCommercialEquipment>;
150
+ };
151
+ export type MtwFreightCommercialEquipmentFactInput = {
152
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
153
+ reason?: InputMaybe<Scalars['String']['input']>;
154
+ status: MtwFreightCommercialStatus;
155
+ value?: InputMaybe<MtwFreightCommercialEquipmentInput>;
156
+ };
157
+ export type MtwFreightCommercialEquipmentInput = {
158
+ count: Scalars['Int']['input'];
159
+ typeLabel: Scalars['String']['input'];
160
+ };
161
+ export type MtwFreightCommercialLegPin = {
162
+ __typename?: 'MtwFreightCommercialLegPin';
163
+ expectedUpdatedAt: Scalars['DateTime']['output'];
164
+ id: Scalars['ID']['output'];
165
+ };
166
+ export type MtwFreightCommercialLegPinInput = {
167
+ expectedUpdatedAt: Scalars['DateTime']['input'];
168
+ id: Scalars['ID']['input'];
169
+ };
170
+ export type MtwFreightCommercialLink = {
171
+ __typename?: 'MtwFreightCommercialLink';
172
+ fileId: Scalars['ID']['output'];
173
+ versionId: Scalars['ID']['output'];
174
+ };
175
+ export type MtwFreightCommercialLinkInput = {
176
+ fileId: Scalars['ID']['input'];
177
+ versionId: Scalars['ID']['input'];
178
+ };
179
+ export type MtwFreightCommercialLocation = {
180
+ __typename?: 'MtwFreightCommercialLocation';
181
+ jurisdictionLabel?: Maybe<Scalars['String']['output']>;
182
+ kind: MtwFreightLocationKind;
183
+ label: Scalars['String']['output'];
184
+ };
185
+ export type MtwFreightCommercialLocationFact = {
186
+ __typename?: 'MtwFreightCommercialLocationFact';
187
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
188
+ reason?: Maybe<Scalars['String']['output']>;
189
+ status: MtwFreightCommercialStatus;
190
+ value?: Maybe<MtwFreightCommercialLocation>;
191
+ };
192
+ export type MtwFreightCommercialLocationFactInput = {
193
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
194
+ reason?: InputMaybe<Scalars['String']['input']>;
195
+ status: MtwFreightCommercialStatus;
196
+ value?: InputMaybe<MtwFreightCommercialLocationInput>;
197
+ };
198
+ export type MtwFreightCommercialLocationInput = {
199
+ jurisdictionLabel?: InputMaybe<Scalars['String']['input']>;
200
+ kind: MtwFreightLocationKind;
201
+ label: Scalars['String']['input'];
202
+ };
203
+ export type MtwFreightCommercialOwnerLeg = {
204
+ __typename?: 'MtwFreightCommercialOwnerLeg';
205
+ carrierId?: Maybe<Scalars['ID']['output']>;
206
+ carrierName?: Maybe<Scalars['String']['output']>;
207
+ containerCount?: Maybe<Scalars['Int']['output']>;
208
+ containerType?: Maybe<OceanContainerType>;
209
+ id: Scalars['ID']['output'];
210
+ legNumber: Scalars['Int']['output'];
211
+ mode: TransportMode;
212
+ updatedAt: Scalars['DateTime']['output'];
213
+ volumeCbm?: Maybe<Scalars['Float']['output']>;
214
+ weightKg?: Maybe<Scalars['Float']['output']>;
215
+ };
216
+ export type MtwFreightCommercialProvenance = {
217
+ __typename?: 'MtwFreightCommercialProvenance';
218
+ evidenceLinks: Array<MtwFreightCommercialLink>;
219
+ observedAt?: Maybe<Scalars['DateTime']['output']>;
220
+ sourceReference: Scalars['String']['output'];
221
+ sourceRevision: Scalars['String']['output'];
222
+ };
223
+ export type MtwFreightCommercialProvenanceInput = {
224
+ evidenceLinks: Array<MtwFreightCommercialLinkInput>;
225
+ observedAt?: InputMaybe<Scalars['DateTime']['input']>;
226
+ sourceReference: Scalars['String']['input'];
227
+ sourceRevision: Scalars['String']['input'];
228
+ };
229
+ export type MtwFreightCommercialServiceFact = {
230
+ __typename?: 'MtwFreightCommercialServiceFact';
231
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
232
+ reason?: Maybe<Scalars['String']['output']>;
233
+ status: MtwFreightCommercialStatus;
234
+ value?: Maybe<Scalars['String']['output']>;
235
+ };
236
+ export type MtwFreightCommercialServiceFactInput = {
237
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
238
+ reason?: InputMaybe<Scalars['String']['input']>;
239
+ status: MtwFreightCommercialStatus;
240
+ value?: InputMaybe<Scalars['String']['input']>;
241
+ };
242
+ export type MtwFreightCommercialShipment = {
243
+ __typename?: 'MtwFreightCommercialShipment';
244
+ primaryMode: TransportMode;
245
+ shipmentId: Scalars['ID']['output'];
246
+ updatedAt: Scalars['DateTime']['output'];
247
+ };
248
+ /** Reported commercial context only; no quote acceptance or completeness authority. */
249
+ export type MtwFreightCommercialStatus = 'NOT_APPLICABLE' | 'SOURCED' | 'UNKNOWN';
250
+ export type MtwFreightCommercialVolume = {
251
+ __typename?: 'MtwFreightCommercialVolume';
252
+ amount: Scalars['String']['output'];
253
+ unit: MtwFreightVolumeUnit;
254
+ zeroReason?: Maybe<Scalars['String']['output']>;
255
+ };
256
+ export type MtwFreightCommercialVolumeFact = {
257
+ __typename?: 'MtwFreightCommercialVolumeFact';
258
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
259
+ reason?: Maybe<Scalars['String']['output']>;
260
+ status: MtwFreightCommercialStatus;
261
+ value?: Maybe<MtwFreightCommercialVolume>;
262
+ };
263
+ export type MtwFreightCommercialVolumeFactInput = {
264
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
265
+ reason?: InputMaybe<Scalars['String']['input']>;
266
+ status: MtwFreightCommercialStatus;
267
+ value?: InputMaybe<MtwFreightCommercialVolumeInput>;
268
+ };
269
+ export type MtwFreightCommercialVolumeInput = {
270
+ amount: Scalars['String']['input'];
271
+ unit: MtwFreightVolumeUnit;
272
+ zeroReason?: InputMaybe<Scalars['String']['input']>;
273
+ };
274
+ export type MtwFreightCommercialWeight = {
275
+ __typename?: 'MtwFreightCommercialWeight';
276
+ amount: Scalars['String']['output'];
277
+ unit: MtwFreightWeightUnit;
278
+ zeroReason?: Maybe<Scalars['String']['output']>;
279
+ };
280
+ export type MtwFreightCommercialWeightFact = {
281
+ __typename?: 'MtwFreightCommercialWeightFact';
282
+ provenance?: Maybe<MtwFreightCommercialProvenance>;
283
+ reason?: Maybe<Scalars['String']['output']>;
284
+ status: MtwFreightCommercialStatus;
285
+ value?: Maybe<MtwFreightCommercialWeight>;
286
+ };
287
+ export type MtwFreightCommercialWeightFactInput = {
288
+ provenance?: InputMaybe<MtwFreightCommercialProvenanceInput>;
289
+ reason?: InputMaybe<Scalars['String']['input']>;
290
+ status: MtwFreightCommercialStatus;
291
+ value?: InputMaybe<MtwFreightCommercialWeightInput>;
292
+ };
293
+ export type MtwFreightCommercialWeightInput = {
294
+ amount: Scalars['String']['input'];
295
+ unit: MtwFreightWeightUnit;
296
+ zeroReason?: InputMaybe<Scalars['String']['input']>;
297
+ };
68
298
  /** A declared currency/scale convention, not automatic ISO verification. */
69
299
  export type MtwFreightCurrency = {
70
300
  __typename?: 'MtwFreightCurrency';
@@ -88,6 +318,7 @@ export type MtwFreightEstimatePage = {
88
318
  export type MtwFreightEstimateVersion = {
89
319
  __typename?: 'MtwFreightEstimateVersion';
90
320
  actorProvenance: Scalars['String']['output'];
321
+ commercialCapture?: Maybe<MtwFreightCommercialCapture>;
91
322
  createdBy: Scalars['ID']['output'];
92
323
  estimateReference: Scalars['String']['output'];
93
324
  evidence: Array<MtwContainerEvidence>;
@@ -203,6 +434,7 @@ export type MtwFreightLineTotal = {
203
434
  reportingAmountMinor?: Maybe<Scalars['String']['output']>;
204
435
  roundedToZero: Scalars['Boolean']['output'];
205
436
  };
437
+ export type MtwFreightLocationKind = 'ADDRESS_LABEL' | 'CUSTOM_LABEL' | 'PORT_LABEL' | 'POSTCODE_LABEL' | 'TERMINAL_LABEL';
206
438
  /** Completeness applies only to the recorded required-charge declarations, not all possible charges. */
207
439
  export type MtwFreightPreview = {
208
440
  __typename?: 'MtwFreightPreview';
@@ -250,14 +482,34 @@ export type MtwFreightSubtotal = {
250
482
  payerReference?: Maybe<Scalars['String']['output']>;
251
483
  totalAmountMinor?: Maybe<Scalars['String']['output']>;
252
484
  };
485
+ export type MtwFreightVolumeUnit = 'FT3' | 'M3';
486
+ export type MtwFreightWeightUnit = 'KG' | 'LB' | 'TONNE';
253
487
  export type MtwShipment = {
254
488
  __typename?: 'MtwShipment';
255
489
  id: Scalars['ID']['output'];
490
+ legs: Array<MtwShipmentLeg>;
256
491
  primaryMode: TransportMode;
257
492
  shipmentNumber: Scalars['String']['output'];
258
493
  status: ShipmentStatus;
259
494
  updatedAt: Scalars['DateTime']['output'];
260
495
  };
496
+ export type MtwShipmentLegsArgs = {
497
+ pagination?: InputMaybe<PaginationInput>;
498
+ };
499
+ export type MtwShipmentLeg = {
500
+ __typename?: 'MtwShipmentLeg';
501
+ carrierId?: Maybe<Scalars['ID']['output']>;
502
+ carrierName?: Maybe<Scalars['String']['output']>;
503
+ containerCount?: Maybe<Scalars['Int']['output']>;
504
+ containerType?: Maybe<OceanContainerType>;
505
+ id: Scalars['ID']['output'];
506
+ legNumber: Scalars['Int']['output'];
507
+ mode: TransportMode;
508
+ shipmentId: Scalars['ID']['output'];
509
+ updatedAt: Scalars['DateTime']['output'];
510
+ volumeCbm?: Maybe<Scalars['Float']['output']>;
511
+ weightKg?: Maybe<Scalars['Float']['output']>;
512
+ };
261
513
  export type Mutation = {
262
514
  __typename?: 'Mutation';
263
515
  saveMtwFreightEstimate: MtwFreightEstimateVersion;
@@ -265,6 +517,7 @@ export type Mutation = {
265
517
  export type MutationSaveMtwFreightEstimateArgs = {
266
518
  input: SaveMtwFreightEstimateInput;
267
519
  };
520
+ export type OceanContainerType = 'FCL_20FT' | 'FCL_40FT' | 'FCL_40FT_HC' | 'LCL';
268
521
  export type PaginationInput = {
269
522
  cursor?: InputMaybe<Scalars['String']['input']>;
270
523
  limit?: InputMaybe<Scalars['Int']['input']>;
@@ -302,6 +555,7 @@ export type QueryShipmentsCountArgs = {
302
555
  filter?: InputMaybe<ShipmentFilterInput>;
303
556
  };
304
557
  export type SaveMtwFreightEstimateInput = {
558
+ commercialCapture?: InputMaybe<MtwFreightCommercialCaptureInput>;
305
559
  estimateReference: Scalars['String']['input'];
306
560
  evidence: Array<MtwContainerEvidenceInput>;
307
561
  expectedPreviousVersionId?: InputMaybe<Scalars['ID']['input']>;
@@ -325,6 +579,707 @@ export type ShipmentFilterInput = {
325
579
  };
326
580
  export type ShipmentStatus = 'DELIVERED' | 'FAILED' | 'IN_TRANSIT' | 'PICKED_UP' | 'PLANNED' | 'RETURNED';
327
581
  export type TransportMode = 'AIR' | 'OCEAN' | 'RAIL' | 'ROAD';
582
+ export type CommercialProvenanceFragment = {
583
+ __typename?: 'MtwFreightCommercialProvenance';
584
+ sourceReference: string;
585
+ sourceRevision: string;
586
+ observedAt?: string | null;
587
+ evidenceLinks: Array<{
588
+ __typename?: 'MtwFreightCommercialLink';
589
+ fileId: string;
590
+ versionId: string;
591
+ }>;
592
+ };
593
+ export type SaveFreightCommercialCostsMutationVariables = Exact<{
594
+ input: SaveMtwFreightEstimateInput;
595
+ }>;
596
+ export type SaveFreightCommercialCostsMutation = {
597
+ __typename?: 'Mutation';
598
+ saveMtwFreightEstimate: {
599
+ __typename?: 'MtwFreightEstimateVersion';
600
+ id: string;
601
+ shipmentId: string;
602
+ estimateReference: string;
603
+ version: number;
604
+ previousVersionId?: string | null;
605
+ recordedAt: string;
606
+ createdBy: string;
607
+ actorProvenance: string;
608
+ onBehalfOf?: string | null;
609
+ validityAtRead: string;
610
+ shipmentCapture: {
611
+ __typename?: 'MtwFreightShipmentCapture';
612
+ shipmentNumber: string;
613
+ primaryMode: string;
614
+ capturedUpdatedAt: string;
615
+ };
616
+ facts: {
617
+ __typename?: 'MtwFreightFacts';
618
+ kind: MtwFreightKind;
619
+ title: string;
620
+ commercialScope: string;
621
+ sourceReference: string;
622
+ sourceRevision: string;
623
+ pricingAt: string;
624
+ quotedAt?: string | null;
625
+ validFrom?: string | null;
626
+ validUntil?: string | null;
627
+ rounding: MtwFreightRounding;
628
+ reportingCurrency?: {
629
+ __typename?: 'MtwFreightCurrency';
630
+ code: string;
631
+ minorUnitDigits: number;
632
+ } | null;
633
+ lines: Array<{
634
+ __typename?: 'MtwFreightLine';
635
+ id: string;
636
+ category: MtwFreightCategory;
637
+ description: string;
638
+ payerReference?: string | null;
639
+ payerLabel?: string | null;
640
+ disposition: MtwFreightDisposition;
641
+ inclusionParentLineId?: string | null;
642
+ amountBasis: MtwFreightAmountBasis;
643
+ quantity?: string | null;
644
+ unit?: string | null;
645
+ unitRateMajor?: string | null;
646
+ amountMinor?: string | null;
647
+ zeroReason?: string | null;
648
+ sourceReference?: string | null;
649
+ sourceRevision?: string | null;
650
+ currency: {
651
+ __typename?: 'MtwFreightCurrency';
652
+ code: string;
653
+ minorUnitDigits: number;
654
+ };
655
+ }>;
656
+ requirements: Array<{
657
+ __typename?: 'MtwFreightRequirement';
658
+ category: MtwFreightCategory;
659
+ status: MtwFreightRequirementStatus;
660
+ reason?: string | null;
661
+ sourceReference?: string | null;
662
+ sourceRevision?: string | null;
663
+ }>;
664
+ fx: Array<{
665
+ __typename?: 'MtwFreightFx';
666
+ rate: string;
667
+ observedAt: string;
668
+ effectiveFrom: string;
669
+ effectiveUntil: string;
670
+ sourceReference: string;
671
+ sourceRevision: string;
672
+ fromCurrency: {
673
+ __typename?: 'MtwFreightCurrency';
674
+ code: string;
675
+ minorUnitDigits: number;
676
+ };
677
+ toCurrency: {
678
+ __typename?: 'MtwFreightCurrency';
679
+ code: string;
680
+ minorUnitDigits: number;
681
+ };
682
+ }>;
683
+ };
684
+ totals: {
685
+ __typename?: 'MtwFreightPreview';
686
+ completeRelativeToDeclarations: boolean;
687
+ reportingTotalMinor?: string | null;
688
+ subtotals: Array<{
689
+ __typename?: 'MtwFreightSubtotal';
690
+ payerReference?: string | null;
691
+ payerLabel?: string | null;
692
+ knownAmountMinor: string;
693
+ totalAmountMinor?: string | null;
694
+ currency: {
695
+ __typename?: 'MtwFreightCurrency';
696
+ code: string;
697
+ minorUnitDigits: number;
698
+ };
699
+ }>;
700
+ lines: Array<{
701
+ __typename?: 'MtwFreightLineTotal';
702
+ id: string;
703
+ nativeAmountMinor?: string | null;
704
+ reportingAmountMinor?: string | null;
705
+ roundedToZero: boolean;
706
+ }>;
707
+ reasons: Array<{
708
+ __typename?: 'MtwFreightReason';
709
+ code: string;
710
+ lineId?: string | null;
711
+ detail: string;
712
+ }>;
713
+ warnings: Array<{
714
+ __typename?: 'MtwFreightReason';
715
+ code: string;
716
+ lineId?: string | null;
717
+ detail: string;
718
+ }>;
719
+ };
720
+ evidence: Array<{
721
+ __typename?: 'MtwContainerEvidence';
722
+ fileId: string;
723
+ versionId: string;
724
+ sha256Hash: string;
725
+ checkedAt: string;
726
+ }>;
727
+ commercialCapture?: {
728
+ __typename?: 'MtwFreightCommercialCapture';
729
+ schemaVersion: number;
730
+ selectedLegs: Array<{
731
+ __typename?: 'MtwFreightCommercialLegPin';
732
+ id: string;
733
+ expectedUpdatedAt: string;
734
+ }>;
735
+ origin: {
736
+ __typename?: 'MtwFreightCommercialLocationFact';
737
+ status: MtwFreightCommercialStatus;
738
+ reason?: string | null;
739
+ value?: {
740
+ __typename?: 'MtwFreightCommercialLocation';
741
+ kind: MtwFreightLocationKind;
742
+ label: string;
743
+ jurisdictionLabel?: string | null;
744
+ } | null;
745
+ provenance?: {
746
+ __typename?: 'MtwFreightCommercialProvenance';
747
+ sourceReference: string;
748
+ sourceRevision: string;
749
+ observedAt?: string | null;
750
+ evidenceLinks: Array<{
751
+ __typename?: 'MtwFreightCommercialLink';
752
+ fileId: string;
753
+ versionId: string;
754
+ }>;
755
+ } | null;
756
+ };
757
+ destination: {
758
+ __typename?: 'MtwFreightCommercialLocationFact';
759
+ status: MtwFreightCommercialStatus;
760
+ reason?: string | null;
761
+ value?: {
762
+ __typename?: 'MtwFreightCommercialLocation';
763
+ kind: MtwFreightLocationKind;
764
+ label: string;
765
+ jurisdictionLabel?: string | null;
766
+ } | null;
767
+ provenance?: {
768
+ __typename?: 'MtwFreightCommercialProvenance';
769
+ sourceReference: string;
770
+ sourceRevision: string;
771
+ observedAt?: string | null;
772
+ evidenceLinks: Array<{
773
+ __typename?: 'MtwFreightCommercialLink';
774
+ fileId: string;
775
+ versionId: string;
776
+ }>;
777
+ } | null;
778
+ };
779
+ carrier: {
780
+ __typename?: 'MtwFreightCommercialCarrierFact';
781
+ status: MtwFreightCommercialStatus;
782
+ reason?: string | null;
783
+ value?: {
784
+ __typename?: 'MtwFreightCommercialCarrier';
785
+ reference: string;
786
+ label: string;
787
+ } | null;
788
+ provenance?: {
789
+ __typename?: 'MtwFreightCommercialProvenance';
790
+ sourceReference: string;
791
+ sourceRevision: string;
792
+ observedAt?: string | null;
793
+ evidenceLinks: Array<{
794
+ __typename?: 'MtwFreightCommercialLink';
795
+ fileId: string;
796
+ versionId: string;
797
+ }>;
798
+ } | null;
799
+ };
800
+ service: {
801
+ __typename?: 'MtwFreightCommercialServiceFact';
802
+ status: MtwFreightCommercialStatus;
803
+ value?: string | null;
804
+ reason?: string | null;
805
+ provenance?: {
806
+ __typename?: 'MtwFreightCommercialProvenance';
807
+ sourceReference: string;
808
+ sourceRevision: string;
809
+ observedAt?: string | null;
810
+ evidenceLinks: Array<{
811
+ __typename?: 'MtwFreightCommercialLink';
812
+ fileId: string;
813
+ versionId: string;
814
+ }>;
815
+ } | null;
816
+ };
817
+ cargo: {
818
+ __typename?: 'MtwFreightCommercialCargoFact';
819
+ status: MtwFreightCommercialStatus;
820
+ reason?: string | null;
821
+ value?: {
822
+ __typename?: 'MtwFreightCommercialCargo';
823
+ classificationLabel: string;
824
+ description: string;
825
+ } | null;
826
+ provenance?: {
827
+ __typename?: 'MtwFreightCommercialProvenance';
828
+ sourceReference: string;
829
+ sourceRevision: string;
830
+ observedAt?: string | null;
831
+ evidenceLinks: Array<{
832
+ __typename?: 'MtwFreightCommercialLink';
833
+ fileId: string;
834
+ versionId: string;
835
+ }>;
836
+ } | null;
837
+ };
838
+ weight: {
839
+ __typename?: 'MtwFreightCommercialWeightFact';
840
+ status: MtwFreightCommercialStatus;
841
+ reason?: string | null;
842
+ value?: {
843
+ __typename?: 'MtwFreightCommercialWeight';
844
+ amount: string;
845
+ unit: MtwFreightWeightUnit;
846
+ zeroReason?: string | null;
847
+ } | null;
848
+ provenance?: {
849
+ __typename?: 'MtwFreightCommercialProvenance';
850
+ sourceReference: string;
851
+ sourceRevision: string;
852
+ observedAt?: string | null;
853
+ evidenceLinks: Array<{
854
+ __typename?: 'MtwFreightCommercialLink';
855
+ fileId: string;
856
+ versionId: string;
857
+ }>;
858
+ } | null;
859
+ };
860
+ volume: {
861
+ __typename?: 'MtwFreightCommercialVolumeFact';
862
+ status: MtwFreightCommercialStatus;
863
+ reason?: string | null;
864
+ value?: {
865
+ __typename?: 'MtwFreightCommercialVolume';
866
+ amount: string;
867
+ unit: MtwFreightVolumeUnit;
868
+ zeroReason?: string | null;
869
+ } | null;
870
+ provenance?: {
871
+ __typename?: 'MtwFreightCommercialProvenance';
872
+ sourceReference: string;
873
+ sourceRevision: string;
874
+ observedAt?: string | null;
875
+ evidenceLinks: Array<{
876
+ __typename?: 'MtwFreightCommercialLink';
877
+ fileId: string;
878
+ versionId: string;
879
+ }>;
880
+ } | null;
881
+ };
882
+ equipment: {
883
+ __typename?: 'MtwFreightCommercialEquipmentFact';
884
+ status: MtwFreightCommercialStatus;
885
+ reason?: string | null;
886
+ value?: {
887
+ __typename?: 'MtwFreightCommercialEquipment';
888
+ typeLabel: string;
889
+ count: number;
890
+ } | null;
891
+ provenance?: {
892
+ __typename?: 'MtwFreightCommercialProvenance';
893
+ sourceReference: string;
894
+ sourceRevision: string;
895
+ observedAt?: string | null;
896
+ evidenceLinks: Array<{
897
+ __typename?: 'MtwFreightCommercialLink';
898
+ fileId: string;
899
+ versionId: string;
900
+ }>;
901
+ } | null;
902
+ };
903
+ ownerShipment: {
904
+ __typename?: 'MtwFreightCommercialShipment';
905
+ shipmentId: string;
906
+ updatedAt: string;
907
+ primaryMode: TransportMode;
908
+ };
909
+ ownerLegs: Array<{
910
+ __typename?: 'MtwFreightCommercialOwnerLeg';
911
+ id: string;
912
+ updatedAt: string;
913
+ legNumber: number;
914
+ mode: TransportMode;
915
+ carrierId?: string | null;
916
+ carrierName?: string | null;
917
+ weightKg?: number | null;
918
+ volumeCbm?: number | null;
919
+ containerType?: OceanContainerType | null;
920
+ containerCount?: number | null;
921
+ }>;
922
+ } | null;
923
+ };
924
+ };
925
+ export type FreightCommercialVersionQueryVariables = Exact<{
926
+ shipmentId: Scalars['ID']['input'];
927
+ id: Scalars['ID']['input'];
928
+ }>;
929
+ export type FreightCommercialVersionQuery = {
930
+ __typename?: 'Query';
931
+ mtwFreightEstimateVersion: {
932
+ __typename?: 'MtwFreightEstimateVersion';
933
+ id: string;
934
+ shipmentId: string;
935
+ estimateReference: string;
936
+ version: number;
937
+ previousVersionId?: string | null;
938
+ recordedAt: string;
939
+ createdBy: string;
940
+ actorProvenance: string;
941
+ onBehalfOf?: string | null;
942
+ validityAtRead: string;
943
+ shipmentCapture: {
944
+ __typename?: 'MtwFreightShipmentCapture';
945
+ shipmentNumber: string;
946
+ primaryMode: string;
947
+ capturedUpdatedAt: string;
948
+ };
949
+ facts: {
950
+ __typename?: 'MtwFreightFacts';
951
+ kind: MtwFreightKind;
952
+ title: string;
953
+ commercialScope: string;
954
+ sourceReference: string;
955
+ sourceRevision: string;
956
+ pricingAt: string;
957
+ quotedAt?: string | null;
958
+ validFrom?: string | null;
959
+ validUntil?: string | null;
960
+ rounding: MtwFreightRounding;
961
+ reportingCurrency?: {
962
+ __typename?: 'MtwFreightCurrency';
963
+ code: string;
964
+ minorUnitDigits: number;
965
+ } | null;
966
+ lines: Array<{
967
+ __typename?: 'MtwFreightLine';
968
+ id: string;
969
+ category: MtwFreightCategory;
970
+ description: string;
971
+ payerReference?: string | null;
972
+ payerLabel?: string | null;
973
+ disposition: MtwFreightDisposition;
974
+ inclusionParentLineId?: string | null;
975
+ amountBasis: MtwFreightAmountBasis;
976
+ quantity?: string | null;
977
+ unit?: string | null;
978
+ unitRateMajor?: string | null;
979
+ amountMinor?: string | null;
980
+ zeroReason?: string | null;
981
+ sourceReference?: string | null;
982
+ sourceRevision?: string | null;
983
+ currency: {
984
+ __typename?: 'MtwFreightCurrency';
985
+ code: string;
986
+ minorUnitDigits: number;
987
+ };
988
+ }>;
989
+ requirements: Array<{
990
+ __typename?: 'MtwFreightRequirement';
991
+ category: MtwFreightCategory;
992
+ status: MtwFreightRequirementStatus;
993
+ reason?: string | null;
994
+ sourceReference?: string | null;
995
+ sourceRevision?: string | null;
996
+ }>;
997
+ fx: Array<{
998
+ __typename?: 'MtwFreightFx';
999
+ rate: string;
1000
+ observedAt: string;
1001
+ effectiveFrom: string;
1002
+ effectiveUntil: string;
1003
+ sourceReference: string;
1004
+ sourceRevision: string;
1005
+ fromCurrency: {
1006
+ __typename?: 'MtwFreightCurrency';
1007
+ code: string;
1008
+ minorUnitDigits: number;
1009
+ };
1010
+ toCurrency: {
1011
+ __typename?: 'MtwFreightCurrency';
1012
+ code: string;
1013
+ minorUnitDigits: number;
1014
+ };
1015
+ }>;
1016
+ };
1017
+ totals: {
1018
+ __typename?: 'MtwFreightPreview';
1019
+ completeRelativeToDeclarations: boolean;
1020
+ reportingTotalMinor?: string | null;
1021
+ subtotals: Array<{
1022
+ __typename?: 'MtwFreightSubtotal';
1023
+ payerReference?: string | null;
1024
+ payerLabel?: string | null;
1025
+ knownAmountMinor: string;
1026
+ totalAmountMinor?: string | null;
1027
+ currency: {
1028
+ __typename?: 'MtwFreightCurrency';
1029
+ code: string;
1030
+ minorUnitDigits: number;
1031
+ };
1032
+ }>;
1033
+ lines: Array<{
1034
+ __typename?: 'MtwFreightLineTotal';
1035
+ id: string;
1036
+ nativeAmountMinor?: string | null;
1037
+ reportingAmountMinor?: string | null;
1038
+ roundedToZero: boolean;
1039
+ }>;
1040
+ reasons: Array<{
1041
+ __typename?: 'MtwFreightReason';
1042
+ code: string;
1043
+ lineId?: string | null;
1044
+ detail: string;
1045
+ }>;
1046
+ warnings: Array<{
1047
+ __typename?: 'MtwFreightReason';
1048
+ code: string;
1049
+ lineId?: string | null;
1050
+ detail: string;
1051
+ }>;
1052
+ };
1053
+ evidence: Array<{
1054
+ __typename?: 'MtwContainerEvidence';
1055
+ fileId: string;
1056
+ versionId: string;
1057
+ sha256Hash: string;
1058
+ checkedAt: string;
1059
+ }>;
1060
+ commercialCapture?: {
1061
+ __typename?: 'MtwFreightCommercialCapture';
1062
+ schemaVersion: number;
1063
+ selectedLegs: Array<{
1064
+ __typename?: 'MtwFreightCommercialLegPin';
1065
+ id: string;
1066
+ expectedUpdatedAt: string;
1067
+ }>;
1068
+ origin: {
1069
+ __typename?: 'MtwFreightCommercialLocationFact';
1070
+ status: MtwFreightCommercialStatus;
1071
+ reason?: string | null;
1072
+ value?: {
1073
+ __typename?: 'MtwFreightCommercialLocation';
1074
+ kind: MtwFreightLocationKind;
1075
+ label: string;
1076
+ jurisdictionLabel?: string | null;
1077
+ } | null;
1078
+ provenance?: {
1079
+ __typename?: 'MtwFreightCommercialProvenance';
1080
+ sourceReference: string;
1081
+ sourceRevision: string;
1082
+ observedAt?: string | null;
1083
+ evidenceLinks: Array<{
1084
+ __typename?: 'MtwFreightCommercialLink';
1085
+ fileId: string;
1086
+ versionId: string;
1087
+ }>;
1088
+ } | null;
1089
+ };
1090
+ destination: {
1091
+ __typename?: 'MtwFreightCommercialLocationFact';
1092
+ status: MtwFreightCommercialStatus;
1093
+ reason?: string | null;
1094
+ value?: {
1095
+ __typename?: 'MtwFreightCommercialLocation';
1096
+ kind: MtwFreightLocationKind;
1097
+ label: string;
1098
+ jurisdictionLabel?: string | null;
1099
+ } | null;
1100
+ provenance?: {
1101
+ __typename?: 'MtwFreightCommercialProvenance';
1102
+ sourceReference: string;
1103
+ sourceRevision: string;
1104
+ observedAt?: string | null;
1105
+ evidenceLinks: Array<{
1106
+ __typename?: 'MtwFreightCommercialLink';
1107
+ fileId: string;
1108
+ versionId: string;
1109
+ }>;
1110
+ } | null;
1111
+ };
1112
+ carrier: {
1113
+ __typename?: 'MtwFreightCommercialCarrierFact';
1114
+ status: MtwFreightCommercialStatus;
1115
+ reason?: string | null;
1116
+ value?: {
1117
+ __typename?: 'MtwFreightCommercialCarrier';
1118
+ reference: string;
1119
+ label: string;
1120
+ } | null;
1121
+ provenance?: {
1122
+ __typename?: 'MtwFreightCommercialProvenance';
1123
+ sourceReference: string;
1124
+ sourceRevision: string;
1125
+ observedAt?: string | null;
1126
+ evidenceLinks: Array<{
1127
+ __typename?: 'MtwFreightCommercialLink';
1128
+ fileId: string;
1129
+ versionId: string;
1130
+ }>;
1131
+ } | null;
1132
+ };
1133
+ service: {
1134
+ __typename?: 'MtwFreightCommercialServiceFact';
1135
+ status: MtwFreightCommercialStatus;
1136
+ value?: string | null;
1137
+ reason?: string | null;
1138
+ provenance?: {
1139
+ __typename?: 'MtwFreightCommercialProvenance';
1140
+ sourceReference: string;
1141
+ sourceRevision: string;
1142
+ observedAt?: string | null;
1143
+ evidenceLinks: Array<{
1144
+ __typename?: 'MtwFreightCommercialLink';
1145
+ fileId: string;
1146
+ versionId: string;
1147
+ }>;
1148
+ } | null;
1149
+ };
1150
+ cargo: {
1151
+ __typename?: 'MtwFreightCommercialCargoFact';
1152
+ status: MtwFreightCommercialStatus;
1153
+ reason?: string | null;
1154
+ value?: {
1155
+ __typename?: 'MtwFreightCommercialCargo';
1156
+ classificationLabel: string;
1157
+ description: string;
1158
+ } | null;
1159
+ provenance?: {
1160
+ __typename?: 'MtwFreightCommercialProvenance';
1161
+ sourceReference: string;
1162
+ sourceRevision: string;
1163
+ observedAt?: string | null;
1164
+ evidenceLinks: Array<{
1165
+ __typename?: 'MtwFreightCommercialLink';
1166
+ fileId: string;
1167
+ versionId: string;
1168
+ }>;
1169
+ } | null;
1170
+ };
1171
+ weight: {
1172
+ __typename?: 'MtwFreightCommercialWeightFact';
1173
+ status: MtwFreightCommercialStatus;
1174
+ reason?: string | null;
1175
+ value?: {
1176
+ __typename?: 'MtwFreightCommercialWeight';
1177
+ amount: string;
1178
+ unit: MtwFreightWeightUnit;
1179
+ zeroReason?: string | null;
1180
+ } | null;
1181
+ provenance?: {
1182
+ __typename?: 'MtwFreightCommercialProvenance';
1183
+ sourceReference: string;
1184
+ sourceRevision: string;
1185
+ observedAt?: string | null;
1186
+ evidenceLinks: Array<{
1187
+ __typename?: 'MtwFreightCommercialLink';
1188
+ fileId: string;
1189
+ versionId: string;
1190
+ }>;
1191
+ } | null;
1192
+ };
1193
+ volume: {
1194
+ __typename?: 'MtwFreightCommercialVolumeFact';
1195
+ status: MtwFreightCommercialStatus;
1196
+ reason?: string | null;
1197
+ value?: {
1198
+ __typename?: 'MtwFreightCommercialVolume';
1199
+ amount: string;
1200
+ unit: MtwFreightVolumeUnit;
1201
+ zeroReason?: string | null;
1202
+ } | null;
1203
+ provenance?: {
1204
+ __typename?: 'MtwFreightCommercialProvenance';
1205
+ sourceReference: string;
1206
+ sourceRevision: string;
1207
+ observedAt?: string | null;
1208
+ evidenceLinks: Array<{
1209
+ __typename?: 'MtwFreightCommercialLink';
1210
+ fileId: string;
1211
+ versionId: string;
1212
+ }>;
1213
+ } | null;
1214
+ };
1215
+ equipment: {
1216
+ __typename?: 'MtwFreightCommercialEquipmentFact';
1217
+ status: MtwFreightCommercialStatus;
1218
+ reason?: string | null;
1219
+ value?: {
1220
+ __typename?: 'MtwFreightCommercialEquipment';
1221
+ typeLabel: string;
1222
+ count: number;
1223
+ } | null;
1224
+ provenance?: {
1225
+ __typename?: 'MtwFreightCommercialProvenance';
1226
+ sourceReference: string;
1227
+ sourceRevision: string;
1228
+ observedAt?: string | null;
1229
+ evidenceLinks: Array<{
1230
+ __typename?: 'MtwFreightCommercialLink';
1231
+ fileId: string;
1232
+ versionId: string;
1233
+ }>;
1234
+ } | null;
1235
+ };
1236
+ ownerShipment: {
1237
+ __typename?: 'MtwFreightCommercialShipment';
1238
+ shipmentId: string;
1239
+ updatedAt: string;
1240
+ primaryMode: TransportMode;
1241
+ };
1242
+ ownerLegs: Array<{
1243
+ __typename?: 'MtwFreightCommercialOwnerLeg';
1244
+ id: string;
1245
+ updatedAt: string;
1246
+ legNumber: number;
1247
+ mode: TransportMode;
1248
+ carrierId?: string | null;
1249
+ carrierName?: string | null;
1250
+ weightKg?: number | null;
1251
+ volumeCbm?: number | null;
1252
+ containerType?: OceanContainerType | null;
1253
+ containerCount?: number | null;
1254
+ }>;
1255
+ } | null;
1256
+ };
1257
+ };
1258
+ export type FreightCommercialLegsQueryVariables = Exact<{
1259
+ shipmentId: Scalars['ID']['input'];
1260
+ pagination: PaginationInput;
1261
+ }>;
1262
+ export type FreightCommercialLegsQuery = {
1263
+ __typename?: 'Query';
1264
+ shipment?: {
1265
+ __typename?: 'MtwShipment';
1266
+ id: string;
1267
+ legs: Array<{
1268
+ __typename?: 'MtwShipmentLeg';
1269
+ id: string;
1270
+ shipmentId: string;
1271
+ updatedAt: string;
1272
+ legNumber: number;
1273
+ mode: TransportMode;
1274
+ carrierId?: string | null;
1275
+ carrierName?: string | null;
1276
+ weightKg?: number | null;
1277
+ volumeCbm?: number | null;
1278
+ containerType?: OceanContainerType | null;
1279
+ containerCount?: number | null;
1280
+ }>;
1281
+ } | null;
1282
+ };
328
1283
  export type FreightShipmentsQueryVariables = Exact<{
329
1284
  pagination?: InputMaybe<PaginationInput>;
330
1285
  }>;
@@ -708,6 +1663,10 @@ export type SaveFreightCostsMutation = {
708
1663
  }>;
709
1664
  };
710
1665
  };
1666
+ export declare const CommercialProvenanceFragmentDoc: import('graphql').DocumentNode;
1667
+ export declare const SaveFreightCommercialCostsDocument: import('graphql').DocumentNode;
1668
+ export declare const FreightCommercialVersionDocument: import('graphql').DocumentNode;
1669
+ export declare const FreightCommercialLegsDocument: import('graphql').DocumentNode;
711
1670
  export declare const FreightShipmentsDocument: import('graphql').DocumentNode;
712
1671
  export declare const FreightShipmentDocument: import('graphql').DocumentNode;
713
1672
  export declare const FreightHistoryDocument: import('graphql').DocumentNode;