@venulog/phasing-engine-schemas 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -546,10 +546,9 @@ export declare const uploadSitePlanImageResponseSchema: z.ZodObject<{
546
546
  }, z.core.$strip>;
547
547
  }, z.core.$strip>;
548
548
  export declare const getAvailableParkingAreaSlotsQuerySchema: z.ZodObject<{
549
- event_id: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
550
- year: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
551
- month: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
552
- parking_area_id: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
549
+ event_id: z.ZodNumber;
550
+ year: z.ZodNumber;
551
+ month: z.ZodNumber;
553
552
  company_role: z.ZodString;
554
553
  schedule_type: z.ZodOptional<z.ZodEnum<{
555
554
  assembly: "assembly";
@@ -685,43 +685,17 @@ export const uploadSitePlanImageResponseSchema = createMessageDataResponseSchema
685
685
  // ------------------------------
686
686
  export const getAvailableParkingAreaSlotsQuerySchema = z
687
687
  .object({
688
- event_id: z
689
- .string()
690
- .min(1)
691
- .transform(val => parseInt(val, 10))
692
- .refine(val => !isNaN(val) && val > 0, {
693
- message: 'Event ID must be a positive number'
694
- })
695
- .openapi({
688
+ event_id: z.number().positive().openapi({
696
689
  description: 'The ID of the event',
697
- example: '1'
690
+ example: 1
698
691
  }),
699
- year: z
700
- .string()
701
- .regex(/^\d{4}$/, 'Year must be in YYYY format')
702
- .transform(val => parseInt(val, 10))
703
- .openapi({
692
+ year: z.number().min(2025).openapi({
704
693
  description: 'Year for filtering slots (YYYY)',
705
- example: '2026'
694
+ example: 2026
706
695
  }),
707
- month: z
708
- .string()
709
- .regex(/^(0?[1-9]|1[0-2])$/, 'Month must be between 1 and 12')
710
- .transform(val => parseInt(val, 10))
711
- .openapi({
696
+ month: z.number().min(1).max(12).openapi({
712
697
  description: 'Month for filtering slots (1-12)',
713
- example: '6'
714
- }),
715
- parking_area_id: z
716
- .string()
717
- .min(1)
718
- .transform(val => parseInt(val, 10))
719
- .refine(val => !isNaN(val) && val > 0, {
720
- message: 'Parking area ID must be a positive number'
721
- })
722
- .openapi({
723
- description: 'The ID of the parking area',
724
- example: '1'
698
+ example: 6
725
699
  }),
726
700
  company_role: z.string().min(1, 'Company role is required').openapi({
727
701
  description: 'Company role to filter schedules by',
@@ -88,7 +88,11 @@ export declare const companyDetailsSchema: z.ZodObject<{
88
88
  transport_company: z.ZodString;
89
89
  }, z.core.$strip>;
90
90
  export declare const vehicleDetailsSchema: z.ZodObject<{
91
- vehicle_type: z.ZodString;
91
+ vehicle_type: z.ZodEnum<{
92
+ PL: "PL";
93
+ VUL: "VUL";
94
+ VL: "VL";
95
+ }>;
92
96
  unloading_method: z.ZodString;
93
97
  license_plate: z.ZodString;
94
98
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -269,7 +273,11 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
269
273
  transport_company: z.ZodString;
270
274
  }, z.core.$strip>;
271
275
  vehicle: z.ZodObject<{
272
- vehicle_type: z.ZodString;
276
+ vehicle_type: z.ZodEnum<{
277
+ PL: "PL";
278
+ VUL: "VUL";
279
+ VL: "VL";
280
+ }>;
273
281
  unloading_method: z.ZodString;
274
282
  license_plate: z.ZodString;
275
283
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -310,19 +318,17 @@ export declare const createParkingBookingBodySchema: z.ZodObject<{
310
318
  }, z.core.$strip>;
311
319
  company_role: z.ZodString;
312
320
  vehicle: z.ZodObject<{
313
- vehicle_type: z.ZodString;
321
+ vehicle_type: z.ZodEnum<{
322
+ PL: "PL";
323
+ VUL: "VUL";
324
+ VL: "VL";
325
+ }>;
314
326
  unloading_method: z.ZodString;
315
327
  license_plate: z.ZodString;
316
328
  trailer_registration: z.ZodOptional<z.ZodString>;
317
329
  }, z.core.$strip>;
318
- vehicle_type: z.ZodEnum<{
319
- PL: "PL";
320
- VUL: "VUL";
321
- VL: "VL";
322
- }>;
323
330
  booking_date: z.ZodString;
324
331
  start_time: z.ZodString;
325
- end_time: z.ZodString;
326
332
  }, z.core.$strip>;
327
333
  export declare const createParkingBookingDataSchema: z.ZodObject<{
328
334
  id: z.ZodNumber;
@@ -343,12 +349,15 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
343
349
  transport_company: z.ZodString;
344
350
  }, z.core.$strip>;
345
351
  vehicle: z.ZodObject<{
346
- vehicle_type: z.ZodString;
352
+ vehicle_type: z.ZodEnum<{
353
+ PL: "PL";
354
+ VUL: "VUL";
355
+ VL: "VL";
356
+ }>;
347
357
  unloading_method: z.ZodString;
348
358
  license_plate: z.ZodString;
349
359
  trailer_registration: z.ZodOptional<z.ZodString>;
350
360
  }, z.core.$strip>;
351
- vehicle_type: z.ZodString;
352
361
  booking_date: z.ZodString;
353
362
  start_time: z.ZodString;
354
363
  end_time: z.ZodString;
@@ -377,12 +386,15 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
377
386
  transport_company: z.ZodString;
378
387
  }, z.core.$strip>;
379
388
  vehicle: z.ZodObject<{
380
- vehicle_type: z.ZodString;
389
+ vehicle_type: z.ZodEnum<{
390
+ PL: "PL";
391
+ VUL: "VUL";
392
+ VL: "VL";
393
+ }>;
381
394
  unloading_method: z.ZodString;
382
395
  license_plate: z.ZodString;
383
396
  trailer_registration: z.ZodOptional<z.ZodString>;
384
397
  }, z.core.$strip>;
385
- vehicle_type: z.ZodString;
386
398
  booking_date: z.ZodString;
387
399
  start_time: z.ZodString;
388
400
  end_time: z.ZodString;
@@ -405,7 +417,11 @@ export declare const updateParkingBookingBodySchema: z.ZodObject<{
405
417
  transport_company: z.ZodString;
406
418
  }, z.core.$strip>>;
407
419
  vehicle: z.ZodOptional<z.ZodObject<{
408
- vehicle_type: z.ZodString;
420
+ vehicle_type: z.ZodEnum<{
421
+ PL: "PL";
422
+ VUL: "VUL";
423
+ VL: "VL";
424
+ }>;
409
425
  unloading_method: z.ZodString;
410
426
  license_plate: z.ZodString;
411
427
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -429,7 +445,11 @@ export declare const updateParkingBookingDataSchema: z.ZodObject<{
429
445
  transport_company: z.ZodString;
430
446
  }, z.core.$strip>>;
431
447
  vehicle: z.ZodNullable<z.ZodObject<{
432
- vehicle_type: z.ZodString;
448
+ vehicle_type: z.ZodEnum<{
449
+ PL: "PL";
450
+ VUL: "VUL";
451
+ VL: "VL";
452
+ }>;
433
453
  unloading_method: z.ZodString;
434
454
  license_plate: z.ZodString;
435
455
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -457,7 +477,11 @@ export declare const updateParkingBookingResponseSchema: z.ZodObject<{
457
477
  transport_company: z.ZodString;
458
478
  }, z.core.$strip>>;
459
479
  vehicle: z.ZodNullable<z.ZodObject<{
460
- vehicle_type: z.ZodString;
480
+ vehicle_type: z.ZodEnum<{
481
+ PL: "PL";
482
+ VUL: "VUL";
483
+ VL: "VL";
484
+ }>;
461
485
  unloading_method: z.ZodString;
462
486
  license_plate: z.ZodString;
463
487
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -470,6 +494,13 @@ export declare const confirmBookingParamsSchema: z.ZodObject<{
470
494
  bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
471
495
  }, z.core.$strip>;
472
496
  export declare const confirmBookingDataSchema: z.ZodObject<{
497
+ id: z.ZodNumber;
498
+ status: z.ZodString;
499
+ parking_area_schedule_id: z.ZodNumber;
500
+ updated_at: z.ZodString;
501
+ updated_by: z.ZodString;
502
+ }, z.core.$strip>;
503
+ export declare const confirmBookingResponseSchema: z.ZodObject<{
473
504
  success: z.ZodBoolean;
474
505
  message: z.ZodString;
475
506
  data: z.ZodObject<{
@@ -480,25 +511,17 @@ export declare const confirmBookingDataSchema: z.ZodObject<{
480
511
  updated_by: z.ZodString;
481
512
  }, z.core.$strip>;
482
513
  }, z.core.$strip>;
483
- export declare const confirmBookingResponseSchema: z.ZodObject<{
484
- success: z.ZodBoolean;
485
- message: z.ZodString;
486
- data: z.ZodObject<{
487
- success: z.ZodBoolean;
488
- message: z.ZodString;
489
- data: z.ZodObject<{
490
- id: z.ZodNumber;
491
- status: z.ZodString;
492
- parking_area_schedule_id: z.ZodNumber;
493
- updated_at: z.ZodString;
494
- updated_by: z.ZodString;
495
- }, z.core.$strip>;
496
- }, z.core.$strip>;
497
- }, z.core.$strip>;
498
514
  export declare const refuseBookingParamsSchema: z.ZodObject<{
499
515
  bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
500
516
  }, z.core.$strip>;
501
517
  export declare const refuseBookingDataSchema: z.ZodObject<{
518
+ id: z.ZodNumber;
519
+ status: z.ZodString;
520
+ parking_area_schedule_id: z.ZodNumber;
521
+ updated_at: z.ZodString;
522
+ updated_by: z.ZodString;
523
+ }, z.core.$strip>;
524
+ export declare const refuseBookingResponseSchema: z.ZodObject<{
502
525
  success: z.ZodBoolean;
503
526
  message: z.ZodString;
504
527
  data: z.ZodObject<{
@@ -509,21 +532,6 @@ export declare const refuseBookingDataSchema: z.ZodObject<{
509
532
  updated_by: z.ZodString;
510
533
  }, z.core.$strip>;
511
534
  }, z.core.$strip>;
512
- export declare const refuseBookingResponseSchema: z.ZodObject<{
513
- success: z.ZodBoolean;
514
- message: z.ZodString;
515
- data: z.ZodObject<{
516
- success: z.ZodBoolean;
517
- message: z.ZodString;
518
- data: z.ZodObject<{
519
- id: z.ZodNumber;
520
- status: z.ZodString;
521
- parking_area_schedule_id: z.ZodNumber;
522
- updated_at: z.ZodString;
523
- updated_by: z.ZodString;
524
- }, z.core.$strip>;
525
- }, z.core.$strip>;
526
- }, z.core.$strip>;
527
535
  export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
528
536
  id: z.ZodNumber;
529
537
  status: z.ZodString;
@@ -582,7 +590,11 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
582
590
  transport_company: z.ZodString;
583
591
  }, z.core.$strip>;
584
592
  vehicle: z.ZodObject<{
585
- vehicle_type: z.ZodString;
593
+ vehicle_type: z.ZodEnum<{
594
+ PL: "PL";
595
+ VUL: "VUL";
596
+ VL: "VL";
597
+ }>;
586
598
  unloading_method: z.ZodString;
587
599
  license_plate: z.ZodString;
588
600
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -631,7 +643,11 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
631
643
  transport_company: z.ZodString;
632
644
  }, z.core.$strip>;
633
645
  vehicle: z.ZodObject<{
634
- vehicle_type: z.ZodString;
646
+ vehicle_type: z.ZodEnum<{
647
+ PL: "PL";
648
+ VUL: "VUL";
649
+ VL: "VL";
650
+ }>;
635
651
  unloading_method: z.ZodString;
636
652
  license_plate: z.ZodString;
637
653
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -684,7 +700,11 @@ export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<
684
700
  transport_company: z.ZodString;
685
701
  }, z.core.$strip>;
686
702
  vehicle: z.ZodObject<{
687
- vehicle_type: z.ZodString;
703
+ vehicle_type: z.ZodEnum<{
704
+ PL: "PL";
705
+ VUL: "VUL";
706
+ VL: "VL";
707
+ }>;
688
708
  unloading_method: z.ZodString;
689
709
  license_plate: z.ZodString;
690
710
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -737,7 +757,11 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
737
757
  transport_company: z.ZodString;
738
758
  }, z.core.$strip>;
739
759
  vehicle: z.ZodObject<{
740
- vehicle_type: z.ZodString;
760
+ vehicle_type: z.ZodEnum<{
761
+ PL: "PL";
762
+ VUL: "VUL";
763
+ VL: "VL";
764
+ }>;
741
765
  unloading_method: z.ZodString;
742
766
  license_plate: z.ZodString;
743
767
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -762,6 +786,54 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
762
786
  updated_at: z.ZodString;
763
787
  }, z.core.$strip>;
764
788
  }, z.core.$strip>;
789
+ export declare const exportBookingDataSchema: z.ZodObject<{
790
+ booking_id: z.ZodNumber;
791
+ event_id: z.ZodNumber;
792
+ status: z.ZodEnum<typeof BookingStatus>;
793
+ company_name: z.ZodString;
794
+ vehicle_type: z.ZodString;
795
+ scan_entrance: z.ZodNullable<z.ZodString>;
796
+ scan_exit: z.ZodNullable<z.ZodString>;
797
+ co2_footprint: z.ZodNullable<z.ZodNumber>;
798
+ booking_date: z.ZodString;
799
+ }, z.core.$strip>;
800
+ export declare const exportBookingsQuerySchema: z.ZodObject<{
801
+ event_id: z.ZodCoercedNumber<unknown>;
802
+ status: z.ZodOptional<z.ZodEnum<typeof BookingStatus>>;
803
+ }, z.core.$strip>;
804
+ export declare const exportBookingsDataSchema: z.ZodObject<{
805
+ bookings: z.ZodArray<z.ZodObject<{
806
+ booking_id: z.ZodNumber;
807
+ event_id: z.ZodNumber;
808
+ status: z.ZodEnum<typeof BookingStatus>;
809
+ company_name: z.ZodString;
810
+ vehicle_type: z.ZodString;
811
+ scan_entrance: z.ZodNullable<z.ZodString>;
812
+ scan_exit: z.ZodNullable<z.ZodString>;
813
+ co2_footprint: z.ZodNullable<z.ZodNumber>;
814
+ booking_date: z.ZodString;
815
+ }, z.core.$strip>>;
816
+ total_count: z.ZodNumber;
817
+ filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
818
+ }, z.core.$strip>;
819
+ export declare const exportBookingsResponseSchema: z.ZodObject<{
820
+ success: z.ZodBoolean;
821
+ data: z.ZodObject<{
822
+ bookings: z.ZodArray<z.ZodObject<{
823
+ booking_id: z.ZodNumber;
824
+ event_id: z.ZodNumber;
825
+ status: z.ZodEnum<typeof BookingStatus>;
826
+ company_name: z.ZodString;
827
+ vehicle_type: z.ZodString;
828
+ scan_entrance: z.ZodNullable<z.ZodString>;
829
+ scan_exit: z.ZodNullable<z.ZodString>;
830
+ co2_footprint: z.ZodNullable<z.ZodNumber>;
831
+ booking_date: z.ZodString;
832
+ }, z.core.$strip>>;
833
+ total_count: z.ZodNumber;
834
+ filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
835
+ }, z.core.$strip>;
836
+ }, z.core.$strip>;
765
837
  export type Geometry = z.infer<typeof geometrySchema>;
766
838
  export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
767
839
  export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
@@ -796,3 +868,9 @@ export type GetBookingDetailsByTokenResponse = z.infer<typeof getParkingBookingD
796
868
  export type GetBookingDetailsByQrBody = z.infer<typeof getParkingBookingDetailsByQrBodySchema>;
797
869
  export type GetBookingDetailsByQrData = z.infer<typeof bookingDetailsDataSchema>;
798
870
  export type GetBookingDetailsByQrResponse = z.infer<typeof getParkingBookingDetailsByQrResponseSchema>;
871
+ export type ConfirmBookingData = z.infer<typeof confirmBookingDataSchema>;
872
+ export type ConfirmBookingDataResponse = z.infer<typeof confirmBookingResponseSchema>;
873
+ export type ExportBookingData = z.infer<typeof exportBookingDataSchema>;
874
+ export type ExportBookingsQuery = z.infer<typeof exportBookingsQuerySchema>;
875
+ export type ExportBookingsData = z.infer<typeof exportBookingsDataSchema>;
876
+ export type ExportBookingsResponse = z.infer<typeof exportBookingsResponseSchema>;
@@ -151,9 +151,9 @@ export const companyDetailsSchema = z
151
151
  .openapi('CompanyDetails');
152
152
  export const vehicleDetailsSchema = z
153
153
  .object({
154
- vehicle_type: z.string().min(1, 'Vehicle type is required').openapi({
155
- description: 'Type of vehicle',
156
- example: 'Truck'
154
+ vehicle_type: z.enum(['PL', 'VUL', 'VL']).openapi({
155
+ description: 'Vehicle type: PL (poids lourd), VUL (véhicule utilitaire léger), VL (véhicule léger)',
156
+ example: 'PL'
157
157
  }),
158
158
  unloading_method: z.string().min(1, 'Unloading method is required').openapi({
159
159
  description: 'Method of unloading',
@@ -406,10 +406,6 @@ export const createParkingBookingBodySchema = z
406
406
  vehicle: vehicleDetailsSchema.openapi({
407
407
  description: 'Vehicle details'
408
408
  }),
409
- vehicle_type: z.enum(['PL', 'VUL', 'VL']).openapi({
410
- description: 'Vehicle type: PL (poids lourd), VUL (véhicule utilitaire léger), VL (véhicule léger)',
411
- example: 'PL'
412
- }),
413
409
  booking_date: z
414
410
  .string()
415
411
  .regex(/^\d{4}-\d{2}-\d{2}$/)
@@ -423,13 +419,6 @@ export const createParkingBookingBodySchema = z
423
419
  .openapi({
424
420
  description: 'Start time (HH:MM)',
425
421
  example: '06:00'
426
- }),
427
- end_time: z
428
- .string()
429
- .regex(/^\d{2}:\d{2}$/)
430
- .openapi({
431
- description: 'End time (HH:MM)',
432
- example: '09:00'
433
422
  })
434
423
  })
435
424
  .openapi('CreateParkingBookingBody');
@@ -446,7 +435,6 @@ export const createParkingBookingDataSchema = z
446
435
  vehicle: vehicleDetailsSchema.openapi({
447
436
  description: 'Vehicle details'
448
437
  }),
449
- vehicle_type: z.string(),
450
438
  booking_date: z.string(),
451
439
  start_time: z.string(),
452
440
  end_time: z.string(),
@@ -523,15 +511,11 @@ export const confirmBookingParamsSchema = z
523
511
  // Response schema
524
512
  export const confirmBookingDataSchema = z
525
513
  .object({
526
- success: z.boolean(),
527
- message: z.string(),
528
- data: z.object({
529
- id: z.number(),
530
- status: z.string(),
531
- parking_area_schedule_id: z.number(),
532
- updated_at: z.string(),
533
- updated_by: z.string()
534
- })
514
+ id: z.number(),
515
+ status: z.string(),
516
+ parking_area_schedule_id: z.number(),
517
+ updated_at: z.string(),
518
+ updated_by: z.string()
535
519
  })
536
520
  .openapi('ConfirmBookingData');
537
521
  export const confirmBookingResponseSchema = createMessageDataResponseSchema(confirmBookingDataSchema, 'ConfirmBookingResponse', 'Parking booking confirmed successfully', 'Details of the confirmed booking');
@@ -556,15 +540,11 @@ export const refuseBookingParamsSchema = z
556
540
  // Response schema
557
541
  export const refuseBookingDataSchema = z
558
542
  .object({
559
- success: z.boolean(),
560
- message: z.string(),
561
- data: z.object({
562
- id: z.number(),
563
- status: z.string(),
564
- parking_area_schedule_id: z.number(),
565
- updated_at: z.string(),
566
- updated_by: z.string()
567
- })
543
+ id: z.number(),
544
+ status: z.string(),
545
+ parking_area_schedule_id: z.number(),
546
+ updated_at: z.string(),
547
+ updated_by: z.string()
568
548
  })
569
549
  .openapi('RefuseBookingData');
570
550
  export const refuseBookingResponseSchema = createMessageDataResponseSchema(refuseBookingDataSchema, 'RefuseBookingResponse', 'Parking booking refused successfully', 'Details of the refused booking');
@@ -732,3 +712,72 @@ export const getParkingBookingDetailsByQrBodySchema = z
732
712
  })
733
713
  .openapi('GetBookingDetailsByQrBody');
734
714
  export const getParkingBookingDetailsByQrResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByQrResponse', 'Booking details retrieved by QR token');
715
+ // ------------------------------
716
+ // Export All Parking Bookings
717
+ // ------------------------------
718
+ export const exportBookingDataSchema = z
719
+ .object({
720
+ booking_id: z.number().openapi({
721
+ description: 'Unique booking identifier',
722
+ example: 123
723
+ }),
724
+ event_id: z.number().openapi({
725
+ description: 'Event ID associated with the booking',
726
+ example: 1
727
+ }),
728
+ status: z.enum(BookingStatus).openapi({
729
+ description: 'Current booking status',
730
+ example: 'confirmed'
731
+ }),
732
+ company_name: z.string().openapi({
733
+ description: 'Company name from booking details',
734
+ example: 'Acme Corp'
735
+ }),
736
+ vehicle_type: z.string().openapi({
737
+ description: 'Type of vehicle (PL, VUL, VL)',
738
+ example: 'PL'
739
+ }),
740
+ scan_entrance: z.string().nullable().openapi({
741
+ description: 'Entry scan timestamp',
742
+ example: '2024-12-15T08:30:00.000Z'
743
+ }),
744
+ scan_exit: z.string().nullable().openapi({
745
+ description: 'Exit scan timestamp',
746
+ example: '2024-12-15T17:15:00.000Z'
747
+ }),
748
+ co2_footprint: z.number().nullable().openapi({
749
+ description: 'Estimated CO2 footprint in kg based on vehicle type and duration',
750
+ example: 12.5
751
+ }),
752
+ booking_date: z.string().openapi({
753
+ description: 'Date of the booking',
754
+ example: '2024-12-15'
755
+ })
756
+ })
757
+ .openapi('ExportBookingData');
758
+ export const exportBookingsQuerySchema = z
759
+ .object({
760
+ event_id: z.coerce.number().openapi({
761
+ description: 'ID of the close event',
762
+ example: 1
763
+ }),
764
+ status: z.enum(BookingStatus).optional().openapi({
765
+ description: 'Filter by booking status',
766
+ example: 'confirmed'
767
+ })
768
+ })
769
+ .openapi('ExportBookingsQuery');
770
+ export const exportBookingsDataSchema = z
771
+ .object({
772
+ bookings: z.array(exportBookingDataSchema),
773
+ total_count: z.number().openapi({
774
+ description: 'Total number of bookings',
775
+ example: 150
776
+ }),
777
+ filters_applied: z.record(z.string(), z.unknown()).openapi({
778
+ description: 'Summary of applied filters',
779
+ example: { event_code: 'EVENT2024', status: 'confirmed' }
780
+ })
781
+ })
782
+ .openapi('ExportBookingsData');
783
+ export const exportBookingsResponseSchema = createSuccessResponseSchema(exportBookingsDataSchema, 'ExportBookingsResponse', 'Exported parking bookings data');
package/package.json CHANGED
@@ -1,75 +1,75 @@
1
- {
2
- "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.5.0",
4
- "description": "Shared schemas and types for Phasing Engine API",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- },
13
- "./auth": {
14
- "types": "./dist/auth.d.ts",
15
- "import": "./dist/auth.js"
16
- },
17
- "./common": {
18
- "types": "./dist/common.d.ts",
19
- "import": "./dist/common.js"
20
- },
21
- "./pagination": {
22
- "types": "./dist/pagination.d.ts",
23
- "import": "./dist/pagination.js"
24
- },
25
- "./parkingBooking": {
26
- "types": "./dist/parkingBooking.d.ts",
27
- "import": "./dist/parkingBooking.js"
28
- },
29
- "./event": {
30
- "types": "./dist/event.d.ts",
31
- "import": "./dist/event.js"
32
- },
33
- "./parkingArea": {
34
- "types": "./dist/parkingArea.d.ts",
35
- "import": "./dist/parkingArea.js"
36
- },
37
- "./enums": {
38
- "types": "./dist/enums/index.d.ts",
39
- "import": "./dist/enums/index.js"
40
- },
41
- "./accessToken": {
42
- "types": "./dist/accessToken.d.ts",
43
- "import": "./dist/accessToken.js"
44
- }
45
- },
46
- "files": [
47
- "dist"
48
- ],
49
- "scripts": {
50
- "build": "npm run clean && tsc",
51
- "dev": "tsc --watch",
52
- "clean": "rm -rf dist",
53
- "prepublishOnly": "npm run build"
54
- },
55
- "keywords": [
56
- "schemas",
57
- "validation",
58
- "types",
59
- "zod",
60
- "phasing-engine"
61
- ],
62
- "license": "MIT",
63
- "dependencies": {
64
- "@asteasolutions/zod-to-openapi": "^8.1.0",
65
- "zod": "^4.1.13"
66
- },
67
- "devDependencies": {
68
- "typescript": "^5.6.3"
69
- },
70
- "repository": {
71
- "type": "git",
72
- "url": "git+https://github.com/manaty/phasing_engine.git",
73
- "directory": "packages/phasing-schemas"
74
- }
75
- }
1
+ {
2
+ "name": "@venulog/phasing-engine-schemas",
3
+ "version": "0.5.1",
4
+ "description": "Shared schemas and types for Phasing Engine API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./auth": {
14
+ "types": "./dist/auth.d.ts",
15
+ "import": "./dist/auth.js"
16
+ },
17
+ "./common": {
18
+ "types": "./dist/common.d.ts",
19
+ "import": "./dist/common.js"
20
+ },
21
+ "./pagination": {
22
+ "types": "./dist/pagination.d.ts",
23
+ "import": "./dist/pagination.js"
24
+ },
25
+ "./parkingBooking": {
26
+ "types": "./dist/parkingBooking.d.ts",
27
+ "import": "./dist/parkingBooking.js"
28
+ },
29
+ "./event": {
30
+ "types": "./dist/event.d.ts",
31
+ "import": "./dist/event.js"
32
+ },
33
+ "./parkingArea": {
34
+ "types": "./dist/parkingArea.d.ts",
35
+ "import": "./dist/parkingArea.js"
36
+ },
37
+ "./enums": {
38
+ "types": "./dist/enums/index.d.ts",
39
+ "import": "./dist/enums/index.js"
40
+ },
41
+ "./accessToken": {
42
+ "types": "./dist/accessToken.d.ts",
43
+ "import": "./dist/accessToken.js"
44
+ }
45
+ },
46
+ "files": [
47
+ "dist"
48
+ ],
49
+ "scripts": {
50
+ "build": "npm run clean && tsc",
51
+ "dev": "tsc --watch",
52
+ "clean": "rm -rf dist",
53
+ "prepublishOnly": "npm run build"
54
+ },
55
+ "keywords": [
56
+ "schemas",
57
+ "validation",
58
+ "types",
59
+ "zod",
60
+ "phasing-engine"
61
+ ],
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "@asteasolutions/zod-to-openapi": "^8.1.0",
65
+ "zod": "^4.1.13"
66
+ },
67
+ "devDependencies": {
68
+ "typescript": "^5.6.3"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git+https://github.com/manaty/phasing_engine.git",
73
+ "directory": "packages/phasing-schemas"
74
+ }
75
+ }