@venulog/phasing-engine-schemas 0.5.1-alpha.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.
- package/dist/parkingBooking.d.ts +52 -0
- package/dist/parkingBooking.js +69 -0
- package/package.json +1 -1
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -786,6 +786,54 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
786
786
|
updated_at: z.ZodString;
|
|
787
787
|
}, z.core.$strip>;
|
|
788
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>;
|
|
789
837
|
export type Geometry = z.infer<typeof geometrySchema>;
|
|
790
838
|
export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
|
|
791
839
|
export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
|
|
@@ -822,3 +870,7 @@ export type GetBookingDetailsByQrData = z.infer<typeof bookingDetailsDataSchema>
|
|
|
822
870
|
export type GetBookingDetailsByQrResponse = z.infer<typeof getParkingBookingDetailsByQrResponseSchema>;
|
|
823
871
|
export type ConfirmBookingData = z.infer<typeof confirmBookingDataSchema>;
|
|
824
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>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -712,3 +712,72 @@ export const getParkingBookingDetailsByQrBodySchema = z
|
|
|
712
712
|
})
|
|
713
713
|
.openapi('GetBookingDetailsByQrBody');
|
|
714
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');
|