@venulog/phasing-engine-schemas 0.7.6 → 0.8.0-alpha.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.
@@ -616,18 +616,15 @@ export declare const availableParkingAreaSlotsResponseSchema: z.ZodObject<{
616
616
  }, z.core.$strip>>;
617
617
  total_slots: z.ZodNumber;
618
618
  }, z.core.$strip>;
619
- export declare const getAvailableSlotsBodySchema: z.ZodObject<{
619
+ export declare const getAvailableSlotsBodyV2Schema: z.ZodObject<{
620
620
  event_id: z.ZodNumber;
621
621
  year: z.ZodNumber;
622
622
  month: z.ZodNumber;
623
- company_role: z.ZodString;
624
- schedule_type: z.ZodOptional<z.ZodEnum<{
625
- assembly: "assembly";
626
- dismantling: "dismantling";
627
- }>>;
623
+ company_name: z.ZodString;
624
+ vehicle_type: z.ZodEnum<typeof VehicleType>;
625
+ schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
628
626
  }, z.core.$strip>;
629
- export declare const availableTimeSlotSchema: z.ZodObject<{
630
- parking_area_schedule_id: z.ZodNumber;
627
+ export declare const availableTimeSlotV2Schema: z.ZodObject<{
631
628
  date: z.ZodString;
632
629
  start_time: z.ZodString;
633
630
  end_time: z.ZodString;
@@ -641,8 +638,12 @@ export declare const availableTimeSlotSchema: z.ZodObject<{
641
638
  confirmed_bookings: z.ZodNumber;
642
639
  available_capacity: z.ZodNumber;
643
640
  is_available: z.ZodBoolean;
641
+ door: z.ZodString;
642
+ parking_spot: z.ZodString;
643
+ entity_name: z.ZodString;
644
+ slot_key: z.ZodString;
644
645
  }, z.core.$strip>;
645
- export declare const availableSlotsResponseSchema: z.ZodObject<{
646
+ export declare const availableSlotsResponseV2Schema: z.ZodObject<{
646
647
  event_id: z.ZodNumber;
647
648
  event_code: z.ZodString;
648
649
  event_name: z.ZodString;
@@ -650,7 +651,6 @@ export declare const availableSlotsResponseSchema: z.ZodObject<{
650
651
  year: z.ZodNumber;
651
652
  month: z.ZodNumber;
652
653
  available_slots: z.ZodArray<z.ZodObject<{
653
- parking_area_schedule_id: z.ZodNumber;
654
654
  date: z.ZodString;
655
655
  start_time: z.ZodString;
656
656
  end_time: z.ZodString;
@@ -664,21 +664,32 @@ export declare const availableSlotsResponseSchema: z.ZodObject<{
664
664
  confirmed_bookings: z.ZodNumber;
665
665
  available_capacity: z.ZodNumber;
666
666
  is_available: z.ZodBoolean;
667
+ door: z.ZodString;
668
+ parking_spot: z.ZodString;
669
+ entity_name: z.ZodString;
670
+ slot_key: z.ZodString;
667
671
  }, z.core.$strip>>;
668
672
  total_slots: z.ZodNumber;
669
673
  }, z.core.$strip>;
670
674
  export declare const getCompanyRolesByEventIdParamsSchema: z.ZodObject<{
671
675
  eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
672
- scheduleType: z.ZodEnum<{
673
- assembly: "assembly";
674
- dismantling: "dismantling";
675
- }>;
676
676
  }, z.core.$strip>;
677
677
  export declare const getCompanyRolesByEventIdResponseSchema: z.ZodObject<{
678
678
  event_id: z.ZodNumber;
679
679
  company_roles: z.ZodArray<z.ZodString>;
680
680
  total_count: z.ZodNumber;
681
681
  }, z.core.$strip>;
682
+ export declare const getCompanyNamesByEventIdParamsSchema: z.ZodObject<{
683
+ eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
684
+ }, z.core.$strip>;
685
+ export declare const getCompanyNamesByEventIdQuerySchema: z.ZodObject<{
686
+ company_role: z.ZodOptional<z.ZodString>;
687
+ }, z.core.$strip>;
688
+ export declare const getCompanyNamesByEventIdResponseSchema: z.ZodObject<{
689
+ event_id: z.ZodNumber;
690
+ company_names: z.ZodArray<z.ZodString>;
691
+ total_count: z.ZodNumber;
692
+ }, z.core.$strip>;
682
693
  export type Point = z.infer<typeof pointSchema>;
683
694
  export type PolygonCoordinates = z.infer<typeof polygonCoordinatesSchema>;
684
695
  export type RectangleGeometry = z.infer<typeof rectangleGeometrySchema>;
@@ -715,8 +726,11 @@ export type UploadSitePlanImageResponse = z.infer<typeof uploadSitePlanImageResp
715
726
  export type GetAvailableParkingAreaSlotsQuery = z.infer<typeof getAvailableParkingAreaSlotsQuerySchema>;
716
727
  export type AvailableParkingAreaTimeSlot = z.infer<typeof availableParkingAreaTimeSlotSchema>;
717
728
  export type AvailableParkingAreaSlotsResponse = z.infer<typeof availableParkingAreaSlotsResponseSchema>;
718
- export type GetAvailableSlotsBody = z.infer<typeof getAvailableSlotsBodySchema>;
719
- export type AvailableTimeSlot = z.infer<typeof availableTimeSlotSchema>;
720
- export type AvailableSlotsResponse = z.infer<typeof availableSlotsResponseSchema>;
721
729
  export type GetCompanyRolesByEventIdParams = z.infer<typeof getCompanyRolesByEventIdParamsSchema>;
722
730
  export type GetCompanyRolesByEventIdResponse = z.infer<typeof getCompanyRolesByEventIdResponseSchema>;
731
+ export type GetCompanyNamesByEventIdParams = z.infer<typeof getCompanyNamesByEventIdParamsSchema>;
732
+ export type GetCompanyNamesByEventIdResponse = z.infer<typeof getCompanyNamesByEventIdResponseSchema>;
733
+ export type GetCompanyNamesByEventIdQuery = z.infer<typeof getCompanyNamesByEventIdQuerySchema>;
734
+ export type GetAvailableSlotsBodyV2 = z.infer<typeof getAvailableSlotsBodyV2Schema>;
735
+ export type AvailableTimeSlotV2 = z.infer<typeof availableTimeSlotV2Schema>;
736
+ export type AvailableSlotsResponseV2 = z.infer<typeof availableSlotsResponseV2Schema>;
@@ -695,6 +695,7 @@ export const uploadSitePlanImageResponseSchema = createMessageDataResponseSchema
695
695
  // ------------------------------
696
696
  // Available Time Slots (Parking Area version)
697
697
  // ------------------------------
698
+ // TODO: delete after migrating to V2
698
699
  export const getAvailableParkingAreaSlotsQuerySchema = z
699
700
  .object({
700
701
  event_id: z.number().nonnegative().openapi({
@@ -825,15 +826,15 @@ export const availableParkingAreaSlotsResponseSchema = z
825
826
  })
826
827
  .openapi('AvailableParkingAreaSlotsResponse');
827
828
  // ------------------------------
828
- // Parking Area Query Schemas
829
+ // Available Time Slots V2 (Parking Area version)
829
830
  // ------------------------------
830
- export const getAvailableSlotsBodySchema = z
831
+ export const getAvailableSlotsBodyV2Schema = z
831
832
  .object({
832
833
  event_id: z.number().positive().openapi({
833
834
  description: 'The ID of the event',
834
835
  example: 1
835
836
  }),
836
- year: z.number().min(2024).openapi({
837
+ year: z.number().min(2025).openapi({
837
838
  description: 'Year for filtering slots (YYYY). Slots before today will be excluded.',
838
839
  example: 2026
839
840
  }),
@@ -841,25 +842,22 @@ export const getAvailableSlotsBodySchema = z
841
842
  description: 'Month for filtering slots (1-12). Slots before today will be excluded.',
842
843
  example: 6
843
844
  }),
844
- company_role: z.string().min(1, 'Company role is required').openapi({
845
- description: 'Company role to filter schedules by',
846
- example: 'exhibitor'
845
+ company_name: z.string().min(1, 'Company name is required').openapi({
846
+ description: 'Company name to filter allocations by',
847
+ example: 'IMPACT'
847
848
  }),
848
- schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
849
+ vehicle_type: z.enum(VehicleType).openapi({
850
+ description: 'Vehicle type to filter allocations by',
851
+ example: VehicleType.PL
852
+ }),
853
+ schedule_type: z.enum(ParkingAreaScheduleType).openapi({
849
854
  description: 'Filter by schedule type',
850
855
  example: 'assembly'
851
856
  })
852
857
  })
853
- .openapi('GetAvailableSlotsBody');
854
- // ------------------------------
855
- // Parking Area Response Schemas
856
- // ------------------------------
857
- export const availableTimeSlotSchema = z
858
+ .openapi('GetAvailableSlotsBodyV2');
859
+ export const availableTimeSlotV2Schema = z
858
860
  .object({
859
- parking_area_schedule_id: z.number().openapi({
860
- description: 'Parking area schedule ID',
861
- example: 1
862
- }),
863
861
  date: z.string().openapi({
864
862
  description: 'Date of the time slot (YYYY-MM-DD)',
865
863
  example: '2026-06-15'
@@ -899,10 +897,26 @@ export const availableTimeSlotSchema = z
899
897
  is_available: z.boolean().openapi({
900
898
  description: 'Whether the slot is available for booking',
901
899
  example: true
900
+ }),
901
+ door: z.string().openapi({
902
+ description: 'Door name for the parking slot',
903
+ example: 'Porte 4'
904
+ }),
905
+ parking_spot: z.string().openapi({
906
+ description: 'Specific parking spot identifier',
907
+ example: '7'
908
+ }),
909
+ entity_name: z.string().openapi({
910
+ description: 'Name of the entity associated with the slot',
911
+ example: 'IMPACT'
912
+ }),
913
+ slot_key: z.string().openapi({
914
+ description: 'Unique identifier for the time slot',
915
+ example: '12345'
902
916
  })
903
917
  })
904
- .openapi('AvailableTimeSlot');
905
- export const availableSlotsResponseSchema = z
918
+ .openapi('AvailableTimeSlotV2');
919
+ export const availableSlotsResponseV2Schema = z
906
920
  .object({
907
921
  event_id: z.number().openapi({
908
922
  description: 'ID of the event',
@@ -928,15 +942,15 @@ export const availableSlotsResponseSchema = z
928
942
  description: 'Month of the slots',
929
943
  example: 6
930
944
  }),
931
- available_slots: z.array(availableTimeSlotSchema).openapi({
932
- description: 'List of available time slots with capacity information'
945
+ available_slots: z.array(availableTimeSlotV2Schema).openapi({
946
+ description: 'List of available time slots separated by parking spot'
933
947
  }),
934
948
  total_slots: z.number().openapi({
935
- description: 'Total number of time slots in the period',
949
+ description: 'Total number of time slots (with individual parking spots)',
936
950
  example: 48
937
951
  })
938
952
  })
939
- .openapi('AvailableSlotsResponse');
953
+ .openapi('AvailableSlotsResponseV2');
940
954
  // ------------------------------
941
955
  // Company Roles for Parking Area
942
956
  // ------------------------------
@@ -950,10 +964,6 @@ export const getCompanyRolesByEventIdParamsSchema = z
950
964
  .openapi({
951
965
  description: 'The ID of the event to get company roles for',
952
966
  example: '1'
953
- }),
954
- scheduleType: z.enum(['assembly', 'dismantling']).openapi({
955
- description: 'Type of schedule',
956
- example: 'assembly'
957
967
  })
958
968
  })
959
969
  .openapi('GetCompanyRolesByEventIdParams');
@@ -973,3 +983,43 @@ export const getCompanyRolesByEventIdResponseSchema = z
973
983
  })
974
984
  })
975
985
  .openapi('GetCompanyRolesByEventIdResponse');
986
+ // ------------------------------
987
+ // Company Names for Parking Area
988
+ // ------------------------------
989
+ export const getCompanyNamesByEventIdParamsSchema = z
990
+ .object({
991
+ eventId: z
992
+ .string()
993
+ .min(1, 'Event ID is required')
994
+ .transform(val => parseInt(val, 10))
995
+ .refine(val => !isNaN(val) && val > 0, { message: 'Event ID must be positive' })
996
+ .openapi({
997
+ description: 'The ID of the event to get company names for',
998
+ example: '1'
999
+ })
1000
+ })
1001
+ .openapi('GetCompanyNamesByEventIdParams');
1002
+ export const getCompanyNamesByEventIdQuerySchema = z
1003
+ .object({
1004
+ company_role: z.string().optional().openapi({
1005
+ description: 'Filter company names by company role (category)',
1006
+ example: 'Exposant'
1007
+ })
1008
+ })
1009
+ .openapi('GetCompanyNamesByEventIdQuery');
1010
+ export const getCompanyNamesByEventIdResponseSchema = z
1011
+ .object({
1012
+ event_id: z.number().openapi({
1013
+ description: 'ID of the event',
1014
+ example: 1
1015
+ }),
1016
+ company_names: z.array(z.string()).openapi({
1017
+ description: 'List of unique company names for the event',
1018
+ example: ['IMPACT', 'GLM', 'Liberté Event']
1019
+ }),
1020
+ total_count: z.number().openapi({
1021
+ description: 'Total number of unique company names',
1022
+ example: 3
1023
+ })
1024
+ })
1025
+ .openapi('GetCompanyNamesByEventIdResponse');
@@ -1,6 +1,8 @@
1
1
  import { BookingStatus } from './enums/bookingStatus.js';
2
2
  import { z } from './zod.js';
3
+ import { availableTimeSlotV2Schema } from './parkingArea.js';
3
4
  import { UnloadingType } from './enums/unloadingType.js';
5
+ import { ParkingAreaScheduleType } from './enums/parkingAreaScheduleType.js';
4
6
  export declare const geometrySchema: z.ZodNullable<z.ZodObject<{
5
7
  type: z.ZodEnum<{
6
8
  Point: "Point";
@@ -37,46 +39,6 @@ export declare const closeEventParamsSchema: z.ZodObject<{
37
39
  export declare const closeEventBodySchema: z.ZodObject<{
38
40
  reason: z.ZodOptional<z.ZodString>;
39
41
  }, z.core.$strip>;
40
- export declare const parkingBookingSchema: z.ZodObject<{
41
- id: z.ZodNumber;
42
- parking_area_schedule_id: z.ZodNumber;
43
- status: z.ZodEnum<typeof BookingStatus>;
44
- is_active: z.ZodBoolean;
45
- created_at: z.ZodString;
46
- updated_at: z.ZodString;
47
- created_by: z.ZodNullable<z.ZodString>;
48
- updated_by: z.ZodNullable<z.ZodString>;
49
- booking_date: z.ZodNullable<z.ZodString>;
50
- start_time: z.ZodNullable<z.ZodString>;
51
- end_time: z.ZodNullable<z.ZodString>;
52
- company_role: z.ZodNullable<z.ZodString>;
53
- company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
54
- vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
55
- entry_scanned_at: z.ZodNullable<z.ZodString>;
56
- exit_scanned_at: z.ZodNullable<z.ZodString>;
57
- parking_area_schedule: z.ZodOptional<z.ZodObject<{
58
- id: z.ZodNumber;
59
- date: z.ZodString;
60
- start_time: z.ZodString;
61
- end_time: z.ZodString;
62
- duration: z.ZodNumber;
63
- parking_area_id: z.ZodNumber;
64
- parking_area_schedule_type: z.ZodEnum<{
65
- assembly: import("./index.js").ParkingAreaScheduleType.ASSEMBLY;
66
- dismantling: import("./index.js").ParkingAreaScheduleType.DISMANTLING;
67
- }>;
68
- company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
69
- vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
70
- PL: import("./index.js").VehicleType.PL;
71
- VUL: import("./index.js").VehicleType.VUL;
72
- VL: import("./index.js").VehicleType.VL;
73
- }>>>;
74
- created_at: z.ZodString;
75
- updated_at: z.ZodString;
76
- created_by: z.ZodNullable<z.ZodString>;
77
- updated_by: z.ZodNullable<z.ZodString>;
78
- }, z.core.$strip>>;
79
- }, z.core.$strip>;
80
42
  export declare const companyDetailsSchema: z.ZodObject<{
81
43
  hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
82
44
  stand_number: z.ZodString;
@@ -96,6 +58,44 @@ export declare const vehicleDetailsSchema: z.ZodObject<{
96
58
  license_plate: z.ZodString;
97
59
  trailer_registration: z.ZodOptional<z.ZodString>;
98
60
  }, z.core.$strip>;
61
+ export declare const parkingBookingSchema: z.ZodObject<{
62
+ id: z.ZodNumber;
63
+ parking_area_schedule_id: z.ZodNumber;
64
+ status: z.ZodEnum<typeof BookingStatus>;
65
+ is_active: z.ZodBoolean;
66
+ created_at: z.ZodString;
67
+ updated_at: z.ZodString;
68
+ created_by: z.ZodNullable<z.ZodString>;
69
+ updated_by: z.ZodNullable<z.ZodString>;
70
+ booking_date: z.ZodNullable<z.ZodString>;
71
+ start_time: z.ZodNullable<z.ZodString>;
72
+ end_time: z.ZodNullable<z.ZodString>;
73
+ company_role: z.ZodNullable<z.ZodString>;
74
+ company: z.ZodObject<{
75
+ hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
+ stand_number: z.ZodString;
77
+ company_name: z.ZodString;
78
+ business: z.ZodString;
79
+ departure_city: z.ZodString;
80
+ contact_name: z.ZodString;
81
+ email: z.ZodEmail;
82
+ phone: z.ZodString;
83
+ driver_name: z.ZodString;
84
+ driver_phone: z.ZodString;
85
+ transport_company: z.ZodString;
86
+ }, z.core.$strip>;
87
+ vehicle: z.ZodObject<{
88
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
89
+ unloading_method: z.ZodEnum<typeof UnloadingType>;
90
+ license_plate: z.ZodString;
91
+ trailer_registration: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ entry_scanned_at: z.ZodNullable<z.ZodString>;
94
+ exit_scanned_at: z.ZodNullable<z.ZodString>;
95
+ parking_spot: z.ZodString;
96
+ door: z.ZodString;
97
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
98
+ }, z.core.$strip>;
99
99
  export declare const eventBookingsDataSchema: z.ZodObject<{
100
100
  event_id: z.ZodNumber;
101
101
  event_code: z.ZodString;
@@ -113,32 +113,30 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
113
113
  start_time: z.ZodNullable<z.ZodString>;
114
114
  end_time: z.ZodNullable<z.ZodString>;
115
115
  company_role: z.ZodNullable<z.ZodString>;
116
- company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
117
- vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
116
+ company: z.ZodObject<{
117
+ hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
118
+ stand_number: z.ZodString;
119
+ company_name: z.ZodString;
120
+ business: z.ZodString;
121
+ departure_city: z.ZodString;
122
+ contact_name: z.ZodString;
123
+ email: z.ZodEmail;
124
+ phone: z.ZodString;
125
+ driver_name: z.ZodString;
126
+ driver_phone: z.ZodString;
127
+ transport_company: z.ZodString;
128
+ }, z.core.$strip>;
129
+ vehicle: z.ZodObject<{
130
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
131
+ unloading_method: z.ZodEnum<typeof UnloadingType>;
132
+ license_plate: z.ZodString;
133
+ trailer_registration: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>;
118
135
  entry_scanned_at: z.ZodNullable<z.ZodString>;
119
136
  exit_scanned_at: z.ZodNullable<z.ZodString>;
120
- parking_area_schedule: z.ZodOptional<z.ZodObject<{
121
- id: z.ZodNumber;
122
- date: z.ZodString;
123
- start_time: z.ZodString;
124
- end_time: z.ZodString;
125
- duration: z.ZodNumber;
126
- parking_area_id: z.ZodNumber;
127
- parking_area_schedule_type: z.ZodEnum<{
128
- assembly: import("./index.js").ParkingAreaScheduleType.ASSEMBLY;
129
- dismantling: import("./index.js").ParkingAreaScheduleType.DISMANTLING;
130
- }>;
131
- company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
132
- vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
133
- PL: import("./index.js").VehicleType.PL;
134
- VUL: import("./index.js").VehicleType.VUL;
135
- VL: import("./index.js").VehicleType.VL;
136
- }>>>;
137
- created_at: z.ZodString;
138
- updated_at: z.ZodString;
139
- created_by: z.ZodNullable<z.ZodString>;
140
- updated_by: z.ZodNullable<z.ZodString>;
141
- }, z.core.$strip>>;
137
+ parking_spot: z.ZodString;
138
+ door: z.ZodString;
139
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
142
140
  }, z.core.$strip>>;
143
141
  total_count: z.ZodNumber;
144
142
  }, z.core.$strip>;
@@ -161,32 +159,30 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
161
159
  start_time: z.ZodNullable<z.ZodString>;
162
160
  end_time: z.ZodNullable<z.ZodString>;
163
161
  company_role: z.ZodNullable<z.ZodString>;
164
- company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
165
- vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
162
+ company: z.ZodObject<{
163
+ hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
164
+ stand_number: z.ZodString;
165
+ company_name: z.ZodString;
166
+ business: z.ZodString;
167
+ departure_city: z.ZodString;
168
+ contact_name: z.ZodString;
169
+ email: z.ZodEmail;
170
+ phone: z.ZodString;
171
+ driver_name: z.ZodString;
172
+ driver_phone: z.ZodString;
173
+ transport_company: z.ZodString;
174
+ }, z.core.$strip>;
175
+ vehicle: z.ZodObject<{
176
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
177
+ unloading_method: z.ZodEnum<typeof UnloadingType>;
178
+ license_plate: z.ZodString;
179
+ trailer_registration: z.ZodOptional<z.ZodString>;
180
+ }, z.core.$strip>;
166
181
  entry_scanned_at: z.ZodNullable<z.ZodString>;
167
182
  exit_scanned_at: z.ZodNullable<z.ZodString>;
168
- parking_area_schedule: z.ZodOptional<z.ZodObject<{
169
- id: z.ZodNumber;
170
- date: z.ZodString;
171
- start_time: z.ZodString;
172
- end_time: z.ZodString;
173
- duration: z.ZodNumber;
174
- parking_area_id: z.ZodNumber;
175
- parking_area_schedule_type: z.ZodEnum<{
176
- assembly: import("./index.js").ParkingAreaScheduleType.ASSEMBLY;
177
- dismantling: import("./index.js").ParkingAreaScheduleType.DISMANTLING;
178
- }>;
179
- company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
180
- vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
181
- PL: import("./index.js").VehicleType.PL;
182
- VUL: import("./index.js").VehicleType.VUL;
183
- VL: import("./index.js").VehicleType.VL;
184
- }>>>;
185
- created_at: z.ZodString;
186
- updated_at: z.ZodString;
187
- created_by: z.ZodNullable<z.ZodString>;
188
- updated_by: z.ZodNullable<z.ZodString>;
189
- }, z.core.$strip>>;
183
+ parking_spot: z.ZodString;
184
+ door: z.ZodString;
185
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
190
186
  }, z.core.$strip>>;
191
187
  total_count: z.ZodNumber;
192
188
  }, z.core.$strip>;
@@ -236,83 +232,37 @@ export declare const confirmAccessResponseSchema: z.ZodObject<{
236
232
  }, z.core.$strip>;
237
233
  }, z.core.$strip>;
238
234
  export declare const checkSlotAvailabilityBodySchema: z.ZodObject<{
239
- schedule_id: z.ZodNumber;
240
- date: z.ZodString;
241
- start_time: z.ZodString;
242
- company_role: z.ZodString;
243
- }, z.core.$strip>;
244
- export declare const checkSlotAvailabilityDataSchema: z.ZodObject<{
245
- schedule_id: z.ZodNumber;
246
- date: z.ZodString;
247
- start_time: z.ZodString;
248
- is_available: z.ZodBoolean;
249
- max_capacity: z.ZodNumber;
250
- current_bookings: z.ZodNumber;
251
- confirmed_bookings: z.ZodNumber;
252
- available_capacity: z.ZodNumber;
235
+ slot_key: z.ZodString;
236
+ event_id: z.ZodNumber;
237
+ year: z.ZodNumber;
238
+ month: z.ZodNumber;
239
+ company_name: z.ZodString;
240
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
241
+ schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
253
242
  }, z.core.$strip>;
254
243
  export declare const checkSlotAvailabilityResponseSchema: z.ZodObject<{
255
244
  success: z.ZodBoolean;
256
245
  data: z.ZodObject<{
257
- schedule_id: z.ZodNumber;
258
246
  date: z.ZodString;
259
247
  start_time: z.ZodString;
260
- is_available: z.ZodBoolean;
248
+ end_time: z.ZodString;
249
+ duration: z.ZodNumber;
250
+ schedule_type: z.ZodEnum<{
251
+ assembly: "assembly";
252
+ dismantling: "dismantling";
253
+ }>;
261
254
  max_capacity: z.ZodNumber;
262
255
  current_bookings: z.ZodNumber;
263
256
  confirmed_bookings: z.ZodNumber;
264
257
  available_capacity: z.ZodNumber;
258
+ is_available: z.ZodBoolean;
259
+ door: z.ZodString;
260
+ parking_spot: z.ZodString;
261
+ entity_name: z.ZodString;
262
+ slot_key: z.ZodString;
265
263
  }, z.core.$strip>;
266
264
  }, z.core.$strip>;
267
- export declare const bookingDetailsDataSchema: z.ZodObject<{
268
- qr_token: z.ZodNullable<z.ZodString>;
269
- id: z.ZodNumber;
270
- booking_id: z.ZodNumber;
271
- status: z.ZodString;
272
- booking_date: z.ZodString;
273
- start_time: z.ZodString;
274
- end_time: z.ZodString;
275
- company_role: z.ZodNullable<z.ZodString>;
276
- company: z.ZodObject<{
277
- hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
278
- stand_number: z.ZodString;
279
- company_name: z.ZodString;
280
- business: z.ZodString;
281
- departure_city: z.ZodString;
282
- contact_name: z.ZodString;
283
- email: z.ZodEmail;
284
- phone: z.ZodString;
285
- driver_name: z.ZodString;
286
- driver_phone: z.ZodString;
287
- transport_company: z.ZodString;
288
- }, z.core.$strip>;
289
- vehicle: z.ZodObject<{
290
- vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
291
- unloading_method: z.ZodEnum<typeof UnloadingType>;
292
- license_plate: z.ZodString;
293
- trailer_registration: z.ZodOptional<z.ZodString>;
294
- }, z.core.$strip>;
295
- event_id: z.ZodNumber;
296
- event_name: z.ZodString;
297
- event_code: z.ZodString;
298
- venue_id: z.ZodNullable<z.ZodNumber>;
299
- venue_name: z.ZodNullable<z.ZodString>;
300
- request_type: z.ZodString;
301
- duration: z.ZodNumber;
302
- parking_area_schedule_id: z.ZodNumber;
303
- banner: z.ZodNullable<z.ZodObject<{
304
- url: z.ZodURL;
305
- name: z.ZodOptional<z.ZodString>;
306
- size: z.ZodOptional<z.ZodNumber>;
307
- bucket: z.ZodOptional<z.ZodString>;
308
- type: z.ZodOptional<z.ZodString>;
309
- path: z.ZodOptional<z.ZodString>;
310
- }, z.core.$strip>>;
311
- created_at: z.ZodString;
312
- updated_at: z.ZodString;
313
- }, z.core.$strip>;
314
265
  export declare const createParkingBookingBodySchema: z.ZodObject<{
315
- parking_area_schedule_id: z.ZodNumber;
316
266
  company: z.ZodObject<{
317
267
  hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
318
268
  stand_number: z.ZodString;
@@ -334,11 +284,12 @@ export declare const createParkingBookingBodySchema: z.ZodObject<{
334
284
  trailer_registration: z.ZodOptional<z.ZodString>;
335
285
  }, z.core.$strip>;
336
286
  booking_date: z.ZodString;
337
- start_time: z.ZodString;
287
+ event_id: z.ZodNumber;
288
+ slot_key: z.ZodString;
289
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
338
290
  }, z.core.$strip>;
339
291
  export declare const createParkingBookingDataSchema: z.ZodObject<{
340
292
  id: z.ZodNumber;
341
- parking_area_schedule_id: z.ZodNumber;
342
293
  status: z.ZodString;
343
294
  company_role: z.ZodString;
344
295
  company: z.ZodObject<{
@@ -363,6 +314,10 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
363
314
  booking_date: z.ZodString;
364
315
  start_time: z.ZodString;
365
316
  end_time: z.ZodString;
317
+ event_id: z.ZodNumber;
318
+ door: z.ZodString;
319
+ parking_spot: z.ZodString;
320
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
366
321
  created_at: z.ZodString;
367
322
  created_by: z.ZodNullable<z.ZodString>;
368
323
  }, z.core.$strip>;
@@ -371,7 +326,6 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
371
326
  message: z.ZodString;
372
327
  data: z.ZodObject<{
373
328
  id: z.ZodNumber;
374
- parking_area_schedule_id: z.ZodNumber;
375
329
  status: z.ZodString;
376
330
  company_role: z.ZodString;
377
331
  company: z.ZodObject<{
@@ -396,6 +350,10 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
396
350
  booking_date: z.ZodString;
397
351
  start_time: z.ZodString;
398
352
  end_time: z.ZodString;
353
+ event_id: z.ZodNumber;
354
+ door: z.ZodString;
355
+ parking_spot: z.ZodString;
356
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
399
357
  created_at: z.ZodString;
400
358
  created_by: z.ZodNullable<z.ZodString>;
401
359
  }, z.core.$strip>;
@@ -531,25 +489,23 @@ export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
531
489
  is_active: z.ZodBoolean;
532
490
  created_at: z.ZodString;
533
491
  updated_at: z.ZodString;
534
- parking_area_schedules: z.ZodObject<{
492
+ events: z.ZodObject<{
535
493
  id: z.ZodNumber;
536
- parking_area_schedule_type: z.ZodString;
537
- parking_areas: z.ZodObject<{
494
+ name: z.ZodString;
495
+ code: z.ZodString;
496
+ venue_id: z.ZodNullable<z.ZodNumber>;
497
+ banner: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
498
+ venues: z.ZodNullable<z.ZodObject<{
538
499
  id: z.ZodNumber;
539
500
  name: z.ZodString;
540
- events: z.ZodObject<{
541
- id: z.ZodNumber;
542
- name: z.ZodString;
543
- code: z.ZodString;
544
- venue_id: z.ZodNullable<z.ZodNumber>;
545
- banner: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
546
- venues: z.ZodNullable<z.ZodObject<{
547
- id: z.ZodNumber;
548
- name: z.ZodString;
549
- }, z.core.$strip>>;
550
- }, z.core.$strip>;
551
- }, z.core.$strip>;
501
+ }, z.core.$strip>>;
552
502
  }, z.core.$strip>;
503
+ parking_spot: z.ZodString;
504
+ door: z.ZodString;
505
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
506
+ slot_key: z.ZodString;
507
+ entry_scanned_at: z.ZodNullable<z.ZodString>;
508
+ exit_scanned_at: z.ZodNullable<z.ZodString>;
553
509
  }, z.core.$strip>;
554
510
  export declare const getParkingBookingDetailsParamsSchema: z.ZodObject<{
555
511
  bookingId: z.ZodCoercedNumber<unknown>;
@@ -589,11 +545,6 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
589
545
  venue_name: z.ZodNullable<z.ZodString>;
590
546
  request_type: z.ZodString;
591
547
  duration: z.ZodNumber;
592
- parking_area_schedule_id: z.ZodNumber;
593
- parking_area: z.ZodObject<{
594
- id: z.ZodNumber;
595
- name: z.ZodString;
596
- }, z.core.$strip>;
597
548
  banner: z.ZodNullable<z.ZodObject<{
598
549
  url: z.ZodURL;
599
550
  name: z.ZodOptional<z.ZodString>;
@@ -606,6 +557,10 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
606
557
  updated_at: z.ZodString;
607
558
  entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
559
  exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
560
+ slot_key: z.ZodString;
561
+ parking_spot: z.ZodString;
562
+ door: z.ZodString;
563
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
609
564
  }, z.core.$strip>;
610
565
  export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
611
566
  success: z.ZodBoolean;
@@ -644,11 +599,6 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
644
599
  venue_name: z.ZodNullable<z.ZodString>;
645
600
  request_type: z.ZodString;
646
601
  duration: z.ZodNumber;
647
- parking_area_schedule_id: z.ZodNumber;
648
- parking_area: z.ZodObject<{
649
- id: z.ZodNumber;
650
- name: z.ZodString;
651
- }, z.core.$strip>;
652
602
  banner: z.ZodNullable<z.ZodObject<{
653
603
  url: z.ZodURL;
654
604
  name: z.ZodOptional<z.ZodString>;
@@ -661,114 +611,18 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
661
611
  updated_at: z.ZodString;
662
612
  entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
663
613
  exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
614
+ slot_key: z.ZodString;
615
+ parking_spot: z.ZodString;
616
+ door: z.ZodString;
617
+ parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
664
618
  }, z.core.$strip>;
665
619
  }, z.core.$strip>;
666
620
  export declare const getParkingBookingDetailsByTokenBodySchema: z.ZodObject<{
667
621
  access_token: z.ZodString;
668
622
  }, z.core.$strip>;
669
- export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<{
670
- success: z.ZodBoolean;
671
- data: z.ZodObject<{
672
- qr_token: z.ZodNullable<z.ZodString>;
673
- id: z.ZodNumber;
674
- booking_id: z.ZodNumber;
675
- status: z.ZodString;
676
- booking_date: z.ZodString;
677
- start_time: z.ZodString;
678
- end_time: z.ZodString;
679
- company_role: z.ZodNullable<z.ZodString>;
680
- company: z.ZodObject<{
681
- hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
682
- stand_number: z.ZodString;
683
- company_name: z.ZodString;
684
- business: z.ZodString;
685
- departure_city: z.ZodString;
686
- contact_name: z.ZodString;
687
- email: z.ZodEmail;
688
- phone: z.ZodString;
689
- driver_name: z.ZodString;
690
- driver_phone: z.ZodString;
691
- transport_company: z.ZodString;
692
- }, z.core.$strip>;
693
- vehicle: z.ZodObject<{
694
- vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
695
- unloading_method: z.ZodEnum<typeof UnloadingType>;
696
- license_plate: z.ZodString;
697
- trailer_registration: z.ZodOptional<z.ZodString>;
698
- }, z.core.$strip>;
699
- event_id: z.ZodNumber;
700
- event_name: z.ZodString;
701
- event_code: z.ZodString;
702
- venue_id: z.ZodNullable<z.ZodNumber>;
703
- venue_name: z.ZodNullable<z.ZodString>;
704
- request_type: z.ZodString;
705
- duration: z.ZodNumber;
706
- parking_area_schedule_id: z.ZodNumber;
707
- banner: z.ZodNullable<z.ZodObject<{
708
- url: z.ZodURL;
709
- name: z.ZodOptional<z.ZodString>;
710
- size: z.ZodOptional<z.ZodNumber>;
711
- bucket: z.ZodOptional<z.ZodString>;
712
- type: z.ZodOptional<z.ZodString>;
713
- path: z.ZodOptional<z.ZodString>;
714
- }, z.core.$strip>>;
715
- created_at: z.ZodString;
716
- updated_at: z.ZodString;
717
- }, z.core.$strip>;
718
- }, z.core.$strip>;
719
623
  export declare const getParkingBookingDetailsByQrBodySchema: z.ZodObject<{
720
624
  qr_token: z.ZodString;
721
625
  }, z.core.$strip>;
722
- export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
723
- success: z.ZodBoolean;
724
- data: z.ZodObject<{
725
- qr_token: z.ZodNullable<z.ZodString>;
726
- id: z.ZodNumber;
727
- booking_id: z.ZodNumber;
728
- status: z.ZodString;
729
- booking_date: z.ZodString;
730
- start_time: z.ZodString;
731
- end_time: z.ZodString;
732
- company_role: z.ZodNullable<z.ZodString>;
733
- company: z.ZodObject<{
734
- hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
735
- stand_number: z.ZodString;
736
- company_name: z.ZodString;
737
- business: z.ZodString;
738
- departure_city: z.ZodString;
739
- contact_name: z.ZodString;
740
- email: z.ZodEmail;
741
- phone: z.ZodString;
742
- driver_name: z.ZodString;
743
- driver_phone: z.ZodString;
744
- transport_company: z.ZodString;
745
- }, z.core.$strip>;
746
- vehicle: z.ZodObject<{
747
- vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
748
- unloading_method: z.ZodEnum<typeof UnloadingType>;
749
- license_plate: z.ZodString;
750
- trailer_registration: z.ZodOptional<z.ZodString>;
751
- }, z.core.$strip>;
752
- event_id: z.ZodNumber;
753
- event_name: z.ZodString;
754
- event_code: z.ZodString;
755
- venue_id: z.ZodNullable<z.ZodNumber>;
756
- venue_name: z.ZodNullable<z.ZodString>;
757
- request_type: z.ZodString;
758
- duration: z.ZodNumber;
759
- parking_area_schedule_id: z.ZodNumber;
760
- banner: z.ZodNullable<z.ZodObject<{
761
- url: z.ZodURL;
762
- name: z.ZodOptional<z.ZodString>;
763
- size: z.ZodOptional<z.ZodNumber>;
764
- bucket: z.ZodOptional<z.ZodString>;
765
- type: z.ZodOptional<z.ZodString>;
766
- path: z.ZodOptional<z.ZodString>;
767
- }, z.core.$strip>>;
768
- created_at: z.ZodString;
769
- updated_at: z.ZodString;
770
- }, z.core.$strip>;
771
- }, z.core.$strip>;
772
626
  export declare const exportBookingDataSchema: z.ZodObject<{
773
627
  booking_id: z.ZodNumber;
774
628
  event_id: z.ZodNumber;
@@ -823,11 +677,10 @@ export declare const updateBookingTimeParamsSchema: z.ZodObject<{
823
677
  export declare const updateBookingTimeBodySchema: z.ZodObject<{
824
678
  booking_date: z.ZodString;
825
679
  start_time: z.ZodString;
826
- parking_area_schedule_id: z.ZodNumber;
680
+ slot_key: z.ZodString;
827
681
  }, z.core.$strip>;
828
682
  export declare const updateBookingTimeDataSchema: z.ZodObject<{
829
683
  booking_id: z.ZodNumber;
830
- parking_area_schedule_id: z.ZodNumber;
831
684
  booking_date: z.ZodString;
832
685
  start_time: z.ZodString;
833
686
  end_time: z.ZodString;
@@ -839,7 +692,6 @@ export declare const updateBookingTimeResponseSchema: z.ZodObject<{
839
692
  message: z.ZodString;
840
693
  data: z.ZodObject<{
841
694
  booking_id: z.ZodNumber;
842
- parking_area_schedule_id: z.ZodNumber;
843
695
  booking_date: z.ZodString;
844
696
  start_time: z.ZodString;
845
697
  end_time: z.ZodString;
@@ -853,7 +705,7 @@ export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
853
705
  export type VehicleDetails = z.infer<typeof vehicleDetailsSchema>;
854
706
  export type EventBookingsData = z.infer<typeof eventBookingsDataSchema>;
855
707
  export type CheckSlotAvailabilityBody = z.infer<typeof checkSlotAvailabilityBodySchema>;
856
- export type CheckSlotAvailabilityData = z.infer<typeof checkSlotAvailabilityDataSchema>;
708
+ export type CheckSlotAvailabilityData = z.infer<typeof availableTimeSlotV2Schema>;
857
709
  export type CheckSlotAvailabilityResponse = z.infer<typeof checkSlotAvailabilityResponseSchema>;
858
710
  export type ParkingBookingDetailsData = z.infer<typeof parkingBookingDetailsDataSchema>;
859
711
  export type UpdateParkingBookingBody = z.infer<typeof updateParkingBookingBodySchema>;
@@ -877,11 +729,7 @@ export type GetBookingDetailsParams = z.infer<typeof getParkingBookingDetailsPar
877
729
  export type GetBookingDetailsData = z.infer<typeof parkingBookingDetailsDataSchema>;
878
730
  export type GetBookingDetailsResponse = z.infer<typeof getParkingBookingDetailsResponseSchema>;
879
731
  export type GetBookingDetailsByTokenBody = z.infer<typeof getParkingBookingDetailsByTokenBodySchema>;
880
- export type GetBookingDetailsByTokenData = z.infer<typeof bookingDetailsDataSchema>;
881
- export type GetBookingDetailsByTokenResponse = z.infer<typeof getParkingBookingDetailsByTokenResponseSchema>;
882
732
  export type GetBookingDetailsByQrBody = z.infer<typeof getParkingBookingDetailsByQrBodySchema>;
883
- export type GetBookingDetailsByQrData = z.infer<typeof bookingDetailsDataSchema>;
884
- export type GetBookingDetailsByQrResponse = z.infer<typeof getParkingBookingDetailsByQrResponseSchema>;
885
733
  export type ConfirmBookingData = z.infer<typeof confirmBookingDataSchema>;
886
734
  export type ConfirmBookingDataResponse = z.infer<typeof confirmBookingResponseSchema>;
887
735
  export type ExportBookingData = z.infer<typeof exportBookingDataSchema>;
@@ -3,8 +3,9 @@ import { paginationSchema } from './pagination.js';
3
3
  import { BookingStatus } from './enums/bookingStatus.js';
4
4
  import { createSuccessResponseSchema, createMessageDataResponseSchema, documentSchema, vehicleTypeSchema } from './common.js';
5
5
  import { z } from './zod.js';
6
- import { parkingAreaScheduleSchema } from './parkingArea.js';
6
+ import { availableTimeSlotV2Schema, getAvailableSlotsBodyV2Schema } from './parkingArea.js';
7
7
  import { UnloadingType } from './enums/unloadingType.js';
8
+ import { ParkingAreaScheduleType } from './enums/parkingAreaScheduleType.js';
8
9
  // PostGIS geometry schema (GeoJSON-like structure)
9
10
  export const geometrySchema = z
10
11
  .object({
@@ -84,26 +85,6 @@ export const closeEventBodySchema = z
84
85
  })
85
86
  })
86
87
  .openapi('CloseEventBody');
87
- export const parkingBookingSchema = z.object({
88
- id: z.number(),
89
- parking_area_schedule_id: z.number(),
90
- status: z.enum(BookingStatus),
91
- is_active: z.boolean(),
92
- created_at: z.string(),
93
- updated_at: z.string(),
94
- created_by: z.string().nullable(),
95
- updated_by: z.string().nullable(),
96
- booking_date: z.string().nullable(),
97
- start_time: z.string().nullable(),
98
- end_time: z.string().nullable(),
99
- company_role: z.string().nullable(),
100
- company: z.record(z.string(), z.unknown()).nullable().optional(),
101
- vehicle: z.record(z.string(), z.unknown()).nullable().optional(),
102
- entry_scanned_at: z.string().nullable(),
103
- exit_scanned_at: z.string().nullable(),
104
- // Include the schedule details
105
- parking_area_schedule: parkingAreaScheduleSchema.optional()
106
- });
107
88
  export const companyDetailsSchema = z
108
89
  .object({
109
90
  hall: z.string().optional().nullable().openapi({
@@ -169,6 +150,27 @@ export const vehicleDetailsSchema = z
169
150
  })
170
151
  })
171
152
  .openapi('VehicleDetails');
153
+ export const parkingBookingSchema = z.object({
154
+ id: z.number(),
155
+ parking_area_schedule_id: z.number(),
156
+ status: z.enum(BookingStatus),
157
+ is_active: z.boolean(),
158
+ created_at: z.string(),
159
+ updated_at: z.string(),
160
+ created_by: z.string().nullable(),
161
+ updated_by: z.string().nullable(),
162
+ booking_date: z.string().nullable(),
163
+ start_time: z.string().nullable(),
164
+ end_time: z.string().nullable(),
165
+ company_role: z.string().nullable(),
166
+ company: companyDetailsSchema,
167
+ vehicle: vehicleDetailsSchema,
168
+ entry_scanned_at: z.string().nullable(),
169
+ exit_scanned_at: z.string().nullable(),
170
+ parking_spot: z.string(),
171
+ door: z.string(),
172
+ parking_schedule_type: z.enum(ParkingAreaScheduleType)
173
+ });
172
174
  export const eventBookingsDataSchema = z
173
175
  .object({
174
176
  event_id: z.number(),
@@ -264,170 +266,20 @@ export const confirmAccessResponseSchema = z.object({
264
266
  // ------------------------------
265
267
  export const checkSlotAvailabilityBodySchema = z
266
268
  .object({
267
- schedule_id: z.number().positive().openapi({
268
- description: 'The ID of the parking area schedule',
269
- example: 1
270
- }),
271
- date: z
272
- .string()
273
- .regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be in YYYY-MM-DD format')
274
- .openapi({
275
- description: 'The date to check availability (YYYY-MM-DD)',
276
- example: '2025-12-15'
277
- }),
278
- start_time: z
279
- .string()
280
- .regex(/^\d{2}:\d{2}$/, 'Time must be in HH:MM format')
281
- .openapi({
282
- description: 'The start time to check availability (HH:MM)',
283
- example: '08:00'
284
- }),
285
- company_role: z.string().min(1, 'Company role is required').openapi({
286
- description: 'Company role to check availability for',
287
- example: 'exhibitor'
269
+ ...getAvailableSlotsBodyV2Schema.shape,
270
+ slot_key: z.string().min(1, 'Slot key is required').openapi({
271
+ description: 'Unique key identifying the time slot to check',
272
+ example: 'MainEntrance_2025-12-15_08:00'
288
273
  })
289
274
  })
290
275
  .openapi('CheckSlotAvailabilityBody');
291
- export const checkSlotAvailabilityDataSchema = z
292
- .object({
293
- schedule_id: z.number().openapi({
294
- description: 'ID of the parking area schedule',
295
- example: 1
296
- }),
297
- date: z.string().openapi({
298
- description: 'Date checked',
299
- example: '2025-12-15'
300
- }),
301
- start_time: z.string().openapi({
302
- description: 'Time slot checked',
303
- example: '08:00'
304
- }),
305
- is_available: z.boolean().openapi({
306
- description: 'Whether the slot is available for booking',
307
- example: true
308
- }),
309
- max_capacity: z.number().openapi({
310
- description: 'Maximum booking capacity',
311
- example: 5
312
- }),
313
- current_bookings: z.number().openapi({
314
- description: 'Current number of total bookings',
315
- example: 3
316
- }),
317
- confirmed_bookings: z.number().openapi({
318
- description: 'Current number of confirmed bookings',
319
- example: 1
320
- }),
321
- available_capacity: z.number().openapi({
322
- description: 'Remaining available capacity',
323
- example: 2
324
- })
325
- })
326
- .openapi('CheckSlotAvailabilityData');
327
- export const checkSlotAvailabilityResponseSchema = createSuccessResponseSchema(checkSlotAvailabilityDataSchema, 'CheckSlotAvailabilityResponse', 'Slot availability information with capacity details');
328
- // ------------------------------
329
- // QR Code Generation schemas
330
- // ------------------------------
331
- export const bookingDetailsDataSchema = z
332
- .object({
333
- qr_token: z.string().nullable().openapi({
334
- description: 'QR token for verification',
335
- example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
336
- }),
337
- id: z.number().openapi({
338
- description: 'ID of the booking',
339
- example: 123
340
- }),
341
- booking_id: z.number().openapi({
342
- description: 'ID of the booking',
343
- example: 123
344
- }),
345
- status: z.string().openapi({
346
- description: 'Booking status',
347
- example: 'confirmed'
348
- }),
349
- booking_date: z.string().openapi({
350
- description: 'Date of the booking',
351
- example: '2025-12-15'
352
- }),
353
- start_time: z.string().openapi({
354
- description: 'Start time of the booking',
355
- example: '08:00'
356
- }),
357
- end_time: z.string().openapi({
358
- description: 'End time of the booking',
359
- example: '08:30'
360
- }),
361
- company_role: z.string().nullable().openapi({
362
- description: 'Company role for the booking',
363
- example: 'exhibitor'
364
- }),
365
- company: companyDetailsSchema.openapi({
366
- description: 'Company details'
367
- }),
368
- vehicle: vehicleDetailsSchema.openapi({
369
- description: 'Vehicle details'
370
- }),
371
- event_id: z.number().openapi({
372
- description: 'ID of the event',
373
- example: 1
374
- }),
375
- event_name: z.string().openapi({
376
- description: 'Name of the event',
377
- example: 'Paris Fashion Week 2025'
378
- }),
379
- event_code: z.string().openapi({
380
- description: 'Code of the event',
381
- example: 'PFW2025'
382
- }),
383
- venue_id: z.number().nullable().openapi({
384
- description: 'ID of the venue',
385
- example: 1
386
- }),
387
- venue_name: z.string().nullable().openapi({
388
- description: 'Name of the venue',
389
- example: 'Paris Expo Porte de Versailles'
390
- }),
391
- request_type: z.string().openapi({
392
- description: 'Type of parking area schedule (assembly/dismantling)',
393
- example: 'assembly'
394
- }),
395
- duration: z.number().openapi({
396
- description: 'Duration of the booking in minutes',
397
- example: 30
398
- }),
399
- parking_area_schedule_id: z.number().openapi({
400
- description: 'ID of the parking area schedule',
401
- example: 456
402
- }),
403
- banner: documentSchema.nullable().openapi({
404
- description: 'Event banner document',
405
- example: {
406
- url: 'https://example.com/event-banner.jpg',
407
- name: 'event-banner.jpg',
408
- type: 'image/jpeg'
409
- }
410
- }),
411
- created_at: z.string().openapi({
412
- description: 'Timestamp when booking was created',
413
- example: '2025-12-05T10:30:00.000Z'
414
- }),
415
- updated_at: z.string().openapi({
416
- description: 'Timestamp when booking was last updated',
417
- example: '2025-12-05T10:30:00.000Z'
418
- })
419
- })
420
- .openapi('BookingDetailsData');
276
+ export const checkSlotAvailabilityResponseSchema = createSuccessResponseSchema(availableTimeSlotV2Schema, 'CheckSlotAvailabilityResponse', 'Slot availability information with capacity details');
421
277
  // ------------------------------
422
278
  // Create Parking Booking schemas
423
279
  // ------------------------------
424
280
  // Request schema
425
281
  export const createParkingBookingBodySchema = z
426
282
  .object({
427
- parking_area_schedule_id: z.number().int().positive().openapi({
428
- description: 'ID of the parking area schedule to book',
429
- example: 1
430
- }),
431
283
  // Company details
432
284
  company: companyDetailsSchema.openapi({
433
285
  description: 'Company details including stand, contact, and driver info'
@@ -447,12 +299,17 @@ export const createParkingBookingBodySchema = z
447
299
  description: 'Booking date (YYYY-MM-DD)',
448
300
  example: '2025-12-25'
449
301
  }),
450
- start_time: z
451
- .string()
452
- .regex(/^\d{2}:\d{2}$/)
453
- .openapi({
454
- description: 'Start time (HH:MM)',
455
- example: '06:00'
302
+ event_id: z.number().positive().openapi({
303
+ description: 'ID of the event for which the booking is made',
304
+ example: 1
305
+ }),
306
+ slot_key: z.string().min(1, 'Slot key is required').openapi({
307
+ description: 'Unique key identifying the time slot to book',
308
+ example: 'MainEntrance_2025-12-25_06:00'
309
+ }),
310
+ parking_schedule_type: z.enum(ParkingAreaScheduleType).openapi({
311
+ description: 'Type of parking area schedule',
312
+ example: 'assembly'
456
313
  })
457
314
  })
458
315
  .openapi('CreateParkingBookingBody');
@@ -460,7 +317,6 @@ export const createParkingBookingBodySchema = z
460
317
  export const createParkingBookingDataSchema = z
461
318
  .object({
462
319
  id: z.number(),
463
- parking_area_schedule_id: z.number(),
464
320
  status: z.string(),
465
321
  company_role: z.string(),
466
322
  company: companyDetailsSchema.openapi({
@@ -472,6 +328,10 @@ export const createParkingBookingDataSchema = z
472
328
  booking_date: z.string(),
473
329
  start_time: z.string(),
474
330
  end_time: z.string(),
331
+ event_id: z.number(),
332
+ door: z.string(),
333
+ parking_spot: z.string(),
334
+ parking_schedule_type: z.enum(ParkingAreaScheduleType),
475
335
  created_at: z.string(),
476
336
  created_by: z.string().nullable()
477
337
  })
@@ -599,27 +459,25 @@ export const parkingBookingWithRelationsSchema = z
599
459
  is_active: z.boolean(),
600
460
  created_at: z.string(),
601
461
  updated_at: z.string(),
602
- parking_area_schedules: z.object({
462
+ events: z.object({
603
463
  id: z.number(),
604
- parking_area_schedule_type: z.string(),
605
- parking_areas: z.object({
464
+ name: z.string(),
465
+ code: z.string(),
466
+ venue_id: z.number().nullable(),
467
+ banner: z.record(z.string(), z.unknown()).nullable(),
468
+ venues: z
469
+ .object({
606
470
  id: z.number(),
607
- name: z.string(),
608
- events: z.object({
609
- id: z.number(),
610
- name: z.string(),
611
- code: z.string(),
612
- venue_id: z.number().nullable(),
613
- banner: z.record(z.string(), z.unknown()).nullable(),
614
- venues: z
615
- .object({
616
- id: z.number(),
617
- name: z.string()
618
- })
619
- .nullable()
620
- })
471
+ name: z.string()
621
472
  })
622
- })
473
+ .nullable()
474
+ }),
475
+ parking_spot: z.string(),
476
+ door: z.string(),
477
+ parking_schedule_type: z.enum(ParkingAreaScheduleType),
478
+ slot_key: z.string(),
479
+ entry_scanned_at: z.string().nullable(),
480
+ exit_scanned_at: z.string().nullable()
623
481
  })
624
482
  .openapi('ParkingBookingWithRelations');
625
483
  // ------------------------------
@@ -700,20 +558,6 @@ export const parkingBookingDetailsDataSchema = z
700
558
  description: 'Duration of the booking in minutes',
701
559
  example: 30
702
560
  }),
703
- parking_area_schedule_id: z.number().openapi({
704
- description: 'ID of the parking area schedule',
705
- example: 456
706
- }),
707
- parking_area: z.object({
708
- id: z.number().openapi({
709
- description: 'ID of parking area',
710
- example: 30
711
- }),
712
- name: z.string().openapi({
713
- description: 'Name of parking area',
714
- example: 'Parking Spot X'
715
- })
716
- }),
717
561
  banner: documentSchema.nullable().openapi({
718
562
  description: 'Event banner document',
719
563
  example: {
@@ -737,6 +581,22 @@ export const parkingBookingDetailsDataSchema = z
737
581
  exit_scanned_at: z.string().nullable().optional().openapi({
738
582
  description: 'Timestamp when exit was scanned',
739
583
  example: '2025-12-15T08:25:00.000Z'
584
+ }),
585
+ slot_key: z.string().openapi({
586
+ description: 'Unique key identifying the booked time slot',
587
+ example: 'MainEntrance_2025-12-15_08:00'
588
+ }),
589
+ parking_spot: z.string().openapi({
590
+ description: 'Assigned parking spot for the booking',
591
+ example: 'A-12'
592
+ }),
593
+ door: z.string().openapi({
594
+ description: 'Assigned door for the booking',
595
+ example: 'North Gate'
596
+ }),
597
+ parking_schedule_type: z.enum(ParkingAreaScheduleType).openapi({
598
+ description: 'Type of parking area schedule',
599
+ example: 'assembly'
740
600
  })
741
601
  })
742
602
  .openapi('ParkingBookingDetailsData');
@@ -752,7 +612,6 @@ export const getParkingBookingDetailsByTokenBodySchema = z
752
612
  })
753
613
  })
754
614
  .openapi('GetParkingBookingDetailsByTokenBody');
755
- export const getParkingBookingDetailsByTokenResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetParkingBookingDetailsByTokenResponse', 'Booking details retrieved by access token');
756
615
  // ------------------------------
757
616
  // Get booking details by QR schemas
758
617
  // ------------------------------
@@ -764,7 +623,6 @@ export const getParkingBookingDetailsByQrBodySchema = z
764
623
  })
765
624
  })
766
625
  .openapi('GetBookingDetailsByQrBody');
767
- export const getParkingBookingDetailsByQrResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByQrResponse', 'Booking details retrieved by QR token');
768
626
  // ------------------------------
769
627
  // Export All Parking Bookings
770
628
  // ------------------------------
@@ -864,9 +722,9 @@ export const updateBookingTimeBodySchema = z
864
722
  description: 'New start time (HH:MM)',
865
723
  example: '10:00'
866
724
  }),
867
- parking_area_schedule_id: z.number().int().positive().openapi({
868
- description: 'New parking area schedule ID',
869
- example: 5
725
+ slot_key: z.string().min(1, 'Slot key is required').openapi({
726
+ description: 'Unique key identifying the new time slot',
727
+ example: 'MainEntrance_2025-12-25_10:00'
870
728
  })
871
729
  })
872
730
  .openapi('UpdateBookingTimeBody');
@@ -876,10 +734,6 @@ export const updateBookingTimeDataSchema = z
876
734
  description: 'ID of the updated booking',
877
735
  example: 1
878
736
  }),
879
- parking_area_schedule_id: z.number().openapi({
880
- description: 'New parking area schedule ID',
881
- example: 5
882
- }),
883
737
  booking_date: z.string().openapi({
884
738
  description: 'New booking date',
885
739
  example: '2025-12-25'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.7.6",
3
+ "version": "0.8.0-alpha.0",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",