@venulog/phasing-engine-schemas 0.5.1 → 0.6.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/parkingArea.d.ts +11 -2
- package/dist/parkingArea.js +30 -6
- package/dist/parkingBooking.d.ts +59 -128
- package/dist/parkingBooking.js +44 -82
- package/package.json +1 -1
package/dist/parkingArea.d.ts
CHANGED
|
@@ -96,6 +96,13 @@ export declare const parkingAreaWithSchedulesSchema: z.ZodObject<{
|
|
|
96
96
|
export declare const getParkingAreasByEventIdParamsSchema: z.ZodObject<{
|
|
97
97
|
eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
|
+
export declare const getParkingAreasByEventIdQuerySchema: z.ZodObject<{
|
|
100
|
+
company_role: z.ZodString;
|
|
101
|
+
schedule_type: z.ZodEnum<{
|
|
102
|
+
assembly: "assembly";
|
|
103
|
+
dismantling: "dismantling";
|
|
104
|
+
}>;
|
|
105
|
+
}, z.core.$strip>;
|
|
99
106
|
export declare const getParkingAreaByIdParamsSchema: z.ZodObject<{
|
|
100
107
|
areaId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
101
108
|
}, z.core.$strip>;
|
|
@@ -547,8 +554,9 @@ export declare const uploadSitePlanImageResponseSchema: z.ZodObject<{
|
|
|
547
554
|
}, z.core.$strip>;
|
|
548
555
|
export declare const getAvailableParkingAreaSlotsQuerySchema: z.ZodObject<{
|
|
549
556
|
event_id: z.ZodNumber;
|
|
550
|
-
year: z.
|
|
551
|
-
month: z.
|
|
557
|
+
year: z.ZodCoercedNumber<unknown>;
|
|
558
|
+
month: z.ZodCoercedNumber<unknown>;
|
|
559
|
+
parking_area_id: z.ZodNumber;
|
|
552
560
|
company_role: z.ZodString;
|
|
553
561
|
schedule_type: z.ZodOptional<z.ZodEnum<{
|
|
554
562
|
assembly: "assembly";
|
|
@@ -618,6 +626,7 @@ export declare const getAvailableSlotsBodySchema: z.ZodObject<{
|
|
|
618
626
|
assembly: "assembly";
|
|
619
627
|
dismantling: "dismantling";
|
|
620
628
|
}>>;
|
|
629
|
+
parking_area_id: z.ZodNumber;
|
|
621
630
|
}, z.core.$strip>;
|
|
622
631
|
export declare const availableTimeSlotSchema: z.ZodObject<{
|
|
623
632
|
parking_area_schedule_id: z.ZodNumber;
|
package/dist/parkingArea.js
CHANGED
|
@@ -176,6 +176,18 @@ export const getParkingAreasByEventIdParamsSchema = z
|
|
|
176
176
|
})
|
|
177
177
|
})
|
|
178
178
|
.openapi('GetParkingAreasByEventIdParams');
|
|
179
|
+
export const getParkingAreasByEventIdQuerySchema = z
|
|
180
|
+
.object({
|
|
181
|
+
company_role: z.string().min(1).openapi({
|
|
182
|
+
description: 'The designated company role',
|
|
183
|
+
example: 'Exhibitor'
|
|
184
|
+
}),
|
|
185
|
+
schedule_type: z.enum(['assembly', 'dismantling']).openapi({
|
|
186
|
+
description: 'Filter by schedule type',
|
|
187
|
+
example: 'assembly'
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
.openapi('GetParkingAreasByEventIdParams');
|
|
179
191
|
export const getParkingAreaByIdParamsSchema = z
|
|
180
192
|
.object({
|
|
181
193
|
areaId: z
|
|
@@ -685,17 +697,25 @@ export const uploadSitePlanImageResponseSchema = createMessageDataResponseSchema
|
|
|
685
697
|
// ------------------------------
|
|
686
698
|
export const getAvailableParkingAreaSlotsQuerySchema = z
|
|
687
699
|
.object({
|
|
688
|
-
event_id: z.number().
|
|
700
|
+
event_id: z.number().nonnegative().openapi({
|
|
689
701
|
description: 'The ID of the event',
|
|
690
|
-
example: 1
|
|
702
|
+
example: '1'
|
|
691
703
|
}),
|
|
692
|
-
year: z.
|
|
704
|
+
year: z.coerce
|
|
705
|
+
.number()
|
|
706
|
+
.int()
|
|
707
|
+
.refine(y => y >= 1000 && y <= 9999, { message: 'Year must be a 4-digit number' })
|
|
708
|
+
.openapi({
|
|
693
709
|
description: 'Year for filtering slots (YYYY)',
|
|
694
|
-
example: 2026
|
|
710
|
+
example: '2026'
|
|
695
711
|
}),
|
|
696
|
-
month: z.number().min(1).max(12).openapi({
|
|
712
|
+
month: z.coerce.number().int().min(1).max(12).openapi({
|
|
697
713
|
description: 'Month for filtering slots (1-12)',
|
|
698
|
-
example: 6
|
|
714
|
+
example: '6'
|
|
715
|
+
}),
|
|
716
|
+
parking_area_id: z.number().nonnegative().openapi({
|
|
717
|
+
description: 'The ID of the parking area',
|
|
718
|
+
example: '1'
|
|
699
719
|
}),
|
|
700
720
|
company_role: z.string().min(1, 'Company role is required').openapi({
|
|
701
721
|
description: 'Company role to filter schedules by',
|
|
@@ -832,6 +852,10 @@ export const getAvailableSlotsBodySchema = z
|
|
|
832
852
|
schedule_type: z.enum(['assembly', 'dismantling']).optional().openapi({
|
|
833
853
|
description: 'Filter by schedule type',
|
|
834
854
|
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
|
|
835
859
|
})
|
|
836
860
|
})
|
|
837
861
|
.openapi('GetAvailableSlotsBody');
|
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -88,11 +88,7 @@ export declare const companyDetailsSchema: z.ZodObject<{
|
|
|
88
88
|
transport_company: z.ZodString;
|
|
89
89
|
}, z.core.$strip>;
|
|
90
90
|
export declare const vehicleDetailsSchema: z.ZodObject<{
|
|
91
|
-
vehicle_type: z.
|
|
92
|
-
PL: "PL";
|
|
93
|
-
VUL: "VUL";
|
|
94
|
-
VL: "VL";
|
|
95
|
-
}>;
|
|
91
|
+
vehicle_type: z.ZodString;
|
|
96
92
|
unloading_method: z.ZodString;
|
|
97
93
|
license_plate: z.ZodString;
|
|
98
94
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -273,11 +269,7 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
|
|
|
273
269
|
transport_company: z.ZodString;
|
|
274
270
|
}, z.core.$strip>;
|
|
275
271
|
vehicle: z.ZodObject<{
|
|
276
|
-
vehicle_type: z.
|
|
277
|
-
PL: "PL";
|
|
278
|
-
VUL: "VUL";
|
|
279
|
-
VL: "VL";
|
|
280
|
-
}>;
|
|
272
|
+
vehicle_type: z.ZodString;
|
|
281
273
|
unloading_method: z.ZodString;
|
|
282
274
|
license_plate: z.ZodString;
|
|
283
275
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -318,17 +310,19 @@ export declare const createParkingBookingBodySchema: z.ZodObject<{
|
|
|
318
310
|
}, z.core.$strip>;
|
|
319
311
|
company_role: z.ZodString;
|
|
320
312
|
vehicle: z.ZodObject<{
|
|
321
|
-
vehicle_type: z.
|
|
322
|
-
PL: "PL";
|
|
323
|
-
VUL: "VUL";
|
|
324
|
-
VL: "VL";
|
|
325
|
-
}>;
|
|
313
|
+
vehicle_type: z.ZodString;
|
|
326
314
|
unloading_method: z.ZodString;
|
|
327
315
|
license_plate: z.ZodString;
|
|
328
316
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
329
317
|
}, z.core.$strip>;
|
|
318
|
+
vehicle_type: z.ZodEnum<{
|
|
319
|
+
PL: "PL";
|
|
320
|
+
VUL: "VUL";
|
|
321
|
+
VL: "VL";
|
|
322
|
+
}>;
|
|
330
323
|
booking_date: z.ZodString;
|
|
331
324
|
start_time: z.ZodString;
|
|
325
|
+
end_time: z.ZodString;
|
|
332
326
|
}, z.core.$strip>;
|
|
333
327
|
export declare const createParkingBookingDataSchema: z.ZodObject<{
|
|
334
328
|
id: z.ZodNumber;
|
|
@@ -349,15 +343,12 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
|
|
|
349
343
|
transport_company: z.ZodString;
|
|
350
344
|
}, z.core.$strip>;
|
|
351
345
|
vehicle: z.ZodObject<{
|
|
352
|
-
vehicle_type: z.
|
|
353
|
-
PL: "PL";
|
|
354
|
-
VUL: "VUL";
|
|
355
|
-
VL: "VL";
|
|
356
|
-
}>;
|
|
346
|
+
vehicle_type: z.ZodString;
|
|
357
347
|
unloading_method: z.ZodString;
|
|
358
348
|
license_plate: z.ZodString;
|
|
359
349
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
360
350
|
}, z.core.$strip>;
|
|
351
|
+
vehicle_type: z.ZodString;
|
|
361
352
|
booking_date: z.ZodString;
|
|
362
353
|
start_time: z.ZodString;
|
|
363
354
|
end_time: z.ZodString;
|
|
@@ -386,15 +377,12 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
|
|
|
386
377
|
transport_company: z.ZodString;
|
|
387
378
|
}, z.core.$strip>;
|
|
388
379
|
vehicle: z.ZodObject<{
|
|
389
|
-
vehicle_type: z.
|
|
390
|
-
PL: "PL";
|
|
391
|
-
VUL: "VUL";
|
|
392
|
-
VL: "VL";
|
|
393
|
-
}>;
|
|
380
|
+
vehicle_type: z.ZodString;
|
|
394
381
|
unloading_method: z.ZodString;
|
|
395
382
|
license_plate: z.ZodString;
|
|
396
383
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
397
384
|
}, z.core.$strip>;
|
|
385
|
+
vehicle_type: z.ZodString;
|
|
398
386
|
booking_date: z.ZodString;
|
|
399
387
|
start_time: z.ZodString;
|
|
400
388
|
end_time: z.ZodString;
|
|
@@ -417,11 +405,7 @@ export declare const updateParkingBookingBodySchema: z.ZodObject<{
|
|
|
417
405
|
transport_company: z.ZodString;
|
|
418
406
|
}, z.core.$strip>>;
|
|
419
407
|
vehicle: z.ZodOptional<z.ZodObject<{
|
|
420
|
-
vehicle_type: z.
|
|
421
|
-
PL: "PL";
|
|
422
|
-
VUL: "VUL";
|
|
423
|
-
VL: "VL";
|
|
424
|
-
}>;
|
|
408
|
+
vehicle_type: z.ZodString;
|
|
425
409
|
unloading_method: z.ZodString;
|
|
426
410
|
license_plate: z.ZodString;
|
|
427
411
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -445,11 +429,7 @@ export declare const updateParkingBookingDataSchema: z.ZodObject<{
|
|
|
445
429
|
transport_company: z.ZodString;
|
|
446
430
|
}, z.core.$strip>>;
|
|
447
431
|
vehicle: z.ZodNullable<z.ZodObject<{
|
|
448
|
-
vehicle_type: z.
|
|
449
|
-
PL: "PL";
|
|
450
|
-
VUL: "VUL";
|
|
451
|
-
VL: "VL";
|
|
452
|
-
}>;
|
|
432
|
+
vehicle_type: z.ZodString;
|
|
453
433
|
unloading_method: z.ZodString;
|
|
454
434
|
license_plate: z.ZodString;
|
|
455
435
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -477,11 +457,7 @@ export declare const updateParkingBookingResponseSchema: z.ZodObject<{
|
|
|
477
457
|
transport_company: z.ZodString;
|
|
478
458
|
}, z.core.$strip>>;
|
|
479
459
|
vehicle: z.ZodNullable<z.ZodObject<{
|
|
480
|
-
vehicle_type: z.
|
|
481
|
-
PL: "PL";
|
|
482
|
-
VUL: "VUL";
|
|
483
|
-
VL: "VL";
|
|
484
|
-
}>;
|
|
460
|
+
vehicle_type: z.ZodString;
|
|
485
461
|
unloading_method: z.ZodString;
|
|
486
462
|
license_plate: z.ZodString;
|
|
487
463
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -494,13 +470,6 @@ export declare const confirmBookingParamsSchema: z.ZodObject<{
|
|
|
494
470
|
bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
495
471
|
}, z.core.$strip>;
|
|
496
472
|
export declare const confirmBookingDataSchema: z.ZodObject<{
|
|
497
|
-
id: z.ZodNumber;
|
|
498
|
-
status: z.ZodString;
|
|
499
|
-
parking_area_schedule_id: z.ZodNumber;
|
|
500
|
-
updated_at: z.ZodString;
|
|
501
|
-
updated_by: z.ZodString;
|
|
502
|
-
}, z.core.$strip>;
|
|
503
|
-
export declare const confirmBookingResponseSchema: z.ZodObject<{
|
|
504
473
|
success: z.ZodBoolean;
|
|
505
474
|
message: z.ZodString;
|
|
506
475
|
data: z.ZodObject<{
|
|
@@ -511,17 +480,25 @@ export declare const confirmBookingResponseSchema: z.ZodObject<{
|
|
|
511
480
|
updated_by: z.ZodString;
|
|
512
481
|
}, z.core.$strip>;
|
|
513
482
|
}, z.core.$strip>;
|
|
483
|
+
export declare const confirmBookingResponseSchema: z.ZodObject<{
|
|
484
|
+
success: z.ZodBoolean;
|
|
485
|
+
message: z.ZodString;
|
|
486
|
+
data: z.ZodObject<{
|
|
487
|
+
success: z.ZodBoolean;
|
|
488
|
+
message: z.ZodString;
|
|
489
|
+
data: z.ZodObject<{
|
|
490
|
+
id: z.ZodNumber;
|
|
491
|
+
status: z.ZodString;
|
|
492
|
+
parking_area_schedule_id: z.ZodNumber;
|
|
493
|
+
updated_at: z.ZodString;
|
|
494
|
+
updated_by: z.ZodString;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
}, z.core.$strip>;
|
|
514
498
|
export declare const refuseBookingParamsSchema: z.ZodObject<{
|
|
515
499
|
bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
516
500
|
}, z.core.$strip>;
|
|
517
501
|
export declare const refuseBookingDataSchema: z.ZodObject<{
|
|
518
|
-
id: z.ZodNumber;
|
|
519
|
-
status: z.ZodString;
|
|
520
|
-
parking_area_schedule_id: z.ZodNumber;
|
|
521
|
-
updated_at: z.ZodString;
|
|
522
|
-
updated_by: z.ZodString;
|
|
523
|
-
}, z.core.$strip>;
|
|
524
|
-
export declare const refuseBookingResponseSchema: z.ZodObject<{
|
|
525
502
|
success: z.ZodBoolean;
|
|
526
503
|
message: z.ZodString;
|
|
527
504
|
data: z.ZodObject<{
|
|
@@ -532,6 +509,21 @@ export declare const refuseBookingResponseSchema: z.ZodObject<{
|
|
|
532
509
|
updated_by: z.ZodString;
|
|
533
510
|
}, z.core.$strip>;
|
|
534
511
|
}, z.core.$strip>;
|
|
512
|
+
export declare const refuseBookingResponseSchema: z.ZodObject<{
|
|
513
|
+
success: z.ZodBoolean;
|
|
514
|
+
message: z.ZodString;
|
|
515
|
+
data: z.ZodObject<{
|
|
516
|
+
success: z.ZodBoolean;
|
|
517
|
+
message: z.ZodString;
|
|
518
|
+
data: z.ZodObject<{
|
|
519
|
+
id: z.ZodNumber;
|
|
520
|
+
status: z.ZodString;
|
|
521
|
+
parking_area_schedule_id: z.ZodNumber;
|
|
522
|
+
updated_at: z.ZodString;
|
|
523
|
+
updated_by: z.ZodString;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
}, z.core.$strip>;
|
|
535
527
|
export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
|
|
536
528
|
id: z.ZodNumber;
|
|
537
529
|
status: z.ZodString;
|
|
@@ -550,6 +542,7 @@ export declare const parkingBookingWithRelationsSchema: z.ZodObject<{
|
|
|
550
542
|
parking_area_schedule_type: z.ZodString;
|
|
551
543
|
parking_areas: z.ZodObject<{
|
|
552
544
|
id: z.ZodNumber;
|
|
545
|
+
name: z.ZodString;
|
|
553
546
|
events: z.ZodObject<{
|
|
554
547
|
id: z.ZodNumber;
|
|
555
548
|
name: z.ZodString;
|
|
@@ -590,11 +583,7 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
590
583
|
transport_company: z.ZodString;
|
|
591
584
|
}, z.core.$strip>;
|
|
592
585
|
vehicle: z.ZodObject<{
|
|
593
|
-
vehicle_type: z.
|
|
594
|
-
PL: "PL";
|
|
595
|
-
VUL: "VUL";
|
|
596
|
-
VL: "VL";
|
|
597
|
-
}>;
|
|
586
|
+
vehicle_type: z.ZodString;
|
|
598
587
|
unloading_method: z.ZodString;
|
|
599
588
|
license_plate: z.ZodString;
|
|
600
589
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -607,6 +596,10 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
607
596
|
request_type: z.ZodString;
|
|
608
597
|
duration: z.ZodNumber;
|
|
609
598
|
parking_area_schedule_id: z.ZodNumber;
|
|
599
|
+
parking_area: z.ZodObject<{
|
|
600
|
+
id: z.ZodNumber;
|
|
601
|
+
name: z.ZodString;
|
|
602
|
+
}, z.core.$strip>;
|
|
610
603
|
banner: z.ZodNullable<z.ZodObject<{
|
|
611
604
|
url: z.ZodURL;
|
|
612
605
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -643,11 +636,7 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
643
636
|
transport_company: z.ZodString;
|
|
644
637
|
}, z.core.$strip>;
|
|
645
638
|
vehicle: z.ZodObject<{
|
|
646
|
-
vehicle_type: z.
|
|
647
|
-
PL: "PL";
|
|
648
|
-
VUL: "VUL";
|
|
649
|
-
VL: "VL";
|
|
650
|
-
}>;
|
|
639
|
+
vehicle_type: z.ZodString;
|
|
651
640
|
unloading_method: z.ZodString;
|
|
652
641
|
license_plate: z.ZodString;
|
|
653
642
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -660,6 +649,10 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
660
649
|
request_type: z.ZodString;
|
|
661
650
|
duration: z.ZodNumber;
|
|
662
651
|
parking_area_schedule_id: z.ZodNumber;
|
|
652
|
+
parking_area: z.ZodObject<{
|
|
653
|
+
id: z.ZodNumber;
|
|
654
|
+
name: z.ZodString;
|
|
655
|
+
}, z.core.$strip>;
|
|
663
656
|
banner: z.ZodNullable<z.ZodObject<{
|
|
664
657
|
url: z.ZodURL;
|
|
665
658
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -700,11 +693,7 @@ export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<
|
|
|
700
693
|
transport_company: z.ZodString;
|
|
701
694
|
}, z.core.$strip>;
|
|
702
695
|
vehicle: z.ZodObject<{
|
|
703
|
-
vehicle_type: z.
|
|
704
|
-
PL: "PL";
|
|
705
|
-
VUL: "VUL";
|
|
706
|
-
VL: "VL";
|
|
707
|
-
}>;
|
|
696
|
+
vehicle_type: z.ZodString;
|
|
708
697
|
unloading_method: z.ZodString;
|
|
709
698
|
license_plate: z.ZodString;
|
|
710
699
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -757,11 +746,7 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
757
746
|
transport_company: z.ZodString;
|
|
758
747
|
}, z.core.$strip>;
|
|
759
748
|
vehicle: z.ZodObject<{
|
|
760
|
-
vehicle_type: z.
|
|
761
|
-
PL: "PL";
|
|
762
|
-
VUL: "VUL";
|
|
763
|
-
VL: "VL";
|
|
764
|
-
}>;
|
|
749
|
+
vehicle_type: z.ZodString;
|
|
765
750
|
unloading_method: z.ZodString;
|
|
766
751
|
license_plate: z.ZodString;
|
|
767
752
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
@@ -786,54 +771,6 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
786
771
|
updated_at: z.ZodString;
|
|
787
772
|
}, z.core.$strip>;
|
|
788
773
|
}, z.core.$strip>;
|
|
789
|
-
export declare const exportBookingDataSchema: z.ZodObject<{
|
|
790
|
-
booking_id: z.ZodNumber;
|
|
791
|
-
event_id: z.ZodNumber;
|
|
792
|
-
status: z.ZodEnum<typeof BookingStatus>;
|
|
793
|
-
company_name: z.ZodString;
|
|
794
|
-
vehicle_type: z.ZodString;
|
|
795
|
-
scan_entrance: z.ZodNullable<z.ZodString>;
|
|
796
|
-
scan_exit: z.ZodNullable<z.ZodString>;
|
|
797
|
-
co2_footprint: z.ZodNullable<z.ZodNumber>;
|
|
798
|
-
booking_date: z.ZodString;
|
|
799
|
-
}, z.core.$strip>;
|
|
800
|
-
export declare const exportBookingsQuerySchema: z.ZodObject<{
|
|
801
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
802
|
-
status: z.ZodOptional<z.ZodEnum<typeof BookingStatus>>;
|
|
803
|
-
}, z.core.$strip>;
|
|
804
|
-
export declare const exportBookingsDataSchema: z.ZodObject<{
|
|
805
|
-
bookings: z.ZodArray<z.ZodObject<{
|
|
806
|
-
booking_id: z.ZodNumber;
|
|
807
|
-
event_id: z.ZodNumber;
|
|
808
|
-
status: z.ZodEnum<typeof BookingStatus>;
|
|
809
|
-
company_name: z.ZodString;
|
|
810
|
-
vehicle_type: z.ZodString;
|
|
811
|
-
scan_entrance: z.ZodNullable<z.ZodString>;
|
|
812
|
-
scan_exit: z.ZodNullable<z.ZodString>;
|
|
813
|
-
co2_footprint: z.ZodNullable<z.ZodNumber>;
|
|
814
|
-
booking_date: z.ZodString;
|
|
815
|
-
}, z.core.$strip>>;
|
|
816
|
-
total_count: z.ZodNumber;
|
|
817
|
-
filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
818
|
-
}, z.core.$strip>;
|
|
819
|
-
export declare const exportBookingsResponseSchema: z.ZodObject<{
|
|
820
|
-
success: z.ZodBoolean;
|
|
821
|
-
data: z.ZodObject<{
|
|
822
|
-
bookings: z.ZodArray<z.ZodObject<{
|
|
823
|
-
booking_id: z.ZodNumber;
|
|
824
|
-
event_id: z.ZodNumber;
|
|
825
|
-
status: z.ZodEnum<typeof BookingStatus>;
|
|
826
|
-
company_name: z.ZodString;
|
|
827
|
-
vehicle_type: z.ZodString;
|
|
828
|
-
scan_entrance: z.ZodNullable<z.ZodString>;
|
|
829
|
-
scan_exit: z.ZodNullable<z.ZodString>;
|
|
830
|
-
co2_footprint: z.ZodNullable<z.ZodNumber>;
|
|
831
|
-
booking_date: z.ZodString;
|
|
832
|
-
}, z.core.$strip>>;
|
|
833
|
-
total_count: z.ZodNumber;
|
|
834
|
-
filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
835
|
-
}, z.core.$strip>;
|
|
836
|
-
}, z.core.$strip>;
|
|
837
774
|
export type Geometry = z.infer<typeof geometrySchema>;
|
|
838
775
|
export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
|
|
839
776
|
export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
|
|
@@ -868,9 +805,3 @@ export type GetBookingDetailsByTokenResponse = z.infer<typeof getParkingBookingD
|
|
|
868
805
|
export type GetBookingDetailsByQrBody = z.infer<typeof getParkingBookingDetailsByQrBodySchema>;
|
|
869
806
|
export type GetBookingDetailsByQrData = z.infer<typeof bookingDetailsDataSchema>;
|
|
870
807
|
export type GetBookingDetailsByQrResponse = z.infer<typeof getParkingBookingDetailsByQrResponseSchema>;
|
|
871
|
-
export type ConfirmBookingData = z.infer<typeof confirmBookingDataSchema>;
|
|
872
|
-
export type ConfirmBookingDataResponse = z.infer<typeof confirmBookingResponseSchema>;
|
|
873
|
-
export type ExportBookingData = z.infer<typeof exportBookingDataSchema>;
|
|
874
|
-
export type ExportBookingsQuery = z.infer<typeof exportBookingsQuerySchema>;
|
|
875
|
-
export type ExportBookingsData = z.infer<typeof exportBookingsDataSchema>;
|
|
876
|
-
export type ExportBookingsResponse = z.infer<typeof exportBookingsResponseSchema>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -151,9 +151,9 @@ export const companyDetailsSchema = z
|
|
|
151
151
|
.openapi('CompanyDetails');
|
|
152
152
|
export const vehicleDetailsSchema = z
|
|
153
153
|
.object({
|
|
154
|
-
vehicle_type: z.
|
|
155
|
-
description: '
|
|
156
|
-
example: '
|
|
154
|
+
vehicle_type: z.string().min(1, 'Vehicle type is required').openapi({
|
|
155
|
+
description: 'Type of vehicle',
|
|
156
|
+
example: 'Truck'
|
|
157
157
|
}),
|
|
158
158
|
unloading_method: z.string().min(1, 'Unloading method is required').openapi({
|
|
159
159
|
description: 'Method of unloading',
|
|
@@ -406,6 +406,10 @@ export const createParkingBookingBodySchema = z
|
|
|
406
406
|
vehicle: vehicleDetailsSchema.openapi({
|
|
407
407
|
description: 'Vehicle details'
|
|
408
408
|
}),
|
|
409
|
+
vehicle_type: z.enum(['PL', 'VUL', 'VL']).openapi({
|
|
410
|
+
description: 'Vehicle type: PL (poids lourd), VUL (véhicule utilitaire léger), VL (véhicule léger)',
|
|
411
|
+
example: 'PL'
|
|
412
|
+
}),
|
|
409
413
|
booking_date: z
|
|
410
414
|
.string()
|
|
411
415
|
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
@@ -419,6 +423,13 @@ export const createParkingBookingBodySchema = z
|
|
|
419
423
|
.openapi({
|
|
420
424
|
description: 'Start time (HH:MM)',
|
|
421
425
|
example: '06:00'
|
|
426
|
+
}),
|
|
427
|
+
end_time: z
|
|
428
|
+
.string()
|
|
429
|
+
.regex(/^\d{2}:\d{2}$/)
|
|
430
|
+
.openapi({
|
|
431
|
+
description: 'End time (HH:MM)',
|
|
432
|
+
example: '09:00'
|
|
422
433
|
})
|
|
423
434
|
})
|
|
424
435
|
.openapi('CreateParkingBookingBody');
|
|
@@ -435,6 +446,7 @@ export const createParkingBookingDataSchema = z
|
|
|
435
446
|
vehicle: vehicleDetailsSchema.openapi({
|
|
436
447
|
description: 'Vehicle details'
|
|
437
448
|
}),
|
|
449
|
+
vehicle_type: z.string(),
|
|
438
450
|
booking_date: z.string(),
|
|
439
451
|
start_time: z.string(),
|
|
440
452
|
end_time: z.string(),
|
|
@@ -511,11 +523,15 @@ export const confirmBookingParamsSchema = z
|
|
|
511
523
|
// Response schema
|
|
512
524
|
export const confirmBookingDataSchema = z
|
|
513
525
|
.object({
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
526
|
+
success: z.boolean(),
|
|
527
|
+
message: z.string(),
|
|
528
|
+
data: z.object({
|
|
529
|
+
id: z.number(),
|
|
530
|
+
status: z.string(),
|
|
531
|
+
parking_area_schedule_id: z.number(),
|
|
532
|
+
updated_at: z.string(),
|
|
533
|
+
updated_by: z.string()
|
|
534
|
+
})
|
|
519
535
|
})
|
|
520
536
|
.openapi('ConfirmBookingData');
|
|
521
537
|
export const confirmBookingResponseSchema = createMessageDataResponseSchema(confirmBookingDataSchema, 'ConfirmBookingResponse', 'Parking booking confirmed successfully', 'Details of the confirmed booking');
|
|
@@ -540,11 +556,15 @@ export const refuseBookingParamsSchema = z
|
|
|
540
556
|
// Response schema
|
|
541
557
|
export const refuseBookingDataSchema = z
|
|
542
558
|
.object({
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
559
|
+
success: z.boolean(),
|
|
560
|
+
message: z.string(),
|
|
561
|
+
data: z.object({
|
|
562
|
+
id: z.number(),
|
|
563
|
+
status: z.string(),
|
|
564
|
+
parking_area_schedule_id: z.number(),
|
|
565
|
+
updated_at: z.string(),
|
|
566
|
+
updated_by: z.string()
|
|
567
|
+
})
|
|
548
568
|
})
|
|
549
569
|
.openapi('RefuseBookingData');
|
|
550
570
|
export const refuseBookingResponseSchema = createMessageDataResponseSchema(refuseBookingDataSchema, 'RefuseBookingResponse', 'Parking booking refused successfully', 'Details of the refused booking');
|
|
@@ -570,6 +590,7 @@ export const parkingBookingWithRelationsSchema = z
|
|
|
570
590
|
parking_area_schedule_type: z.string(),
|
|
571
591
|
parking_areas: z.object({
|
|
572
592
|
id: z.number(),
|
|
593
|
+
name: z.string(),
|
|
573
594
|
events: z.object({
|
|
574
595
|
id: z.number(),
|
|
575
596
|
name: z.string(),
|
|
@@ -669,6 +690,16 @@ export const parkingBookingDetailsDataSchema = z
|
|
|
669
690
|
description: 'ID of the parking area schedule',
|
|
670
691
|
example: 456
|
|
671
692
|
}),
|
|
693
|
+
parking_area: z.object({
|
|
694
|
+
id: z.number().openapi({
|
|
695
|
+
description: 'ID of parking area',
|
|
696
|
+
example: 30
|
|
697
|
+
}),
|
|
698
|
+
name: z.string().openapi({
|
|
699
|
+
description: 'Name of parking area',
|
|
700
|
+
example: 'Parking Spot X'
|
|
701
|
+
})
|
|
702
|
+
}),
|
|
672
703
|
banner: documentSchema.nullable().openapi({
|
|
673
704
|
description: 'Event banner document',
|
|
674
705
|
example: {
|
|
@@ -712,72 +743,3 @@ export const getParkingBookingDetailsByQrBodySchema = z
|
|
|
712
743
|
})
|
|
713
744
|
.openapi('GetBookingDetailsByQrBody');
|
|
714
745
|
export const getParkingBookingDetailsByQrResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByQrResponse', 'Booking details retrieved by QR token');
|
|
715
|
-
// ------------------------------
|
|
716
|
-
// Export All Parking Bookings
|
|
717
|
-
// ------------------------------
|
|
718
|
-
export const exportBookingDataSchema = z
|
|
719
|
-
.object({
|
|
720
|
-
booking_id: z.number().openapi({
|
|
721
|
-
description: 'Unique booking identifier',
|
|
722
|
-
example: 123
|
|
723
|
-
}),
|
|
724
|
-
event_id: z.number().openapi({
|
|
725
|
-
description: 'Event ID associated with the booking',
|
|
726
|
-
example: 1
|
|
727
|
-
}),
|
|
728
|
-
status: z.enum(BookingStatus).openapi({
|
|
729
|
-
description: 'Current booking status',
|
|
730
|
-
example: 'confirmed'
|
|
731
|
-
}),
|
|
732
|
-
company_name: z.string().openapi({
|
|
733
|
-
description: 'Company name from booking details',
|
|
734
|
-
example: 'Acme Corp'
|
|
735
|
-
}),
|
|
736
|
-
vehicle_type: z.string().openapi({
|
|
737
|
-
description: 'Type of vehicle (PL, VUL, VL)',
|
|
738
|
-
example: 'PL'
|
|
739
|
-
}),
|
|
740
|
-
scan_entrance: z.string().nullable().openapi({
|
|
741
|
-
description: 'Entry scan timestamp',
|
|
742
|
-
example: '2024-12-15T08:30:00.000Z'
|
|
743
|
-
}),
|
|
744
|
-
scan_exit: z.string().nullable().openapi({
|
|
745
|
-
description: 'Exit scan timestamp',
|
|
746
|
-
example: '2024-12-15T17:15:00.000Z'
|
|
747
|
-
}),
|
|
748
|
-
co2_footprint: z.number().nullable().openapi({
|
|
749
|
-
description: 'Estimated CO2 footprint in kg based on vehicle type and duration',
|
|
750
|
-
example: 12.5
|
|
751
|
-
}),
|
|
752
|
-
booking_date: z.string().openapi({
|
|
753
|
-
description: 'Date of the booking',
|
|
754
|
-
example: '2024-12-15'
|
|
755
|
-
})
|
|
756
|
-
})
|
|
757
|
-
.openapi('ExportBookingData');
|
|
758
|
-
export const exportBookingsQuerySchema = z
|
|
759
|
-
.object({
|
|
760
|
-
event_id: z.coerce.number().openapi({
|
|
761
|
-
description: 'ID of the close event',
|
|
762
|
-
example: 1
|
|
763
|
-
}),
|
|
764
|
-
status: z.enum(BookingStatus).optional().openapi({
|
|
765
|
-
description: 'Filter by booking status',
|
|
766
|
-
example: 'confirmed'
|
|
767
|
-
})
|
|
768
|
-
})
|
|
769
|
-
.openapi('ExportBookingsQuery');
|
|
770
|
-
export const exportBookingsDataSchema = z
|
|
771
|
-
.object({
|
|
772
|
-
bookings: z.array(exportBookingDataSchema),
|
|
773
|
-
total_count: z.number().openapi({
|
|
774
|
-
description: 'Total number of bookings',
|
|
775
|
-
example: 150
|
|
776
|
-
}),
|
|
777
|
-
filters_applied: z.record(z.string(), z.unknown()).openapi({
|
|
778
|
-
description: 'Summary of applied filters',
|
|
779
|
-
example: { event_code: 'EVENT2024', status: 'confirmed' }
|
|
780
|
-
})
|
|
781
|
-
})
|
|
782
|
-
.openapi('ExportBookingsData');
|
|
783
|
-
export const exportBookingsResponseSchema = createSuccessResponseSchema(exportBookingsDataSchema, 'ExportBookingsResponse', 'Exported parking bookings data');
|