@venulog/phasing-engine-schemas 0.13.0-alpha.2 → 0.13.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -592,12 +592,12 @@ export declare const availableTimeSlotV2Schema: z.ZodObject<{
592
592
  parking_spot: z.ZodString;
593
593
  entity_name: z.ZodString;
594
594
  slot_key: z.ZodString;
595
+ vehicle_type: z.ZodString;
595
596
  }, z.core.$strip>;
596
597
  export declare const availableSlotsResponseV2Schema: z.ZodObject<{
597
598
  event_id: z.ZodNumber;
598
599
  event_code: z.ZodString;
599
600
  event_name: z.ZodString;
600
- company_role: z.ZodString;
601
601
  year: z.ZodNumber;
602
602
  month: z.ZodNumber;
603
603
  available_slots: z.ZodArray<z.ZodObject<{
@@ -618,6 +618,42 @@ export declare const availableSlotsResponseV2Schema: z.ZodObject<{
618
618
  parking_spot: z.ZodString;
619
619
  entity_name: z.ZodString;
620
620
  slot_key: z.ZodString;
621
+ vehicle_type: z.ZodString;
622
+ }, z.core.$strip>>;
623
+ total_slots: z.ZodNumber;
624
+ }, z.core.$strip>;
625
+ export declare const getBookingStatisticsQuerySchema: z.ZodObject<{
626
+ event_id: z.ZodNumber;
627
+ year: z.ZodNumber;
628
+ month: z.ZodNumber;
629
+ schedule_type: z.ZodOptional<z.ZodEnum<typeof ParkingAreaScheduleType>>;
630
+ }, z.core.$strip>;
631
+ export declare const bookingStatisticsResponseSchema: z.ZodObject<{
632
+ event_id: z.ZodNumber;
633
+ event_code: z.ZodString;
634
+ event_name: z.ZodString;
635
+ year: z.ZodNumber;
636
+ month: z.ZodNumber;
637
+ schedule_type: z.ZodNullable<z.ZodEnum<typeof ParkingAreaScheduleType>>;
638
+ all_slots: z.ZodArray<z.ZodObject<{
639
+ date: z.ZodString;
640
+ start_time: z.ZodString;
641
+ end_time: z.ZodString;
642
+ duration: z.ZodNumber;
643
+ schedule_type: z.ZodEnum<{
644
+ assembly: "assembly";
645
+ dismantling: "dismantling";
646
+ }>;
647
+ max_capacity: z.ZodNumber;
648
+ current_bookings: z.ZodNumber;
649
+ confirmed_bookings: z.ZodNumber;
650
+ available_capacity: z.ZodNumber;
651
+ is_available: z.ZodBoolean;
652
+ door: z.ZodString;
653
+ parking_spot: z.ZodString;
654
+ entity_name: z.ZodString;
655
+ slot_key: z.ZodString;
656
+ vehicle_type: z.ZodString;
621
657
  }, z.core.$strip>>;
622
658
  total_slots: z.ZodNumber;
623
659
  }, z.core.$strip>;
@@ -696,3 +732,5 @@ export type Translations = z.infer<typeof translationsSchema>;
696
732
  export type GetAvailableSlotsBodyV2 = z.infer<typeof getAvailableSlotsBodyV2Schema>;
697
733
  export type AvailableTimeSlotV2 = z.infer<typeof availableTimeSlotV2Schema>;
698
734
  export type AvailableSlotsResponseV2 = z.infer<typeof availableSlotsResponseV2Schema>;
735
+ export type GetBookingStatisticsQuery = z.infer<typeof getBookingStatisticsQuerySchema>;
736
+ export type BookingStatisticsResponse = z.infer<typeof bookingStatisticsResponseSchema>;
@@ -804,6 +804,10 @@ export const availableTimeSlotV2Schema = z
804
804
  slot_key: z.string().openapi({
805
805
  description: 'Unique identifier for the time slot',
806
806
  example: '12345'
807
+ }),
808
+ vehicle_type: z.string().openapi({
809
+ description: 'Vehicle type for the slot',
810
+ example: 'PL'
807
811
  })
808
812
  })
809
813
  .openapi('AvailableTimeSlotV2');
@@ -821,10 +825,6 @@ export const availableSlotsResponseV2Schema = z
821
825
  description: 'Name of the event',
822
826
  example: 'COEC 2025'
823
827
  }),
824
- company_role: z.string().openapi({
825
- description: 'Company role that was used for filtering (returned for reference)',
826
- example: 'exhibitor'
827
- }),
828
828
  year: z.number().openapi({
829
829
  description: 'Year of the slots',
830
830
  example: 2026
@@ -843,6 +843,64 @@ export const availableSlotsResponseV2Schema = z
843
843
  })
844
844
  .openapi('AvailableSlotsResponseV2');
845
845
  // ------------------------------
846
+ // Booking Statistics V2
847
+ // ------------------------------
848
+ export const getBookingStatisticsQuerySchema = z
849
+ .object({
850
+ event_id: z.number().positive().openapi({
851
+ description: 'The ID of the event',
852
+ example: 1
853
+ }),
854
+ year: z.number().min(2025).openapi({
855
+ description: 'Year for filtering slots (YYYY). Slots before today will be excluded.',
856
+ example: 2026
857
+ }),
858
+ month: z.number().min(1).max(12).openapi({
859
+ description: 'Month for filtering slots (1-12). Slots before today will be excluded.',
860
+ example: 6
861
+ }),
862
+ schedule_type: z.enum(ParkingAreaScheduleType).optional().openapi({
863
+ description: 'Optional filter by schedule type (assembly or dismantling)',
864
+ example: 'assembly'
865
+ })
866
+ })
867
+ .openapi('GetBookingStatisticsQuery');
868
+ export const bookingStatisticsResponseSchema = z
869
+ .object({
870
+ event_id: z.number().openapi({
871
+ description: 'ID of the event',
872
+ example: 1
873
+ }),
874
+ event_code: z.string().openapi({
875
+ description: 'Code of the event',
876
+ example: 'COEC2025'
877
+ }),
878
+ event_name: z.string().openapi({
879
+ description: 'Name of the event',
880
+ example: 'COEC 2025'
881
+ }),
882
+ year: z.number().openapi({
883
+ description: 'Year of the statistics',
884
+ example: 2026
885
+ }),
886
+ month: z.number().openapi({
887
+ description: 'Month of the statistics',
888
+ example: 6
889
+ }),
890
+ schedule_type: z.enum(ParkingAreaScheduleType).nullable().openapi({
891
+ description: 'Schedule type filter applied (null if not filtered)',
892
+ example: 'assembly'
893
+ }),
894
+ all_slots: z.array(availableTimeSlotV2Schema).openapi({
895
+ description: 'All time slots with full booking information, across all companies and vehicle types'
896
+ }),
897
+ total_slots: z.number().openapi({
898
+ description: 'Total number of time slots',
899
+ example: 120
900
+ })
901
+ })
902
+ .openapi('BookingStatisticsResponse');
903
+ // ------------------------------
846
904
  // Company Roles for Parking Area
847
905
  // ------------------------------
848
906
  export const getCompanyRolesByEventIdParamsSchema = z
@@ -263,6 +263,7 @@ export declare const checkSlotAvailabilityResponseSchema: z.ZodObject<{
263
263
  parking_spot: z.ZodString;
264
264
  entity_name: z.ZodString;
265
265
  slot_key: z.ZodString;
266
+ vehicle_type: z.ZodString;
266
267
  }, z.core.$strip>;
267
268
  }, z.core.$strip>;
268
269
  export declare const customSlotSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.13.0-alpha.2",
3
+ "version": "0.13.0-alpha.4",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",