@venulog/phasing-engine-schemas 0.7.0-alpha.1 → 0.7.0-alpha.3
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/common.d.ts +2 -0
- package/dist/common.js +6 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/unloadingType.d.ts +4 -0
- package/dist/enums/unloadingType.js +5 -0
- package/dist/parkingBooking.d.ts +37 -84
- package/dist/parkingBooking.js +7 -9
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VehicleType } from './enums/vehicleType.js';
|
|
1
2
|
import { z } from './zod.js';
|
|
2
3
|
export declare const baseResponseSchema: z.ZodObject<{
|
|
3
4
|
success: z.ZodBoolean;
|
|
@@ -25,3 +26,4 @@ export declare const documentSchema: z.ZodObject<{
|
|
|
25
26
|
path: z.ZodOptional<z.ZodString>;
|
|
26
27
|
}, z.core.$strip>;
|
|
27
28
|
export type Document = z.infer<typeof documentSchema>;
|
|
29
|
+
export declare const vehicleTypeSchema: z.ZodEnum<typeof VehicleType>;
|
package/dist/common.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VehicleType } from './enums/vehicleType.js';
|
|
1
2
|
import { z } from './zod.js';
|
|
2
3
|
// Base response schema for all API responses
|
|
3
4
|
export const baseResponseSchema = z
|
|
@@ -72,3 +73,8 @@ export const documentSchema = z
|
|
|
72
73
|
})
|
|
73
74
|
})
|
|
74
75
|
.openapi('Document');
|
|
76
|
+
// TODO refactor other usages of VehicleType to use this schema
|
|
77
|
+
export const vehicleTypeSchema = z.enum(VehicleType).openapi({
|
|
78
|
+
description: 'Vehicle type: PL (poids lourd), VUL (véhicule utilitaire léger), VL (véhicule léger)',
|
|
79
|
+
example: 'PL'
|
|
80
|
+
});
|
package/dist/enums/index.d.ts
CHANGED
package/dist/enums/index.js
CHANGED
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BookingStatus } from './enums/bookingStatus.js';
|
|
2
2
|
import { z } from './zod.js';
|
|
3
|
+
import { UnloadingType } from './enums/unloadingType.js';
|
|
3
4
|
export declare const geometrySchema: z.ZodNullable<z.ZodObject<{
|
|
4
5
|
type: z.ZodEnum<{
|
|
5
6
|
Point: "Point";
|
|
@@ -75,7 +76,7 @@ export declare const parkingBookingSchema: z.ZodObject<{
|
|
|
75
76
|
}, z.core.$strip>>;
|
|
76
77
|
}, z.core.$strip>;
|
|
77
78
|
export declare const companyDetailsSchema: z.ZodObject<{
|
|
78
|
-
hall: z.ZodString
|
|
79
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
80
|
stand_number: z.ZodString;
|
|
80
81
|
company_name: z.ZodString;
|
|
81
82
|
business: z.ZodString;
|
|
@@ -88,12 +89,8 @@ export declare const companyDetailsSchema: z.ZodObject<{
|
|
|
88
89
|
transport_company: z.ZodString;
|
|
89
90
|
}, z.core.$strip>;
|
|
90
91
|
export declare const vehicleDetailsSchema: z.ZodObject<{
|
|
91
|
-
vehicle_type: z.ZodEnum<
|
|
92
|
-
|
|
93
|
-
VUL: "VUL";
|
|
94
|
-
VL: "VL";
|
|
95
|
-
}>;
|
|
96
|
-
unloading_method: z.ZodString;
|
|
92
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
93
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
97
94
|
license_plate: z.ZodString;
|
|
98
95
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
99
96
|
}, z.core.$strip>;
|
|
@@ -260,7 +257,7 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
|
|
|
260
257
|
end_time: z.ZodString;
|
|
261
258
|
company_role: z.ZodNullable<z.ZodString>;
|
|
262
259
|
company: z.ZodObject<{
|
|
263
|
-
hall: z.ZodString
|
|
260
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
264
261
|
stand_number: z.ZodString;
|
|
265
262
|
company_name: z.ZodString;
|
|
266
263
|
business: z.ZodString;
|
|
@@ -273,12 +270,8 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
|
|
|
273
270
|
transport_company: z.ZodString;
|
|
274
271
|
}, z.core.$strip>;
|
|
275
272
|
vehicle: z.ZodObject<{
|
|
276
|
-
vehicle_type: z.ZodEnum<
|
|
277
|
-
|
|
278
|
-
VUL: "VUL";
|
|
279
|
-
VL: "VL";
|
|
280
|
-
}>;
|
|
281
|
-
unloading_method: z.ZodString;
|
|
273
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
274
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
282
275
|
license_plate: z.ZodString;
|
|
283
276
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
284
277
|
}, z.core.$strip>;
|
|
@@ -304,7 +297,7 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
|
|
|
304
297
|
export declare const createParkingBookingBodySchema: z.ZodObject<{
|
|
305
298
|
parking_area_schedule_id: z.ZodNumber;
|
|
306
299
|
company: z.ZodObject<{
|
|
307
|
-
hall: z.ZodString
|
|
300
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
308
301
|
stand_number: z.ZodString;
|
|
309
302
|
company_name: z.ZodString;
|
|
310
303
|
business: z.ZodString;
|
|
@@ -318,12 +311,8 @@ export declare const createParkingBookingBodySchema: z.ZodObject<{
|
|
|
318
311
|
}, z.core.$strip>;
|
|
319
312
|
company_role: z.ZodString;
|
|
320
313
|
vehicle: z.ZodObject<{
|
|
321
|
-
vehicle_type: z.ZodEnum<
|
|
322
|
-
|
|
323
|
-
VUL: "VUL";
|
|
324
|
-
VL: "VL";
|
|
325
|
-
}>;
|
|
326
|
-
unloading_method: z.ZodString;
|
|
314
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
315
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
327
316
|
license_plate: z.ZodString;
|
|
328
317
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
329
318
|
}, z.core.$strip>;
|
|
@@ -336,7 +325,7 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
|
|
|
336
325
|
status: z.ZodString;
|
|
337
326
|
company_role: z.ZodString;
|
|
338
327
|
company: z.ZodObject<{
|
|
339
|
-
hall: z.ZodString
|
|
328
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
340
329
|
stand_number: z.ZodString;
|
|
341
330
|
company_name: z.ZodString;
|
|
342
331
|
business: z.ZodString;
|
|
@@ -349,12 +338,8 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
|
|
|
349
338
|
transport_company: z.ZodString;
|
|
350
339
|
}, z.core.$strip>;
|
|
351
340
|
vehicle: z.ZodObject<{
|
|
352
|
-
vehicle_type: z.ZodEnum<
|
|
353
|
-
|
|
354
|
-
VUL: "VUL";
|
|
355
|
-
VL: "VL";
|
|
356
|
-
}>;
|
|
357
|
-
unloading_method: z.ZodString;
|
|
341
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
342
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
358
343
|
license_plate: z.ZodString;
|
|
359
344
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
360
345
|
}, z.core.$strip>;
|
|
@@ -373,7 +358,7 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
|
|
|
373
358
|
status: z.ZodString;
|
|
374
359
|
company_role: z.ZodString;
|
|
375
360
|
company: z.ZodObject<{
|
|
376
|
-
hall: z.ZodString
|
|
361
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
377
362
|
stand_number: z.ZodString;
|
|
378
363
|
company_name: z.ZodString;
|
|
379
364
|
business: z.ZodString;
|
|
@@ -386,12 +371,8 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
|
|
|
386
371
|
transport_company: z.ZodString;
|
|
387
372
|
}, z.core.$strip>;
|
|
388
373
|
vehicle: z.ZodObject<{
|
|
389
|
-
vehicle_type: z.ZodEnum<
|
|
390
|
-
|
|
391
|
-
VUL: "VUL";
|
|
392
|
-
VL: "VL";
|
|
393
|
-
}>;
|
|
394
|
-
unloading_method: z.ZodString;
|
|
374
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
375
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
395
376
|
license_plate: z.ZodString;
|
|
396
377
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
397
378
|
}, z.core.$strip>;
|
|
@@ -404,7 +385,7 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
|
|
|
404
385
|
}, z.core.$strip>;
|
|
405
386
|
export declare const updateParkingBookingBodySchema: z.ZodObject<{
|
|
406
387
|
company: z.ZodOptional<z.ZodObject<{
|
|
407
|
-
hall: z.ZodString
|
|
388
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
408
389
|
stand_number: z.ZodString;
|
|
409
390
|
company_name: z.ZodString;
|
|
410
391
|
business: z.ZodString;
|
|
@@ -417,12 +398,8 @@ export declare const updateParkingBookingBodySchema: z.ZodObject<{
|
|
|
417
398
|
transport_company: z.ZodString;
|
|
418
399
|
}, z.core.$strip>>;
|
|
419
400
|
vehicle: z.ZodOptional<z.ZodObject<{
|
|
420
|
-
vehicle_type: z.ZodEnum<
|
|
421
|
-
|
|
422
|
-
VUL: "VUL";
|
|
423
|
-
VL: "VL";
|
|
424
|
-
}>;
|
|
425
|
-
unloading_method: z.ZodString;
|
|
401
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
402
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
426
403
|
license_plate: z.ZodString;
|
|
427
404
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
428
405
|
}, z.core.$strip>>;
|
|
@@ -432,7 +409,7 @@ export declare const updateParkingBookingDataSchema: z.ZodObject<{
|
|
|
432
409
|
booking_id: z.ZodNumber;
|
|
433
410
|
qr_token: z.ZodString;
|
|
434
411
|
company: z.ZodNullable<z.ZodObject<{
|
|
435
|
-
hall: z.ZodString
|
|
412
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
436
413
|
stand_number: z.ZodString;
|
|
437
414
|
company_name: z.ZodString;
|
|
438
415
|
business: z.ZodString;
|
|
@@ -445,12 +422,8 @@ export declare const updateParkingBookingDataSchema: z.ZodObject<{
|
|
|
445
422
|
transport_company: z.ZodString;
|
|
446
423
|
}, z.core.$strip>>;
|
|
447
424
|
vehicle: z.ZodNullable<z.ZodObject<{
|
|
448
|
-
vehicle_type: z.ZodEnum<
|
|
449
|
-
|
|
450
|
-
VUL: "VUL";
|
|
451
|
-
VL: "VL";
|
|
452
|
-
}>;
|
|
453
|
-
unloading_method: z.ZodString;
|
|
425
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
426
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
454
427
|
license_plate: z.ZodString;
|
|
455
428
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
456
429
|
}, z.core.$strip>>;
|
|
@@ -464,7 +437,7 @@ export declare const updateParkingBookingResponseSchema: z.ZodObject<{
|
|
|
464
437
|
booking_id: z.ZodNumber;
|
|
465
438
|
qr_token: z.ZodString;
|
|
466
439
|
company: z.ZodNullable<z.ZodObject<{
|
|
467
|
-
hall: z.ZodString
|
|
440
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
468
441
|
stand_number: z.ZodString;
|
|
469
442
|
company_name: z.ZodString;
|
|
470
443
|
business: z.ZodString;
|
|
@@ -477,12 +450,8 @@ export declare const updateParkingBookingResponseSchema: z.ZodObject<{
|
|
|
477
450
|
transport_company: z.ZodString;
|
|
478
451
|
}, z.core.$strip>>;
|
|
479
452
|
vehicle: z.ZodNullable<z.ZodObject<{
|
|
480
|
-
vehicle_type: z.ZodEnum<
|
|
481
|
-
|
|
482
|
-
VUL: "VUL";
|
|
483
|
-
VL: "VL";
|
|
484
|
-
}>;
|
|
485
|
-
unloading_method: z.ZodString;
|
|
453
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
454
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
486
455
|
license_plate: z.ZodString;
|
|
487
456
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
488
457
|
}, z.core.$strip>>;
|
|
@@ -578,7 +547,7 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
578
547
|
end_time: z.ZodString;
|
|
579
548
|
company_role: z.ZodNullable<z.ZodString>;
|
|
580
549
|
company: z.ZodObject<{
|
|
581
|
-
hall: z.ZodString
|
|
550
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
582
551
|
stand_number: z.ZodString;
|
|
583
552
|
company_name: z.ZodString;
|
|
584
553
|
business: z.ZodString;
|
|
@@ -591,12 +560,8 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
591
560
|
transport_company: z.ZodString;
|
|
592
561
|
}, z.core.$strip>;
|
|
593
562
|
vehicle: z.ZodObject<{
|
|
594
|
-
vehicle_type: z.ZodEnum<
|
|
595
|
-
|
|
596
|
-
VUL: "VUL";
|
|
597
|
-
VL: "VL";
|
|
598
|
-
}>;
|
|
599
|
-
unloading_method: z.ZodString;
|
|
563
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
564
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
600
565
|
license_plate: z.ZodString;
|
|
601
566
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
602
567
|
}, z.core.$strip>;
|
|
@@ -635,7 +600,7 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
635
600
|
end_time: z.ZodString;
|
|
636
601
|
company_role: z.ZodNullable<z.ZodString>;
|
|
637
602
|
company: z.ZodObject<{
|
|
638
|
-
hall: z.ZodString
|
|
603
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
639
604
|
stand_number: z.ZodString;
|
|
640
605
|
company_name: z.ZodString;
|
|
641
606
|
business: z.ZodString;
|
|
@@ -648,12 +613,8 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
648
613
|
transport_company: z.ZodString;
|
|
649
614
|
}, z.core.$strip>;
|
|
650
615
|
vehicle: z.ZodObject<{
|
|
651
|
-
vehicle_type: z.ZodEnum<
|
|
652
|
-
|
|
653
|
-
VUL: "VUL";
|
|
654
|
-
VL: "VL";
|
|
655
|
-
}>;
|
|
656
|
-
unloading_method: z.ZodString;
|
|
616
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
617
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
657
618
|
license_plate: z.ZodString;
|
|
658
619
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
659
620
|
}, z.core.$strip>;
|
|
@@ -696,7 +657,7 @@ export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<
|
|
|
696
657
|
end_time: z.ZodString;
|
|
697
658
|
company_role: z.ZodNullable<z.ZodString>;
|
|
698
659
|
company: z.ZodObject<{
|
|
699
|
-
hall: z.ZodString
|
|
660
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
700
661
|
stand_number: z.ZodString;
|
|
701
662
|
company_name: z.ZodString;
|
|
702
663
|
business: z.ZodString;
|
|
@@ -709,12 +670,8 @@ export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<
|
|
|
709
670
|
transport_company: z.ZodString;
|
|
710
671
|
}, z.core.$strip>;
|
|
711
672
|
vehicle: z.ZodObject<{
|
|
712
|
-
vehicle_type: z.ZodEnum<
|
|
713
|
-
|
|
714
|
-
VUL: "VUL";
|
|
715
|
-
VL: "VL";
|
|
716
|
-
}>;
|
|
717
|
-
unloading_method: z.ZodString;
|
|
673
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
674
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
718
675
|
license_plate: z.ZodString;
|
|
719
676
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
720
677
|
}, z.core.$strip>;
|
|
@@ -753,7 +710,7 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
753
710
|
end_time: z.ZodString;
|
|
754
711
|
company_role: z.ZodNullable<z.ZodString>;
|
|
755
712
|
company: z.ZodObject<{
|
|
756
|
-
hall: z.ZodString
|
|
713
|
+
hall: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
757
714
|
stand_number: z.ZodString;
|
|
758
715
|
company_name: z.ZodString;
|
|
759
716
|
business: z.ZodString;
|
|
@@ -766,12 +723,8 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
|
|
|
766
723
|
transport_company: z.ZodString;
|
|
767
724
|
}, z.core.$strip>;
|
|
768
725
|
vehicle: z.ZodObject<{
|
|
769
|
-
vehicle_type: z.ZodEnum<
|
|
770
|
-
|
|
771
|
-
VUL: "VUL";
|
|
772
|
-
VL: "VL";
|
|
773
|
-
}>;
|
|
774
|
-
unloading_method: z.ZodString;
|
|
726
|
+
vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
|
|
727
|
+
unloading_method: z.ZodEnum<typeof UnloadingType>;
|
|
775
728
|
license_plate: z.ZodString;
|
|
776
729
|
trailer_registration: z.ZodOptional<z.ZodString>;
|
|
777
730
|
}, z.core.$strip>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// packages/phasing-schemas/src/parkingBooking.ts
|
|
2
2
|
import { paginationSchema } from './pagination.js';
|
|
3
3
|
import { BookingStatus } from './enums/bookingStatus.js';
|
|
4
|
-
import { createSuccessResponseSchema, createMessageDataResponseSchema, documentSchema } from './common.js';
|
|
4
|
+
import { createSuccessResponseSchema, createMessageDataResponseSchema, documentSchema, vehicleTypeSchema } from './common.js';
|
|
5
5
|
import { z } from './zod.js';
|
|
6
6
|
import { parkingAreaScheduleSchema } from './parkingArea.js';
|
|
7
|
+
import { UnloadingType } from './enums/unloadingType.js';
|
|
7
8
|
// PostGIS geometry schema (GeoJSON-like structure)
|
|
8
9
|
export const geometrySchema = z
|
|
9
10
|
.object({
|
|
@@ -103,7 +104,7 @@ export const parkingBookingSchema = z.object({
|
|
|
103
104
|
});
|
|
104
105
|
export const companyDetailsSchema = z
|
|
105
106
|
.object({
|
|
106
|
-
hall: z.string().
|
|
107
|
+
hall: z.string().optional().nullable().openapi({
|
|
107
108
|
description: 'Hall location',
|
|
108
109
|
example: 'Hall 1'
|
|
109
110
|
}),
|
|
@@ -151,13 +152,10 @@ export const companyDetailsSchema = z
|
|
|
151
152
|
.openapi('CompanyDetails');
|
|
152
153
|
export const vehicleDetailsSchema = z
|
|
153
154
|
.object({
|
|
154
|
-
vehicle_type:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
unloading_method: z.string().min(1, 'Unloading method is required').openapi({
|
|
159
|
-
description: 'Method of unloading',
|
|
160
|
-
example: 'Manual'
|
|
155
|
+
vehicle_type: vehicleTypeSchema,
|
|
156
|
+
unloading_method: z.enum(UnloadingType).openapi({
|
|
157
|
+
description: 'Unloading method for the vehicle',
|
|
158
|
+
example: 'site'
|
|
161
159
|
}),
|
|
162
160
|
license_plate: z.string().min(1, 'License plate is required').openapi({
|
|
163
161
|
description: 'Vehicle license plate',
|