@venulog/phasing-engine-schemas 0.4.2 → 0.5.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/accessToken.d.ts +2 -1
- package/dist/accessToken.js +2 -2
- package/dist/enums/index.d.ts +1 -1
- package/dist/enums/index.js +1 -1
- package/dist/enums/vehicleType.d.ts +6 -0
- package/dist/enums/vehicleType.js +13 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/dist/parkingArea.d.ts +136 -11
- package/dist/parkingArea.js +199 -10
- package/dist/parkingBooking.d.ts +618 -0
- package/dist/parkingBooking.js +597 -0
- package/package.json +8 -8
- package/dist/enums/phaseSlotScheduleType.d.ts +0 -4
- package/dist/enums/phaseSlotScheduleType.js +0 -5
- package/dist/phaseBooking.d.ts +0 -1331
- package/dist/phaseBooking.js +0 -1349
- package/dist/phaseSlot.d.ts +0 -139
- package/dist/phaseSlot.js +0 -276
package/dist/accessToken.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from './zod';
|
|
1
|
+
import { z } from './zod.js';
|
|
2
2
|
export declare const getAccessTokenParamsSchema: z.ZodObject<{
|
|
3
3
|
bookingId: z.ZodCoercedNumber<unknown>;
|
|
4
4
|
}, z.core.$strip>;
|
|
@@ -20,4 +20,5 @@ export declare const getAccessTokenResponseSchema: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
export type GetAccessTokenParams = z.infer<typeof getAccessTokenParamsSchema>;
|
|
22
22
|
export type AccessTokenData = z.infer<typeof accessTokenDataSchema>;
|
|
23
|
+
export type AccessTokenData2 = z.infer<typeof accessTokenDataSchema>;
|
|
23
24
|
export type GetAccessTokenResponse = z.infer<typeof getAccessTokenResponseSchema>;
|
package/dist/accessToken.js
CHANGED
package/dist/enums/index.d.ts
CHANGED
package/dist/enums/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Vehicle type enumeration for parking area schedules
|
|
2
|
+
// Defines the types of vehicles allowed to book specific time slots
|
|
3
|
+
export var VehicleType;
|
|
4
|
+
(function (VehicleType) {
|
|
5
|
+
VehicleType["PL"] = "PL";
|
|
6
|
+
VehicleType["VUL"] = "VUL";
|
|
7
|
+
VehicleType["VL"] = "VL"; // Véhicule léger (light vehicle)
|
|
8
|
+
})(VehicleType || (VehicleType = {}));
|
|
9
|
+
export const VEHICLE_TYPE_LABELS = {
|
|
10
|
+
[VehicleType.PL]: 'Poids lourd (PL)',
|
|
11
|
+
[VehicleType.VUL]: 'Véhicule utilitaire léger (VUL)',
|
|
12
|
+
[VehicleType.VL]: 'Véhicule léger (VL)'
|
|
13
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
export * from './common.js';
|
|
2
2
|
export * from './pagination.js';
|
|
3
3
|
export * from './auth.js';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './phaseSlot.js';
|
|
4
|
+
export * from './parkingBooking.js';
|
|
6
5
|
export * from './parkingArea.js';
|
|
7
6
|
export * from './event.js';
|
|
8
7
|
export * from './accessToken.js';
|
|
9
8
|
export * from './enums/bookingStatus.js';
|
|
10
|
-
export * from './enums/phaseSlotScheduleType.js';
|
|
11
9
|
export * from './enums/parkingAreaScheduleType.js';
|
|
12
10
|
export { z } from './zod.js';
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
export * from './common.js';
|
|
3
3
|
export * from './pagination.js';
|
|
4
4
|
export * from './auth.js';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './phaseSlot.js';
|
|
5
|
+
export * from './parkingBooking.js';
|
|
7
6
|
export * from './parkingArea.js';
|
|
8
7
|
export * from './event.js';
|
|
9
8
|
export * from './accessToken.js';
|
|
10
9
|
// Enum exports
|
|
11
10
|
export * from './enums/bookingStatus.js';
|
|
12
|
-
export * from './enums/phaseSlotScheduleType.js';
|
|
13
11
|
export * from './enums/parkingAreaScheduleType.js';
|
|
14
12
|
// Zod re-export for convenience
|
|
15
13
|
export { z } from './zod.js';
|
package/dist/parkingArea.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from './zod.js';
|
|
2
2
|
import { ParkingAreaScheduleType } from './enums/parkingAreaScheduleType.js';
|
|
3
|
+
import { VehicleType } from './enums/vehicleType.js';
|
|
3
4
|
/**
|
|
4
5
|
* A point in 2D space using percentage-based coordinates (0-100)
|
|
5
6
|
* relative to the site plan image dimensions
|
|
@@ -84,7 +85,12 @@ export declare const parkingAreaWithSchedulesSchema: z.ZodObject<{
|
|
|
84
85
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
85
86
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
86
87
|
}>;
|
|
87
|
-
|
|
88
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
89
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
90
|
+
PL: VehicleType.PL;
|
|
91
|
+
VUL: VehicleType.VUL;
|
|
92
|
+
VL: VehicleType.VL;
|
|
93
|
+
}>>>;
|
|
88
94
|
}, z.core.$strip>>>;
|
|
89
95
|
}, z.core.$strip>;
|
|
90
96
|
export declare const getParkingAreasByEventIdParamsSchema: z.ZodObject<{
|
|
@@ -327,7 +333,12 @@ export declare const getParkingAreaDetailResponseSchema: z.ZodObject<{
|
|
|
327
333
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
328
334
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
329
335
|
}>;
|
|
330
|
-
|
|
336
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
337
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
338
|
+
PL: VehicleType.PL;
|
|
339
|
+
VUL: VehicleType.VUL;
|
|
340
|
+
VL: VehicleType.VL;
|
|
341
|
+
}>>>;
|
|
331
342
|
}, z.core.$strip>>>;
|
|
332
343
|
}, z.core.$strip>;
|
|
333
344
|
}, z.core.$strip>;
|
|
@@ -342,7 +353,12 @@ export declare const parkingAreaScheduleSchema: z.ZodObject<{
|
|
|
342
353
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
343
354
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
344
355
|
}>;
|
|
345
|
-
|
|
356
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
357
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
358
|
+
PL: VehicleType.PL;
|
|
359
|
+
VUL: VehicleType.VUL;
|
|
360
|
+
VL: VehicleType.VL;
|
|
361
|
+
}>>>;
|
|
346
362
|
created_at: z.ZodString;
|
|
347
363
|
updated_at: z.ZodString;
|
|
348
364
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -359,7 +375,12 @@ export declare const upsertParkingAreaScheduleItemSchema: z.ZodObject<{
|
|
|
359
375
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
360
376
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
361
377
|
}>;
|
|
362
|
-
|
|
378
|
+
company_roles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
379
|
+
vehicle_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
380
|
+
PL: VehicleType.PL;
|
|
381
|
+
VUL: VehicleType.VUL;
|
|
382
|
+
VL: VehicleType.VL;
|
|
383
|
+
}>>>>;
|
|
363
384
|
}, z.core.$strip>;
|
|
364
385
|
export declare const deleteParkingAreaScheduleItemSchema: z.ZodObject<{
|
|
365
386
|
id: z.ZodNumber;
|
|
@@ -376,7 +397,12 @@ export declare const upsertParkingAreaSchedulesBodySchema: z.ZodObject<{
|
|
|
376
397
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
377
398
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
378
399
|
}>;
|
|
379
|
-
|
|
400
|
+
company_roles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
401
|
+
vehicle_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
402
|
+
PL: VehicleType.PL;
|
|
403
|
+
VUL: VehicleType.VUL;
|
|
404
|
+
VL: VehicleType.VL;
|
|
405
|
+
}>>>>;
|
|
380
406
|
}, z.core.$strip>>>;
|
|
381
407
|
delete: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
382
408
|
id: z.ZodNumber;
|
|
@@ -396,7 +422,12 @@ export declare const upsertParkingAreaSchedulesDataSchema: z.ZodObject<{
|
|
|
396
422
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
397
423
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
398
424
|
}>;
|
|
399
|
-
|
|
425
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
426
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
427
|
+
PL: VehicleType.PL;
|
|
428
|
+
VUL: VehicleType.VUL;
|
|
429
|
+
VL: VehicleType.VL;
|
|
430
|
+
}>>>;
|
|
400
431
|
created_at: z.ZodString;
|
|
401
432
|
updated_at: z.ZodString;
|
|
402
433
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -422,7 +453,12 @@ export declare const upsertParkingAreaSchedulesDataSchema: z.ZodObject<{
|
|
|
422
453
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
423
454
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
424
455
|
}>;
|
|
425
|
-
|
|
456
|
+
company_roles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
457
|
+
vehicle_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
458
|
+
PL: VehicleType.PL;
|
|
459
|
+
VUL: VehicleType.VUL;
|
|
460
|
+
VL: VehicleType.VL;
|
|
461
|
+
}>>>>;
|
|
426
462
|
}, z.core.$strip>, z.ZodObject<{
|
|
427
463
|
id: z.ZodNumber;
|
|
428
464
|
}, z.core.$strip>]>;
|
|
@@ -445,7 +481,12 @@ export declare const upsertParkingAreaSchedulesResponseSchema: z.ZodObject<{
|
|
|
445
481
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
446
482
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
447
483
|
}>;
|
|
448
|
-
|
|
484
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
485
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
486
|
+
PL: VehicleType.PL;
|
|
487
|
+
VUL: VehicleType.VUL;
|
|
488
|
+
VL: VehicleType.VL;
|
|
489
|
+
}>>>;
|
|
449
490
|
created_at: z.ZodString;
|
|
450
491
|
updated_at: z.ZodString;
|
|
451
492
|
created_by: z.ZodNullable<z.ZodString>;
|
|
@@ -471,7 +512,12 @@ export declare const upsertParkingAreaSchedulesResponseSchema: z.ZodObject<{
|
|
|
471
512
|
assembly: ParkingAreaScheduleType.ASSEMBLY;
|
|
472
513
|
dismantling: ParkingAreaScheduleType.DISMANTLING;
|
|
473
514
|
}>;
|
|
474
|
-
|
|
515
|
+
company_roles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
516
|
+
vehicle_types: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
517
|
+
PL: VehicleType.PL;
|
|
518
|
+
VUL: VehicleType.VUL;
|
|
519
|
+
VL: VehicleType.VL;
|
|
520
|
+
}>>>>;
|
|
475
521
|
}, z.core.$strip>, z.ZodObject<{
|
|
476
522
|
id: z.ZodNumber;
|
|
477
523
|
}, z.core.$strip>]>;
|
|
@@ -504,6 +550,7 @@ export declare const getAvailableParkingAreaSlotsQuerySchema: z.ZodObject<{
|
|
|
504
550
|
year: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
505
551
|
month: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
506
552
|
parking_area_id: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
553
|
+
company_role: z.ZodString;
|
|
507
554
|
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
508
555
|
assembly: "assembly";
|
|
509
556
|
dismantling: "dismantling";
|
|
@@ -519,7 +566,12 @@ export declare const availableParkingAreaTimeSlotSchema: z.ZodObject<{
|
|
|
519
566
|
assembly: "assembly";
|
|
520
567
|
dismantling: "dismantling";
|
|
521
568
|
}>;
|
|
522
|
-
|
|
569
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
570
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
571
|
+
PL: VehicleType.PL;
|
|
572
|
+
VUL: VehicleType.VUL;
|
|
573
|
+
VL: VehicleType.VL;
|
|
574
|
+
}>>>;
|
|
523
575
|
max_capacity: z.ZodNumber;
|
|
524
576
|
current_bookings: z.ZodNumber;
|
|
525
577
|
confirmed_bookings: z.ZodNumber;
|
|
@@ -544,7 +596,12 @@ export declare const availableParkingAreaSlotsResponseSchema: z.ZodObject<{
|
|
|
544
596
|
assembly: "assembly";
|
|
545
597
|
dismantling: "dismantling";
|
|
546
598
|
}>;
|
|
547
|
-
|
|
599
|
+
company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
600
|
+
vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
601
|
+
PL: VehicleType.PL;
|
|
602
|
+
VUL: VehicleType.VUL;
|
|
603
|
+
VL: VehicleType.VL;
|
|
604
|
+
}>>>;
|
|
548
605
|
max_capacity: z.ZodNumber;
|
|
549
606
|
current_bookings: z.ZodNumber;
|
|
550
607
|
confirmed_bookings: z.ZodNumber;
|
|
@@ -553,6 +610,69 @@ export declare const availableParkingAreaSlotsResponseSchema: z.ZodObject<{
|
|
|
553
610
|
}, z.core.$strip>>;
|
|
554
611
|
total_slots: z.ZodNumber;
|
|
555
612
|
}, z.core.$strip>;
|
|
613
|
+
export declare const getAvailableSlotsBodySchema: z.ZodObject<{
|
|
614
|
+
event_id: z.ZodNumber;
|
|
615
|
+
year: z.ZodNumber;
|
|
616
|
+
month: z.ZodNumber;
|
|
617
|
+
company_role: z.ZodString;
|
|
618
|
+
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
619
|
+
assembly: "assembly";
|
|
620
|
+
dismantling: "dismantling";
|
|
621
|
+
}>>;
|
|
622
|
+
}, z.core.$strip>;
|
|
623
|
+
export declare const availableTimeSlotSchema: z.ZodObject<{
|
|
624
|
+
parking_area_schedule_id: z.ZodNumber;
|
|
625
|
+
date: z.ZodString;
|
|
626
|
+
start_time: z.ZodString;
|
|
627
|
+
end_time: z.ZodString;
|
|
628
|
+
duration: z.ZodNumber;
|
|
629
|
+
schedule_type: z.ZodEnum<{
|
|
630
|
+
assembly: "assembly";
|
|
631
|
+
dismantling: "dismantling";
|
|
632
|
+
}>;
|
|
633
|
+
max_capacity: z.ZodNumber;
|
|
634
|
+
current_bookings: z.ZodNumber;
|
|
635
|
+
confirmed_bookings: z.ZodNumber;
|
|
636
|
+
available_capacity: z.ZodNumber;
|
|
637
|
+
is_available: z.ZodBoolean;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
export declare const availableSlotsResponseSchema: z.ZodObject<{
|
|
640
|
+
event_id: z.ZodNumber;
|
|
641
|
+
event_code: z.ZodString;
|
|
642
|
+
event_name: z.ZodString;
|
|
643
|
+
company_role: z.ZodString;
|
|
644
|
+
year: z.ZodNumber;
|
|
645
|
+
month: z.ZodNumber;
|
|
646
|
+
available_slots: z.ZodArray<z.ZodObject<{
|
|
647
|
+
parking_area_schedule_id: z.ZodNumber;
|
|
648
|
+
date: z.ZodString;
|
|
649
|
+
start_time: z.ZodString;
|
|
650
|
+
end_time: z.ZodString;
|
|
651
|
+
duration: z.ZodNumber;
|
|
652
|
+
schedule_type: z.ZodEnum<{
|
|
653
|
+
assembly: "assembly";
|
|
654
|
+
dismantling: "dismantling";
|
|
655
|
+
}>;
|
|
656
|
+
max_capacity: z.ZodNumber;
|
|
657
|
+
current_bookings: z.ZodNumber;
|
|
658
|
+
confirmed_bookings: z.ZodNumber;
|
|
659
|
+
available_capacity: z.ZodNumber;
|
|
660
|
+
is_available: z.ZodBoolean;
|
|
661
|
+
}, z.core.$strip>>;
|
|
662
|
+
total_slots: z.ZodNumber;
|
|
663
|
+
}, z.core.$strip>;
|
|
664
|
+
export declare const getCompanyRolesByEventIdParamsSchema: z.ZodObject<{
|
|
665
|
+
eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
666
|
+
scheduleType: z.ZodEnum<{
|
|
667
|
+
assembly: "assembly";
|
|
668
|
+
dismantling: "dismantling";
|
|
669
|
+
}>;
|
|
670
|
+
}, z.core.$strip>;
|
|
671
|
+
export declare const getCompanyRolesByEventIdResponseSchema: z.ZodObject<{
|
|
672
|
+
event_id: z.ZodNumber;
|
|
673
|
+
company_roles: z.ZodArray<z.ZodString>;
|
|
674
|
+
total_count: z.ZodNumber;
|
|
675
|
+
}, z.core.$strip>;
|
|
556
676
|
export type Point = z.infer<typeof pointSchema>;
|
|
557
677
|
export type PolygonCoordinates = z.infer<typeof polygonCoordinatesSchema>;
|
|
558
678
|
export type RectangleGeometry = z.infer<typeof rectangleGeometrySchema>;
|
|
@@ -589,3 +709,8 @@ export type UploadSitePlanImageResponse = z.infer<typeof uploadSitePlanImageResp
|
|
|
589
709
|
export type GetAvailableParkingAreaSlotsQuery = z.infer<typeof getAvailableParkingAreaSlotsQuerySchema>;
|
|
590
710
|
export type AvailableParkingAreaTimeSlot = z.infer<typeof availableParkingAreaTimeSlotSchema>;
|
|
591
711
|
export type AvailableParkingAreaSlotsResponse = z.infer<typeof availableParkingAreaSlotsResponseSchema>;
|
|
712
|
+
export type GetAvailableSlotsBody = z.infer<typeof getAvailableSlotsBodySchema>;
|
|
713
|
+
export type AvailableTimeSlot = z.infer<typeof availableTimeSlotSchema>;
|
|
714
|
+
export type AvailableSlotsResponse = z.infer<typeof availableSlotsResponseSchema>;
|
|
715
|
+
export type GetCompanyRolesByEventIdParams = z.infer<typeof getCompanyRolesByEventIdParamsSchema>;
|
|
716
|
+
export type GetCompanyRolesByEventIdResponse = z.infer<typeof getCompanyRolesByEventIdResponseSchema>;
|
package/dist/parkingArea.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { z } from './zod.js';
|
|
3
3
|
import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
|
|
4
4
|
import { ParkingAreaScheduleType } from './enums/parkingAreaScheduleType.js';
|
|
5
|
+
import { VehicleType } from './enums/vehicleType.js';
|
|
5
6
|
// ------------------------------
|
|
6
7
|
// Geometry Schemas
|
|
7
8
|
// ------------------------------
|
|
@@ -146,7 +147,10 @@ export const parkingAreaWithSchedulesSchema = parkingAreaItemSchema
|
|
|
146
147
|
ParkingAreaScheduleType.ASSEMBLY,
|
|
147
148
|
ParkingAreaScheduleType.DISMANTLING
|
|
148
149
|
]),
|
|
149
|
-
|
|
150
|
+
company_roles: z.array(z.string()).nullable(),
|
|
151
|
+
vehicle_types: z
|
|
152
|
+
.array(z.enum([VehicleType.PL, VehicleType.VUL, VehicleType.VL]))
|
|
153
|
+
.nullable()
|
|
150
154
|
}))
|
|
151
155
|
.optional()
|
|
152
156
|
.openapi({
|
|
@@ -484,9 +488,19 @@ export const parkingAreaScheduleSchema = z
|
|
|
484
488
|
description: 'Type of schedule',
|
|
485
489
|
example: ParkingAreaScheduleType.ASSEMBLY
|
|
486
490
|
}),
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
491
|
+
company_roles: z
|
|
492
|
+
.array(z.string())
|
|
493
|
+
.nullable()
|
|
494
|
+
.openapi({
|
|
495
|
+
description: 'Company roles allowed for this schedule (empty or null = all allowed)',
|
|
496
|
+
example: ['exhibitor', 'contractor']
|
|
497
|
+
}),
|
|
498
|
+
vehicle_types: z
|
|
499
|
+
.array(z.enum([VehicleType.PL, VehicleType.VUL, VehicleType.VL]))
|
|
500
|
+
.nullable()
|
|
501
|
+
.openapi({
|
|
502
|
+
description: 'Vehicle types allowed for this schedule (empty or null = all allowed)',
|
|
503
|
+
example: [VehicleType.PL, VehicleType.VUL]
|
|
490
504
|
}),
|
|
491
505
|
created_at: z.string().openapi({
|
|
492
506
|
description: 'Timestamp when schedule was created',
|
|
@@ -552,9 +566,21 @@ export const upsertParkingAreaScheduleItemSchema = z
|
|
|
552
566
|
description: 'Type of schedule',
|
|
553
567
|
example: ParkingAreaScheduleType.ASSEMBLY
|
|
554
568
|
}),
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
569
|
+
company_roles: z
|
|
570
|
+
.array(z.string())
|
|
571
|
+
.nullable()
|
|
572
|
+
.optional()
|
|
573
|
+
.openapi({
|
|
574
|
+
description: 'Company roles allowed for this schedule (empty or null = all allowed)',
|
|
575
|
+
example: ['exhibitor', 'contractor']
|
|
576
|
+
}),
|
|
577
|
+
vehicle_types: z
|
|
578
|
+
.array(z.enum([VehicleType.PL, VehicleType.VUL, VehicleType.VL]))
|
|
579
|
+
.nullable()
|
|
580
|
+
.optional()
|
|
581
|
+
.openapi({
|
|
582
|
+
description: 'Vehicle types allowed for this schedule (empty or null = all allowed)',
|
|
583
|
+
example: [VehicleType.PL, VehicleType.VUL]
|
|
558
584
|
})
|
|
559
585
|
})
|
|
560
586
|
.openapi('UpsertParkingAreaScheduleItem');
|
|
@@ -697,6 +723,10 @@ export const getAvailableParkingAreaSlotsQuerySchema = z
|
|
|
697
723
|
description: 'The ID of the parking area',
|
|
698
724
|
example: '1'
|
|
699
725
|
}),
|
|
726
|
+
company_role: z.string().min(1, 'Company role is required').openapi({
|
|
727
|
+
description: 'Company role to filter schedules by',
|
|
728
|
+
example: 'exhibitor'
|
|
729
|
+
}),
|
|
700
730
|
schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
|
|
701
731
|
description: 'Filter by schedule type',
|
|
702
732
|
example: 'assembly'
|
|
@@ -729,9 +759,19 @@ export const availableParkingAreaTimeSlotSchema = z
|
|
|
729
759
|
description: 'Type of schedule',
|
|
730
760
|
example: 'assembly'
|
|
731
761
|
}),
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
762
|
+
company_roles: z
|
|
763
|
+
.array(z.string())
|
|
764
|
+
.nullable()
|
|
765
|
+
.openapi({
|
|
766
|
+
description: 'Company roles allowed for this schedule',
|
|
767
|
+
example: ['exhibitor', 'contractor']
|
|
768
|
+
}),
|
|
769
|
+
vehicle_types: z
|
|
770
|
+
.array(z.enum([VehicleType.PL, VehicleType.VUL, VehicleType.VL]))
|
|
771
|
+
.nullable()
|
|
772
|
+
.openapi({
|
|
773
|
+
description: 'Vehicle types allowed for this schedule',
|
|
774
|
+
example: [VehicleType.PL, VehicleType.VUL]
|
|
735
775
|
}),
|
|
736
776
|
max_capacity: z.number().openapi({
|
|
737
777
|
description: 'Maximum booking capacity for this slot',
|
|
@@ -794,3 +834,152 @@ export const availableParkingAreaSlotsResponseSchema = z
|
|
|
794
834
|
})
|
|
795
835
|
})
|
|
796
836
|
.openapi('AvailableParkingAreaSlotsResponse');
|
|
837
|
+
// ------------------------------
|
|
838
|
+
// Parking Area Query Schemas
|
|
839
|
+
// ------------------------------
|
|
840
|
+
export const getAvailableSlotsBodySchema = z
|
|
841
|
+
.object({
|
|
842
|
+
event_id: z.number().positive().openapi({
|
|
843
|
+
description: 'The ID of the event',
|
|
844
|
+
example: 1
|
|
845
|
+
}),
|
|
846
|
+
year: z.number().min(2024).openapi({
|
|
847
|
+
description: 'Year for filtering slots (YYYY). Slots before today will be excluded.',
|
|
848
|
+
example: 2026
|
|
849
|
+
}),
|
|
850
|
+
month: z.number().min(1).max(12).openapi({
|
|
851
|
+
description: 'Month for filtering slots (1-12). Slots before today will be excluded.',
|
|
852
|
+
example: 6
|
|
853
|
+
}),
|
|
854
|
+
company_role: z.string().min(1, 'Company role is required').openapi({
|
|
855
|
+
description: 'Company role to filter schedules by',
|
|
856
|
+
example: 'exhibitor'
|
|
857
|
+
}),
|
|
858
|
+
schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
|
|
859
|
+
description: 'Filter by schedule type',
|
|
860
|
+
example: 'assembly'
|
|
861
|
+
})
|
|
862
|
+
})
|
|
863
|
+
.openapi('GetAvailableSlotsBody');
|
|
864
|
+
// ------------------------------
|
|
865
|
+
// Parking Area Response Schemas
|
|
866
|
+
// ------------------------------
|
|
867
|
+
export const availableTimeSlotSchema = z
|
|
868
|
+
.object({
|
|
869
|
+
parking_area_schedule_id: z.number().openapi({
|
|
870
|
+
description: 'Parking area schedule ID',
|
|
871
|
+
example: 1
|
|
872
|
+
}),
|
|
873
|
+
date: z.string().openapi({
|
|
874
|
+
description: 'Date of the time slot (YYYY-MM-DD)',
|
|
875
|
+
example: '2026-06-15'
|
|
876
|
+
}),
|
|
877
|
+
start_time: z.string().openapi({
|
|
878
|
+
description: 'Start time of the slot (HH:MM)',
|
|
879
|
+
example: '08:00'
|
|
880
|
+
}),
|
|
881
|
+
end_time: z.string().openapi({
|
|
882
|
+
description: 'End time of the slot (HH:MM)',
|
|
883
|
+
example: '08:30'
|
|
884
|
+
}),
|
|
885
|
+
duration: z.number().openapi({
|
|
886
|
+
description: 'Duration in minutes',
|
|
887
|
+
example: 30
|
|
888
|
+
}),
|
|
889
|
+
schedule_type: z.enum(['assembly', 'dismantling']).openapi({
|
|
890
|
+
description: 'Type of schedule',
|
|
891
|
+
example: 'assembly'
|
|
892
|
+
}),
|
|
893
|
+
max_capacity: z.number().openapi({
|
|
894
|
+
description: 'Maximum booking capacity for this slot',
|
|
895
|
+
example: 5
|
|
896
|
+
}),
|
|
897
|
+
current_bookings: z.number().openapi({
|
|
898
|
+
description: 'Number of current bookings',
|
|
899
|
+
example: 3
|
|
900
|
+
}),
|
|
901
|
+
confirmed_bookings: z.number().openapi({
|
|
902
|
+
description: 'Number of confirmed bookings',
|
|
903
|
+
example: 1
|
|
904
|
+
}),
|
|
905
|
+
available_capacity: z.number().openapi({
|
|
906
|
+
description: 'Remaining available capacity',
|
|
907
|
+
example: 2
|
|
908
|
+
}),
|
|
909
|
+
is_available: z.boolean().openapi({
|
|
910
|
+
description: 'Whether the slot is available for booking',
|
|
911
|
+
example: true
|
|
912
|
+
})
|
|
913
|
+
})
|
|
914
|
+
.openapi('AvailableTimeSlot');
|
|
915
|
+
export const availableSlotsResponseSchema = z
|
|
916
|
+
.object({
|
|
917
|
+
event_id: z.number().openapi({
|
|
918
|
+
description: 'ID of the event',
|
|
919
|
+
example: 1
|
|
920
|
+
}),
|
|
921
|
+
event_code: z.string().openapi({
|
|
922
|
+
description: 'Code of the event',
|
|
923
|
+
example: 'COEC2025'
|
|
924
|
+
}),
|
|
925
|
+
event_name: z.string().openapi({
|
|
926
|
+
description: 'Name of the event',
|
|
927
|
+
example: 'COEC 2025'
|
|
928
|
+
}),
|
|
929
|
+
company_role: z.string().openapi({
|
|
930
|
+
description: 'Company role that was used for filtering (returned for reference)',
|
|
931
|
+
example: 'exhibitor'
|
|
932
|
+
}),
|
|
933
|
+
year: z.number().openapi({
|
|
934
|
+
description: 'Year of the slots',
|
|
935
|
+
example: 2026
|
|
936
|
+
}),
|
|
937
|
+
month: z.number().openapi({
|
|
938
|
+
description: 'Month of the slots',
|
|
939
|
+
example: 6
|
|
940
|
+
}),
|
|
941
|
+
available_slots: z.array(availableTimeSlotSchema).openapi({
|
|
942
|
+
description: 'List of available time slots with capacity information'
|
|
943
|
+
}),
|
|
944
|
+
total_slots: z.number().openapi({
|
|
945
|
+
description: 'Total number of time slots in the period',
|
|
946
|
+
example: 48
|
|
947
|
+
})
|
|
948
|
+
})
|
|
949
|
+
.openapi('AvailableSlotsResponse');
|
|
950
|
+
// ------------------------------
|
|
951
|
+
// Company Roles for Parking Area
|
|
952
|
+
// ------------------------------
|
|
953
|
+
export const getCompanyRolesByEventIdParamsSchema = z
|
|
954
|
+
.object({
|
|
955
|
+
eventId: z
|
|
956
|
+
.string()
|
|
957
|
+
.min(1, 'Event ID is required')
|
|
958
|
+
.transform(val => parseInt(val, 10))
|
|
959
|
+
.refine(val => !isNaN(val) && val > 0, { message: 'Event ID must be positive' })
|
|
960
|
+
.openapi({
|
|
961
|
+
description: 'The ID of the event to get company roles for',
|
|
962
|
+
example: '1'
|
|
963
|
+
}),
|
|
964
|
+
scheduleType: z.enum(['assembly', 'dismantling']).openapi({
|
|
965
|
+
description: 'Type of schedule',
|
|
966
|
+
example: 'assembly'
|
|
967
|
+
})
|
|
968
|
+
})
|
|
969
|
+
.openapi('GetCompanyRolesByEventIdParams');
|
|
970
|
+
export const getCompanyRolesByEventIdResponseSchema = z
|
|
971
|
+
.object({
|
|
972
|
+
event_id: z.number().openapi({
|
|
973
|
+
description: 'ID of the event',
|
|
974
|
+
example: 1
|
|
975
|
+
}),
|
|
976
|
+
company_roles: z.array(z.string()).openapi({
|
|
977
|
+
description: 'List of unique company roles for the event',
|
|
978
|
+
example: ['exhibitor', 'organizer', 'contractor']
|
|
979
|
+
}),
|
|
980
|
+
total_count: z.number().openapi({
|
|
981
|
+
description: 'Total number of unique company roles',
|
|
982
|
+
example: 3
|
|
983
|
+
})
|
|
984
|
+
})
|
|
985
|
+
.openapi('GetCompanyRolesByEventIdResponse');
|