@voyantjs/ground 0.4.5 → 0.6.0

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.
package/dist/routes.d.ts CHANGED
@@ -37,11 +37,11 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
37
37
  data: {
38
38
  id: string;
39
39
  name: string;
40
- notes: string | null;
41
40
  createdAt: string;
42
41
  updatedAt: string;
43
- active: boolean;
42
+ notes: string | null;
44
43
  code: string | null;
44
+ active: boolean;
45
45
  facilityId: string | null;
46
46
  supplierId: string | null;
47
47
  } | undefined;
@@ -184,12 +184,12 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
184
184
  input: {};
185
185
  output: {
186
186
  data: {
187
+ category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
187
188
  id: string;
188
- notes: string | null;
189
189
  createdAt: string;
190
190
  updatedAt: string;
191
+ notes: string | null;
191
192
  active: boolean;
192
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
193
193
  resourceId: string;
194
194
  operatorId: string | null;
195
195
  vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
@@ -348,9 +348,9 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
348
348
  output: {
349
349
  data: {
350
350
  id: string;
351
- notes: string | null;
352
351
  createdAt: string;
353
352
  updatedAt: string;
353
+ notes: string | null;
354
354
  active: boolean;
355
355
  resourceId: string;
356
356
  operatorId: string | null;
@@ -511,9 +511,9 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
511
511
  output: {
512
512
  data: {
513
513
  id: string;
514
- notes: string | null;
515
514
  createdAt: string;
516
515
  updatedAt: string;
516
+ notes: string | null;
517
517
  bookingId: string;
518
518
  bookingItemId: string | null;
519
519
  pickupFacilityId: string | null;
@@ -706,10 +706,10 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
706
706
  output: {
707
707
  data: {
708
708
  id: string;
709
- notes: string | null;
710
709
  createdAt: string;
711
710
  updatedAt: string;
712
711
  status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
712
+ notes: string | null;
713
713
  operatorId: string | null;
714
714
  bookingId: string;
715
715
  bookingItemId: string | null;
@@ -880,12 +880,12 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
880
880
  input: {};
881
881
  output: {
882
882
  data: {
883
- id: string;
884
- notes: string | null;
885
883
  metadata: {
886
884
  [x: string]: import("hono/utils/types").JSONValue;
887
885
  } | null;
886
+ id: string;
888
887
  createdAt: string;
888
+ notes: string | null;
889
889
  facilityId: string | null;
890
890
  dispatchId: string;
891
891
  eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
@@ -1034,13 +1034,13 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1034
1034
  input: {};
1035
1035
  output: {
1036
1036
  data: {
1037
- id: string;
1038
- notes: string | null;
1039
1037
  metadata: {
1040
1038
  [x: string]: import("hono/utils/types").JSONValue;
1041
1039
  } | null;
1040
+ id: string;
1042
1041
  createdAt: string;
1043
1042
  updatedAt: string;
1043
+ notes: string | null;
1044
1044
  operatorId: string | null;
1045
1045
  vehicleId: string | null;
1046
1046
  driverId: string | null;
@@ -1197,13 +1197,13 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1197
1197
  input: {};
1198
1198
  output: {
1199
1199
  data: {
1200
- id: string;
1201
- notes: string | null;
1202
1200
  metadata: {
1203
1201
  [x: string]: import("hono/utils/types").JSONValue;
1204
1202
  } | null;
1203
+ id: string;
1205
1204
  createdAt: string;
1206
1205
  updatedAt: string;
1206
+ notes: string | null;
1207
1207
  facilityId: string | null;
1208
1208
  dispatchId: string;
1209
1209
  addressId: string | null;
@@ -1355,9 +1355,9 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1355
1355
  output: {
1356
1356
  data: {
1357
1357
  id: string;
1358
- notes: string | null;
1359
1358
  createdAt: string;
1360
1359
  updatedAt: string;
1360
+ notes: string | null;
1361
1361
  dispatchId: string;
1362
1362
  participantId: string | null;
1363
1363
  displayName: string | null;
@@ -1498,14 +1498,14 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1498
1498
  input: {};
1499
1499
  output: {
1500
1500
  data: {
1501
- id: string;
1502
- notes: string | null;
1503
1501
  metadata: {
1504
1502
  [x: string]: import("hono/utils/types").JSONValue;
1505
1503
  } | null;
1504
+ id: string;
1506
1505
  createdAt: string;
1507
1506
  updatedAt: string;
1508
1507
  status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
1508
+ notes: string | null;
1509
1509
  facilityId: string | null;
1510
1510
  operatorId: string | null;
1511
1511
  driverId: string;
@@ -1657,13 +1657,13 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1657
1657
  input: {};
1658
1658
  output: {
1659
1659
  data: {
1660
- id: string;
1661
- notes: string | null;
1662
1660
  metadata: {
1663
1661
  [x: string]: import("hono/utils/types").JSONValue;
1664
1662
  } | null;
1663
+ id: string;
1665
1664
  createdAt: string;
1666
1665
  updatedAt: string;
1666
+ notes: string | null;
1667
1667
  dispatchId: string;
1668
1668
  severity: "info" | "warning" | "critical";
1669
1669
  incidentType: string;
@@ -1792,7 +1792,7 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1792
1792
  dispatchId: string;
1793
1793
  sequence: number;
1794
1794
  checkpointType: string;
1795
- status: "cancelled" | "pending" | "reached" | "missed";
1795
+ status: "pending" | "cancelled" | "reached" | "missed";
1796
1796
  plannedAt: string | null;
1797
1797
  actualAt: string | null;
1798
1798
  facilityId: string | null;
@@ -1818,14 +1818,14 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1818
1818
  input: {};
1819
1819
  output: {
1820
1820
  data: {
1821
- id: string;
1822
- notes: string | null;
1823
1821
  metadata: {
1824
1822
  [x: string]: import("hono/utils/types").JSONValue;
1825
1823
  } | null;
1824
+ id: string;
1826
1825
  createdAt: string;
1827
1826
  updatedAt: string;
1828
- status: "cancelled" | "pending" | "reached" | "missed";
1827
+ status: "pending" | "cancelled" | "reached" | "missed";
1828
+ notes: string | null;
1829
1829
  facilityId: string | null;
1830
1830
  dispatchId: string;
1831
1831
  addressId: string | null;
@@ -1864,7 +1864,7 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1864
1864
  dispatchId: string;
1865
1865
  sequence: number;
1866
1866
  checkpointType: string;
1867
- status: "cancelled" | "pending" | "reached" | "missed";
1867
+ status: "pending" | "cancelled" | "reached" | "missed";
1868
1868
  plannedAt: string | null;
1869
1869
  actualAt: string | null;
1870
1870
  facilityId: string | null;
@@ -1906,7 +1906,7 @@ export declare const groundRoutes: import("hono/hono-base").HonoBase<Env, {
1906
1906
  dispatchId: string;
1907
1907
  sequence: number;
1908
1908
  checkpointType: string;
1909
- status: "cancelled" | "pending" | "reached" | "missed";
1909
+ status: "pending" | "cancelled" | "reached" | "missed";
1910
1910
  plannedAt: string | null;
1911
1911
  actualAt: string | null;
1912
1912
  facilityId: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AA2CjE,KAAK,GAAG,GAAG;IACT,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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js CHANGED
@@ -1,14 +1,15 @@
1
+ import { parseJsonBody, parseQuery } from "@voyantjs/hono";
1
2
  import { Hono } from "hono";
2
3
  import { groundService } from "./service.js";
3
4
  import { groundDispatchAssignmentListQuerySchema, groundDispatchCheckpointListQuerySchema, groundDispatchLegListQuerySchema, groundDispatchListQuerySchema, groundDispatchPassengerListQuerySchema, groundDriverListQuerySchema, groundDriverShiftListQuerySchema, groundExecutionEventListQuerySchema, groundOperatorListQuerySchema, groundServiceIncidentListQuerySchema, groundTransferPreferenceListQuerySchema, groundVehicleListQuerySchema, insertGroundDispatchAssignmentSchema, insertGroundDispatchCheckpointSchema, insertGroundDispatchLegSchema, insertGroundDispatchPassengerSchema, insertGroundDispatchSchema, insertGroundDriverSchema, insertGroundDriverShiftSchema, insertGroundExecutionEventSchema, insertGroundOperatorSchema, insertGroundServiceIncidentSchema, insertGroundTransferPreferenceSchema, insertGroundVehicleSchema, updateGroundDispatchAssignmentSchema, updateGroundDispatchCheckpointSchema, updateGroundDispatchLegSchema, updateGroundDispatchPassengerSchema, updateGroundDispatchSchema, updateGroundDriverSchema, updateGroundDriverShiftSchema, updateGroundExecutionEventSchema, updateGroundOperatorSchema, updateGroundServiceIncidentSchema, updateGroundTransferPreferenceSchema, updateGroundVehicleSchema, } from "./validation.js";
4
5
  export const groundRoutes = new Hono()
5
6
  .get("/operators", async (c) => {
6
- const query = groundOperatorListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
7
+ const query = await parseQuery(c, groundOperatorListQuerySchema);
7
8
  return c.json(await groundService.listOperators(c.get("db"), query));
8
9
  })
9
10
  .post("/operators", async (c) => {
10
11
  return c.json({
11
- data: await groundService.createOperator(c.get("db"), insertGroundOperatorSchema.parse(await c.req.json())),
12
+ data: await groundService.createOperator(c.get("db"), await parseJsonBody(c, insertGroundOperatorSchema)),
12
13
  }, 201);
13
14
  })
14
15
  .get("/operators/:id", async (c) => {
@@ -18,7 +19,7 @@ export const groundRoutes = new Hono()
18
19
  return c.json({ data: row });
19
20
  })
20
21
  .patch("/operators/:id", async (c) => {
21
- const row = await groundService.updateOperator(c.get("db"), c.req.param("id"), updateGroundOperatorSchema.parse(await c.req.json()));
22
+ const row = await groundService.updateOperator(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundOperatorSchema));
22
23
  if (!row)
23
24
  return c.json({ error: "Ground operator not found" }, 404);
24
25
  return c.json({ data: row });
@@ -30,12 +31,12 @@ export const groundRoutes = new Hono()
30
31
  return c.json({ success: true });
31
32
  })
32
33
  .get("/vehicles", async (c) => {
33
- const query = groundVehicleListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
34
+ const query = await parseQuery(c, groundVehicleListQuerySchema);
34
35
  return c.json(await groundService.listVehicles(c.get("db"), query));
35
36
  })
36
37
  .post("/vehicles", async (c) => {
37
38
  return c.json({
38
- data: await groundService.createVehicle(c.get("db"), insertGroundVehicleSchema.parse(await c.req.json())),
39
+ data: await groundService.createVehicle(c.get("db"), await parseJsonBody(c, insertGroundVehicleSchema)),
39
40
  }, 201);
40
41
  })
41
42
  .get("/vehicles/:id", async (c) => {
@@ -45,7 +46,7 @@ export const groundRoutes = new Hono()
45
46
  return c.json({ data: row });
46
47
  })
47
48
  .patch("/vehicles/:id", async (c) => {
48
- const row = await groundService.updateVehicle(c.get("db"), c.req.param("id"), updateGroundVehicleSchema.parse(await c.req.json()));
49
+ const row = await groundService.updateVehicle(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundVehicleSchema));
49
50
  if (!row)
50
51
  return c.json({ error: "Ground vehicle not found" }, 404);
51
52
  return c.json({ data: row });
@@ -57,12 +58,12 @@ export const groundRoutes = new Hono()
57
58
  return c.json({ success: true });
58
59
  })
59
60
  .get("/drivers", async (c) => {
60
- const query = groundDriverListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
61
+ const query = await parseQuery(c, groundDriverListQuerySchema);
61
62
  return c.json(await groundService.listDrivers(c.get("db"), query));
62
63
  })
63
64
  .post("/drivers", async (c) => {
64
65
  return c.json({
65
- data: await groundService.createDriver(c.get("db"), insertGroundDriverSchema.parse(await c.req.json())),
66
+ data: await groundService.createDriver(c.get("db"), await parseJsonBody(c, insertGroundDriverSchema)),
66
67
  }, 201);
67
68
  })
68
69
  .get("/drivers/:id", async (c) => {
@@ -72,7 +73,7 @@ export const groundRoutes = new Hono()
72
73
  return c.json({ data: row });
73
74
  })
74
75
  .patch("/drivers/:id", async (c) => {
75
- const row = await groundService.updateDriver(c.get("db"), c.req.param("id"), updateGroundDriverSchema.parse(await c.req.json()));
76
+ const row = await groundService.updateDriver(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDriverSchema));
76
77
  if (!row)
77
78
  return c.json({ error: "Ground driver not found" }, 404);
78
79
  return c.json({ data: row });
@@ -84,12 +85,12 @@ export const groundRoutes = new Hono()
84
85
  return c.json({ success: true });
85
86
  })
86
87
  .get("/transfer-preferences", async (c) => {
87
- const query = groundTransferPreferenceListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
88
+ const query = await parseQuery(c, groundTransferPreferenceListQuerySchema);
88
89
  return c.json(await groundService.listTransferPreferences(c.get("db"), query));
89
90
  })
90
91
  .post("/transfer-preferences", async (c) => {
91
92
  return c.json({
92
- data: await groundService.createTransferPreference(c.get("db"), insertGroundTransferPreferenceSchema.parse(await c.req.json())),
93
+ data: await groundService.createTransferPreference(c.get("db"), await parseJsonBody(c, insertGroundTransferPreferenceSchema)),
93
94
  }, 201);
94
95
  })
95
96
  .get("/transfer-preferences/:id", async (c) => {
@@ -99,7 +100,7 @@ export const groundRoutes = new Hono()
99
100
  return c.json({ data: row });
100
101
  })
101
102
  .patch("/transfer-preferences/:id", async (c) => {
102
- const row = await groundService.updateTransferPreference(c.get("db"), c.req.param("id"), updateGroundTransferPreferenceSchema.parse(await c.req.json()));
103
+ const row = await groundService.updateTransferPreference(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundTransferPreferenceSchema));
103
104
  if (!row)
104
105
  return c.json({ error: "Ground transfer preference not found" }, 404);
105
106
  return c.json({ data: row });
@@ -111,12 +112,12 @@ export const groundRoutes = new Hono()
111
112
  return c.json({ success: true });
112
113
  })
113
114
  .get("/dispatches", async (c) => {
114
- const query = groundDispatchListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
115
+ const query = await parseQuery(c, groundDispatchListQuerySchema);
115
116
  return c.json(await groundService.listDispatches(c.get("db"), query));
116
117
  })
117
118
  .post("/dispatches", async (c) => {
118
119
  return c.json({
119
- data: await groundService.createDispatch(c.get("db"), insertGroundDispatchSchema.parse(await c.req.json())),
120
+ data: await groundService.createDispatch(c.get("db"), await parseJsonBody(c, insertGroundDispatchSchema)),
120
121
  }, 201);
121
122
  })
122
123
  .get("/dispatches/:id", async (c) => {
@@ -126,7 +127,7 @@ export const groundRoutes = new Hono()
126
127
  return c.json({ data: row });
127
128
  })
128
129
  .patch("/dispatches/:id", async (c) => {
129
- const row = await groundService.updateDispatch(c.get("db"), c.req.param("id"), updateGroundDispatchSchema.parse(await c.req.json()));
130
+ const row = await groundService.updateDispatch(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDispatchSchema));
130
131
  if (!row)
131
132
  return c.json({ error: "Ground dispatch not found" }, 404);
132
133
  return c.json({ data: row });
@@ -138,12 +139,12 @@ export const groundRoutes = new Hono()
138
139
  return c.json({ success: true });
139
140
  })
140
141
  .get("/execution-events", async (c) => {
141
- const query = groundExecutionEventListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
142
+ const query = await parseQuery(c, groundExecutionEventListQuerySchema);
142
143
  return c.json(await groundService.listExecutionEvents(c.get("db"), query));
143
144
  })
144
145
  .post("/execution-events", async (c) => {
145
146
  return c.json({
146
- data: await groundService.createExecutionEvent(c.get("db"), insertGroundExecutionEventSchema.parse(await c.req.json())),
147
+ data: await groundService.createExecutionEvent(c.get("db"), await parseJsonBody(c, insertGroundExecutionEventSchema)),
147
148
  }, 201);
148
149
  })
149
150
  .get("/execution-events/:id", async (c) => {
@@ -153,7 +154,7 @@ export const groundRoutes = new Hono()
153
154
  return c.json({ data: row });
154
155
  })
155
156
  .patch("/execution-events/:id", async (c) => {
156
- const row = await groundService.updateExecutionEvent(c.get("db"), c.req.param("id"), updateGroundExecutionEventSchema.parse(await c.req.json()));
157
+ const row = await groundService.updateExecutionEvent(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundExecutionEventSchema));
157
158
  if (!row)
158
159
  return c.json({ error: "Ground execution event not found" }, 404);
159
160
  return c.json({ data: row });
@@ -165,11 +166,11 @@ export const groundRoutes = new Hono()
165
166
  return c.json({ success: true });
166
167
  })
167
168
  .get("/dispatch-assignments", async (c) => {
168
- const query = groundDispatchAssignmentListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
169
+ const query = await parseQuery(c, groundDispatchAssignmentListQuerySchema);
169
170
  return c.json(await groundService.listDispatchAssignments(c.get("db"), query));
170
171
  })
171
172
  .post("/dispatch-assignments", async (c) => c.json({
172
- data: await groundService.createDispatchAssignment(c.get("db"), insertGroundDispatchAssignmentSchema.parse(await c.req.json())),
173
+ data: await groundService.createDispatchAssignment(c.get("db"), await parseJsonBody(c, insertGroundDispatchAssignmentSchema)),
173
174
  }, 201))
174
175
  .get("/dispatch-assignments/:id", async (c) => {
175
176
  const row = await groundService.getDispatchAssignmentById(c.get("db"), c.req.param("id"));
@@ -178,7 +179,7 @@ export const groundRoutes = new Hono()
178
179
  return c.json({ data: row });
179
180
  })
180
181
  .patch("/dispatch-assignments/:id", async (c) => {
181
- const row = await groundService.updateDispatchAssignment(c.get("db"), c.req.param("id"), updateGroundDispatchAssignmentSchema.parse(await c.req.json()));
182
+ const row = await groundService.updateDispatchAssignment(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDispatchAssignmentSchema));
182
183
  if (!row)
183
184
  return c.json({ error: "Ground dispatch assignment not found" }, 404);
184
185
  return c.json({ data: row });
@@ -190,11 +191,11 @@ export const groundRoutes = new Hono()
190
191
  return c.json({ success: true });
191
192
  })
192
193
  .get("/dispatch-legs", async (c) => {
193
- const query = groundDispatchLegListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
194
+ const query = await parseQuery(c, groundDispatchLegListQuerySchema);
194
195
  return c.json(await groundService.listDispatchLegs(c.get("db"), query));
195
196
  })
196
197
  .post("/dispatch-legs", async (c) => c.json({
197
- data: await groundService.createDispatchLeg(c.get("db"), insertGroundDispatchLegSchema.parse(await c.req.json())),
198
+ data: await groundService.createDispatchLeg(c.get("db"), await parseJsonBody(c, insertGroundDispatchLegSchema)),
198
199
  }, 201))
199
200
  .get("/dispatch-legs/:id", async (c) => {
200
201
  const row = await groundService.getDispatchLegById(c.get("db"), c.req.param("id"));
@@ -203,7 +204,7 @@ export const groundRoutes = new Hono()
203
204
  return c.json({ data: row });
204
205
  })
205
206
  .patch("/dispatch-legs/:id", async (c) => {
206
- const row = await groundService.updateDispatchLeg(c.get("db"), c.req.param("id"), updateGroundDispatchLegSchema.parse(await c.req.json()));
207
+ const row = await groundService.updateDispatchLeg(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDispatchLegSchema));
207
208
  if (!row)
208
209
  return c.json({ error: "Ground dispatch leg not found" }, 404);
209
210
  return c.json({ data: row });
@@ -215,11 +216,11 @@ export const groundRoutes = new Hono()
215
216
  return c.json({ success: true });
216
217
  })
217
218
  .get("/dispatch-passengers", async (c) => {
218
- const query = groundDispatchPassengerListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
219
+ const query = await parseQuery(c, groundDispatchPassengerListQuerySchema);
219
220
  return c.json(await groundService.listDispatchPassengers(c.get("db"), query));
220
221
  })
221
222
  .post("/dispatch-passengers", async (c) => c.json({
222
- data: await groundService.createDispatchPassenger(c.get("db"), insertGroundDispatchPassengerSchema.parse(await c.req.json())),
223
+ data: await groundService.createDispatchPassenger(c.get("db"), await parseJsonBody(c, insertGroundDispatchPassengerSchema)),
223
224
  }, 201))
224
225
  .get("/dispatch-passengers/:id", async (c) => {
225
226
  const row = await groundService.getDispatchPassengerById(c.get("db"), c.req.param("id"));
@@ -228,7 +229,7 @@ export const groundRoutes = new Hono()
228
229
  return c.json({ data: row });
229
230
  })
230
231
  .patch("/dispatch-passengers/:id", async (c) => {
231
- const row = await groundService.updateDispatchPassenger(c.get("db"), c.req.param("id"), updateGroundDispatchPassengerSchema.parse(await c.req.json()));
232
+ const row = await groundService.updateDispatchPassenger(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDispatchPassengerSchema));
232
233
  if (!row)
233
234
  return c.json({ error: "Ground dispatch passenger not found" }, 404);
234
235
  return c.json({ data: row });
@@ -240,11 +241,11 @@ export const groundRoutes = new Hono()
240
241
  return c.json({ success: true });
241
242
  })
242
243
  .get("/driver-shifts", async (c) => {
243
- const query = groundDriverShiftListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
244
+ const query = await parseQuery(c, groundDriverShiftListQuerySchema);
244
245
  return c.json(await groundService.listDriverShifts(c.get("db"), query));
245
246
  })
246
247
  .post("/driver-shifts", async (c) => c.json({
247
- data: await groundService.createDriverShift(c.get("db"), insertGroundDriverShiftSchema.parse(await c.req.json())),
248
+ data: await groundService.createDriverShift(c.get("db"), await parseJsonBody(c, insertGroundDriverShiftSchema)),
248
249
  }, 201))
249
250
  .get("/driver-shifts/:id", async (c) => {
250
251
  const row = await groundService.getDriverShiftById(c.get("db"), c.req.param("id"));
@@ -253,7 +254,7 @@ export const groundRoutes = new Hono()
253
254
  return c.json({ data: row });
254
255
  })
255
256
  .patch("/driver-shifts/:id", async (c) => {
256
- const row = await groundService.updateDriverShift(c.get("db"), c.req.param("id"), updateGroundDriverShiftSchema.parse(await c.req.json()));
257
+ const row = await groundService.updateDriverShift(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDriverShiftSchema));
257
258
  if (!row)
258
259
  return c.json({ error: "Ground driver shift not found" }, 404);
259
260
  return c.json({ data: row });
@@ -265,11 +266,11 @@ export const groundRoutes = new Hono()
265
266
  return c.json({ success: true });
266
267
  })
267
268
  .get("/service-incidents", async (c) => {
268
- const query = groundServiceIncidentListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
269
+ const query = await parseQuery(c, groundServiceIncidentListQuerySchema);
269
270
  return c.json(await groundService.listServiceIncidents(c.get("db"), query));
270
271
  })
271
272
  .post("/service-incidents", async (c) => c.json({
272
- data: await groundService.createServiceIncident(c.get("db"), insertGroundServiceIncidentSchema.parse(await c.req.json())),
273
+ data: await groundService.createServiceIncident(c.get("db"), await parseJsonBody(c, insertGroundServiceIncidentSchema)),
273
274
  }, 201))
274
275
  .get("/service-incidents/:id", async (c) => {
275
276
  const row = await groundService.getServiceIncidentById(c.get("db"), c.req.param("id"));
@@ -278,7 +279,7 @@ export const groundRoutes = new Hono()
278
279
  return c.json({ data: row });
279
280
  })
280
281
  .patch("/service-incidents/:id", async (c) => {
281
- const row = await groundService.updateServiceIncident(c.get("db"), c.req.param("id"), updateGroundServiceIncidentSchema.parse(await c.req.json()));
282
+ const row = await groundService.updateServiceIncident(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundServiceIncidentSchema));
282
283
  if (!row)
283
284
  return c.json({ error: "Ground service incident not found" }, 404);
284
285
  return c.json({ data: row });
@@ -290,11 +291,11 @@ export const groundRoutes = new Hono()
290
291
  return c.json({ success: true });
291
292
  })
292
293
  .get("/dispatch-checkpoints", async (c) => {
293
- const query = groundDispatchCheckpointListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
294
+ const query = await parseQuery(c, groundDispatchCheckpointListQuerySchema);
294
295
  return c.json(await groundService.listDispatchCheckpoints(c.get("db"), query));
295
296
  })
296
297
  .post("/dispatch-checkpoints", async (c) => c.json({
297
- data: await groundService.createDispatchCheckpoint(c.get("db"), insertGroundDispatchCheckpointSchema.parse(await c.req.json())),
298
+ data: await groundService.createDispatchCheckpoint(c.get("db"), await parseJsonBody(c, insertGroundDispatchCheckpointSchema)),
298
299
  }, 201))
299
300
  .get("/dispatch-checkpoints/:id", async (c) => {
300
301
  const row = await groundService.getDispatchCheckpointById(c.get("db"), c.req.param("id"));
@@ -303,7 +304,7 @@ export const groundRoutes = new Hono()
303
304
  return c.json({ data: row });
304
305
  })
305
306
  .patch("/dispatch-checkpoints/:id", async (c) => {
306
- const row = await groundService.updateDispatchCheckpoint(c.get("db"), c.req.param("id"), updateGroundDispatchCheckpointSchema.parse(await c.req.json()));
307
+ const row = await groundService.updateDispatchCheckpoint(c.get("db"), c.req.param("id"), await parseJsonBody(c, updateGroundDispatchCheckpointSchema));
307
308
  if (!row)
308
309
  return c.json({ error: "Ground dispatch checkpoint not found" }, 404);
309
310
  return c.json({ data: row });
@@ -1198,7 +1198,7 @@ export declare const groundDispatchCheckpoints: import("drizzle-orm/pg-core").Pg
1198
1198
  tableName: "ground_dispatch_checkpoints";
1199
1199
  dataType: "string";
1200
1200
  columnType: "PgEnumColumn";
1201
- data: "cancelled" | "pending" | "reached" | "missed";
1201
+ data: "pending" | "cancelled" | "reached" | "missed";
1202
1202
  driverParam: string;
1203
1203
  notNull: true;
1204
1204
  hasDefault: true;
@@ -57,9 +57,9 @@ export declare function getTransferPreferenceById(db: PostgresJsDatabase, id: st
57
57
  } | null>;
58
58
  export declare function createTransferPreference(db: PostgresJsDatabase, data: CreateGroundTransferPreferenceInput): Promise<{
59
59
  id: string;
60
- notes: string | null;
61
60
  createdAt: Date;
62
61
  updatedAt: Date;
62
+ notes: string | null;
63
63
  bookingId: string;
64
64
  bookingItemId: string | null;
65
65
  pickupFacilityId: string | null;
@@ -157,10 +157,10 @@ export declare function getDispatchById(db: PostgresJsDatabase, id: string): Pro
157
157
  } | null>;
158
158
  export declare function createDispatch(db: PostgresJsDatabase, data: CreateGroundDispatchInput): Promise<{
159
159
  id: string;
160
- notes: string | null;
161
160
  createdAt: Date;
162
161
  updatedAt: Date;
163
162
  status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
163
+ notes: string | null;
164
164
  operatorId: string | null;
165
165
  bookingId: string;
166
166
  bookingItemId: string | null;
@@ -228,10 +228,10 @@ export declare function getExecutionEventById(db: PostgresJsDatabase, id: string
228
228
  createdAt: Date;
229
229
  } | null>;
230
230
  export declare function createExecutionEvent(db: PostgresJsDatabase, data: CreateGroundExecutionEventInput): Promise<{
231
- id: string;
232
- notes: string | null;
233
231
  metadata: Record<string, unknown> | null;
232
+ id: string;
234
233
  createdAt: Date;
234
+ notes: string | null;
235
235
  facilityId: string | null;
236
236
  dispatchId: string;
237
237
  eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
@@ -34,11 +34,11 @@ export declare function getDispatchAssignmentById(db: PostgresJsDatabase, id: st
34
34
  updatedAt: Date;
35
35
  } | null>;
36
36
  export declare function createDispatchAssignment(db: PostgresJsDatabase, data: CreateGroundDispatchAssignmentInput): Promise<{
37
- id: string;
38
- notes: string | null;
39
37
  metadata: Record<string, unknown> | null;
38
+ id: string;
40
39
  createdAt: Date;
41
40
  updatedAt: Date;
41
+ notes: string | null;
42
42
  operatorId: string | null;
43
43
  vehicleId: string | null;
44
44
  driverId: string | null;
@@ -98,11 +98,11 @@ export declare function getDispatchLegById(db: PostgresJsDatabase, id: string):
98
98
  updatedAt: Date;
99
99
  } | null>;
100
100
  export declare function createDispatchLeg(db: PostgresJsDatabase, data: CreateGroundDispatchLegInput): Promise<{
101
- id: string;
102
- notes: string | null;
103
101
  metadata: Record<string, unknown> | null;
102
+ id: string;
104
103
  createdAt: Date;
105
104
  updatedAt: Date;
105
+ notes: string | null;
106
106
  facilityId: string | null;
107
107
  dispatchId: string;
108
108
  addressId: string | null;
@@ -155,9 +155,9 @@ export declare function getDispatchPassengerById(db: PostgresJsDatabase, id: str
155
155
  } | null>;
156
156
  export declare function createDispatchPassenger(db: PostgresJsDatabase, data: CreateGroundDispatchPassengerInput): Promise<{
157
157
  id: string;
158
- notes: string | null;
159
158
  createdAt: Date;
160
159
  updatedAt: Date;
160
+ notes: string | null;
161
161
  dispatchId: string;
162
162
  participantId: string | null;
163
163
  displayName: string | null;
@@ -208,11 +208,11 @@ export declare function getServiceIncidentById(db: PostgresJsDatabase, id: strin
208
208
  updatedAt: Date;
209
209
  } | null>;
210
210
  export declare function createServiceIncident(db: PostgresJsDatabase, data: CreateGroundServiceIncidentInput): Promise<{
211
- id: string;
212
- notes: string | null;
213
211
  metadata: Record<string, unknown> | null;
212
+ id: string;
214
213
  createdAt: Date;
215
214
  updatedAt: Date;
215
+ notes: string | null;
216
216
  dispatchId: string;
217
217
  severity: "info" | "warning" | "critical";
218
218
  incidentType: string;
@@ -242,7 +242,7 @@ export declare function listDispatchCheckpoints(db: PostgresJsDatabase, query: G
242
242
  dispatchId: string;
243
243
  sequence: number;
244
244
  checkpointType: string;
245
- status: "cancelled" | "pending" | "reached" | "missed";
245
+ status: "pending" | "cancelled" | "reached" | "missed";
246
246
  plannedAt: Date | null;
247
247
  actualAt: Date | null;
248
248
  facilityId: string | null;
@@ -261,7 +261,7 @@ export declare function getDispatchCheckpointById(db: PostgresJsDatabase, id: st
261
261
  dispatchId: string;
262
262
  sequence: number;
263
263
  checkpointType: string;
264
- status: "cancelled" | "pending" | "reached" | "missed";
264
+ status: "pending" | "cancelled" | "reached" | "missed";
265
265
  plannedAt: Date | null;
266
266
  actualAt: Date | null;
267
267
  facilityId: string | null;
@@ -272,12 +272,12 @@ export declare function getDispatchCheckpointById(db: PostgresJsDatabase, id: st
272
272
  updatedAt: Date;
273
273
  } | null>;
274
274
  export declare function createDispatchCheckpoint(db: PostgresJsDatabase, data: CreateGroundDispatchCheckpointInput): Promise<{
275
- id: string;
276
- notes: string | null;
277
275
  metadata: Record<string, unknown> | null;
276
+ id: string;
278
277
  createdAt: Date;
279
278
  updatedAt: Date;
280
- status: "cancelled" | "pending" | "reached" | "missed";
279
+ status: "pending" | "cancelled" | "reached" | "missed";
280
+ notes: string | null;
281
281
  facilityId: string | null;
282
282
  dispatchId: string;
283
283
  addressId: string | null;
@@ -291,7 +291,7 @@ export declare function updateDispatchCheckpoint(db: PostgresJsDatabase, id: str
291
291
  dispatchId: string;
292
292
  sequence: number;
293
293
  checkpointType: string;
294
- status: "cancelled" | "pending" | "reached" | "missed";
294
+ status: "pending" | "cancelled" | "reached" | "missed";
295
295
  plannedAt: Date | null;
296
296
  actualAt: Date | null;
297
297
  facilityId: string | null;
@@ -30,11 +30,11 @@ export declare function getOperatorById(db: PostgresJsDatabase, id: string): Pro
30
30
  export declare function createOperator(db: PostgresJsDatabase, data: CreateGroundOperatorInput): Promise<{
31
31
  id: string;
32
32
  name: string;
33
- notes: string | null;
34
33
  createdAt: Date;
35
34
  updatedAt: Date;
36
- active: boolean;
35
+ notes: string | null;
37
36
  code: string | null;
37
+ active: boolean;
38
38
  facilityId: string | null;
39
39
  supplierId: string | null;
40
40
  } | undefined>;
@@ -92,12 +92,12 @@ export declare function getVehicleById(db: PostgresJsDatabase, id: string): Prom
92
92
  updatedAt: Date;
93
93
  } | null>;
94
94
  export declare function createVehicle(db: PostgresJsDatabase, data: CreateGroundVehicleInput): Promise<{
95
+ category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
95
96
  id: string;
96
- notes: string | null;
97
97
  createdAt: Date;
98
98
  updatedAt: Date;
99
+ notes: string | null;
99
100
  active: boolean;
100
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
101
101
  resourceId: string;
102
102
  operatorId: string | null;
103
103
  vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
@@ -161,9 +161,9 @@ export declare function getDriverById(db: PostgresJsDatabase, id: string): Promi
161
161
  } | null>;
162
162
  export declare function createDriver(db: PostgresJsDatabase, data: CreateGroundDriverInput): Promise<{
163
163
  id: string;
164
- notes: string | null;
165
164
  createdAt: Date;
166
165
  updatedAt: Date;
166
+ notes: string | null;
167
167
  active: boolean;
168
168
  resourceId: string;
169
169
  operatorId: string | null;
@@ -220,12 +220,12 @@ export declare function getDriverShiftById(db: PostgresJsDatabase, id: string):
220
220
  updatedAt: Date;
221
221
  } | null>;
222
222
  export declare function createDriverShift(db: PostgresJsDatabase, data: CreateGroundDriverShiftInput): Promise<{
223
- id: string;
224
- notes: string | null;
225
223
  metadata: Record<string, unknown> | null;
224
+ id: string;
226
225
  createdAt: Date;
227
226
  updatedAt: Date;
228
227
  status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
228
+ notes: string | null;
229
229
  facilityId: string | null;
230
230
  operatorId: string | null;
231
231
  driverId: string;
@@ -77,8 +77,8 @@ export declare const groundIncidentResolutionStatusSchema: z.ZodEnum<{
77
77
  resolved: "resolved";
78
78
  }>;
79
79
  export declare const groundCheckpointStatusSchema: z.ZodEnum<{
80
- cancelled: "cancelled";
81
80
  pending: "pending";
81
+ cancelled: "cancelled";
82
82
  reached: "reached";
83
83
  missed: "missed";
84
84
  }>;
@@ -673,8 +673,8 @@ export declare const insertGroundDispatchCheckpointSchema: z.ZodObject<{
673
673
  sequence: z.ZodDefault<z.ZodNumber>;
674
674
  checkpointType: z.ZodString;
675
675
  status: z.ZodDefault<z.ZodEnum<{
676
- cancelled: "cancelled";
677
676
  pending: "pending";
677
+ cancelled: "cancelled";
678
678
  reached: "reached";
679
679
  missed: "missed";
680
680
  }>>;
@@ -690,8 +690,8 @@ export declare const updateGroundDispatchCheckpointSchema: z.ZodObject<{
690
690
  sequence: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
691
691
  checkpointType: z.ZodOptional<z.ZodString>;
692
692
  status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
693
- cancelled: "cancelled";
694
693
  pending: "pending";
694
+ cancelled: "cancelled";
695
695
  reached: "reached";
696
696
  missed: "missed";
697
697
  }>>>;
@@ -707,8 +707,8 @@ export declare const groundDispatchCheckpointListQuerySchema: z.ZodObject<{
707
707
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
708
708
  dispatchId: z.ZodOptional<z.ZodString>;
709
709
  status: z.ZodOptional<z.ZodEnum<{
710
- cancelled: "cancelled";
711
710
  pending: "pending";
711
+ cancelled: "cancelled";
712
712
  reached: "reached";
713
713
  missed: "missed";
714
714
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/ground",
3
- "version": "0.4.5",
3
+ "version": "0.6.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,16 +25,16 @@
25
25
  "drizzle-orm": "^0.45.2",
26
26
  "hono": "^4.12.10",
27
27
  "zod": "^4.3.6",
28
- "@voyantjs/core": "0.4.5",
29
- "@voyantjs/db": "0.4.5",
30
- "@voyantjs/facilities": "0.4.5",
31
- "@voyantjs/hono": "0.4.5",
32
- "@voyantjs/identity": "0.4.5"
28
+ "@voyantjs/core": "0.6.0",
29
+ "@voyantjs/db": "0.6.0",
30
+ "@voyantjs/facilities": "0.6.0",
31
+ "@voyantjs/hono": "0.6.0",
32
+ "@voyantjs/identity": "0.6.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^6.0.2",
36
- "@voyantjs/bookings": "0.4.5",
37
- "@voyantjs/resources": "0.4.5",
36
+ "@voyantjs/bookings": "0.6.0",
37
+ "@voyantjs/resources": "0.6.0",
38
38
  "@voyantjs/voyant-typescript-config": "0.1.0"
39
39
  },
40
40
  "files": [