@venulog/phasing-engine-schemas 0.7.0-alpha.1 → 0.7.0-alpha.2
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 +25 -72
- package/dist/parkingBooking.js +6 -8
- 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";
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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>>;
|
|
@@ -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>>;
|
|
@@ -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>>;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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>;
|
|
@@ -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({
|
|
@@ -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',
|