@burdenoff/microfe-movethewheels 2026.822.1 → 2026.827.1

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 (53) hide show
  1. package/dist/generated/wspace-operations.d.ts +168 -912
  2. package/dist/generated/wspace-types.d.ts +78432 -35831
  3. package/dist/hooks/useFleet.js +142 -74
  4. package/dist/hooks/useInventory.js +163 -70
  5. package/dist/hooks/useOrders.js +2 -2
  6. package/dist/hooks/useTracking.js +5 -5
  7. package/dist/index.js +33 -33
  8. package/dist/movethewheels/hooks/index.d.ts +2 -2
  9. package/dist/movethewheels/hooks/useFleet.d.ts +32 -1
  10. package/dist/movethewheels/hooks/useInventory.d.ts +67 -12
  11. package/dist/movethewheels/hooks/useOrders.d.ts +25 -2
  12. package/dist/movethewheels/types/index.d.ts +2 -0
  13. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-down-right.js +11 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-left-right.js +22 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-up-right.js +11 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/calendar-clock.js +32 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/history.js +18 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/lock.js +16 -0
  19. package/dist/node_modules/lucide-react/dist/esm/icons/user-round.js +13 -0
  20. package/dist/pages/CreateOrderPage.js +246 -195
  21. package/dist/pages/DeliveryCapturePage.js +91 -78
  22. package/dist/pages/DriversPage.js +202 -108
  23. package/dist/pages/InventoryPage.js +356 -131
  24. package/dist/pages/ProductDetailsPage.js +212 -156
  25. package/dist/pages/VehicleDetailsPage.js +257 -193
  26. package/dist/utils/formatters.js +4 -1
  27. package/package.json +1 -1
  28. package/src/generated/wspace-operations.ts +134 -929
  29. package/src/generated/wspace-types.ts +91730 -40059
  30. package/src/movethewheels/hooks/index.ts +9 -0
  31. package/src/movethewheels/hooks/useFleet.ts +133 -3
  32. package/src/movethewheels/hooks/useInventory.ts +311 -53
  33. package/src/movethewheels/hooks/useOrders.ts +31 -7
  34. package/src/movethewheels/hooks/useTracking.ts +14 -14
  35. package/src/movethewheels/pages/CreateOrderPage.tsx +67 -10
  36. package/src/movethewheels/pages/DeliveryCapturePage.tsx +8 -0
  37. package/src/movethewheels/pages/DriversPage.tsx +181 -31
  38. package/src/movethewheels/pages/InventoryPage.tsx +299 -19
  39. package/src/movethewheels/pages/ProductDetailsPage.tsx +68 -3
  40. package/src/movethewheels/pages/VehicleDetailsPage.tsx +86 -27
  41. package/src/movethewheels/types/index.ts +2 -0
  42. package/src/operations/wspace/movethewheels/fragments/core.graphql +23 -53
  43. package/src/operations/wspace/movethewheels/fragments/core.withdrawn.graphql +59 -0
  44. package/src/operations/wspace/movethewheels/mutations/entities.graphql +5 -5
  45. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +18 -78
  46. package/src/operations/wspace/movethewheels/mutations/marketplace-reports.withdrawn.graphql +93 -0
  47. package/src/operations/wspace/movethewheels/mutations/orders.graphql +7 -7
  48. package/src/operations/wspace/movethewheels/queries/dashboard.graphql +3 -3
  49. package/src/operations/wspace/movethewheels/queries/entities.graphql +3 -3
  50. package/src/operations/wspace/movethewheels/queries/logistics.graphql +3 -3
  51. package/src/operations/wspace/movethewheels/queries/marketplace-reports.withdrawn.graphql +58 -0
  52. package/src/operations/wspace/movethewheels/queries/orders.graphql +3 -3
  53. package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +0 -40
@@ -102,20 +102,75 @@ export declare function useWarehouse(warehouseId: string | undefined): {
102
102
  error: Error | null;
103
103
  refetch: () => undefined;
104
104
  };
105
+ export interface InventoryStats {
106
+ /** Units physically in the warehouses. */
107
+ totalOnHand: number;
108
+ /** Units free to promise on a new order. */
109
+ totalAvailable: number;
110
+ /** Units already committed to open orders. */
111
+ totalAllocated: number;
112
+ /** Units written off as damaged. */
113
+ totalDamaged: number;
114
+ /** Stock lines at or under their reorder point. */
115
+ lowStockCount: number;
116
+ /** Catalog size (`cargoItemsCount`), workspace-wide — not a page length. */
117
+ totalProducts: number;
118
+ /** Warehouse count (`warehousesCount`), workspace-wide. */
119
+ totalWarehouses: number;
120
+ }
121
+ /**
122
+ * Workspace-wide inventory aggregates, every figure served by the module:
123
+ * `inventoryStats` for the stock position, `cargoItemsCount`/`warehousesCount`
124
+ * for catalog and network size. There is no aggregate stock-value field on the
125
+ * subgraph, so no monetary total is reported here.
126
+ */
105
127
  export declare function useInventoryStats(): {
106
- stats: {
107
- totalItems: number;
108
- lowStockItems: number;
109
- totalValue: number;
110
- totalProducts: number;
111
- totalWarehouses: number;
112
- warehouseUtilization: Array<{
113
- id: string;
114
- name: string;
115
- utilization: number;
116
- }>;
117
- };
128
+ stats: InventoryStats;
118
129
  isLoading: boolean;
119
130
  error: Error | null;
120
131
  };
132
+ export interface ProductStockLevel {
133
+ inventoryItemId: string;
134
+ warehouseId: string;
135
+ warehouseName: string;
136
+ warehouseCode: string;
137
+ onHand: number;
138
+ available: number;
139
+ allocated: number;
140
+ damaged: number;
141
+ reorderPoint?: number;
142
+ }
143
+ /** Where a catalog item is stocked, and how much of it is free to promise. */
144
+ export declare function useProductStockLevels(productId: string | undefined): {
145
+ levels: ProductStockLevel[];
146
+ isLoading: boolean;
147
+ error: Error | null;
148
+ refetch: () => void;
149
+ };
150
+ export type InventoryTransactionType = 'RECEIPT' | 'ISSUE' | 'TRANSFER' | 'ADJUSTMENT' | 'RETURN';
151
+ export interface InventoryTransaction {
152
+ id: string;
153
+ transactionNumber: string;
154
+ type: InventoryTransactionType;
155
+ /** Signed by `type`: receipts/returns add stock, issues remove it. */
156
+ quantity: number;
157
+ productId: string;
158
+ warehouseId: string;
159
+ notes?: string;
160
+ referenceType?: string;
161
+ referenceId?: string;
162
+ createdAt: Date;
163
+ }
164
+ interface UseInventoryTransactionsOptions {
165
+ limit?: number;
166
+ productId?: string;
167
+ warehouseId?: string;
168
+ }
169
+ /** Recent stock movements from `Query.inventoryTransactions` (newest first). */
170
+ export declare function useInventoryTransactions(options?: UseInventoryTransactionsOptions): {
171
+ transactions: InventoryTransaction[];
172
+ isLoading: boolean;
173
+ error: Error | null;
174
+ refetch: () => void;
175
+ };
121
176
  export {};
@@ -5,6 +5,16 @@ interface UseOrdersOptions {
5
5
  limit?: number;
6
6
  offset?: number;
7
7
  }
8
+ /**
9
+ * Write shape for create/update. Identical to `Partial<Order>` except that
10
+ * `scheduledDelivery` also accepts `null`: `UpdateDeliveryJobInput.scheduledDelivery`
11
+ * is nullable on the service, so an explicit `null` clears a previously booked
12
+ * slot, while `undefined` leaves it untouched. Without the distinction, clearing
13
+ * the field in the form would silently keep the old date.
14
+ */
15
+ export type OrderWriteInput = Omit<Partial<Order>, 'scheduledDelivery'> & {
16
+ scheduledDelivery?: Date | null;
17
+ };
8
18
  interface UseOrdersResult {
9
19
  orders: Order[];
10
20
  totalOrders: number;
@@ -17,11 +27,24 @@ interface UseOrdersResult {
17
27
  isLoading: boolean;
18
28
  error: Error | null;
19
29
  refetch: () => void;
20
- createOrder: (order: Partial<Order>) => Promise<Order>;
21
- updateOrder: (id: string, updates: Partial<Order>) => Promise<Order>;
30
+ createOrder: (order: OrderWriteInput) => Promise<Order>;
31
+ updateOrder: (id: string, updates: OrderWriteInput) => Promise<Order>;
22
32
  deleteOrder: (id: string) => Promise<void>;
23
33
  updateOrderStatus: (id: string, status: OrderStatus) => Promise<Order>;
24
34
  }
35
+ /**
36
+ * Normalises a service `DeliveryJobStatus` into the MFE's OrderStatus union.
37
+ * Exported so any surface rendering a raw job status badge normalises it the
38
+ * same way — the service casing is upper snake case and would miss the badge
39
+ * colour map otherwise.
40
+ */
41
+ export declare function mapOrderStatus(status: string): OrderStatus;
42
+ /**
43
+ * Normalises a service `DeliveryPriority` (LOW/MEDIUM/HIGH/URGENT/CRITICAL)
44
+ * into the four-level union PriorityBadge understands. MEDIUM and CRITICAL have
45
+ * no direct badge entry, so rendering the raw value would break the colour map.
46
+ */
47
+ export declare function mapOrderPriority(priority: string): 'low' | 'normal' | 'high' | 'urgent';
25
48
  export declare function useOrders(options?: UseOrdersOptions): UseOrdersResult;
26
49
  export declare function useOrder(orderId: string | undefined): {
27
50
  order: Order | null;
@@ -264,6 +264,8 @@ export interface Vehicle {
264
264
  make: string;
265
265
  model: string;
266
266
  licensePlate: string;
267
+ /** MtwVehicle.ownershipType — free-text, e.g. "owned", "leased". */
268
+ ownershipType?: string;
267
269
  year: number;
268
270
  capacity: {
269
271
  weight: number;
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-down-right.js
3
+ var t = e("ArrowDownRight", [["path", {
4
+ d: "m7 7 10 10",
5
+ key: "1fmybs"
6
+ }], ["path", {
7
+ d: "M17 7v10H7",
8
+ key: "6fjiku"
9
+ }]]);
10
+ //#endregion
11
+ export { t as ArrowDownRight };
@@ -0,0 +1,22 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-left-right.js
3
+ var t = e("ArrowLeftRight", [
4
+ ["path", {
5
+ d: "M8 3 4 7l4 4",
6
+ key: "9rb6wj"
7
+ }],
8
+ ["path", {
9
+ d: "M4 7h16",
10
+ key: "6tx8e3"
11
+ }],
12
+ ["path", {
13
+ d: "m16 21 4-4-4-4",
14
+ key: "siv7j2"
15
+ }],
16
+ ["path", {
17
+ d: "M20 17H4",
18
+ key: "h6l3hr"
19
+ }]
20
+ ]);
21
+ //#endregion
22
+ export { t as ArrowLeftRight };
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/arrow-up-right.js
3
+ var t = e("ArrowUpRight", [["path", {
4
+ d: "M7 7h10v10",
5
+ key: "1tivn9"
6
+ }], ["path", {
7
+ d: "M7 17 17 7",
8
+ key: "1vkiza"
9
+ }]]);
10
+ //#endregion
11
+ export { t as ArrowUpRight };
@@ -0,0 +1,32 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/calendar-clock.js
3
+ var t = e("CalendarClock", [
4
+ ["path", {
5
+ d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",
6
+ key: "1osxxc"
7
+ }],
8
+ ["path", {
9
+ d: "M16 2v4",
10
+ key: "4m81vk"
11
+ }],
12
+ ["path", {
13
+ d: "M8 2v4",
14
+ key: "1cmpym"
15
+ }],
16
+ ["path", {
17
+ d: "M3 10h5",
18
+ key: "r794hk"
19
+ }],
20
+ ["path", {
21
+ d: "M17.5 17.5 16 16.3V14",
22
+ key: "akvzfd"
23
+ }],
24
+ ["circle", {
25
+ cx: "16",
26
+ cy: "16",
27
+ r: "6",
28
+ key: "qoo3c4"
29
+ }]
30
+ ]);
31
+ //#endregion
32
+ export { t as CalendarClock };
@@ -0,0 +1,18 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/history.js
3
+ var t = e("History", [
4
+ ["path", {
5
+ d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
6
+ key: "1357e3"
7
+ }],
8
+ ["path", {
9
+ d: "M3 3v5h5",
10
+ key: "1xhq8a"
11
+ }],
12
+ ["path", {
13
+ d: "M12 7v5l4 2",
14
+ key: "1fdv2h"
15
+ }]
16
+ ]);
17
+ //#endregion
18
+ export { t as History };
@@ -0,0 +1,16 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/lock.js
3
+ var t = e("Lock", [["rect", {
4
+ width: "18",
5
+ height: "11",
6
+ x: "3",
7
+ y: "11",
8
+ rx: "2",
9
+ ry: "2",
10
+ key: "1w4ew1"
11
+ }], ["path", {
12
+ d: "M7 11V7a5 5 0 0 1 10 0v4",
13
+ key: "fwvmzm"
14
+ }]]);
15
+ //#endregion
16
+ export { t as Lock };
@@ -0,0 +1,13 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/user-round.js
3
+ var t = e("UserRound", [["circle", {
4
+ cx: "12",
5
+ cy: "8",
6
+ r: "5",
7
+ key: "1hypcn"
8
+ }], ["path", {
9
+ d: "M20 21a8 8 0 0 0-16 0",
10
+ key: "rfgkzh"
11
+ }]]);
12
+ //#endregion
13
+ export { t as UserRound };