@burdenoff/microfe-movethewheels 2026.802.1 → 2026.805.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.
@@ -13,75 +13,77 @@ import { VolumeBar as b } from "../components/charts/VolumeBar.js";
13
13
  import { StatusDonut as x } from "../components/charts/StatusDonut.js";
14
14
  import "../components/charts/index.js";
15
15
  import { formatCurrency as S } from "../utils/formatters.js";
16
- import { useMemo as C } from "react";
17
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
18
- import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
16
+ import { UpcomingDemandPanel as C } from "../components/UpcomingDemandPanel.js";
17
+ import { useDemandForecast as w } from "../hooks/useDemandForecast.js";
18
+ import { useMemo as T } from "react";
19
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
20
+ import { EmphasisPanel as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
19
21
  //#region src/movethewheels/pages/AnalyticsPage.tsx
20
- var O = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
21
- function k() {
22
- let { analytics: k, isLoading: A, error: j, refetch: M } = o(), { orderData: N } = c(), { fleetData: P } = s(), F = C(() => k.trends.dailyOrders.map((e) => e.orders), [k.trends.dailyOrders]), I = C(() => k.trends.revenue.map((e) => ({
22
+ var A = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
23
+ function j() {
24
+ let { analytics: j, isLoading: M, error: N, refetch: P } = o(), { orderData: F } = c(), { fleetData: I } = s(), { laneForecast: L, customerForecast: R, laneVariance: z, customerVariance: B, isLoading: V, error: H, refetch: U } = w(4, 8), W = T(() => j.trends.dailyOrders.map((e) => e.orders), [j.trends.dailyOrders]), G = T(() => j.trends.revenue.map((e) => ({
23
25
  month: e.month,
24
26
  revenue: e.revenue
25
- })), [k.trends.revenue]), L = C(() => N.byStatus.filter((e) => e.count > 0).map((e) => ({
26
- name: O(e.status),
27
+ })), [j.trends.revenue]), K = T(() => F.byStatus.filter((e) => e.count > 0).map((e) => ({
28
+ name: A(e.status),
27
29
  value: e.count
28
- })), [N.byStatus]), R = L.reduce((e, t) => e + t.value, 0);
29
- return /* @__PURE__ */ T(h, {
30
+ })), [F.byStatus]), q = K.reduce((e, t) => e + t.value, 0);
31
+ return /* @__PURE__ */ D(h, {
30
32
  title: "Analytics",
31
33
  subtitle: "Business performance and insights",
32
- icon: /* @__PURE__ */ w(e, { size: 24 }),
34
+ icon: /* @__PURE__ */ E(e, { size: 24 }),
33
35
  children: [
34
- /* @__PURE__ */ w(D, {
35
- icon: /* @__PURE__ */ w(e, { size: 18 }),
36
+ /* @__PURE__ */ E(k, {
37
+ icon: /* @__PURE__ */ E(e, { size: 18 }),
36
38
  children: "See how the operation is really performing. Track order volume, revenue, on-time rate and customer satisfaction over time so you can spot trends, find bottlenecks, and decide where to invest — whether that's more vehicles, better routes, or new customers."
37
39
  }),
38
- j && !A ? /* @__PURE__ */ w(u, {
40
+ N && !M ? /* @__PURE__ */ E(u, {
39
41
  className: "border-status-error-border",
40
- children: /* @__PURE__ */ T(d, {
42
+ children: /* @__PURE__ */ D(d, {
41
43
  className: "p-6 text-center space-y-3",
42
44
  children: [
43
- /* @__PURE__ */ w("p", {
45
+ /* @__PURE__ */ E("p", {
44
46
  className: "text-status-error-text font-medium",
45
47
  children: "Couldn't load analytics"
46
48
  }),
47
- /* @__PURE__ */ w("p", {
49
+ /* @__PURE__ */ E("p", {
48
50
  className: "text-sm text-text-secondary",
49
- children: j.message
51
+ children: N.message
50
52
  }),
51
- /* @__PURE__ */ w(l, {
53
+ /* @__PURE__ */ E(l, {
52
54
  variant: "outline",
53
- onClick: M,
55
+ onClick: P,
54
56
  children: "Retry"
55
57
  })
56
58
  ]
57
59
  })
58
- }) : A ? /* @__PURE__ */ w(v, {
60
+ }) : M ? /* @__PURE__ */ E(v, {
59
61
  columns: 4,
60
- children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ w(_, {}, t))
61
- }) : /* @__PURE__ */ T(v, {
62
+ children: Array.from({ length: 4 }).map((e, t) => /* @__PURE__ */ E(_, {}, t))
63
+ }) : /* @__PURE__ */ D(v, {
62
64
  columns: 4,
63
65
  children: [
64
- /* @__PURE__ */ w(g, {
66
+ /* @__PURE__ */ E(g, {
65
67
  label: "Order Volume",
66
- value: k.overview.totalOrders.toLocaleString(),
67
- icon: /* @__PURE__ */ w(n, { size: 20 }),
68
+ value: j.overview.totalOrders.toLocaleString(),
69
+ icon: /* @__PURE__ */ E(n, { size: 20 }),
68
70
  accent: "brand",
69
- sparklineData: F.length >= 2 ? F : void 0
71
+ sparklineData: W.length >= 2 ? W : void 0
70
72
  }),
71
- /* @__PURE__ */ w(g, {
73
+ /* @__PURE__ */ E(g, {
72
74
  treatment: "glass",
73
75
  glow: !0,
74
76
  label: "Revenue",
75
- value: S(k.overview.totalRevenue),
76
- icon: /* @__PURE__ */ w(t, { size: 20 }),
77
+ value: S(j.overview.totalRevenue),
78
+ icon: /* @__PURE__ */ E(t, { size: 20 }),
77
79
  accent: "success"
78
80
  }),
79
- /* @__PURE__ */ w(g, {
81
+ /* @__PURE__ */ E(g, {
80
82
  label: "On-Time Delivery",
81
- value: `${k.overview.onTimeDeliveryRate.toFixed(1)}%`,
82
- icon: /* @__PURE__ */ w(i, { size: 20 }),
83
+ value: `${j.overview.onTimeDeliveryRate.toFixed(1)}%`,
84
+ icon: /* @__PURE__ */ E(i, { size: 20 }),
83
85
  accent: "blue",
84
- delta: k.overview.onTimeDeliveryRate >= 90 ? {
86
+ delta: j.overview.onTimeDeliveryRate >= 90 ? {
85
87
  value: "On target",
86
88
  direction: "up"
87
89
  } : {
@@ -89,19 +91,19 @@ function k() {
89
91
  direction: "down"
90
92
  }
91
93
  }),
92
- /* @__PURE__ */ w(g, {
94
+ /* @__PURE__ */ E(g, {
93
95
  label: "Customer Satisfaction",
94
- value: k.overview.customerSatisfaction.toFixed(1),
95
- icon: /* @__PURE__ */ w(r, { size: 20 }),
96
+ value: j.overview.customerSatisfaction.toFixed(1),
97
+ icon: /* @__PURE__ */ E(r, { size: 20 }),
96
98
  accent: "warning",
97
99
  subtitle: "out of 5"
98
100
  })
99
101
  ]
100
102
  }),
101
- /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, { children: "Order & delivery trend" }) }), /* @__PURE__ */ w(d, { children: /* @__PURE__ */ w(y, {
103
+ /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ E(p, { children: "Order & delivery trend" }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(y, {
102
104
  xKey: "date",
103
105
  height: 300,
104
- data: k.trends.dailyOrders,
106
+ data: j.trends.dailyOrders,
105
107
  series: [{
106
108
  dataKey: "orders",
107
109
  name: "Orders"
@@ -111,82 +113,91 @@ function k() {
111
113
  }],
112
114
  emptyMessage: "No order trend recorded yet"
113
115
  }) })] }),
114
- /* @__PURE__ */ T("div", {
116
+ /* @__PURE__ */ E(C, {
117
+ laneForecast: L,
118
+ customerForecast: R,
119
+ laneVariance: z,
120
+ customerVariance: B,
121
+ isLoading: V,
122
+ error: H,
123
+ onRetry: U
124
+ }),
125
+ /* @__PURE__ */ D("div", {
115
126
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
116
- children: [/* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, { children: "Revenue by month" }) }), /* @__PURE__ */ w(d, { children: /* @__PURE__ */ w(b, {
127
+ children: [/* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ E(p, { children: "Revenue by month" }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(b, {
117
128
  xKey: "month",
118
129
  height: 280,
119
130
  showLegend: !1,
120
- data: I,
131
+ data: G,
121
132
  series: [{
122
133
  dataKey: "revenue",
123
134
  name: "Revenue"
124
135
  }],
125
136
  valueFormatter: (e) => S(Number(e)),
126
137
  emptyMessage: "No revenue recorded yet"
127
- }) })] }), /* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, { children: "Orders by status" }) }), /* @__PURE__ */ w(d, { children: /* @__PURE__ */ w(x, {
128
- data: L,
138
+ }) })] }), /* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ E(p, { children: "Orders by status" }) }), /* @__PURE__ */ E(d, { children: /* @__PURE__ */ E(x, {
139
+ data: K,
129
140
  height: 240,
130
- centerLabel: R.toLocaleString(),
141
+ centerLabel: q.toLocaleString(),
131
142
  centerSubLabel: "orders",
132
143
  emptyMessage: "No orders to break down yet"
133
144
  }) })] })]
134
145
  }),
135
- /* @__PURE__ */ T("div", {
146
+ /* @__PURE__ */ D("div", {
136
147
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
137
- children: [/* @__PURE__ */ T(u, { children: [/* @__PURE__ */ w(f, { children: /* @__PURE__ */ w(p, { children: "Fleet Performance" }) }), /* @__PURE__ */ T(d, {
148
+ children: [/* @__PURE__ */ D(u, { children: [/* @__PURE__ */ E(f, { children: /* @__PURE__ */ E(p, { children: "Fleet Performance" }) }), /* @__PURE__ */ D(d, {
138
149
  className: "space-y-4",
139
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
150
+ children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ D("div", {
140
151
  className: "flex justify-between text-sm mb-1",
141
- children: [/* @__PURE__ */ w("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ T("span", { children: [P.vehicleUtilization.toFixed(0), "%"] })]
142
- }), /* @__PURE__ */ w(m, { value: P.vehicleUtilization })] }), P.vehiclesByType.length > 0 && /* @__PURE__ */ T("div", {
152
+ children: [/* @__PURE__ */ E("span", { children: "Vehicle Utilization" }), /* @__PURE__ */ D("span", { children: [I.vehicleUtilization.toFixed(0), "%"] })]
153
+ }), /* @__PURE__ */ E(m, { value: I.vehicleUtilization })] }), I.vehiclesByType.length > 0 && /* @__PURE__ */ D("div", {
143
154
  className: "pt-2",
144
- children: [/* @__PURE__ */ w("p", {
155
+ children: [/* @__PURE__ */ E("p", {
145
156
  className: "text-sm text-text-secondary mb-2",
146
157
  children: "Vehicles by Type"
147
- }), P.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ T("div", {
158
+ }), I.vehiclesByType.map(({ type: e, count: t }) => /* @__PURE__ */ D("div", {
148
159
  className: "flex justify-between text-sm py-1",
149
- children: [/* @__PURE__ */ w("span", {
160
+ children: [/* @__PURE__ */ E("span", {
150
161
  className: "capitalize",
151
162
  children: e
152
- }), /* @__PURE__ */ w("span", {
163
+ }), /* @__PURE__ */ E("span", {
153
164
  className: "font-medium",
154
165
  children: t
155
166
  })]
156
167
  }, e))]
157
168
  })]
158
- })] }), /* @__PURE__ */ T(E, {
169
+ })] }), /* @__PURE__ */ D(O, {
159
170
  className: "space-y-4",
160
171
  children: [
161
- /* @__PURE__ */ w("h2", {
172
+ /* @__PURE__ */ E("h2", {
162
173
  className: "text-base font-semibold text-text-primary",
163
174
  children: "Performance Metrics"
164
175
  }),
165
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
176
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
166
177
  className: "text-sm text-text-secondary",
167
178
  children: "On-Time Delivery"
168
- }), /* @__PURE__ */ T("p", {
179
+ }), /* @__PURE__ */ D("p", {
169
180
  className: "text-2xl font-bold",
170
- children: [k.performance.onTimeDelivery.toFixed(1), "%"]
181
+ children: [j.performance.onTimeDelivery.toFixed(1), "%"]
171
182
  })] }),
172
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
183
+ /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
173
184
  className: "text-sm text-text-secondary",
174
185
  children: "Customer Satisfaction"
175
- }), /* @__PURE__ */ T("p", {
186
+ }), /* @__PURE__ */ D("p", {
176
187
  className: "text-2xl font-bold",
177
- children: [k.overview.customerSatisfaction.toFixed(1), "/5"]
188
+ children: [j.overview.customerSatisfaction.toFixed(1), "/5"]
178
189
  })] }),
179
- /* @__PURE__ */ T("div", {
190
+ /* @__PURE__ */ D("div", {
180
191
  className: "flex items-center gap-2",
181
- children: [/* @__PURE__ */ w(a, {
192
+ children: [/* @__PURE__ */ E(a, {
182
193
  size: 16,
183
194
  className: "text-text-secondary"
184
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
195
+ }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
185
196
  className: "text-sm text-text-secondary",
186
197
  children: "Driver Ratings"
187
- }), /* @__PURE__ */ T("p", {
198
+ }), /* @__PURE__ */ D("p", {
188
199
  className: "text-2xl font-bold",
189
- children: [k.performance.driverRatings.toFixed(1), "/5"]
200
+ children: [j.performance.driverRatings.toFixed(1), "/5"]
190
201
  })] })]
191
202
  })
192
203
  ]
@@ -196,4 +207,4 @@ function k() {
196
207
  });
197
208
  }
198
209
  //#endregion
199
- export { k as default };
210
+ export { j as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.802.1",
3
+ "version": "2026.805.1",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -106,7 +106,7 @@
106
106
  "zustand": "^5.0.0"
107
107
  },
108
108
  "publishConfig": {
109
- "access": "restricted"
109
+ "access": "public"
110
110
  },
111
111
  "overrides": {
112
112
  "lodash": ">=4.17.21",
@@ -462,6 +462,28 @@ export type GetWarehouseQueryVariables = Types.Exact<{
462
462
 
463
463
  export type GetWarehouseQuery = { __typename?: 'Query', warehouse?: { __typename?: 'Warehouse', id: string, name: string, code: string, type: Types.WarehouseType, address: Record<string, unknown>, contactInfo?: Record<string, unknown> | null, operatingHours?: Record<string, unknown> | null, capabilities?: Record<string, unknown> | null, status: string, totalCapacity?: number | null, usedCapacity?: number | null, createdAt: string, updatedAt: string, locations: Array<{ __typename?: 'WarehouseLocation', id: string, locationCode: string, zone?: string | null, aisle?: string | null, rack?: string | null, shelf?: string | null, bin?: string | null, locationType?: string | null, capacity?: number | null, status: string }> } | null };
464
464
 
465
+ export type GetMovethewheelsDemandForecastByLaneQueryVariables = Types.Exact<{
466
+ weeks: Types.Scalars['Int']['input'];
467
+ }>;
468
+
469
+
470
+ export type GetMovethewheelsDemandForecastByLaneQuery = { __typename?: 'Query', demandForecastByLane: Array<{ __typename?: 'MtwDemandForecastPoint', scopeType: Types.DemandForecastScope, scopeKey: string, periodStart: string, periodEnd: string, predictedVolume: number, predictedRevenue: number, actualVolume?: number | null, actualRevenue?: number | null, confidence: number }> };
471
+
472
+ export type GetMovethewheelsDemandForecastByCustomerQueryVariables = Types.Exact<{
473
+ weeks: Types.Scalars['Int']['input'];
474
+ }>;
475
+
476
+
477
+ export type GetMovethewheelsDemandForecastByCustomerQuery = { __typename?: 'Query', demandForecastByCustomer: Array<{ __typename?: 'MtwDemandForecastPoint', scopeType: Types.DemandForecastScope, scopeKey: string, periodStart: string, periodEnd: string, predictedVolume: number, predictedRevenue: number, actualVolume?: number | null, actualRevenue?: number | null, confidence: number }> };
478
+
479
+ export type GetMovethewheelsDemandForecastVarianceQueryVariables = Types.Exact<{
480
+ scopeType: Types.DemandForecastScope;
481
+ limit: Types.Scalars['Int']['input'];
482
+ }>;
483
+
484
+
485
+ export type GetMovethewheelsDemandForecastVarianceQuery = { __typename?: 'Query', demandForecastVariance: Array<{ __typename?: 'MtwDemandForecastVariance', scopeType: Types.DemandForecastScope, scopeKey: string, periodStart: string, periodEnd: string, predictedVolume: number, actualVolume: number, volumeVariance: number, predictedRevenue: number, actualRevenue: number, revenueVariance: number }> };
486
+
465
487
  export type ListInventoryItemsQueryVariables = Types.Exact<{
466
488
  filter?: Types.InputMaybe<Types.InventoryFilterInput>;
467
489
  pagination?: Types.InputMaybe<Types.PaginationInput>;
@@ -2918,6 +2940,161 @@ export type GetWarehouseQueryHookResult = ReturnType<typeof useGetWarehouseQuery
2918
2940
  export type GetWarehouseLazyQueryHookResult = ReturnType<typeof useGetWarehouseLazyQuery>;
2919
2941
  export type GetWarehouseSuspenseQueryHookResult = ReturnType<typeof useGetWarehouseSuspenseQuery>;
2920
2942
  export type GetWarehouseQueryResult = Apollo.QueryResult<Types.GetWarehouseQuery, Types.GetWarehouseQueryVariables>;
2943
+ export const GetMovethewheelsDemandForecastByLaneDocument = gql`
2944
+ query GetMovethewheelsDemandForecastByLane($weeks: Int!) {
2945
+ demandForecastByLane(weeks: $weeks) {
2946
+ scopeType
2947
+ scopeKey
2948
+ periodStart
2949
+ periodEnd
2950
+ predictedVolume
2951
+ predictedRevenue
2952
+ actualVolume
2953
+ actualRevenue
2954
+ confidence
2955
+ }
2956
+ }
2957
+ `;
2958
+
2959
+ /**
2960
+ * __useGetMovethewheelsDemandForecastByLaneQuery__
2961
+ *
2962
+ * To run a query within a React component, call `useGetMovethewheelsDemandForecastByLaneQuery` and pass it any options that fit your needs.
2963
+ * When your component renders, `useGetMovethewheelsDemandForecastByLaneQuery` returns an object from Apollo Client that contains loading, error, and data properties
2964
+ * you can use to render your UI.
2965
+ *
2966
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
2967
+ *
2968
+ * @example
2969
+ * const { data, loading, error } = useGetMovethewheelsDemandForecastByLaneQuery({
2970
+ * variables: {
2971
+ * weeks: // value for 'weeks'
2972
+ * },
2973
+ * });
2974
+ */
2975
+ export function useGetMovethewheelsDemandForecastByLaneQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables> & ({ variables: Types.GetMovethewheelsDemandForecastByLaneQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {
2976
+ const options = {...defaultOptions, ...baseOptions}
2977
+ return ApolloReactHooks.useQuery<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>(GetMovethewheelsDemandForecastByLaneDocument, options);
2978
+ }
2979
+ export function useGetMovethewheelsDemandForecastByLaneLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>) {
2980
+ const options = {...defaultOptions, ...baseOptions}
2981
+ return ApolloReactHooks.useLazyQuery<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>(GetMovethewheelsDemandForecastByLaneDocument, options);
2982
+ }
2983
+ // @ts-ignore
2984
+ export function useGetMovethewheelsDemandForecastByLaneSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
2985
+ export function useGetMovethewheelsDemandForecastByLaneSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery | undefined, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
2986
+ export function useGetMovethewheelsDemandForecastByLaneSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>) {
2987
+ const options = baseOptions === ApolloReactHooks.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
2988
+ return ApolloReactHooks.useSuspenseQuery<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>(GetMovethewheelsDemandForecastByLaneDocument, options);
2989
+ }
2990
+ export type GetMovethewheelsDemandForecastByLaneQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneQuery>;
2991
+ export type GetMovethewheelsDemandForecastByLaneLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneLazyQuery>;
2992
+ export type GetMovethewheelsDemandForecastByLaneSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneSuspenseQuery>;
2993
+ export type GetMovethewheelsDemandForecastByLaneQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
2994
+ export const GetMovethewheelsDemandForecastByCustomerDocument = gql`
2995
+ query GetMovethewheelsDemandForecastByCustomer($weeks: Int!) {
2996
+ demandForecastByCustomer(weeks: $weeks) {
2997
+ scopeType
2998
+ scopeKey
2999
+ periodStart
3000
+ periodEnd
3001
+ predictedVolume
3002
+ predictedRevenue
3003
+ actualVolume
3004
+ actualRevenue
3005
+ confidence
3006
+ }
3007
+ }
3008
+ `;
3009
+
3010
+ /**
3011
+ * __useGetMovethewheelsDemandForecastByCustomerQuery__
3012
+ *
3013
+ * To run a query within a React component, call `useGetMovethewheelsDemandForecastByCustomerQuery` and pass it any options that fit your needs.
3014
+ * When your component renders, `useGetMovethewheelsDemandForecastByCustomerQuery` returns an object from Apollo Client that contains loading, error, and data properties
3015
+ * you can use to render your UI.
3016
+ *
3017
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
3018
+ *
3019
+ * @example
3020
+ * const { data, loading, error } = useGetMovethewheelsDemandForecastByCustomerQuery({
3021
+ * variables: {
3022
+ * weeks: // value for 'weeks'
3023
+ * },
3024
+ * });
3025
+ */
3026
+ export function useGetMovethewheelsDemandForecastByCustomerQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables> & ({ variables: Types.GetMovethewheelsDemandForecastByCustomerQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {
3027
+ const options = {...defaultOptions, ...baseOptions}
3028
+ return ApolloReactHooks.useQuery<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>(GetMovethewheelsDemandForecastByCustomerDocument, options);
3029
+ }
3030
+ export function useGetMovethewheelsDemandForecastByCustomerLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>) {
3031
+ const options = {...defaultOptions, ...baseOptions}
3032
+ return ApolloReactHooks.useLazyQuery<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>(GetMovethewheelsDemandForecastByCustomerDocument, options);
3033
+ }
3034
+ // @ts-ignore
3035
+ export function useGetMovethewheelsDemandForecastByCustomerSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
3036
+ export function useGetMovethewheelsDemandForecastByCustomerSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery | undefined, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
3037
+ export function useGetMovethewheelsDemandForecastByCustomerSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>) {
3038
+ const options = baseOptions === ApolloReactHooks.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
3039
+ return ApolloReactHooks.useSuspenseQuery<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>(GetMovethewheelsDemandForecastByCustomerDocument, options);
3040
+ }
3041
+ export type GetMovethewheelsDemandForecastByCustomerQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerQuery>;
3042
+ export type GetMovethewheelsDemandForecastByCustomerLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerLazyQuery>;
3043
+ export type GetMovethewheelsDemandForecastByCustomerSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerSuspenseQuery>;
3044
+ export type GetMovethewheelsDemandForecastByCustomerQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
3045
+ export const GetMovethewheelsDemandForecastVarianceDocument = gql`
3046
+ query GetMovethewheelsDemandForecastVariance($scopeType: DemandForecastScope!, $limit: Int!) {
3047
+ demandForecastVariance(scopeType: $scopeType, limit: $limit) {
3048
+ scopeType
3049
+ scopeKey
3050
+ periodStart
3051
+ periodEnd
3052
+ predictedVolume
3053
+ actualVolume
3054
+ volumeVariance
3055
+ predictedRevenue
3056
+ actualRevenue
3057
+ revenueVariance
3058
+ }
3059
+ }
3060
+ `;
3061
+
3062
+ /**
3063
+ * __useGetMovethewheelsDemandForecastVarianceQuery__
3064
+ *
3065
+ * To run a query within a React component, call `useGetMovethewheelsDemandForecastVarianceQuery` and pass it any options that fit your needs.
3066
+ * When your component renders, `useGetMovethewheelsDemandForecastVarianceQuery` returns an object from Apollo Client that contains loading, error, and data properties
3067
+ * you can use to render your UI.
3068
+ *
3069
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
3070
+ *
3071
+ * @example
3072
+ * const { data, loading, error } = useGetMovethewheelsDemandForecastVarianceQuery({
3073
+ * variables: {
3074
+ * scopeType: // value for 'scopeType'
3075
+ * limit: // value for 'limit'
3076
+ * },
3077
+ * });
3078
+ */
3079
+ export function useGetMovethewheelsDemandForecastVarianceQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables> & ({ variables: Types.GetMovethewheelsDemandForecastVarianceQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {
3080
+ const options = {...defaultOptions, ...baseOptions}
3081
+ return ApolloReactHooks.useQuery<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>(GetMovethewheelsDemandForecastVarianceDocument, options);
3082
+ }
3083
+ export function useGetMovethewheelsDemandForecastVarianceLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>) {
3084
+ const options = {...defaultOptions, ...baseOptions}
3085
+ return ApolloReactHooks.useLazyQuery<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>(GetMovethewheelsDemandForecastVarianceDocument, options);
3086
+ }
3087
+ // @ts-ignore
3088
+ export function useGetMovethewheelsDemandForecastVarianceSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
3089
+ export function useGetMovethewheelsDemandForecastVarianceSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery | undefined, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
3090
+ export function useGetMovethewheelsDemandForecastVarianceSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>) {
3091
+ const options = baseOptions === ApolloReactHooks.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
3092
+ return ApolloReactHooks.useSuspenseQuery<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>(GetMovethewheelsDemandForecastVarianceDocument, options);
3093
+ }
3094
+ export type GetMovethewheelsDemandForecastVarianceQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceQuery>;
3095
+ export type GetMovethewheelsDemandForecastVarianceLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceLazyQuery>;
3096
+ export type GetMovethewheelsDemandForecastVarianceSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceSuspenseQuery>;
3097
+ export type GetMovethewheelsDemandForecastVarianceQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
2921
3098
  export const ListInventoryItemsDocument = gql`
2922
3099
  query ListInventoryItems($filter: InventoryFilterInput, $pagination: PaginationInput) {
2923
3100
  inventoryItems(filter: $filter, pagination: $pagination) {
@@ -1997,13 +1997,6 @@ export type AssignmentStatsResponse = {
1997
1997
  totalAssignments: Scalars['Int']['output'];
1998
1998
  };
1999
1999
 
2000
- export type AssistantInsights = {
2001
- __typename?: 'AssistantInsights';
2002
- answer: Scalars['String']['output'];
2003
- generatedAt: Scalars['DateTime']['output'];
2004
- question: Scalars['String']['output'];
2005
- };
2006
-
2007
2000
  /** Input for attaching existing files to a comment */
2008
2001
  export type AttachExistingFilesToCommentInput = {
2009
2002
  commentId: Scalars['ID']['input'];
@@ -9838,6 +9831,11 @@ export enum DeliveryChannelType {
9838
9831
  Webhook = 'WEBHOOK'
9839
9832
  }
9840
9833
 
9834
+ export enum DemandForecastScope {
9835
+ Customer = 'CUSTOMER',
9836
+ Lane = 'LANE'
9837
+ }
9838
+
9841
9839
  export type DependencyHealth = {
9842
9840
  __typename?: 'DependencyHealth';
9843
9841
  message: Scalars['String']['output'];
@@ -20588,6 +20586,33 @@ export type MovethewheelsReportFilterInput = {
20588
20586
  type?: InputMaybe<Scalars['String']['input']>;
20589
20587
  };
20590
20588
 
20589
+ export type MtwDemandForecastPoint = {
20590
+ __typename?: 'MtwDemandForecastPoint';
20591
+ actualRevenue?: Maybe<Scalars['Float']['output']>;
20592
+ actualVolume?: Maybe<Scalars['Int']['output']>;
20593
+ confidence: Scalars['Float']['output'];
20594
+ periodEnd: Scalars['DateTime']['output'];
20595
+ periodStart: Scalars['DateTime']['output'];
20596
+ predictedRevenue: Scalars['Float']['output'];
20597
+ predictedVolume: Scalars['Int']['output'];
20598
+ scopeKey: Scalars['String']['output'];
20599
+ scopeType: DemandForecastScope;
20600
+ };
20601
+
20602
+ export type MtwDemandForecastVariance = {
20603
+ __typename?: 'MtwDemandForecastVariance';
20604
+ actualRevenue: Scalars['Float']['output'];
20605
+ actualVolume: Scalars['Int']['output'];
20606
+ periodEnd: Scalars['DateTime']['output'];
20607
+ periodStart: Scalars['DateTime']['output'];
20608
+ predictedRevenue: Scalars['Float']['output'];
20609
+ predictedVolume: Scalars['Int']['output'];
20610
+ revenueVariance: Scalars['Float']['output'];
20611
+ scopeKey: Scalars['String']['output'];
20612
+ scopeType: DemandForecastScope;
20613
+ volumeVariance: Scalars['Int']['output'];
20614
+ };
20615
+
20591
20616
  /**
20592
20617
  * Base Mutation type with placeholder field.
20593
20618
  * Extended by individual mutation files.
@@ -22342,6 +22367,7 @@ export type Mutation = {
22342
22367
  /** Reactivate an archived workspace (sets status to ACTIVE) */
22343
22368
  reactivateWorkspace: Workspace;
22344
22369
  rebuildKnowledgeBaseIndex: Scalars['Boolean']['output'];
22370
+ recalculateDemandForecasts: Scalars['Int']['output'];
22345
22371
  /**
22346
22372
  * Recalculate resource usage for the current workspace.
22347
22373
  * Workspace ID is read from gateway context (x-workspace-id header).
@@ -32332,6 +32358,15 @@ export type MutationRebuildKnowledgeBaseIndexArgs = {
32332
32358
  };
32333
32359
 
32334
32360
 
32361
+ /**
32362
+ * Base Mutation type with placeholder field.
32363
+ * Extended by individual mutation files.
32364
+ */
32365
+ export type MutationRecalculateDemandForecastsArgs = {
32366
+ weeksOfHistory?: InputMaybe<Scalars['Int']['input']>;
32367
+ };
32368
+
32369
+
32335
32370
  /**
32336
32371
  * Base Mutation type with placeholder field.
32337
32372
  * Extended by individual mutation files.
@@ -41142,7 +41177,6 @@ export type Query = {
41142
41177
  artifact?: Maybe<GeneratedArtifact>;
41143
41178
  asset?: Maybe<Asset>;
41144
41179
  assets: Array<Asset>;
41145
- assistantInsights: AssistantInsights;
41146
41180
  /** Get available tags for selection (from wspace-tags-svc) */
41147
41181
  availableNoteTags: Array<AvailableTag>;
41148
41182
  /** Get available tags for selection (from wspace-tags-svc) */
@@ -41222,6 +41256,10 @@ export type Query = {
41222
41256
  deadLetterQueueEntry?: Maybe<DeadLetterQueue>;
41223
41257
  decryptSecret?: Maybe<DecryptedSecret>;
41224
41258
  defaultVibeDeck?: Maybe<VibeDeck>;
41259
+ /** Demand forecasting / S&OP v1 (BOFF-4393). Heuristic next-week forecasts. */
41260
+ demandForecastByCustomer: Array<MtwDemandForecastPoint>;
41261
+ demandForecastByLane: Array<MtwDemandForecastPoint>;
41262
+ demandForecastVariance: Array<MtwDemandForecastVariance>;
41225
41263
  /** Check the health status of all system dependencies */
41226
41264
  dependenciesHealth: HealthCheckResponse;
41227
41265
  /**
@@ -43252,15 +43290,6 @@ export type QueryAssetArgs = {
43252
43290
  };
43253
43291
 
43254
43292
 
43255
- /**
43256
- * Base Query type with placeholder field.
43257
- * Extended by individual query files.
43258
- */
43259
- export type QueryAssistantInsightsArgs = {
43260
- question: Scalars['String']['input'];
43261
- };
43262
-
43263
-
43264
43293
  /**
43265
43294
  * Base Query type with placeholder field.
43266
43295
  * Extended by individual query files.
@@ -43689,6 +43718,34 @@ export type QueryDecryptSecretArgs = {
43689
43718
  };
43690
43719
 
43691
43720
 
43721
+ /**
43722
+ * Base Query type with placeholder field.
43723
+ * Extended by individual query files.
43724
+ */
43725
+ export type QueryDemandForecastByCustomerArgs = {
43726
+ weeks?: InputMaybe<Scalars['Int']['input']>;
43727
+ };
43728
+
43729
+
43730
+ /**
43731
+ * Base Query type with placeholder field.
43732
+ * Extended by individual query files.
43733
+ */
43734
+ export type QueryDemandForecastByLaneArgs = {
43735
+ weeks?: InputMaybe<Scalars['Int']['input']>;
43736
+ };
43737
+
43738
+
43739
+ /**
43740
+ * Base Query type with placeholder field.
43741
+ * Extended by individual query files.
43742
+ */
43743
+ export type QueryDemandForecastVarianceArgs = {
43744
+ limit?: InputMaybe<Scalars['Int']['input']>;
43745
+ scopeType: DemandForecastScope;
43746
+ };
43747
+
43748
+
43692
43749
  /**
43693
43750
  * Base Query type with placeholder field.
43694
43751
  * Extended by individual query files.