@venulog/phasing-engine-schemas 0.7.6 → 0.8.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/parkingArea.d.ts +45 -17
- package/dist/parkingArea.js +100 -27
- package/dist/parkingBooking.d.ts +136 -288
- package/dist/parkingBooking.js +78 -224
- package/package.json +1 -1
package/dist/parkingArea.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare const parkingAreaItemSchema: z.ZodObject<{
|
|
|
51
51
|
}, z.core.$strip>>;
|
|
52
52
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
53
53
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
54
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
54
55
|
is_active: z.ZodBoolean;
|
|
55
56
|
created_at: z.ZodString;
|
|
56
57
|
updated_at: z.ZodString;
|
|
@@ -70,6 +71,7 @@ export declare const parkingAreaWithSchedulesSchema: z.ZodObject<{
|
|
|
70
71
|
}, z.core.$strip>>;
|
|
71
72
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
72
73
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
73
75
|
is_active: z.ZodBoolean;
|
|
74
76
|
created_at: z.ZodString;
|
|
75
77
|
updated_at: z.ZodString;
|
|
@@ -115,6 +117,7 @@ export declare const createParkingAreaBodySchema: z.ZodObject<{
|
|
|
115
117
|
}, z.core.$strip>>;
|
|
116
118
|
site_plan_image_url: z.ZodOptional<z.ZodString>;
|
|
117
119
|
surface_area_sqm: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
scale_pixels_per_meter: z.ZodOptional<z.ZodNumber>;
|
|
118
121
|
}, z.core.$strip>;
|
|
119
122
|
export declare const createParkingAreaDataSchema: z.ZodObject<{
|
|
120
123
|
parking_area_id: z.ZodNumber;
|
|
@@ -126,6 +129,7 @@ export declare const createParkingAreaDataSchema: z.ZodObject<{
|
|
|
126
129
|
}, z.core.$strip>>;
|
|
127
130
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
128
131
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
132
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
129
133
|
is_active: z.ZodBoolean;
|
|
130
134
|
created_at: z.ZodString;
|
|
131
135
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -143,6 +147,7 @@ export declare const createParkingAreaResponseSchema: z.ZodObject<{
|
|
|
143
147
|
}, z.core.$strip>>;
|
|
144
148
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
145
149
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
150
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
146
151
|
is_active: z.ZodBoolean;
|
|
147
152
|
created_at: z.ZodString;
|
|
148
153
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -157,6 +162,7 @@ export declare const bulkCreateParkingAreasBodySchema: z.ZodObject<{
|
|
|
157
162
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
158
163
|
}, z.core.$strip>>;
|
|
159
164
|
surface_area_sqm: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
scale_pixels_per_meter: z.ZodOptional<z.ZodNumber>;
|
|
160
166
|
}, z.core.$strip>>;
|
|
161
167
|
site_plan_image_url: z.ZodOptional<z.ZodString>;
|
|
162
168
|
}, z.core.$strip>;
|
|
@@ -173,6 +179,7 @@ export declare const bulkCreateParkingAreasDataSchema: z.ZodObject<{
|
|
|
173
179
|
}, z.core.$strip>>;
|
|
174
180
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
175
181
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
182
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
176
183
|
is_active: z.ZodBoolean;
|
|
177
184
|
created_at: z.ZodString;
|
|
178
185
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -199,6 +206,7 @@ export declare const bulkCreateParkingAreasResponseSchema: z.ZodObject<{
|
|
|
199
206
|
}, z.core.$strip>>;
|
|
200
207
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
201
208
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
209
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
202
210
|
is_active: z.ZodBoolean;
|
|
203
211
|
created_at: z.ZodString;
|
|
204
212
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -221,6 +229,7 @@ export declare const updateParkingAreaBodySchema: z.ZodObject<{
|
|
|
221
229
|
}, z.core.$strip>>>;
|
|
222
230
|
site_plan_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
231
|
surface_area_sqm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
232
|
+
scale_pixels_per_meter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
224
233
|
is_active: z.ZodOptional<z.ZodBoolean>;
|
|
225
234
|
}, z.core.$strip>;
|
|
226
235
|
export declare const updateParkingAreaDataSchema: z.ZodObject<{
|
|
@@ -233,6 +242,7 @@ export declare const updateParkingAreaDataSchema: z.ZodObject<{
|
|
|
233
242
|
}, z.core.$strip>>;
|
|
234
243
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
235
244
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
245
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
236
246
|
is_active: z.ZodBoolean;
|
|
237
247
|
updated_at: z.ZodString;
|
|
238
248
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
@@ -250,6 +260,7 @@ export declare const updateParkingAreaResponseSchema: z.ZodObject<{
|
|
|
250
260
|
}, z.core.$strip>>;
|
|
251
261
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
252
262
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
263
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
253
264
|
is_active: z.ZodBoolean;
|
|
254
265
|
updated_at: z.ZodString;
|
|
255
266
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
@@ -282,6 +293,7 @@ export declare const getParkingAreasDataSchema: z.ZodObject<{
|
|
|
282
293
|
}, z.core.$strip>>;
|
|
283
294
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
284
295
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
296
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
285
297
|
is_active: z.ZodBoolean;
|
|
286
298
|
created_at: z.ZodString;
|
|
287
299
|
updated_at: z.ZodString;
|
|
@@ -304,6 +316,7 @@ export declare const getParkingAreasResponseSchema: z.ZodObject<{
|
|
|
304
316
|
}, z.core.$strip>>;
|
|
305
317
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
306
318
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
319
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
307
320
|
is_active: z.ZodBoolean;
|
|
308
321
|
created_at: z.ZodString;
|
|
309
322
|
updated_at: z.ZodString;
|
|
@@ -325,6 +338,7 @@ export declare const getParkingAreaDetailResponseSchema: z.ZodObject<{
|
|
|
325
338
|
}, z.core.$strip>>;
|
|
326
339
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
327
340
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
341
|
+
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
328
342
|
is_active: z.ZodBoolean;
|
|
329
343
|
created_at: z.ZodString;
|
|
330
344
|
updated_at: z.ZodString;
|
|
@@ -616,18 +630,15 @@ export declare const availableParkingAreaSlotsResponseSchema: z.ZodObject<{
|
|
|
616
630
|
}, z.core.$strip>>;
|
|
617
631
|
total_slots: z.ZodNumber;
|
|
618
632
|
}, z.core.$strip>;
|
|
619
|
-
export declare const
|
|
633
|
+
export declare const getAvailableSlotsBodyV2Schema: z.ZodObject<{
|
|
620
634
|
event_id: z.ZodNumber;
|
|
621
635
|
year: z.ZodNumber;
|
|
622
636
|
month: z.ZodNumber;
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
dismantling: "dismantling";
|
|
627
|
-
}>>;
|
|
637
|
+
company_name: z.ZodString;
|
|
638
|
+
vehicle_type: z.ZodEnum<typeof VehicleType>;
|
|
639
|
+
schedule_type: z.ZodEnum<typeof ParkingAreaScheduleType>;
|
|
628
640
|
}, z.core.$strip>;
|
|
629
|
-
export declare const
|
|
630
|
-
parking_area_schedule_id: z.ZodNumber;
|
|
641
|
+
export declare const availableTimeSlotV2Schema: z.ZodObject<{
|
|
631
642
|
date: z.ZodString;
|
|
632
643
|
start_time: z.ZodString;
|
|
633
644
|
end_time: z.ZodString;
|
|
@@ -641,8 +652,12 @@ export declare const availableTimeSlotSchema: z.ZodObject<{
|
|
|
641
652
|
confirmed_bookings: z.ZodNumber;
|
|
642
653
|
available_capacity: z.ZodNumber;
|
|
643
654
|
is_available: z.ZodBoolean;
|
|
655
|
+
door: z.ZodString;
|
|
656
|
+
parking_spot: z.ZodString;
|
|
657
|
+
entity_name: z.ZodString;
|
|
658
|
+
slot_key: z.ZodString;
|
|
644
659
|
}, z.core.$strip>;
|
|
645
|
-
export declare const
|
|
660
|
+
export declare const availableSlotsResponseV2Schema: z.ZodObject<{
|
|
646
661
|
event_id: z.ZodNumber;
|
|
647
662
|
event_code: z.ZodString;
|
|
648
663
|
event_name: z.ZodString;
|
|
@@ -650,7 +665,6 @@ export declare const availableSlotsResponseSchema: z.ZodObject<{
|
|
|
650
665
|
year: z.ZodNumber;
|
|
651
666
|
month: z.ZodNumber;
|
|
652
667
|
available_slots: z.ZodArray<z.ZodObject<{
|
|
653
|
-
parking_area_schedule_id: z.ZodNumber;
|
|
654
668
|
date: z.ZodString;
|
|
655
669
|
start_time: z.ZodString;
|
|
656
670
|
end_time: z.ZodString;
|
|
@@ -664,21 +678,32 @@ export declare const availableSlotsResponseSchema: z.ZodObject<{
|
|
|
664
678
|
confirmed_bookings: z.ZodNumber;
|
|
665
679
|
available_capacity: z.ZodNumber;
|
|
666
680
|
is_available: z.ZodBoolean;
|
|
681
|
+
door: z.ZodString;
|
|
682
|
+
parking_spot: z.ZodString;
|
|
683
|
+
entity_name: z.ZodString;
|
|
684
|
+
slot_key: z.ZodString;
|
|
667
685
|
}, z.core.$strip>>;
|
|
668
686
|
total_slots: z.ZodNumber;
|
|
669
687
|
}, z.core.$strip>;
|
|
670
688
|
export declare const getCompanyRolesByEventIdParamsSchema: z.ZodObject<{
|
|
671
689
|
eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
672
|
-
scheduleType: z.ZodEnum<{
|
|
673
|
-
assembly: "assembly";
|
|
674
|
-
dismantling: "dismantling";
|
|
675
|
-
}>;
|
|
676
690
|
}, z.core.$strip>;
|
|
677
691
|
export declare const getCompanyRolesByEventIdResponseSchema: z.ZodObject<{
|
|
678
692
|
event_id: z.ZodNumber;
|
|
679
693
|
company_roles: z.ZodArray<z.ZodString>;
|
|
680
694
|
total_count: z.ZodNumber;
|
|
681
695
|
}, z.core.$strip>;
|
|
696
|
+
export declare const getCompanyNamesByEventIdParamsSchema: z.ZodObject<{
|
|
697
|
+
eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
export declare const getCompanyNamesByEventIdQuerySchema: z.ZodObject<{
|
|
700
|
+
company_role: z.ZodOptional<z.ZodString>;
|
|
701
|
+
}, z.core.$strip>;
|
|
702
|
+
export declare const getCompanyNamesByEventIdResponseSchema: z.ZodObject<{
|
|
703
|
+
event_id: z.ZodNumber;
|
|
704
|
+
company_names: z.ZodArray<z.ZodString>;
|
|
705
|
+
total_count: z.ZodNumber;
|
|
706
|
+
}, z.core.$strip>;
|
|
682
707
|
export type Point = z.infer<typeof pointSchema>;
|
|
683
708
|
export type PolygonCoordinates = z.infer<typeof polygonCoordinatesSchema>;
|
|
684
709
|
export type RectangleGeometry = z.infer<typeof rectangleGeometrySchema>;
|
|
@@ -715,8 +740,11 @@ export type UploadSitePlanImageResponse = z.infer<typeof uploadSitePlanImageResp
|
|
|
715
740
|
export type GetAvailableParkingAreaSlotsQuery = z.infer<typeof getAvailableParkingAreaSlotsQuerySchema>;
|
|
716
741
|
export type AvailableParkingAreaTimeSlot = z.infer<typeof availableParkingAreaTimeSlotSchema>;
|
|
717
742
|
export type AvailableParkingAreaSlotsResponse = z.infer<typeof availableParkingAreaSlotsResponseSchema>;
|
|
718
|
-
export type GetAvailableSlotsBody = z.infer<typeof getAvailableSlotsBodySchema>;
|
|
719
|
-
export type AvailableTimeSlot = z.infer<typeof availableTimeSlotSchema>;
|
|
720
|
-
export type AvailableSlotsResponse = z.infer<typeof availableSlotsResponseSchema>;
|
|
721
743
|
export type GetCompanyRolesByEventIdParams = z.infer<typeof getCompanyRolesByEventIdParamsSchema>;
|
|
722
744
|
export type GetCompanyRolesByEventIdResponse = z.infer<typeof getCompanyRolesByEventIdResponseSchema>;
|
|
745
|
+
export type GetCompanyNamesByEventIdParams = z.infer<typeof getCompanyNamesByEventIdParamsSchema>;
|
|
746
|
+
export type GetCompanyNamesByEventIdResponse = z.infer<typeof getCompanyNamesByEventIdResponseSchema>;
|
|
747
|
+
export type GetCompanyNamesByEventIdQuery = z.infer<typeof getCompanyNamesByEventIdQuerySchema>;
|
|
748
|
+
export type GetAvailableSlotsBodyV2 = z.infer<typeof getAvailableSlotsBodyV2Schema>;
|
|
749
|
+
export type AvailableTimeSlotV2 = z.infer<typeof availableTimeSlotV2Schema>;
|
|
750
|
+
export type AvailableSlotsResponseV2 = z.infer<typeof availableSlotsResponseV2Schema>;
|
package/dist/parkingArea.js
CHANGED
|
@@ -109,6 +109,10 @@ export const parkingAreaItemSchema = z
|
|
|
109
109
|
description: 'Surface area in square meters',
|
|
110
110
|
example: 150.5
|
|
111
111
|
}),
|
|
112
|
+
scale_pixels_per_meter: z.number().positive().nullable().openapi({
|
|
113
|
+
description: 'Calibrated pixels-per-meter value captured in the editor',
|
|
114
|
+
example: 42.5
|
|
115
|
+
}),
|
|
112
116
|
is_active: z.boolean().openapi({
|
|
113
117
|
description: 'Whether the parking area is active',
|
|
114
118
|
example: true
|
|
@@ -226,6 +230,10 @@ export const createParkingAreaBodySchema = z
|
|
|
226
230
|
surface_area_sqm: z.number().nonnegative().optional().openapi({
|
|
227
231
|
description: 'Surface area in square meters',
|
|
228
232
|
example: 150.5
|
|
233
|
+
}),
|
|
234
|
+
scale_pixels_per_meter: z.number().positive().optional().openapi({
|
|
235
|
+
description: 'Calibrated pixels-per-meter scale captured in the editor',
|
|
236
|
+
example: 42.5
|
|
229
237
|
})
|
|
230
238
|
})
|
|
231
239
|
.openapi('CreateParkingAreaBody');
|
|
@@ -254,6 +262,10 @@ export const createParkingAreaDataSchema = z
|
|
|
254
262
|
description: 'Surface area in square meters',
|
|
255
263
|
example: 150.5
|
|
256
264
|
}),
|
|
265
|
+
scale_pixels_per_meter: z.number().nullable().openapi({
|
|
266
|
+
description: 'Calibrated pixels-per-meter scale',
|
|
267
|
+
example: 42.5
|
|
268
|
+
}),
|
|
257
269
|
is_active: z.boolean().openapi({
|
|
258
270
|
description: 'Whether the parking area is active',
|
|
259
271
|
example: true
|
|
@@ -285,7 +297,11 @@ export const bulkCreateParkingAreasBodySchema = z
|
|
|
285
297
|
example: 'Zone A'
|
|
286
298
|
}),
|
|
287
299
|
geometry: geoJsonPolygonSchema.optional(),
|
|
288
|
-
surface_area_sqm: z.number().nonnegative().optional()
|
|
300
|
+
surface_area_sqm: z.number().nonnegative().optional(),
|
|
301
|
+
scale_pixels_per_meter: z.number().positive().optional().openapi({
|
|
302
|
+
description: 'Calibrated pixels-per-meter scale for this area',
|
|
303
|
+
example: 42.5
|
|
304
|
+
})
|
|
289
305
|
}))
|
|
290
306
|
.min(1, 'At least one parking area must be provided')
|
|
291
307
|
.openapi({
|
|
@@ -366,6 +382,10 @@ export const updateParkingAreaBodySchema = z
|
|
|
366
382
|
description: 'New surface area in square meters',
|
|
367
383
|
example: 200.0
|
|
368
384
|
}),
|
|
385
|
+
scale_pixels_per_meter: z.number().positive().nullable().optional().openapi({
|
|
386
|
+
description: 'Updated pixels-per-meter calibration value',
|
|
387
|
+
example: 42.5
|
|
388
|
+
}),
|
|
369
389
|
is_active: z.boolean().optional().openapi({
|
|
370
390
|
description: 'Whether the parking area is active',
|
|
371
391
|
example: true
|
|
@@ -399,6 +419,10 @@ export const updateParkingAreaDataSchema = z
|
|
|
399
419
|
description: 'Updated surface area in square meters',
|
|
400
420
|
example: 200.0
|
|
401
421
|
}),
|
|
422
|
+
scale_pixels_per_meter: z.number().nullable().openapi({
|
|
423
|
+
description: 'Updated pixels-per-meter calibration value',
|
|
424
|
+
example: 42.5
|
|
425
|
+
}),
|
|
402
426
|
is_active: z.boolean().openapi({
|
|
403
427
|
description: 'Whether the parking area is active',
|
|
404
428
|
example: true
|
|
@@ -825,15 +849,15 @@ export const availableParkingAreaSlotsResponseSchema = z
|
|
|
825
849
|
})
|
|
826
850
|
.openapi('AvailableParkingAreaSlotsResponse');
|
|
827
851
|
// ------------------------------
|
|
828
|
-
// Parking Area
|
|
852
|
+
// Available Time Slots V2 (Parking Area version)
|
|
829
853
|
// ------------------------------
|
|
830
|
-
export const
|
|
854
|
+
export const getAvailableSlotsBodyV2Schema = z
|
|
831
855
|
.object({
|
|
832
856
|
event_id: z.number().positive().openapi({
|
|
833
857
|
description: 'The ID of the event',
|
|
834
858
|
example: 1
|
|
835
859
|
}),
|
|
836
|
-
year: z.number().min(
|
|
860
|
+
year: z.number().min(2025).openapi({
|
|
837
861
|
description: 'Year for filtering slots (YYYY). Slots before today will be excluded.',
|
|
838
862
|
example: 2026
|
|
839
863
|
}),
|
|
@@ -841,25 +865,22 @@ export const getAvailableSlotsBodySchema = z
|
|
|
841
865
|
description: 'Month for filtering slots (1-12). Slots before today will be excluded.',
|
|
842
866
|
example: 6
|
|
843
867
|
}),
|
|
844
|
-
|
|
845
|
-
description: 'Company
|
|
846
|
-
example: '
|
|
868
|
+
company_name: z.string().min(1, 'Company name is required').openapi({
|
|
869
|
+
description: 'Company name to filter allocations by',
|
|
870
|
+
example: 'IMPACT'
|
|
847
871
|
}),
|
|
848
|
-
|
|
872
|
+
vehicle_type: z.enum(VehicleType).openapi({
|
|
873
|
+
description: 'Vehicle type to filter allocations by',
|
|
874
|
+
example: VehicleType.PL
|
|
875
|
+
}),
|
|
876
|
+
schedule_type: z.enum(ParkingAreaScheduleType).openapi({
|
|
849
877
|
description: 'Filter by schedule type',
|
|
850
878
|
example: 'assembly'
|
|
851
879
|
})
|
|
852
880
|
})
|
|
853
|
-
.openapi('
|
|
854
|
-
|
|
855
|
-
// Parking Area Response Schemas
|
|
856
|
-
// ------------------------------
|
|
857
|
-
export const availableTimeSlotSchema = z
|
|
881
|
+
.openapi('GetAvailableSlotsBodyV2');
|
|
882
|
+
export const availableTimeSlotV2Schema = z
|
|
858
883
|
.object({
|
|
859
|
-
parking_area_schedule_id: z.number().openapi({
|
|
860
|
-
description: 'Parking area schedule ID',
|
|
861
|
-
example: 1
|
|
862
|
-
}),
|
|
863
884
|
date: z.string().openapi({
|
|
864
885
|
description: 'Date of the time slot (YYYY-MM-DD)',
|
|
865
886
|
example: '2026-06-15'
|
|
@@ -899,10 +920,26 @@ export const availableTimeSlotSchema = z
|
|
|
899
920
|
is_available: z.boolean().openapi({
|
|
900
921
|
description: 'Whether the slot is available for booking',
|
|
901
922
|
example: true
|
|
923
|
+
}),
|
|
924
|
+
door: z.string().openapi({
|
|
925
|
+
description: 'Door name for the parking slot',
|
|
926
|
+
example: 'Porte 4'
|
|
927
|
+
}),
|
|
928
|
+
parking_spot: z.string().openapi({
|
|
929
|
+
description: 'Specific parking spot identifier',
|
|
930
|
+
example: '7'
|
|
931
|
+
}),
|
|
932
|
+
entity_name: z.string().openapi({
|
|
933
|
+
description: 'Name of the entity associated with the slot',
|
|
934
|
+
example: 'IMPACT'
|
|
935
|
+
}),
|
|
936
|
+
slot_key: z.string().openapi({
|
|
937
|
+
description: 'Unique identifier for the time slot',
|
|
938
|
+
example: '12345'
|
|
902
939
|
})
|
|
903
940
|
})
|
|
904
|
-
.openapi('
|
|
905
|
-
export const
|
|
941
|
+
.openapi('AvailableTimeSlotV2');
|
|
942
|
+
export const availableSlotsResponseV2Schema = z
|
|
906
943
|
.object({
|
|
907
944
|
event_id: z.number().openapi({
|
|
908
945
|
description: 'ID of the event',
|
|
@@ -928,15 +965,15 @@ export const availableSlotsResponseSchema = z
|
|
|
928
965
|
description: 'Month of the slots',
|
|
929
966
|
example: 6
|
|
930
967
|
}),
|
|
931
|
-
available_slots: z.array(
|
|
932
|
-
description: 'List of available time slots
|
|
968
|
+
available_slots: z.array(availableTimeSlotV2Schema).openapi({
|
|
969
|
+
description: 'List of available time slots separated by parking spot'
|
|
933
970
|
}),
|
|
934
971
|
total_slots: z.number().openapi({
|
|
935
|
-
description: 'Total number of time slots
|
|
972
|
+
description: 'Total number of time slots (with individual parking spots)',
|
|
936
973
|
example: 48
|
|
937
974
|
})
|
|
938
975
|
})
|
|
939
|
-
.openapi('
|
|
976
|
+
.openapi('AvailableSlotsResponseV2');
|
|
940
977
|
// ------------------------------
|
|
941
978
|
// Company Roles for Parking Area
|
|
942
979
|
// ------------------------------
|
|
@@ -950,10 +987,6 @@ export const getCompanyRolesByEventIdParamsSchema = z
|
|
|
950
987
|
.openapi({
|
|
951
988
|
description: 'The ID of the event to get company roles for',
|
|
952
989
|
example: '1'
|
|
953
|
-
}),
|
|
954
|
-
scheduleType: z.enum(['assembly', 'dismantling']).openapi({
|
|
955
|
-
description: 'Type of schedule',
|
|
956
|
-
example: 'assembly'
|
|
957
990
|
})
|
|
958
991
|
})
|
|
959
992
|
.openapi('GetCompanyRolesByEventIdParams');
|
|
@@ -973,3 +1006,43 @@ export const getCompanyRolesByEventIdResponseSchema = z
|
|
|
973
1006
|
})
|
|
974
1007
|
})
|
|
975
1008
|
.openapi('GetCompanyRolesByEventIdResponse');
|
|
1009
|
+
// ------------------------------
|
|
1010
|
+
// Company Names for Parking Area
|
|
1011
|
+
// ------------------------------
|
|
1012
|
+
export const getCompanyNamesByEventIdParamsSchema = z
|
|
1013
|
+
.object({
|
|
1014
|
+
eventId: z
|
|
1015
|
+
.string()
|
|
1016
|
+
.min(1, 'Event ID is required')
|
|
1017
|
+
.transform(val => parseInt(val, 10))
|
|
1018
|
+
.refine(val => !isNaN(val) && val > 0, { message: 'Event ID must be positive' })
|
|
1019
|
+
.openapi({
|
|
1020
|
+
description: 'The ID of the event to get company names for',
|
|
1021
|
+
example: '1'
|
|
1022
|
+
})
|
|
1023
|
+
})
|
|
1024
|
+
.openapi('GetCompanyNamesByEventIdParams');
|
|
1025
|
+
export const getCompanyNamesByEventIdQuerySchema = z
|
|
1026
|
+
.object({
|
|
1027
|
+
company_role: z.string().optional().openapi({
|
|
1028
|
+
description: 'Filter company names by company role (category)',
|
|
1029
|
+
example: 'Exposant'
|
|
1030
|
+
})
|
|
1031
|
+
})
|
|
1032
|
+
.openapi('GetCompanyNamesByEventIdQuery');
|
|
1033
|
+
export const getCompanyNamesByEventIdResponseSchema = z
|
|
1034
|
+
.object({
|
|
1035
|
+
event_id: z.number().openapi({
|
|
1036
|
+
description: 'ID of the event',
|
|
1037
|
+
example: 1
|
|
1038
|
+
}),
|
|
1039
|
+
company_names: z.array(z.string()).openapi({
|
|
1040
|
+
description: 'List of unique company names for the event',
|
|
1041
|
+
example: ['IMPACT', 'GLM', 'Liberté Event']
|
|
1042
|
+
}),
|
|
1043
|
+
total_count: z.number().openapi({
|
|
1044
|
+
description: 'Total number of unique company names',
|
|
1045
|
+
example: 3
|
|
1046
|
+
})
|
|
1047
|
+
})
|
|
1048
|
+
.openapi('GetCompanyNamesByEventIdResponse');
|