@venulog/phasing-engine-schemas 0.6.0-alpha.0 → 0.7.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.
- package/dist/parkingArea.d.ts +11 -2
- package/dist/parkingArea.js +30 -6
- package/dist/parkingBooking.d.ts +9 -52
- package/dist/parkingBooking.js +11 -69
- package/package.json +1 -1
package/dist/parkingArea.d.ts
CHANGED
|
@@ -96,6 +96,13 @@ export declare const parkingAreaWithSchedulesSchema: z.ZodObject<{
|
|
|
96
96
|
export declare const getParkingAreasByEventIdParamsSchema: z.ZodObject<{
|
|
97
97
|
eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
|
+
export declare const getParkingAreasByEventIdQuerySchema: z.ZodObject<{
|
|
100
|
+
company_role: z.ZodString;
|
|
101
|
+
schedule_type: z.ZodEnum<{
|
|
102
|
+
assembly: "assembly";
|
|
103
|
+
dismantling: "dismantling";
|
|
104
|
+
}>;
|
|
105
|
+
}, z.core.$strip>;
|
|
99
106
|
export declare const getParkingAreaByIdParamsSchema: z.ZodObject<{
|
|
100
107
|
areaId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
101
108
|
}, z.core.$strip>;
|
|
@@ -547,8 +554,9 @@ export declare const uploadSitePlanImageResponseSchema: z.ZodObject<{
|
|
|
547
554
|
}, z.core.$strip>;
|
|
548
555
|
export declare const getAvailableParkingAreaSlotsQuerySchema: z.ZodObject<{
|
|
549
556
|
event_id: z.ZodNumber;
|
|
550
|
-
year: z.
|
|
551
|
-
month: z.
|
|
557
|
+
year: z.ZodCoercedNumber<unknown>;
|
|
558
|
+
month: z.ZodCoercedNumber<unknown>;
|
|
559
|
+
parking_area_id: z.ZodNumber;
|
|
552
560
|
company_role: z.ZodString;
|
|
553
561
|
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
554
562
|
assembly: "assembly";
|
|
@@ -618,6 +626,7 @@ export declare const getAvailableSlotsBodySchema: z.ZodObject<{
|
|
|
618
626
|
assembly: "assembly";
|
|
619
627
|
dismantling: "dismantling";
|
|
620
628
|
}>>;
|
|
629
|
+
parking_area_id: z.ZodNumber;
|
|
621
630
|
}, z.core.$strip>;
|
|
622
631
|
export declare const availableTimeSlotSchema: z.ZodObject<{
|
|
623
632
|
parking_area_schedule_id: z.ZodNumber;
|
package/dist/parkingArea.js
CHANGED
|
@@ -176,6 +176,18 @@ export const getParkingAreasByEventIdParamsSchema = z
|
|
|
176
176
|
})
|
|
177
177
|
})
|
|
178
178
|
.openapi('GetParkingAreasByEventIdParams');
|
|
179
|
+
export const getParkingAreasByEventIdQuerySchema = z
|
|
180
|
+
.object({
|
|
181
|
+
company_role: z.string().min(1).openapi({
|
|
182
|
+
description: 'The designated company role',
|
|
183
|
+
example: 'Exhibitor'
|
|
184
|
+
}),
|
|
185
|
+
schedule_type: z.enum(['assembly', 'dismantling']).openapi({
|
|
186
|
+
description: 'Filter by schedule type',
|
|
187
|
+
example: 'assembly'
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
.openapi('GetParkingAreasByEventIdParams');
|
|
179
191
|
export const getParkingAreaByIdParamsSchema = z
|
|
180
192
|
.object({
|
|
181
193
|
areaId: z
|
|
@@ -685,17 +697,25 @@ export const uploadSitePlanImageResponseSchema = createMessageDataResponseSchema
|
|
|
685
697
|
// ------------------------------
|
|
686
698
|
export const getAvailableParkingAreaSlotsQuerySchema = z
|
|
687
699
|
.object({
|
|
688
|
-
event_id: z.number().
|
|
700
|
+
event_id: z.number().nonnegative().openapi({
|
|
689
701
|
description: 'The ID of the event',
|
|
690
|
-
example: 1
|
|
702
|
+
example: '1'
|
|
691
703
|
}),
|
|
692
|
-
year: z.
|
|
704
|
+
year: z.coerce
|
|
705
|
+
.number()
|
|
706
|
+
.int()
|
|
707
|
+
.refine(y => y >= 1000 && y <= 9999, { message: 'Year must be a 4-digit number' })
|
|
708
|
+
.openapi({
|
|
693
709
|
description: 'Year for filtering slots (YYYY)',
|
|
694
|
-
example: 2026
|
|
710
|
+
example: '2026'
|
|
695
711
|
}),
|
|
696
|
-
month: z.number().min(1).max(12).openapi({
|
|
712
|
+
month: z.coerce.number().int().min(1).max(12).openapi({
|
|
697
713
|
description: 'Month for filtering slots (1-12)',
|
|
698
|
-
example: 6
|
|
714
|
+
example: '6'
|
|
715
|
+
}),
|
|
716
|
+
parking_area_id: z.number().nonnegative().openapi({
|
|
717
|
+
description: 'The ID of the parking area',
|
|
718
|
+
example: '1'
|
|
699
719
|
}),
|
|
700
720
|
company_role: z.string().min(1, 'Company role is required').openapi({
|
|
701
721
|
description: 'Company role to filter schedules by',
|
|
@@ -832,6 +852,10 @@ export const getAvailableSlotsBodySchema = z
|
|
|
832
852
|
schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
|
|
833
853
|
description: 'Filter by schedule type',
|
|
834
854
|
example: 'assembly'
|
|
855
|
+
}),
|
|
856
|
+
parking_area_id: z.number().min(1, 'Parking area ID is required').openapi({
|
|
857
|
+
description: 'Parking area ID to check availability for',
|
|
858
|
+
example: 1
|
|
835
859
|
})
|
|
836
860
|
})
|
|
837
861
|
.openapi('GetAvailableSlotsBody');
|
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -550,6 +550,7 @@ export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
|
|
|
550
550
|
parking_area_schedule_type: z.ZodString;
|
|
551
551
|
parking_areas: z.ZodObject<{
|
|
552
552
|
id: z.ZodNumber;
|
|
553
|
+
name: z.ZodString;
|
|
553
554
|
events: z.ZodObject<{
|
|
554
555
|
id: z.ZodNumber;
|
|
555
556
|
name: z.ZodString;
|
|
@@ -607,6 +608,10 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
607
608
|
request_type: z.ZodString;
|
|
608
609
|
duration: z.ZodNumber;
|
|
609
610
|
parking_area_schedule_id: z.ZodNumber;
|
|
611
|
+
parking_area: z.ZodObject<{
|
|
612
|
+
id: z.ZodNumber;
|
|
613
|
+
name: z.ZodString;
|
|
614
|
+
}, z.core.$strip>;
|
|
610
615
|
banner: z.ZodNullable<z.ZodObject<{
|
|
611
616
|
url: z.ZodURL;
|
|
612
617
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -660,6 +665,10 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
660
665
|
request_type: z.ZodString;
|
|
661
666
|
duration: z.ZodNumber;
|
|
662
667
|
parking_area_schedule_id: z.ZodNumber;
|
|
668
|
+
parking_area: z.ZodObject<{
|
|
669
|
+
id: z.ZodNumber;
|
|
670
|
+
name: z.ZodString;
|
|
671
|
+
}, z.core.$strip>;
|
|
663
672
|
banner: z.ZodNullable<z.ZodObject<{
|
|
664
673
|
url: z.ZodURL;
|
|
665
674
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -786,54 +795,6 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
786
795
|
updated_at: z.ZodString;
|
|
787
796
|
}, z.core.$strip>;
|
|
788
797
|
}, 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>;
|
|
837
798
|
export type Geometry = z.infer<typeof geometrySchema>;
|
|
838
799
|
export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
|
|
839
800
|
export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
|
|
@@ -870,7 +831,3 @@ export type GetBookingDetailsByQrData = z.infer<typeof bookingDetailsDataSchema>
|
|
|
870
831
|
export type GetBookingDetailsByQrResponse = z.infer<typeof getParkingBookingDetailsByQrResponseSchema>;
|
|
871
832
|
export type ConfirmBookingData = z.infer<typeof confirmBookingDataSchema>;
|
|
872
833
|
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>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -570,6 +570,7 @@ export const parkingBookingWithRelationsSchema = z
|
|
|
570
570
|
parking_area_schedule_type: z.string(),
|
|
571
571
|
parking_areas: z.object({
|
|
572
572
|
id: z.number(),
|
|
573
|
+
name: z.string(),
|
|
573
574
|
events: z.object({
|
|
574
575
|
id: z.number(),
|
|
575
576
|
name: z.string(),
|
|
@@ -669,6 +670,16 @@ export const parkingBookingDetailsDataSchema = z
|
|
|
669
670
|
description: 'ID of the parking area schedule',
|
|
670
671
|
example: 456
|
|
671
672
|
}),
|
|
673
|
+
parking_area: z.object({
|
|
674
|
+
id: z.number().openapi({
|
|
675
|
+
description: 'ID of parking area',
|
|
676
|
+
example: 30
|
|
677
|
+
}),
|
|
678
|
+
name: z.string().openapi({
|
|
679
|
+
description: 'Name of parking area',
|
|
680
|
+
example: 'Parking Spot X'
|
|
681
|
+
})
|
|
682
|
+
}),
|
|
672
683
|
banner: documentSchema.nullable().openapi({
|
|
673
684
|
description: 'Event banner document',
|
|
674
685
|
example: {
|
|
@@ -712,72 +723,3 @@ export const getParkingBookingDetailsByQrBodySchema = z
|
|
|
712
723
|
})
|
|
713
724
|
.openapi('GetBookingDetailsByQrBody');
|
|
714
725
|
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');
|