@venulog/phasing-engine-schemas 0.7.4 → 0.7.6-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.
@@ -556,7 +556,6 @@ export declare const getAvailableParkingAreaSlotsQuerySchema: z.ZodObject<{
556
556
  event_id: z.ZodNumber;
557
557
  year: z.ZodCoercedNumber<unknown>;
558
558
  month: z.ZodCoercedNumber<unknown>;
559
- parking_area_id: z.ZodNumber;
560
559
  company_role: z.ZodString;
561
560
  schedule_type: z.ZodOptional<z.ZodEnum<{
562
561
  assembly: "assembly";
@@ -626,7 +625,6 @@ export declare const getAvailableSlotsBodySchema: z.ZodObject<{
626
625
  assembly: "assembly";
627
626
  dismantling: "dismantling";
628
627
  }>>;
629
- parking_area_id: z.ZodNumber;
630
628
  }, z.core.$strip>;
631
629
  export declare const availableTimeSlotSchema: z.ZodObject<{
632
630
  parking_area_schedule_id: z.ZodNumber;
@@ -713,10 +713,6 @@ export const getAvailableParkingAreaSlotsQuerySchema = z
713
713
  description: 'Month for filtering slots (1-12)',
714
714
  example: '6'
715
715
  }),
716
- parking_area_id: z.number().nonnegative().openapi({
717
- description: 'The ID of the parking area',
718
- example: '1'
719
- }),
720
716
  company_role: z.string().min(1, 'Company role is required').openapi({
721
717
  description: 'Company role to filter schedules by',
722
718
  example: 'exhibitor'
@@ -852,10 +848,6 @@ export const getAvailableSlotsBodySchema = z
852
848
  schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
853
849
  description: 'Filter by schedule type',
854
850
  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
859
851
  })
860
852
  })
861
853
  .openapi('GetAvailableSlotsBody');
@@ -816,6 +816,36 @@ export declare const exportBookingsResponseSchema: z.ZodObject<{
816
816
  filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
817
817
  }, z.core.$strip>;
818
818
  }, z.core.$strip>;
819
+ export declare const updateBookingTimeParamsSchema: z.ZodObject<{
820
+ bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
821
+ }, z.core.$strip>;
822
+ export declare const updateBookingTimeBodySchema: z.ZodObject<{
823
+ booking_date: z.ZodString;
824
+ start_time: z.ZodString;
825
+ parking_area_schedule_id: z.ZodNumber;
826
+ }, z.core.$strip>;
827
+ export declare const updateBookingTimeDataSchema: z.ZodObject<{
828
+ booking_id: z.ZodNumber;
829
+ parking_area_schedule_id: z.ZodNumber;
830
+ booking_date: z.ZodString;
831
+ start_time: z.ZodString;
832
+ end_time: z.ZodString;
833
+ updated_at: z.ZodString;
834
+ updated_by: z.ZodNullable<z.ZodString>;
835
+ }, z.core.$strip>;
836
+ export declare const updateBookingTimeResponseSchema: z.ZodObject<{
837
+ success: z.ZodBoolean;
838
+ message: z.ZodString;
839
+ data: z.ZodObject<{
840
+ booking_id: z.ZodNumber;
841
+ parking_area_schedule_id: z.ZodNumber;
842
+ booking_date: z.ZodString;
843
+ start_time: z.ZodString;
844
+ end_time: z.ZodString;
845
+ updated_at: z.ZodString;
846
+ updated_by: z.ZodNullable<z.ZodString>;
847
+ }, z.core.$strip>;
848
+ }, z.core.$strip>;
819
849
  export type Geometry = z.infer<typeof geometrySchema>;
820
850
  export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
821
851
  export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
@@ -857,3 +887,7 @@ export type ExportBookingData = z.infer<typeof exportBookingDataSchema>;
857
887
  export type ExportBookingsQuery = z.infer<typeof exportBookingsQuerySchema>;
858
888
  export type ExportBookingsData = z.infer<typeof exportBookingsDataSchema>;
859
889
  export type ExportBookingsResponse = z.infer<typeof exportBookingsResponseSchema>;
890
+ export type UpdateBookingTimeParams = z.infer<typeof updateBookingTimeParamsSchema>;
891
+ export type UpdateBookingTimeBody = z.infer<typeof updateBookingTimeBodySchema>;
892
+ export type UpdateBookingTimeData = z.infer<typeof updateBookingTimeDataSchema>;
893
+ export type UpdateBookingTimeResponse = z.infer<typeof updateBookingTimeResponseSchema>;
@@ -830,3 +830,72 @@ export const exportBookingsDataSchema = z
830
830
  })
831
831
  .openapi('ExportBookingsData');
832
832
  export const exportBookingsResponseSchema = createSuccessResponseSchema(exportBookingsDataSchema, 'ExportBookingsResponse', 'Exported parking bookings data');
833
+ export const updateBookingTimeParamsSchema = z
834
+ .object({
835
+ bookingId: z
836
+ .string()
837
+ .transform(val => parseInt(val, 10))
838
+ .refine(val => !isNaN(val) && val > 0, {
839
+ message: 'Booking ID must be a positive number'
840
+ })
841
+ .openapi({
842
+ description: 'Parking booking ID',
843
+ example: '1'
844
+ })
845
+ })
846
+ .openapi('UpdateBookingTimeParams');
847
+ export const updateBookingTimeBodySchema = z
848
+ .object({
849
+ booking_date: z
850
+ .string()
851
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be in YYYY-MM-DD format')
852
+ .openapi({
853
+ description: 'New booking date (YYYY-MM-DD)',
854
+ example: '2025-12-25'
855
+ }),
856
+ start_time: z
857
+ .string()
858
+ .regex(/^\d{2}:\d{2}$/, 'Time must be in HH:MM format')
859
+ .openapi({
860
+ description: 'New start time (HH:MM)',
861
+ example: '10:00'
862
+ }),
863
+ parking_area_schedule_id: z.number().int().positive().openapi({
864
+ description: 'New parking area schedule ID',
865
+ example: 5
866
+ })
867
+ })
868
+ .openapi('UpdateBookingTimeBody');
869
+ export const updateBookingTimeDataSchema = z
870
+ .object({
871
+ booking_id: z.number().openapi({
872
+ description: 'ID of the updated booking',
873
+ example: 1
874
+ }),
875
+ parking_area_schedule_id: z.number().openapi({
876
+ description: 'New parking area schedule ID',
877
+ example: 5
878
+ }),
879
+ booking_date: z.string().openapi({
880
+ description: 'New booking date',
881
+ example: '2025-12-25'
882
+ }),
883
+ start_time: z.string().openapi({
884
+ description: 'New start time',
885
+ example: '10:00'
886
+ }),
887
+ end_time: z.string().openapi({
888
+ description: 'Calculated end time based on schedule duration',
889
+ example: '13:00'
890
+ }),
891
+ updated_at: z.string().openapi({
892
+ description: 'Timestamp when booking was updated',
893
+ example: '2025-12-24T10:30:00Z'
894
+ }),
895
+ updated_by: z.string().nullable().openapi({
896
+ description: 'ID of the user who updated the booking',
897
+ example: 'user-123'
898
+ })
899
+ })
900
+ .openapi('UpdateBookingTimeData');
901
+ export const updateBookingTimeResponseSchema = createMessageDataResponseSchema(updateBookingTimeDataSchema, 'UpdateBookingTimeResponse', 'Booking time updated successfully', 'Details of the updated booking time');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.7.4",
3
+ "version": "0.7.6-alpha.0",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",