@venulog/phasing-engine-schemas 0.8.3 → 0.9.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/event.d.ts CHANGED
@@ -14,5 +14,9 @@ export declare const eventInfoResponseSchema: z.ZodObject<{
14
14
  event_code: z.ZodString;
15
15
  event_name: z.ZodString;
16
16
  venue_name: z.ZodString;
17
+ available_periods: z.ZodArray<z.ZodObject<{
18
+ month: z.ZodNumber;
19
+ year: z.ZodNumber;
20
+ }, z.core.$strip>>;
17
21
  }, z.core.$strip>;
18
22
  export type EventInfoResponse = z.infer<typeof eventInfoResponseSchema>;
package/dist/event.js CHANGED
@@ -35,6 +35,24 @@ export const eventInfoResponseSchema = z
35
35
  venue_name: z
36
36
  .string()
37
37
  .describe('The name of the venue where the event takes place')
38
- .openapi({ example: 'Paris Expo Porte de Versailles' })
38
+ .openapi({ example: 'Paris Expo Porte de Versailles' }),
39
+ available_periods: z
40
+ .array(z.object({
41
+ month: z
42
+ .number()
43
+ .int()
44
+ .min(1)
45
+ .max(12)
46
+ .describe('Month number (1-12)')
47
+ .openapi({ example: 2 }),
48
+ year: z.number().int().positive().describe('Year').openapi({ example: 2026 })
49
+ }))
50
+ .describe('Available month/year periods from bookings data')
51
+ .openapi({
52
+ example: [
53
+ { month: 2, year: 2026 },
54
+ { month: 3, year: 2026 }
55
+ ]
56
+ })
39
57
  })
40
58
  .openapi('EventInfoResponse');
@@ -60,7 +60,6 @@ export declare const vehicleDetailsSchema: z.ZodObject<{
60
60
  }, z.core.$strip>;
61
61
  export declare const parkingBookingSchema: z.ZodObject<{
62
62
  id: z.ZodNumber;
63
- parking_area_schedule_id: z.ZodNumber;
64
63
  status: z.ZodEnum<typeof BookingStatus>;
65
64
  is_active: z.ZodBoolean;
66
65
  created_at: z.ZodString;
@@ -95,6 +94,7 @@ export declare const parkingBookingSchema: z.ZodObject<{
95
94
  parking_spot: z.ZodString;
96
95
  door: z.ZodString;
97
96
  parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
97
+ time_zone: z.ZodString;
98
98
  }, z.core.$strip>;
99
99
  export declare const eventBookingsDataSchema: z.ZodObject<{
100
100
  event_id: z.ZodNumber;
@@ -102,7 +102,6 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
102
102
  event_name: z.ZodString;
103
103
  bookings: z.ZodArray<z.ZodObject<{
104
104
  id: z.ZodNumber;
105
- parking_area_schedule_id: z.ZodNumber;
106
105
  status: z.ZodEnum<typeof BookingStatus>;
107
106
  is_active: z.ZodBoolean;
108
107
  created_at: z.ZodString;
@@ -137,6 +136,7 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
137
136
  parking_spot: z.ZodString;
138
137
  door: z.ZodString;
139
138
  parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
139
+ time_zone: z.ZodString;
140
140
  }, z.core.$strip>>;
141
141
  total_count: z.ZodNumber;
142
142
  }, z.core.$strip>;
@@ -148,7 +148,6 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
148
148
  event_name: z.ZodString;
149
149
  bookings: z.ZodArray<z.ZodObject<{
150
150
  id: z.ZodNumber;
151
- parking_area_schedule_id: z.ZodNumber;
152
151
  status: z.ZodEnum<typeof BookingStatus>;
153
152
  is_active: z.ZodBoolean;
154
153
  created_at: z.ZodString;
@@ -183,6 +182,7 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
183
182
  parking_spot: z.ZodString;
184
183
  door: z.ZodString;
185
184
  parking_schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
185
+ time_zone: z.ZodString;
186
186
  }, z.core.$strip>>;
187
187
  total_count: z.ZodNumber;
188
188
  }, z.core.$strip>;
@@ -150,9 +150,10 @@ export const vehicleDetailsSchema = z
150
150
  })
151
151
  })
152
152
  .openapi('VehicleDetails');
153
+ // TODO: remove booking_date, start_time, end_time, time_zone and migrate to start_time with timezone info and end_time with timezone info
154
+ // so that we have full timezone support from db level
153
155
  export const parkingBookingSchema = z.object({
154
156
  id: z.number(),
155
- parking_area_schedule_id: z.number(),
156
157
  status: z.enum(BookingStatus),
157
158
  is_active: z.boolean(),
158
159
  created_at: z.string(),
@@ -169,7 +170,8 @@ export const parkingBookingSchema = z.object({
169
170
  exit_scanned_at: z.string().nullable(),
170
171
  parking_spot: z.string(),
171
172
  door: z.string(),
172
- parking_schedule_type: z.enum(ParkingAreaScheduleType)
173
+ parking_schedule_type: z.enum(ParkingAreaScheduleType),
174
+ time_zone: z.string()
173
175
  });
174
176
  export const eventBookingsDataSchema = z
175
177
  .object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.8.3",
3
+ "version": "0.9.0-alpha.0",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",