@findatruck/shared-schemas 2.16.0 → 2.17.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/index.cjs CHANGED
@@ -51,9 +51,21 @@ __export(index_exports, {
51
51
  DeleteAnonymousDriverResponseSchema: () => DeleteAnonymousDriverResponseSchema,
52
52
  DeleteProviderAccountRequestSchema: () => DeleteProviderAccountRequestSchema,
53
53
  DeleteProviderAccountResponseSchema: () => DeleteProviderAccountResponseSchema,
54
+ DriverDailySummariesResponseSchema: () => DriverDailySummariesResponseSchema,
55
+ DriverDailySummarySchema: () => DriverDailySummarySchema,
56
+ DriverEnrichedSummariesRequestSchema: () => DriverEnrichedSummariesRequestSchema,
57
+ DriverEnrichedSummariesResponseSchema: () => DriverEnrichedSummariesResponseSchema,
54
58
  DriverRankingSchema: () => DriverRankingSchema,
55
59
  DriverRankingsRequestSchema: () => DriverRankingsRequestSchema,
56
60
  DriverRankingsResponseSchema: () => DriverRankingsResponseSchema,
61
+ DriverTripSchema: () => DriverTripSchema,
62
+ DriverTripsRequestSchema: () => DriverTripsRequestSchema,
63
+ DriverTripsResponseSchema: () => DriverTripsResponseSchema,
64
+ EnrichedPointSchema: () => EnrichedPointSchema,
65
+ EnrichedStopSchema: () => EnrichedStopSchema,
66
+ EnrichedTripSummaryRequestSchema: () => EnrichedTripSummaryRequestSchema,
67
+ EnrichedTripSummaryResponseSchema: () => EnrichedTripSummaryResponseSchema,
68
+ EnrichedTripSummarySchema: () => EnrichedTripSummarySchema,
57
69
  GomotiveAuthDataSchema: () => GomotiveAuthDataSchema,
58
70
  ManualBatchEntrySchema: () => ManualBatchEntrySchema,
59
71
  ManualBatchRequestSchema: () => ManualBatchRequestSchema,
@@ -318,34 +330,105 @@ var ManualBatchResponseSchema = import_zod9.z.object({
318
330
  telemetry: import_zod9.z.array(ManualBatchTelemetrySchema).describe("Array of inserted telemetry records")
319
331
  }).describe("Response schema for manual batch telemetry insertion");
320
332
 
321
- // src/auth-data.ts
333
+ // src/schemas/trips/driver-trips.ts
322
334
  var import_zod10 = require("zod");
323
- var GomotiveAuthDataSchema = import_zod10.z.object({
324
- kind: import_zod10.z.literal("gomotive"),
325
- token: import_zod10.z.string(),
326
- ownerOperator: import_zod10.z.boolean()
335
+ var DriverTripsRequestSchema = import_zod10.z.object({
336
+ driver_id: import_zod10.z.string().uuid(),
337
+ start_date: import_zod10.z.string(),
338
+ // YYYY-MM-DD
339
+ end_date: import_zod10.z.string()
340
+ // YYYY-MM-DD
341
+ });
342
+ var DriverTripSchema = import_zod10.z.object({
343
+ id: import_zod10.z.number(),
344
+ start_time: import_zod10.z.string(),
345
+ end_time: import_zod10.z.string(),
346
+ point_count: import_zod10.z.number(),
347
+ polyline: import_zod10.z.string().nullable(),
348
+ highways: import_zod10.z.array(import_zod10.z.string()).nullable(),
349
+ total_miles: import_zod10.z.number().nullable(),
350
+ avg_speed_mph: import_zod10.z.number().nullable(),
351
+ miles_by_weather: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number()).nullable(),
352
+ miles_by_light: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number()).nullable()
353
+ });
354
+ var DriverTripsResponseSchema = import_zod10.z.array(DriverTripSchema);
355
+ var DriverDailySummarySchema = import_zod10.z.object({
356
+ summary_date: import_zod10.z.string(),
357
+ total_miles: import_zod10.z.number(),
358
+ trip_count: import_zod10.z.number(),
359
+ point_count: import_zod10.z.number(),
360
+ polyline: import_zod10.z.string().nullable(),
361
+ highways: import_zod10.z.array(import_zod10.z.string()).nullable(),
362
+ avg_speed_mph: import_zod10.z.number().nullable(),
363
+ miles_by_weather: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number()).nullable(),
364
+ miles_by_light: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number()).nullable()
365
+ });
366
+ var DriverDailySummariesResponseSchema = import_zod10.z.array(DriverDailySummarySchema);
367
+
368
+ // src/schemas/trips/enriched-trip-summary.ts
369
+ var import_zod11 = require("zod");
370
+ var EnrichedTripSummaryRequestSchema = import_zod11.z.object({
371
+ trip_id: import_zod11.z.number()
372
+ });
373
+ var DriverEnrichedSummariesRequestSchema = import_zod11.z.object({
374
+ driver_id: import_zod11.z.string().uuid(),
375
+ start_date: import_zod11.z.string(),
376
+ end_date: import_zod11.z.string()
377
+ });
378
+ var EnrichedStopSchema = import_zod11.z.object({
379
+ duration_seconds: import_zod11.z.number()
327
380
  });
328
- var VistaAuthDataSchema = import_zod10.z.object({
329
- kind: import_zod10.z.literal("vista"),
330
- driverId: import_zod10.z.string(),
331
- cookie: import_zod10.z.string()
381
+ var EnrichedPointSchema = import_zod11.z.object({
382
+ lat: import_zod11.z.number(),
383
+ lon: import_zod11.z.number(),
384
+ timestamp: import_zod11.z.string(),
385
+ speed_mph: import_zod11.z.number().nullable(),
386
+ heading: import_zod11.z.number().nullable(),
387
+ altitude_feet: import_zod11.z.number().nullable(),
388
+ weather_condition: import_zod11.z.string().nullable(),
389
+ temperature_f: import_zod11.z.number().nullable(),
390
+ visibility_miles: import_zod11.z.number().nullable(),
391
+ light_condition: import_zod11.z.string().nullable(),
392
+ stop: EnrichedStopSchema.nullable()
332
393
  });
333
- var MockAuthDataSchema = import_zod10.z.object({
334
- kind: import_zod10.z.literal("mock"),
335
- cookie: import_zod10.z.string()
394
+ var EnrichedTripSummarySchema = import_zod11.z.object({
395
+ trip_id: import_zod11.z.number(),
396
+ driver_id: import_zod11.z.string(),
397
+ start_time: import_zod11.z.string(),
398
+ end_time: import_zod11.z.string(),
399
+ points: import_zod11.z.array(EnrichedPointSchema)
336
400
  });
337
- var NoneAuthDataSchema = import_zod10.z.object({
338
- kind: import_zod10.z.literal("none")
401
+ var EnrichedTripSummaryResponseSchema = EnrichedTripSummarySchema;
402
+ var DriverEnrichedSummariesResponseSchema = import_zod11.z.array(EnrichedTripSummarySchema);
403
+
404
+ // src/auth-data.ts
405
+ var import_zod12 = require("zod");
406
+ var GomotiveAuthDataSchema = import_zod12.z.object({
407
+ kind: import_zod12.z.literal("gomotive"),
408
+ token: import_zod12.z.string(),
409
+ ownerOperator: import_zod12.z.boolean()
410
+ });
411
+ var VistaAuthDataSchema = import_zod12.z.object({
412
+ kind: import_zod12.z.literal("vista"),
413
+ driverId: import_zod12.z.string(),
414
+ cookie: import_zod12.z.string()
415
+ });
416
+ var MockAuthDataSchema = import_zod12.z.object({
417
+ kind: import_zod12.z.literal("mock"),
418
+ cookie: import_zod12.z.string()
339
419
  });
340
- var ProviderAuthDataSchema = import_zod10.z.discriminatedUnion("kind", [
420
+ var NoneAuthDataSchema = import_zod12.z.object({
421
+ kind: import_zod12.z.literal("none")
422
+ });
423
+ var ProviderAuthDataSchema = import_zod12.z.discriminatedUnion("kind", [
341
424
  GomotiveAuthDataSchema,
342
425
  VistaAuthDataSchema,
343
426
  MockAuthDataSchema,
344
427
  NoneAuthDataSchema
345
428
  ]);
346
- var LegacyVistaAuthSchema = import_zod10.z.object({
347
- driverId: import_zod10.z.string(),
348
- cookie: import_zod10.z.string()
429
+ var LegacyVistaAuthSchema = import_zod12.z.object({
430
+ driverId: import_zod12.z.string(),
431
+ cookie: import_zod12.z.string()
349
432
  });
350
433
  function serializeAuthData(data) {
351
434
  if (data.kind === "none") {
@@ -381,46 +464,46 @@ function deserializeAuthData(authToken) {
381
464
  }
382
465
 
383
466
  // src/browser-auth.ts
384
- var import_zod11 = require("zod");
385
- var CapturedTrafficEntrySchema = import_zod11.z.object({
386
- method: import_zod11.z.string(),
387
- url: import_zod11.z.string(),
388
- status: import_zod11.z.number(),
389
- responseBody: import_zod11.z.string().optional()
390
- });
391
- var BrowserAuthRequestSchema = import_zod11.z.object({
392
- providerStub: import_zod11.z.string(),
393
- providerUrl: import_zod11.z.string(),
394
- username: import_zod11.z.string(),
395
- encryptedPassword: import_zod11.z.string(),
396
- captureTraffic: import_zod11.z.boolean().optional()
397
- });
398
- var BrowserAuthSuccessSchema = import_zod11.z.object({
399
- success: import_zod11.z.literal(true),
467
+ var import_zod13 = require("zod");
468
+ var CapturedTrafficEntrySchema = import_zod13.z.object({
469
+ method: import_zod13.z.string(),
470
+ url: import_zod13.z.string(),
471
+ status: import_zod13.z.number(),
472
+ responseBody: import_zod13.z.string().optional()
473
+ });
474
+ var BrowserAuthRequestSchema = import_zod13.z.object({
475
+ providerStub: import_zod13.z.string(),
476
+ providerUrl: import_zod13.z.string(),
477
+ username: import_zod13.z.string(),
478
+ encryptedPassword: import_zod13.z.string(),
479
+ captureTraffic: import_zod13.z.boolean().optional()
480
+ });
481
+ var BrowserAuthSuccessSchema = import_zod13.z.object({
482
+ success: import_zod13.z.literal(true),
400
483
  authData: ProviderAuthDataSchema,
401
- capturedTraffic: import_zod11.z.array(CapturedTrafficEntrySchema).optional()
484
+ capturedTraffic: import_zod13.z.array(CapturedTrafficEntrySchema).optional()
402
485
  });
403
- var BrowserAuthFailureSchema = import_zod11.z.object({
404
- success: import_zod11.z.literal(false),
405
- error: import_zod11.z.string()
486
+ var BrowserAuthFailureSchema = import_zod13.z.object({
487
+ success: import_zod13.z.literal(false),
488
+ error: import_zod13.z.string()
406
489
  });
407
- var BrowserAuthResponseSchema = import_zod11.z.discriminatedUnion("success", [
490
+ var BrowserAuthResponseSchema = import_zod13.z.discriminatedUnion("success", [
408
491
  BrowserAuthSuccessSchema,
409
492
  BrowserAuthFailureSchema
410
493
  ]);
411
- var CrawlPageSchema = import_zod11.z.object({
412
- url: import_zod11.z.string(),
413
- html: import_zod11.z.string()
494
+ var CrawlPageSchema = import_zod13.z.object({
495
+ url: import_zod13.z.string(),
496
+ html: import_zod13.z.string()
414
497
  });
415
- var BrowserCrawlSuccessSchema = import_zod11.z.object({
416
- success: import_zod11.z.literal(true),
417
- pages: import_zod11.z.array(CrawlPageSchema)
498
+ var BrowserCrawlSuccessSchema = import_zod13.z.object({
499
+ success: import_zod13.z.literal(true),
500
+ pages: import_zod13.z.array(CrawlPageSchema)
418
501
  });
419
- var BrowserCrawlFailureSchema = import_zod11.z.object({
420
- success: import_zod11.z.literal(false),
421
- error: import_zod11.z.string()
502
+ var BrowserCrawlFailureSchema = import_zod13.z.object({
503
+ success: import_zod13.z.literal(false),
504
+ error: import_zod13.z.string()
422
505
  });
423
- var BrowserCrawlResponseSchema = import_zod11.z.discriminatedUnion("success", [
506
+ var BrowserCrawlResponseSchema = import_zod13.z.discriminatedUnion("success", [
424
507
  BrowserCrawlSuccessSchema,
425
508
  BrowserCrawlFailureSchema
426
509
  ]);
@@ -447,9 +530,21 @@ var BrowserCrawlResponseSchema = import_zod11.z.discriminatedUnion("success", [
447
530
  DeleteAnonymousDriverResponseSchema,
448
531
  DeleteProviderAccountRequestSchema,
449
532
  DeleteProviderAccountResponseSchema,
533
+ DriverDailySummariesResponseSchema,
534
+ DriverDailySummarySchema,
535
+ DriverEnrichedSummariesRequestSchema,
536
+ DriverEnrichedSummariesResponseSchema,
450
537
  DriverRankingSchema,
451
538
  DriverRankingsRequestSchema,
452
539
  DriverRankingsResponseSchema,
540
+ DriverTripSchema,
541
+ DriverTripsRequestSchema,
542
+ DriverTripsResponseSchema,
543
+ EnrichedPointSchema,
544
+ EnrichedStopSchema,
545
+ EnrichedTripSummaryRequestSchema,
546
+ EnrichedTripSummaryResponseSchema,
547
+ EnrichedTripSummarySchema,
453
548
  GomotiveAuthDataSchema,
454
549
  ManualBatchEntrySchema,
455
550
  ManualBatchRequestSchema,
package/dist/index.d.cts CHANGED
@@ -196,6 +196,160 @@ type ManualBatchRequest = z$1.infer<typeof ManualBatchRequestSchema>;
196
196
  type ManualBatchTelemetry = z$1.infer<typeof ManualBatchTelemetrySchema>;
197
197
  type ManualBatchResponse = z$1.infer<typeof ManualBatchResponseSchema>;
198
198
 
199
+ declare const DriverTripsRequestSchema: z$1.ZodObject<{
200
+ driver_id: z$1.ZodString;
201
+ start_date: z$1.ZodString;
202
+ end_date: z$1.ZodString;
203
+ }, z$1.core.$strip>;
204
+ type DriverTripsRequest = z$1.infer<typeof DriverTripsRequestSchema>;
205
+ declare const DriverTripSchema: z$1.ZodObject<{
206
+ id: z$1.ZodNumber;
207
+ start_time: z$1.ZodString;
208
+ end_time: z$1.ZodString;
209
+ point_count: z$1.ZodNumber;
210
+ polyline: z$1.ZodNullable<z$1.ZodString>;
211
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
212
+ total_miles: z$1.ZodNullable<z$1.ZodNumber>;
213
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
214
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
215
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
216
+ }, z$1.core.$strip>;
217
+ type DriverTrip = z$1.infer<typeof DriverTripSchema>;
218
+ declare const DriverTripsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
219
+ id: z$1.ZodNumber;
220
+ start_time: z$1.ZodString;
221
+ end_time: z$1.ZodString;
222
+ point_count: z$1.ZodNumber;
223
+ polyline: z$1.ZodNullable<z$1.ZodString>;
224
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
225
+ total_miles: z$1.ZodNullable<z$1.ZodNumber>;
226
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
227
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
228
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
229
+ }, z$1.core.$strip>>;
230
+ type DriverTripsResponse = z$1.infer<typeof DriverTripsResponseSchema>;
231
+ declare const DriverDailySummarySchema: z$1.ZodObject<{
232
+ summary_date: z$1.ZodString;
233
+ total_miles: z$1.ZodNumber;
234
+ trip_count: z$1.ZodNumber;
235
+ point_count: z$1.ZodNumber;
236
+ polyline: z$1.ZodNullable<z$1.ZodString>;
237
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
238
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
239
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
240
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
241
+ }, z$1.core.$strip>;
242
+ type DriverDailySummary = z$1.infer<typeof DriverDailySummarySchema>;
243
+ declare const DriverDailySummariesResponseSchema: z$1.ZodArray<z$1.ZodObject<{
244
+ summary_date: z$1.ZodString;
245
+ total_miles: z$1.ZodNumber;
246
+ trip_count: z$1.ZodNumber;
247
+ point_count: z$1.ZodNumber;
248
+ polyline: z$1.ZodNullable<z$1.ZodString>;
249
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
250
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
251
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
252
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
253
+ }, z$1.core.$strip>>;
254
+ type DriverDailySummariesResponse = z$1.infer<typeof DriverDailySummariesResponseSchema>;
255
+
256
+ declare const EnrichedTripSummaryRequestSchema: z$1.ZodObject<{
257
+ trip_id: z$1.ZodNumber;
258
+ }, z$1.core.$strip>;
259
+ type EnrichedTripSummaryRequest = z$1.infer<typeof EnrichedTripSummaryRequestSchema>;
260
+ declare const DriverEnrichedSummariesRequestSchema: z$1.ZodObject<{
261
+ driver_id: z$1.ZodString;
262
+ start_date: z$1.ZodString;
263
+ end_date: z$1.ZodString;
264
+ }, z$1.core.$strip>;
265
+ type DriverEnrichedSummariesRequest = z$1.infer<typeof DriverEnrichedSummariesRequestSchema>;
266
+ declare const EnrichedStopSchema: z$1.ZodObject<{
267
+ duration_seconds: z$1.ZodNumber;
268
+ }, z$1.core.$strip>;
269
+ type EnrichedStop = z$1.infer<typeof EnrichedStopSchema>;
270
+ declare const EnrichedPointSchema: z$1.ZodObject<{
271
+ lat: z$1.ZodNumber;
272
+ lon: z$1.ZodNumber;
273
+ timestamp: z$1.ZodString;
274
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
275
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
276
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
277
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
278
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
279
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
280
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
281
+ stop: z$1.ZodNullable<z$1.ZodObject<{
282
+ duration_seconds: z$1.ZodNumber;
283
+ }, z$1.core.$strip>>;
284
+ }, z$1.core.$strip>;
285
+ type EnrichedPoint = z$1.infer<typeof EnrichedPointSchema>;
286
+ declare const EnrichedTripSummarySchema: z$1.ZodObject<{
287
+ trip_id: z$1.ZodNumber;
288
+ driver_id: z$1.ZodString;
289
+ start_time: z$1.ZodString;
290
+ end_time: z$1.ZodString;
291
+ points: z$1.ZodArray<z$1.ZodObject<{
292
+ lat: z$1.ZodNumber;
293
+ lon: z$1.ZodNumber;
294
+ timestamp: z$1.ZodString;
295
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
296
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
297
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
298
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
299
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
300
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
301
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
302
+ stop: z$1.ZodNullable<z$1.ZodObject<{
303
+ duration_seconds: z$1.ZodNumber;
304
+ }, z$1.core.$strip>>;
305
+ }, z$1.core.$strip>>;
306
+ }, z$1.core.$strip>;
307
+ type EnrichedTripSummary = z$1.infer<typeof EnrichedTripSummarySchema>;
308
+ declare const EnrichedTripSummaryResponseSchema: z$1.ZodObject<{
309
+ trip_id: z$1.ZodNumber;
310
+ driver_id: z$1.ZodString;
311
+ start_time: z$1.ZodString;
312
+ end_time: z$1.ZodString;
313
+ points: z$1.ZodArray<z$1.ZodObject<{
314
+ lat: z$1.ZodNumber;
315
+ lon: z$1.ZodNumber;
316
+ timestamp: z$1.ZodString;
317
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
318
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
319
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
320
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
321
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
322
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
323
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
324
+ stop: z$1.ZodNullable<z$1.ZodObject<{
325
+ duration_seconds: z$1.ZodNumber;
326
+ }, z$1.core.$strip>>;
327
+ }, z$1.core.$strip>>;
328
+ }, z$1.core.$strip>;
329
+ type EnrichedTripSummaryResponse = z$1.infer<typeof EnrichedTripSummaryResponseSchema>;
330
+ declare const DriverEnrichedSummariesResponseSchema: z$1.ZodArray<z$1.ZodObject<{
331
+ trip_id: z$1.ZodNumber;
332
+ driver_id: z$1.ZodString;
333
+ start_time: z$1.ZodString;
334
+ end_time: z$1.ZodString;
335
+ points: z$1.ZodArray<z$1.ZodObject<{
336
+ lat: z$1.ZodNumber;
337
+ lon: z$1.ZodNumber;
338
+ timestamp: z$1.ZodString;
339
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
340
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
341
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
342
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
343
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
344
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
345
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
346
+ stop: z$1.ZodNullable<z$1.ZodObject<{
347
+ duration_seconds: z$1.ZodNumber;
348
+ }, z$1.core.$strip>>;
349
+ }, z$1.core.$strip>>;
350
+ }, z$1.core.$strip>>;
351
+ type DriverEnrichedSummariesResponse = z$1.infer<typeof DriverEnrichedSummariesResponseSchema>;
352
+
199
353
  declare const GomotiveAuthDataSchema: z$1.ZodObject<{
200
354
  kind: z$1.ZodLiteral<"gomotive">;
201
355
  token: z$1.ZodString;
@@ -341,4 +495,4 @@ declare const BrowserCrawlResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObje
341
495
  }, z$1.core.$strip>], "success">;
342
496
  type BrowserCrawlResponse = z$1.infer<typeof BrowserCrawlResponseSchema>;
343
497
 
344
- export { type AnonymousDriverErrorResponse, type AnonymousDriverErrorResponseData, AnonymousDriverErrorResponseSchema, type AnonymousDriverResponse, type AnonymousDriverResponseData, AnonymousDriverResponseSchema, BrowserAuthFailureSchema, type BrowserAuthRequest, BrowserAuthRequestSchema, type BrowserAuthResponse, BrowserAuthResponseSchema, BrowserAuthSuccessSchema, BrowserCrawlFailureSchema, type BrowserCrawlResponse, BrowserCrawlResponseSchema, BrowserCrawlSuccessSchema, type CapturedTrafficEntry, CapturedTrafficEntrySchema, CrawlPageSchema, type CreateAnonymousDriverBody, type CreateAnonymousDriverBodyData, CreateAnonymousDriverBodySchema, type DeleteAnonymousDriverParams, DeleteAnonymousDriverParamsSchema, type DeleteAnonymousDriverResponse, DeleteAnonymousDriverResponseSchema, type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type GomotiveAuthData, GomotiveAuthDataSchema, type ManualBatchEntry, ManualBatchEntrySchema, type ManualBatchRequest, ManualBatchRequestSchema, type ManualBatchResponse, ManualBatchResponseSchema, type ManualBatchTelemetry, ManualBatchTelemetrySchema, type MockAuthData, MockAuthDataSchema, type NoneAuthData, NoneAuthDataSchema, type ProviderAuthData, ProviderAuthDataSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema, type VistaAuthData, VistaAuthDataSchema, deserializeAuthData, serializeAuthData };
498
+ export { type AnonymousDriverErrorResponse, type AnonymousDriverErrorResponseData, AnonymousDriverErrorResponseSchema, type AnonymousDriverResponse, type AnonymousDriverResponseData, AnonymousDriverResponseSchema, BrowserAuthFailureSchema, type BrowserAuthRequest, BrowserAuthRequestSchema, type BrowserAuthResponse, BrowserAuthResponseSchema, BrowserAuthSuccessSchema, BrowserCrawlFailureSchema, type BrowserCrawlResponse, BrowserCrawlResponseSchema, BrowserCrawlSuccessSchema, type CapturedTrafficEntry, CapturedTrafficEntrySchema, CrawlPageSchema, type CreateAnonymousDriverBody, type CreateAnonymousDriverBodyData, CreateAnonymousDriverBodySchema, type DeleteAnonymousDriverParams, DeleteAnonymousDriverParamsSchema, type DeleteAnonymousDriverResponse, DeleteAnonymousDriverResponseSchema, type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverDailySummariesResponse, DriverDailySummariesResponseSchema, type DriverDailySummary, DriverDailySummarySchema, type DriverEnrichedSummariesRequest, DriverEnrichedSummariesRequestSchema, type DriverEnrichedSummariesResponse, DriverEnrichedSummariesResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type DriverTrip, DriverTripSchema, type DriverTripsRequest, DriverTripsRequestSchema, type DriverTripsResponse, DriverTripsResponseSchema, type EnrichedPoint, EnrichedPointSchema, type EnrichedStop, EnrichedStopSchema, type EnrichedTripSummary, type EnrichedTripSummaryRequest, EnrichedTripSummaryRequestSchema, type EnrichedTripSummaryResponse, EnrichedTripSummaryResponseSchema, EnrichedTripSummarySchema, type GomotiveAuthData, GomotiveAuthDataSchema, type ManualBatchEntry, ManualBatchEntrySchema, type ManualBatchRequest, ManualBatchRequestSchema, type ManualBatchResponse, ManualBatchResponseSchema, type ManualBatchTelemetry, ManualBatchTelemetrySchema, type MockAuthData, MockAuthDataSchema, type NoneAuthData, NoneAuthDataSchema, type ProviderAuthData, ProviderAuthDataSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema, type VistaAuthData, VistaAuthDataSchema, deserializeAuthData, serializeAuthData };
package/dist/index.d.ts CHANGED
@@ -196,6 +196,160 @@ type ManualBatchRequest = z$1.infer<typeof ManualBatchRequestSchema>;
196
196
  type ManualBatchTelemetry = z$1.infer<typeof ManualBatchTelemetrySchema>;
197
197
  type ManualBatchResponse = z$1.infer<typeof ManualBatchResponseSchema>;
198
198
 
199
+ declare const DriverTripsRequestSchema: z$1.ZodObject<{
200
+ driver_id: z$1.ZodString;
201
+ start_date: z$1.ZodString;
202
+ end_date: z$1.ZodString;
203
+ }, z$1.core.$strip>;
204
+ type DriverTripsRequest = z$1.infer<typeof DriverTripsRequestSchema>;
205
+ declare const DriverTripSchema: z$1.ZodObject<{
206
+ id: z$1.ZodNumber;
207
+ start_time: z$1.ZodString;
208
+ end_time: z$1.ZodString;
209
+ point_count: z$1.ZodNumber;
210
+ polyline: z$1.ZodNullable<z$1.ZodString>;
211
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
212
+ total_miles: z$1.ZodNullable<z$1.ZodNumber>;
213
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
214
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
215
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
216
+ }, z$1.core.$strip>;
217
+ type DriverTrip = z$1.infer<typeof DriverTripSchema>;
218
+ declare const DriverTripsResponseSchema: z$1.ZodArray<z$1.ZodObject<{
219
+ id: z$1.ZodNumber;
220
+ start_time: z$1.ZodString;
221
+ end_time: z$1.ZodString;
222
+ point_count: z$1.ZodNumber;
223
+ polyline: z$1.ZodNullable<z$1.ZodString>;
224
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
225
+ total_miles: z$1.ZodNullable<z$1.ZodNumber>;
226
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
227
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
228
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
229
+ }, z$1.core.$strip>>;
230
+ type DriverTripsResponse = z$1.infer<typeof DriverTripsResponseSchema>;
231
+ declare const DriverDailySummarySchema: z$1.ZodObject<{
232
+ summary_date: z$1.ZodString;
233
+ total_miles: z$1.ZodNumber;
234
+ trip_count: z$1.ZodNumber;
235
+ point_count: z$1.ZodNumber;
236
+ polyline: z$1.ZodNullable<z$1.ZodString>;
237
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
238
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
239
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
240
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
241
+ }, z$1.core.$strip>;
242
+ type DriverDailySummary = z$1.infer<typeof DriverDailySummarySchema>;
243
+ declare const DriverDailySummariesResponseSchema: z$1.ZodArray<z$1.ZodObject<{
244
+ summary_date: z$1.ZodString;
245
+ total_miles: z$1.ZodNumber;
246
+ trip_count: z$1.ZodNumber;
247
+ point_count: z$1.ZodNumber;
248
+ polyline: z$1.ZodNullable<z$1.ZodString>;
249
+ highways: z$1.ZodNullable<z$1.ZodArray<z$1.ZodString>>;
250
+ avg_speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
251
+ miles_by_weather: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
252
+ miles_by_light: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodNumber>>;
253
+ }, z$1.core.$strip>>;
254
+ type DriverDailySummariesResponse = z$1.infer<typeof DriverDailySummariesResponseSchema>;
255
+
256
+ declare const EnrichedTripSummaryRequestSchema: z$1.ZodObject<{
257
+ trip_id: z$1.ZodNumber;
258
+ }, z$1.core.$strip>;
259
+ type EnrichedTripSummaryRequest = z$1.infer<typeof EnrichedTripSummaryRequestSchema>;
260
+ declare const DriverEnrichedSummariesRequestSchema: z$1.ZodObject<{
261
+ driver_id: z$1.ZodString;
262
+ start_date: z$1.ZodString;
263
+ end_date: z$1.ZodString;
264
+ }, z$1.core.$strip>;
265
+ type DriverEnrichedSummariesRequest = z$1.infer<typeof DriverEnrichedSummariesRequestSchema>;
266
+ declare const EnrichedStopSchema: z$1.ZodObject<{
267
+ duration_seconds: z$1.ZodNumber;
268
+ }, z$1.core.$strip>;
269
+ type EnrichedStop = z$1.infer<typeof EnrichedStopSchema>;
270
+ declare const EnrichedPointSchema: z$1.ZodObject<{
271
+ lat: z$1.ZodNumber;
272
+ lon: z$1.ZodNumber;
273
+ timestamp: z$1.ZodString;
274
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
275
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
276
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
277
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
278
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
279
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
280
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
281
+ stop: z$1.ZodNullable<z$1.ZodObject<{
282
+ duration_seconds: z$1.ZodNumber;
283
+ }, z$1.core.$strip>>;
284
+ }, z$1.core.$strip>;
285
+ type EnrichedPoint = z$1.infer<typeof EnrichedPointSchema>;
286
+ declare const EnrichedTripSummarySchema: z$1.ZodObject<{
287
+ trip_id: z$1.ZodNumber;
288
+ driver_id: z$1.ZodString;
289
+ start_time: z$1.ZodString;
290
+ end_time: z$1.ZodString;
291
+ points: z$1.ZodArray<z$1.ZodObject<{
292
+ lat: z$1.ZodNumber;
293
+ lon: z$1.ZodNumber;
294
+ timestamp: z$1.ZodString;
295
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
296
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
297
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
298
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
299
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
300
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
301
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
302
+ stop: z$1.ZodNullable<z$1.ZodObject<{
303
+ duration_seconds: z$1.ZodNumber;
304
+ }, z$1.core.$strip>>;
305
+ }, z$1.core.$strip>>;
306
+ }, z$1.core.$strip>;
307
+ type EnrichedTripSummary = z$1.infer<typeof EnrichedTripSummarySchema>;
308
+ declare const EnrichedTripSummaryResponseSchema: z$1.ZodObject<{
309
+ trip_id: z$1.ZodNumber;
310
+ driver_id: z$1.ZodString;
311
+ start_time: z$1.ZodString;
312
+ end_time: z$1.ZodString;
313
+ points: z$1.ZodArray<z$1.ZodObject<{
314
+ lat: z$1.ZodNumber;
315
+ lon: z$1.ZodNumber;
316
+ timestamp: z$1.ZodString;
317
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
318
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
319
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
320
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
321
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
322
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
323
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
324
+ stop: z$1.ZodNullable<z$1.ZodObject<{
325
+ duration_seconds: z$1.ZodNumber;
326
+ }, z$1.core.$strip>>;
327
+ }, z$1.core.$strip>>;
328
+ }, z$1.core.$strip>;
329
+ type EnrichedTripSummaryResponse = z$1.infer<typeof EnrichedTripSummaryResponseSchema>;
330
+ declare const DriverEnrichedSummariesResponseSchema: z$1.ZodArray<z$1.ZodObject<{
331
+ trip_id: z$1.ZodNumber;
332
+ driver_id: z$1.ZodString;
333
+ start_time: z$1.ZodString;
334
+ end_time: z$1.ZodString;
335
+ points: z$1.ZodArray<z$1.ZodObject<{
336
+ lat: z$1.ZodNumber;
337
+ lon: z$1.ZodNumber;
338
+ timestamp: z$1.ZodString;
339
+ speed_mph: z$1.ZodNullable<z$1.ZodNumber>;
340
+ heading: z$1.ZodNullable<z$1.ZodNumber>;
341
+ altitude_feet: z$1.ZodNullable<z$1.ZodNumber>;
342
+ weather_condition: z$1.ZodNullable<z$1.ZodString>;
343
+ temperature_f: z$1.ZodNullable<z$1.ZodNumber>;
344
+ visibility_miles: z$1.ZodNullable<z$1.ZodNumber>;
345
+ light_condition: z$1.ZodNullable<z$1.ZodString>;
346
+ stop: z$1.ZodNullable<z$1.ZodObject<{
347
+ duration_seconds: z$1.ZodNumber;
348
+ }, z$1.core.$strip>>;
349
+ }, z$1.core.$strip>>;
350
+ }, z$1.core.$strip>>;
351
+ type DriverEnrichedSummariesResponse = z$1.infer<typeof DriverEnrichedSummariesResponseSchema>;
352
+
199
353
  declare const GomotiveAuthDataSchema: z$1.ZodObject<{
200
354
  kind: z$1.ZodLiteral<"gomotive">;
201
355
  token: z$1.ZodString;
@@ -341,4 +495,4 @@ declare const BrowserCrawlResponseSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObje
341
495
  }, z$1.core.$strip>], "success">;
342
496
  type BrowserCrawlResponse = z$1.infer<typeof BrowserCrawlResponseSchema>;
343
497
 
344
- export { type AnonymousDriverErrorResponse, type AnonymousDriverErrorResponseData, AnonymousDriverErrorResponseSchema, type AnonymousDriverResponse, type AnonymousDriverResponseData, AnonymousDriverResponseSchema, BrowserAuthFailureSchema, type BrowserAuthRequest, BrowserAuthRequestSchema, type BrowserAuthResponse, BrowserAuthResponseSchema, BrowserAuthSuccessSchema, BrowserCrawlFailureSchema, type BrowserCrawlResponse, BrowserCrawlResponseSchema, BrowserCrawlSuccessSchema, type CapturedTrafficEntry, CapturedTrafficEntrySchema, CrawlPageSchema, type CreateAnonymousDriverBody, type CreateAnonymousDriverBodyData, CreateAnonymousDriverBodySchema, type DeleteAnonymousDriverParams, DeleteAnonymousDriverParamsSchema, type DeleteAnonymousDriverResponse, DeleteAnonymousDriverResponseSchema, type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type GomotiveAuthData, GomotiveAuthDataSchema, type ManualBatchEntry, ManualBatchEntrySchema, type ManualBatchRequest, ManualBatchRequestSchema, type ManualBatchResponse, ManualBatchResponseSchema, type ManualBatchTelemetry, ManualBatchTelemetrySchema, type MockAuthData, MockAuthDataSchema, type NoneAuthData, NoneAuthDataSchema, type ProviderAuthData, ProviderAuthDataSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema, type VistaAuthData, VistaAuthDataSchema, deserializeAuthData, serializeAuthData };
498
+ export { type AnonymousDriverErrorResponse, type AnonymousDriverErrorResponseData, AnonymousDriverErrorResponseSchema, type AnonymousDriverResponse, type AnonymousDriverResponseData, AnonymousDriverResponseSchema, BrowserAuthFailureSchema, type BrowserAuthRequest, BrowserAuthRequestSchema, type BrowserAuthResponse, BrowserAuthResponseSchema, BrowserAuthSuccessSchema, BrowserCrawlFailureSchema, type BrowserCrawlResponse, BrowserCrawlResponseSchema, BrowserCrawlSuccessSchema, type CapturedTrafficEntry, CapturedTrafficEntrySchema, CrawlPageSchema, type CreateAnonymousDriverBody, type CreateAnonymousDriverBodyData, CreateAnonymousDriverBodySchema, type DeleteAnonymousDriverParams, DeleteAnonymousDriverParamsSchema, type DeleteAnonymousDriverResponse, DeleteAnonymousDriverResponseSchema, type DeleteProviderAccountRequest, type DeleteProviderAccountRequestData, DeleteProviderAccountRequestSchema, type DeleteProviderAccountResponse, type DeleteProviderAccountResponseData, DeleteProviderAccountResponseSchema, type DriverDailySummariesResponse, DriverDailySummariesResponseSchema, type DriverDailySummary, DriverDailySummarySchema, type DriverEnrichedSummariesRequest, DriverEnrichedSummariesRequestSchema, type DriverEnrichedSummariesResponse, DriverEnrichedSummariesResponseSchema, type DriverRanking, type DriverRankingData, DriverRankingSchema, type DriverRankingsRequest, type DriverRankingsRequestData, DriverRankingsRequestSchema, type DriverRankingsResponse, type DriverRankingsResponseData, DriverRankingsResponseSchema, type DriverTrip, DriverTripSchema, type DriverTripsRequest, DriverTripsRequestSchema, type DriverTripsResponse, DriverTripsResponseSchema, type EnrichedPoint, EnrichedPointSchema, type EnrichedStop, EnrichedStopSchema, type EnrichedTripSummary, type EnrichedTripSummaryRequest, EnrichedTripSummaryRequestSchema, type EnrichedTripSummaryResponse, EnrichedTripSummaryResponseSchema, EnrichedTripSummarySchema, type GomotiveAuthData, GomotiveAuthDataSchema, type ManualBatchEntry, ManualBatchEntrySchema, type ManualBatchRequest, ManualBatchRequestSchema, type ManualBatchResponse, ManualBatchResponseSchema, type ManualBatchTelemetry, ManualBatchTelemetrySchema, type MockAuthData, MockAuthDataSchema, type NoneAuthData, NoneAuthDataSchema, type ProviderAuthData, ProviderAuthDataSchema, type StateHeatmapEntry, type StateHeatmapEntryData, StateHeatmapEntrySchema, type StateHeatmapRequest, type StateHeatmapRequestData, StateHeatmapRequestSchema, type StateHeatmapResponse, type StateHeatmapResponseData, StateHeatmapResponseSchema, type VistaAuthData, VistaAuthDataSchema, deserializeAuthData, serializeAuthData };
package/dist/index.js CHANGED
@@ -123,34 +123,105 @@ var ManualBatchResponseSchema = z5.object({
123
123
  telemetry: z5.array(ManualBatchTelemetrySchema).describe("Array of inserted telemetry records")
124
124
  }).describe("Response schema for manual batch telemetry insertion");
125
125
 
126
- // src/auth-data.ts
126
+ // src/schemas/trips/driver-trips.ts
127
127
  import { z as z6 } from "zod";
128
- var GomotiveAuthDataSchema = z6.object({
129
- kind: z6.literal("gomotive"),
130
- token: z6.string(),
131
- ownerOperator: z6.boolean()
128
+ var DriverTripsRequestSchema = z6.object({
129
+ driver_id: z6.string().uuid(),
130
+ start_date: z6.string(),
131
+ // YYYY-MM-DD
132
+ end_date: z6.string()
133
+ // YYYY-MM-DD
134
+ });
135
+ var DriverTripSchema = z6.object({
136
+ id: z6.number(),
137
+ start_time: z6.string(),
138
+ end_time: z6.string(),
139
+ point_count: z6.number(),
140
+ polyline: z6.string().nullable(),
141
+ highways: z6.array(z6.string()).nullable(),
142
+ total_miles: z6.number().nullable(),
143
+ avg_speed_mph: z6.number().nullable(),
144
+ miles_by_weather: z6.record(z6.string(), z6.number()).nullable(),
145
+ miles_by_light: z6.record(z6.string(), z6.number()).nullable()
146
+ });
147
+ var DriverTripsResponseSchema = z6.array(DriverTripSchema);
148
+ var DriverDailySummarySchema = z6.object({
149
+ summary_date: z6.string(),
150
+ total_miles: z6.number(),
151
+ trip_count: z6.number(),
152
+ point_count: z6.number(),
153
+ polyline: z6.string().nullable(),
154
+ highways: z6.array(z6.string()).nullable(),
155
+ avg_speed_mph: z6.number().nullable(),
156
+ miles_by_weather: z6.record(z6.string(), z6.number()).nullable(),
157
+ miles_by_light: z6.record(z6.string(), z6.number()).nullable()
158
+ });
159
+ var DriverDailySummariesResponseSchema = z6.array(DriverDailySummarySchema);
160
+
161
+ // src/schemas/trips/enriched-trip-summary.ts
162
+ import { z as z7 } from "zod";
163
+ var EnrichedTripSummaryRequestSchema = z7.object({
164
+ trip_id: z7.number()
165
+ });
166
+ var DriverEnrichedSummariesRequestSchema = z7.object({
167
+ driver_id: z7.string().uuid(),
168
+ start_date: z7.string(),
169
+ end_date: z7.string()
132
170
  });
133
- var VistaAuthDataSchema = z6.object({
134
- kind: z6.literal("vista"),
135
- driverId: z6.string(),
136
- cookie: z6.string()
171
+ var EnrichedStopSchema = z7.object({
172
+ duration_seconds: z7.number()
137
173
  });
138
- var MockAuthDataSchema = z6.object({
139
- kind: z6.literal("mock"),
140
- cookie: z6.string()
174
+ var EnrichedPointSchema = z7.object({
175
+ lat: z7.number(),
176
+ lon: z7.number(),
177
+ timestamp: z7.string(),
178
+ speed_mph: z7.number().nullable(),
179
+ heading: z7.number().nullable(),
180
+ altitude_feet: z7.number().nullable(),
181
+ weather_condition: z7.string().nullable(),
182
+ temperature_f: z7.number().nullable(),
183
+ visibility_miles: z7.number().nullable(),
184
+ light_condition: z7.string().nullable(),
185
+ stop: EnrichedStopSchema.nullable()
141
186
  });
142
- var NoneAuthDataSchema = z6.object({
143
- kind: z6.literal("none")
187
+ var EnrichedTripSummarySchema = z7.object({
188
+ trip_id: z7.number(),
189
+ driver_id: z7.string(),
190
+ start_time: z7.string(),
191
+ end_time: z7.string(),
192
+ points: z7.array(EnrichedPointSchema)
144
193
  });
145
- var ProviderAuthDataSchema = z6.discriminatedUnion("kind", [
194
+ var EnrichedTripSummaryResponseSchema = EnrichedTripSummarySchema;
195
+ var DriverEnrichedSummariesResponseSchema = z7.array(EnrichedTripSummarySchema);
196
+
197
+ // src/auth-data.ts
198
+ import { z as z8 } from "zod";
199
+ var GomotiveAuthDataSchema = z8.object({
200
+ kind: z8.literal("gomotive"),
201
+ token: z8.string(),
202
+ ownerOperator: z8.boolean()
203
+ });
204
+ var VistaAuthDataSchema = z8.object({
205
+ kind: z8.literal("vista"),
206
+ driverId: z8.string(),
207
+ cookie: z8.string()
208
+ });
209
+ var MockAuthDataSchema = z8.object({
210
+ kind: z8.literal("mock"),
211
+ cookie: z8.string()
212
+ });
213
+ var NoneAuthDataSchema = z8.object({
214
+ kind: z8.literal("none")
215
+ });
216
+ var ProviderAuthDataSchema = z8.discriminatedUnion("kind", [
146
217
  GomotiveAuthDataSchema,
147
218
  VistaAuthDataSchema,
148
219
  MockAuthDataSchema,
149
220
  NoneAuthDataSchema
150
221
  ]);
151
- var LegacyVistaAuthSchema = z6.object({
152
- driverId: z6.string(),
153
- cookie: z6.string()
222
+ var LegacyVistaAuthSchema = z8.object({
223
+ driverId: z8.string(),
224
+ cookie: z8.string()
154
225
  });
155
226
  function serializeAuthData(data) {
156
227
  if (data.kind === "none") {
@@ -186,46 +257,46 @@ function deserializeAuthData(authToken) {
186
257
  }
187
258
 
188
259
  // src/browser-auth.ts
189
- import { z as z7 } from "zod";
190
- var CapturedTrafficEntrySchema = z7.object({
191
- method: z7.string(),
192
- url: z7.string(),
193
- status: z7.number(),
194
- responseBody: z7.string().optional()
260
+ import { z as z9 } from "zod";
261
+ var CapturedTrafficEntrySchema = z9.object({
262
+ method: z9.string(),
263
+ url: z9.string(),
264
+ status: z9.number(),
265
+ responseBody: z9.string().optional()
195
266
  });
196
- var BrowserAuthRequestSchema = z7.object({
197
- providerStub: z7.string(),
198
- providerUrl: z7.string(),
199
- username: z7.string(),
200
- encryptedPassword: z7.string(),
201
- captureTraffic: z7.boolean().optional()
267
+ var BrowserAuthRequestSchema = z9.object({
268
+ providerStub: z9.string(),
269
+ providerUrl: z9.string(),
270
+ username: z9.string(),
271
+ encryptedPassword: z9.string(),
272
+ captureTraffic: z9.boolean().optional()
202
273
  });
203
- var BrowserAuthSuccessSchema = z7.object({
204
- success: z7.literal(true),
274
+ var BrowserAuthSuccessSchema = z9.object({
275
+ success: z9.literal(true),
205
276
  authData: ProviderAuthDataSchema,
206
- capturedTraffic: z7.array(CapturedTrafficEntrySchema).optional()
277
+ capturedTraffic: z9.array(CapturedTrafficEntrySchema).optional()
207
278
  });
208
- var BrowserAuthFailureSchema = z7.object({
209
- success: z7.literal(false),
210
- error: z7.string()
279
+ var BrowserAuthFailureSchema = z9.object({
280
+ success: z9.literal(false),
281
+ error: z9.string()
211
282
  });
212
- var BrowserAuthResponseSchema = z7.discriminatedUnion("success", [
283
+ var BrowserAuthResponseSchema = z9.discriminatedUnion("success", [
213
284
  BrowserAuthSuccessSchema,
214
285
  BrowserAuthFailureSchema
215
286
  ]);
216
- var CrawlPageSchema = z7.object({
217
- url: z7.string(),
218
- html: z7.string()
287
+ var CrawlPageSchema = z9.object({
288
+ url: z9.string(),
289
+ html: z9.string()
219
290
  });
220
- var BrowserCrawlSuccessSchema = z7.object({
221
- success: z7.literal(true),
222
- pages: z7.array(CrawlPageSchema)
291
+ var BrowserCrawlSuccessSchema = z9.object({
292
+ success: z9.literal(true),
293
+ pages: z9.array(CrawlPageSchema)
223
294
  });
224
- var BrowserCrawlFailureSchema = z7.object({
225
- success: z7.literal(false),
226
- error: z7.string()
295
+ var BrowserCrawlFailureSchema = z9.object({
296
+ success: z9.literal(false),
297
+ error: z9.string()
227
298
  });
228
- var BrowserCrawlResponseSchema = z7.discriminatedUnion("success", [
299
+ var BrowserCrawlResponseSchema = z9.discriminatedUnion("success", [
229
300
  BrowserCrawlSuccessSchema,
230
301
  BrowserCrawlFailureSchema
231
302
  ]);
@@ -251,9 +322,21 @@ export {
251
322
  DeleteAnonymousDriverResponseSchema,
252
323
  DeleteProviderAccountRequestSchema,
253
324
  DeleteProviderAccountResponseSchema,
325
+ DriverDailySummariesResponseSchema,
326
+ DriverDailySummarySchema,
327
+ DriverEnrichedSummariesRequestSchema,
328
+ DriverEnrichedSummariesResponseSchema,
254
329
  DriverRankingSchema,
255
330
  DriverRankingsRequestSchema,
256
331
  DriverRankingsResponseSchema,
332
+ DriverTripSchema,
333
+ DriverTripsRequestSchema,
334
+ DriverTripsResponseSchema,
335
+ EnrichedPointSchema,
336
+ EnrichedStopSchema,
337
+ EnrichedTripSummaryRequestSchema,
338
+ EnrichedTripSummaryResponseSchema,
339
+ EnrichedTripSummarySchema,
257
340
  GomotiveAuthDataSchema,
258
341
  ManualBatchEntrySchema,
259
342
  ManualBatchRequestSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findatruck/shared-schemas",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",