@voyantjs/ground 0.2.0 → 0.3.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/service.d.ts CHANGED
@@ -1,847 +1,66 @@
1
- import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
- import type { z } from "zod";
3
- import type { 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
- type GroundOperatorListQuery = z.infer<typeof groundOperatorListQuerySchema>;
5
- type CreateGroundOperatorInput = z.infer<typeof insertGroundOperatorSchema>;
6
- type UpdateGroundOperatorInput = z.infer<typeof updateGroundOperatorSchema>;
7
- type GroundVehicleListQuery = z.infer<typeof groundVehicleListQuerySchema>;
8
- type CreateGroundVehicleInput = z.infer<typeof insertGroundVehicleSchema>;
9
- type UpdateGroundVehicleInput = z.infer<typeof updateGroundVehicleSchema>;
10
- type GroundDriverListQuery = z.infer<typeof groundDriverListQuerySchema>;
11
- type CreateGroundDriverInput = z.infer<typeof insertGroundDriverSchema>;
12
- type UpdateGroundDriverInput = z.infer<typeof updateGroundDriverSchema>;
13
- type GroundTransferPreferenceListQuery = z.infer<typeof groundTransferPreferenceListQuerySchema>;
14
- type CreateGroundTransferPreferenceInput = z.infer<typeof insertGroundTransferPreferenceSchema>;
15
- type UpdateGroundTransferPreferenceInput = z.infer<typeof updateGroundTransferPreferenceSchema>;
16
- type GroundDispatchListQuery = z.infer<typeof groundDispatchListQuerySchema>;
17
- type CreateGroundDispatchInput = z.infer<typeof insertGroundDispatchSchema>;
18
- type UpdateGroundDispatchInput = z.infer<typeof updateGroundDispatchSchema>;
19
- type GroundExecutionEventListQuery = z.infer<typeof groundExecutionEventListQuerySchema>;
20
- type CreateGroundExecutionEventInput = z.infer<typeof insertGroundExecutionEventSchema>;
21
- type UpdateGroundExecutionEventInput = z.infer<typeof updateGroundExecutionEventSchema>;
22
- type GroundDispatchAssignmentListQuery = z.infer<typeof groundDispatchAssignmentListQuerySchema>;
23
- type CreateGroundDispatchAssignmentInput = z.infer<typeof insertGroundDispatchAssignmentSchema>;
24
- type UpdateGroundDispatchAssignmentInput = z.infer<typeof updateGroundDispatchAssignmentSchema>;
25
- type GroundDispatchLegListQuery = z.infer<typeof groundDispatchLegListQuerySchema>;
26
- type CreateGroundDispatchLegInput = z.infer<typeof insertGroundDispatchLegSchema>;
27
- type UpdateGroundDispatchLegInput = z.infer<typeof updateGroundDispatchLegSchema>;
28
- type GroundDispatchPassengerListQuery = z.infer<typeof groundDispatchPassengerListQuerySchema>;
29
- type CreateGroundDispatchPassengerInput = z.infer<typeof insertGroundDispatchPassengerSchema>;
30
- type UpdateGroundDispatchPassengerInput = z.infer<typeof updateGroundDispatchPassengerSchema>;
31
- type GroundDriverShiftListQuery = z.infer<typeof groundDriverShiftListQuerySchema>;
32
- type CreateGroundDriverShiftInput = z.infer<typeof insertGroundDriverShiftSchema>;
33
- type UpdateGroundDriverShiftInput = z.infer<typeof updateGroundDriverShiftSchema>;
34
- type GroundServiceIncidentListQuery = z.infer<typeof groundServiceIncidentListQuerySchema>;
35
- type CreateGroundServiceIncidentInput = z.infer<typeof insertGroundServiceIncidentSchema>;
36
- type UpdateGroundServiceIncidentInput = z.infer<typeof updateGroundServiceIncidentSchema>;
37
- type GroundDispatchCheckpointListQuery = z.infer<typeof groundDispatchCheckpointListQuerySchema>;
38
- type CreateGroundDispatchCheckpointInput = z.infer<typeof insertGroundDispatchCheckpointSchema>;
39
- type UpdateGroundDispatchCheckpointInput = z.infer<typeof updateGroundDispatchCheckpointSchema>;
1
+ import { createDispatch, createExecutionEvent, createTransferPreference, deleteDispatch, deleteExecutionEvent, deleteTransferPreference, getDispatchById, getExecutionEventById, getTransferPreferenceById, listDispatches, listExecutionEvents, listTransferPreferences, updateDispatch, updateExecutionEvent, updateTransferPreference } from "./service-dispatch-core.js";
2
+ import { createDispatchAssignment, createDispatchCheckpoint, createDispatchLeg, createDispatchPassenger, createServiceIncident, deleteDispatchAssignment, deleteDispatchCheckpoint, deleteDispatchLeg, deleteDispatchPassenger, deleteServiceIncident, getDispatchAssignmentById, getDispatchCheckpointById, getDispatchLegById, getDispatchPassengerById, getServiceIncidentById, listDispatchAssignments, listDispatchCheckpoints, listDispatchLegs, listDispatchPassengers, listServiceIncidents, updateDispatchAssignment, updateDispatchCheckpoint, updateDispatchLeg, updateDispatchPassenger, updateServiceIncident } from "./service-dispatch-ops.js";
3
+ import { createDriver, createDriverShift, createOperator, createVehicle, deleteDriver, deleteDriverShift, deleteOperator, deleteVehicle, getDriverById, getDriverShiftById, getOperatorById, getVehicleById, listDriverShifts, listDrivers, listOperators, listVehicles, updateDriver, updateDriverShift, updateOperator, updateVehicle } from "./service-resources.js";
40
4
  export declare const groundService: {
41
- listOperators(db: PostgresJsDatabase, query: GroundOperatorListQuery): Promise<{
42
- data: {
43
- id: string;
44
- supplierId: string | null;
45
- facilityId: string | null;
46
- name: string;
47
- code: string | null;
48
- active: boolean;
49
- notes: string | null;
50
- createdAt: Date;
51
- updatedAt: Date;
52
- }[];
53
- total: number;
54
- limit: number;
55
- offset: number;
56
- }>;
57
- getOperatorById(db: PostgresJsDatabase, id: string): Promise<{
58
- id: string;
59
- supplierId: string | null;
60
- facilityId: string | null;
61
- name: string;
62
- code: string | null;
63
- active: boolean;
64
- notes: string | null;
65
- createdAt: Date;
66
- updatedAt: Date;
67
- } | null>;
68
- createOperator(db: PostgresJsDatabase, data: CreateGroundOperatorInput): Promise<{
69
- id: string;
70
- name: string;
71
- notes: string | null;
72
- createdAt: Date;
73
- updatedAt: Date;
74
- active: boolean;
75
- code: string | null;
76
- facilityId: string | null;
77
- supplierId: string | null;
78
- } | undefined>;
79
- updateOperator(db: PostgresJsDatabase, id: string, data: UpdateGroundOperatorInput): Promise<{
80
- id: string;
81
- supplierId: string | null;
82
- facilityId: string | null;
83
- name: string;
84
- code: string | null;
85
- active: boolean;
86
- notes: string | null;
87
- createdAt: Date;
88
- updatedAt: Date;
89
- } | null>;
90
- deleteOperator(db: PostgresJsDatabase, id: string): Promise<{
91
- id: string;
92
- } | null>;
93
- listVehicles(db: PostgresJsDatabase, query: GroundVehicleListQuery): Promise<{
94
- data: {
95
- id: string;
96
- resourceId: string;
97
- operatorId: string | null;
98
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
99
- vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
100
- passengerCapacity: number | null;
101
- checkedBagCapacity: number | null;
102
- carryOnCapacity: number | null;
103
- wheelchairCapacity: number | null;
104
- childSeatCapacity: number | null;
105
- isAccessible: boolean;
106
- active: boolean;
107
- notes: string | null;
108
- createdAt: Date;
109
- updatedAt: Date;
110
- }[];
111
- total: number;
112
- limit: number;
113
- offset: number;
114
- }>;
115
- getVehicleById(db: PostgresJsDatabase, id: string): Promise<{
116
- id: string;
117
- resourceId: string;
118
- operatorId: string | null;
119
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
120
- vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
121
- passengerCapacity: number | null;
122
- checkedBagCapacity: number | null;
123
- carryOnCapacity: number | null;
124
- wheelchairCapacity: number | null;
125
- childSeatCapacity: number | null;
126
- isAccessible: boolean;
127
- active: boolean;
128
- notes: string | null;
129
- createdAt: Date;
130
- updatedAt: Date;
131
- } | null>;
132
- createVehicle(db: PostgresJsDatabase, data: CreateGroundVehicleInput): Promise<{
133
- id: string;
134
- notes: string | null;
135
- createdAt: Date;
136
- updatedAt: Date;
137
- active: boolean;
138
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
139
- resourceId: string;
140
- operatorId: string | null;
141
- vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
142
- passengerCapacity: number | null;
143
- checkedBagCapacity: number | null;
144
- carryOnCapacity: number | null;
145
- wheelchairCapacity: number | null;
146
- childSeatCapacity: number | null;
147
- isAccessible: boolean;
148
- } | undefined>;
149
- updateVehicle(db: PostgresJsDatabase, id: string, data: UpdateGroundVehicleInput): Promise<{
150
- id: string;
151
- resourceId: string;
152
- operatorId: string | null;
153
- category: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train";
154
- vehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible";
155
- passengerCapacity: number | null;
156
- checkedBagCapacity: number | null;
157
- carryOnCapacity: number | null;
158
- wheelchairCapacity: number | null;
159
- childSeatCapacity: number | null;
160
- isAccessible: boolean;
161
- active: boolean;
162
- notes: string | null;
163
- createdAt: Date;
164
- updatedAt: Date;
165
- } | null>;
166
- deleteVehicle(db: PostgresJsDatabase, id: string): Promise<{
167
- id: string;
168
- } | null>;
169
- listDrivers(db: PostgresJsDatabase, query: GroundDriverListQuery): Promise<{
170
- data: {
171
- id: string;
172
- resourceId: string;
173
- operatorId: string | null;
174
- licenseNumber: string | null;
175
- spokenLanguages: string[];
176
- isGuide: boolean;
177
- isMeetAndGreetCapable: boolean;
178
- active: boolean;
179
- notes: string | null;
180
- createdAt: Date;
181
- updatedAt: Date;
182
- }[];
183
- total: number;
184
- limit: number;
185
- offset: number;
186
- }>;
187
- getDriverById(db: PostgresJsDatabase, id: string): Promise<{
188
- id: string;
189
- resourceId: string;
190
- operatorId: string | null;
191
- licenseNumber: string | null;
192
- spokenLanguages: string[];
193
- isGuide: boolean;
194
- isMeetAndGreetCapable: boolean;
195
- active: boolean;
196
- notes: string | null;
197
- createdAt: Date;
198
- updatedAt: Date;
199
- } | null>;
200
- createDriver(db: PostgresJsDatabase, data: CreateGroundDriverInput): Promise<{
201
- id: string;
202
- notes: string | null;
203
- createdAt: Date;
204
- updatedAt: Date;
205
- active: boolean;
206
- resourceId: string;
207
- operatorId: string | null;
208
- licenseNumber: string | null;
209
- spokenLanguages: string[];
210
- isGuide: boolean;
211
- isMeetAndGreetCapable: boolean;
212
- } | undefined>;
213
- updateDriver(db: PostgresJsDatabase, id: string, data: UpdateGroundDriverInput): Promise<{
214
- id: string;
215
- resourceId: string;
216
- operatorId: string | null;
217
- licenseNumber: string | null;
218
- spokenLanguages: string[];
219
- isGuide: boolean;
220
- isMeetAndGreetCapable: boolean;
221
- active: boolean;
222
- notes: string | null;
223
- createdAt: Date;
224
- updatedAt: Date;
225
- } | null>;
226
- deleteDriver(db: PostgresJsDatabase, id: string): Promise<{
227
- id: string;
228
- } | null>;
229
- listTransferPreferences(db: PostgresJsDatabase, query: GroundTransferPreferenceListQuery): Promise<{
230
- data: {
231
- id: string;
232
- bookingId: string;
233
- bookingItemId: string | null;
234
- pickupFacilityId: string | null;
235
- dropoffFacilityId: string | null;
236
- pickupAddressId: string | null;
237
- dropoffAddressId: string | null;
238
- requestedVehicleCategory: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train" | null;
239
- requestedVehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible" | null;
240
- serviceLevel: "other" | "private" | "shared" | "vip" | "shuttle";
241
- passengerCount: number | null;
242
- checkedBags: number | null;
243
- carryOnBags: number | null;
244
- wheelchairCount: number | null;
245
- childSeatCount: number | null;
246
- driverLanguage: string | null;
247
- meetAndGreet: boolean;
248
- accessibilityNotes: string | null;
249
- pickupNotes: string | null;
250
- dropoffNotes: string | null;
251
- notes: string | null;
252
- createdAt: Date;
253
- updatedAt: Date;
254
- }[];
255
- total: number;
256
- limit: number;
257
- offset: number;
258
- }>;
259
- getTransferPreferenceById(db: PostgresJsDatabase, id: string): Promise<{
260
- id: string;
261
- bookingId: string;
262
- bookingItemId: string | null;
263
- pickupFacilityId: string | null;
264
- dropoffFacilityId: string | null;
265
- pickupAddressId: string | null;
266
- dropoffAddressId: string | null;
267
- requestedVehicleCategory: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train" | null;
268
- requestedVehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible" | null;
269
- serviceLevel: "other" | "private" | "shared" | "vip" | "shuttle";
270
- passengerCount: number | null;
271
- checkedBags: number | null;
272
- carryOnBags: number | null;
273
- wheelchairCount: number | null;
274
- childSeatCount: number | null;
275
- driverLanguage: string | null;
276
- meetAndGreet: boolean;
277
- accessibilityNotes: string | null;
278
- pickupNotes: string | null;
279
- dropoffNotes: string | null;
280
- notes: string | null;
281
- createdAt: Date;
282
- updatedAt: Date;
283
- } | null>;
284
- createTransferPreference(db: PostgresJsDatabase, data: CreateGroundTransferPreferenceInput): Promise<{
285
- id: string;
286
- notes: string | null;
287
- createdAt: Date;
288
- updatedAt: Date;
289
- bookingId: string;
290
- bookingItemId: string | null;
291
- pickupFacilityId: string | null;
292
- dropoffFacilityId: string | null;
293
- pickupAddressId: string | null;
294
- dropoffAddressId: string | null;
295
- requestedVehicleCategory: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train" | null;
296
- requestedVehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible" | null;
297
- serviceLevel: "other" | "private" | "shared" | "vip" | "shuttle";
298
- passengerCount: number | null;
299
- checkedBags: number | null;
300
- carryOnBags: number | null;
301
- wheelchairCount: number | null;
302
- childSeatCount: number | null;
303
- driverLanguage: string | null;
304
- meetAndGreet: boolean;
305
- accessibilityNotes: string | null;
306
- pickupNotes: string | null;
307
- dropoffNotes: string | null;
308
- } | undefined>;
309
- updateTransferPreference(db: PostgresJsDatabase, id: string, data: UpdateGroundTransferPreferenceInput): Promise<{
310
- id: string;
311
- bookingId: string;
312
- bookingItemId: string | null;
313
- pickupFacilityId: string | null;
314
- dropoffFacilityId: string | null;
315
- pickupAddressId: string | null;
316
- dropoffAddressId: string | null;
317
- requestedVehicleCategory: "other" | "car" | "sedan" | "suv" | "van" | "minibus" | "bus" | "boat" | "train" | null;
318
- requestedVehicleClass: "other" | "economy" | "standard" | "premium" | "luxury" | "accessible" | null;
319
- serviceLevel: "other" | "private" | "shared" | "vip" | "shuttle";
320
- passengerCount: number | null;
321
- checkedBags: number | null;
322
- carryOnBags: number | null;
323
- wheelchairCount: number | null;
324
- childSeatCount: number | null;
325
- driverLanguage: string | null;
326
- meetAndGreet: boolean;
327
- accessibilityNotes: string | null;
328
- pickupNotes: string | null;
329
- dropoffNotes: string | null;
330
- notes: string | null;
331
- createdAt: Date;
332
- updatedAt: Date;
333
- } | null>;
334
- deleteTransferPreference(db: PostgresJsDatabase, id: string): Promise<{
335
- id: string;
336
- } | null>;
337
- listDispatches(db: PostgresJsDatabase, query: GroundDispatchListQuery): Promise<{
338
- data: {
339
- id: string;
340
- transferPreferenceId: string;
341
- bookingId: string;
342
- bookingItemId: string | null;
343
- operatorId: string | null;
344
- vehicleId: string | null;
345
- driverId: string | null;
346
- serviceDate: string | null;
347
- scheduledPickupAt: Date | null;
348
- scheduledDropoffAt: Date | null;
349
- actualPickupAt: Date | null;
350
- actualDropoffAt: Date | null;
351
- status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
352
- passengerCount: number | null;
353
- checkedBags: number | null;
354
- carryOnBags: number | null;
355
- notes: string | null;
356
- createdAt: Date;
357
- updatedAt: Date;
358
- }[];
359
- total: number;
360
- limit: number;
361
- offset: number;
362
- }>;
363
- getDispatchById(db: PostgresJsDatabase, id: string): Promise<{
364
- id: string;
365
- transferPreferenceId: string;
366
- bookingId: string;
367
- bookingItemId: string | null;
368
- operatorId: string | null;
369
- vehicleId: string | null;
370
- driverId: string | null;
371
- serviceDate: string | null;
372
- scheduledPickupAt: Date | null;
373
- scheduledDropoffAt: Date | null;
374
- actualPickupAt: Date | null;
375
- actualDropoffAt: Date | null;
376
- status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
377
- passengerCount: number | null;
378
- checkedBags: number | null;
379
- carryOnBags: number | null;
380
- notes: string | null;
381
- createdAt: Date;
382
- updatedAt: Date;
383
- } | null>;
384
- createDispatch(db: PostgresJsDatabase, data: CreateGroundDispatchInput): Promise<{
385
- id: string;
386
- notes: string | null;
387
- createdAt: Date;
388
- updatedAt: Date;
389
- status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
390
- operatorId: string | null;
391
- bookingId: string;
392
- bookingItemId: string | null;
393
- passengerCount: number | null;
394
- checkedBags: number | null;
395
- carryOnBags: number | null;
396
- transferPreferenceId: string;
397
- vehicleId: string | null;
398
- driverId: string | null;
399
- serviceDate: string | null;
400
- scheduledPickupAt: Date | null;
401
- scheduledDropoffAt: Date | null;
402
- actualPickupAt: Date | null;
403
- actualDropoffAt: Date | null;
404
- } | undefined>;
405
- updateDispatch(db: PostgresJsDatabase, id: string, data: UpdateGroundDispatchInput): Promise<{
406
- id: string;
407
- transferPreferenceId: string;
408
- bookingId: string;
409
- bookingItemId: string | null;
410
- operatorId: string | null;
411
- vehicleId: string | null;
412
- driverId: string | null;
413
- serviceDate: string | null;
414
- scheduledPickupAt: Date | null;
415
- scheduledDropoffAt: Date | null;
416
- actualPickupAt: Date | null;
417
- actualDropoffAt: Date | null;
418
- status: "draft" | "scheduled" | "assigned" | "en_route" | "arrived" | "picked_up" | "completed" | "cancelled" | "no_show";
419
- passengerCount: number | null;
420
- checkedBags: number | null;
421
- carryOnBags: number | null;
422
- notes: string | null;
423
- createdAt: Date;
424
- updatedAt: Date;
425
- } | null>;
426
- deleteDispatch(db: PostgresJsDatabase, id: string): Promise<{
427
- id: string;
428
- } | null>;
429
- listExecutionEvents(db: PostgresJsDatabase, query: GroundExecutionEventListQuery): Promise<{
430
- data: {
431
- id: string;
432
- dispatchId: string;
433
- eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
434
- occurredAt: Date;
435
- facilityId: string | null;
436
- addressId: string | null;
437
- notes: string | null;
438
- metadata: Record<string, unknown> | null;
439
- createdAt: Date;
440
- }[];
441
- total: number;
442
- limit: number;
443
- offset: number;
444
- }>;
445
- getExecutionEventById(db: PostgresJsDatabase, id: string): Promise<{
446
- id: string;
447
- dispatchId: string;
448
- eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
449
- occurredAt: Date;
450
- facilityId: string | null;
451
- addressId: string | null;
452
- notes: string | null;
453
- metadata: Record<string, unknown> | null;
454
- createdAt: Date;
455
- } | null>;
456
- createExecutionEvent(db: PostgresJsDatabase, data: CreateGroundExecutionEventInput): Promise<{
457
- id: string;
458
- notes: string | null;
459
- metadata: Record<string, unknown> | null;
460
- createdAt: Date;
461
- facilityId: string | null;
462
- dispatchId: string;
463
- eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
464
- occurredAt: Date;
465
- addressId: string | null;
466
- } | undefined>;
467
- updateExecutionEvent(db: PostgresJsDatabase, id: string, data: UpdateGroundExecutionEventInput): Promise<{
468
- id: string;
469
- dispatchId: string;
470
- eventType: "scheduled" | "assigned" | "cancelled" | "driver_en_route" | "driver_arrived" | "pickup_completed" | "dropoff_completed" | "issue" | "note";
471
- occurredAt: Date;
472
- facilityId: string | null;
473
- addressId: string | null;
474
- notes: string | null;
475
- metadata: Record<string, unknown> | null;
476
- createdAt: Date;
477
- } | null>;
478
- deleteExecutionEvent(db: PostgresJsDatabase, id: string): Promise<{
479
- id: string;
480
- } | null>;
481
- listDispatchAssignments(db: PostgresJsDatabase, query: GroundDispatchAssignmentListQuery): Promise<{
482
- data: {
483
- id: string;
484
- dispatchId: string;
485
- operatorId: string | null;
486
- vehicleId: string | null;
487
- driverId: string | null;
488
- assignmentSource: "manual" | "suggested" | "auto";
489
- assignedAt: Date;
490
- acceptedAt: Date | null;
491
- notes: string | null;
492
- metadata: Record<string, unknown> | null;
493
- createdAt: Date;
494
- updatedAt: Date;
495
- }[];
496
- total: number;
497
- limit: number;
498
- offset: number;
499
- }>;
500
- getDispatchAssignmentById(db: PostgresJsDatabase, id: string): Promise<{
501
- id: string;
502
- dispatchId: string;
503
- operatorId: string | null;
504
- vehicleId: string | null;
505
- driverId: string | null;
506
- assignmentSource: "manual" | "suggested" | "auto";
507
- assignedAt: Date;
508
- acceptedAt: Date | null;
509
- notes: string | null;
510
- metadata: Record<string, unknown> | null;
511
- createdAt: Date;
512
- updatedAt: Date;
513
- } | null>;
514
- createDispatchAssignment(db: PostgresJsDatabase, data: CreateGroundDispatchAssignmentInput): Promise<{
515
- id: string;
516
- notes: string | null;
517
- metadata: Record<string, unknown> | null;
518
- createdAt: Date;
519
- updatedAt: Date;
520
- operatorId: string | null;
521
- vehicleId: string | null;
522
- driverId: string | null;
523
- dispatchId: string;
524
- assignmentSource: "manual" | "suggested" | "auto";
525
- assignedAt: Date;
526
- acceptedAt: Date | null;
527
- } | undefined>;
528
- updateDispatchAssignment(db: PostgresJsDatabase, id: string, data: UpdateGroundDispatchAssignmentInput): Promise<{
529
- id: string;
530
- dispatchId: string;
531
- operatorId: string | null;
532
- vehicleId: string | null;
533
- driverId: string | null;
534
- assignmentSource: "manual" | "suggested" | "auto";
535
- assignedAt: Date;
536
- acceptedAt: Date | null;
537
- notes: string | null;
538
- metadata: Record<string, unknown> | null;
539
- createdAt: Date;
540
- updatedAt: Date;
541
- } | null>;
542
- deleteDispatchAssignment(db: PostgresJsDatabase, id: string): Promise<{
543
- id: string;
544
- } | null>;
545
- listDispatchLegs(db: PostgresJsDatabase, query: GroundDispatchLegListQuery): Promise<{
546
- data: {
547
- id: string;
548
- dispatchId: string;
549
- sequence: number;
550
- legType: "pickup" | "stop" | "dropoff" | "deadhead";
551
- facilityId: string | null;
552
- addressId: string | null;
553
- scheduledAt: Date | null;
554
- actualAt: Date | null;
555
- notes: string | null;
556
- metadata: Record<string, unknown> | null;
557
- createdAt: Date;
558
- updatedAt: Date;
559
- }[];
560
- total: number;
561
- limit: number;
562
- offset: number;
563
- }>;
564
- getDispatchLegById(db: PostgresJsDatabase, id: string): Promise<{
565
- id: string;
566
- dispatchId: string;
567
- sequence: number;
568
- legType: "pickup" | "stop" | "dropoff" | "deadhead";
569
- facilityId: string | null;
570
- addressId: string | null;
571
- scheduledAt: Date | null;
572
- actualAt: Date | null;
573
- notes: string | null;
574
- metadata: Record<string, unknown> | null;
575
- createdAt: Date;
576
- updatedAt: Date;
577
- } | null>;
578
- createDispatchLeg(db: PostgresJsDatabase, data: CreateGroundDispatchLegInput): Promise<{
579
- id: string;
580
- notes: string | null;
581
- metadata: Record<string, unknown> | null;
582
- createdAt: Date;
583
- updatedAt: Date;
584
- facilityId: string | null;
585
- dispatchId: string;
586
- addressId: string | null;
587
- sequence: number;
588
- legType: "pickup" | "stop" | "dropoff" | "deadhead";
589
- scheduledAt: Date | null;
590
- actualAt: Date | null;
591
- } | undefined>;
592
- updateDispatchLeg(db: PostgresJsDatabase, id: string, data: UpdateGroundDispatchLegInput): Promise<{
593
- id: string;
594
- dispatchId: string;
595
- sequence: number;
596
- legType: "pickup" | "stop" | "dropoff" | "deadhead";
597
- facilityId: string | null;
598
- addressId: string | null;
599
- scheduledAt: Date | null;
600
- actualAt: Date | null;
601
- notes: string | null;
602
- metadata: Record<string, unknown> | null;
603
- createdAt: Date;
604
- updatedAt: Date;
605
- } | null>;
606
- deleteDispatchLeg(db: PostgresJsDatabase, id: string): Promise<{
607
- id: string;
608
- } | null>;
609
- listDispatchPassengers(db: PostgresJsDatabase, query: GroundDispatchPassengerListQuery): Promise<{
610
- data: {
611
- id: string;
612
- dispatchId: string;
613
- participantId: string | null;
614
- displayName: string | null;
615
- seatLabel: string | null;
616
- notes: string | null;
617
- createdAt: Date;
618
- updatedAt: Date;
619
- }[];
620
- total: number;
621
- limit: number;
622
- offset: number;
623
- }>;
624
- getDispatchPassengerById(db: PostgresJsDatabase, id: string): Promise<{
625
- id: string;
626
- dispatchId: string;
627
- participantId: string | null;
628
- displayName: string | null;
629
- seatLabel: string | null;
630
- notes: string | null;
631
- createdAt: Date;
632
- updatedAt: Date;
633
- } | null>;
634
- createDispatchPassenger(db: PostgresJsDatabase, data: CreateGroundDispatchPassengerInput): Promise<{
635
- id: string;
636
- notes: string | null;
637
- createdAt: Date;
638
- updatedAt: Date;
639
- dispatchId: string;
640
- participantId: string | null;
641
- displayName: string | null;
642
- seatLabel: string | null;
643
- } | undefined>;
644
- updateDispatchPassenger(db: PostgresJsDatabase, id: string, data: UpdateGroundDispatchPassengerInput): Promise<{
645
- id: string;
646
- dispatchId: string;
647
- participantId: string | null;
648
- displayName: string | null;
649
- seatLabel: string | null;
650
- notes: string | null;
651
- createdAt: Date;
652
- updatedAt: Date;
653
- } | null>;
654
- deleteDispatchPassenger(db: PostgresJsDatabase, id: string): Promise<{
655
- id: string;
656
- } | null>;
657
- listDriverShifts(db: PostgresJsDatabase, query: GroundDriverShiftListQuery): Promise<{
658
- data: {
659
- id: string;
660
- driverId: string;
661
- operatorId: string | null;
662
- facilityId: string | null;
663
- startsAt: Date;
664
- endsAt: Date;
665
- status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
666
- notes: string | null;
667
- metadata: Record<string, unknown> | null;
668
- createdAt: Date;
669
- updatedAt: Date;
670
- }[];
671
- total: number;
672
- limit: number;
673
- offset: number;
674
- }>;
675
- getDriverShiftById(db: PostgresJsDatabase, id: string): Promise<{
676
- id: string;
677
- driverId: string;
678
- operatorId: string | null;
679
- facilityId: string | null;
680
- startsAt: Date;
681
- endsAt: Date;
682
- status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
683
- notes: string | null;
684
- metadata: Record<string, unknown> | null;
685
- createdAt: Date;
686
- updatedAt: Date;
687
- } | null>;
688
- createDriverShift(db: PostgresJsDatabase, data: CreateGroundDriverShiftInput): Promise<{
689
- id: string;
690
- notes: string | null;
691
- metadata: Record<string, unknown> | null;
692
- createdAt: Date;
693
- updatedAt: Date;
694
- status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
695
- facilityId: string | null;
696
- operatorId: string | null;
697
- driverId: string;
698
- startsAt: Date;
699
- endsAt: Date;
700
- } | undefined>;
701
- updateDriverShift(db: PostgresJsDatabase, id: string, data: UpdateGroundDriverShiftInput): Promise<{
702
- id: string;
703
- driverId: string;
704
- operatorId: string | null;
705
- facilityId: string | null;
706
- startsAt: Date;
707
- endsAt: Date;
708
- status: "scheduled" | "completed" | "cancelled" | "available" | "on_duty";
709
- notes: string | null;
710
- metadata: Record<string, unknown> | null;
711
- createdAt: Date;
712
- updatedAt: Date;
713
- } | null>;
714
- deleteDriverShift(db: PostgresJsDatabase, id: string): Promise<{
715
- id: string;
716
- } | null>;
717
- listServiceIncidents(db: PostgresJsDatabase, query: GroundServiceIncidentListQuery): Promise<{
718
- data: {
719
- id: string;
720
- dispatchId: string;
721
- severity: "info" | "warning" | "critical";
722
- incidentType: string;
723
- resolutionStatus: "cancelled" | "open" | "mitigated" | "resolved";
724
- openedAt: Date;
725
- resolvedAt: Date | null;
726
- notes: string | null;
727
- metadata: Record<string, unknown> | null;
728
- createdAt: Date;
729
- updatedAt: Date;
730
- }[];
731
- total: number;
732
- limit: number;
733
- offset: number;
734
- }>;
735
- getServiceIncidentById(db: PostgresJsDatabase, id: string): Promise<{
736
- id: string;
737
- dispatchId: string;
738
- severity: "info" | "warning" | "critical";
739
- incidentType: string;
740
- resolutionStatus: "cancelled" | "open" | "mitigated" | "resolved";
741
- openedAt: Date;
742
- resolvedAt: Date | null;
743
- notes: string | null;
744
- metadata: Record<string, unknown> | null;
745
- createdAt: Date;
746
- updatedAt: Date;
747
- } | null>;
748
- createServiceIncident(db: PostgresJsDatabase, data: CreateGroundServiceIncidentInput): Promise<{
749
- id: string;
750
- notes: string | null;
751
- metadata: Record<string, unknown> | null;
752
- createdAt: Date;
753
- updatedAt: Date;
754
- dispatchId: string;
755
- severity: "info" | "warning" | "critical";
756
- incidentType: string;
757
- resolutionStatus: "cancelled" | "open" | "mitigated" | "resolved";
758
- openedAt: Date;
759
- resolvedAt: Date | null;
760
- } | undefined>;
761
- updateServiceIncident(db: PostgresJsDatabase, id: string, data: UpdateGroundServiceIncidentInput): Promise<{
762
- id: string;
763
- dispatchId: string;
764
- severity: "info" | "warning" | "critical";
765
- incidentType: string;
766
- resolutionStatus: "cancelled" | "open" | "mitigated" | "resolved";
767
- openedAt: Date;
768
- resolvedAt: Date | null;
769
- notes: string | null;
770
- metadata: Record<string, unknown> | null;
771
- createdAt: Date;
772
- updatedAt: Date;
773
- } | null>;
774
- deleteServiceIncident(db: PostgresJsDatabase, id: string): Promise<{
775
- id: string;
776
- } | null>;
777
- listDispatchCheckpoints(db: PostgresJsDatabase, query: GroundDispatchCheckpointListQuery): Promise<{
778
- data: {
779
- id: string;
780
- dispatchId: string;
781
- sequence: number;
782
- checkpointType: string;
783
- status: "cancelled" | "pending" | "reached" | "missed";
784
- plannedAt: Date | null;
785
- actualAt: Date | null;
786
- facilityId: string | null;
787
- addressId: string | null;
788
- notes: string | null;
789
- metadata: Record<string, unknown> | null;
790
- createdAt: Date;
791
- updatedAt: Date;
792
- }[];
793
- total: number;
794
- limit: number;
795
- offset: number;
796
- }>;
797
- getDispatchCheckpointById(db: PostgresJsDatabase, id: string): Promise<{
798
- id: string;
799
- dispatchId: string;
800
- sequence: number;
801
- checkpointType: string;
802
- status: "cancelled" | "pending" | "reached" | "missed";
803
- plannedAt: Date | null;
804
- actualAt: Date | null;
805
- facilityId: string | null;
806
- addressId: string | null;
807
- notes: string | null;
808
- metadata: Record<string, unknown> | null;
809
- createdAt: Date;
810
- updatedAt: Date;
811
- } | null>;
812
- createDispatchCheckpoint(db: PostgresJsDatabase, data: CreateGroundDispatchCheckpointInput): Promise<{
813
- id: string;
814
- notes: string | null;
815
- metadata: Record<string, unknown> | null;
816
- createdAt: Date;
817
- updatedAt: Date;
818
- status: "cancelled" | "pending" | "reached" | "missed";
819
- facilityId: string | null;
820
- dispatchId: string;
821
- addressId: string | null;
822
- sequence: number;
823
- actualAt: Date | null;
824
- checkpointType: string;
825
- plannedAt: Date | null;
826
- } | undefined>;
827
- updateDispatchCheckpoint(db: PostgresJsDatabase, id: string, data: UpdateGroundDispatchCheckpointInput): Promise<{
828
- id: string;
829
- dispatchId: string;
830
- sequence: number;
831
- checkpointType: string;
832
- status: "cancelled" | "pending" | "reached" | "missed";
833
- plannedAt: Date | null;
834
- actualAt: Date | null;
835
- facilityId: string | null;
836
- addressId: string | null;
837
- notes: string | null;
838
- metadata: Record<string, unknown> | null;
839
- createdAt: Date;
840
- updatedAt: Date;
841
- } | null>;
842
- deleteDispatchCheckpoint(db: PostgresJsDatabase, id: string): Promise<{
843
- id: string;
844
- } | null>;
5
+ listOperators: typeof listOperators;
6
+ getOperatorById: typeof getOperatorById;
7
+ createOperator: typeof createOperator;
8
+ updateOperator: typeof updateOperator;
9
+ deleteOperator: typeof deleteOperator;
10
+ listVehicles: typeof listVehicles;
11
+ getVehicleById: typeof getVehicleById;
12
+ createVehicle: typeof createVehicle;
13
+ updateVehicle: typeof updateVehicle;
14
+ deleteVehicle: typeof deleteVehicle;
15
+ listDrivers: typeof listDrivers;
16
+ getDriverById: typeof getDriverById;
17
+ createDriver: typeof createDriver;
18
+ updateDriver: typeof updateDriver;
19
+ deleteDriver: typeof deleteDriver;
20
+ listTransferPreferences: typeof listTransferPreferences;
21
+ getTransferPreferenceById: typeof getTransferPreferenceById;
22
+ createTransferPreference: typeof createTransferPreference;
23
+ updateTransferPreference: typeof updateTransferPreference;
24
+ deleteTransferPreference: typeof deleteTransferPreference;
25
+ listDispatches: typeof listDispatches;
26
+ getDispatchById: typeof getDispatchById;
27
+ createDispatch: typeof createDispatch;
28
+ updateDispatch: typeof updateDispatch;
29
+ deleteDispatch: typeof deleteDispatch;
30
+ listExecutionEvents: typeof listExecutionEvents;
31
+ getExecutionEventById: typeof getExecutionEventById;
32
+ createExecutionEvent: typeof createExecutionEvent;
33
+ updateExecutionEvent: typeof updateExecutionEvent;
34
+ deleteExecutionEvent: typeof deleteExecutionEvent;
35
+ listDispatchAssignments: typeof listDispatchAssignments;
36
+ getDispatchAssignmentById: typeof getDispatchAssignmentById;
37
+ createDispatchAssignment: typeof createDispatchAssignment;
38
+ updateDispatchAssignment: typeof updateDispatchAssignment;
39
+ deleteDispatchAssignment: typeof deleteDispatchAssignment;
40
+ listDispatchLegs: typeof listDispatchLegs;
41
+ getDispatchLegById: typeof getDispatchLegById;
42
+ createDispatchLeg: typeof createDispatchLeg;
43
+ updateDispatchLeg: typeof updateDispatchLeg;
44
+ deleteDispatchLeg: typeof deleteDispatchLeg;
45
+ listDispatchPassengers: typeof listDispatchPassengers;
46
+ getDispatchPassengerById: typeof getDispatchPassengerById;
47
+ createDispatchPassenger: typeof createDispatchPassenger;
48
+ updateDispatchPassenger: typeof updateDispatchPassenger;
49
+ deleteDispatchPassenger: typeof deleteDispatchPassenger;
50
+ listDriverShifts: typeof listDriverShifts;
51
+ getDriverShiftById: typeof getDriverShiftById;
52
+ createDriverShift: typeof createDriverShift;
53
+ updateDriverShift: typeof updateDriverShift;
54
+ deleteDriverShift: typeof deleteDriverShift;
55
+ listServiceIncidents: typeof listServiceIncidents;
56
+ getServiceIncidentById: typeof getServiceIncidentById;
57
+ createServiceIncident: typeof createServiceIncident;
58
+ updateServiceIncident: typeof updateServiceIncident;
59
+ deleteServiceIncident: typeof deleteServiceIncident;
60
+ listDispatchCheckpoints: typeof listDispatchCheckpoints;
61
+ getDispatchCheckpointById: typeof getDispatchCheckpointById;
62
+ createDispatchCheckpoint: typeof createDispatchCheckpoint;
63
+ updateDispatchCheckpoint: typeof updateDispatchCheckpoint;
64
+ deleteDispatchCheckpoint: typeof deleteDispatchCheckpoint;
845
65
  };
846
- export {};
847
66
  //# sourceMappingURL=service.d.ts.map