@burdenoff/microfe-movethewheels 2026.1011.1 → 2026.1011.2

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 (30) hide show
  1. package/dist/MoveTheWheelsRoot.js +5 -0
  2. package/dist/MoveTheWheelsRoutes.js +54 -50
  3. package/dist/generated/shipment-status-authority-operations.d.ts +4473 -0
  4. package/dist/hooks/useEpod.js +85 -77
  5. package/dist/hooks/useShipmentStatusAuthority.js +127 -0
  6. package/dist/hooks/useTracking.js +15 -14
  7. package/dist/hooks/useTrackingEventQuality.js +43 -17
  8. package/dist/movethewheels/hooks/useEpod.d.ts +23 -0
  9. package/dist/movethewheels/hooks/useShipmentStatusAuthority.d.ts +23 -0
  10. package/dist/movethewheels/hooks/useTrackingEventQuality.d.ts +5 -0
  11. package/dist/movethewheels/pages/ShipmentStatusAuthorityPage.d.ts +1 -0
  12. package/dist/movethewheels/utils/shipmentStatusDraft.d.ts +45 -0
  13. package/dist/pages/DeliveryCapturePage.js +181 -116
  14. package/dist/pages/ShipmentStatusAuthorityPage.js +563 -0
  15. package/dist/pages/TrackingEventQualityPage.js +6 -1
  16. package/dist/src/generated/shipment-status-authority-operations.js +86 -0
  17. package/dist/utils/shipmentStatusDraft.js +41 -0
  18. package/package.json +5 -4
  19. package/src/generated/shipment-status-authority-operations.ts +5503 -0
  20. package/src/movethewheels/MoveTheWheelsRoot.tsx +6 -0
  21. package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
  22. package/src/movethewheels/hooks/useEpod.ts +47 -12
  23. package/src/movethewheels/hooks/useShipmentStatusAuthority.ts +179 -0
  24. package/src/movethewheels/hooks/useTracking.ts +27 -12
  25. package/src/movethewheels/hooks/useTrackingEventQuality.ts +42 -0
  26. package/src/movethewheels/pages/DeliveryCapturePage.tsx +113 -6
  27. package/src/movethewheels/pages/ShipmentStatusAuthorityPage.tsx +639 -0
  28. package/src/movethewheels/pages/TrackingEventQualityPage.tsx +13 -2
  29. package/src/movethewheels/utils/shipmentStatusDraft.ts +118 -0
  30. package/src/operations/shipment-status-authority/status.graphql +80 -0
@@ -0,0 +1,41 @@
1
+ //#region src/movethewheels/utils/shipmentStatusDraft.ts
2
+ function e(e) {
3
+ let t = e.trim();
4
+ if (!t || t.length > 1e3) throw Error("Enter a reason of 1–1000 characters.");
5
+ return t;
6
+ }
7
+ function t(e, t, n, r) {
8
+ if (!/^\d+$/.test(e.trim())) throw Error(`${r} must be an explicit whole number of seconds.`);
9
+ let i = Number(e.trim());
10
+ if (!Number.isSafeInteger(i) || i < t || i > n) throw Error(`${r} must be between ${t} and ${n} seconds.`);
11
+ return i;
12
+ }
13
+ function n(n, r) {
14
+ if (!n.integrationId || !n.basisTrackingEventId) throw Error("Choose one integration and one recorded basis event.");
15
+ return {
16
+ expectedStatusRevision: r,
17
+ integrationId: n.integrationId,
18
+ basisTrackingEventId: n.basisTrackingEventId,
19
+ maxSourceAgeSeconds: t(n.maxSourceAgeSeconds, 1, 2592e3, "Maximum source age"),
20
+ maxFutureSkewSeconds: t(n.maxFutureSkewSeconds, 0, 86400, "Allowed future skew"),
21
+ reason: e(n.reason)
22
+ };
23
+ }
24
+ function r(e, t) {
25
+ let n = {
26
+ PICKED_UP: "PICKED_UP",
27
+ IN_TRANSIT: "IN_TRANSIT",
28
+ ARRIVED: "IN_TRANSIT",
29
+ DEPARTED: "IN_TRANSIT",
30
+ OUT_FOR_DELIVERY: "IN_TRANSIT",
31
+ DELIVERED: "DELIVERED",
32
+ FAILED: "FAILED",
33
+ RETURNED: "RETURNED"
34
+ }, r = t.basis, i = r?.providerEventTime ? Date.parse(r.providerEventTime) : NaN;
35
+ return !!e && !!r && Number.isFinite(i) && e.id === t.id && e.statusRevision === t.input.expectedStatusRevision + 1 && e.statusAuthority === "INTEGRATION_EVENT_TIME" && e.statusAuthorityEpoch === t.epoch + 1 && e.designatedIntegrationId === t.input.integrationId && e.statusBasisEventId === r.id && r.id === t.input.basisTrackingEventId && typeof e.statusBasisSourceTime == "string" && Date.parse(e.statusBasisSourceTime) === i && e.maxSourceAgeSeconds === t.input.maxSourceAgeSeconds && e.maxFutureSkewSeconds === t.input.maxFutureSkewSeconds && typeof n[r.eventType] == "string" && e.status === n[r.eventType];
36
+ }
37
+ function i(e, t) {
38
+ return !!e && e.id === t.id && e.statusRevision === t.revision + 1 && e.status === t.status && e.statusAuthority === "MANUAL_HOLD" && e.statusAuthorityEpoch === t.epoch + 1 && e.designatedIntegrationId === null && e.statusBasisEventId === null && e.statusBasisSourceTime === null && e.maxSourceAgeSeconds === null && e.maxFutureSkewSeconds === null;
39
+ }
40
+ //#endregion
41
+ export { i as manualStatusAcknowledged, n as shipmentSourceInput, r as sourceStatusAcknowledged, e as statusDecisionReason };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.1011.1",
3
+ "version": "2026.1011.2",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -35,7 +35,7 @@
35
35
  "format": "prettier --write \"src/**/*.{ts,tsx}\"",
36
36
  "type:check": "bash scripts/build-limits.sh tsc --noEmit",
37
37
  "validate:schema-drift": "graphql-schema-drift",
38
- "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:tracking-quality-outcomes && bun run verify:braces-depth && bun run build && bun run build-storybook'",
38
+ "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run codegen && bun run validate:schema-drift && bun run lint:sanity && bun run format && bun run type:check && bun run verify:live-logistics-contract && bun run verify:empty-reuse-retry && bun run verify:empty-reuse-recovery && bun run verify:trip-utilization-input && bun run verify:trip-draft-context && bun run verify:stock-binding-input && bun run verify:stock-observation-input && bun run verify:pending-pick-input && bun run verify:freight-input && bun run verify:freight-recovery && bun run verify:procedure-input && bun run verify:consolidation && bun run verify:multimodal-single-attempt && bun run verify:tracking-quality-outcomes && bun run verify:shipment-status-authority && bun run verify:braces-depth && bun run build && bun run build-storybook'",
39
39
  "storybook": "storybook dev -p 6006",
40
40
  "build-storybook": "storybook build",
41
41
  "test:storybook": "test-storybook",
@@ -43,7 +43,7 @@
43
43
  "schema:pull:introspect": "bash scripts/schema-pull.sh --mode introspect",
44
44
  "schema:check": "bash scripts/schema-pull.sh --check",
45
45
  "verify:stock-binding-input": "bun scripts/verify-stock-binding-input.mjs",
46
- "codegen": "graphql-codegen --project wspace && graphql-codegen --project container-foundation && graphql-codegen --project container-condition && graphql-codegen --project free-time && graphql-codegen --project empty-reuse && graphql-codegen --project trip-utilization && graphql-codegen --project stock-binding && graphql-codegen --project stock-observation && graphql-codegen --project pending-pick && graphql-codegen --project freight-cost && graphql-codegen --project logistics-procedure && graphql-codegen --project consolidation && graphql-codegen --project tracking-quality",
46
+ "codegen": "graphql-codegen --project wspace && graphql-codegen --project container-foundation && graphql-codegen --project container-condition && graphql-codegen --project free-time && graphql-codegen --project empty-reuse && graphql-codegen --project trip-utilization && graphql-codegen --project stock-binding && graphql-codegen --project stock-observation && graphql-codegen --project pending-pick && graphql-codegen --project freight-cost && graphql-codegen --project logistics-procedure && graphql-codegen --project consolidation && graphql-codegen --project tracking-quality && graphql-codegen --project shipment-status-authority",
47
47
  "codegen:all": "bun run schema:pull && bun run codegen",
48
48
  "switch:status": "bun scripts/deps-mode.ts status",
49
49
  "switch:remote": "bun scripts/deps-mode.ts remote",
@@ -62,7 +62,8 @@
62
62
  "verify:procedure-input": "bun scripts/verify-procedure-input.mjs && bun scripts/verify-procedure-recovery-hook.mjs",
63
63
  "verify:consolidation": "bun scripts/verify-consolidation-input.mjs && bun scripts/verify-consolidation-recovery-hook.mjs && bun scripts/verify-consolidation-mounted-hook.mjs",
64
64
  "verify:tracking-quality-outcomes": "bun test scripts/verify-tracking-quality-outcomes.test.ts",
65
- "verify:braces-depth": "bun test scripts/braces-depth-patch.test.ts"
65
+ "verify:braces-depth": "bun test scripts/braces-depth-patch.test.ts",
66
+ "verify:shipment-status-authority": "bun scripts/verify-shipment-status-command.mjs"
66
67
  },
67
68
  "dependencies": {
68
69
  "@apollo/client": "^4.0.11",