@burdenoff/microfe-movethewheels 2026.1017.11 → 2026.1017.13

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 (29) hide show
  1. package/dist/MoveTheWheelsRoot.js +7 -0
  2. package/dist/MoveTheWheelsRoutes.js +39 -35
  3. package/dist/components/pallet-preview/PalletPreviewResults.js +189 -0
  4. package/dist/generated/pallet-preview-operations.d.ts +273 -0
  5. package/dist/hooks/usePalletPreview.js +86 -0
  6. package/dist/movethewheels/components/pallet-preview/PalletPreviewResults.d.ts +6 -0
  7. package/dist/movethewheels/hooks/usePalletPreview.d.ts +98 -0
  8. package/dist/movethewheels/pages/PalletPreviewPage.d.ts +1 -0
  9. package/dist/movethewheels/utils/graphqlClient.d.ts +4 -0
  10. package/dist/movethewheels/utils/palletPreviewInput.d.ts +54 -0
  11. package/dist/movethewheels/utils/palletPreviewResponse.d.ts +7 -0
  12. package/dist/pages/PalletPreviewPage.js +501 -0
  13. package/dist/pages/WarehousesPage.js +83 -78
  14. package/dist/src/generated/pallet-preview-operations.js +594 -0
  15. package/dist/utils/graphqlClient.js +27 -19
  16. package/dist/utils/palletPreviewInput.js +138 -0
  17. package/dist/utils/palletPreviewResponse.js +191 -0
  18. package/package.json +5 -4
  19. package/src/generated/pallet-preview-operations.ts +204 -0
  20. package/src/movethewheels/MoveTheWheelsRoot.tsx +7 -0
  21. package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
  22. package/src/movethewheels/components/pallet-preview/PalletPreviewResults.tsx +220 -0
  23. package/src/movethewheels/hooks/usePalletPreview.ts +114 -0
  24. package/src/movethewheels/pages/PalletPreviewPage.tsx +588 -0
  25. package/src/movethewheels/pages/WarehousesPage.tsx +9 -1
  26. package/src/movethewheels/utils/graphqlClient.ts +19 -2
  27. package/src/movethewheels/utils/palletPreviewInput.ts +199 -0
  28. package/src/movethewheels/utils/palletPreviewResponse.ts +256 -0
  29. package/src/operations/pallet-preview/preview.graphql +26 -0
@@ -0,0 +1,273 @@
1
+ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
2
+ /** Internal type. DO NOT USE DIRECTLY. */
3
+ type Exact<T extends {
4
+ [key: string]: unknown;
5
+ }> = {
6
+ [K in keyof T]: T[K];
7
+ };
8
+ /** Internal type. DO NOT USE DIRECTLY. */
9
+ export type Incremental<T> = T | {
10
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
11
+ };
12
+ import type * as Types from './pallet-preview-operations';
13
+ export type Maybe<T> = T | null;
14
+ export type InputMaybe<T> = Maybe<T>;
15
+ /** All built-in and custom scalars, mapped to their actual values */
16
+ export type Scalars = {
17
+ ID: {
18
+ input: string;
19
+ output: string;
20
+ };
21
+ String: {
22
+ input: string;
23
+ output: string;
24
+ };
25
+ Boolean: {
26
+ input: boolean;
27
+ output: boolean;
28
+ };
29
+ Int: {
30
+ input: number;
31
+ output: number;
32
+ };
33
+ Float: {
34
+ input: number;
35
+ output: number;
36
+ };
37
+ };
38
+ export type MtwPalletAdditionalPackingInput = {
39
+ massG?: InputMaybe<Scalars['String']['input']>;
40
+ source?: InputMaybe<MtwPalletMeasurementSourceInput>;
41
+ };
42
+ export type MtwPalletBaseInput = {
43
+ heightMm?: InputMaybe<Scalars['Int']['input']>;
44
+ lengthMm?: InputMaybe<Scalars['Int']['input']>;
45
+ maxPayloadMassG?: InputMaybe<Scalars['String']['input']>;
46
+ source?: InputMaybe<MtwPalletMeasurementSourceInput>;
47
+ tareMassG?: InputMaybe<Scalars['String']['input']>;
48
+ widthMm?: InputMaybe<Scalars['Int']['input']>;
49
+ };
50
+ export type MtwPalletBound = {
51
+ __typename?: 'MtwPalletBound';
52
+ reason: Scalars['String']['output'];
53
+ status: MtwPalletBoundStatus;
54
+ };
55
+ export type MtwPalletBoundStatus = 'FAIL' | 'PASS' | 'UNKNOWN';
56
+ export type MtwPalletBounds = {
57
+ __typename?: 'MtwPalletBounds';
58
+ loadedPalletGrossMass: MtwPalletBound;
59
+ palletFootprintWithinLoadEnvelope: MtwPalletBound;
60
+ palletPayloadMass: MtwPalletBound;
61
+ permittedUprightYaw: MtwPalletBound;
62
+ placedContainment: MtwPalletBound;
63
+ placedNonOverlap: MtwPalletBound;
64
+ reportedSingleLayerHeight: MtwPalletBound;
65
+ };
66
+ export type MtwPalletClassification = 'GEOMETRIC_PROPOSAL_ONLY';
67
+ export type MtwPalletClearanceInput = {
68
+ betweenPackagesMm?: InputMaybe<Scalars['Int']['input']>;
69
+ perimeterMm?: InputMaybe<Scalars['Int']['input']>;
70
+ source?: InputMaybe<MtwPalletMeasurementSourceInput>;
71
+ topMm?: InputMaybe<Scalars['Int']['input']>;
72
+ };
73
+ /** Read-only supplied-measurement geometry; no persistence, stock change or release authority. */
74
+ export type MtwPalletGeometryPreview = {
75
+ __typename?: 'MtwPalletGeometryPreview';
76
+ bounds: MtwPalletBounds;
77
+ classification: MtwPalletClassification;
78
+ layoutStatus: MtwPalletLayoutStatus;
79
+ method: MtwPalletMethod;
80
+ placedQuantity: Scalars['Int']['output'];
81
+ placements: Array<MtwPalletPlacement>;
82
+ requestedGrossMassG?: Maybe<Scalars['String']['output']>;
83
+ requestedPayloadMassG?: Maybe<Scalars['String']['output']>;
84
+ requestedQuantity: Scalars['Int']['output'];
85
+ sources: MtwPalletSources;
86
+ units: MtwPalletUnits;
87
+ unplaced: Array<MtwPalletUnplaced>;
88
+ unsupported: MtwPalletUnsupported;
89
+ };
90
+ export type MtwPalletGeometryPreviewInput = {
91
+ additionalPacking: MtwPalletAdditionalPackingInput;
92
+ clearance: MtwPalletClearanceInput;
93
+ loadEnvelope?: InputMaybe<MtwPalletLoadEnvelopeInput>;
94
+ mode: MtwPalletMode;
95
+ packages: Array<MtwPalletPackageInput>;
96
+ pallet: MtwPalletBaseInput;
97
+ units: MtwPalletUnits;
98
+ };
99
+ export type MtwPalletLayoutStatus = 'NO_LAYOUT_FOUND_BY_METHOD' | 'PLACED_BY_METHOD' | 'UNKNOWN';
100
+ export type MtwPalletLoadEnvelopeInput = {
101
+ lengthMm?: InputMaybe<Scalars['Int']['input']>;
102
+ maxGrossMassG?: InputMaybe<Scalars['String']['input']>;
103
+ maxHeightMm?: InputMaybe<Scalars['Int']['input']>;
104
+ source?: InputMaybe<MtwPalletMeasurementSourceInput>;
105
+ widthMm?: InputMaybe<Scalars['Int']['input']>;
106
+ };
107
+ export type MtwPalletMeasurementSource = {
108
+ __typename?: 'MtwPalletMeasurementSource';
109
+ reference: Scalars['String']['output'];
110
+ version: Scalars['String']['output'];
111
+ };
112
+ export type MtwPalletMeasurementSourceInput = {
113
+ reference: Scalars['String']['input'];
114
+ version: Scalars['String']['input'];
115
+ };
116
+ export type MtwPalletMethod = 'DETERMINISTIC_SINGLE_LAYER_SHELF_V1';
117
+ export type MtwPalletMode = 'UPRIGHT_SINGLE_LAYER';
118
+ export type MtwPalletPackageInput = {
119
+ allowedYawDegrees?: InputMaybe<Array<Scalars['Int']['input']>>;
120
+ grossMassG?: InputMaybe<Scalars['String']['input']>;
121
+ heightMm?: InputMaybe<Scalars['Int']['input']>;
122
+ id: Scalars['ID']['input'];
123
+ lengthMm?: InputMaybe<Scalars['Int']['input']>;
124
+ quantity: Scalars['Int']['input'];
125
+ source?: InputMaybe<MtwPalletMeasurementSourceInput>;
126
+ upright?: InputMaybe<Scalars['Boolean']['input']>;
127
+ widthMm?: InputMaybe<Scalars['Int']['input']>;
128
+ };
129
+ export type MtwPalletPackageSource = {
130
+ __typename?: 'MtwPalletPackageSource';
131
+ packageId: Scalars['ID']['output'];
132
+ source?: Maybe<MtwPalletMeasurementSource>;
133
+ };
134
+ export type MtwPalletPlacement = {
135
+ __typename?: 'MtwPalletPlacement';
136
+ heightMm?: Maybe<Scalars['Int']['output']>;
137
+ lengthMm: Scalars['Int']['output'];
138
+ packageId: Scalars['ID']['output'];
139
+ unit: Scalars['Int']['output'];
140
+ widthMm: Scalars['Int']['output'];
141
+ xMm: Scalars['Int']['output'];
142
+ yMm: Scalars['Int']['output'];
143
+ yawDegrees: Scalars['Int']['output'];
144
+ zMm?: Maybe<Scalars['Int']['output']>;
145
+ };
146
+ export type MtwPalletSources = {
147
+ __typename?: 'MtwPalletSources';
148
+ additionalPacking?: Maybe<MtwPalletMeasurementSource>;
149
+ clearance?: Maybe<MtwPalletMeasurementSource>;
150
+ loadEnvelope?: Maybe<MtwPalletMeasurementSource>;
151
+ packages: Array<MtwPalletPackageSource>;
152
+ pallet?: Maybe<MtwPalletMeasurementSource>;
153
+ };
154
+ export type MtwPalletUnits = 'MM_G';
155
+ export type MtwPalletUnplaced = {
156
+ __typename?: 'MtwPalletUnplaced';
157
+ packageId: Scalars['ID']['output'];
158
+ quantity: Scalars['Int']['output'];
159
+ };
160
+ export type MtwPalletUnsupported = {
161
+ __typename?: 'MtwPalletUnsupported';
162
+ additionalPackingGeometry: MtwPalletUnsupportedStatus;
163
+ centreOfGravityAndStability: MtwPalletUnsupportedStatus;
164
+ handling: MtwPalletUnsupportedStatus;
165
+ loadingAndUnloadingPath: MtwPalletUnsupportedStatus;
166
+ securing: MtwPalletUnsupportedStatus;
167
+ segregationAndCargoCompatibility: MtwPalletUnsupportedStatus;
168
+ supportAndFloorContactLoads: MtwPalletUnsupportedStatus;
169
+ };
170
+ export type MtwPalletUnsupportedStatus = 'UNKNOWN';
171
+ export type Query = {
172
+ __typename?: 'Query';
173
+ mtwPalletGeometryPreview: MtwPalletGeometryPreview;
174
+ };
175
+ export type QueryMtwPalletGeometryPreviewArgs = {
176
+ input: MtwPalletGeometryPreviewInput;
177
+ };
178
+ export type MtwPalletGeometryPreviewQueryVariables = Exact<{
179
+ input: Types.MtwPalletGeometryPreviewInput;
180
+ }>;
181
+ export type MtwPalletGeometryPreviewQuery = {
182
+ mtwPalletGeometryPreview: {
183
+ classification: Types.MtwPalletClassification;
184
+ method: Types.MtwPalletMethod;
185
+ units: Types.MtwPalletUnits;
186
+ layoutStatus: Types.MtwPalletLayoutStatus;
187
+ requestedQuantity: number;
188
+ placedQuantity: number;
189
+ requestedPayloadMassG: string | null;
190
+ requestedGrossMassG: string | null;
191
+ placements: Array<{
192
+ packageId: string;
193
+ unit: number;
194
+ yawDegrees: number;
195
+ xMm: number;
196
+ yMm: number;
197
+ zMm: number | null;
198
+ widthMm: number;
199
+ lengthMm: number;
200
+ heightMm: number | null;
201
+ }>;
202
+ unplaced: Array<{
203
+ packageId: string;
204
+ quantity: number;
205
+ }>;
206
+ bounds: {
207
+ placedContainment: {
208
+ status: Types.MtwPalletBoundStatus;
209
+ reason: string;
210
+ };
211
+ placedNonOverlap: {
212
+ status: Types.MtwPalletBoundStatus;
213
+ reason: string;
214
+ };
215
+ permittedUprightYaw: {
216
+ status: Types.MtwPalletBoundStatus;
217
+ reason: string;
218
+ };
219
+ reportedSingleLayerHeight: {
220
+ status: Types.MtwPalletBoundStatus;
221
+ reason: string;
222
+ };
223
+ palletPayloadMass: {
224
+ status: Types.MtwPalletBoundStatus;
225
+ reason: string;
226
+ };
227
+ palletFootprintWithinLoadEnvelope: {
228
+ status: Types.MtwPalletBoundStatus;
229
+ reason: string;
230
+ };
231
+ loadedPalletGrossMass: {
232
+ status: Types.MtwPalletBoundStatus;
233
+ reason: string;
234
+ };
235
+ };
236
+ unsupported: {
237
+ additionalPackingGeometry: Types.MtwPalletUnsupportedStatus;
238
+ handling: Types.MtwPalletUnsupportedStatus;
239
+ securing: Types.MtwPalletUnsupportedStatus;
240
+ centreOfGravityAndStability: Types.MtwPalletUnsupportedStatus;
241
+ supportAndFloorContactLoads: Types.MtwPalletUnsupportedStatus;
242
+ loadingAndUnloadingPath: Types.MtwPalletUnsupportedStatus;
243
+ segregationAndCargoCompatibility: Types.MtwPalletUnsupportedStatus;
244
+ };
245
+ sources: {
246
+ packages: Array<{
247
+ packageId: string;
248
+ source: {
249
+ reference: string;
250
+ version: string;
251
+ } | null;
252
+ }>;
253
+ pallet: {
254
+ reference: string;
255
+ version: string;
256
+ } | null;
257
+ loadEnvelope: {
258
+ reference: string;
259
+ version: string;
260
+ } | null;
261
+ additionalPacking: {
262
+ reference: string;
263
+ version: string;
264
+ } | null;
265
+ clearance: {
266
+ reference: string;
267
+ version: string;
268
+ } | null;
269
+ };
270
+ };
271
+ };
272
+ export declare const MtwPalletGeometryPreviewDocument: DocumentNode<MtwPalletGeometryPreviewQuery, MtwPalletGeometryPreviewQueryVariables>;
273
+ export {};
@@ -0,0 +1,86 @@
1
+ import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
+ import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
+ import { parsePalletPreview as n, validatePalletPreviewEnvelope as r } from "../utils/palletPreviewResponse.js";
4
+ import { MtwPalletGeometryPreviewDocument as i } from "../src/generated/pallet-preview-operations.js";
5
+ import { useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
6
+ import { print as d } from "graphql";
7
+ //#region src/movethewheels/hooks/usePalletPreview.ts
8
+ var f = d(i);
9
+ function p() {
10
+ let { workspaceId: i, tenantId: d, currentUser: p, apiGatewayUrl: m, authToken: h, workspaceToken: g } = e(), _ = c(() => ({
11
+ workspaceId: i,
12
+ tenantId: d,
13
+ actorId: p?.id,
14
+ apiGatewayUrl: m,
15
+ authToken: h,
16
+ workspaceToken: g
17
+ }), [
18
+ i,
19
+ d,
20
+ p?.id,
21
+ m,
22
+ h,
23
+ g
24
+ ]), v = l(_);
25
+ s(() => {
26
+ v.current = _;
27
+ }, [_]);
28
+ let y = l(0), b = l(null), [x, S] = u(null), C = a(() => {
29
+ y.current++, b.current?.abort(), b.current = null, S(null);
30
+ }, []);
31
+ o(() => (C(), () => {
32
+ y.current++, b.current?.abort(), b.current = null;
33
+ }), [_, C]);
34
+ let w = a(async (e) => {
35
+ if (v.current !== _ || b.current || !_.workspaceId || !_.actorId) return;
36
+ e = structuredClone(e);
37
+ let i = new AbortController();
38
+ b.current = i;
39
+ let a = ++y.current;
40
+ S({
41
+ context: _,
42
+ generation: a,
43
+ loading: !0,
44
+ result: null,
45
+ input: e,
46
+ failed: !1
47
+ });
48
+ try {
49
+ let o = n(await t({
50
+ ..._,
51
+ signal: i.signal,
52
+ validateResponse: r
53
+ }, f, { input: e }), e);
54
+ !i.signal.aborted && v.current === _ && y.current === a && S({
55
+ context: _,
56
+ generation: a,
57
+ loading: !1,
58
+ result: o,
59
+ input: e,
60
+ failed: !1
61
+ });
62
+ } catch {
63
+ !i.signal.aborted && v.current === _ && y.current === a && S({
64
+ context: _,
65
+ generation: a,
66
+ loading: !1,
67
+ result: null,
68
+ input: e,
69
+ failed: !0
70
+ });
71
+ } finally {
72
+ b.current === i && (b.current = null);
73
+ }
74
+ }, [_]), T = x?.context === _;
75
+ return {
76
+ run: w,
77
+ invalidate: C,
78
+ ready: !!_.workspaceId && !!_.actorId,
79
+ loading: T ? x.loading : !1,
80
+ result: T ? x.result : null,
81
+ input: T ? x.input : null,
82
+ failed: T ? x.failed : !1
83
+ };
84
+ }
85
+ //#endregion
86
+ export { p as usePalletPreview };
@@ -0,0 +1,6 @@
1
+ import { MtwPalletGeometryPreviewInput } from '../../../generated/pallet-preview-operations';
2
+ import { PalletPreview } from '../../utils/palletPreviewResponse';
3
+ export declare function PalletPreviewResults({ result, input, }: {
4
+ result: PalletPreview;
5
+ input: MtwPalletGeometryPreviewInput;
6
+ }): import('react').JSX.Element;
@@ -0,0 +1,98 @@
1
+ import { MtwPalletGeometryPreviewInput } from '../../generated/pallet-preview-operations';
2
+ export declare function usePalletPreview(): {
3
+ run: (input: MtwPalletGeometryPreviewInput) => Promise<void>;
4
+ invalidate: () => void;
5
+ ready: boolean;
6
+ loading: boolean;
7
+ result: {
8
+ classification: import('../../generated/pallet-preview-operations').MtwPalletClassification;
9
+ method: import('../../generated/pallet-preview-operations').MtwPalletMethod;
10
+ units: import('../../generated/pallet-preview-operations').MtwPalletUnits;
11
+ layoutStatus: import('../../generated/pallet-preview-operations').MtwPalletLayoutStatus;
12
+ requestedQuantity: number;
13
+ placedQuantity: number;
14
+ requestedPayloadMassG: string | null;
15
+ requestedGrossMassG: string | null;
16
+ placements: Array<{
17
+ packageId: string;
18
+ unit: number;
19
+ yawDegrees: number;
20
+ xMm: number;
21
+ yMm: number;
22
+ zMm: number | null;
23
+ widthMm: number;
24
+ lengthMm: number;
25
+ heightMm: number | null;
26
+ }>;
27
+ unplaced: Array<{
28
+ packageId: string;
29
+ quantity: number;
30
+ }>;
31
+ bounds: {
32
+ placedContainment: {
33
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
34
+ reason: string;
35
+ };
36
+ placedNonOverlap: {
37
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
38
+ reason: string;
39
+ };
40
+ permittedUprightYaw: {
41
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
42
+ reason: string;
43
+ };
44
+ reportedSingleLayerHeight: {
45
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
46
+ reason: string;
47
+ };
48
+ palletPayloadMass: {
49
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
50
+ reason: string;
51
+ };
52
+ palletFootprintWithinLoadEnvelope: {
53
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
54
+ reason: string;
55
+ };
56
+ loadedPalletGrossMass: {
57
+ status: import('../../generated/pallet-preview-operations').MtwPalletBoundStatus;
58
+ reason: string;
59
+ };
60
+ };
61
+ unsupported: {
62
+ additionalPackingGeometry: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
63
+ handling: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
64
+ securing: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
65
+ centreOfGravityAndStability: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
66
+ supportAndFloorContactLoads: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
67
+ loadingAndUnloadingPath: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
68
+ segregationAndCargoCompatibility: import('../../generated/pallet-preview-operations').MtwPalletUnsupportedStatus;
69
+ };
70
+ sources: {
71
+ packages: Array<{
72
+ packageId: string;
73
+ source: {
74
+ reference: string;
75
+ version: string;
76
+ } | null;
77
+ }>;
78
+ pallet: {
79
+ reference: string;
80
+ version: string;
81
+ } | null;
82
+ loadEnvelope: {
83
+ reference: string;
84
+ version: string;
85
+ } | null;
86
+ additionalPacking: {
87
+ reference: string;
88
+ version: string;
89
+ } | null;
90
+ clearance: {
91
+ reference: string;
92
+ version: string;
93
+ } | null;
94
+ };
95
+ } | null;
96
+ input: MtwPalletGeometryPreviewInput | null;
97
+ failed: boolean;
98
+ };
@@ -0,0 +1 @@
1
+ export default function PalletPreviewPage(): import('react').JSX.Element;
@@ -7,6 +7,10 @@ interface GraphQLRequestOptions {
7
7
  workspaceId?: string;
8
8
  tenantId?: string;
9
9
  actorId?: string;
10
+ /** Optional caller-owned cancellation; omitted preserves legacy retry behavior. */
11
+ signal?: AbortSignal;
12
+ /** Optional owning read-envelope guard; no effect on existing callers. */
13
+ validateResponse?: (value: unknown) => void;
10
14
  }
11
15
  export declare function resolveGraphqlUrl(apiGatewayUrl?: string): string;
12
16
  export declare function executeGraphQL<TData>(options: GraphQLRequestOptions, query: string, variables?: Record<string, unknown>, attemptPolicy?: GraphQLAttemptPolicy, holdRefusalField?: VehicleHoldMutation): Promise<TData>;
@@ -0,0 +1,54 @@
1
+ import { MtwPalletGeometryPreviewInput } from '../../generated/pallet-preview-operations';
2
+ export interface SourceDraft {
3
+ reference: string;
4
+ version: string;
5
+ }
6
+ export interface PackageDraft {
7
+ key: number;
8
+ id: string;
9
+ quantity: string;
10
+ source: SourceDraft;
11
+ widthMm: string;
12
+ lengthMm: string;
13
+ heightMm: string;
14
+ grossMassG: string;
15
+ yaw: 'UNKNOWN' | 'NONE' | '0' | '90' | 'BOTH';
16
+ upright: 'UNKNOWN' | 'YES' | 'NO';
17
+ }
18
+ export interface PalletPreviewDraft {
19
+ packages: PackageDraft[];
20
+ pallet: {
21
+ source: SourceDraft;
22
+ widthMm: string;
23
+ lengthMm: string;
24
+ heightMm: string;
25
+ tareMassG: string;
26
+ maxPayloadMassG: string;
27
+ };
28
+ includeEnvelope: boolean;
29
+ loadEnvelope: {
30
+ source: SourceDraft;
31
+ widthMm: string;
32
+ lengthMm: string;
33
+ maxHeightMm: string;
34
+ maxGrossMassG: string;
35
+ };
36
+ additionalPacking: {
37
+ source: SourceDraft;
38
+ massG: string;
39
+ };
40
+ clearance: {
41
+ source: SourceDraft;
42
+ perimeterMm: string;
43
+ betweenPackagesMm: string;
44
+ topMm: string;
45
+ };
46
+ }
47
+ export declare const newPalletPackage: (key: number) => PackageDraft;
48
+ export declare function newPalletPreviewDraft(): PalletPreviewDraft;
49
+ export declare class PalletInputError extends Error {
50
+ readonly field: string;
51
+ readonly kind: 'WHOLE' | 'MASS' | 'SOURCE' | 'IDENTITY' | 'COUNT';
52
+ constructor(field: string, kind: 'WHOLE' | 'MASS' | 'SOURCE' | 'IDENTITY' | 'COUNT');
53
+ }
54
+ export declare function palletPreviewInput(draft: PalletPreviewDraft): MtwPalletGeometryPreviewInput;
@@ -0,0 +1,7 @@
1
+ import { MtwPalletGeometryPreviewInput, MtwPalletGeometryPreviewQuery } from '../../generated/pallet-preview-operations';
2
+ export type PalletPreview = MtwPalletGeometryPreviewQuery['mtwPalletGeometryPreview'];
3
+ export declare const PALLET_BOUND_KEYS: readonly ["placedContainment", "placedNonOverlap", "permittedUprightYaw", "reportedSingleLayerHeight", "palletPayloadMass", "palletFootprintWithinLoadEnvelope", "loadedPalletGrossMass"];
4
+ export declare const PALLET_UNKNOWN_KEYS: readonly ["additionalPackingGeometry", "handling", "securing", "centreOfGravityAndStability", "supportAndFloorContactLoads", "loadingAndUnloadingPath", "segregationAndCargoCompatibility"];
5
+ /** New preview only: malformed or mixed envelopes never become a current result. */
6
+ export declare function validatePalletPreviewEnvelope(value: unknown): void;
7
+ export declare function parsePalletPreview(data: unknown, input: MtwPalletGeometryPreviewInput): PalletPreview;