@burdenoff/cli-sdk 2026.1102.2 → 2026.1102.4

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 (51) hide show
  1. package/dist/modules/adaptercloud/index.cjs +6 -3
  2. package/dist/modules/adaptercloud/index.js +6 -3
  3. package/dist/modules/assethandler/index.cjs +22 -57
  4. package/dist/modules/assethandler/index.js +27 -62
  5. package/dist/modules/atheletebridge/index.cjs +33 -19
  6. package/dist/modules/atheletebridge/index.js +32 -18
  7. package/dist/modules/buildmyiq/index.cjs +64 -67
  8. package/dist/modules/buildmyiq/index.js +60 -63
  9. package/dist/modules/comradecircle/index.cjs +23 -15
  10. package/dist/modules/comradecircle/index.js +19 -11
  11. package/dist/modules/coolandlovely/index.cjs +27 -14
  12. package/dist/modules/coolandlovely/index.js +29 -16
  13. package/dist/modules/crewfoundry/index.cjs +63 -116
  14. package/dist/modules/crewfoundry/index.js +62 -115
  15. package/dist/modules/ecoimpacthub/index.cjs +19 -9
  16. package/dist/modules/ecoimpacthub/index.js +19 -9
  17. package/dist/modules/eventfullymanaged/index.cjs +77 -77
  18. package/dist/modules/eventfullymanaged/index.js +78 -78
  19. package/dist/modules/govcitizenhub/index.cjs +7 -4
  20. package/dist/modules/govcitizenhub/index.js +7 -4
  21. package/dist/modules/headshotmarketing/index.cjs +92 -261
  22. package/dist/modules/headshotmarketing/index.js +94 -263
  23. package/dist/modules/hookmovies/index.cjs +17 -6
  24. package/dist/modules/hookmovies/index.js +20 -9
  25. package/dist/modules/housingvista/index.cjs +31 -24
  26. package/dist/modules/housingvista/index.js +26 -19
  27. package/dist/modules/intelwatchtower/index.cjs +24 -12
  28. package/dist/modules/intelwatchtower/index.js +24 -12
  29. package/dist/modules/kadaikodi/index.cjs +56 -90
  30. package/dist/modules/kadaikodi/index.js +60 -94
  31. package/dist/modules/labsofscience/index.cjs +8 -4
  32. package/dist/modules/labsofscience/index.js +8 -4
  33. package/dist/modules/manufacturedops/index.cjs +35 -22
  34. package/dist/modules/manufacturedops/index.js +34 -21
  35. package/dist/modules/movethewheels/index.cjs +103 -231
  36. package/dist/modules/movethewheels/index.js +103 -231
  37. package/dist/modules/planmagnet/index.cjs +21 -21
  38. package/dist/modules/planmagnet/index.js +32 -32
  39. package/dist/modules/proserviceworld/index.cjs +17 -12
  40. package/dist/modules/proserviceworld/index.js +17 -12
  41. package/dist/modules/subscriberbot/index.cjs +43 -19
  42. package/dist/modules/subscriberbot/index.js +46 -22
  43. package/dist/modules/technospam/index.cjs +17 -8
  44. package/dist/modules/technospam/index.js +17 -8
  45. package/dist/modules/theculturepost/index.cjs +27 -22
  46. package/dist/modules/theculturepost/index.js +31 -26
  47. package/dist/modules/theglobalfuel/index.cjs +65 -60
  48. package/dist/modules/theglobalfuel/index.js +65 -60
  49. package/dist/modules/timecampus/index.cjs +31 -85
  50. package/dist/modules/timecampus/index.js +32 -86
  51. package/package.json +1 -1
@@ -1,33 +1,33 @@
1
- import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.js';var D=`
1
+ import {a,b as b$1,i,r,h,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.js';var D=`
2
2
  query MovethewheelsGetCustomer($id: ID!) {
3
3
  customer(id: $id) {
4
4
  id name email phone company type taxId businessLicense address rating
5
5
  createdAt updatedAt createdBy updatedBy workspaceId
6
6
  }
7
7
  }
8
- `,O=`
8
+ `,C=`
9
9
  query MovethewheelsCustomers($filter: CustomerFilterInput, $pagination: PaginationInput) {
10
10
  customers(filter: $filter, pagination: $pagination) {
11
11
  id name email phone company type rating createdAt
12
12
  }
13
13
  }
14
- `,R=`
14
+ `,b=`
15
15
  mutation MovethewheelsCreateCustomer($input: CreateCustomerInput!) {
16
16
  createCustomer(input: $input) {
17
17
  id name email phone company type taxId businessLicense address rating createdAt
18
18
  }
19
19
  }
20
- `,b=`
20
+ `,O=`
21
21
  mutation MovethewheelsUpdateCustomer($id: ID!, $input: UpdateCustomerInput!) {
22
22
  updateCustomer(id: $id, input: $input) {
23
23
  id name email phone company type taxId businessLicense address rating updatedAt
24
24
  }
25
25
  }
26
- `,T=`
26
+ `,S=`
27
27
  mutation MovethewheelsDeleteCustomer($id: ID!) {
28
28
  deleteCustomer(id: $id)
29
29
  }
30
- `,C=`
30
+ `,R=`
31
31
  query MovethewheelsGetDriver($id: ID!) {
32
32
  driver(id: $id) {
33
33
  id employeeId firstName lastName email phone status licenseNumber
@@ -35,7 +35,7 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
35
35
  currentLocation performanceMetrics createdAt updatedAt workspaceId
36
36
  }
37
37
  }
38
- `,S=`
38
+ `,T=`
39
39
  query MovethewheelsDrivers($filter: DriverFilterInput, $pagination: PaginationInput) {
40
40
  drivers(filter: $filter, pagination: $pagination) {
41
41
  id employeeId firstName lastName email phone status vehicleId rating createdAt
@@ -65,7 +65,7 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
65
65
  id firstName lastName status updatedAt
66
66
  }
67
67
  }
68
- `,P=`
68
+ `,L=`
69
69
  mutation MovethewheelsAssignDriverVehicle($id: ID!, $vehicleId: ID) {
70
70
  assignDriverVehicle(id: $id, vehicleId: $vehicleId) {
71
71
  id firstName lastName vehicleId status updatedAt
@@ -78,27 +78,27 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
78
78
  mileage ownershipType capacity currentLocation createdAt updatedAt workspaceId
79
79
  }
80
80
  }
81
- `,M=`
81
+ `,U=`
82
82
  query MovethewheelsVehicles($filter: VehicleFilterInput, $pagination: PaginationInput) {
83
83
  vehicles(filter: $filter, pagination: $pagination) {
84
84
  id vehicleNumber type status make model year licensePlate fuelLevel createdAt
85
85
  }
86
86
  }
87
- `,U=`
87
+ `,V=`
88
88
  mutation MovethewheelsCreateVehicle($input: CreateVehicleInput!) {
89
89
  createVehicle(input: $input) {
90
90
  id vehicleNumber type status make model year licensePlate fuelLevel
91
91
  mileage ownershipType createdAt
92
92
  }
93
93
  }
94
- `,L=`
94
+ `,P=`
95
95
  mutation MovethewheelsUpdateVehicle($id: ID!, $input: UpdateVehicleInput!) {
96
96
  updateVehicle(id: $id, input: $input) {
97
97
  id vehicleNumber type status make model year licensePlate fuelLevel
98
98
  mileage ownershipType updatedAt
99
99
  }
100
100
  }
101
- `,V=`
101
+ `,M=`
102
102
  mutation MovethewheelsDeleteVehicle($id: ID!) {
103
103
  deleteVehicle(id: $id)
104
104
  }
@@ -115,37 +115,6 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
115
115
  }
116
116
  }
117
117
  `,F=`
118
- query MovethewheelsGetProduct($id: ID!) {
119
- product(id: $id) {
120
- id sku name description category brand weight value dimensions
121
- fragile hazardous temperatureControlled createdAt updatedAt workspaceId
122
- }
123
- }
124
- `,j=`
125
- query MovethewheelsProducts($filter: ProductFilterInput, $pagination: PaginationInput) {
126
- products(filter: $filter, pagination: $pagination) {
127
- id sku name category brand weight value fragile hazardous createdAt
128
- }
129
- }
130
- `,W=`
131
- mutation MovethewheelsCreateProduct($input: CreateProductInput!) {
132
- createProduct(input: $input) {
133
- id sku name description category brand weight value fragile hazardous
134
- temperatureControlled createdAt
135
- }
136
- }
137
- `,G=`
138
- mutation MovethewheelsUpdateProduct($id: ID!, $input: UpdateProductInput!) {
139
- updateProduct(id: $id, input: $input) {
140
- id sku name description category brand weight value fragile hazardous
141
- temperatureControlled updatedAt
142
- }
143
- }
144
- `,H=`
145
- mutation MovethewheelsDeleteProduct($id: ID!) {
146
- deleteProduct(id: $id)
147
- }
148
- `,J=`
149
118
  query MovethewheelsGetWarehouse($id: ID!) {
150
119
  warehouse(id: $id) {
151
120
  id code name type status address contactInfo operatingHours capabilities
@@ -153,213 +122,161 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
153
122
  locations { id locationCode locationType status zone aisle rack shelf bin capacity }
154
123
  }
155
124
  }
156
- `,z=`
125
+ `,W=`
157
126
  query MovethewheelsWarehouses($filter: WarehouseFilterInput, $pagination: PaginationInput) {
158
127
  warehouses(filter: $filter, pagination: $pagination) {
159
128
  id code name type status totalCapacity usedCapacity createdAt
160
129
  }
161
130
  }
162
- `,Y=`
131
+ `,H=`
163
132
  mutation MovethewheelsCreateWarehouse($input: CreateWarehouseInput!) {
164
133
  createWarehouse(input: $input) {
165
134
  id code name type status address totalCapacity usedCapacity createdAt
166
135
  }
167
136
  }
168
- `,B=`
137
+ `,j=`
169
138
  mutation MovethewheelsUpdateWarehouse($id: ID!, $input: UpdateWarehouseInput!) {
170
139
  updateWarehouse(id: $id, input: $input) {
171
140
  id code name type status address totalCapacity usedCapacity updatedAt
172
141
  }
173
142
  }
174
- `,K=`
143
+ `,G=`
175
144
  mutation MovethewheelsDeleteWarehouse($id: ID!) {
176
145
  deleteWarehouse(id: $id)
177
146
  }
178
- `,Z=`
147
+ `,J=`
179
148
  mutation MovethewheelsCreateWarehouseLocation($input: CreateWarehouseLocationInput!) {
180
149
  createWarehouseLocation(input: $input) {
181
150
  id warehouseId locationCode locationType status zone aisle rack shelf bin capacity createdAt
182
151
  }
183
152
  }
184
- `,Q=`
153
+ `,z=`
185
154
  mutation MovethewheelsUpdateWarehouseLocation($id: ID!, $input: UpdateWarehouseLocationInput!) {
186
155
  updateWarehouseLocation(id: $id, input: $input) {
187
156
  id warehouseId locationCode locationType status zone aisle rack shelf bin capacity updatedAt
188
157
  }
189
158
  }
190
- `,X=`
159
+ `,Y=`
191
160
  query MovethewheelsGetInventoryItem($id: ID!) {
192
161
  inventoryItem(id: $id) {
193
- id productId warehouseId locationId onHand available allocated damaged
194
- reorderPoint safetyStock unitCost createdAt updatedAt workspaceId
162
+ id cargoItemId warehouseId locationId onHand available allocated damaged reorderPoint safetyStock
163
+ unitCost createdAt updatedAt workspaceId
195
164
  }
196
165
  }
197
- `,ee=`
198
- query MovethewheelsInventoryItems($filter: InventoryFilterInput, $pagination: PaginationInput) {
166
+ `,B=`
167
+ query MovethewheelsInventoryItems(
168
+ $filter: InventoryFilterInput
169
+ $pagination: PaginationInput
170
+ ) {
199
171
  inventoryItems(filter: $filter, pagination: $pagination) {
200
- id productId warehouseId onHand available allocated damaged
201
- reorderPoint unitCost createdAt
172
+ id cargoItemId warehouseId onHand available allocated damaged reorderPoint unitCost createdAt
202
173
  }
203
174
  }
204
- `,te=`
175
+ `,K=`
205
176
  query MovethewheelsInventoryTransactions(
206
177
  $filter: InventoryFilterInput
207
178
  $pagination: PaginationInput
208
179
  ) {
209
180
  inventoryTransactions(filter: $filter, pagination: $pagination) {
210
- id transactionNumber type productId warehouseId quantity unitCost
211
- referenceType referenceId notes createdAt
181
+ id transactionNumber type cargoItemId warehouseId quantity unitCost referenceType referenceId notes
182
+ createdAt
212
183
  }
213
184
  }
214
- `,ie=`
185
+ `,Z=`
215
186
  query MovethewheelsInventoryStats {
216
187
  inventoryStats {
217
188
  totalOnHand totalAvailable totalAllocated totalDamaged lowStockCount
218
189
  }
219
190
  }
220
- `,ne=`
191
+ `,Q=`
221
192
  mutation MovethewheelsCreateInventoryItem($input: CreateInventoryItemInput!) {
222
193
  createInventoryItem(input: $input) {
223
- id productId warehouseId locationId onHand available allocated damaged
224
- reorderPoint safetyStock unitCost createdAt
194
+ id cargoItemId warehouseId locationId onHand available allocated damaged reorderPoint safetyStock
195
+ unitCost createdAt
225
196
  }
226
197
  }
227
- `,re=`
198
+ `,X=`
228
199
  mutation MovethewheelsUpdateInventoryItem($id: ID!, $input: UpdateInventoryItemInput!) {
229
200
  updateInventoryItem(id: $id, input: $input) {
230
- id productId warehouseId locationId onHand available allocated damaged
231
- reorderPoint safetyStock unitCost updatedAt
201
+ id cargoItemId warehouseId locationId onHand available allocated damaged reorderPoint safetyStock
202
+ unitCost updatedAt
232
203
  }
233
204
  }
234
- `,ae=`
205
+ `,ee=`
235
206
  mutation MovethewheelsDeleteInventoryItem($id: ID!) {
236
207
  deleteInventoryItem(id: $id)
237
208
  }
238
- `,oe=`
209
+ `,te=`
239
210
  mutation MovethewheelsAdjustInventoryStock($input: AdjustInventoryStockInput!) {
240
211
  adjustInventoryStock(input: $input) {
241
- id productId warehouseId onHand available allocated damaged updatedAt
212
+ id cargoItemId warehouseId onHand available allocated damaged updatedAt
242
213
  }
243
214
  }
244
- `,se=`
215
+ `,ie=`
245
216
  mutation MovethewheelsCreateInventoryTransaction($input: CreateInventoryTransactionInput!) {
246
217
  createInventoryTransaction(input: $input) {
247
- id transactionNumber type productId warehouseId quantity unitCost
248
- referenceType referenceId notes createdAt
249
- }
250
- }
251
- `,de=`
252
- query MovethewheelsGetOrder($id: ID!) {
253
- movethewheelsOrder(id: $id) {
254
- id orderNumber customerId driverId vehicleId orderType status priority
255
- trackingNumber pickupAddress deliveryAddress items pricing
256
- scheduledDelivery specialInstructions createdAt updatedAt workspaceId
257
- statusHistory { id status previousStatus notes location createdAt }
258
- }
259
- }
260
- `,ce=`
261
- query MovethewheelsOrders($filter: OrderFilterInput, $pagination: PaginationInput) {
262
- movethewheelsOrders(filter: $filter, pagination: $pagination) {
263
- id orderNumber customerId driverId orderType status priority
264
- trackingNumber scheduledDelivery createdAt
265
- }
266
- }
267
- `,pe=`
268
- mutation MovethewheelsCreateOrder($input: CreateOrderInput!) {
269
- createMovethewheelsOrder(input: $input) {
270
- id orderNumber customerId driverId vehicleId orderType status priority
271
- trackingNumber pickupAddress deliveryAddress items pricing createdAt
272
- }
273
- }
274
- `,ue=`
275
- mutation MovethewheelsUpdateOrder($id: ID!, $input: UpdateOrderInput!) {
276
- updateMovethewheelsOrder(id: $id, input: $input) {
277
- id orderNumber customerId driverId vehicleId orderType status priority
278
- trackingNumber deliveryAddress items pricing updatedAt
279
- }
280
- }
281
- `,me=`
282
- mutation MovethewheelsDeleteOrder($id: ID!) {
283
- deleteMovethewheelsOrder(id: $id)
284
- }
285
- `,le=`
286
- mutation MovethewheelsUpdateOrderStatus($id: ID!, $input: UpdateOrderStatusInput!) {
287
- updateMovethewheelsOrderStatus(id: $id, input: $input) {
288
- id orderNumber status priority trackingNumber updatedAt
289
- statusHistory { id status previousStatus notes createdAt }
218
+ id transactionNumber type cargoItemId warehouseId quantity unitCost referenceType referenceId notes
219
+ createdAt
290
220
  }
291
221
  }
292
- `,fe=`
293
- query MovethewheelsOrderStats {
294
- orderStats {
295
- total pending inTransit delivered cancelled failed
296
- }
297
- }
298
- `,ge=`
222
+ `,ne=`
299
223
  query MovethewheelsGetShipment($id: ID!) {
300
224
  shipment(id: $id) {
301
- id shipmentNumber orderId customerId carrierId status trackingNumber
302
- origin destination cargoDetails estimatedDelivery actualDelivery
303
- createdAt updatedAt workspaceId
225
+ id shipmentNumber customerId carrierId deliveryJobId storeOrderId status trackingNumber origin destination
226
+ cargoDetails estimatedDelivery actualDelivery createdAt updatedAt workspaceId
304
227
  trackingEvents { id eventType details location timestamp }
305
228
  }
306
229
  }
307
- `,he=`
230
+ `,re=`
308
231
  query MovethewheelsShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {
309
232
  shipments(filter: $filter, pagination: $pagination) {
310
- id shipmentNumber orderId customerId carrierId status trackingNumber
233
+ id shipmentNumber customerId carrierId deliveryJobId storeOrderId status trackingNumber
311
234
  estimatedDelivery createdAt
312
235
  }
313
236
  }
314
- `,ye=`
237
+ `,ae=`
315
238
  query MovethewheelsActiveDeliveries($pagination: PaginationInput) {
316
239
  activeDeliveries(pagination: $pagination) {
317
- id shipmentNumber orderId status trackingNumber estimatedDelivery createdAt
240
+ id shipmentNumber deliveryJobId storeOrderId status trackingNumber estimatedDelivery createdAt
318
241
  }
319
242
  }
320
- `,ve=`
243
+ `,oe=`
321
244
  query MovethewheelsShipmentTracking($shipmentId: ID!, $pagination: PaginationInput) {
322
245
  shipmentTracking(shipmentId: $shipmentId, pagination: $pagination) {
323
246
  id shipmentId eventType details location timestamp createdAt
324
247
  }
325
248
  }
326
- `,Ie=`
327
- query MovethewheelsOrderTracking($orderId: ID!, $pagination: PaginationInput) {
328
- orderTracking(orderId: $orderId, pagination: $pagination) {
329
- id shipmentId eventType details location timestamp createdAt
330
- }
331
- }
332
- `,we=`
249
+ `,se=`
333
250
  query MovethewheelsTrackingAlerts($pagination: PaginationInput) {
334
251
  trackingAlerts(pagination: $pagination) {
335
252
  alertType message shipmentId shipmentNumber
336
253
  }
337
254
  }
338
- `,Ee=`
255
+ `,ce=`
339
256
  mutation MovethewheelsCreateShipment($input: CreateShipmentInput!) {
340
257
  createShipment(input: $input) {
341
- id shipmentNumber orderId customerId carrierId status trackingNumber
342
- origin destination estimatedDelivery createdAt
258
+ id shipmentNumber customerId carrierId deliveryJobId storeOrderId status trackingNumber origin destination
259
+ estimatedDelivery createdAt
343
260
  }
344
261
  }
345
- `,De=`
262
+ `,de=`
346
263
  mutation MovethewheelsUpdateShipment($id: ID!, $input: UpdateShipmentInput!) {
347
264
  updateShipment(id: $id, input: $input) {
348
- id shipmentNumber orderId customerId carrierId status trackingNumber
349
- origin destination estimatedDelivery actualDelivery updatedAt
265
+ id shipmentNumber customerId carrierId deliveryJobId storeOrderId status trackingNumber origin destination
266
+ estimatedDelivery actualDelivery updatedAt
350
267
  }
351
268
  }
352
- `,Oe=`
269
+ `,pe=`
353
270
  mutation MovethewheelsDeleteShipment($id: ID!) {
354
271
  deleteShipment(id: $id)
355
272
  }
356
- `,Re=`
273
+ `,ue=`
357
274
  mutation MovethewheelsAddTrackingEvent($input: AddTrackingEventInput!) {
358
275
  addTrackingEvent(input: $input) {
359
276
  id shipmentId eventType details location timestamp createdAt
360
277
  }
361
278
  }
362
- `,be=`
279
+ `,me=`
363
280
  query MovethewheelsGetRoute($id: ID!) {
364
281
  route(id: $id) {
365
282
  id name status driverId vehicleId shipmentId waypoints
@@ -367,38 +284,38 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
367
284
  fuelCost createdAt updatedAt workspaceId
368
285
  }
369
286
  }
370
- `,Te=`
287
+ `,le=`
371
288
  query MovethewheelsRoutes($filter: RouteFilterInput, $pagination: PaginationInput) {
372
289
  routes(filter: $filter, pagination: $pagination) {
373
290
  id name status driverId vehicleId shipmentId estimatedDistance
374
291
  estimatedDuration fuelCost createdAt
375
292
  }
376
293
  }
377
- `,Ce=`
294
+ `,fe=`
378
295
  mutation MovethewheelsCreateRoute($input: CreateRouteInput!) {
379
296
  createRoute(input: $input) {
380
297
  id name status driverId vehicleId shipmentId waypoints
381
298
  estimatedDistance estimatedDuration fuelCost createdAt
382
299
  }
383
300
  }
384
- `,Se=`
301
+ `,ge=`
385
302
  mutation MovethewheelsUpdateRoute($id: ID!, $input: UpdateRouteInput!) {
386
303
  updateRoute(id: $id, input: $input) {
387
304
  id name status driverId vehicleId shipmentId waypoints
388
305
  estimatedDistance actualDistance estimatedDuration actualDuration fuelCost updatedAt
389
306
  }
390
307
  }
391
- `,Ae=`
308
+ `,ye=`
392
309
  mutation MovethewheelsDeleteRoute($id: ID!) {
393
310
  deleteRoute(id: $id)
394
311
  }
395
- `,Ne=`
312
+ `,he=`
396
313
  mutation MovethewheelsOptimizeRoute($id: ID!) {
397
314
  optimizeRoute(id: $id) {
398
315
  id name status estimatedDistance estimatedDuration fuelCost waypoints updatedAt
399
316
  }
400
317
  }
401
- `,ke=`
318
+ `,ve=`
402
319
  query MovethewheelsGetServiceProvider($id: ID!) {
403
320
  serviceProvider(id: $id) {
404
321
  id name type description isActive isVerified rating contactInfo services
@@ -406,127 +323,84 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
406
323
  offerings { id name category price currency }
407
324
  }
408
325
  }
409
- `,$e=`
326
+ `,Ie=`
410
327
  query MovethewheelsServiceProviders(
411
- $filter: ServiceProviderFilterInput
328
+ $filter: MtwServiceProviderFilterInput
412
329
  $pagination: PaginationInput
413
330
  ) {
414
331
  serviceProviders(filter: $filter, pagination: $pagination) {
415
332
  id name type description isActive isVerified rating createdAt
416
333
  }
417
334
  }
418
- `,Pe=`
419
- mutation MovethewheelsCreateServiceProvider($input: CreateServiceProviderInput!) {
335
+ `,Ee=`
336
+ mutation MovethewheelsCreateServiceProvider($input: MtwCreateServiceProviderInput!) {
420
337
  createServiceProvider(input: $input) {
421
338
  id name type description isActive isVerified rating createdAt
422
339
  }
423
340
  }
424
- `,_e=`
425
- mutation MovethewheelsUpdateServiceProvider($id: ID!, $input: UpdateServiceProviderInput!) {
341
+ `,we=`
342
+ mutation MovethewheelsUpdateServiceProvider(
343
+ $id: ID!
344
+ $input: MtwUpdateServiceProviderInput!
345
+ ) {
426
346
  updateServiceProvider(id: $id, input: $input) {
427
347
  id name type description isActive isVerified rating updatedAt
428
348
  }
429
349
  }
430
- `,Me=`
350
+ `,De=`
431
351
  mutation MovethewheelsDeleteServiceProvider($id: ID!) {
432
352
  deleteServiceProvider(id: $id)
433
353
  }
434
- `,Ue=`
354
+ `,Ce=`
435
355
  query MovethewheelsGetServiceOffering($id: ID!) {
436
356
  serviceOffering(id: $id) {
437
357
  id providerId name description category price currency availability
438
358
  createdAt updatedAt workspaceId
439
359
  }
440
360
  }
441
- `,Le=`
361
+ `,be=`
442
362
  query MovethewheelsServiceOfferings(
443
- $filter: ServiceOfferingFilterInput
363
+ $filter: MtwServiceOfferingFilterInput
444
364
  $pagination: PaginationInput
445
365
  ) {
446
366
  serviceOfferings(filter: $filter, pagination: $pagination) {
447
367
  id providerId name category price currency createdAt
448
368
  }
449
369
  }
450
- `,Ve=`
451
- mutation MovethewheelsCreateServiceOffering($input: CreateServiceOfferingInput!) {
370
+ `,Oe=`
371
+ mutation MovethewheelsCreateServiceOffering($input: MtwCreateServiceOfferingInput!) {
452
372
  createServiceOffering(input: $input) {
453
373
  id providerId name description category price currency availability createdAt
454
374
  }
455
375
  }
456
- `,xe=`
457
- mutation MovethewheelsUpdateServiceOffering($id: ID!, $input: UpdateServiceOfferingInput!) {
376
+ `,Se=`
377
+ mutation MovethewheelsUpdateServiceOffering(
378
+ $id: ID!
379
+ $input: MtwUpdateServiceOfferingInput!
380
+ ) {
458
381
  updateServiceOffering(id: $id, input: $input) {
459
382
  id providerId name description category price currency availability updatedAt
460
383
  }
461
384
  }
462
- `,qe=`
385
+ `,Re=`
463
386
  mutation MovethewheelsDeleteServiceOffering($id: ID!) {
464
387
  deleteServiceOffering(id: $id)
465
388
  }
466
- `,Fe=`
467
- query MovethewheelsGetReport($id: ID!) {
468
- movethewheelsReport(id: $id) {
469
- id name description type status schedule configuration lastGenerated
470
- createdAt updatedAt workspaceId
471
- }
472
- }
473
- `,je=`
474
- query MovethewheelsReports(
475
- $filter: MovethewheelsReportFilterInput
476
- $pagination: PaginationInput
477
- ) {
478
- movethewheelsReports(filter: $filter, pagination: $pagination) {
479
- id name type status schedule lastGenerated createdAt
480
- }
481
- }
482
- `,We=`
483
- mutation MovethewheelsCreateReport($input: CreateMovethewheelsReportInput!) {
484
- createMovethewheelsReport(input: $input) {
485
- id name description type status schedule configuration createdAt
486
- }
487
- }
488
- `,Ge=`
489
- mutation MovethewheelsUpdateReport($id: ID!, $input: UpdateMovethewheelsReportInput!) {
490
- updateMovethewheelsReport(id: $id, input: $input) {
491
- id name description type status schedule configuration updatedAt
492
- }
493
- }
494
- `,He=`
495
- mutation MovethewheelsDeleteReport($id: ID!) {
496
- deleteMovethewheelsReport(id: $id)
497
- }
498
- `,Je=`
499
- mutation MovethewheelsGenerateReport($input: GenerateMovethewheelsReportInput!) {
500
- generateMovethewheelsReport(input: $input) {
501
- generatedAt result
502
- report { id name type status lastGenerated }
503
- }
504
- }
505
- `,ze=`
506
- mutation MovethewheelsExportData($input: MovethewheelsExportDataInput!) {
507
- exportData(input: $input) {
508
- success message payload
509
- }
510
- }
511
- `,Ye=`
512
- mutation MovethewheelsImportData($input: MovethewheelsImportDataInput!) {
513
- importData(input: $input) {
514
- success message payload
515
- }
516
- }
517
- `,Be=`
389
+ `,Te=`
518
390
  query MovethewheelsModuleSettings {
519
- moduleSettings {
520
- workspaceId preferences updatedAt
391
+ mtwModuleSettings {
392
+ workspaceId defaultCurrency defaultDeliveryWindowHours defaultOrderPriority
393
+ distanceUnit weightUnit timezone isCustomized updatedAt updatedBy
521
394
  }
522
395
  }
523
- `,Ke=`
524
- mutation MovethewheelsUpdateModuleSettings($input: UpdateMovethewheelsModuleSettingsInput!) {
525
- updateModuleSettings(input: $input) {
526
- workspaceId preferences updatedAt
396
+ `,Ae=`
397
+ mutation MovethewheelsUpdateModuleSettings($input: UpdateMtwModuleSettingsInput!) {
398
+ updateMtwModuleSettings(input: $input) {
399
+ workspaceId defaultCurrency defaultDeliveryWindowHours defaultOrderPriority
400
+ distanceUnit weightUnit timezone isCustomized updatedAt updatedBy
527
401
  }
528
402
  }
529
- `,Ze=`
403
+ `,Ne=`
530
404
  query MovethewheelsAnalytics {
531
405
  analytics {
532
406
  orderTrend { label value }
@@ -534,26 +408,24 @@ import {a,b as b$1,i,r,h as h$1,k as k$1}from'../../chunk-O6UCQ5IT.js';import {o
534
408
  deliveryTrend { label value }
535
409
  }
536
410
  }
537
- `,Qe=`
411
+ `,ke=`
538
412
  query MovethewheelsDashboardMetrics {
539
413
  dashboardMetrics {
540
- totalOrders activeDeliveries totalRevenue activeVehicles availableDrivers
541
- lowStockItems
542
- recentOrders { id orderNumber status priority createdAt }
414
+ activeDeliveries totalRevenue activeVehicles availableDrivers lowStockItems
543
415
  }
544
416
  }
545
- `,Xe=`
417
+ `,$e=`
546
418
  query MovethewheelsFinanceMetrics {
547
419
  financeMetrics {
548
420
  fuelCost openInvoices
549
421
  revenue { totalRevenue deliveredRevenue averageOrderValue }
550
422
  }
551
423
  }
552
- `,et=`
424
+ `,Le=`
553
425
  query MovethewheelsFleetStats {
554
426
  fleetStats {
555
427
  totalVehicles activeVehicles inTransitVehicles maintenanceVehicles
556
428
  totalDrivers availableDrivers onDeliveryDrivers
557
429
  }
558
430
  }
559
- `;function u(m,r){try{return JSON.parse(r)}catch{throw new o(`--${m} must be valid JSON`)}}function c(m){let r=Number.parseInt(m,10);if(Number.isNaN(r))throw new o(`Expected an integer but got "${m}"`);return r}function l(m){let r=Number.parseFloat(m);if(Number.isNaN(r))throw new o(`Expected a number but got "${m}"`);return r}function h(m){let r={};return m.limit!==void 0&&(r.limit=m.limit),m.offset!==void 0&&(r.offset=m.offset),Object.keys(r).length?r:void 0}function tt(m){let r$1=m.command("customers").description("Movethewheels customers");r$1.command("list").description("List customers").option("--type <t>","Filter by customer type (b2c/b2b)").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.type&&(e.type=i$1.type),i$1.query&&(e.search=i$1.query);let t=await b$1(O,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.customers,{headers:["ID","Name","Type","Email","Phone","Rating"],rows:t.customers.map(n=>[r(n.id,12),n.name,n.type,n.email??"-",n.phone??"-",n.rating!=null?String(n.rating):"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a customer by id").argument("<id>","Customer ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(D,{id:i$1});if(!t.customer)throw new o(`Customer ${i$1} not found`);i(e,t.customer);}catch(t){h$1(t);}}),r$1.command("create").description("Create a customer").requiredOption("--name <name>","Customer name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--company <company>","Company").option("--type <t>","Customer type","b2c").option("--tax-id <s>","Tax ID").option("--business-license <s>","Business license").option("--rating <n>","Rating",l).option("--address <json>","Address JSON").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={name:i$1.name,type:i$1.type??"b2c"};i$1.email&&(e.email=i$1.email),i$1.phone&&(e.phone=i$1.phone),i$1.company&&(e.company=i$1.company),i$1.taxId&&(e.taxId=i$1.taxId),i$1.businessLicense&&(e.businessLicense=i$1.businessLicense),i$1.rating!==void 0&&(e.rating=i$1.rating),i$1.address&&(e.address=u("address",i$1.address));let t=await b$1(R,{input:e});k$1(`Customer created: ${t.createCustomer.name}`),i(i$1,t.createCustomer);}catch(e){h$1(e);}}),r$1.command("update").description("Update a customer").argument("<id>","Customer ID").option("--name <name>","Customer name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--company <company>","Company").option("--type <t>","Customer type").option("--tax-id <s>","Tax ID").option("--business-license <s>","Business license").option("--rating <n>","Rating",l).option("--address <json>","Address JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.name&&(t.name=e.name),e.email!==void 0&&(t.email=e.email),e.phone!==void 0&&(t.phone=e.phone),e.company!==void 0&&(t.company=e.company),e.type&&(t.type=e.type),e.taxId!==void 0&&(t.taxId=e.taxId),e.businessLicense!==void 0&&(t.businessLicense=e.businessLicense),e.rating!==void 0&&(t.rating=e.rating),e.address&&(t.address=u("address",e.address)),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(b,{id:i$1,input:t});k$1("Customer updated"),i(e,n.updateCustomer);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a customer").argument("<id>","Customer ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(T,{id:i$1});k$1(`Customer ${i$1} deleted`),i(e,{deleted:t.deleteCustomer});}catch(t){h$1(t);}});}function it(m){let r$1=m.command("drivers").description("Movethewheels drivers");r$1.command("list").description("List drivers").option("--status <s>","Filter by driver status").option("--vehicle <id>","Filter by vehicle ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.status&&(e.status=i$1.status.toUpperCase()),i$1.vehicle&&(e.vehicleId=i$1.vehicle),i$1.query&&(e.search=i$1.query);let t=await b$1(S,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.drivers,{headers:["ID","Name","Employee","Status","Vehicle","Rating"],rows:t.drivers.map(n=>[r(n.id,12),`${n.firstName} ${n.lastName}`,n.employeeId,n.status,n.vehicleId?r(n.vehicleId,12):"-",n.rating!=null?String(n.rating):"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a driver by id").argument("<id>","Driver ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(C,{id:i$1});if(!t.driver)throw new o(`Driver ${i$1} not found`);i(e,t.driver);}catch(t){h$1(t);}}),r$1.command("create").description("Create a driver").requiredOption("--employee-id <s>","Employee ID").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--status <s>","Driver status","AVAILABLE").option("--license-number <s>","License number").option("--license-class <s>","License class").option("--license-expiry <s>","License expiry (ISO date)").option("--vehicle-id <id>","Vehicle ID").option("--user-id <id>","User ID").option("--rating <n>","Rating",l).option("--certifications <json>","Certifications JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={employeeId:i$1.employeeId,firstName:i$1.firstName,lastName:i$1.lastName,status:(i$1.status??"AVAILABLE").toUpperCase()};i$1.email&&(e.email=i$1.email),i$1.phone&&(e.phone=i$1.phone),i$1.licenseNumber&&(e.licenseNumber=i$1.licenseNumber),i$1.licenseClass&&(e.licenseClass=i$1.licenseClass),i$1.licenseExpiry&&(e.licenseExpiry=i$1.licenseExpiry),i$1.vehicleId&&(e.vehicleId=i$1.vehicleId),i$1.userId&&(e.userId=i$1.userId),i$1.rating!==void 0&&(e.rating=i$1.rating),i$1.certifications&&(e.certifications=u("certifications",i$1.certifications)),i$1.currentLocation&&(e.currentLocation=u("current-location",i$1.currentLocation));let t=await b$1(A,{input:e});k$1(`Driver created: ${t.createDriver.firstName} ${t.createDriver.lastName}`),i(i$1,t.createDriver);}catch(e){h$1(e);}}),r$1.command("update").description("Update a driver").argument("<id>","Driver ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--status <s>","Driver status").option("--license-number <s>","License number").option("--license-class <s>","License class").option("--license-expiry <s>","License expiry (ISO date)").option("--vehicle-id <id>","Vehicle ID").option("--rating <n>","Rating",l).option("--certifications <json>","Certifications JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.firstName&&(t.firstName=e.firstName),e.lastName&&(t.lastName=e.lastName),e.email!==void 0&&(t.email=e.email),e.phone!==void 0&&(t.phone=e.phone),e.status&&(t.status=e.status.toUpperCase()),e.licenseNumber!==void 0&&(t.licenseNumber=e.licenseNumber),e.licenseClass!==void 0&&(t.licenseClass=e.licenseClass),e.licenseExpiry&&(t.licenseExpiry=e.licenseExpiry),e.vehicleId!==void 0&&(t.vehicleId=e.vehicleId),e.rating!==void 0&&(t.rating=e.rating),e.certifications&&(t.certifications=u("certifications",e.certifications)),e.currentLocation&&(t.currentLocation=u("current-location",e.currentLocation)),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(N,{id:i$1,input:t});k$1("Driver updated"),i(e,n.updateDriver);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a driver").argument("<id>","Driver ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(k,{id:i$1});k$1(`Driver ${i$1} deleted`),i(e,{deleted:t.deleteDriver});}catch(t){h$1(t);}}),r$1.command("set-status").description("Update a driver status").argument("<id>","Driver ID").requiredOption("--status <s>","AVAILABLE|ON_DELIVERY|ON_BREAK|OFF_DUTY|INACTIVE").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1($,{id:i$1,status:e.status.toUpperCase()});k$1(`Driver status set to ${t.updateDriverStatus.status}`),i(e,t.updateDriverStatus);}catch(t){h$1(t);}}),r$1.command("assign-vehicle").description("Assign (or clear) a vehicle for a driver").argument("<id>","Driver ID").option("--vehicle <id>","Vehicle ID (omit to clear assignment)").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(P,{id:i$1,vehicleId:e.vehicle});k$1(e.vehicle?`Vehicle ${e.vehicle} assigned`:"Vehicle assignment cleared"),i(e,t.assignDriverVehicle);}catch(t){h$1(t);}});}function nt(m){let r$1=m.command("vehicles").description("Movethewheels fleet vehicles");r$1.command("list").description("List vehicles").option("--type <t>","Filter by vehicle type").option("--status <s>","Filter by vehicle status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.type&&(e.type=i$1.type.toUpperCase()),i$1.status&&(e.status=i$1.status.toUpperCase()),i$1.query&&(e.search=i$1.query);let t=await b$1(M,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.vehicles,{headers:["ID","Number","Type","Status","Make/Model","Plate"],rows:t.vehicles.map(n=>[r(n.id,12),n.vehicleNumber,n.type,n.status,`${n.make??"-"} ${n.model??""}`.trim(),n.licensePlate??"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a vehicle by id").argument("<id>","Vehicle ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(_,{id:i$1});if(!t.vehicle)throw new o(`Vehicle ${i$1} not found`);i(e,t.vehicle);}catch(t){h$1(t);}}),r$1.command("create").description("Create a vehicle").requiredOption("--number <s>","Vehicle number").requiredOption("--type <t>","Vehicle type (TRUCK|VAN|MOTORCYCLE|\u2026)").option("--status <s>","Vehicle status","ACTIVE").option("--make <s>","Make").option("--model <s>","Model").option("--year <n>","Year",c).option("--license-plate <s>","License plate").option("--fuel-level <n>","Fuel level",l).option("--mileage <n>","Mileage",l).option("--ownership-type <s>","Ownership type").option("--capacity <json>","Capacity JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={vehicleNumber:i$1.number,type:i$1.type.toUpperCase(),status:(i$1.status??"ACTIVE").toUpperCase()};i$1.make&&(e.make=i$1.make),i$1.model&&(e.model=i$1.model),i$1.year!==void 0&&(e.year=i$1.year),i$1.licensePlate&&(e.licensePlate=i$1.licensePlate),i$1.fuelLevel!==void 0&&(e.fuelLevel=i$1.fuelLevel),i$1.mileage!==void 0&&(e.mileage=i$1.mileage),i$1.ownershipType&&(e.ownershipType=i$1.ownershipType),i$1.capacity&&(e.capacity=u("capacity",i$1.capacity)),i$1.currentLocation&&(e.currentLocation=u("current-location",i$1.currentLocation));let t=await b$1(U,{input:e});k$1(`Vehicle created: ${t.createVehicle.vehicleNumber}`),i(i$1,t.createVehicle);}catch(e){h$1(e);}}),r$1.command("update").description("Update a vehicle").argument("<id>","Vehicle ID").option("--number <s>","Vehicle number").option("--type <t>","Vehicle type").option("--status <s>","Vehicle status").option("--make <s>","Make").option("--model <s>","Model").option("--year <n>","Year",c).option("--license-plate <s>","License plate").option("--fuel-level <n>","Fuel level",l).option("--mileage <n>","Mileage",l).option("--ownership-type <s>","Ownership type").option("--capacity <json>","Capacity JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.number&&(t.vehicleNumber=e.number),e.type&&(t.type=e.type.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.make!==void 0&&(t.make=e.make),e.model!==void 0&&(t.model=e.model),e.year!==void 0&&(t.year=e.year),e.licensePlate!==void 0&&(t.licensePlate=e.licensePlate),e.fuelLevel!==void 0&&(t.fuelLevel=e.fuelLevel),e.mileage!==void 0&&(t.mileage=e.mileage),e.ownershipType!==void 0&&(t.ownershipType=e.ownershipType),e.capacity&&(t.capacity=u("capacity",e.capacity)),e.currentLocation&&(t.currentLocation=u("current-location",e.currentLocation)),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(L,{id:i$1,input:t});k$1("Vehicle updated"),i(e,n.updateVehicle);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a vehicle").argument("<id>","Vehicle ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(V,{id:i$1});k$1(`Vehicle ${i$1} deleted`),i(e,{deleted:t.deleteVehicle});}catch(t){h$1(t);}}),r$1.command("set-status").description("Update a vehicle status").argument("<id>","Vehicle ID").requiredOption("--status <s>","ACTIVE|INACTIVE|IN_TRANSIT|MAINTENANCE|DECOMMISSIONED").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(x,{id:i$1,status:e.status.toUpperCase()});k$1(`Vehicle status set to ${t.updateVehicleStatus.status}`),i(e,t.updateVehicleStatus);}catch(t){h$1(t);}}),r$1.command("set-location").description("Update a vehicle current location").argument("<id>","Vehicle ID").requiredOption("--location <json>","Location JSON (latitude/longitude/\u2026)").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=u("location",e.location),n=await b$1(q,{id:i$1,location:t});k$1("Vehicle location updated"),i(e,n.updateVehicleLocation);}catch(t){h$1(t);}});}function rt(m){let r$1=m.command("products").description("Movethewheels catalog products");r$1.command("list").description("List products").option("--category <c>","Filter by category").option("--sku <s>","Filter by SKU").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.category&&(e.category=i$1.category),i$1.sku&&(e.sku=i$1.sku),i$1.query&&(e.search=i$1.query);let t=await b$1(j,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.products,{headers:["ID","SKU","Name","Category","Brand","Weight"],rows:t.products.map(n=>[r(n.id,12),n.sku,n.name,n.category??"-",n.brand??"-",n.weight!=null?String(n.weight):"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a product by id").argument("<id>","Product ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(F,{id:i$1});if(!t.product)throw new o(`Product ${i$1} not found`);i(e,t.product);}catch(t){h$1(t);}}),r$1.command("create").description("Create a product").requiredOption("--name <name>","Product name").requiredOption("--sku <sku>","SKU").option("--description <s>","Description").option("--category <c>","Category").option("--brand <s>","Brand").option("--weight <n>","Weight",l).option("--value <n>","Value",l).option("--dimensions <json>","Dimensions JSON").option("--fragile","Mark as fragile").option("--hazardous","Mark as hazardous").option("--temperature-controlled","Mark as temperature controlled").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={name:i$1.name,sku:i$1.sku};i$1.description&&(e.description=i$1.description),i$1.category&&(e.category=i$1.category),i$1.brand&&(e.brand=i$1.brand),i$1.weight!==void 0&&(e.weight=i$1.weight),i$1.value!==void 0&&(e.value=i$1.value),i$1.dimensions&&(e.dimensions=u("dimensions",i$1.dimensions)),i$1.fragile&&(e.fragile=!0),i$1.hazardous&&(e.hazardous=!0),i$1.temperatureControlled&&(e.temperatureControlled=!0);let t=await b$1(W,{input:e});k$1(`Product created: ${t.createProduct.name}`),i(i$1,t.createProduct);}catch(e){h$1(e);}}),r$1.command("update").description("Update a product").argument("<id>","Product ID").option("--name <name>","Product name").option("--sku <sku>","SKU").option("--description <s>","Description").option("--category <c>","Category").option("--brand <s>","Brand").option("--weight <n>","Weight",l).option("--value <n>","Value",l).option("--dimensions <json>","Dimensions JSON").option("--fragile <bool>","true|false",i=>i==="true").option("--hazardous <bool>","true|false",i=>i==="true").option("--temperature-controlled <bool>","true|false",i=>i==="true").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.name&&(t.name=e.name),e.sku&&(t.sku=e.sku),e.description!==void 0&&(t.description=e.description),e.category!==void 0&&(t.category=e.category),e.brand!==void 0&&(t.brand=e.brand),e.weight!==void 0&&(t.weight=e.weight),e.value!==void 0&&(t.value=e.value),e.dimensions&&(t.dimensions=u("dimensions",e.dimensions)),e.fragile!==void 0&&(t.fragile=e.fragile),e.hazardous!==void 0&&(t.hazardous=e.hazardous),e.temperatureControlled!==void 0&&(t.temperatureControlled=e.temperatureControlled),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(G,{id:i$1,input:t});k$1("Product updated"),i(e,n.updateProduct);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a product").argument("<id>","Product ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(H,{id:i$1});k$1(`Product ${i$1} deleted`),i(e,{deleted:t.deleteProduct});}catch(t){h$1(t);}});}function at(m){let r$1=m.command("warehouses").description("Movethewheels warehouses & locations");r$1.command("list").description("List warehouses").option("--type <t>","Filter by warehouse type").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.type&&(e.type=i$1.type.toUpperCase()),i$1.status&&(e.status=i$1.status),i$1.query&&(e.search=i$1.query);let t=await b$1(z,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.warehouses,{headers:["ID","Code","Name","Type","Status","Capacity"],rows:t.warehouses.map(n=>[r(n.id,12),n.code,n.name,n.type,n.status,`${n.usedCapacity??0}/${n.totalCapacity??0}`])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a warehouse by id (includes locations)").argument("<id>","Warehouse ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(J,{id:i$1});if(!t.warehouse)throw new o(`Warehouse ${i$1} not found`);i(e,t.warehouse);}catch(t){h$1(t);}}),r$1.command("create").description("Create a warehouse").requiredOption("--code <code>","Warehouse code").requiredOption("--name <name>","Warehouse name").requiredOption("--type <t>","Warehouse type (DISTRIBUTION|FULFILLMENT|\u2026)").requiredOption("--address <json>","Address JSON").option("--status <s>","Status","ACTIVE").option("--contact-info <json>","Contact info JSON").option("--operating-hours <json>","Operating hours JSON").option("--capabilities <json>","Capabilities JSON").option("--total-capacity <n>","Total capacity",l).option("--used-capacity <n>","Used capacity",l).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={code:i$1.code,name:i$1.name,type:i$1.type.toUpperCase(),address:u("address",i$1.address),status:i$1.status??"ACTIVE"};i$1.contactInfo&&(e.contactInfo=u("contact-info",i$1.contactInfo)),i$1.operatingHours&&(e.operatingHours=u("operating-hours",i$1.operatingHours)),i$1.capabilities&&(e.capabilities=u("capabilities",i$1.capabilities)),i$1.totalCapacity!==void 0&&(e.totalCapacity=i$1.totalCapacity),i$1.usedCapacity!==void 0&&(e.usedCapacity=i$1.usedCapacity);let t=await b$1(Y,{input:e});k$1(`Warehouse created: ${t.createWarehouse.name}`),i(i$1,t.createWarehouse);}catch(e){h$1(e);}}),r$1.command("update").description("Update a warehouse").argument("<id>","Warehouse ID").option("--code <code>","Warehouse code").option("--name <name>","Warehouse name").option("--type <t>","Warehouse type").option("--status <s>","Status").option("--address <json>","Address JSON").option("--contact-info <json>","Contact info JSON").option("--operating-hours <json>","Operating hours JSON").option("--capabilities <json>","Capabilities JSON").option("--total-capacity <n>","Total capacity",l).option("--used-capacity <n>","Used capacity",l).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.code&&(t.code=e.code),e.name&&(t.name=e.name),e.type&&(t.type=e.type.toUpperCase()),e.status&&(t.status=e.status),e.address&&(t.address=u("address",e.address)),e.contactInfo&&(t.contactInfo=u("contact-info",e.contactInfo)),e.operatingHours&&(t.operatingHours=u("operating-hours",e.operatingHours)),e.capabilities&&(t.capabilities=u("capabilities",e.capabilities)),e.totalCapacity!==void 0&&(t.totalCapacity=e.totalCapacity),e.usedCapacity!==void 0&&(t.usedCapacity=e.usedCapacity),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(B,{id:i$1,input:t});k$1("Warehouse updated"),i(e,n.updateWarehouse);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a warehouse").argument("<id>","Warehouse ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(K,{id:i$1});k$1(`Warehouse ${i$1} deleted`),i(e,{deleted:t.deleteWarehouse});}catch(t){h$1(t);}}),r$1.command("create-location").description("Create a warehouse location").requiredOption("--warehouse <id>","Warehouse ID").requiredOption("--code <s>","Location code").option("--location-type <s>","Location type").option("--status <s>","Status","ACTIVE").option("--zone <s>","Zone").option("--aisle <s>","Aisle").option("--rack <s>","Rack").option("--shelf <s>","Shelf").option("--bin <s>","Bin").option("--capacity <n>","Capacity",l).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={warehouseId:i$1.warehouse,locationCode:i$1.code,status:i$1.status??"ACTIVE"};i$1.locationType&&(e.locationType=i$1.locationType),i$1.zone&&(e.zone=i$1.zone),i$1.aisle&&(e.aisle=i$1.aisle),i$1.rack&&(e.rack=i$1.rack),i$1.shelf&&(e.shelf=i$1.shelf),i$1.bin&&(e.bin=i$1.bin),i$1.capacity!==void 0&&(e.capacity=i$1.capacity);let t=await b$1(Z,{input:e});k$1(`Location created: ${t.createWarehouseLocation.locationCode}`),i(i$1,t.createWarehouseLocation);}catch(e){h$1(e);}}),r$1.command("update-location").description("Update a warehouse location").argument("<id>","Location ID").option("--code <s>","Location code").option("--location-type <s>","Location type").option("--status <s>","Status").option("--zone <s>","Zone").option("--aisle <s>","Aisle").option("--rack <s>","Rack").option("--shelf <s>","Shelf").option("--bin <s>","Bin").option("--capacity <n>","Capacity",l).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.code&&(t.locationCode=e.code),e.locationType!==void 0&&(t.locationType=e.locationType),e.status&&(t.status=e.status),e.zone!==void 0&&(t.zone=e.zone),e.aisle!==void 0&&(t.aisle=e.aisle),e.rack!==void 0&&(t.rack=e.rack),e.shelf!==void 0&&(t.shelf=e.shelf),e.bin!==void 0&&(t.bin=e.bin),e.capacity!==void 0&&(t.capacity=e.capacity),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(Q,{id:i$1,input:t});k$1("Location updated"),i(e,n.updateWarehouseLocation);}catch(t){h$1(t);}});}function ot(m){let r={};return m.product&&(r.productId=m.product),m.warehouse&&(r.warehouseId=m.warehouse),m.location&&(r.locationId=m.location),m.query&&(r.search=m.query),Object.keys(r).length?r:void 0}function st(m){let r$1=m.command("inventory").description("Movethewheels inventory");r$1.command("list").description("List inventory items").option("--product <id>","Filter by product ID").option("--warehouse <id>","Filter by warehouse ID").option("--location <id>","Filter by location ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(ee,{filter:ot(i$1),pagination:h(i$1)});i(i$1,e.inventoryItems,{headers:["ID","Product","Warehouse","OnHand","Available","Allocated"],rows:e.inventoryItems.map(t=>[r(t.id,12),r(t.productId,12),r(t.warehouseId,12),String(t.onHand),String(t.available),String(t.allocated)])});}catch(e){h$1(e);}}),r$1.command("get").description("Get an inventory item by id").argument("<id>","Inventory item ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(X,{id:i$1});if(!t.inventoryItem)throw new o(`Inventory item ${i$1} not found`);i(e,t.inventoryItem);}catch(t){h$1(t);}}),r$1.command("stats").description("Inventory stats (on-hand, available, allocated, damaged, low-stock)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(ie);i(i$1,e.inventoryStats);}catch(e){h$1(e);}}),r$1.command("create").description("Create an inventory item").requiredOption("--product <id>","Product ID").requiredOption("--warehouse <id>","Warehouse ID").option("--location <id>","Location ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("--reorder-point <n>","Reorder point",c).option("--safety-stock <n>","Safety stock",c).option("--unit-cost <n>","Unit cost",l).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={productId:i$1.product,warehouseId:i$1.warehouse};i$1.location&&(e.locationId=i$1.location),i$1.onHand!==void 0&&(e.onHand=i$1.onHand),i$1.available!==void 0&&(e.available=i$1.available),i$1.allocated!==void 0&&(e.allocated=i$1.allocated),i$1.damaged!==void 0&&(e.damaged=i$1.damaged),i$1.reorderPoint!==void 0&&(e.reorderPoint=i$1.reorderPoint),i$1.safetyStock!==void 0&&(e.safetyStock=i$1.safetyStock),i$1.unitCost!==void 0&&(e.unitCost=i$1.unitCost);let t=await b$1(ne,{input:e});k$1("Inventory item created"),i(i$1,t.createInventoryItem);}catch(e){h$1(e);}}),r$1.command("update").description("Update an inventory item").argument("<id>","Inventory item ID").option("--location <id>","Location ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("--reorder-point <n>","Reorder point",c).option("--safety-stock <n>","Safety stock",c).option("--unit-cost <n>","Unit cost",l).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.location!==void 0&&(t.locationId=e.location),e.onHand!==void 0&&(t.onHand=e.onHand),e.available!==void 0&&(t.available=e.available),e.allocated!==void 0&&(t.allocated=e.allocated),e.damaged!==void 0&&(t.damaged=e.damaged),e.reorderPoint!==void 0&&(t.reorderPoint=e.reorderPoint),e.safetyStock!==void 0&&(t.safetyStock=e.safetyStock),e.unitCost!==void 0&&(t.unitCost=e.unitCost),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(re,{id:i$1,input:t});k$1("Inventory item updated"),i(e,n.updateInventoryItem);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete an inventory item").argument("<id>","Inventory item ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(ae,{id:i$1});k$1(`Inventory item ${i$1} deleted`),i(e,{deleted:t.deleteInventoryItem});}catch(t){h$1(t);}}),r$1.command("adjust").description("Adjust inventory stock levels").argument("<id>","Inventory item ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={id:i$1};if(e.onHand!==void 0&&(t.onHand=e.onHand),e.available!==void 0&&(t.available=e.available),e.allocated!==void 0&&(t.allocated=e.allocated),e.damaged!==void 0&&(t.damaged=e.damaged),Object.keys(t).length===1)throw new o("No stock adjustments specified");let n=await b$1(oe,{input:t});k$1("Inventory stock adjusted"),i(e,n.adjustInventoryStock);}catch(t){h$1(t);}}),r$1.command("transactions").description("List inventory transactions").option("--product <id>","Filter by product ID").option("--warehouse <id>","Filter by warehouse ID").option("--location <id>","Filter by location ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(te,{filter:ot(i$1),pagination:h(i$1)});i(i$1,e.inventoryTransactions,{headers:["ID","Number","Type","Product","Warehouse","Qty"],rows:e.inventoryTransactions.map(t=>[r(t.id,12),t.transactionNumber,t.type,r(t.productId,12),r(t.warehouseId,12),String(t.quantity)])});}catch(e){h$1(e);}}),r$1.command("record-transaction").description("Record an inventory transaction").requiredOption("--number <s>","Transaction number").requiredOption("--type <t>","Transaction type (RECEIPT|ISSUE|TRANSFER|ADJUSTMENT|RETURN)").requiredOption("--product <id>","Product ID").requiredOption("--warehouse <id>","Warehouse ID").requiredOption("--quantity <n>","Quantity",c).option("--inventory-item <id>","Inventory item ID").option("--unit-cost <n>","Unit cost",l).option("--reference-type <s>","Reference type").option("--reference-id <s>","Reference ID").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={transactionNumber:i$1.number,type:i$1.type.toUpperCase(),productId:i$1.product,warehouseId:i$1.warehouse,quantity:i$1.quantity};i$1.inventoryItem&&(e.inventoryItemId=i$1.inventoryItem),i$1.unitCost!==void 0&&(e.unitCost=i$1.unitCost),i$1.referenceType&&(e.referenceType=i$1.referenceType),i$1.referenceId&&(e.referenceId=i$1.referenceId),i$1.notes&&(e.notes=i$1.notes);let t=await b$1(se,{input:e});k$1(`Transaction recorded: ${t.createInventoryTransaction.transactionNumber}`),i(i$1,t.createInventoryTransaction);}catch(e){h$1(e);}});}function dt(m){let r$1=m.command("orders").description("Movethewheels delivery orders");r$1.command("list").description("List orders").option("--customer <id>","Filter by customer ID").option("--driver <id>","Filter by driver ID").option("--vehicle <id>","Filter by vehicle ID").option("--status <s>","Filter by order status").option("--order-type <t>","Filter by order type").option("--priority <p>","Filter by priority").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.customer&&(e.customerId=i$1.customer),i$1.driver&&(e.driverId=i$1.driver),i$1.vehicle&&(e.vehicleId=i$1.vehicle),i$1.status&&(e.status=i$1.status.toUpperCase()),i$1.orderType&&(e.orderType=i$1.orderType.toUpperCase()),i$1.priority&&(e.priority=i$1.priority.toUpperCase()),i$1.query&&(e.search=i$1.query);let t=await b$1(ce,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.movethewheelsOrders,{headers:["ID","Order #","Type","Status","Priority","Tracking"],rows:t.movethewheelsOrders.map(n=>[r(n.id,12),n.orderNumber,n.orderType,n.status,n.priority,n.trackingNumber??"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get an order by id").argument("<id>","Order ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(de,{id:i$1});if(!t.movethewheelsOrder)throw new o(`Order ${i$1} not found`);i(e,t.movethewheelsOrder);}catch(t){h$1(t);}}),r$1.command("create").description("Create an order").requiredOption("--customer <id>","Customer ID").requiredOption("--order-number <s>","Order number").requiredOption("--pickup-address <json>","Pickup address JSON").requiredOption("--delivery-address <json>","Delivery address JSON").requiredOption("--items <json>","Items JSON").option("--order-type <t>","Order type","B2C").option("--priority <p>","Priority","MEDIUM").option("--status <s>","Status","PENDING").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--tracking-number <s>","Tracking number").option("--scheduled-delivery <s>","Scheduled delivery (ISO date)").option("--special-instructions <s>","Special instructions").option("--pricing <json>","Pricing JSON").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={customerId:i$1.customer,orderNumber:i$1.orderNumber,pickupAddress:u("pickup-address",i$1.pickupAddress),deliveryAddress:u("delivery-address",i$1.deliveryAddress),items:u("items",i$1.items),orderType:(i$1.orderType??"B2C").toUpperCase(),priority:(i$1.priority??"MEDIUM").toUpperCase(),status:(i$1.status??"PENDING").toUpperCase()};i$1.driver&&(e.driverId=i$1.driver),i$1.vehicle&&(e.vehicleId=i$1.vehicle),i$1.trackingNumber&&(e.trackingNumber=i$1.trackingNumber),i$1.scheduledDelivery&&(e.scheduledDelivery=i$1.scheduledDelivery),i$1.specialInstructions&&(e.specialInstructions=i$1.specialInstructions),i$1.pricing&&(e.pricing=u("pricing",i$1.pricing));let t=await b$1(pe,{input:e});k$1(`Order created: ${t.createMovethewheelsOrder.orderNumber}`),i(i$1,t.createMovethewheelsOrder);}catch(e){h$1(e);}}),r$1.command("update").description("Update an order").argument("<id>","Order ID").option("--customer <id>","Customer ID").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--order-type <t>","Order type").option("--priority <p>","Priority").option("--status <s>","Status").option("--tracking-number <s>","Tracking number").option("--scheduled-delivery <s>","Scheduled delivery (ISO date)").option("--special-instructions <s>","Special instructions").option("--delivery-address <json>","Delivery address JSON").option("--pickup-address <json>","Pickup address JSON").option("--items <json>","Items JSON").option("--pricing <json>","Pricing JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.customer&&(t.customerId=e.customer),e.driver!==void 0&&(t.driverId=e.driver),e.vehicle!==void 0&&(t.vehicleId=e.vehicle),e.orderType&&(t.orderType=e.orderType.toUpperCase()),e.priority&&(t.priority=e.priority.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.trackingNumber!==void 0&&(t.trackingNumber=e.trackingNumber),e.scheduledDelivery&&(t.scheduledDelivery=e.scheduledDelivery),e.specialInstructions!==void 0&&(t.specialInstructions=e.specialInstructions),e.deliveryAddress&&(t.deliveryAddress=u("delivery-address",e.deliveryAddress)),e.pickupAddress&&(t.pickupAddress=u("pickup-address",e.pickupAddress)),e.items&&(t.items=u("items",e.items)),e.pricing&&(t.pricing=u("pricing",e.pricing)),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(ue,{id:i$1,input:t});k$1("Order updated"),i(e,n.updateMovethewheelsOrder);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete an order").argument("<id>","Order ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(me,{id:i$1});k$1(`Order ${i$1} deleted`),i(e,{deleted:t.deleteMovethewheelsOrder});}catch(t){h$1(t);}}),r$1.command("set-status").description("Update an order status").argument("<id>","Order ID").requiredOption("--status <s>","PENDING|CONFIRMED|ASSIGNED|PICKED_UP|IN_TRANSIT|OUT_FOR_DELIVERY|DELIVERED|FAILED|RETURNED|CANCELLED").option("--notes <s>","Status notes").option("--location <json>","Location JSON").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={status:e.status.toUpperCase()};e.notes&&(t.notes=e.notes),e.location&&(t.location=u("location",e.location));let n=await b$1(le,{id:i$1,input:t});k$1(`Order status set to ${n.updateMovethewheelsOrderStatus.status}`),i(e,n.updateMovethewheelsOrderStatus);}catch(t){h$1(t);}}),r$1.command("stats").description("Order stats (total, pending, in-transit, delivered, \u2026)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(fe);i(i$1,e.orderStats);}catch(e){h$1(e);}});}function ct(m){let r$1=m.command("shipments").description("Movethewheels shipments & tracking");r$1.command("list").description("List shipments").option("--order <id>","Filter by order ID").option("--customer <id>","Filter by customer ID").option("--carrier <id>","Filter by carrier ID").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.order&&(e.orderId=i$1.order),i$1.customer&&(e.customerId=i$1.customer),i$1.carrier&&(e.carrierId=i$1.carrier),i$1.status&&(e.status=i$1.status.toUpperCase()),i$1.query&&(e.search=i$1.query);let t=await b$1(he,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.shipments,{headers:["ID","Shipment #","Order","Status","Tracking"],rows:t.shipments.map(n=>[r(n.id,12),n.shipmentNumber,r(n.orderId,12),n.status,n.trackingNumber??"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a shipment by id (includes tracking events)").argument("<id>","Shipment ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(ge,{id:i$1});if(!t.shipment)throw new o(`Shipment ${i$1} not found`);i(e,t.shipment);}catch(t){h$1(t);}}),r$1.command("active").description("List active deliveries (in-transit shipments)").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(ye,{pagination:h(i$1)});i(i$1,e.activeDeliveries,{headers:["ID","Shipment #","Order","Status","Tracking"],rows:e.activeDeliveries.map(t=>[r(t.id,12),t.shipmentNumber,r(t.orderId,12),t.status,t.trackingNumber??"-"])});}catch(e){h$1(e);}}),r$1.command("create").description("Create a shipment").requiredOption("--shipment-number <s>","Shipment number").requiredOption("--order <id>","Order ID").requiredOption("--origin <json>","Origin JSON").requiredOption("--destination <json>","Destination JSON").option("--status <s>","Status","PLANNED").option("--customer <id>","Customer ID").option("--carrier <id>","Carrier ID").option("--tracking-number <s>","Tracking number").option("--cargo-details <json>","Cargo details JSON").option("--estimated-delivery <s>","Estimated delivery (ISO date)").option("--actual-delivery <s>","Actual delivery (ISO date)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={shipmentNumber:i$1.shipmentNumber,orderId:i$1.order,origin:u("origin",i$1.origin),destination:u("destination",i$1.destination),status:(i$1.status??"PLANNED").toUpperCase()};i$1.customer&&(e.customerId=i$1.customer),i$1.carrier&&(e.carrierId=i$1.carrier),i$1.trackingNumber&&(e.trackingNumber=i$1.trackingNumber),i$1.cargoDetails&&(e.cargoDetails=u("cargo-details",i$1.cargoDetails)),i$1.estimatedDelivery&&(e.estimatedDelivery=i$1.estimatedDelivery),i$1.actualDelivery&&(e.actualDelivery=i$1.actualDelivery);let t=await b$1(Ee,{input:e});k$1(`Shipment created: ${t.createShipment.shipmentNumber}`),i(i$1,t.createShipment);}catch(e){h$1(e);}}),r$1.command("update").description("Update a shipment").argument("<id>","Shipment ID").option("--status <s>","Status").option("--customer <id>","Customer ID").option("--carrier <id>","Carrier ID").option("--tracking-number <s>","Tracking number").option("--origin <json>","Origin JSON").option("--destination <json>","Destination JSON").option("--cargo-details <json>","Cargo details JSON").option("--estimated-delivery <s>","Estimated delivery (ISO date)").option("--actual-delivery <s>","Actual delivery (ISO date)").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.status&&(t.status=e.status.toUpperCase()),e.customer!==void 0&&(t.customerId=e.customer),e.carrier!==void 0&&(t.carrierId=e.carrier),e.trackingNumber!==void 0&&(t.trackingNumber=e.trackingNumber),e.origin&&(t.origin=u("origin",e.origin)),e.destination&&(t.destination=u("destination",e.destination)),e.cargoDetails&&(t.cargoDetails=u("cargo-details",e.cargoDetails)),e.estimatedDelivery&&(t.estimatedDelivery=e.estimatedDelivery),e.actualDelivery&&(t.actualDelivery=e.actualDelivery),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(De,{id:i$1,input:t});k$1("Shipment updated"),i(e,n.updateShipment);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a shipment").argument("<id>","Shipment ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(Oe,{id:i$1});k$1(`Shipment ${i$1} deleted`),i(e,{deleted:t.deleteShipment});}catch(t){h$1(t);}}),r$1.command("add-event").description("Add a tracking event to a shipment").requiredOption("--shipment <id>","Shipment ID").requiredOption("--event-type <t>","CREATED|PICKED_UP|IN_TRANSIT|ARRIVED|DEPARTED|OUT_FOR_DELIVERY|DELIVERED|FAILED|RETURNED").option("--details <s>","Event details").option("--location <json>","Location JSON").option("--timestamp <s>","Timestamp (ISO date)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e={shipmentId:i$1.shipment,eventType:i$1.eventType.toUpperCase()};i$1.details&&(e.details=i$1.details),i$1.location&&(e.location=u("location",i$1.location)),i$1.timestamp&&(e.timestamp=i$1.timestamp);let t=await b$1(Re,{input:e});k$1(`Tracking event added: ${t.addTrackingEvent.eventType}`),i(i$1,t.addTrackingEvent);}catch(e){h$1(e);}}),r$1.command("tracking").description("List tracking events for a shipment").argument("<shipmentId>","Shipment ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(ve,{shipmentId:i$1,pagination:h(e)});i(e,t.shipmentTracking,{headers:["ID","Event","Details","Timestamp"],rows:t.shipmentTracking.map(n=>[r(n.id,12),n.eventType,r(n.details??"-",30),n.timestamp])});}catch(t){h$1(t);}}),r$1.command("order-tracking").description("List tracking events for an order").argument("<orderId>","Order ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(Ie,{orderId:i$1,pagination:h(e)});i(e,t.orderTracking,{headers:["ID","Event","Details","Timestamp"],rows:t.orderTracking.map(n=>[r(n.id,12),n.eventType,r(n.details??"-",30),n.timestamp])});}catch(t){h$1(t);}}),r$1.command("alerts").description("List tracking alerts (delayed / at-risk shipments)").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(we,{pagination:h(i$1)});i(i$1,e.trackingAlerts,{headers:["Type","Shipment #","Message"],rows:e.trackingAlerts.map(t=>[t.alertType,t.shipmentNumber,r(t.message,40)])});}catch(e){h$1(e);}});}function pt(m){let r$1=m.command("routes").description("Movethewheels delivery routes");r$1.command("list").description("List routes").option("--driver <id>","Filter by driver ID").option("--vehicle <id>","Filter by vehicle ID").option("--shipment <id>","Filter by shipment ID").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={};i$1.driver&&(e.driverId=i$1.driver),i$1.vehicle&&(e.vehicleId=i$1.vehicle),i$1.shipment&&(e.shipmentId=i$1.shipment),i$1.status&&(e.status=i$1.status.toUpperCase()),i$1.query&&(e.search=i$1.query);let t=await b$1(Te,{filter:Object.keys(e).length?e:void 0,pagination:h(i$1)});i(i$1,t.routes,{headers:["ID","Name","Status","Driver","Vehicle","Distance"],rows:t.routes.map(n=>[r(n.id,12),n.name,n.status,n.driverId?r(n.driverId,12):"-",n.vehicleId?r(n.vehicleId,12):"-",n.estimatedDistance!=null?String(n.estimatedDistance):"-"])});}catch(e){h$1(e);}}),r$1.command("get").description("Get a route by id").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(be,{id:i$1});if(!t.route)throw new o(`Route ${i$1} not found`);i(e,t.route);}catch(t){h$1(t);}}),r$1.command("create").description("Create a route").requiredOption("--name <name>","Route name").requiredOption("--waypoints <json>","Waypoints JSON").option("--status <s>","Status","PLANNED").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--shipment <id>","Shipment ID").option("--estimated-distance <n>","Estimated distance",l).option("--estimated-duration <n>","Estimated duration",l).option("--actual-distance <n>","Actual distance",l).option("--actual-duration <n>","Actual duration",l).option("--fuel-cost <n>","Fuel cost",l).option("-f, --format <format>","Output format").action(async i$1=>{try{let e={name:i$1.name,waypoints:u("waypoints",i$1.waypoints),status:(i$1.status??"PLANNED").toUpperCase()};i$1.driver&&(e.driverId=i$1.driver),i$1.vehicle&&(e.vehicleId=i$1.vehicle),i$1.shipment&&(e.shipmentId=i$1.shipment),i$1.estimatedDistance!==void 0&&(e.estimatedDistance=i$1.estimatedDistance),i$1.estimatedDuration!==void 0&&(e.estimatedDuration=i$1.estimatedDuration),i$1.actualDistance!==void 0&&(e.actualDistance=i$1.actualDistance),i$1.actualDuration!==void 0&&(e.actualDuration=i$1.actualDuration),i$1.fuelCost!==void 0&&(e.fuelCost=i$1.fuelCost);let t=await b$1(Ce,{input:e});k$1(`Route created: ${t.createRoute.name}`),i(i$1,t.createRoute);}catch(e){h$1(e);}}),r$1.command("update").description("Update a route").argument("<id>","Route ID").option("--name <name>","Route name").option("--status <s>","Status").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--shipment <id>","Shipment ID").option("--waypoints <json>","Waypoints JSON").option("--estimated-distance <n>","Estimated distance",l).option("--estimated-duration <n>","Estimated duration",l).option("--actual-distance <n>","Actual distance",l).option("--actual-duration <n>","Actual duration",l).option("--fuel-cost <n>","Fuel cost",l).option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t={};if(e.name&&(t.name=e.name),e.status&&(t.status=e.status.toUpperCase()),e.driver!==void 0&&(t.driverId=e.driver),e.vehicle!==void 0&&(t.vehicleId=e.vehicle),e.shipment!==void 0&&(t.shipmentId=e.shipment),e.waypoints&&(t.waypoints=u("waypoints",e.waypoints)),e.estimatedDistance!==void 0&&(t.estimatedDistance=e.estimatedDistance),e.estimatedDuration!==void 0&&(t.estimatedDuration=e.estimatedDuration),e.actualDistance!==void 0&&(t.actualDistance=e.actualDistance),e.actualDuration!==void 0&&(t.actualDuration=e.actualDuration),e.fuelCost!==void 0&&(t.fuelCost=e.fuelCost),!Object.keys(t).length)throw new o("No updates specified");let n=await b$1(Se,{id:i$1,input:t});k$1("Route updated"),i(e,n.updateRoute);}catch(t){h$1(t);}}),r$1.command("remove").description("Delete a route").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(Ae,{id:i$1});k$1(`Route ${i$1} deleted`),i(e,{deleted:t.deleteRoute});}catch(t){h$1(t);}}),r$1.command("optimize").description("Optimize a route").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(i$1,e)=>{try{let t=await b$1(Ne,{id:i$1});k$1("Route optimized"),i(e,t.optimizeRoute);}catch(t){h$1(t);}});}function ut(m){let r$1=m.command("marketplace").description("Movethewheels logistics marketplace (providers & offerings)"),i$1=r$1.command("providers").description("Service providers");i$1.command("list").description("List service providers").option("--type <t>","Filter by provider type").option("--active <bool>","Filter by active state (true|false)",t=>t==="true").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n={};t.type&&(n.type=t.type),t.active!==void 0&&(n.isActive=t.active),t.query&&(n.search=t.query);let d=await b$1($e,{filter:Object.keys(n).length?n:void 0,pagination:h(t)});i(t,d.serviceProviders,{headers:["ID","Name","Type","Active","Verified","Rating"],rows:d.serviceProviders.map(y=>[r(y.id,12),y.name,y.type,y.isActive?"yes":"no",y.isVerified?"yes":"no",y.rating!=null?String(y.rating):"-"])});}catch(n){h$1(n);}}),i$1.command("get").description("Get a service provider by id (includes offerings)").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d=await b$1(ke,{id:t});if(!d.serviceProvider)throw new o(`Provider ${t} not found`);i(n,d.serviceProvider);}catch(d){h$1(d);}}),i$1.command("create").description("Create a service provider").requiredOption("--name <name>","Provider name").requiredOption("--type <t>","Provider type").option("--description <s>","Description").option("--rating <n>","Rating",l).option("--active <bool>","Active (true|false)",t=>t==="true",true).option("--verified <bool>","Verified (true|false)",t=>t==="true",false).option("--contact-info <json>","Contact info JSON").option("--services <json>","Services JSON").option("-f, --format <format>","Output format").action(async t=>{try{let n={name:t.name,type:t.type,isActive:t.active??!0,isVerified:t.verified??!1};t.description&&(n.description=t.description),t.rating!==void 0&&(n.rating=t.rating),t.contactInfo&&(n.contactInfo=u("contact-info",t.contactInfo)),t.services&&(n.services=u("services",t.services));let d=await b$1(Pe,{input:n});k$1(`Provider created: ${d.createServiceProvider.name}`),i(t,d.createServiceProvider);}catch(n){h$1(n);}}),i$1.command("update").description("Update a service provider").argument("<id>","Provider ID").option("--name <name>","Provider name").option("--type <t>","Provider type").option("--description <s>","Description").option("--rating <n>","Rating",l).option("--active <bool>","Active (true|false)",t=>t==="true").option("--verified <bool>","Verified (true|false)",t=>t==="true").option("--contact-info <json>","Contact info JSON").option("--services <json>","Services JSON").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d={};if(n.name&&(d.name=n.name),n.type&&(d.type=n.type),n.description!==void 0&&(d.description=n.description),n.rating!==void 0&&(d.rating=n.rating),n.active!==void 0&&(d.isActive=n.active),n.verified!==void 0&&(d.isVerified=n.verified),n.contactInfo&&(d.contactInfo=u("contact-info",n.contactInfo)),n.services&&(d.services=u("services",n.services)),!Object.keys(d).length)throw new o("No updates specified");let y=await b$1(_e,{id:t,input:d});k$1("Provider updated"),i(n,y.updateServiceProvider);}catch(d){h$1(d);}}),i$1.command("remove").description("Delete a service provider").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d=await b$1(Me,{id:t});k$1(`Provider ${t} deleted`),i(n,{deleted:d.deleteServiceProvider});}catch(d){h$1(d);}});let e=r$1.command("offerings").description("Service offerings");e.command("list").description("List service offerings").option("--provider <id>","Filter by provider ID").option("--category <c>","Filter by category").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let n={};t.provider&&(n.providerId=t.provider),t.category&&(n.category=t.category),t.query&&(n.search=t.query);let d=await b$1(Le,{filter:Object.keys(n).length?n:void 0,pagination:h(t)});i(t,d.serviceOfferings,{headers:["ID","Name","Provider","Category","Price","Currency"],rows:d.serviceOfferings.map(y=>[r(y.id,12),y.name,r(y.providerId,12),y.category??"-",String(y.price),y.currency])});}catch(n){h$1(n);}}),e.command("get").description("Get a service offering by id").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d=await b$1(Ue,{id:t});if(!d.serviceOffering)throw new o(`Offering ${t} not found`);i(n,d.serviceOffering);}catch(d){h$1(d);}}),e.command("create").description("Create a service offering").requiredOption("--provider <id>","Provider ID").requiredOption("--name <name>","Offering name").requiredOption("--price <n>","Price",l).option("--description <s>","Description").option("--category <c>","Category").option("--currency <c>","Currency","USD").option("--availability <json>","Availability JSON").option("-f, --format <format>","Output format").action(async t=>{try{let n={providerId:t.provider,name:t.name,price:t.price,currency:t.currency??"USD"};t.description&&(n.description=t.description),t.category&&(n.category=t.category),t.availability&&(n.availability=u("availability",t.availability));let d=await b$1(Ve,{input:n});k$1(`Offering created: ${d.createServiceOffering.name}`),i(t,d.createServiceOffering);}catch(n){h$1(n);}}),e.command("update").description("Update a service offering").argument("<id>","Offering ID").option("--name <name>","Offering name").option("--description <s>","Description").option("--category <c>","Category").option("--price <n>","Price",l).option("--currency <c>","Currency").option("--availability <json>","Availability JSON").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d={};if(n.name&&(d.name=n.name),n.description!==void 0&&(d.description=n.description),n.category!==void 0&&(d.category=n.category),n.price!==void 0&&(d.price=n.price),n.currency&&(d.currency=n.currency),n.availability&&(d.availability=u("availability",n.availability)),!Object.keys(d).length)throw new o("No updates specified");let y=await b$1(xe,{id:t,input:d});k$1("Offering updated"),i(n,y.updateServiceOffering);}catch(d){h$1(d);}}),e.command("remove").description("Delete a service offering").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(t,n)=>{try{let d=await b$1(qe,{id:t});k$1(`Offering ${t} deleted`),i(n,{deleted:d.deleteServiceOffering});}catch(d){h$1(d);}});}function mt(m){let r$1=m.command("reports").description("Movethewheels reports & data import/export");r$1.command("list").description("List reports").option("--type <t>","Filter by report type").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.type&&(t.type=e.type),e.status&&(t.status=e.status),e.query&&(t.search=e.query);let n=await b$1(je,{filter:Object.keys(t).length?t:void 0,pagination:h(e)});i(e,n.movethewheelsReports,{headers:["ID","Name","Type","Status","Schedule","Last Generated"],rows:n.movethewheelsReports.map(d=>[r(d.id,12),d.name,d.type,d.status,d.schedule??"-",d.lastGenerated??"-"])});}catch(t){h$1(t);}}),r$1.command("get").description("Get a report by id").argument("<id>","Report ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await b$1(Fe,{id:e});if(!n.movethewheelsReport)throw new o(`Report ${e} not found`);i(t,n.movethewheelsReport);}catch(n){h$1(n);}}),r$1.command("create").description("Create a report").requiredOption("--name <name>","Report name").requiredOption("--type <t>","Report type").option("--description <s>","Description").option("--status <s>","Status","DRAFT").option("--schedule <s>","Schedule (cron-like)").option("--configuration <json>","Configuration JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,type:e.type,status:e.status??"DRAFT"};e.description&&(t.description=e.description),e.schedule&&(t.schedule=e.schedule),e.configuration&&(t.configuration=u("configuration",e.configuration));let n=await b$1(We,{input:t});k$1(`Report created: ${n.createMovethewheelsReport.name}`),i(e,n.createMovethewheelsReport);}catch(t){h$1(t);}}),r$1.command("update").description("Update a report").argument("<id>","Report ID").option("--name <name>","Report name").option("--type <t>","Report type").option("--description <s>","Description").option("--status <s>","Status").option("--schedule <s>","Schedule (cron-like)").option("--configuration <json>","Configuration JSON").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.type&&(n.type=t.type),t.description!==void 0&&(n.description=t.description),t.status&&(n.status=t.status),t.schedule!==void 0&&(n.schedule=t.schedule),t.configuration&&(n.configuration=u("configuration",t.configuration)),!Object.keys(n).length)throw new o("No updates specified");let d=await b$1(Ge,{id:e,input:n});k$1("Report updated"),i(t,d.updateMovethewheelsReport);}catch(n){h$1(n);}}),r$1.command("remove").description("Delete a report").argument("<id>","Report ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await b$1(He,{id:e});k$1(`Report ${e} deleted`),i(t,{deleted:n.deleteMovethewheelsReport});}catch(n){h$1(n);}}),r$1.command("generate").description("Generate a report run").argument("<id>","Report ID").option("--parameters <json>","Parameters JSON").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={reportId:e};t.parameters&&(n.parameters=u("parameters",t.parameters));let d=await b$1(Je,{input:n});k$1("Report generated"),i(t,d.generateMovethewheelsReport);}catch(n){h$1(n);}}),r$1.command("export").description("Export resource data").requiredOption("--resource <r>","Resource to export").option("--export-format <f>","Export format","json").option("-f, --format <format>","Output format").action(async e=>{try{let t={resource:e.resource,format:e.exportFormat??"json"},n=await b$1(ze,{input:t});k$1("Data exported"),i(e,n.exportData);}catch(t){h$1(t);}}),r$1.command("import").description("Import resource data").requiredOption("--resource <r>","Resource to import").requiredOption("--payload <json>","Payload JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={resource:e.resource,payload:u("payload",e.payload)},n=await b$1(Ye,{input:t});k$1("Data imported"),i(e,n.importData);}catch(t){h$1(t);}});let i$1=m.command("settings").description("Movethewheels module settings");i$1.command("get").description("Get module settings").option("-f, --format <format>","Output format").action(async e=>{try{let t=await b$1(Be);i(e,t.moduleSettings);}catch(t){h$1(t);}}),i$1.command("update").description("Update module settings preferences").requiredOption("--preferences <json>","Preferences JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={preferences:u("preferences",e.preferences)},n=await b$1(Ke,{input:t});k$1("Module settings updated"),i(e,n.updateModuleSettings);}catch(t){h$1(t);}});}function lt(m){let r=m.command("analytics").description("Movethewheels analytics & dashboards");r.command("dashboard").description("Dashboard metrics (orders, deliveries, revenue, fleet, low stock)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(Qe);i(i$1,e.dashboardMetrics);}catch(e){h$1(e);}}),r.command("trends").description("Analytics time series (order, revenue, delivery trends)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(Ze);i(i$1,e.analytics);}catch(e){h$1(e);}}),r.command("finance").description("Finance metrics (revenue, fuel cost, open invoices)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(Xe);i(i$1,e.financeMetrics);}catch(e){h$1(e);}}),r.command("fleet").description("Fleet stats (vehicles & drivers by status)").option("-f, --format <format>","Output format").action(async i$1=>{try{let e=await b$1(et);i(i$1,e.fleetStats);}catch(e){h$1(e);}});}var ft={id:"movethewheels",version:"1.0.0",displayName:"Movethewheels",dependsOn:["auth","workspaces"],register(m,r){a(r);let i=m.command("movethewheels").description("Movethewheels logistics & fleet operations");tt(i),it(i),nt(i),rt(i),at(i),st(i),dt(i),ct(i),pt(i),ut(i),mt(i),lt(i);}},yi=ft;export{yi as default};
431
+ `;function l(u,r){try{return JSON.parse(r)}catch{throw new o(`--${u} must be valid JSON`)}}function c(u){let r=Number.parseInt(u,10);if(Number.isNaN(r))throw new o(`Expected an integer but got "${u}"`);return r}function m(u){let r=Number.parseFloat(u);if(Number.isNaN(r))throw new o(`Expected a number but got "${u}"`);return r}function y(u){let r={};return u.limit!==void 0&&(r.limit=u.limit),u.offset!==void 0&&(r.offset=u.offset),Object.keys(r).length?r:void 0}function _e(u){let r$1=u.command("customers").description("Movethewheels customers");r$1.command("list").description("List customers").option("--type <t>","Filter by customer type (b2c/b2b)").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.type&&(e.type=t.type),t.query&&(e.search=t.query);let i$1=await b$1(C,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.customers,{headers:["ID","Name","Type","Email","Phone","Rating"],rows:i$1.customers.map(n=>[r(n.id,12),n.name,n.type,n.email??"-",n.phone??"-",n.rating!=null?String(n.rating):"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get a customer by id").argument("<id>","Customer ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(D,{id:t});if(!i$1.customer)throw new o(`Customer ${t} not found`);i(e,i$1.customer);}catch(i){h(i);}}),r$1.command("create").description("Create a customer").requiredOption("--name <name>","Customer name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--company <company>","Company").option("--type <t>","Customer type","b2c").option("--tax-id <s>","Tax ID").option("--business-license <s>","Business license").option("--rating <n>","Rating",m).option("--address <json>","Address JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,type:t.type??"b2c"};t.email&&(e.email=t.email),t.phone&&(e.phone=t.phone),t.company&&(e.company=t.company),t.taxId&&(e.taxId=t.taxId),t.businessLicense&&(e.businessLicense=t.businessLicense),t.rating!==void 0&&(e.rating=t.rating),t.address&&(e.address=l("address",t.address));let i$1=await b$1(b,{input:e});k$1(`Customer created: ${i$1.createCustomer.name}`),i(t,i$1.createCustomer);}catch(e){h(e);}}),r$1.command("update").description("Update a customer").argument("<id>","Customer ID").option("--name <name>","Customer name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--company <company>","Company").option("--type <t>","Customer type").option("--tax-id <s>","Tax ID").option("--business-license <s>","Business license").option("--rating <n>","Rating",m).option("--address <json>","Address JSON").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.name&&(i$1.name=e.name),e.email!==void 0&&(i$1.email=e.email),e.phone!==void 0&&(i$1.phone=e.phone),e.company!==void 0&&(i$1.company=e.company),e.type&&(i$1.type=e.type),e.taxId!==void 0&&(i$1.taxId=e.taxId),e.businessLicense!==void 0&&(i$1.businessLicense=e.businessLicense),e.rating!==void 0&&(i$1.rating=e.rating),e.address&&(i$1.address=l("address",e.address)),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(O,{id:t,input:i$1});k$1("Customer updated"),i(e,n.updateCustomer);}catch(i){h(i);}}),r$1.command("remove").description("Delete a customer").argument("<id>","Customer ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(S,{id:t});k$1(`Customer ${t} deleted`),i(e,{deleted:i$1.deleteCustomer});}catch(i){h(i);}});}function Ue(u){let r$1=u.command("drivers").description("Movethewheels drivers");r$1.command("list").description("List drivers").option("--status <s>","Filter by driver status").option("--vehicle <id>","Filter by vehicle ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.status&&(e.status=t.status.toUpperCase()),t.vehicle&&(e.vehicleId=t.vehicle),t.query&&(e.search=t.query);let i$1=await b$1(T,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.drivers,{headers:["ID","Name","Employee","Status","Vehicle","Rating"],rows:i$1.drivers.map(n=>[r(n.id,12),`${n.firstName} ${n.lastName}`,n.employeeId,n.status,n.vehicleId?r(n.vehicleId,12):"-",n.rating!=null?String(n.rating):"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get a driver by id").argument("<id>","Driver ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(R,{id:t});if(!i$1.driver)throw new o(`Driver ${t} not found`);i(e,i$1.driver);}catch(i){h(i);}}),r$1.command("create").description("Create a driver").requiredOption("--employee-id <s>","Employee ID").requiredOption("--first-name <s>","First name").requiredOption("--last-name <s>","Last name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--status <s>","Driver status","AVAILABLE").option("--license-number <s>","License number").option("--license-class <s>","License class").option("--license-expiry <s>","License expiry (ISO date)").option("--vehicle-id <id>","Vehicle ID").option("--user-id <id>","User ID").option("--rating <n>","Rating",m).option("--certifications <json>","Certifications JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={employeeId:t.employeeId,firstName:t.firstName,lastName:t.lastName,status:(t.status??"AVAILABLE").toUpperCase()};t.email&&(e.email=t.email),t.phone&&(e.phone=t.phone),t.licenseNumber&&(e.licenseNumber=t.licenseNumber),t.licenseClass&&(e.licenseClass=t.licenseClass),t.licenseExpiry&&(e.licenseExpiry=t.licenseExpiry),t.vehicleId&&(e.vehicleId=t.vehicleId),t.userId&&(e.userId=t.userId),t.rating!==void 0&&(e.rating=t.rating),t.certifications&&(e.certifications=l("certifications",t.certifications)),t.currentLocation&&(e.currentLocation=l("current-location",t.currentLocation));let i$1=await b$1(A,{input:e});k$1(`Driver created: ${i$1.createDriver.firstName} ${i$1.createDriver.lastName}`),i(t,i$1.createDriver);}catch(e){h(e);}}),r$1.command("update").description("Update a driver").argument("<id>","Driver ID").option("--first-name <s>","First name").option("--last-name <s>","Last name").option("--email <email>","Email").option("--phone <phone>","Phone").option("--status <s>","Driver status").option("--license-number <s>","License number").option("--license-class <s>","License class").option("--license-expiry <s>","License expiry (ISO date)").option("--vehicle-id <id>","Vehicle ID").option("--rating <n>","Rating",m).option("--certifications <json>","Certifications JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.firstName&&(i$1.firstName=e.firstName),e.lastName&&(i$1.lastName=e.lastName),e.email!==void 0&&(i$1.email=e.email),e.phone!==void 0&&(i$1.phone=e.phone),e.status&&(i$1.status=e.status.toUpperCase()),e.licenseNumber!==void 0&&(i$1.licenseNumber=e.licenseNumber),e.licenseClass!==void 0&&(i$1.licenseClass=e.licenseClass),e.licenseExpiry&&(i$1.licenseExpiry=e.licenseExpiry),e.vehicleId!==void 0&&(i$1.vehicleId=e.vehicleId),e.rating!==void 0&&(i$1.rating=e.rating),e.certifications&&(i$1.certifications=l("certifications",e.certifications)),e.currentLocation&&(i$1.currentLocation=l("current-location",e.currentLocation)),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(N,{id:t,input:i$1});k$1("Driver updated"),i(e,n.updateDriver);}catch(i){h(i);}}),r$1.command("remove").description("Delete a driver").argument("<id>","Driver ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(k,{id:t});k$1(`Driver ${t} deleted`),i(e,{deleted:i$1.deleteDriver});}catch(i){h(i);}}),r$1.command("set-status").description("Update a driver status").argument("<id>","Driver ID").requiredOption("--status <s>","AVAILABLE|ON_DELIVERY|ON_BREAK|OFF_DUTY|INACTIVE").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1($,{id:t,status:e.status.toUpperCase()});k$1(`Driver status set to ${i$1.updateDriverStatus.status}`),i(e,i$1.updateDriverStatus);}catch(i){h(i);}}),r$1.command("assign-vehicle").description("Assign (or clear) a vehicle for a driver").argument("<id>","Driver ID").option("--vehicle <id>","Vehicle ID (omit to clear assignment)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(L,{id:t,vehicleId:e.vehicle});k$1(e.vehicle?`Vehicle ${e.vehicle} assigned`:"Vehicle assignment cleared"),i(e,i$1.assignDriverVehicle);}catch(i){h(i);}});}function Ve(u){let r$1=u.command("vehicles").description("Movethewheels fleet vehicles");r$1.command("list").description("List vehicles").option("--type <t>","Filter by vehicle type").option("--status <s>","Filter by vehicle status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.type&&(e.type=t.type.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.query&&(e.search=t.query);let i$1=await b$1(U,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.vehicles,{headers:["ID","Number","Type","Status","Make/Model","Plate"],rows:i$1.vehicles.map(n=>[r(n.id,12),n.vehicleNumber,n.type,n.status,`${n.make??"-"} ${n.model??""}`.trim(),n.licensePlate??"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get a vehicle by id").argument("<id>","Vehicle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(_,{id:t});if(!i$1.vehicle)throw new o(`Vehicle ${t} not found`);i(e,i$1.vehicle);}catch(i){h(i);}}),r$1.command("create").description("Create a vehicle").requiredOption("--number <s>","Vehicle number").requiredOption("--type <t>","Vehicle type (TRUCK|VAN|MOTORCYCLE|\u2026)").option("--status <s>","Vehicle status","ACTIVE").option("--make <s>","Make").option("--model <s>","Model").option("--year <n>","Year",c).option("--license-plate <s>","License plate").option("--fuel-level <n>","Fuel level",m).option("--mileage <n>","Mileage",m).option("--ownership-type <s>","Ownership type").option("--capacity <json>","Capacity JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={vehicleNumber:t.number,type:t.type.toUpperCase(),status:(t.status??"ACTIVE").toUpperCase()};t.make&&(e.make=t.make),t.model&&(e.model=t.model),t.year!==void 0&&(e.year=t.year),t.licensePlate&&(e.licensePlate=t.licensePlate),t.fuelLevel!==void 0&&(e.fuelLevel=t.fuelLevel),t.mileage!==void 0&&(e.mileage=t.mileage),t.ownershipType&&(e.ownershipType=t.ownershipType),t.capacity&&(e.capacity=l("capacity",t.capacity)),t.currentLocation&&(e.currentLocation=l("current-location",t.currentLocation));let i$1=await b$1(V,{input:e});k$1(`Vehicle created: ${i$1.createVehicle.vehicleNumber}`),i(t,i$1.createVehicle);}catch(e){h(e);}}),r$1.command("update").description("Update a vehicle").argument("<id>","Vehicle ID").option("--number <s>","Vehicle number").option("--type <t>","Vehicle type").option("--status <s>","Vehicle status").option("--make <s>","Make").option("--model <s>","Model").option("--year <n>","Year",c).option("--license-plate <s>","License plate").option("--fuel-level <n>","Fuel level",m).option("--mileage <n>","Mileage",m).option("--ownership-type <s>","Ownership type").option("--capacity <json>","Capacity JSON").option("--current-location <json>","Current location JSON").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.number&&(i$1.vehicleNumber=e.number),e.type&&(i$1.type=e.type.toUpperCase()),e.status&&(i$1.status=e.status.toUpperCase()),e.make!==void 0&&(i$1.make=e.make),e.model!==void 0&&(i$1.model=e.model),e.year!==void 0&&(i$1.year=e.year),e.licensePlate!==void 0&&(i$1.licensePlate=e.licensePlate),e.fuelLevel!==void 0&&(i$1.fuelLevel=e.fuelLevel),e.mileage!==void 0&&(i$1.mileage=e.mileage),e.ownershipType!==void 0&&(i$1.ownershipType=e.ownershipType),e.capacity&&(i$1.capacity=l("capacity",e.capacity)),e.currentLocation&&(i$1.currentLocation=l("current-location",e.currentLocation)),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(P,{id:t,input:i$1});k$1("Vehicle updated"),i(e,n.updateVehicle);}catch(i){h(i);}}),r$1.command("remove").description("Delete a vehicle").argument("<id>","Vehicle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(M,{id:t});k$1(`Vehicle ${t} deleted`),i(e,{deleted:i$1.deleteVehicle});}catch(i){h(i);}}),r$1.command("set-status").description("Update a vehicle status").argument("<id>","Vehicle ID").requiredOption("--status <s>","ACTIVE|INACTIVE|IN_TRANSIT|MAINTENANCE|DECOMMISSIONED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(x,{id:t,status:e.status.toUpperCase()});k$1(`Vehicle status set to ${i$1.updateVehicleStatus.status}`),i(e,i$1.updateVehicleStatus);}catch(i){h(i);}}),r$1.command("set-location").description("Update a vehicle current location").argument("<id>","Vehicle ID").requiredOption("--location <json>","Location JSON (latitude/longitude/\u2026)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=l("location",e.location),n=await b$1(q,{id:t,location:i$1});k$1("Vehicle location updated"),i(e,n.updateVehicleLocation);}catch(i){h(i);}});}function Pe(u){let r$1=u.command("warehouses").description("Movethewheels warehouses & locations");r$1.command("list").description("List warehouses").option("--type <t>","Filter by warehouse type").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.type&&(e.type=t.type.toUpperCase()),t.status&&(e.status=t.status),t.query&&(e.search=t.query);let i$1=await b$1(W,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.warehouses,{headers:["ID","Code","Name","Type","Status","Capacity"],rows:i$1.warehouses.map(n=>[r(n.id,12),n.code,n.name,n.type,n.status,`${n.usedCapacity??0}/${n.totalCapacity??0}`])});}catch(e){h(e);}}),r$1.command("get").description("Get a warehouse by id (includes locations)").argument("<id>","Warehouse ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(F,{id:t});if(!i$1.warehouse)throw new o(`Warehouse ${t} not found`);i(e,i$1.warehouse);}catch(i){h(i);}}),r$1.command("create").description("Create a warehouse").requiredOption("--code <code>","Warehouse code").requiredOption("--name <name>","Warehouse name").requiredOption("--type <t>","Warehouse type (DISTRIBUTION|FULFILLMENT|\u2026)").requiredOption("--address <json>","Address JSON").option("--status <s>","Status","ACTIVE").option("--contact-info <json>","Contact info JSON").option("--operating-hours <json>","Operating hours JSON").option("--capabilities <json>","Capabilities JSON").option("--total-capacity <n>","Total capacity",m).option("--used-capacity <n>","Used capacity",m).option("-f, --format <format>","Output format").action(async t=>{try{let e={code:t.code,name:t.name,type:t.type.toUpperCase(),address:l("address",t.address),status:t.status??"ACTIVE"};t.contactInfo&&(e.contactInfo=l("contact-info",t.contactInfo)),t.operatingHours&&(e.operatingHours=l("operating-hours",t.operatingHours)),t.capabilities&&(e.capabilities=l("capabilities",t.capabilities)),t.totalCapacity!==void 0&&(e.totalCapacity=t.totalCapacity),t.usedCapacity!==void 0&&(e.usedCapacity=t.usedCapacity);let i$1=await b$1(H,{input:e});k$1(`Warehouse created: ${i$1.createWarehouse.name}`),i(t,i$1.createWarehouse);}catch(e){h(e);}}),r$1.command("update").description("Update a warehouse").argument("<id>","Warehouse ID").option("--code <code>","Warehouse code").option("--name <name>","Warehouse name").option("--type <t>","Warehouse type").option("--status <s>","Status").option("--address <json>","Address JSON").option("--contact-info <json>","Contact info JSON").option("--operating-hours <json>","Operating hours JSON").option("--capabilities <json>","Capabilities JSON").option("--total-capacity <n>","Total capacity",m).option("--used-capacity <n>","Used capacity",m).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.code&&(i$1.code=e.code),e.name&&(i$1.name=e.name),e.type&&(i$1.type=e.type.toUpperCase()),e.status&&(i$1.status=e.status),e.address&&(i$1.address=l("address",e.address)),e.contactInfo&&(i$1.contactInfo=l("contact-info",e.contactInfo)),e.operatingHours&&(i$1.operatingHours=l("operating-hours",e.operatingHours)),e.capabilities&&(i$1.capabilities=l("capabilities",e.capabilities)),e.totalCapacity!==void 0&&(i$1.totalCapacity=e.totalCapacity),e.usedCapacity!==void 0&&(i$1.usedCapacity=e.usedCapacity),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(j,{id:t,input:i$1});k$1("Warehouse updated"),i(e,n.updateWarehouse);}catch(i){h(i);}}),r$1.command("remove").description("Delete a warehouse").argument("<id>","Warehouse ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(G,{id:t});k$1(`Warehouse ${t} deleted`),i(e,{deleted:i$1.deleteWarehouse});}catch(i){h(i);}}),r$1.command("create-location").description("Create a warehouse location").requiredOption("--warehouse <id>","Warehouse ID").requiredOption("--code <s>","Location code").option("--location-type <s>","Location type").option("--status <s>","Status","ACTIVE").option("--zone <s>","Zone").option("--aisle <s>","Aisle").option("--rack <s>","Rack").option("--shelf <s>","Shelf").option("--bin <s>","Bin").option("--capacity <n>","Capacity",m).option("-f, --format <format>","Output format").action(async t=>{try{let e={warehouseId:t.warehouse,locationCode:t.code,status:t.status??"ACTIVE"};t.locationType&&(e.locationType=t.locationType),t.zone&&(e.zone=t.zone),t.aisle&&(e.aisle=t.aisle),t.rack&&(e.rack=t.rack),t.shelf&&(e.shelf=t.shelf),t.bin&&(e.bin=t.bin),t.capacity!==void 0&&(e.capacity=t.capacity);let i$1=await b$1(J,{input:e});k$1(`Location created: ${i$1.createWarehouseLocation.locationCode}`),i(t,i$1.createWarehouseLocation);}catch(e){h(e);}}),r$1.command("update-location").description("Update a warehouse location").argument("<id>","Location ID").option("--code <s>","Location code").option("--location-type <s>","Location type").option("--status <s>","Status").option("--zone <s>","Zone").option("--aisle <s>","Aisle").option("--rack <s>","Rack").option("--shelf <s>","Shelf").option("--bin <s>","Bin").option("--capacity <n>","Capacity",m).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.code&&(i$1.locationCode=e.code),e.locationType!==void 0&&(i$1.locationType=e.locationType),e.status&&(i$1.status=e.status),e.zone!==void 0&&(i$1.zone=e.zone),e.aisle!==void 0&&(i$1.aisle=e.aisle),e.rack!==void 0&&(i$1.rack=e.rack),e.shelf!==void 0&&(i$1.shelf=e.shelf),e.bin!==void 0&&(i$1.bin=e.bin),e.capacity!==void 0&&(i$1.capacity=e.capacity),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(z,{id:t,input:i$1});k$1("Location updated"),i(e,n.updateWarehouseLocation);}catch(i){h(i);}});}function Me(u){let r={};return u.cargoItem&&(r.cargoItemId=u.cargoItem),u.warehouse&&(r.warehouseId=u.warehouse),u.location&&(r.locationId=u.location),u.query&&(r.search=u.query),Object.keys(r).length?r:void 0}function xe(u){let r$1=u.command("inventory").description("Movethewheels inventory");r$1.command("list").description("List inventory items").option("--cargo-item <id>","Filter by cargo item ID").option("--warehouse <id>","Filter by warehouse ID").option("--location <id>","Filter by location ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(B,{filter:Me(t),pagination:y(t)});i(t,e.inventoryItems,{headers:["ID","Cargo item","Warehouse","OnHand","Available","Allocated"],rows:e.inventoryItems.map(i=>[r(i.id,12),r(i.cargoItemId,12),r(i.warehouseId,12),String(i.onHand),String(i.available),String(i.allocated)])});}catch(e){h(e);}}),r$1.command("get").description("Get an inventory item by id").argument("<id>","Inventory item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(Y,{id:t});if(!i$1.inventoryItem)throw new o(`Inventory item ${t} not found`);i(e,i$1.inventoryItem);}catch(i){h(i);}}),r$1.command("stats").description("Inventory stats (on-hand, available, allocated, damaged, low-stock)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Z);i(t,e.inventoryStats);}catch(e){h(e);}}),r$1.command("create").description("Create an inventory item").requiredOption("--cargo-item <id>","Cargo item ID").requiredOption("--warehouse <id>","Warehouse ID").option("--location <id>","Location ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("--reorder-point <n>","Reorder point",c).option("--safety-stock <n>","Safety stock",c).option("--unit-cost <n>","Unit cost",m).option("-f, --format <format>","Output format").action(async t=>{try{let e={cargoItemId:t.cargoItem,warehouseId:t.warehouse};t.location&&(e.locationId=t.location),t.onHand!==void 0&&(e.onHand=t.onHand),t.available!==void 0&&(e.available=t.available),t.allocated!==void 0&&(e.allocated=t.allocated),t.damaged!==void 0&&(e.damaged=t.damaged),t.reorderPoint!==void 0&&(e.reorderPoint=t.reorderPoint),t.safetyStock!==void 0&&(e.safetyStock=t.safetyStock),t.unitCost!==void 0&&(e.unitCost=t.unitCost);let i$1=await b$1(Q,{input:e});k$1("Inventory item created"),i(t,i$1.createInventoryItem);}catch(e){h(e);}}),r$1.command("update").description("Update an inventory item").argument("<id>","Inventory item ID").option("--location <id>","Location ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("--reorder-point <n>","Reorder point",c).option("--safety-stock <n>","Safety stock",c).option("--unit-cost <n>","Unit cost",m).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.location!==void 0&&(i$1.locationId=e.location),e.onHand!==void 0&&(i$1.onHand=e.onHand),e.available!==void 0&&(i$1.available=e.available),e.allocated!==void 0&&(i$1.allocated=e.allocated),e.damaged!==void 0&&(i$1.damaged=e.damaged),e.reorderPoint!==void 0&&(i$1.reorderPoint=e.reorderPoint),e.safetyStock!==void 0&&(i$1.safetyStock=e.safetyStock),e.unitCost!==void 0&&(i$1.unitCost=e.unitCost),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(X,{id:t,input:i$1});k$1("Inventory item updated"),i(e,n.updateInventoryItem);}catch(i){h(i);}}),r$1.command("remove").description("Delete an inventory item").argument("<id>","Inventory item ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(ee,{id:t});k$1(`Inventory item ${t} deleted`),i(e,{deleted:i$1.deleteInventoryItem});}catch(i){h(i);}}),r$1.command("adjust").description("Adjust inventory stock levels").argument("<id>","Inventory item ID").option("--on-hand <n>","On-hand quantity",c).option("--available <n>","Available quantity",c).option("--allocated <n>","Allocated quantity",c).option("--damaged <n>","Damaged quantity",c).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={id:t};if(e.onHand!==void 0&&(i$1.onHand=e.onHand),e.available!==void 0&&(i$1.available=e.available),e.allocated!==void 0&&(i$1.allocated=e.allocated),e.damaged!==void 0&&(i$1.damaged=e.damaged),Object.keys(i$1).length===1)throw new o("No stock adjustments specified");let n=await b$1(te,{input:i$1});k$1("Inventory stock adjusted"),i(e,n.adjustInventoryStock);}catch(i){h(i);}}),r$1.command("transactions").description("List inventory transactions").option("--cargo-item <id>","Filter by cargo item ID").option("--warehouse <id>","Filter by warehouse ID").option("--location <id>","Filter by location ID").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(K,{filter:Me(t),pagination:y(t)});i(t,e.inventoryTransactions,{headers:["ID","Number","Type","Cargo item","Warehouse","Qty"],rows:e.inventoryTransactions.map(i=>[r(i.id,12),i.transactionNumber,i.type,r(i.cargoItemId,12),r(i.warehouseId,12),String(i.quantity)])});}catch(e){h(e);}}),r$1.command("record-transaction").description("Record an inventory transaction").requiredOption("--number <s>","Transaction number").requiredOption("--type <t>","Transaction type (RECEIPT|ISSUE|TRANSFER|ADJUSTMENT|RETURN)").requiredOption("--cargo-item <id>","Cargo item ID").requiredOption("--warehouse <id>","Warehouse ID").requiredOption("--quantity <n>","Quantity",c).option("--inventory-item <id>","Inventory item ID").option("--unit-cost <n>","Unit cost",m).option("--reference-type <s>","Reference type").option("--reference-id <s>","Reference ID").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async t=>{try{let e={transactionNumber:t.number,type:t.type.toUpperCase(),cargoItemId:t.cargoItem,warehouseId:t.warehouse,quantity:t.quantity};t.inventoryItem&&(e.inventoryItemId=t.inventoryItem),t.unitCost!==void 0&&(e.unitCost=t.unitCost),t.referenceType&&(e.referenceType=t.referenceType),t.referenceId&&(e.referenceId=t.referenceId),t.notes&&(e.notes=t.notes);let i$1=await b$1(ie,{input:e});k$1(`Transaction recorded: ${i$1.createInventoryTransaction.transactionNumber}`),i(t,i$1.createInventoryTransaction);}catch(e){h(e);}});}function qe(u){let r$1=u.command("shipments").description("Movethewheels shipments & tracking");r$1.command("list").description("List shipments").option("--delivery-job <id>","Filter by delivery job ID").option("--store-order <id>","Filter by store order ID").option("--customer <id>","Filter by customer ID").option("--carrier <id>","Filter by carrier ID").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.deliveryJob&&(e.deliveryJobId=t.deliveryJob),t.storeOrder&&(e.storeOrderId=t.storeOrder),t.customer&&(e.customerId=t.customer),t.carrier&&(e.carrierId=t.carrier),t.status&&(e.status=t.status.toUpperCase()),t.query&&(e.search=t.query);let i$1=await b$1(re,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.shipments,{headers:["ID","Shipment #","Delivery job","Store order","Status","Tracking"],rows:i$1.shipments.map(n=>[r(n.id,12),n.shipmentNumber,r(n.deliveryJobId??"-",12),r(n.storeOrderId??"-",12),n.status,n.trackingNumber??"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get a shipment by id (includes tracking events)").argument("<id>","Shipment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(ne,{id:t});if(!i$1.shipment)throw new o(`Shipment ${t} not found`);i(e,i$1.shipment);}catch(i){h(i);}}),r$1.command("active").description("List active deliveries (in-transit shipments)").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(ae,{pagination:y(t)});i(t,e.activeDeliveries,{headers:["ID","Shipment #","Delivery job","Store order","Status","Tracking"],rows:e.activeDeliveries.map(i=>[r(i.id,12),i.shipmentNumber,r(i.deliveryJobId??"-",12),r(i.storeOrderId??"-",12),i.status,i.trackingNumber??"-"])});}catch(e){h(e);}}),r$1.command("create").description("Create a shipment").requiredOption("--shipment-number <s>","Shipment number").option("--delivery-job <id>","Delivery job the shipment fulfils").option("--store-order <id>","Store order the shipment fulfils").requiredOption("--origin <json>","Origin JSON").requiredOption("--destination <json>","Destination JSON").option("--status <s>","Status","PLANNED").option("--customer <id>","Customer ID").option("--carrier <id>","Carrier ID").option("--tracking-number <s>","Tracking number").option("--cargo-details <json>","Cargo details JSON").option("--estimated-delivery <s>","Estimated delivery (ISO date)").option("--actual-delivery <s>","Actual delivery (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={shipmentNumber:t.shipmentNumber,origin:l("origin",t.origin),destination:l("destination",t.destination),status:(t.status??"PLANNED").toUpperCase()};t.deliveryJob&&(e.deliveryJobId=t.deliveryJob),t.storeOrder&&(e.storeOrderId=t.storeOrder),t.customer&&(e.customerId=t.customer),t.carrier&&(e.carrierId=t.carrier),t.trackingNumber&&(e.trackingNumber=t.trackingNumber),t.cargoDetails&&(e.cargoDetails=l("cargo-details",t.cargoDetails)),t.estimatedDelivery&&(e.estimatedDelivery=t.estimatedDelivery),t.actualDelivery&&(e.actualDelivery=t.actualDelivery);let i$1=await b$1(ce,{input:e});k$1(`Shipment created: ${i$1.createShipment.shipmentNumber}`),i(t,i$1.createShipment);}catch(e){h(e);}}),r$1.command("update").description("Update a shipment").argument("<id>","Shipment ID").option("--status <s>","Status").option("--customer <id>","Customer ID").option("--carrier <id>","Carrier ID").option("--tracking-number <s>","Tracking number").option("--origin <json>","Origin JSON").option("--destination <json>","Destination JSON").option("--cargo-details <json>","Cargo details JSON").option("--estimated-delivery <s>","Estimated delivery (ISO date)").option("--actual-delivery <s>","Actual delivery (ISO date)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.status&&(i$1.status=e.status.toUpperCase()),e.customer!==void 0&&(i$1.customerId=e.customer),e.carrier!==void 0&&(i$1.carrierId=e.carrier),e.trackingNumber!==void 0&&(i$1.trackingNumber=e.trackingNumber),e.origin&&(i$1.origin=l("origin",e.origin)),e.destination&&(i$1.destination=l("destination",e.destination)),e.cargoDetails&&(i$1.cargoDetails=l("cargo-details",e.cargoDetails)),e.estimatedDelivery&&(i$1.estimatedDelivery=e.estimatedDelivery),e.actualDelivery&&(i$1.actualDelivery=e.actualDelivery),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(de,{id:t,input:i$1});k$1("Shipment updated"),i(e,n.updateShipment);}catch(i){h(i);}}),r$1.command("remove").description("Delete a shipment").argument("<id>","Shipment ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(pe,{id:t});k$1(`Shipment ${t} deleted`),i(e,{deleted:i$1.deleteShipment});}catch(i){h(i);}}),r$1.command("add-event").description("Add a tracking event to a shipment").requiredOption("--shipment <id>","Shipment ID").requiredOption("--event-type <t>","CREATED|PICKED_UP|IN_TRANSIT|ARRIVED|DEPARTED|OUT_FOR_DELIVERY|DELIVERED|FAILED|RETURNED").option("--details <s>","Event details").option("--location <json>","Location JSON").option("--timestamp <s>","Timestamp (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={shipmentId:t.shipment,eventType:t.eventType.toUpperCase()};t.details&&(e.details=t.details),t.location&&(e.location=l("location",t.location)),t.timestamp&&(e.timestamp=t.timestamp);let i$1=await b$1(ue,{input:e});k$1(`Tracking event added: ${i$1.addTrackingEvent.eventType}`),i(t,i$1.addTrackingEvent);}catch(e){h(e);}}),r$1.command("tracking").description("List tracking events for a shipment").argument("<shipmentId>","Shipment ID").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(oe,{shipmentId:t,pagination:y(e)});i(e,i$1.shipmentTracking,{headers:["ID","Event","Details","Timestamp"],rows:i$1.shipmentTracking.map(n=>[r(n.id,12),n.eventType,r(n.details??"-",30),n.timestamp])});}catch(i){h(i);}}),r$1.command("alerts").description("List tracking alerts (delayed / at-risk shipments)").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(se,{pagination:y(t)});i(t,e.trackingAlerts,{headers:["Type","Shipment #","Message"],rows:e.trackingAlerts.map(i=>[i.alertType,i.shipmentNumber,r(i.message,40)])});}catch(e){h(e);}});}function Fe(u){let r$1=u.command("routes").description("Movethewheels delivery routes");r$1.command("list").description("List routes").option("--driver <id>","Filter by driver ID").option("--vehicle <id>","Filter by vehicle ID").option("--shipment <id>","Filter by shipment ID").option("--status <s>","Filter by status").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.driver&&(e.driverId=t.driver),t.vehicle&&(e.vehicleId=t.vehicle),t.shipment&&(e.shipmentId=t.shipment),t.status&&(e.status=t.status.toUpperCase()),t.query&&(e.search=t.query);let i$1=await b$1(le,{filter:Object.keys(e).length?e:void 0,pagination:y(t)});i(t,i$1.routes,{headers:["ID","Name","Status","Driver","Vehicle","Distance"],rows:i$1.routes.map(n=>[r(n.id,12),n.name,n.status,n.driverId?r(n.driverId,12):"-",n.vehicleId?r(n.vehicleId,12):"-",n.estimatedDistance!=null?String(n.estimatedDistance):"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get a route by id").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(me,{id:t});if(!i$1.route)throw new o(`Route ${t} not found`);i(e,i$1.route);}catch(i){h(i);}}),r$1.command("create").description("Create a route").requiredOption("--name <name>","Route name").requiredOption("--waypoints <json>","Waypoints JSON").option("--status <s>","Status","PLANNED").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--shipment <id>","Shipment ID").option("--estimated-distance <n>","Estimated distance",m).option("--estimated-duration <n>","Estimated duration",m).option("--actual-distance <n>","Actual distance",m).option("--actual-duration <n>","Actual duration",m).option("--fuel-cost <n>","Fuel cost",m).option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,waypoints:l("waypoints",t.waypoints),status:(t.status??"PLANNED").toUpperCase()};t.driver&&(e.driverId=t.driver),t.vehicle&&(e.vehicleId=t.vehicle),t.shipment&&(e.shipmentId=t.shipment),t.estimatedDistance!==void 0&&(e.estimatedDistance=t.estimatedDistance),t.estimatedDuration!==void 0&&(e.estimatedDuration=t.estimatedDuration),t.actualDistance!==void 0&&(e.actualDistance=t.actualDistance),t.actualDuration!==void 0&&(e.actualDuration=t.actualDuration),t.fuelCost!==void 0&&(e.fuelCost=t.fuelCost);let i$1=await b$1(fe,{input:e});k$1(`Route created: ${i$1.createRoute.name}`),i(t,i$1.createRoute);}catch(e){h(e);}}),r$1.command("update").description("Update a route").argument("<id>","Route ID").option("--name <name>","Route name").option("--status <s>","Status").option("--driver <id>","Driver ID").option("--vehicle <id>","Vehicle ID").option("--shipment <id>","Shipment ID").option("--waypoints <json>","Waypoints JSON").option("--estimated-distance <n>","Estimated distance",m).option("--estimated-duration <n>","Estimated duration",m).option("--actual-distance <n>","Actual distance",m).option("--actual-duration <n>","Actual duration",m).option("--fuel-cost <n>","Fuel cost",m).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.name&&(i$1.name=e.name),e.status&&(i$1.status=e.status.toUpperCase()),e.driver!==void 0&&(i$1.driverId=e.driver),e.vehicle!==void 0&&(i$1.vehicleId=e.vehicle),e.shipment!==void 0&&(i$1.shipmentId=e.shipment),e.waypoints&&(i$1.waypoints=l("waypoints",e.waypoints)),e.estimatedDistance!==void 0&&(i$1.estimatedDistance=e.estimatedDistance),e.estimatedDuration!==void 0&&(i$1.estimatedDuration=e.estimatedDuration),e.actualDistance!==void 0&&(i$1.actualDistance=e.actualDistance),e.actualDuration!==void 0&&(i$1.actualDuration=e.actualDuration),e.fuelCost!==void 0&&(i$1.fuelCost=e.fuelCost),!Object.keys(i$1).length)throw new o("No updates specified");let n=await b$1(ge,{id:t,input:i$1});k$1("Route updated"),i(e,n.updateRoute);}catch(i){h(i);}}),r$1.command("remove").description("Delete a route").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(ye,{id:t});k$1(`Route ${t} deleted`),i(e,{deleted:i$1.deleteRoute});}catch(i){h(i);}}),r$1.command("optimize").description("Optimize a route").argument("<id>","Route ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(he,{id:t});k$1("Route optimized"),i(e,i$1.optimizeRoute);}catch(i){h(i);}});}function He(u){let r$1=u.command("marketplace").description("Movethewheels logistics marketplace (providers & offerings)"),t=r$1.command("providers").description("Service providers");t.command("list").description("List service providers").option("--type <t>","Filter by provider type").option("--active <bool>","Filter by active state (true|false)",i=>i==="true").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let n={};i$1.type&&(n.type=i$1.type),i$1.active!==void 0&&(n.isActive=i$1.active),i$1.query&&(n.search=i$1.query);let d=await b$1(Ie,{filter:Object.keys(n).length?n:void 0,pagination:y(i$1)});i(i$1,d.serviceProviders,{headers:["ID","Name","Type","Active","Verified","Rating"],rows:d.serviceProviders.map(h=>[r(h.id,12),h.name,h.type,h.isActive?"yes":"no",h.isVerified?"yes":"no",h.rating!=null?String(h.rating):"-"])});}catch(n){h(n);}}),t.command("get").description("Get a service provider by id (includes offerings)").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d=await b$1(ve,{id:i$1});if(!d.serviceProvider)throw new o(`Provider ${i$1} not found`);i(n,d.serviceProvider);}catch(d){h(d);}}),t.command("create").description("Create a service provider").requiredOption("--name <name>","Provider name").requiredOption("--type <t>","Provider type").option("--description <s>","Description").option("--rating <n>","Rating",m).option("--active <bool>","Active (true|false)",i=>i==="true",true).option("--verified <bool>","Verified (true|false)",i=>i==="true",false).option("--contact-info <json>","Contact info JSON").option("--services <list>","Comma-separated services offered").option("-f, --format <format>","Output format").action(async i$1=>{try{let n={name:i$1.name,type:i$1.type,isActive:i$1.active??!0,isVerified:i$1.verified??!1};i$1.description&&(n.description=i$1.description),i$1.rating!==void 0&&(n.rating=i$1.rating),i$1.contactInfo&&(n.contactInfo=l("contact-info",i$1.contactInfo)),i$1.services&&(n.services=We(i$1.services));let d=await b$1(Ee,{input:n});k$1(`Provider created: ${d.createServiceProvider.name}`),i(i$1,d.createServiceProvider);}catch(n){h(n);}}),t.command("update").description("Update a service provider").argument("<id>","Provider ID").option("--name <name>","Provider name").option("--type <t>","Provider type").option("--description <s>","Description").option("--rating <n>","Rating",m).option("--active <bool>","Active (true|false)",i=>i==="true").option("--verified <bool>","Verified (true|false)",i=>i==="true").option("--contact-info <json>","Contact info JSON").option("--services <list>","Comma-separated services offered").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d={};if(n.name&&(d.name=n.name),n.type&&(d.type=n.type),n.description!==void 0&&(d.description=n.description),n.rating!==void 0&&(d.rating=n.rating),n.active!==void 0&&(d.isActive=n.active),n.verified!==void 0&&(d.isVerified=n.verified),n.contactInfo&&(d.contactInfo=l("contact-info",n.contactInfo)),n.services&&(d.services=We(n.services)),!Object.keys(d).length)throw new o("No updates specified");let h=await b$1(we,{id:i$1,input:d});k$1("Provider updated"),i(n,h.updateServiceProvider);}catch(d){h(d);}}),t.command("remove").description("Delete a service provider").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d=await b$1(De,{id:i$1});k$1(`Provider ${i$1} deleted`),i(n,{deleted:d.deleteServiceProvider});}catch(d){h(d);}});let e=r$1.command("offerings").description("Service offerings");e.command("list").description("List service offerings").option("--provider <id>","Filter by provider ID").option("--category <c>","Filter by category").option("--query <q>","Free-text search").option("--limit <n>","Page size",c,50).option("--offset <n>","Offset",c,0).option("-f, --format <format>","Output format").action(async i$1=>{try{let n={};i$1.provider&&(n.providerId=i$1.provider),i$1.category&&(n.category=i$1.category.toUpperCase()),i$1.query&&(n.search=i$1.query);let d=await b$1(be,{filter:Object.keys(n).length?n:void 0,pagination:y(i$1)});i(i$1,d.serviceOfferings,{headers:["ID","Name","Provider","Category","Price","Currency"],rows:d.serviceOfferings.map(h=>[r(h.id,12),h.name,r(h.providerId,12),h.category??"-",String(h.price),h.currency])});}catch(n){h(n);}}),e.command("get").description("Get a service offering by id").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d=await b$1(Ce,{id:i$1});if(!d.serviceOffering)throw new o(`Offering ${i$1} not found`);i(n,d.serviceOffering);}catch(d){h(d);}}),e.command("create").description("Create a service offering").requiredOption("--provider <id>","Provider ID").requiredOption("--name <name>","Offering name").requiredOption("--price <n>","Price",m).requiredOption("--category <c>","Category (FULL_TRUCKLOAD, LESS_THAN_TRUCKLOAD, LAST_MILE, EXPRESS, AIR_FREIGHT, OCEAN_FREIGHT, RAIL_FREIGHT, COLD_CHAIN, CUSTOMS_CLEARANCE, WAREHOUSING, OTHER)").option("--description <s>","Description").option("--currency <c>","Currency","USD").option("--availability <a>","Availability (AVAILABLE, LIMITED, UNAVAILABLE)").option("-f, --format <format>","Output format").action(async i$1=>{try{let n={providerId:i$1.provider,name:i$1.name,price:i$1.price,currency:i$1.currency??"USD"};i$1.description&&(n.description=i$1.description),n.category=i$1.category.toUpperCase(),i$1.availability&&(n.availability=i$1.availability.toUpperCase());let d=await b$1(Oe,{input:n});k$1(`Offering created: ${d.createServiceOffering.name}`),i(i$1,d.createServiceOffering);}catch(n){h(n);}}),e.command("update").description("Update a service offering").argument("<id>","Offering ID").option("--name <name>","Offering name").option("--description <s>","Description").option("--category <c>","Category").option("--price <n>","Price",m).option("--currency <c>","Currency").option("--availability <a>","Availability (AVAILABLE, LIMITED, UNAVAILABLE)").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d={};if(n.name&&(d.name=n.name),n.description!==void 0&&(d.description=n.description),n.category!==void 0&&(d.category=n.category.toUpperCase()),n.price!==void 0&&(d.price=n.price),n.currency&&(d.currency=n.currency),n.availability&&(d.availability=n.availability.toUpperCase()),!Object.keys(d).length)throw new o("No updates specified");let h=await b$1(Se,{id:i$1,input:d});k$1("Offering updated"),i(n,h.updateServiceOffering);}catch(d){h(d);}}),e.command("remove").description("Delete a service offering").argument("<id>","Offering ID").option("-f, --format <format>","Output format").action(async(i$1,n)=>{try{let d=await b$1(Re,{id:i$1});k$1(`Offering ${i$1} deleted`),i(n,{deleted:d.deleteServiceOffering});}catch(d){h(d);}});}function We(u){return u.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function je(u){let r=u.command("settings").description("Movethewheels module settings");r.command("get").description("Get module settings").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Te);i(t,e.mtwModuleSettings);}catch(e){h(e);}}),r.command("update").description("Update module settings (only the options passed are changed)").option("--currency <code>","Default ISO 4217 currency code").option("--delivery-window-hours <n>","Default delivery window in hours (1 to 720)",c).option("--order-priority <p>","Default order priority (LOW, MEDIUM, HIGH, URGENT, CRITICAL)").option("--distance-unit <u>","Distance unit (KM or MI)").option("--weight-unit <u>","Weight unit (KG or LB)").option("--timezone <tz>","IANA timezone").option("-f, --format <format>","Output format").action(async t=>{try{let e={};if(t.currency!==void 0&&(e.defaultCurrency=t.currency.toUpperCase()),t.deliveryWindowHours!==void 0&&(e.defaultDeliveryWindowHours=t.deliveryWindowHours),t.orderPriority!==void 0&&(e.defaultOrderPriority=t.orderPriority.toUpperCase()),t.distanceUnit!==void 0&&(e.distanceUnit=t.distanceUnit.toUpperCase()),t.weightUnit!==void 0&&(e.weightUnit=t.weightUnit.toUpperCase()),t.timezone!==void 0&&(e.timezone=t.timezone),Object.keys(e).length===0)throw new o("Pass at least one setting to update");let i$1=await b$1(Ae,{input:e});k$1("Module settings updated"),i(t,i$1.updateMtwModuleSettings);}catch(e){h(e);}});}function Ge(u){let r=u.command("analytics").description("Movethewheels analytics & dashboards");r.command("dashboard").description("Dashboard metrics (orders, deliveries, revenue, fleet, low stock)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(ke);i(t,e.dashboardMetrics);}catch(e){h(e);}}),r.command("trends").description("Analytics time series (order, revenue, delivery trends)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Ne);i(t,e.analytics);}catch(e){h(e);}}),r.command("finance").description("Finance metrics (revenue, fuel cost, open invoices)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1($e);i(t,e.financeMetrics);}catch(e){h(e);}}),r.command("fleet").description("Fleet stats (vehicles & drivers by status)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Le);i(t,e.fleetStats);}catch(e){h(e);}});}var Je={id:"movethewheels",version:"1.0.0",displayName:"Movethewheels",dependsOn:["auth","workspaces"],register(u,r){a(r);let t=u.command("movethewheels").description("Movethewheels logistics & fleet operations");_e(t),Ue(t),Ve(t),Pe(t),xe(t),qe(t),Fe(t),He(t),je(t),Ge(t);}},Ft=Je;export{Ft as default};