@venulog/phasing-engine-schemas 0.8.2 → 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 +4 -0
- package/dist/event.js +19 -1
- package/dist/parkingBooking.d.ts +9 -9
- package/dist/parkingBooking.js +10 -8
- package/package.json +1 -1
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');
|
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -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>;
|
|
@@ -495,8 +495,8 @@ export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
|
|
|
495
495
|
code: z.ZodString;
|
|
496
496
|
venue_id: z.ZodNullable<z.ZodNumber>;
|
|
497
497
|
banner: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
498
|
-
latitude: z.ZodNullable<z.
|
|
499
|
-
longitude: z.ZodNullable<z.
|
|
498
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
499
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
500
500
|
venues: z.ZodNullable<z.ZodObject<{
|
|
501
501
|
id: z.ZodNumber;
|
|
502
502
|
name: z.ZodString;
|
|
@@ -544,8 +544,8 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
544
544
|
event_id: z.ZodNumber;
|
|
545
545
|
event_name: z.ZodString;
|
|
546
546
|
event_code: z.ZodString;
|
|
547
|
-
event_gps_latitude: z.
|
|
548
|
-
event_gps_longitude: z.
|
|
547
|
+
event_gps_latitude: z.ZodNullable<z.ZodNumber>;
|
|
548
|
+
event_gps_longitude: z.ZodNullable<z.ZodNumber>;
|
|
549
549
|
venue_id: z.ZodNullable<z.ZodNumber>;
|
|
550
550
|
venue_name: z.ZodNullable<z.ZodString>;
|
|
551
551
|
venue_address: z.ZodNullable<z.ZodString>;
|
|
@@ -601,8 +601,8 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
601
601
|
event_id: z.ZodNumber;
|
|
602
602
|
event_name: z.ZodString;
|
|
603
603
|
event_code: z.ZodString;
|
|
604
|
-
event_gps_latitude: z.
|
|
605
|
-
event_gps_longitude: z.
|
|
604
|
+
event_gps_latitude: z.ZodNullable<z.ZodNumber>;
|
|
605
|
+
event_gps_longitude: z.ZodNullable<z.ZodNumber>;
|
|
606
606
|
venue_id: z.ZodNullable<z.ZodNumber>;
|
|
607
607
|
venue_name: z.ZodNullable<z.ZodString>;
|
|
608
608
|
venue_address: z.ZodNullable<z.ZodString>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -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({
|
|
@@ -465,8 +467,8 @@ export const parkingBookingWithRelationsSchema = z
|
|
|
465
467
|
code: z.string(),
|
|
466
468
|
venue_id: z.number().nullable(),
|
|
467
469
|
banner: z.record(z.string(), z.unknown()).nullable(),
|
|
468
|
-
latitude: z.
|
|
469
|
-
longitude: z.
|
|
470
|
+
latitude: z.number().nullable(),
|
|
471
|
+
longitude: z.number().nullable(),
|
|
470
472
|
venues: z
|
|
471
473
|
.object({
|
|
472
474
|
id: z.number(),
|
|
@@ -545,13 +547,13 @@ export const parkingBookingDetailsDataSchema = z
|
|
|
545
547
|
description: 'Code of the event',
|
|
546
548
|
example: 'PFW2025'
|
|
547
549
|
}),
|
|
548
|
-
event_gps_latitude: z.
|
|
550
|
+
event_gps_latitude: z.number().nullable().openapi({
|
|
549
551
|
description: 'GPS latitude of the event',
|
|
550
|
-
example:
|
|
552
|
+
example: 48.123123
|
|
551
553
|
}),
|
|
552
|
-
event_gps_longitude: z.
|
|
554
|
+
event_gps_longitude: z.number().nullable().openapi({
|
|
553
555
|
description: 'GPS longitude of the event',
|
|
554
|
-
example:
|
|
556
|
+
example: 2.123123
|
|
555
557
|
}),
|
|
556
558
|
venue_id: z.number().nullable().openapi({
|
|
557
559
|
description: 'ID of the venue',
|